Subversion is a version control system, which allows you to keep old versions of files and directories (usually source code), keep a log of who, when, and why changes occurred, etc., like CVS, RCS or SCCS. Subversion keeps a single copy of the master sources. This copy is called the source “repository”; it contains all […]
How to recursively trim in PHP <?php // Usage: echo Our_Util_String::trim(‘test’); /** * Util string functions. * * @author Svetoslav Marinov <svetoslavm@gmail.com> * @copyright Svetoslav Marinov <svetoslavm@gmail.com> & others * @version 1.0 */ class Our_Util_String { /** * Recursive Trimmer :) * http://php.net/manual/en/function.trim.php * * @param mixed $arr * @param string $charlist * @return mixed […]
How to set focus on first visible input box <script type=”text/javascript”> jQuery(document).ready(function($) { $(“input:text:visible:first”).focus(); }) </script> If you have embed code the code below selects the text when the user clicks on the textarea. Also the text area is readonly so the user can’t accidentally delete or cut fewer characters. <script type=”text/javascript”> jQuery(document).ready(function($) { $(“.embed_code”).click(function() […]
This snippet shows how to login i.e. clear the session of the logged user.
an example how to make a redirect in Zend Framework