This C++ example shows you how to store a set of numbers into vectors and loop through the values in order to get the average of those numbers.
Play MP3 Files Using C#
This code uses the Windows Multimedia API winmm.dll library to play MP3 files. Put it into a class and call the Open() method with a parameter specifying the MP3 file that you wish to play.
Mask All Credit Card Digits But Last Four
Mask all the credit card number digits with asterisks except the last 4, for security purposes. The function works for all types of cards (Visa, MasterCard, Amex, Discovery, etc.)
Simulate Mouse Click On WebBrowser Control
Sample C# code for executing any type of mouse click on a WebBrowser control by calling a set of unmanaged functions from the user32.dll library.
Submit form on selection of dropdown item
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.