原创 C++ static variable initialization
Because static member variables are not part of the individual objects, you must explicitly define the static member. I
原创 Dynamically add/remove class via Javascript
get class document.getElementById('id').classList document.getElementById('id').className add/remove document.getEleme
原创 Java Reading XML using DOM parser
Document, Element and Attr Interface ALL extend from Node Interface. The Document interface represents the entire HTML
原创 Javascript Array
Reference For...in For...in loop does not guarantee to keep the original order of the array, Use traditional for loop i
原创 Javascript Closure
Simple example of closure: function sayHello(name) { var text = 'Hello ' + name; // local variable var sayAlert =
原创 Javascript OOP augmenting with prototype
prototype reference Allows the addition of properties to all objects of type Object. we can extend the functionality o
原创 Tree structure
tree a tree is a widely used data structure that simulates a hierarchical tree structure with a set of linked nodes. Tr
原创 XSLT(19) document() Function to access external xml
node-set document(object,node-set?) object Required. Defines an URI to an external XML document node-set Optional. Used
原创 Javascript call and apply
Function.prototype.apply Calls a function with a given this value and arguments provided as an array. syntax: fun.apply
原创 Dynamically add/remove elements via JavaScript
Adding Elements example: appending an error span to form var errSpan = document.createElement( "span"); errSpan.style.d