All posts in 'English posts'

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 »

Linux: Persistent wake-on-lan

03-Mar-10

Just a quick reminder for myself: You need to enable wake-on-lan on the nic in most linux distributions via ethtool. If your nic supports WOL, it probably needs to be enabled in your computers BIOS first. Most WOL tools use the “MagicPacket(tm)” method, so the right command to enable it on the nic “eth0” would […]

Read the complete article »

Oracle: Drop table if exists replacement

16-Feb-10

Mysql has a nice “if exists” addition to the drop table statement. If the table to be dropped does not exists, it doesn’t raise an exception but only creates a warning. In Oracle RDMBS you can emulate this behavior like so: BEGIN EXECUTE immediate ‘drop table INSERT_TABLE_NAME_HERE’; EXCEPTION WHEN others THEN IF SQLCODE != -942 […]

Read the complete article »

An iterable array

12-Jan-10

Java has the nice Iterable interface (since Java 5, i guess) that allows object oriented loops like List<String> strings = new ArrayList<String>(); for(String string : strings) System.out.println(string);List<String> strings = new ArrayList<String>(); for(String string : strings) System.out.println(string); but guess what, a simple array is not iterable… In case you need one, feel free to use this […]

Read the complete article »