Thursday, 25 February 2010

jQuery Lightbox Scripts

jQuery Lightbox Plugin
jQuery lightBox plugin is simple, elegant, unobtrusive, no need extra markup and is used to overlay images on the current page through the power and flexibility of jQuery´s selector.
lightBox is a plugin for jQuery. It was inspired in Lightbox JS by Lokesh Dhakar.
Supports: images.
Main site:
FancyBox is a tool for displaying images, html content and multi-media in a Mac-style "lightbox" that floats overtop of web page.
It was built using the jQuery library. Licensed under both MIT and GPL licenses
Supports: images, HTML, iFrame content
Main site:
Shadowbox is a web-based media viewer application that supports all of the web's most popular media publishing formats. Shadowbox is written entirely in JavaScript and CSS and is highly customizable. Using Shadowbox, website authors can showcase a wide assortment of media in all major browsers without navigating users away from the linking page.
Supports: images, Flash, Quicktime, Windows Media Player, HTML
Main site:
ThickBox is a webpage UI dialog widget written in JavaScript on top of the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal.
Supports: images, gallery images, inline content, iFramed content, AJAX content
Main site:
Fancy Zoom (jQuery)
This works with any html (images, text, headings, flash). The only caveat is it doesn't currently work with AJAX. Whatever you want to zoom to must be html already on the page.
Supports: images, inline content, text
Main site:
Facebox is a jQuery-based, Facebook-style lightbox which can display images, divs, or entire remote pages.
It's simple to use and easy on the eyes. Download the tarball, view the examples, then start enjoying the curves.
Supports: images, DIVs, iFrame content
Main site:
Designers seem to like using modal windows more and more, as they provide a quick way to show data without reloading the entire page. It's easy to use and easy to design.
The big problem I experienced with every plugin I tried either using Prototype/Scriptaculous or jQuery is the customization. They say you can do whatever you want simply but that's not fully true. The default CSS works fine, but most of time it's a mix between required elements and optional. That mean you have to be very careful when editing it.
The other problem is the animation. That's the worst point. I never found one plugin allowing to redefine easily the animations.
I tried to solve these problems with my plugin. I documented everything possible. The default CSS contains only optional rules. Without it, the plugin will works perfectly —but will also looks very sad. Regarding the animations, you can simply redefine them from A to Z. Thanks to the useful jQuery function like animate, fadeTo or the future enchant, it's pretty simple.
Moreover, I added the ability to define many callbacks at different time in the process to allow you to edit the settings, the data or do whatever you need.
Supports: images, inline HTML, iFrame, AJAX, video
Main site:
Interface Imagebox Demo
Supports: images.
Main site:
image Supports: images
Main site:
prettyPhoto is a jQuery based lightbox clone. Not only does it support images, it also add support for videos, flash, YouTube, iFrames. It’s a full blown media lightbox. The setup is easy and quick, plus the script is compatible in every major browser.
It comes with useful APIs so prettyPhoto can be launched from nearly anywhere (yes, that includes Flash)!
Supports: images
Main site:

Monday, 22 February 2010

Windows 7 Disable UAC

Particularly when using a PC for development purposes the inbuilt user account control (UAC) can be a pain. The following steps will disable UAC completely, the same process can be used to reduce the level of UAC on the system.
  • Choose "Start"
  • Enter "Action Center" in the search box
  • Press Enter
  • Click "Change User Access Control settings"
  • Move the slide to "Never notify"
  • Click OK
  • Restart the PC

Enable IIS in Windows Vista

In Windows Vista and above all of the available features are installed by default but aren’t necessarily enabled. By default IIS is disabled in Windows Vista, the following steps will allow you to enable the feature.
  1. Open Control Panel
  2. Click "Programs"
  3. Click "Turn Windows Features on or off"
  4. Expand "Internet Information Services"
  5. Expand "Web Management Tools"
  6. Tick "IIS Management Console"
  7. Expand "World Wide Web Services"
  8. Expand "Application Development Features" and tick ".NET Extensibility" and ASP.NET
  9. Expand "Common Http Features" and tick "Default Document", "HTTP Errors" and "Static Content"
  10. Expand "Health and Diagnostics" and tick "HTTP Logging" and "Request Monitor"
  11. Expand "Security" and tick "Basic Authentication", "IP Security", "Request Filtering" and "Windows Authentication"
  12. Click OK

Friday, 19 February 2010

Exception Types

A failed run-time check;used as a base class for other.
Failure to access a type member, such as a method or field.
An argument to a method was invalid.
A null argument was passed to a method that doesn't accept it.
Argument value is out of range.
Arithmetic over - or underflow has occurred.
Attempt to store the wrong type of object in an array.
Image is in the wrong format.
Base class for exceptions thrown by the runtime.
An attempt was made to divide by zero.
The format of an argument is wrong.
An array index is out of bounds.
An attempt was made to cast to an invalid class.
A method was called at an invalid time.
An invalid version of a DLL was accessed.
A number is not valid.
Indicates sthat a method is not implemented by a class.
Attempt to use an unassigned reference.
Not enough memory to continue execution.
A stack has overflown.

Tuesday, 16 February 2010

Recover a stolen laptop or device with Prey

