jQuery: Fastest method to find Descendents

April 20, 2010 by aaron
jQuery: Fastest method to find Descendents
In jQuery, there are 5 different selectors that can find an element’s descendants. One of these methods, will grab only first-level children but it is included with the other four to demonstrate the differences. By profiling these 5 selectors, we can get a basic idea of which selector is the fastest, but, as you will see from the graphs, the speed of the different browsers heavily influences the speed of the selector.
Read More

Escaping regular expressions in PHP

April 10, 2010 by aaron
Escaping regular expressions in PHP
Escaping dynamic regex strings automatically in PHP is a lot harder than you would think. You can’t just use a string like"\$myregex" because PHP will try to escape the $. You can’t even double slash it like \\$myregex because this doesn’t work in the regex engine. To get both the PHP and the regular expressions to work correctly together, you have to combine quadruple slashes with stripslashes. The Code $escapes = array('.
Read More

Do you want to get in touch?

Let us know what you want to create.

Contact Us