By Mihaela, on May 16th, 2011
In my last post at some point in the code I had to do a variable swap (to assign the value of the second variable to the first and vice-versa). To do this I used a third temporary variable to hold the content of the first variable so it’s value won’t be lost.
$temp . . . → Read More: Swapping two variables in PHP
By Mihaela, on May 10th, 2011
To generate all permutations of a given set means to find all possible ways the elements of the set can be arranged. For example, if the given set is {1, 2, 3} the permutations are:
1 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1
The . . . → Read More: PHP function to generate all permutations
By Sid, on January 7th, 2011
A simple method for removing accents from strings in PHP:
1 2 $x = strtr($x, "ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ", "SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy");
By Sid, on September 8th, 2010
By Mihaela, on September 7th, 2010
Polybius cipher is a basic form of encryption invented by the Ancient Greek Historian whose name it bears. It is based on fractionating plaintext characters so they can be represented by a smaller set of symbols. In plain English: all the letters of the alphabet are written in a 5×5 square like the one . . . → Read More: Polybius cipher
Recent Comments