This code retrieves a list of drives, stores it into an array of strings, and then loops through it to display the drives.
Check for prime numbers
The IsPrime() function uses the recursive method to check if a number is prime. It’s a fast function which can compute thousands of numbers within seconds.
Detect operating system from user agent string
This code uses an array of user strings and their matching operating systems so that it can detect what operatings system the user is using.
Calculate age using C#
An efficient C# method for calculating the age in years by passing in the birth date.
Get window width and height
Get the window width and height in JavaScript using a cross-browser function that works with all versions of Internet Explorer and Firefox.
Verify the version of Internet Explorer being used
Using JavaScript, this function verifies if the current version of Internet Explorer is the same one as the one passed through the function argument.
Taking Website Screenshots With The WebBrowser Control
Sample code on how to take screenshots of websites, resize them to thumbnails and save them as PNG file onto the harddrive.
Array of States and their Abbreviation
An array of states and their two letter abbreviation written in Ruby, useful for populating dropdown lists.
Get The Current Season
Get the current season based on the United States calendar of seasons and the clock of the PHP server.
Reverse a linked list
This code shows the logic behind reversing a linked list in C++ using pointers and looping through the current nodes, changing the order in which the elements are linked to eachother.