The Euclidian algorithm is being used in a Java function for finding the greatest common divisor. The simple function calls itself (recursion) until the greatest common divisor has been reached, at which point it is returned.
MD5 Encryption Using Java
Demonstrates how to encrypt a string using the MD5 algorithm in Java. Since MD5 is non-reversable, there is no code for decrypting the value.
Strip HTML using JavaScript
A simple function that uses regular expressions to strip the HTML tags out of strings.
Check Credit Card Checksum
The CardChecksum function returns 1 for valid cards and 0 for invalid cards, after performing a check using the Luhn algorithm which validates all major credit cards.
Add to favorites/bookmarks in Internet Explorer and Firefox
With only a few JavaScript lines you can initiate the dialog for “Add to Favorites” dialog in Internet Explorer and the “Add to Bookmarks” dialog in Firefox, as shown in this example.
Get the Number of Days in a Month Using Ruby
With a one-line function you can retrieve the number of days in a given month. Month must be passed as a number (1 to 12.)
Check / uncheck all checkboxes in a form
One easy JavaScript function that will check or uncheck all the checkboxes in a form that’s being passed as the first argument to the function.
Validate a String For a Certain Amount of Numbers
Using regular expressions in Ruby you can validate a string for a certain amount of numbers.
Validate phone number using RegEx and JavaScript
A function to validate phone numbers using JavaScript and regular expressions. It will work with all valid US phone numbers in all popular formats.