Since Sun’s API search is a real pain in the arse and even DocWeb doesn’t allow you to quickly search the Java API, this firefox plugin is a substantial improvement: https://addons.mozilla.org/en-US/firefox/addon/60675/ It basically redirects the search query to Google’s “I’m Feeling Lucky” feature to search Java’s API for the class information. Together with Second Search querying the Java API is… Read more »
At first sight, implementing equals() doesn’t seem fairly hard. Unfortunately, it turns out that writing a correct equality method is surprisingly difficult: http://java.sun.com/javase/6/docs/api/java/lang/Object.html The equals method implements an equivalence relation on non-null object references: It is reflexive: for any non-null reference value x, x.equals(x) should return true. It is symmetric: for any non-null reference values x and y, x.equals(y) should… Read more »
Thread safety is a very hot topic for Java programmers right now. But I’ve seen quite a few folks using the rather complex collections from java.util.concurrent when they actually needed just a thread-safe implementation of a Set. Of course, the HashSet implementation is non-thread-safe: http://java.sun.com/javase/6/docs/api/java/util/HashSet.html Note that this implementation is not synchronized. If multiple threads access a hash set concurrently,… Read more »
For those of you, who want to understand what goes on inside google adsense’s show_ads.js, here is the complete source code: Found on http://www.koders.com.
Changing the system volume with a lirc enabled remote can be a pain in the arse if you don’t know what to look for. If you do, it’s quite simple: There is a package called ‘pulseaudio-module-lirc’ (PulseAudio’s Wiki for module-lirc) that contains the volume control module for the PulseAudio sound server. Install the package via yum and enable it Here… Read more »
Since Mozilla dropped support on OJI (Open Java Virtual Machine Integration), the classic java plugin file javaplugin-oji.so doen’t work anymore for Firefox versions >3.6. Starting in Firefox 3.6, Mozilla will only support the standard NPAPI and NPRuntime interfaces. However, a ‘Next-Generation Java plugin’ (that’s what Sun calls it) is available in Java version 6 update 10 or newer and supports… Read more »
To update the initrd.img to load additional drivers early in the boot process, normally you would simply run /sbin/mkinitrd and let the script do the work. But what if the initrd.img used during the installation of CentOS lacks an important driver? Maybe you want to netboot CentOS, but the initial ramdisk CentOS provides doesn’t have the right modules for you… Read more »
I already wrote a little article, how to boot a FreeDos via PXE. Of course, you can boot Fedora (or CentOS) in like manner.
Sometimes, extracting a whole tar archive can be a waste of time (and temporarily disk space). To extract just a single file, you can use This extracts the file file to /tmp/ Of course, most of the time the relative path to the file is not as simple as in the example above: This creates the file /tmp/path/to/file. To avoid… Read more »
I recently installed myStat to keep track of this blog’s rapidly increasing number of readers. Unfortunately, the plugin break the rss feed. The problem is the plugin’s myStat_footer() function, which does not check if the page is a feed before deciding to insert the myStat footer image into the page code. To fix myStat v2.6, locate line 475 in mystat.php… Read more »