This simple method checks if a string ends with either of the values in an array of characters, and returns true if it does. Useful to add appropriate suffixes to words in standard form.
Check URL validity using JavaScript
The CheckValidUrl() function takes in an URL and checks whether or not it is valid by verifying it against a regular expression. Works for HTTP, HTTPS and FTP URLs.
Simple Interest Calculator Java Applet
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.