about me about me
photography photography
software projects software projects
contact me contact me
25
Nov

I’m surprised I’ve not run into this before but Javascript has two sub string methods.

[String].substr(start, length);
[String].substring(indexA, indexB);

To clarify by example:

var name = "Greg's Blog";
alert(name.substr(7, 4)); // Blog
alert(name.substring(7, 11)); // Blog

Minor but caught me out this afternoon.

Update April, 2010: I’m happy to report this pain is avoided with the latest (10.26.2) MP620 CUPS drivers from Canon when installing this printer on Snow Leopard. After installing the drivers, then adding a new printer, you have to wait a few minutes for SL to detect the printer before it displays it in the list.


This might seem like dumb thing to blog about but I spent an hour or more trying to get this to work. Partly due to my own stubbornness, I resent using driver installation CDs. The driver on them is typically out of date (certainly for graphics cards), and they’re loaded with bloatware crap you don’t need to operate your device / peripheral. Manufacturers love to re-invent the wheel, providing a utility for a service that already exists within the operating system.
Read the rest of this entry »

Update: Before using this library, see PHP Excel that has support for more recent formats of XLS and Office 2007′s xlsx format.


Quick post to consolidate information around the net. Installing this package is not as straight forward as most, as it’s in the beta channel.
Read the rest of this entry »

06
Feb

Tuning Eclipse is pretty straight forward, passing the commonly documented command line arguments when running Eclipse on Mac OS X is not. At least not as easy as it would be in Windows. Like Windows shortcuts we have OS X ‘aliases’ but these do not allow us to specify additional arguments.
Read the rest of this entry »

Having recently switched to Mac OS X, I stumbled upon issues when mounting shared folders on my Macbook Pro from our linux development server. Previously, both Windows Vista and Ubuntu have had no trouble sharing a directory then mounting it from the dev server via smbfs. This enables me (and other developers) to edit files locally which then also appear as a local files to our development server, where we run Apache / MySQL etc.
Read the rest of this entry »

If you choose not to sign up for MobileMe, there is no option in preferences to remove the sync icon (which you will never use) from the menu bar.

MobileMe preferences

Fortunately, holding the Command (Apple) key and dragging the icon to the desktop should detach and remove it.