This example code addresses a popular need to have a form submitted on the selection of a value from a dropdown control.
Pass values and retrieve response from Command Prompt
This C# application starts a new Command Prompt process, passes a command to it and retrieves the response from the command prompt without every displaying the window.
Get And Set The System Date And Time
C# code snippet that uses unmanaged code to retrieve the current date and time of the Windows operating system, and also sets it to the specified values.
Calculate age from birth date
A PHP function to calculate the age of a person by passing in their birth date in standard format.
Retrieve a list of disk drives using C#
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.