Recent Notes

Displaying keyword search results 1 - 10
Created by Dr. Xi on May 02, 2011 15:59:37    Last update: February 25, 2012 09:16:37
This code snippet gets the default keystore used by the Java keytool and displays the list of aliases along with the key type (certificate or private key). import java.io.File; import java.io.FileInputSt... The default keystore used by the above code is: $HOME/.keystore .
Created by zhidao on January 02, 2012 15:17:43    Last update: January 03, 2012 07:18:15
SCIM is needed to input Chinese in Ubuntu. Install the needed packages: $ sudo apt-get install scim-qtimm im-switch scim-p... Goto "System Settings": click the "gear" icon at top right corner and select "System Settings..." Click "Language Support" Select scim for "Keyboard input method system" Log out and log back in. Switch between input methods with CTRL+Space A list of available input methods is available from: http://www.scim-im.org/projects/imengines
Created by nogeek on December 30, 2011 13:25:28    Last update: December 30, 2011 13:57:37
By default, tomcat uses an enhanced java.util.logging implementation called JULI, which can be configured at two different levels: Globally, with the ${catalina.base}/conf/logging.properties file. Per web application, with WEB-INF/classes/logging.properties . The configuration file is a normal Java properties file: Logging handlers are specified with the handlers property. handlers = 1catalina.org.apache.juli.FileHandler, ... The root logger can define its set of handlers using the .handlers property. .handlers = 1catalina.org.apache.juli.FileHandler,... A prefix may be added to handler names. The prefix starts with a digit and ends with a dot ( . ), for example: # 1catalina. is a prefix 1catalina.org.apache.j... System property replacement is performed for property values which contain ${systemPropertyName} . Each handler can have its own specific properties: 3manager.org.apache.juli.FileHandler.level = FINE ... Loggers can define their own...
Created by Dr. Xi on November 11, 2011 10:05:22    Last update: November 11, 2011 10:12:01
This is an HTML image tag filter using Java regex. It takes a string, finds the img tags, replaces the src attribute with one provided by the filter, then adds a class name to the class attribute. import java.util.regex.*; import java.io.*; ... Test file: <div id="HTML snippet"> <img src="img/big/txt-m...
Created by Fang on November 10, 2011 09:26:12    Last update: November 10, 2011 09:26:12
Syntax highlighted XML schema for JSF 2.0 Application Configuration Resource File ( faces-config.xml ). Almost 3000 lines! <?xml version="1.0" encoding="UTF-8"?> <xsd:sch...
Created by mee2 on October 20, 2011 16:52:33    Last update: October 20, 2011 16:54:17
Alfresco RESTful URLs provided by Web Scripts are extensively documented, but examples are hard to come by. This makes it hard to ramp up for beginners. Here are some examples I tested on 3.4.4 enterprise edition and 4.0a community edition, with the results documented. To list the available scripts: http://localhost:8081/alfresco/service/index There's a Refresh Web Scripts button at the bottom of the page. If you add a Web Script, you need to click that button in order for the system to know about your addition. To get information about the root folder ( Company Home ): http://localhost:8081/alfresco/service/cmis/p To get information about the folder Data Dictionary : http://localhost:8081/alfresco/service/cmis/p/Data... To get information about the folder Data Dictionary/Space Templates : http://localhost:8081/alfresco/service/cmis/p/Data... You get the idea. To list the children...
Created by magnum on September 16, 2011 16:04:05    Last update: September 16, 2011 16:05:06
Linux distros come with PPTP client bundled. This is how to configure Linux as PPTP client: Click System->Preferences->Network Connections: Select the VPN tab, click Add : Select PPTP from the list and click Create... : To connecto to the PPTP VPN: click the Network icon on the launch Panel and select the VPN name just created.
Created by freyo on August 25, 2011 09:07:40    Last update: August 25, 2011 20:45:43
This is a list of built-in Android permission values: Permission Description Since API Level android.permission.ACCESS_CHECKIN_PROPERTIES Allows read/write access to the "properties" table in the checkin database, to change values that get uploaded. 1 android.permission.ACCESS_COARSE_LOCATION Allows an application to access coarse (e.g., Cell-ID, WiFi) location 1 android.permission.ACCESS_FINE_LOCATION Allows an application to access fine (e.g., GPS) location 1 android.permission.ACCESS_LOCATION_EXTRA_COMMANDS Allows an application to access extra location provider commands 1 android.permission.ACCESS_MOCK_LOCATION Allows an application to create mock location providers for testing 1 android.permission.ACCESS_NETWORK_STATE Allows applications to access information about networks 1 android.permission.ACCESS_SURFACE_FLINGER Allows an application to use SurfaceFlinger's low level features 1 android.permission.ACCESS_WIFI_STATE Allows applications to access information about Wi-Fi networks 1 android.permission.ACCOUNT_MANAGER Allows applications to call into AccountAuthenticators. Only the system can get this permission. 5 android.permission.AUTHENTICATE_ACCOUNTS...
Created by freyo on August 01, 2011 16:06:40    Last update: August 03, 2011 08:32:01
To list all installed packages: # pm list packages To list all disabled packages: # pm list packages -d pm help: # pm usage: pm [list|path|install|uninstall] ...
Created by Dr. Xi on July 27, 2011 08:55:34    Last update: July 27, 2011 08:55:34
It is OK to remove elements from a list with Iterator , but you get UnsupportedOperationException if the list is created with Arrays.asList : import java.util.*; public class IteratorRe... Prints: ArrayList test: ================ List size: ...
Previous  1 2 3 4 5 Next