A sample interest calculator, very basic in functionality, coded in Java and ready to be compiled and executed as a Java Applet.
Converting from binary to decimal and back
A simple method for converting binary numbers to decimal, and a wise method for converting decimal numbers to binary (using hexadecimal in between.)
Retrieve PageRank using PHP
This PHP code is designed to work on servers running the latest version of PHP as well, unlike most of the code samples on the web which will not work on many servers because of a checksum error.
Check If MySQL Table Exists
How to check if a table exists in the current MySQL database, through running a simple query.
Initiate Download Using ASP.NET and VB.NET
This function initiates a download of a file fetched from the server’s local system, all through ASP.NET and VB.NET.
Generate random password
This C# function returns a randomly generated password of the specified length. You can easily modify it to include only the characters you are interested in.
Check if HTTP connection to website is available
Sample code that uses a ConnectionAvailable() method to check whether the connection to an HTTP server went through or not. Can be used to check if a certain website is online as well as if Internet connection is available on the target machine.
Set Image Opacity Using C#
A C# function for changing the opacity on an image to the specified value. It uses the System.Drawing, System.Drawing.Imaging and System.Drawing.Drawing2D namespaces.
Using vectors to calculate the average
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.