The latest and greatest version of jQuery, version 1.4, was released on January 14, the birthday of jQuery’s original launch. Bugfixes and improvements abound! The jQuery team has put together a site devoted to the new version, called the 14 days of jQuery, covering the major version changes as well as infrastructure updates coinciding with [...]
Read MorePosts tagged "handy functions"
Change timezone to GMT in Debian
If you need to change the timezone of a Debian system, your searches will probably tell you to use the tzselect utility. That will only change the timezone for the server temporarily. Use that command and then run this: cat /etc/timezone See how the timezone didn’t change? Left alone, the system will revert to the [...]
Read More handy functions, serversCircumvent PHP errors with define_once()
Core PHP does not include a define_once() function to complement functions like require_once() and include_once(), which is pretty silly in my opinion. While I am generally not a fan of using *_once statements due to the performance penalty (and incurred laziness), define_once is the exception. There are ways to look for a loaded/missing file, but [...]
Read More coding theory, handy functions, phpFind the second (or third, or fourth) occurence in a string
PHP includes some handy functions to find the first or last occurrence of a given string token in a string: strpos and strrpos. However these functions are limited to just the first occurrence; what if I want to know the location of the second token’s position, or the third? These problems usually result in some [...]
Read More handy functions, php, programming