Just a quick reminder for myself: int a = 0/0; // Throws ArithmeticException double d1 = 0/0.0; // d1 is NaN double d2 = 1/0.0; // d2 is Infinity double d3 = -1/0.0; // d3 is -Infinityint a = 0/0; // Throws ArithmeticException double d1 = 0/0.0; // d1 is NaN double d2 = 1/0.0; […]
A regular expression to replace all ampersands (&) in a text that are not part of an entity: t = t.gsub(/&(?!#?\w+;)/, ‘&’)t = t.gsub(/&(?!#?\w+;)/, ‘&’) Language is ruby. The regexp feature used is called a negative lookahead.
I use rmagick when it comes to deal with images. I’m not that disappointed like Zed Shaw with rmagick (but Zed is totally right when he points out on page 4: “[…] and is difficult to install (unless your computer is nearly exactly the same as the author’s).”), but when it comes to deal with […]
Generics are not totally bad but one can write really creepy things: final FutureTask<Collection<LeitungsachseTK25>[]> ft = new FutureTask<Collection<LeitungsachseTK25>[]>( new Callable<Collection<LeitungsachseTK25>[]>() { public Collection<LeitungsachseTK25>[] call() throws Exception {final FutureTask<Collection<LeitungsachseTK25>[]> ft = new FutureTask<Collection<LeitungsachseTK25>[]>( new Callable<Collection<LeitungsachseTK25>[]>() { public Collection<LeitungsachseTK25>[] call() throws Exception { Seems like XML and Java finally married… 😉
Recently i needed windows clients to access a directory on the database server from which CLOBs where created. Since the server is an Oracle Enterprise Linux, i could follow the steps explained behind the following link to get Samba up and running with the Active Directory run by a Windows 2k3 server: Which steps must […]