Archive for January, 2005

Coolest Error Message

Monday, January 24th, 2005

This is one of the coolest error messages I have come across in a long time:

Your transaction (process ID #10) was deadlocked with another process and has been chosen as the deadlock victim. Rerun your transaction.

This was the result of a SQL Server/ASP request.

Show Non PR Links in Firefox

Monday, January 24th, 2005

Last week Google announced that it’s spiders will ignore anchor elements that have their rel attribute set to nofollow. This is a substantial move that hopefully will protect bloggers and and other website owners from comment and referrer spam.

If you would like a visual indication of links on websites that have the nofollow attribute value set, you can make a simple change to a file in Firefox.

You can simply edit your userContent.css file in your profile directory and add this simple css rule:

a[rel="nofollow"] { border-bottom: 3px dotted red !important}

The easiest way to find and edit this file is to install the clever ChromeEdit Extension.

Now everytime you browse to a page that contains a link with the nofollow attribute value, that link will have a red dotted underline!

This tip was inspired from an article I read at Andy Budd’s website.

Open Windows Explorer to any Path

Sunday, January 23rd, 2005

Window Explorer by default always opens to the My Documents folder. In the event that you would like Explorer to open up and show a drive or or a folder, you can modify the command line options for any shortcut to Windows Explorer.

Simply change the target of the shortcut to :

%SystemRoot%explorer.exe /n,/e,pathToOpen

Now your Explorer will open to any path that you specify!

Run Mac OS X on a PC

Friday, January 21st, 2005

WindowsDevCenter.com has a good tutorial that will show you how to Run Mac OS X on a PC using the open-source Pear PC PowerPC Emulator.

The PHP Layers Menu System

Thursday, January 20th, 2005

The PHP Layers Menu System will render a hierarchical DHTML menu system “on the fly” using PHP. It supports a wide range of browsers including: Mozilla, Netscape, Safari, Opera, Internet Explorer.

Collapse and Expand HTML Elements

Wednesday, January 19th, 2005

domCollapse is a Javascript that enables you to have collapsible elements in an HTML document. The collapsing and expanding of the elements is done using the DOM. The script is very simple to use, and degrades nicely in browsers that donot support the DOM. A demo is available online.

Picasa 2 Released

Tuesday, January 18th, 2005

Picasa 2 has just been released. Picasa is a great tool that let’s you organize, print, edit and share your photos. Version 2 has some neat new features that include instant albums, labels, stars, advanced picture search. This is in my opinion, the closest equivalent to iPhoto on the PC.

iPod2PC

Tuesday, January 18th, 2005

iPod2PC is a slick utility that lets you copy your MP3’s from your iPod to any PC. The default behaviour of an iPod is that it can only transfer music between itself and a designated PC. This software lets you move your music to a second (or third…) PC.

Running JavaScript from an Anchor Element

Monday, January 17th, 2005

We ran into a situation at our office last week that got us discussing the best way attach JavaScript code to an anchor element. I know there are many solutions and each has it pro’s and con’s that can be associated to usability and browser quirks.

The method I use, uses an octothorpe (hash, pound sign) as the value of the href attribute, with my JavaScript code in the onclick event handler. I make sure the event handler returns false which ensures that an entry is not made in the browser’s history and it also prevents the link from jumping to the top of the page. The code looks like this:

<a href="#" onclick="someFunction(); return false;">go</a>

So my question to you is: how do you handle attaching JavaScript to an anchor element and why do you choose that method. I would also appreciate comments on my method as well.

Avalon Technology Preview

Saturday, January 15th, 2005

Microsoft has just released it’s Avalon Community Technology Preview Including WinFX SDK as a public beta. In November, the preview was only released to MSDN members. So if you’re interested in looking at what all the buzz is, you might want to take a look. Avalon will use a new XML based markup language called XAML, to create user interfaces in Longhorn. Microsoft looks to be positioning XAML to compete with XUL (used in Firefox) and Macromedia Flash.