Wednesday, August 1, 2012

Eclipse: Job found still running after platform shutdown.

There are 3 things to be borne in mind when working with Eclipse:

1) Eclipse is a piece of crap
2) Eclipse is a major piece of crap
3) Eclipse is a disgustingly fetid stinking piece of crap

Having said that, when you encounter this message "Job found still running after platform shutdown", just shutdown everything, rename your .metadata directory in the workspace and restart anew.
Remember also that Eclipse brilliantly writes its log into a .log file (invisible in Linux).... there you will find the real reason for the crash, which of course has NOTHING to do with the error message you get.




Oracle Instant Client on Linux

download from:

http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html

or more specifically

http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

download the RPM version

oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm

rpm -i oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm
error: can't create transaction lock on /var/lib/rpm/__db.000

need to be root

String manipulation in Bash shell

I am really fed up by people who use unreadable sed and awk commands to perform basic string manipulations, like a find and replace on a string.

There are very nice expression you can use:

http://tldp.org/LDP/abs/html/string-manipulation.html

string length: ${#string}

expression matching: expr match "$string" '$substring'

index: expr index $string $substring

substring: ${string:position:length}

substring delete: ${string#substring}

find and replace: ${string//substring/replacement}


Please use awk and sed only if REALLY needed.

The only good code is readable code.