Recent Notes
Displaying keyword search results 1 - 10
Created by magnum on September 11, 2012 11:59:43
Last update: September 11, 2012 11:59:43
Exerpt from bash documentation. HISTORY EXPANSION The bash shell supports a history expansion feature that is similar to the history expansion in csh. This feature is enabled by default for interactive shells, and can be disabled using the +H option to the set builtin command. Non-interactive shells do not perform history expansion by default. History expansions introduce words from the history list into the input stream, making it easy to repeat commands, insert the arguments to a previous command into the current input line, or fix errors in previous commands quickly. History expansion is performed immediately after a complete line is read, before the shell breaks it into words. It takes place in two parts. The first is to determine which line from the history...
Created by Dr. Xi on August 15, 2012 12:05:39
Last update: August 15, 2012 12:05:39
Use OpenSSL's s_client command to fetch a page manually:
$ openssl s_client -connect localhost:443 -state -...
Sample session for Google:
$ openssl s_client -connect www.google.com:443 -st...
Resource: SSL/TLS Strong Encryption: FAQ
Created by Dr. Xi on May 25, 2012 15:47:34
Last update: May 25, 2012 15:49:33
Steps to configure SSL for Apache HTTPD server on Windows:
In Apache2.2/conf/httpd.conf , load mod_ssl and include httpd-ssl.conf :
LoadModule ssl_module modules/mod_ssl.so
...
In Apache2.2/conf/extra/httpd-ssl.conf , make sure the paths for the cert files point to the cert and key you want to use:
# Server Certificate:
# Point SSLCertificat...
Start up Apache. If it fails, use the command line to see what the error is. There won't be any log in error.log if there are errors in the conf files:
C:\Program Files (x86)\Apache Software Foundation\...
I corrected the previous error by using the alternative line for SSLSessionCache :
# Inter-Process Session Cache:
# Configure ...
Created by voodoo on February 17, 2012 10:40:43
Last update: February 17, 2012 10:40:43
When a certificate is "untrusted" by IE (such as a self-signed certificate), it displays a "Certificate error" icon next to the address bar. It used to be that you can click on that icon, "View certificates", then install it.
On Windows 7, because of UAC , the "Install Certificate..." button is no longer displayed. In order to see the button, you have to start IE9 with administrator privileges: right click on the IE9 shortcut icon and select " Run as administrator... ".
To save the certificate to a file, click the Details tab on the Certificate dialog, then click " Copy to File... ".
Created by Fang on January 10, 2010 00:19:30
Last update: January 31, 2012 16:28:42
Maven is a powerful yet complex tool. When I started learning Maven, the first obstacle was, of course, its complexity. The second, was the lack of documentation that can get me off the ground quickly. This tutorial is an attempt to create a pragmatic guide that aims to get you familiar with Maven in the quickest way possible. The main theme is to get you on some hands on experience to start out and lead you through the creation of a simple Java EE project as quickly as possible. Instead of trying to give you a good read, I try to get you on the journey right away. The topics are roughly ordered by the logical sequence but you can jump around in any way...
Created by balu on October 14, 2011 10:21:08
Last update: October 14, 2011 10:21:08
Got this error while trying to start vFabric tc server :
C:\Apps\vfabric-tc-server-standard-2.6.1.RELEASE>t...
It's a UAC error. Need to start the command prompt with Administrator privileges: right click the shortcut and select Run as administrator .
Or enable administrator rights for the shortcut:
Bring up the cmd shortcut properties
Select the Shortcut tab, click the Advanced button.
Check Run as administrator .
Created by freyo on September 07, 2011 16:46:14
Last update: September 07, 2011 19:23:00
The Android unit test framework is based on JUnit 3 , not JUnit 4. Test cases have to extend junit.framework.TestCase or a subclass (such as android.test.InstrumentationTestCase ). Tests are identified by public methods whose name starts with test , not methods annotated with @Test (as in JUnit 4). An Android test suite is packaged as an APK, just like the application being tested. To create a test package, first you need to identify the application package it is testing. Google suggests to put the test package source in a directory named tests/ alongside the src/ directory of the main application. At runtime, Android instrumentation loads both the test package and the application under test into the same process. Therefore, the tests can invoke methods on...
Created by freyo on May 17, 2011 11:13:17
Last update: May 17, 2011 11:13:17
This is an odd-ball content provider in that it doesn't provide database records, but provides a resource as a stream. It can be used to provide media files or XML resources. Start the project with:
tools/android create project --package com.android... Create assets directory and add an XML file ( assets/demo.xml ): <? xml version="1.0" encoding="UTF-8"?> <people... Edit the layout ( res/layout/main.xml ): <?xml version="1.0" encoding="utf-8"?> <LinearL... Edit src/com/android/cptest/Dummy.java : package com.android.cptest; import java.io.... Add content provider ( src/com/android/cptest/XmlResource.java ): package com.android.cptest; import java.io.... Update AndroidManifest.xml : <?xml version="1.0" encoding="utf-8"?> <manifes... Add this section to the end of build.xml : <target name="-package-resources"> <ech... Build and install: ant install Screenshot: Remove the Dummy activity ( AndroidManifest.xml ): <?xml version="1.0" encoding="utf-8"?> <manifes... Create a new project for...
Created by freyo on April 18, 2011 15:08:21
Last update: April 18, 2011 15:12:20
Generate android project
$ ~/android-sdk-linux_86/tools/android create proj...
Create XML file res/xml/books.xml :
<?xml version="1.0"?>
<catalog>
<book id=...
Edit layout ( res/layout/main.xml ):
<?xml version="1.0" encoding="utf-8"?>
<Lin...
Edit code ( src/com/android/xmlres/XMLResource.java ):
package com.android.xmlres;
import java.io....
Change activity label from app_name to booklist ( AndroidManifest.xml ):
<?xml version="1.0" encoding="utf-8"?>
<manifes...
Add value for string resource ( res/values/string.xml ):
<?xml version="1.0" encoding="utf-8"?>
<resourc...
Deploy and test:
ant install
Created by freyo on August 26, 2010 20:55:44
Last update: August 26, 2010 20:56:39
Android adb failed to start after I installed the SDK. Running adb from the command line reveals the error:
/lib/ld-linux.so.2: bad ELF interpreter: No such f...
I'm running 64-bit Fedora but Android adb is looking for 32-bit Linux loader. This is resolved by installing the 32-bit libraries.
# yum whatprovides ld-linux.so.2
Loaded plugins...
I did the same for libncurses.so.5 and libstdc++.so.6 to resolve all dependencies.