All posts in 'English posts'

How to get UIDefaults in Java

06-Sep-10

If you’re loocking for Javas UIDefaults, use the UIManager class. This snippet gives you all installed UIDefaults: UIDefaults defaults = UIManager.getDefaults(); for(Enumeration e = defaults.keys(); e.hasMoreElements(); ){ String key = e.nextElement().toString(); System.out.println(key + " = " + defaults.get(key)); }UIDefaults defaults = UIManager.getDefaults(); for(Enumeration e = defaults.keys(); e.hasMoreElements(); ){ String key = e.nextElement().toString(); System.out.println(key + " […]

Read the complete article »

Oracle NLS-Lang Settings

13-Aug-10

To use SQL*Plus Windows correctly, export NLS_LANG like so: set NLS_LANG=GERMAN_GERMANY.WE8MSWIN1252 If you prefer the command line client SQL*Plus, export NLS_LANG like so: set NLS_LANG=GERMAN_GERMANY.WE8PC850

Read the complete article »

J2SE: Cut/Copy/Paste Helper

09-Jul-10

You wouldn’t think that having a standard edit menü with Cut, Copy and Paste buttons would be much of a problem in the J2SE world, especially regarding the fact that most standard Swing components have TransferHandlers that support the 3 operations with the standard keyboard shortcuts. First try was to user TransferHandler.getCopyAction() etc. and create […]

Read the complete article »

Extended Live Archives and WordPress 3.0

21-Jun-10

The Extended Live Archives Plugin does not work with WordPress 3.0, opposed to the plugin page. I still like this plugin as seen here, so here is my solution: Download the archive Open includes/af-extended-live-archive.js.php and includes/af-ela.php in your favorite editor Replace in both files require(’../../../../wp-blog-header.php’);require(‘../../../../wp-blog-header.php’); with require_once(’../../../../wp-config.php’); $wp_did_header = true; $wp->init();require_once(‘../../../../wp-config.php’); $wp_did_header = true; $wp->init(); […]

Read the complete article »

Using SQL*Plus without tnsnames.ora

29-Mar-10

As often, a quick reminder for me. I’m using the Oracle Instaclient on my Mac without a tnsnames.ora and i keep forgetting the connectstring syntax: sqlplus USER/PASS@//HOST:PORT/SIDsqlplus USER/PASS@//HOST:PORT/SID Extra bonus points: Through in rlwrap to get a nice commandline history and completion as used to in a standard shell: rlwrap sqlplus USER/PASS@//HOST:PORT/SIDrlwrap sqlplus USER/PASS@//HOST:PORT/SID

Read the complete article »