Code Snippets Submitted by Tim Kelly

A Template for building OpenGL applications using GLUT.

Example code for a short BubbleSort algoritm for Integer Arrays

Optimize your website loading time by compressing files into smaller size.

You may add rounded corners to your CSS3-based elements, like a border or button. You can change the radius to increase or decrease the rounding of the corners. This is a styles definition rounding of each corner, it lets you individually round each of the 4 corners (still not supported in IE).

03 April, 2011   

Often when working on scripts alert boxes are placed inside loops as a debugging tool. You can sometimes end up with hundreds of alert boxes and no way to stop them. This script placed at the start of your code will give you an option to disable the alert boxes after a pre-determined number set by you.

29 January, 2011   

all: Used for all media type devices aural: Used for speech and sound synthesizers braille: Used for braille tactile feedback devices embossed: Used for paged braille printers handheld: Used for small or handheld devices print: Used for printers projection: Used for projected presentations, like slides screen: Used for computer screens tty: Used...

14 March, 2012   

To find the solutions to the 8 queens puzzle. The puzzle asks "How can you place 8 Queens on a chess board so that no Queen can attack any other queen?" By: Richard Lindsay

09 February, 2011   

Class to back up entire databases and email them out, or individual tables.

16 February, 2012   

ASP code example how to ban a user by IP address

16 February, 2012   

ASP code to ban user based on their IP address

Basic Database Connection, Random Query, Display Result

07 April, 2011   

Make the text color transparent but add a shadow:

C code snippet for merging sort algorithm to sort

Scripts used to calculate Daylight Saving Time (DST) for the US and EU. Valid for years 1900 to 2099. [DST wasn't adopted until the 1950s-1960s for US and 1990s for the EU] By: brad degrandis

26 April, 2015   

Recursively determines the size of a directory

19 April, 2016   

A simple method that generates a MD5 hash from a given string. It should be compatible with PHP's md5() function (just lowercase the string).

How to calculate distance between Mouse and Element

04 February, 2011   

Call Function with Random Timer

When placed in startup scripts, this snippet activates every time user opens a file. It then traverses the directory path backwards and looks for user created project folders. If one is found, script offers to switch it on. This is very useful when working with a number of projects at a time.

Sometimes it's desirable to change a style of the first and/or last elements in a container. You can do this by manually applying classes to your HTML elements: ("last-child" still not supported in IE8).