Javascript how to alert view array or object
April 14, 2014
Easiest way is using .toSource() alert(arrayObj.toSource());
GIT Bash
April 14, 2014
To view original repository: $ git remote show origin To push the repo to remote master $ git push origin master To branch a repo after clone Clone repo: $ git clone <repository_url> List all branches: $ git branch -a Create new branch locally: $ git branch new_branch_name Push new branch to remote origin repository […]
CSS align an element center within a div
April 14, 2014
Assume: There are few ways to achieve it: OR OR IE8 OR OR Css 3 (note that IE not support CSS3 fully) For more reference: http://stackoverflow.com/questions/114543/how-to-center-a-div-in-a-div-horizontally
jQuery get id of last div inside a div
April 8, 2014
The correct way to get the id of the last child div inside parent container using jQuery: Or
PHP check if a string is JSON
April 7, 2014
Simple method will be: This method doesn’t rely on heuristics, uses native php functionality, and is about as future-proof as you’re gonna get; it just tells you straight up whether there were any errors in decoding the string.
CSS mouver Hover border change
April 7, 2014
This should be the easiest thing to do. Tested it in Chrome, IE, and FF and it worked. Just add additional class to your css and you will get the “:hover” effect. Change the colors to suit your needs. Example: Make sure that “border: none;” isn’t specified anywhere else.
Ubuntu check PHP and mysql version
April 7, 2014
From command line: php -v mysql -V or php -i | grep -i ‘^libxml’
PHP html entity decode UTF-8 encoding
April 7, 2014
For a multilanguage site, using html_entity_decode without encoding type is risky to your website as in some cases, the translated language show weird characters. In version of php prior to 5.4.0, if encoding omitted, default encoding value is ISO-8859-1, and UTF-8 auto set only from PHP 5.4.0 Constant Name Description ENT_COMPAT Will convert double-quotes and […]
Recent Comments