A bit about hibernate cache

One of the common mistakes when using hibernate is to think: “no problem, hibernate handles the cache for me”. Wrong! By default hibernate does not cache anything. Well, as far as I understand it cache things in the session cache, but this is usually not relevant. First here is what cache refers to in hibernate: session cache, enabled by default, but with a lifetime equals to the session second-level cache, controlled by: hibernate....

March 4, 2009 · len

Creme brulee, crema de zahar ars

As a child my grandmother would make this recipe and then defend each piece like a guardian. It seemed a magical threat. So when I tried it a few days ago and realized how easy the recipe is it seemed like gaining a new magical grade :) Updated 2010-01-23 with new photo(s). Naming: I did some research and found out that the “creme brulee” term is not the best. A more precise equivanlent is: “creme renverse au caramel”....

February 28, 2009 · len

Enhancing a web application with jquery

I’ve decided to use jquery for the first time in order to implement in the simplest possible way the following problem The problem I wanted to use an existing search/navigation mechanism to select the value of a new input field by making as little modifications as possible to the existing code. Since searching for the item implied navigating a few pages passing information along all the submits or links was impossible without extensive changes....

February 27, 2009 · len

Using amr files

One of the many functionalities of my phone which I do not use is the ability to record to a file. This file is saved in the phone and can then be played. For the first time I needed this functionality to here are the steps to get an usable mp3 file out of it. download the file to the computer using the bluetooth method install an amr decoder apt-get install amrwb amrnb decode the file to raw data amrnb-decoder Recording....

February 27, 2009 · len

unsupported keyword OID.2.5.4.17

The problem Exception in thread "main" java.io.IOException: unsupported keyword OID.2.5.4.17 at com.sun.net.ssl.internal.ssl.AVA.<init>(DashoA12275(Compiled Code)) at com.sun.net.ssl.internal.ssl.RDN.<init>(DashoA12275(Compiled Code)) at com.sun.net.ssl.internal.ssl.X500Name.a(DashoA12275(Compiled Code)) at com.sun.net.ssl.internal.ssl.X500Name.<init>(DashoA12275) at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(DashoA12275) at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(DashoA12275) at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(DashoA12275) at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connect(DashoA12275) at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInputStream(DashoA12275) What’s your fault when a client running your application for more than 5 years is now receiving this error when its security provider finally upgraded it’s certificates to include: OID.2.5.4.17=<9 digit zip> now standard in almost all certificates. Upgrade you might say but this is not simple considering that the client is AIX based:...

February 27, 2009 · len

Linux barcode reader

I was a bit sceptic about how easy is to use an usb barcode reader (Motorola Symbol LS1203) but it was a pleasant surprise. Just plugged the reader in the usb port and was detected as a input device: black kernel: [ 2273.692061] usb 3-1: new full speed USB device using uhci_hcd and address 2 black kernel: [ 2273.909811] usb 3-1: configuration #1 chosen from 1 choice black kernel: [ 2273....

February 23, 2009 · len

Panotools

Update 2009-07-19: for jaunty refer to this track to solve the stitch now problem. I’ve known for some time about hugin and panotools but never got to use them. This is a very short list of steps to build a simple panorama image on linux (note that my Canon A1000 does not have a panorama assist mode so the source images where a bit deviated). Install apt-get install hugin apt-get install autopano-sift Configuration To my disappointment hugin did not worked out of the box since it had some problems finding the proper autopano-sift tool....

February 20, 2009 · len

La semnalul urmator… 1234

La semnalul urmator va fi “ora” secunda : 1234567890 (unix time)

February 14, 2009 · len

A bit of hibernate optimization

The context Assume you are dealing with a hibernate operation which requires to copy a lot of objects in the database. For instance you are having 2 objects as described in the diagram bellow: budget and entries and you want to duplicate the budget and all it’s entries for some operation. There are several way to do this. Budget - entries First approach In hibernate usual approach this is done most of the time as something similar to:...

February 10, 2009 · len

The conflicting ssleay32 and libeay32

Since everybody seemed to be stuck with using the library on windows and yet on linux it worked from the start I’ve decided to dive into the wonderful world of windoze. The problem: while trying to use a java, jni-based library the error was unavoidable: java.lang.UnsatisfiedLinkError: C:\sw_api\sw_api\windows\sw_api.dll: The operating system cannot run %1 at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) As such I decided to wrote this simple program:...

February 3, 2009 · len