Tooltips Using jQuery, aToolTip and Regular Expressions

Imagine you have a page of text and you want each occurrence of a certain word to display a tooltip whenever a visitor hovers over it with their mouse. What’s the best way to go about implementing this? Well, you could edit your HTML by hand and add the appropriate tags to every single occurrence of the term. Or, you could just specify your term once and then let jQuery do the work for you.

More …

Tampermonkey Tutorial

In an effort to stay abreast of developments on the World Wide Web, I subscribe to the CodeProject’s excellent newsletter: The Daily Insider. Now, when I open this newsletter in my browser, I’m presented with a whole bunch of links (usually 12) that I want to open. It was getting a bit bothersome to open all of these manually, so I decided to write a userscript to do it for me.

More …

Overlaying Lightbox with the HTML5 Canvas Element

Here’s how to use the HTML5 <canvas> element in conjunction with Lokesh Dhakar’s excellent Lightbox2 script, to dynamically highlight a part of a static image, in this case individual offices on a company’s floor plan.

More …

Moving Mail to Local Folders in Thunderbird

Recently, when moving mail from the uni’s mail server to Thunderbird’s Local Folders, a whole bunch of messages got corrupted. As you can see from the screenshot, the corrupted messages don’t have a subject, “from” is just a minus sign and the date is always the same.

More …

How to Embed Video in your WordPress Site Using HTML5

I have a Panasonic HDC-SD800 high definition video camera and I wanted to embed a couple of short film clips on a private website of mine, which runs on the latest version of WordPress (3.4.1 at time of writing).

I also wanted to embed these videos using HTML5 for those browsers which support it, and have a Flash fall-back for those which don’t.

More …

Simple Form Validation in PHP

Server-side validation of user input is something you run into once in a while and although it is not an overly complicated subject, there are a couple of gotchas to be aware of.

This post demonstrates how to validate a simple form in PHP.

More …

Inspect Object in PHP

To display the contents of an object in Ruby is really simple.

All you do is store the object in a variable, then pass the variable as an argument to the Kernel method p(), which in turn writes obj.inspect to the standard output.

More …