Archive for 'code'

Custom events in JQuery

For a project at work this week I needed to modify a Javascript library so that under a particular condition it would generate a JS event that could be handled elsewhere in the application.  Why use JS events rather than just call a regular JS function? Well, I guess partly to maintain consistency with the [...]

TinyURL Bookmarklet

If you just want to try this out, drag the link below to your bookmarks toolbar, then click the new bookmark. I’ve only tested in Firefox 3.04 so far so your mileage may vary if you use another browser. Let me know in the comments if you find this useful or have any problems. Tiny [...]

XBMChumby sourcecode is now public

It’s taken me a while I’ll admit but I’ve just got around to releasing the sourcecode for the XBMChumby widget I wrote which displays the XBMC “Now Playing” queue on the Chumby. I decided early on that my very basic skills as a flash/ActionScript developer weren’t up to developing this to it’s full potential so [...]

Drawing graphs with Javascript

If you’re viewing this post in your feedreader, head over to the site to see the example graph! I’ve been experimenting with Javascript libraries for building graphs dynamically in the client browser. In the past if I’ve wanted to create simple bar graphs I’ve used divs and css – an approach has the advantage of [...]

Google gadgets

So I’ve been messing around with various different widget frameworks on and off over the last few months as preparation for a workshop I’m going to be involved with. I started out with Yahoo Widgets (née Konfabulator) mainly because the examples that I’d seen looked the prettiest. Although perhaps not strictly widgets, I’ve also started [...]

How to find the size of a database table

Seems there are lots of ways of doing this, but this worked for me (on an Oracle DB). It returns the size of the database table in megabytes: [code lang="sql"] select bytes/1024/1024 from user_segments where segment_name=' ' [/code]

Importing a user’s address book with Plaxo

Despite sounding like a mouthwash, Plaxo is a nifty tool that can be embedded in any site to allow a user to select contacts stored in their address book on Yahoo! Mail, GMail, Hotmail and others. Plaxo interfaces to all of these sites for you so that you don’t have to write code for several [...]

Playing with Python

For something I was playing around with at work, I wanted to be able to retrieve an rss feed, parse it and post the title/description fields to another website site at timed intervals. These days I only really write in Java and JavaScript but Java seemed like such a longhand way to achieve this. I [...]