原创 Node(23) JSON
JSON example profiles.js module.exports = { Peter : { name: 'Peter Parker', age: '18', gender: 'M', grade: '
原创 Node(21) DNS- lookup and resolve
resolve IP address: example from node.js API var dns = require('dns'); dns.resolve4('www.google.com', function (err,
原创 Node(23) Express
Express is the most popular Node framework. Use Express to handle get and post are extremely simple. Hello World var
原创 Javascript OOP object literal
Everything in Javascript is object. Arrays, functions objects, regular expression are all objects. They are all passe
原创 Javascript validating form input using RE
Usually checking validity of form input involve regular expression. javascript RE is object it begins with / and ends w
原创 Javascript Pattern Module pattern
The Module pattern encapsulates "privacy", state and organization using closures. It provides a way of wrapping a mix
原创 Graph
graph graph is an abstract data type that is meant to implement the graph and hypergraph concepts from mathematics. Ed
原创 java wildcards examples
Specifying upper bound with extends // drawAll() can draw a list of shapes as well as a list of subtype of //
原创 Sort
Selection sort: int i, j; for( i = 0;i < size - 1; i++ ) { int minValIndex = i; for( j
原创 Javascript Function
Functions are link to Function.prototype. Function.prototype is linked to Object.prototype. Since functions are object,
原创 Javascript Exception
The throw statement interrupts execution of the function. It should be given an exception object containing a name prop
原创 C linkedList
One Way Linked List /* * File: OneWayList.c * Author: xinghuazhang * * Created on March 22, 2012, 9:41 PM */
原创 Saxon PE usage
To be honest, saxon PE documentation is super confusing. All I know is just a simple usage from Saxon PE Basic usage:
原创 BinarySearch
Type: logarithmic algorithm Performance: O(log N) Worse case: logN + 1 Requirement - a is already sorted return index
原创 Tomcat MVC example - FindCat
This program is developed in Tomcat7 Eclipse EE program purpose: Find the cat by its name index.html - has a input box