Tuesday, May 10, 2011

PHP in SimpleXML How to get a node with hyphen(-) ?



How to get a node with hyphen(-), PHP in SimpleXML ? 

$xml = simplexml_load_file( $fileName );
$post_list  = $xml->blog->{'post-list'};



Wednesday, September 1, 2010

Linux: To find a "text" in a "File"


Linux Command : To find a "text" in a "File"

find . -type f -iname "filename.txt" -exec grep -iaH "text" {} \;



Tuesday, May 4, 2010

To get hash '#' ID from URL using Javascript


To get hash '#' ID from URL


< script type="text/javascript" >
if( window.location.hash ) {
var str = window.location.hash;
var str_split = str.split("#");
var getid = str_split[1];
}

< /script >

Monday, January 18, 2010

jQuery 1.4 Released

jQuery 1.4 Released Download

Wednesday, January 13, 2010

jQuery UI Multiselect

Plugin: jQuery UI Multiselect

Features :

  • Search within available options, if there are a lots of them
  • Displaying counts of selected and available items
  • Select All / Deselect All Buttons
  • Dragging items from the available list to the selected list directly

Tuesday, August 25, 2009

How to get Browser Window Size?

How to get Browser Window Size?

function getBroWinSize() {

var objDocEle = document.documentElement;
var objDocBdy = document.body;
var myWidth = 0, myHeight = 0;

if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
}

else if(objDocEle &&(objDocEle.clientWidth || objDocEle.clientHeight)) { //IE 6+
myWidth = objDocEle.clientWidth;
myHeight = objDocEle.clientHeight;
}

else if(objDocBdy &&(objDocBdy.clientWidth || objDocBdy.clientHeight)){ //IE 4
myWidth = objDocBdy.clientWidth;
myHeight = objDocBdy.clientHeight;
}

window.alert( 'Width = ' + myWidth );
window.alert( 'Height = ' + myHeight );

}//
getBroWinSize

Tuesday, August 18, 2009

Javascript Libraries

Javascript Libraries

http://javascriptlibraries.com/

What is JavaScript library?

What is JavaScript library?

A JavaScript library is a library of pre-written JavaScript controls which allow for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. (eg:- JQuery, Mybic...)

Sunday, August 16, 2009

Suppress JavaScript error

Code to Suppress JavaScript error


<SCRIPT language="JavaScript">

<!--
function suppressJSError() {
return true;
}
window.onerror=suppressJSError;
//-->

</SCRIPT>

Monday, March 2, 2009

To Create Shortest URLs on Earth


To Create Shortest URLs on Earth


http://tinyarro.ws/



HTML Hyperlinks


HTML Hyperlinks

This document answers questions asked frequently by web authors. While its focus is on HTML-related questions, this FAQ also answers some questions related to CSS, HTTP, JavaScript, server configuration, etc.



Tuesday, January 6, 2009

jQuery Alert Dialogs


jQuery Alert Dialogs (Alert, Confirm, & Prompt Replacements)

jQuery Alert Dialogs

Backgrounds and Patterns for Designers


36 Must Have Backgrounds and Patterns Resources for all Designers
Backgrounds and Patterns for Designers


Thursday, December 18, 2008

To optimize your PHP code


15 top web design tips to optimize your PHP code

To optimize your PHP code

Wednesday, December 17, 2008

CSS Browser detection using jQuery


CSS Browser detection using jQuery instead of hacks

CSS Browser detection

Text-Style using CSS


Learn & Change text-style using CSS
CSS Type Set

Tuesday, July 29, 2008

Find syntax error without executing PHP file


Command to check PHP files for errors without executing

find /path/to/code -name *.php | xargs -n1 php -l




Wednesday, July 23, 2008

Thursday, July 10, 2008

Date Object in JavaScript

Date Object in JavaScript

Method Description
Date() Returns today's date and time
getDate() Returns the day of the month from a Date object (from 1-31)
getDay() Returns the day of the week from a Date object (from 0-6)
getMonth() Returns the month from a Date object (from 0-11)
getFullYear() Returns the year, as a four-digit number, from a Date object
getYear() Returns the year, as a two-digit or a three/four-digit number, depending on the browser. Use getFullYear() instead !!
getHours() Returns the hour of a Date object (from 0-23)
getMinutes() Returns the minutes of a Date object (from 0-59)
getSeconds() Returns the seconds of a Date object (from 0-59)
getMilliseconds() Returns the milliseconds of a Date object (from 0-999)
getTime() Returns the number of milliseconds since midnight Jan 1, 1970
getTimezoneOffset() Returns the difference in minutes between local time and Greenwich Mean Time (GMT)
getUTCDate() Returns the day of the month from a Date object according to universal time (from 1-31)
getUTCDay() Returns the day of the week from a Date object according to universal time (from 0-6)
getUTCMonth() Returns the month from a Date object according to universal time (from 0-11)
getUTCFullYear() Returns the four-digit year from a Date object according to universal time
getUTCHours() Returns the hour of a Date object according to universal time (from 0-23)
getUTCMinutes() Returns the minutes of a Date object according to universal time (from 0-59)
getUTCSeconds() Returns the seconds of a Date object according to universal time (from 0-59)
getUTCMilliseconds() Returns the milliseconds of a Date object according to universal time (from 0-999)
parse() Takes a date string and returns the number of milliseconds since midnight of January 1, 1970
setDate() Sets the day of the month in a Date object (from 1-31)
setMonth() Sets the month in a Date object (from 0-11)
setFullYear() Sets the year in a Date object (four digits)
setYear() Sets the year in the Date object (two or four digits). Use setFullYear() instead !!
setHours() Sets the hour in a Date object (from 0-23)
setMinutes() Set the minutes in a Date object (from 0-59)
setSeconds() Sets the seconds in a Date object (from 0-59)
setMilliseconds() Sets the milliseconds in a Date object (from 0-999)
setTime() Calculates a date and time by adding or subtracting a specified number of milliseconds to/from midnight January 1, 1970
setUTCDate() Sets the day of the month in a Date object according to universal time (from 1-31)
setUTCMonth() Sets the month in a Date object according to universal time (from 0-11)
setUTCFullYear() Sets the year in a Date object according to universal time (four digits)
setUTCHours() Sets the hour in a Date object according to universal time (from 0-23)
setUTCMinutes() Set the minutes in a Date object according to universal time (from 0-59)
setUTCSeconds() Set the seconds in a Date object according to universal time (from 0-59)
setUTCMilliseconds() Sets the milliseconds in a Date object according to universal time (from 0-999)
toSource() Represents the source code of an object
toString() Converts a Date object to a string
toGMTString() Converts a Date object, according to Greenwich time, to a string. Use toUTCString() instead !!
toUTCString() Converts a Date object, according to universal time, to a string
toLocaleString() Converts a Date object, according to local time, to a string
UTC() Takes a date and returns the number of milliseconds since midnight of January 1, 1970 according to universal time