Very handy open source utility for remotely monitoring your laptop/device in the hope of capturing details of the miscreant!
Prey helps you locate your missing laptop by sending timed reports with a bunch of information of its whereabouts. This includes the general status of the computer, a list of running programs and active connections, fully-detailed network and wifi information, a screenshot of the running desktop and — in case your laptop has an integrated webcam — a picture of the thief.

Friday, 5 February 2010

VS Bootstrapper package locations

Between VS 2005 and VS 2008 the bootstrapper locations changed.
Visual studio 2005:
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages
Visual studio 2008:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages

Hide form title bar

To hide a form title bar without making the form borderless:
1. Set the form ControlBox property to false.
2. Set the form Text property to string.empty

Microsoft Leaks Office 2010 Upgrade Plan

Originally posted to the Microsoft partner site and then hastily removed Microsoft have revealed the specifics of their upgrade plans for purchasers of Office 2007 to be able to update to 2010 when it is released.

Original page.

Google cached version.

Original text:

Microsoft Office 2010 Technology Guarantee Program

Sell Office 2007 today and your customer can download Office 2010 free!
How the program works:

Purchase Office 2007—Customer buys qualifying Office 2007 product (with or without a new PC) from an authorized reseller between March 5 – September 30, 2010.

Install and Activate Office 2007—Customer installs and activates Office 2007 by September 30, 2010.

Download Office 2010—Customer simply downloads Office 2010 for free when Office 2010 is available, or orders a DVD for a fee. Customer must request upgrade by October 31, 2010.

Below are some of the Office 2007 products your customer can purchase and activate between March 5 and September 30, 2010 to be eligible for the Office 2010 upgrade.

Office 2010 downloads will be accessible at general availability. Discs can be ordered for a fee. Eligible Office 2007 software must be purchased from Microsoft or an authorized reseller and activated between March 5, 2010 and September 30, 2010. Request your Office 2010 product by October 31, 2010 using your activated Office 2007 Product Key and dated sales receipt. One Office 2010 product per qualifying Office 2007 purchase, limit twenty-five per person.

Wednesday, 3 February 2010

Connect Coldfusion to SQL Server Express

Having recently installed SQL Server Express 2005 on a client server running CFMX 7 I have had to work through the torture of attempting to make the existing SQL Server database driver and then realising it will not work with anything higher than SQL 2000!

The instructions below are based on FusionCube but have been modified for my needs.

These instructions assume you have already install SQL Server Express and Management Studio Express.

Prepare the database server
  1. Open the SQL Server Management Studio
  2. Click on the Registered Servers button in the toolbar
  3. Right-click the SQL Express server.
  4. Select “SQL Server Configuration Manager”
  5. If needed, enable the TCP/IP protocol under SQL Server Configuration Manager > SQL Server 2005 Network Configurations > Protocols for SQLEXPRESS
  6. Double-click the TCP/IP protocol to view the properties.
  7. Click on the IP Addresses tab and make sure that the TCP Port is set to 1433 for every IP type.
  8. Close the configuration manager.
  9. Right-click the SQL Express server in SQL Management Studio, select Properties.
  10. Go to the Security item and make sure that you have Mixed Mode enabled. Save the settings.
  11. Restart he SQL Server instance.
  12. Once the server restarts, create a new login to be used by ColdFusion, give it a SQL Server Authentication password, and set the default database to the one you’re setting up.

Setup the ColdFusion datasource. At this point you have a choice of the Microsoft JDBC driver or the very popular open source JDBC 3.0 drive jTDS. I have included the instructions for the Microsoft driver first, the jTDS instructions are further down the page.
  1. Download the Microsoft SQL Server 2005 JDBC Driver
  2. Install the JDBC drive as described on the Microsoft page.
  3. Locate the sqljdbc.jar file in the JDBC driver install folder. Copy the .jar file to WEB-INF\cfusion\lib directory, or wherever your cfusion\lib directory is located.
  4. Restart ColdFusion Application Server otherwise it will not pick up the new driver.
  5. Log in to your ColdFusion Administrator.
  6. Create a new datasource, set a name and make the datasource type ‘other’.
  7. Fill in the fields with the following properties
    JDBC URL: jdbc:sqlserver://{server name}\sqlexpress:1433;DatabaseName={database name}
    Driver Class:
    Driver Name: SQL Server 2005 JDBC
  8. Enter the username and password you created in step 12 of the database instructions above.
  9. Save the new datasource and check it verifies.

The jTDS driver:
  1. Download the jTDS Driver
  2. Extract the contents of the ZIP.
  3. Locate the jtds-1.2.5.jar file in the JDBC driver install folder. Copy the .jar file to WEB-INF\cfusion\lib directory, or wherever your cfusion\lib directory is located.
  4. Restart ColdFusion Application Server otherwise it will not pick up the new driver.
  5. Log in to your ColdFusion Administrator.
  6. Create a new datasource, set a name and make the datasource type ‘other’.
  7. Fill in the fields with the following properties
    JDBC URL: jdbc:jtds:sqlserver://{server name}/{database name}:1433;useLOBs=false;instance={instance name};
    Driver Class: net.sourceforge.jtds.jdbc.Driver
    Driver Name: jtds-1.2.jar
  8. Enter the username and password you created in step 12 of the database instructions above.
  9. Save the new datasource and check it verifies.

The useLOBs parameter shown above can be used to improve performance and stop the driver converting text and ntext fields to CLOB, thanks to the original post here.