Archive for category Tech

Enable OpenGL hardware acceleration for Java 2D

For a couple years now I have been disappointed that one of my 2D Java programs had HORRIBLE performance on my laptop. I noticed the problem got horrible when I upgraded to Vista and didn’t get fixed with my upgrade to Windows 7. The program is a 2D graphing application that draws multiple data streams as scrolling waveforms on the screen in real-time. It is written using Java Swing libraries and the Graphics2D API. On my laptop I was getting less than 1 update per second. On my work computer I was exceeding 200!

Over the last couple years I tried everything to no avail. Finally today I stumbled across this article that describes several unsupported Java system properties that affect the 2D graphics system.

I tried adding the following line to my program and voila! Awesome performance. Problem solved.

System.setProperty("sun.java2d.opengl","True");

 

Thinkpad T42p graphics driver in Windows 7

A long time ago I raved about how awesome Windows 7 was compared to past operating systems. It turned out that my installation did have one fatal flaw that I dealt with for a little over a year. The graphics driver that I had managed to get to install caused crashes and blue screens when I switch from docked to undocked while in hibernate or sleep state.

Last month I messed up my installation so bad that I had to reinstall Windows. This time I took a bit more delicate approach to installing the graphics driver and it worked. So here is a guide for others still squeaking every last breath out of their previous T42p. This process worked for my ATI Fire GL T2/T2e

  1. Download the Catalyst “Legacy” Display Driver off http://ati.amd.com/ Select: “Desktop Graphics”, “9xxx Series”, “9700 Series”, “Windows 7 – X Bit”.
  2. Download Mobility Modder http://www.hardwareheaven.com/modtool.php and then follow the instructions.

The hardest part was trying to figure out what options to enter on AMD/ATI’s website to make them give me the right catalyst suite. Once that was done the rest is easy. Now my laptop docks and undocks with no glitches.

Filter duplicate emails with Procmail

At school I am on multiple email lists based upon my classification. Unfortunately the school does not have the list server configured to ensure that only one copy of any given message is delivered to a user. So when administrators send messages to list1, list2 and list3 all at once I get three copies of the same email!

This has bugged me for so long and I have put off finding a way to filter it because I figured it would be pain. But it wasn’t! All you need is a new procmail recipe like the following:

PMDIR=$HOME/.procmail
:0 Whc:
msgid.lock | formail -D 4096 $PMDIR/idcache
:0 a:
Mail/duplicates

Make sure $HOME/.procmail exists before expecting this to work!

This tidbit was thanks to the Sysadmin Ramblings blog.

http://ramblings.narrabilis.com/wp/filtering-duplicate-emails-with-procmail/