Posts categorised as Code Samples

TARMAC

June 13th, 2008

Thanks to everyone who came to the Auckland Web Meetup last night. It was our pleasure to sponsor this month’s event.

I thought the other two presentations were very interesting, especially about how iVistra has built an enterprise fleet tracking solution using Ruby and Flex. It definitely inspired me to try.

Here are the links from my presentation:

  • Presentation
    Meetup-0608
  • TARMAC Demo
  • TARMAC on Google Code
    As mentioned, this is free to use, but if you feel like contributing by way of enhancements to the code that would be appreciated.

One of the gentlemen that asked me a question suggested that iFrames were deprecated and Google were no longer going to index them. This is completely incorrect, as far as I am am aware. In any case, TARMAC appears as a normal hyperlink to search engine spiders anyway. If Google is dropping iFrames, they had better rebuild Gmail. Login and View Source, it is nothing but iFrames!

FancyZoom

April 20th, 2008

I love this script from Cabel. Very cool Javascript zooming. Similar to the Prototype Lightbox, but I think I actually prefer this.

Just click on any of the thumbnails below. These are screenshots from the work we have been doing for Mountain Dew recently around turning much of their content into widgets that can be distributed to various platforms, such as NetVibes, iGoogle, Facebook, etc.

MD Widgets on iGoogleMD Widgets on Netvibes.comMD Widgets as Facebook Apps
Share Widgets via Clearspring

Love AJAX - Hate Debugging It

September 1st, 2006

I still maintain AJAX is the way forward when it comes to web development, however, having just spent hours trying to debug issues that only affects IE when the same code works perfectly in Safari and Firefox, is extremely annoying. IE is very helpful and gives you this error message “Unknown run-time error”, which basically translates to “something went wrong, can’t tell you anything more than that though”.

Anyway, long story short, don’t try to have JavaScript write to an innerhtml element within <p> tags, I changed it to a <div> and everything worked. I really hope that IE 7 has better support or at least better debugging for AJAX.

Technorati Tags:

JDBC for MS SQL Server 2000 & 2005 - Spot the difference

July 12th, 2006

This was clearly some geek’s idea of a joke when they wrote this code. Here is the connection URL and class name for JDBC connection to a MS SQL Server 2000 database:

jdbc:microsoft:sqlserver://SQLSERVER;DatabaseName=DATABASE;selectMode=cursor;
com.microsoft.jdbc.sqlserver.SQLServerDriver

For the new MS SQL Server 2005 JDBC driver:

jdbc:sqlserver://SQLSERVER;DatabaseName=DATABASE;selectMode=cursor;
com.microsoft.sqlserver.jdbc.SQLServerDriver

Spot the difference yet? The new connection string URL doesn’t have microsoft in it, and the new class names has the jdbc and sqlserver switched around.

jdbc:sqlserver://SQLSERVER;DatabaseName=DATABASE;selectMode=cursor;port=1433
com.microsoft.sqlserver.jdbc.SQLServerDriver

Good way to drive a developer crazy for a little while when migrating their application to SQL Server 2005. I think this is Microsoft’s way of messing with you for using Java instead of .NET for your application.