Showing posts from June, 2009

Google Most Recent (Date Sorting) Searches

In the day and age where information gets out-dated on an almost weekly basis, I'm surprised that Google does not have a more intuitive default date-sorting or filtering of search results. By default Google will return you the most relevant results based on word counts, page-rank, incoming links, hit counts, and who knows what else, but last updated or published date does not seem to play any significant role in the algorithm.
Searching for almost anything to do with technology, if I see the page is dated 2007 or earlier, I don't even bother looking at it. What's the point of reading a list of top Ajax libraries in 2006 for example? Or a post about an upcoming release of Eclipse that's over 6 months old? Or the best digital cameras of 2005? For these things, date filtering is a must.
There are two ways to achieve this (without a personalized Google account at least). On the default home-page, click on Advanced Search (in tiny font on the right), then cli…

Mobile Phone Madness

The mobile phone market is currently experiencing an explosion of new devices and features where every manufacturer is trying to outdo each other and get a piece of the pie. Just have a look on GSMArena at the different models available (or announced) for each brand. HTC has 37 models listed, Sony Ericsson has 149 models listed, LG 228, Motorolla 233, Nokia 261 and Samsung has a massive 457!
That's over 1300 different phones just between 5 manufacturers. Granted not all of these are current. If we take a look at the 'Coming soon' phones, HTC is currently sitting on 1 (the Hero), Sony Ericsson on 10, Motorola 15, Nokia on 16, LG 31 and Samsung 48!
Now a lot can be said about these stats. The first thing that pops to mind is that Samsung is spamming the market. Why does a manufactuer need to concurrently develop, manufacture and release 48 different models!? Choice is good for the consumer though, or is it?
I won't get into a debate of what's the best mobile phone or t…

Eclipse 3.5 is Out!

The next major version of Eclipse has just been released (24/06/09), Eclipse 3.5 - Galileo. The Eclipse project targets for a major release just once a year so this is pretty significant to fans of the IDE. I myself use both Eclipse and Netbeans, depending on the task at hand.
I find Netbeans still has the best free Java Swing visual editor around, and the environment seems a little bit more stable and more responsive than Eclipse when working with very large projects with hundreds or thousands of class files. I'm currently using Netbeans 6.5.1 for PHP development (all Eclipse-based PHP IDEs I've tried, including the latest Zend Studio, could not handle my project structure and would go into a seemingly infinite 'Building workspace...' loop).
When it comes to pure Java development though, I feel much more productive and at home with Eclipse (probably because I started with it). I especially liked the 'Build runnable jar' feature introduced in 3.4. This would extr…

jQuery Table & Select List Filter

In a previous post I showed how to integrate a YUI DataTable with simple jQuery client-side filter/search functionality. The technique can very easily be adapted to work with any regular HTML table or HTML select drop-down/listbox. The the code for this is pasted below and a working example can be seen here:

UPDATE: The selectFilter functions below only work in FireFox. See here for a browser independent function.
<script type="text/javascript" src=""></script>
<script type="text/javascript">
//note that you would put these functions in a library .js that you include on every page

//the jQuery default contains function is case-sensitive
//this declaration creates a new Contains function that's case-insensitive
jQuery.expr[':'].Contains = function(a,i,m){
return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0;

var Uti…

The Ultimate HTPC - Part II

In Part I of my Ultimate HTPC rants I looked at a few HTPC alternatives, including ways of transforming the PS3 into a general purpose solution. The conclusion of all that non-sense was that a custom build seemed to be the only means of achieving my goals. This post describes my efforts over the last few weeks to get all the hardware components installed and working as they should (the software side of things is covered here).
The heart of any HTPC is the motherboard as it dictates the CPU brand and architecture you'll be using, the size of system case and other compoents to fit in the case. After a bit of research I chose to use the J&W MINIX 780G. This is a mini-ITX board sporting an integrated Radeon 3200 HD with hardware H.264 decoders and HDMI + Toslink optical SPDIF output. You can read more about the board features in the linked review, but basically it does a fine job at 1080p playback with a decent dual-core CPU.
Speaking of which, I chose to use an AMD Athlon X2 5050e …

Windows 7 WMC HTPC

I've recently delved into trying to build an all-purpose HTPC media center box, the hardware aspects of which are discussed here. On the software side of things, I chose to use the free Windows 7 RC with Windows Media Center. This blog entry discusses the challenges and lessons learnt along the way.

Windows 7 Ultimate RC (build 7100) is available for free download directly from the Microsoft web site, and comes with the latest version of Windows Media Center (WMC for short). WMC allows you to watch & record live TV (with a compatible hardware tuner card), listed to live FM radio (again, with a compatible tuner), play your digital music files, watch slideshows of all your pictures, and watch your digital video collection. To top it all off, WMC has a sleek interface and is relativelly hassle free to configure and use. I've tried other free alternatives such as XBMC, Elisa and MediaPortal but none matched the ease-of-use and sleekness of WMC.

As stated above, WMC will let you …

YUI DataTable with jQuery Filter

The YUI DataTable component is pretty good at most things, but filtering is not one of them. The examples on the YUI website show how to implement server-side filtering via an auto-complete box which updates the data-source URL, re-queries the data-source, and refreshes the table contents upon receiving the results.

But what if your data sets are not large enough to warrant another async call. That is, you want a simple, fast client-side filtering function.

This is where some jQuery data-tables excel (e.g. I wanted to combine the best of both worlds and have a simple filter that worked with my YUI tables without writing 20 lines of code or doing unnecessary processing. Luckily, this is pretty easy to do.

Have a look at this page to see a self-contained working version of this approach. The key parts are:

<b>Filter:</b> <input type="text" id="filter" onkeyup="yuiDtFilter('dt-container', this.value)" />
<div id=&quo…

jQuery - Table Row Highlighting

The following example shows how to use jQuery and simple CSS to create a table with highlightable and clickable rows (see working example here):

<style type="text/css">
cursor: pointer;

<table id="example" border='1'>
<td>First Name</td>
<td>Last Name</td>
<tr onclick="alert('John Smith')">
<tr onclick="alert('Jane Doe')">
<tr onclick="alert('Bob Squarepants')">