Loading

Author Archives: ruben.laguna

OpenJPA, HSQLDB and proper shutdown

I’m starting to get tired of OpenJPA/HSQLDB setup that I’ve trying: it seems to give more problems than it solves. Now I discovered that the HSQL db wasn’t been properly shutdown and for reasons that I’m investigating, if the HSQL db is not propertly closed (SHUTDOWN command) it’s impossible to reopen it again. It fails [...]

JTable bound to a database with lazy loading

I’ve been doing experiments with JTables bound to database tables in the past. But I was not satisfied with the result to be honest. The pagination helps but there is still noticeable pauses each time a database query has to be issued. So I started looking into other possibilities. I come up with the idea [...]

Migrating from Blinklist to Delicious.com: CSV to HTML

Apparently blinklist doesn’t export bookmarks to JSON format any longer and delicious has changed authentication scheme for its delicious API for new accounts (now it forces new users to use the OAuth / Yahoo ID). So the solutions described in this old post of mine doesn’t work. So given the current state of affairs the [...]

Two netbeans bugs at the same time

It seems that source attachement for Library Wrapper Modules in Netbeans 6.8 Beta doesn’t work properly. I opened a bug report here https://netbeans.org/bugzilla/show_bug.cgi?id=176800#c9 and it seems that in the process I also spotted that “Swing Layout Extensions” library definition that comes with NB 6.8 it’s also wrong (see https://netbeans.org/bugzilla/show_bug.cgi?id=176800#c7) Bookmark It Hide Sites $$(‘div.d1006′).each( function(e) [...]

How to handle custom tags using Flying Saucer

If you have a customized xhtml variant, like evernote ENML format and you want to render it with Flying Saucer R8 you must first make sure that the extra element (in ENML case, en-media) is defined as a block-level element. To do that you create your own NamespaceHandler and you make sure that you return [...]

Incorrect track length in iTunes

iTunes was reporting a incorrect track time length for an audiobook that I created concatenating several mp3 together. I had to reencode the whole thing again to make iTunes recognize propertly the track lenght. I could’t reencode the concatenated file itself as that ended up with a Segmentation fault in lame cat *.mp3 |lame –mp3input [...]

Disable DOM DTD validation

setValidating(false) will not prevent DTD validation, but you can set http://apache.org/xml/features/nonvalidating/load-external-dtd feature to false. I think is a Xerces-only feature, though, it may not be recognized by other parsers. DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(false); //factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false); // it doesn’t work factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); DocumentBuilder parser = factory.newDocumentBuilder(); Document doc = parser.parse(getClass().getResourceAsStream("ennote.xml")); Typical DTD not found exception [...]

Google wave extension list

Interesting list of google wave extensions that I found in DocStoc Google Wave Extension List – Bookmark It Hide Sites $$(‘div.d966′).each( function(e) { e.visualEffect(‘slide_up’,{duration:0.5}) });

Rotate screen on Windows [Intel® 945G Express Chipset]

I just found out on that if you have a Intel® 945 or any modern Intel card and you monitor/display/screen appears rotated 90 degrees or upside down, etc you can restore it to it’s original position by pressing Ctrl-Alt-↓ Via: http://www.labnol.org/software/turn-computer-screen-upside-down/6097/ Bookmark It Hide Sites $$(‘div.d963′).each( function(e) { e.visualEffect(‘slide_up’,{duration:0.5}) });

Netbeans: Compile schemas into JAXB classes with XJC task

To add a XJC task to a Netbeans build.xml you need to add a -pre-compile target to your build.xml. If it’s a netbeans module build.xml then you need to make compile depend on -pre-compile and projectized-common.compile (see example below). For regular Java Applications just define the -pre-compile target as the standard build.xml will call -pre-compile [...]