Touchpad not working on keysonic ACK 540 RF [solved]

The trackpad/touchpad on my keysonicACK 540 RF although the keyboard worked fine. So did lots of debugging with dmesg, udev, xev, research on forums etc… Turned out the batteries were just low, such that the keyboard worked but the mouse didn’t. Fresh batteries. Fixed. #checkhardwarefirst

Theme park cursor freeze [solved]

Eventually tracked this down a solution to this on a forum by someone exceedingly clever. Turns out to be an issue in the original game, but happens more often using emulators such as DOSBox. I tracked down the mouse pointer freeze problem some time ago thinking it might be a DOSBox issue, but AFAICT… Continue reading Theme park cursor freeze [solved]

Command line perl

I find this much more useful than sed. Example 1: Filter/regex. Print numbers from matching lines. foo 12 bar 23 other baz 34 -e is script mode. -n loops over your input automatically. # -n option does the while loop for you horse:~ adam$ perl -ne ‘print “$1\n” if /(\d+)/’ foo.txt 12 23 34 Without… Continue reading Command line perl

Categorized as geek Tagged ,

Mythweb broken in Ubuntu 12.10 [solved]

HTTP 500s when trying to visit mythweb after upgrade to 12.10. Cause, removal of allow-call-time-pass-reference option in PHP 5.4 adam@brimstone$ tail -f /var/log/apache2/error.log [Sun Dec 02 16:59:29 2012] [error] [client] PHP Fatal error: Call-time pass-by-reference has been removed in /usr/share/mythtv/bindings/php/MythBase.php on line 50 [Sun Dec 02 17:03:53 2012] [error] [client] PHP Fatal error:… Continue reading Mythweb broken in Ubuntu 12.10 [solved]

JNI helloworld

JNI is easy to use when you know how and frustrating when you don’t. I hope to demystify it and provide some pointers to when it goes wrong. Define your native methods using the native modifier. In this example we’ll add two numbers together. public class HelloWorld { public native int add(int a, int b);… Continue reading JNI helloworld

Categorized as geek Tagged ,

Filtered copy and preserve directory structure

Say you had a massive, slow clearcase VOB with many filetypes, but you just wanted to copy the java files to /tmp for fast searching, and preserve the directory structure. find . -name “*.java” | cpio –pass-through –verbose /tmp/horsecopy

Categorized as geek Tagged ,

SQLite with Hibernate/JPA LIMIT not working [solved]

Couldn’t get setMaxResults() / setFirstResult() to work properly in SQLite with Hibernate / JPA2. These ultimately boil down to SQL LIMIT/OFFSET. After much debug I found there is a problem in the widely distributed source. The following needed adding, checkout the method name, code smell! @Override public boolean bindLimitParametersInReverseOrder() { return true; }

Brasero cannot find DVD [solved]

Needed to use my DVD burner under Linux for the first time in 5 years, it’s still painful. The latest and greatest GUI is brasero which is default in Ubuntu 12.10. Still didn’t work “out of the box” though as it can’t find my DVDR drive. brasero –brasero-media-debug BraseroMedia: (at brasero-media.c:533) Initializing Brasero-media 3.4.1 BraseroMedia:… Continue reading Brasero cannot find DVD [solved]