Algorithms I've Collected

This page is devoted to the various algorithms that I have collected over the years. Here, you will find a description of the algorithm, what it is used for, and links to code that I wrote and related off-site links. I like to keep things organized, so pick your favorite topic below:
Doubly-Linked List Interesting idea (backed with code) about how you can save memory by using XOR to store the difference between the previous and next nodes in the list.
Escaping Proper escaping of strings when converting from one language/system to another. So far, this has a function to take a PHP variable and write it as a safe JavaScript string.
Fuzzy String Matching How to determine the similarity of two different strings. I cover Levenshtein's and Oliver's methods along with soundex.
HTPasswd File Functions PERL functions to help manipulate a .htpasswd file.
Lockfile PERL functions that allow you to use a lockfile on systems that other methods may not work.
Textfile Database PERL functions that will allow you to store data in a text file. Only good if you have a very limited subset of data.

A road atlas is named after the Greek god Atlas. A group of gods known as the Titans waged war upon Zeus, the most powerful of the gods. The Titans were all defeated, and Zeus gave Atlas the job of forever holding the Earth on his shoulders. Tyler Akins <>
Legal Info