<?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-476309480445609371</id><updated>2012-02-02T12:02:51.338-08:00</updated><title type='text'>Pensieve</title><subtitle type='html'>Blogging stuff for reference..</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>57</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-8476267990864471614</id><published>2012-02-02T10:51:00.000-08:00</published><updated>2012-02-02T11:03:24.229-08:00</updated><title type='text'>Vim Tips and Tricks</title><content type='html'>Recently I had to do performance test on a REST server via SoapUi. This is what I did, in SOAPUI(3.5.1) I created Test suite-&amp;gt;Test steps-&amp;gt;properties(added the txnId to be unique for subsequent calls)-&amp;gt;Groovy script to increment the txnId-&amp;gt;Test case which has the sample request-&amp;gt;LoadTestcase where I set the delay between requests and total # of requests for n number of threads. &lt;br /&gt;&lt;br /&gt;In the server, I added code on server's entry point to print the difference of start and end timestamp. So after the Load Test case is done, I had to extract those timestamps, send it to a script which would calculate the avg time for each request.&lt;br /&gt;&lt;br /&gt;The tricky part was how to extract the timestamp difference from the server log. Here's the vi commands to achieve it. In my logs, I had the timestamp in milliseconds like "PERFORMANCE:: 120". So I copy the server log to temp log. Open it via vim editor.  In command prompt,&lt;br /&gt;&lt;br /&gt;cp server.log temp.log   - do not modify the original server log&lt;br /&gt;grep "PERFORMANCE::"  temp.log   -  verify you the test ran successfully&lt;br /&gt;grep -c "PERFORMANCE::"  temp.log - count the total number of occurrences&lt;br /&gt;vi temp.log   - open the temp log in vi editor&lt;br /&gt;:v/PERFORMANCE:: /d   -  in esc mode, delete all lines except our performance test line&lt;br /&gt;:%s/^.*PERFORMANCE::\([^"]*\).*$/\1   - in the leftover lines, delete the words and leave the numbers alone&lt;br /&gt;wc -l  temp.log - verify the count is still the same, note it down as total#Requests&lt;br /&gt;vi testscript.sh  - open file to write script to add the numbers left in temp.log&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The file content should be:&lt;br /&gt;&lt;br /&gt;sum="0"&lt;br /&gt;for i in `cat $1`;&lt;br /&gt;do&lt;br /&gt;  sum=$[$sum + $i];&lt;br /&gt;done&lt;br /&gt;echo "sum = "$sum&lt;br /&gt;&lt;br /&gt;chmod +x testscript.sh - to enable execution of the script&lt;br /&gt;./testscript.sh temp.log - to print the sum&lt;br /&gt;then in calculator sum/total#request = avg time taken by the server for each request.&lt;br /&gt;&lt;br /&gt;ToNote:&lt;br /&gt;:g/.*/d   -  to delete all the lines in a file in Vi.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-8476267990864471614?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/8476267990864471614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=8476267990864471614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8476267990864471614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8476267990864471614'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2012/02/vim-tips-and-tricks.html' title='Vim Tips and Tricks'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-2653878181921871499</id><published>2011-10-25T11:12:00.001-07:00</published><updated>2011-10-25T11:15:42.142-07:00</updated><title type='text'>Default $PATH value for Mac OS X</title><content type='html'>When I messed up the PATH variable in my Mac, I found a life saver &lt;a href="http://munkymorgy.blogspot.com/2008/09/mac-os-x-default-path.html"&gt;here&lt;/a&gt;. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm reposting here the default value of $PATH env variable, in case you screwed up your $PATH. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Just execute, export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But ideally, remember to do this before you change your PATH variable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. In CL, echo $PATH&lt;/div&gt;&lt;div&gt;2. copy the result in file that is already open&lt;/div&gt;&lt;div&gt;3. change your $PATH. &lt;/div&gt;&lt;div&gt;4. If something is wrong, in CL execute "export PATH=savedvalue"&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/476309480445609371-2653878181921871499?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/2653878181921871499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=2653878181921871499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/2653878181921871499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/2653878181921871499'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2011/10/default-path-value-for-mac.html' title='Default $PATH value for Mac OS X'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-1577928087512143572</id><published>2011-09-13T11:03:00.000-07:00</published><updated>2011-09-13T11:05:46.748-07:00</updated><title type='text'>Subclipse in Eclipse [MAC]</title><content type='html'>To install subclipse in Eclipse ide:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Help-&amp;gt;Install new software-&amp;gt;Add-&amp;gt;&lt;span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17px; white-space: nowrap; "&gt;&lt;a href="http://subclipse.tigris.org/update_1.6.x" class="external-link" rel="nofollow" style="color: rgb(0, 109, 175); text-decoration: none; outline-style: none; outline-width: initial; outline-color: initial; "&gt;http://subclipse.tigris.org/update_1.6.x&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are behind firewall you would get error like this&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Unable to connect to repository http://subclipse.tigris.org/update_1.6.x/content.xml Unable to connect to repository http://subclipse.tigris.org/update_1.6.x/content.xml Connection refused&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then do the following, &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; "&gt;&lt;ol style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; list-style-type: decimal; list-style-position: initial; list-style-image: initial; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; word-wrap: break-word; background-position: initial initial; background-repeat: initial initial; "&gt;In Eclipse (go to Preferences &amp;gt; General &amp;gt; Network connections).&lt;/li&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; word-wrap: break-word; background-position: initial initial; background-repeat: initial initial; "&gt;Select "Active Provider" as "Manual".&lt;/li&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; word-wrap: break-word; background-position: initial initial; background-repeat: initial initial; "&gt;Select HTTP and click edit.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; word-wrap: break-word; background-position: initial initial; background-repeat: initial initial; "&gt;Enter the host and port [proxy host and port get it from office admin]&lt;/li&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; word-wrap: break-word; background-position: initial initial; background-repeat: initial initial; "&gt;Select "Reuries Authentication" and enter the username and password.&lt;/li&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; word-wrap: break-word; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; word-wrap: break-word; background-position: initial initial; background-repeat: initial initial; "&gt;Repeat Step 1 to 5 for Https.&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; word-wrap: break-word; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; word-wrap: break-word; background-position: initial initial; background-repeat: initial initial; "&gt;Src: http://stackoverflow.com/questions/4598167/eclipse-updates-not-working&lt;/p&gt;&lt;/li&gt;&lt;/ol&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/476309480445609371-1577928087512143572?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/1577928087512143572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=1577928087512143572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1577928087512143572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1577928087512143572'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2011/09/subclipse-in-eclipse-mac.html' title='Subclipse in Eclipse [MAC]'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-3628546914213931104</id><published>2011-08-11T16:23:00.001-07:00</published><updated>2011-08-11T16:30:42.906-07:00</updated><title type='text'>Try Catch Finally</title><content type='html'>In case of sudden doubts, here are few pointers from specifications:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;        &lt;p class="p1"&gt;A &lt;span class="s1"&gt;try&lt;/span&gt; statement with a &lt;span class="s1"&gt;finally&lt;/span&gt; block is executed by first executing the &lt;span class="s1"&gt;try&lt;/span&gt; block. Then there is a choice:&lt;/p&gt; &lt;p class="p2"&gt;&lt;br /&gt;&lt;/p&gt; &lt;ul class="ul1"&gt; &lt;li class="li1"&gt;If execution of the &lt;span class="s1"&gt;try&lt;/span&gt; block completes normally, then the &lt;span class="s1"&gt;finally&lt;/span&gt; block is executed, and then there is a choice:&lt;/li&gt; &lt;ul class="ul2"&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;finally&lt;/span&gt; block completes normally, then the &lt;span class="s1"&gt;try&lt;/span&gt; statement completes normally.&lt;/li&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;finally&lt;/span&gt; block completes abruptly for reason &lt;i&gt;S&lt;/i&gt;, then the &lt;span class="s1"&gt;try&lt;/span&gt; statement completes abruptly for reason &lt;i&gt;S&lt;/i&gt;.&lt;/li&gt; &lt;/ul&gt; &lt;li class="li1"&gt;If execution of the &lt;span class="s1"&gt;try&lt;/span&gt; block completes abruptly because of a &lt;span class="s1"&gt;throw&lt;/span&gt; of a value &lt;i&gt;V&lt;/i&gt;, then there is a choice:&lt;/li&gt; &lt;ul class="ul2"&gt; &lt;li class="li1"&gt;If the run-time type of &lt;i&gt;V&lt;/i&gt; is assignable to the parameter of any &lt;span class="s1"&gt;catch&lt;/span&gt; clause of the &lt;span class="s1"&gt;try&lt;/span&gt; statement, then the first (leftmost) such &lt;span class="s1"&gt;catch&lt;/span&gt; clause is selected. The value &lt;i&gt;V&lt;/i&gt; is assigned to the parameter of the selected &lt;span class="s1"&gt;catch&lt;/span&gt; clause, and the &lt;i&gt;Block&lt;/i&gt; of that &lt;span class="s1"&gt;catch&lt;/span&gt; clause is executed. Then there is a choice:&lt;/li&gt; &lt;ul class="ul3"&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;catch&lt;/span&gt; block completes normally, then the &lt;span class="s1"&gt;finally&lt;/span&gt; block is executed. Then there is a choice:&lt;/li&gt; &lt;ul class="ul3"&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;finally&lt;/span&gt; block completes normally, then the &lt;span class="s1"&gt;try&lt;/span&gt; statement completes normally.&lt;/li&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;finally&lt;/span&gt; block completes abruptly for any reason, then the &lt;span class="s1"&gt;try&lt;/span&gt; statement completes abruptly for the same reason.&lt;/li&gt; &lt;/ul&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;catch&lt;/span&gt; block completes abruptly for reason &lt;i&gt;R&lt;/i&gt;, then the &lt;span class="s1"&gt;finally&lt;/span&gt; block is executed. Then there is a choice:&lt;/li&gt; &lt;ul class="ul3"&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;finally&lt;/span&gt; block completes normally, then the &lt;span class="s1"&gt;try&lt;/span&gt; statement completes abruptly for reason &lt;i&gt;R&lt;/i&gt;.&lt;/li&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;finally&lt;/span&gt; block completes abruptly for reason &lt;i&gt;S&lt;/i&gt;, then the &lt;span class="s1"&gt;try&lt;/span&gt; statement completes abruptly for reason &lt;i&gt;S&lt;/i&gt; (and reason &lt;i&gt;R&lt;/i&gt; is discarded).&lt;/li&gt; &lt;/ul&gt; &lt;/ul&gt; &lt;li class="li1"&gt;If the run-time type of &lt;i&gt;V&lt;/i&gt; is not assignable to the parameter of any &lt;span class="s1"&gt;catch&lt;/span&gt; clause of the &lt;span class="s1"&gt;try&lt;/span&gt; statement, then the &lt;span class="s1"&gt;finally&lt;/span&gt; block is executed. Then there is a choice:&lt;/li&gt; &lt;ul class="ul3"&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;finally&lt;/span&gt; block completes normally, then the &lt;span class="s1"&gt;try&lt;/span&gt; statement completes abruptly because of a &lt;span class="s1"&gt;throw&lt;/span&gt; of the value &lt;i&gt;V&lt;/i&gt;.&lt;/li&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;finally&lt;/span&gt; block completes abruptly for reason &lt;i&gt;S&lt;/i&gt;, then the &lt;span class="s1"&gt;try&lt;/span&gt; statement completes abruptly for reason &lt;i&gt;S&lt;/i&gt; (and the &lt;span class="s1"&gt;throw&lt;/span&gt; of value &lt;i&gt;V&lt;/i&gt; is discarded and forgotten).&lt;/li&gt; &lt;/ul&gt; &lt;/ul&gt; &lt;li class="li1"&gt;If execution of the &lt;span class="s1"&gt;try&lt;/span&gt; block completes abruptly for any other reason &lt;i&gt;R&lt;/i&gt;, then the &lt;span class="s1"&gt;finally&lt;/span&gt; block is executed. Then there is a choice:&lt;/li&gt; &lt;ul class="ul2"&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;finally&lt;/span&gt; block completes normally, then the &lt;span class="s1"&gt;try&lt;/span&gt; statement completes abruptly for reason &lt;i&gt;R&lt;/i&gt;.&lt;/li&gt; &lt;li class="li1"&gt;If the &lt;span class="s1"&gt;finally&lt;/span&gt; block completes abruptly for reason &lt;i&gt;S&lt;/i&gt;, then the &lt;span class="s1"&gt;try&lt;/span&gt; statement completes abruptly for reason &lt;i&gt;S&lt;/i&gt; (and reason &lt;i&gt;R&lt;/i&gt; is discarded).&lt;/li&gt;&lt;/ul&gt; &lt;/ul&gt;&lt;div&gt;Src: &lt;a href="http://java.sun.com/docs/books/jls/third_edition/html/statements.html#14.20.2"&gt;http://java.sun.com/docs/books/jls/third_edition/html/statements.html#14.20.2&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; background-color: rgb(238, 238, 238); "&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; word-wrap: break-word; background-position: initial initial; background-repeat: initial initial; "&gt;If execution of the try block completes abruptly because of a throw of a value V, then there is a choice:&lt;/p&gt;&lt;ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; list-style-type: disc; list-style-position: initial; list-style-image: initial; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; word-wrap: break-word; background-position: initial initial; background-repeat: initial initial; "&gt;If the run-time type of V is assignable to the Parameter of any catch clause of the try statement, then the first (leftmost) such catch clause is selected. The value V is assigned to the parameter of the selected catch clause, and the Block of that catch clause is executed. If that block completes normally, then the try statement completes normally; &lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-weight: bold; background-position: initial initial; background-repeat: initial initial; "&gt;if that block completes abruptly for any reason, then the try statement completes abruptly for the same reason.&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; background-color: rgb(255, 255, 255); "&gt;Src: &lt;a href="http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#24134" rel="nofollow" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 119, 204); text-decoration: underline; cursor: pointer; background-position: initial initial; background-repeat: initial initial; "&gt;http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#24134&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px; background-color: rgb(238, 238, 238); "&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&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/476309480445609371-3628546914213931104?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/3628546914213931104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=3628546914213931104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/3628546914213931104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/3628546914213931104'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2011/08/try-catch-finally.html' title='Try Catch Finally'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-3657100448568312933</id><published>2011-07-28T17:32:00.000-07:00</published><updated>2011-08-26T11:58:30.474-07:00</updated><title type='text'>SVN : tips and tricks</title><content type='html'>1. Checkout only a single file from repository without having to download the entire directory.&lt;br /&gt;&lt;br /&gt;   Sometimes we want to work on only a single file out of 1000's of files in a repository folder. You don't have to download them all. You can do this&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;svn co &lt;url-of-dir&gt; &lt;target-folder&gt; --depth empty &lt;folder url=""&gt;&lt;/folder&gt;&lt;/target-folder&gt;&lt;/url-of-dir&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;cd &lt;target-folder&gt;&lt;/target-folder&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;svn up &lt;filename&gt;&lt;filename-only&gt;&lt;/filename-only&gt;&lt;/filename&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;Thanks to source &lt;a href="http://stackoverflow.com/questions/122107/checkout-one-file-from-subversion"&gt;here&lt;/a&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/476309480445609371-3657100448568312933?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/3657100448568312933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=3657100448568312933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/3657100448568312933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/3657100448568312933'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2011/07/svn-tips-and-tricks.html' title='SVN : tips and tricks'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-7937651328853704908</id><published>2011-04-21T13:47:00.000-07:00</published><updated>2011-04-21T13:58:44.588-07:00</updated><title type='text'>Mac: TcpMon</title><content type='html'>What: TcpMon is a monitor tool that comes with Apache Axis package and can be downloaded.&lt;br /&gt;&lt;br /&gt;Why: If you have a WS client or service that you want to monitor, use TcpMon. Lets say you have written a client for axis2 service as stated &lt;a href="http://sujeetha.blogspot.com/2011/04/axis2-maven-web-service-client-example.html"&gt;here&lt;/a&gt;. You also may need to look at the SOAP messages that are sent in the wire.&lt;br /&gt;&lt;br /&gt;How:&lt;br /&gt;&lt;br /&gt;1. Download TcpMon binary distribution &lt;a href="http://ws.apache.org/axis/releases.html"&gt;here&lt;/a&gt;&lt;br /&gt;2. Execute tcpmon-1.0-bin/build/tcpmon.sh . This will launch the tcpMon console.&lt;br /&gt;3. In 'Admin' tab, enter 'Listen Port#:'  Any_port_Number. Set 'Act as: Proxy'. And click Add. New tab as 'Port Any_port_Number' will come up where you can see all traffic.&lt;br /&gt;4.  Now you need to set proxy for the web based traffic. In Mac, to System Preferences-&amp;gt;Network-&amp;gt;Advanced-&amp;gt;Proxies-&amp;gt;Web proxy. Set 127.0.0.1 and Any_port_Number. Note: you may need to revert back to original settings when you are done with debugging.&lt;br /&gt;5. Run the client in the eclipse. Go to the new tab in tcpmon and you can see the incoming and outgoing SOAP messages for debugging.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks to the &lt;a href="http://lists.apple.com/archives/sherlock-channel-dev/2003/Feb/msg00001.html"&gt;source&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-7937651328853704908?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/7937651328853704908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=7937651328853704908' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7937651328853704908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7937651328853704908'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2011/04/mac-tcpmon.html' title='Mac: TcpMon'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-6777128724373183054</id><published>2011-04-14T18:12:00.000-07:00</published><updated>2011-04-14T19:09:41.724-07:00</updated><title type='text'>Axis2 Maven Web service client Example</title><content type='html'>Aim: To learn how to generate java client stubs from WSDL using wsdl2java script of axis2. Use the client stubs to consume a web service using SOAP over HTTP.&lt;br /&gt;&lt;br /&gt;Requirements:&lt;br /&gt;1. you need WSDL of the service you wish to consume using your generated client.&lt;br /&gt;2. If you are going to test both service generation and consumption in local system, download axis2 binary distribution.&lt;br /&gt;3. SoapUI if you need to test the remote Server and its operations with sample requests.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt;&lt;br /&gt;I followed this &lt;a href="http://people.apache.org/%7Eruchithf/hw-axis2/"&gt;source&lt;/a&gt; to set up the axis2's http server and also download SimpleService.aar file to deploy.  Here is the simple steps to follow:&lt;br /&gt;&lt;br /&gt;1. Download and extract axis2 binary distribution to /usr/local, at the time of writing[Apr 14,2011] we have axis2-1.5.4. Set /usr/local/axis2-1.5.4  as AXIS_HOME. You can find the scripts in AXIS_HOME/bin folder. You need to copy .aar file of your service into repository/services folder.&lt;br /&gt;&lt;br /&gt;2. Start the axis2 server by executing AXIS_HOME/bin/axis2server.sh. In a browser if you access, http://localhost:8080 it would list all services deployed on the axis2server. You can get the WSDL of the service from its links.&lt;br /&gt;&lt;br /&gt;SimpleService.wsdl:&lt;br /&gt;==============&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://ws.apache.org/axis2" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://ws.apache.org/axis2"&amp;gt;&lt;br /&gt;    &amp;lt;wsdl:types&amp;gt;&lt;br /&gt;        &amp;lt;xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ws.apache.org/axis2"&amp;gt;&lt;br /&gt;            &amp;lt;xs:element name="echo"&amp;gt;&lt;br /&gt;                &amp;lt;xs:complexType&amp;gt;&lt;br /&gt;                    &amp;lt;xs:sequence&amp;gt;&lt;br /&gt;                        &amp;lt;xs:element minOccurs="0" name="args0" nillable="true" type="xs:string"/&amp;gt;&lt;br /&gt;                    &amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;                &amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;            &amp;lt;/xs:element&amp;gt;&lt;br /&gt;            &amp;lt;xs:element name="echoResponse"&amp;gt;&lt;br /&gt;                &amp;lt;xs:complexType&amp;gt;&lt;br /&gt;                    &amp;lt;xs:sequence&amp;gt;&lt;br /&gt;                        &amp;lt;xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/&amp;gt;&lt;br /&gt;                    &amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;                &amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;            &amp;lt;/xs:element&amp;gt;&lt;br /&gt;        &amp;lt;/xs:schema&amp;gt;&lt;br /&gt;    &amp;lt;/wsdl:types&amp;gt;&lt;br /&gt;    &amp;lt;wsdl:message name="echoRequest"&amp;gt;&lt;br /&gt;        &amp;lt;wsdl:part name="parameters" element="ns:echo"/&amp;gt;&lt;br /&gt;    &amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;    &amp;lt;wsdl:message name="echoResponse"&amp;gt;&lt;br /&gt;        &amp;lt;wsdl:part name="parameters" element="ns:echoResponse"/&amp;gt;&lt;br /&gt;    &amp;lt;/wsdl:message&amp;gt;&lt;br /&gt;    &amp;lt;wsdl:portType name="SimpleServicePortType"&amp;gt;&lt;br /&gt;        &amp;lt;wsdl:operation name="echo"&amp;gt;&lt;br /&gt;            &amp;lt;wsdl:input message="ns:echoRequest" wsaw:Action="urn:echo"/&amp;gt;&lt;br /&gt;            &amp;lt;wsdl:output message="ns:echoResponse" wsaw:Action="urn:echoResponse"/&amp;gt;&lt;br /&gt;        &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;    &amp;lt;/wsdl:portType&amp;gt;&lt;br /&gt;    &amp;lt;wsdl:binding name="SimpleServiceSoap11Binding" type="ns:SimpleServicePortType"&amp;gt;&lt;br /&gt;        &amp;lt;soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/&amp;gt;&lt;br /&gt;        &amp;lt;wsdl:operation name="echo"&amp;gt;&lt;br /&gt;            &amp;lt;soap:operation soapAction="urn:echo" style="document"/&amp;gt;&lt;br /&gt;            &amp;lt;wsdl:input&amp;gt;&lt;br /&gt;                &amp;lt;soap:body use="literal"/&amp;gt;&lt;br /&gt;            &amp;lt;/wsdl:input&amp;gt;&lt;br /&gt;            &amp;lt;wsdl:output&amp;gt;&lt;br /&gt;                &amp;lt;soap:body use="literal"/&amp;gt;&lt;br /&gt;            &amp;lt;/wsdl:output&amp;gt;&lt;br /&gt;        &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;    &amp;lt;/wsdl:binding&amp;gt;&lt;br /&gt;    &amp;lt;wsdl:binding name="SimpleServiceSoap12Binding" type="ns:SimpleServicePortType"&amp;gt;&lt;br /&gt;        &amp;lt;soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/&amp;gt;&lt;br /&gt;        &amp;lt;wsdl:operation name="echo"&amp;gt;&lt;br /&gt;            &amp;lt;soap12:operation soapAction="urn:echo" style="document"/&amp;gt;&lt;br /&gt;            &amp;lt;wsdl:input&amp;gt;&lt;br /&gt;                &amp;lt;soap12:body use="literal"/&amp;gt;&lt;br /&gt;            &amp;lt;/wsdl:input&amp;gt;&lt;br /&gt;            &amp;lt;wsdl:output&amp;gt;&lt;br /&gt;                &amp;lt;soap12:body use="literal"/&amp;gt;&lt;br /&gt;            &amp;lt;/wsdl:output&amp;gt;&lt;br /&gt;        &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;    &amp;lt;/wsdl:binding&amp;gt;&lt;br /&gt;    &amp;lt;wsdl:binding name="SimpleServiceHttpBinding" type="ns:SimpleServicePortType"&amp;gt;&lt;br /&gt;        &amp;lt;http:binding verb="POST"/&amp;gt;&lt;br /&gt;        &amp;lt;wsdl:operation name="echo"&amp;gt;&lt;br /&gt;            &amp;lt;http:operation location="SimpleService/echo"/&amp;gt;&lt;br /&gt;            &amp;lt;wsdl:input&amp;gt;&lt;br /&gt;                &amp;lt;mime:content type="text/xml" part="echo"/&amp;gt;&lt;br /&gt;            &amp;lt;/wsdl:input&amp;gt;&lt;br /&gt;            &amp;lt;wsdl:output&amp;gt;&lt;br /&gt;                &amp;lt;mime:content type="text/xml" part="echo"/&amp;gt;&lt;br /&gt;            &amp;lt;/wsdl:output&amp;gt;&lt;br /&gt;        &amp;lt;/wsdl:operation&amp;gt;&lt;br /&gt;    &amp;lt;/wsdl:binding&amp;gt;&lt;br /&gt;    &amp;lt;wsdl:service name="SimpleService"&amp;gt;&lt;br /&gt;        &amp;lt;wsdl:port name="SimpleServiceHttpSoap11Endpoint" binding="ns:SimpleServiceSoap11Binding"&amp;gt;&lt;br /&gt;            &amp;lt;soap:address location="http://localhost:8080/axis2/services/SimpleService.SimpleServiceHttpSoap11Endpoint/"/&amp;gt;&lt;br /&gt;        &amp;lt;/wsdl:port&amp;gt;&lt;br /&gt;        &amp;lt;wsdl:port name="SimpleServiceHttpSoap12Endpoint" binding="ns:SimpleServiceSoap12Binding"&amp;gt;&lt;br /&gt;            &amp;lt;soap12:address location="http://localhost:8080/axis2/services/SimpleService.SimpleServiceHttpSoap12Endpoint/"/&amp;gt;&lt;br /&gt;        &amp;lt;/wsdl:port&amp;gt;&lt;br /&gt;        &amp;lt;wsdl:port name="SimpleServiceHttpEndpoint" binding="ns:SimpleServiceHttpBinding"&amp;gt;&lt;br /&gt;            &amp;lt;http:address location="http://localhost:8080/axis2/services/SimpleService.SimpleServiceHttpEndpoint/"/&amp;gt;&lt;br /&gt;        &amp;lt;/wsdl:port&amp;gt;&lt;br /&gt;    &amp;lt;/wsdl:service&amp;gt;&lt;br /&gt;&amp;lt;/wsdl:definitions&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Things you need to know about any WSDL is&lt;br /&gt;a.  What are the possible 'operation' from the service. Their input and output element type and their arguments.&lt;br /&gt;b.  What is the address Location of the service.&lt;br /&gt;&lt;br /&gt;3. I use Maven2Eclipse plugin to generate and execute my project. Create a maven project. Update its pom.xml with the following:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&amp;lt;project&amp;gt;&lt;br /&gt; ...&lt;br /&gt; &amp;lt;build&amp;gt;&lt;br /&gt;  &amp;lt;plugins&amp;gt;&lt;br /&gt;   &amp;lt;plugin&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;org.apache.axis2&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;axis2-wsdl2code-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;1.4&amp;lt;/version&amp;gt;&lt;br /&gt;    &amp;lt;executions&amp;gt;&lt;br /&gt;     &amp;lt;execution&amp;gt;&lt;br /&gt;      &amp;lt;goals&amp;gt;&lt;br /&gt;       &amp;lt;goal&amp;gt;wsdl2code&amp;lt;/goal&amp;gt;&lt;br /&gt;      &amp;lt;/goals&amp;gt;&lt;br /&gt;     &amp;lt;/execution&amp;gt;&lt;br /&gt;    &amp;lt;/executions&amp;gt;&lt;br /&gt;    &amp;lt;configuration&amp;gt;&lt;br /&gt;     &amp;lt;packageName&amp;gt;axis.test&amp;lt;/packageName&amp;gt;&lt;br /&gt;     &amp;lt;wsdlFile&amp;gt;src/main/wsdl/SimpleService.wsdl&amp;lt;/wsdlFile&amp;gt;&lt;br /&gt;    &amp;lt;/configuration&amp;gt;&lt;br /&gt;   &amp;lt;/plugin&amp;gt;&lt;br /&gt;  &amp;lt;/plugins&amp;gt;&lt;br /&gt; &amp;lt;/build&amp;gt;&lt;br /&gt; &amp;lt;dependencies&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.apache.axis2&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;axis2-transport-local&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;1.5.4&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.apache.axis2&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;axis2-transport-http&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;1.5.4&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;wsdl4j&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;wsdl4j&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;1.6.2&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.apache.ws.commons.schema&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;XmlSchema&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;1.3.2&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.apache.neethi&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;neethi&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;2.0.2&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.apache.axis2&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;axis2&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;1.5.1&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.apache.ws.commons.axiom&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;axiom-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;1.2.11&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;  &amp;lt;dependency&amp;gt;&lt;br /&gt;   &amp;lt;groupId&amp;gt;org.apache.ws.commons.axiom&amp;lt;/groupId&amp;gt;&lt;br /&gt;   &amp;lt;artifactId&amp;gt;axiom-impl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;   &amp;lt;version&amp;gt;1.2.11&amp;lt;/version&amp;gt;&lt;br /&gt;  &amp;lt;/dependency&amp;gt;&lt;br /&gt;           ...&lt;br /&gt; &amp;lt;/dependencies&amp;gt;&lt;br /&gt;   ...&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These are the dependencies you will need to execute your Client stub generated by wsdl2java. The plugin is used to generate the stubs.  When you run Maven Install on the project it should generate SimpleServiceCallbackHandler.java and SimpleServiceStub.java in target/generated-sources/../axis/test folder. Move it to your project's src folder under needed package name.&lt;br /&gt;&lt;br /&gt;4. Here is a sample Client.java that you need to write to consume the SimpleService using the stubs we just generated.&lt;br /&gt;&lt;br /&gt;Client.java:&lt;br /&gt;========&lt;br /&gt;&lt;span style="font-style: italic;"&gt;package axis.test;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;import java.rmi.RemoteException;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;public class Client {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    /**&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     * @param args&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     * @throws RemoteException &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    public static void main(String[] args) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        try {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        SimpleServiceStub stub = new SimpleServiceStub();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     &lt;/span&gt;&lt;span style="font-style: italic;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        SimpleServiceStub.Echo request = new SimpleServiceStub.Echo();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     &lt;/span&gt;&lt;span style="font-style: italic;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        request.setArgs0("This is my message");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    &lt;/span&gt;&lt;span style="font-style: italic;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        SimpleServiceStub.EchoResponse response = stub.echo(request);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;  &lt;/span&gt;&lt;span style="font-style: italic;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        System.out.println("Response from Simple service: "+response.get_return());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        catch(RemoteException ex) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;            System.out.println(ex);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;            ex.printStackTrace();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is a very simple client code to start with. You need to create an instance of stub class which would be ServiceName+Stub.java. You need to create a request object. It will be a inner class of stub. You can check wsdl for operation name(that would request name). Set the arguments for the operation request and verify you are complying the format specified in WSDL. In this case its a string to echo back. Similarly create instance of response to hold the response of the operation. You actually consume the service when you call the operation via stub object. get_return() method always returns the value of response object.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. Run Client as Java application and make sure service is up by checking via browser. You will get response in console. Viola.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Possible errors/exceptions:&lt;br /&gt;&lt;br /&gt;1. When the service is down, the SOAP Fault would say Connection refused.&lt;br /&gt;2. There are 3 data binding frameworks possible. Default is adb(Axis data binding framework). You can specify it in &lt;databindingname&gt; in maven plugin for wsdl2code.&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;[1]. &lt;a href="http://people.apache.org/%7Eruchithf/hw-axis2/"&gt;Hello world with Apache Axis2&lt;/a&gt;&lt;br /&gt;&lt;/databindingname&gt;&lt;/wsdl:port&gt;&lt;/wsdl:service&gt;&lt;/http:operation&gt;&lt;/wsdl:operation&gt;&lt;/http:binding&gt;&lt;/wsdl:binding&gt;&lt;/soap12:operation&gt;&lt;/wsdl:operation&gt;&lt;/soap12:binding&gt;&lt;/wsdl:binding&gt;&lt;/soap:operation&gt;&lt;/wsdl:operation&gt;&lt;/soap:binding&gt;&lt;/wsdl:binding&gt;&lt;/wsdl:operation&gt;&lt;/wsdl:porttype&gt;&lt;/wsdl:message&gt;&lt;/wsdl:message&gt;&lt;/xs:schema&gt;&lt;/wsdl:types&gt;&lt;/wsdl:definitions&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-6777128724373183054?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/6777128724373183054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=6777128724373183054' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/6777128724373183054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/6777128724373183054'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2011/04/axis2-maven-web-service-client-example.html' title='Axis2 Maven Web service client Example'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-4552529704052172547</id><published>2011-02-12T10:41:00.000-08:00</published><updated>2011-04-14T11:33:22.414-07:00</updated><title type='text'>Ubuntu: Install Tomcat</title><content type='html'>&lt;ol&gt;&lt;li&gt;Download the latest version of apache-tomcat from &lt;a href="http://tomcat.apache.org/download-60.cgi"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;"cd /downloaded/directory" --&amp;gt; In terminal, go to the downloaded directory.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;"sudo cp apache* /usr/local" --&amp;gt; Copy the downloaded file to /usr/local (can be changed, I prefer local dir).&lt;/li&gt;&lt;li&gt;"sudo chmod a+rwx apache*" --&amp;gt; change the access permissions.&lt;/li&gt;&lt;li&gt;"sudo tar zxvf apache*" --&amp;gt; unzip the tar.gz file. &lt;/li&gt;&lt;li&gt;"export JAVA_HOME=/usr/local/java/jdk1.6.0_17" --&amp;gt; set up JAVA_HOME env variable&lt;/li&gt;&lt;li&gt;"export PATH=$JAVA_HOME/bin:$PATH" --&amp;gt; add java bin to path&lt;/li&gt;&lt;li&gt;"export CATALINA_HOME=/usr/local/apache-tomcat-6.0.32" --&amp;gt; optional to set up these env variables.&lt;/li&gt;&lt;li&gt;"cd $CATALINA_HOME/bin" --&amp;gt; go to bin folder to access scripts.&lt;/li&gt;&lt;li&gt;"sudo sh startup.sh" --&amp;gt; to manually start Tomcat&lt;/li&gt;&lt;li&gt;"localhost:8080" --&amp;gt; Go to browser and access the page to see configuration page of Tomcat.&lt;/li&gt;&lt;li&gt;If step 11 returns error, "cd $CATALINA_HOME/logs" --&amp;gt; go to logs folder and view "catalina.&lt;date&gt;.log" file to see what went wrong. If everything went well, you should see "INFO: Starting Coyote HTTP/1.1 on http-8080". If you see "java.net.BindException: Address already in use", shutdown and restart Tomcat.&lt;br /&gt;&lt;/date&gt;&lt;/li&gt;&lt;li&gt;"sudo sh $CATALINA_HOME/bin/shutdown.sh" --&amp;gt; to shutdown Tomcat.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Src: &lt;a href="http://www.puschitz.com/InstallingTomcat.html#InstallingTomcatSoftware"&gt;http://www.puschitz.com/InstallingTomcat.html#InstallingTomcatSoftware&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;EXTRA:&lt;br /&gt;&lt;br /&gt;Mac: Installing Tomcat&lt;br /&gt;&lt;br /&gt;src: &lt;a href="http://developer.apple.com/internet/java/tomcat1.html"&gt;http://developer.apple.com/internet/java/tomcat1.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1. Download tomcat tar.gz from archives.&lt;br /&gt;2. do sudo and extract it to /usr/local&lt;br /&gt;3. give ownership to your username by chown -R username foldername&lt;br /&gt;4. set up startup and stop scripts.&lt;br /&gt;5. Access via localhost:8080 to check installation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-4552529704052172547?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/4552529704052172547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=4552529704052172547' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4552529704052172547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4552529704052172547'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2011/02/ubuntu-install-tomcat.html' title='Ubuntu: Install Tomcat'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-12636774400707253</id><published>2010-12-03T22:19:00.000-08:00</published><updated>2011-02-13T10:49:23.700-08:00</updated><title type='text'>Tutorials &amp; Help</title><content type='html'>There would be times when we forget things which we have been using for a long time. Then you would want to go to basic tutorial and read all about it. There is no good re-writing the commands and explanations here in blog but it is good to have links to the tutorials and help documents. This post will contain links to well-written help documentation for everything I will need. Please contribute to it, if you wish.&lt;br /&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class=" on down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;img src="http://www.blogger.com/img/blank.gif" alt="Link" class="gl_link" border="0" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://java.sun.com/developer/Books/javaprogramming/JAR/basics/"&gt;JAR basics - Documentation from Oracle&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.alef1.org/jean/marathon-1.0.2/tutorial.html"&gt;Tutorial on Marathon testing tool&lt;/a&gt;&lt;a href="http://www.alef1.org/jean/marathon-1.0.2/tutorial.html"&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://agile.csc.ncsu.edu/SEMaterials/tutorials/install_plugin/index_v35.html"&gt;How to install Eclipse plugins - manually and the easy way?&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.fewt.com/2009/11/install-kindle-for-pc-application-on.html"&gt;How to install Kindle for Linux&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-12636774400707253?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/12636774400707253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=12636774400707253' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/12636774400707253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/12636774400707253'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/12/tutorials-help.html' title='Tutorials &amp; Help'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-1331522876685842813</id><published>2010-12-03T21:19:00.000-08:00</published><updated>2010-12-03T22:12:57.231-08:00</updated><title type='text'>Ubuntu: Terminal display help</title><content type='html'>Here are the few tricks up your sleeve for utilizing the scripts to customize the terminal display.&lt;br /&gt;&lt;br /&gt;1. To have the shell prompt always start at the left hand side of terminal:&lt;br /&gt;&lt;br /&gt;  When you have long pathname for the current working directory and you have a even longer command to execute, the display gets all screwed up. So it always helps you to have the shell prompt start at left hand side of terminal. You have to change the PS1 - to customize your bash prompt.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_aEbOMI5mrEY/TPnXJaEv46I/AAAAAAAAHNg/bBmd2NhiiD0/s1600/ps1_1.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 63px;" src="http://4.bp.blogspot.com/_aEbOMI5mrEY/TPnXJaEv46I/AAAAAAAAHNg/bBmd2NhiiD0/s320/ps1_1.png" alt="" id="BLOGGER_PHOTO_ID_5546700972701508514" border="0" /&gt;&lt;/a&gt;In the fig, you can't distinguish where the dir name ends and where the command starts.  So open ".bashrc" file in home folder&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;gedit ~/.bashrc&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;and add the following code. Note: as a good coding practice, add a line of comment saying when and why added the piece of code and add the new code at the end of the file.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;PS1=$'\[\e]2;   \h::\]$PWD\[\a\]\[\e]1;\]$(basename "$(dirname "$PWD")")/\W\[\a\] \w\n\T \$ '&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then the bash prompt becomes like this,&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_aEbOMI5mrEY/TPnYjS-a0TI/AAAAAAAAHNo/1jw-YXtGdMg/s1600/ps1_2.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 78px;" src="http://3.bp.blogspot.com/_aEbOMI5mrEY/TPnYjS-a0TI/AAAAAAAAHNo/1jw-YXtGdMg/s320/ps1_2.png" alt="" id="BLOGGER_PHOTO_ID_5546702516984140082" border="0" /&gt;&lt;/a&gt;The current working directory name in first line(s) and in a new line current time followed by $ for you to type in the command.&lt;br /&gt;&lt;br /&gt;Much better huh, what exactly does the code do? Let's review from back&lt;br /&gt;\$ - if the effective UID is 0, a #, otherwise a $&lt;br /&gt;\T -     the current time in 12-hour HH:MM:SS format&lt;br /&gt;\n - newline&lt;br /&gt;\w - current working directory with ~ instead of $HOME directory&lt;br /&gt;\[ \] - begin and end of a series of non-printing characters&lt;br /&gt;\W - basename of the current working directory with ~ instead of $HOME directory&lt;br /&gt;\e - escape character&lt;br /&gt;\h - hostname&lt;br /&gt;&lt;br /&gt;Source: to customize you bash prompt you can follow &lt;a href="http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html"&gt;this&lt;/a&gt; help document.&lt;br /&gt;&lt;br /&gt;You can also create aliases for opening and refreshing bashrc file like this (if you have to change it frequently)&lt;br /&gt;&lt;br /&gt;In "~/.bashrc" file add the following code,&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;alias refprofile=' source ~/.bashrc'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;alias editprofile='vi ~/.bashrc'&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;whereas, editprofile - opens the file for editing and refprofile - refreshes the file to reflect the change made.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Happy customization!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-1331522876685842813?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/1331522876685842813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=1331522876685842813' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1331522876685842813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1331522876685842813'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/12/ubuntu-terminal-display-help.html' title='Ubuntu: Terminal display help'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_aEbOMI5mrEY/TPnXJaEv46I/AAAAAAAAHNg/bBmd2NhiiD0/s72-c/ps1_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-897834075480374466</id><published>2010-11-12T16:04:00.000-08:00</published><updated>2011-03-24T23:40:04.847-07:00</updated><title type='text'>Ubuntu: Set up iSCSI initiator and target</title><content type='html'>&lt;span style="font-size:100%;"&gt;There will be a lot of posts about iSCSI hereafter, as I am working on the SAN protocol for my graduate project. This was the source I used : &lt;a href="http://www.howtoforge.com/using-iscsi-on-ubuntu-9.04-initiator-and-target"&gt;http://www.howtoforge.com/using-iscsi-on-ubuntu-9.04-initiator-and-target&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is what I did:&lt;br /&gt;Follow the set up till creating logical volume.&lt;br /&gt; If your system got a partition (/dev/sdan - where n is any number  between 1 and 9) which is free and doesn’t contain a partition table(no  data or os in it). Use Gparted to format the disk to any type. Then  follow the steps below:&lt;br /&gt;&lt;br /&gt;sudo fdisk -l(lower case L) - This will list the device partitions size and ID&lt;br /&gt;&lt;br /&gt;pvcreate /dev/sda3 - I’m using this partition - On success it would say “Physical volume /dev/sda3 successfully created&lt;br /&gt;&lt;br /&gt;vgcreate vg0 /dev/sda3 - On success “Volume group vg0 successfully created”. vg0 - name of the volume group. Any format is fine.&lt;  lvcreate -L20G -n storage_lun1 vg0 - From the source  3. After creating the logical volume, follow the source instructions. At the place of iqn.2001-04.com.example:storage.lun1 192.168.0.100  substitute your IP address. I’m going to have both target and initiator  at the same computer for now. So I’m using 127.0.0.1 in place of  192.168.0.100 in all forthcoming commands. However, 3260 port number is  same and it is default for iSCSI. &lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt; Now the above post is good but once I partition the sdb disk and changed some file I had problem logging to target. This is the error I got.&lt;br /&gt;&lt;br /&gt;iscsiadm: Could not login to [iface: default, target: iqn.2001-04.com.example:storage.disk2.amiens.sys1.xyz, portal: 192.168.1.101,3260]: iscsiadm: initiator reported error (15 - already exists) iscsiadm: Could not log into all portals. Err 15.&lt;br /&gt;&lt;br /&gt;I tried couple of solutions like deleting the devices modules and taking a look at the /var/log/messages. Then I jumped at &lt;a href="http://www.cyberciti.biz/tips/howto-setup-linux-iscsi-target-sanwith-tgt.html"&gt;this&lt;/a&gt; page and all I had to install tgtadm service and it was piece of cake from there and simple solution to create small portions to act as targets.  Since our project is about able to replay the iscsi event with session details as original event for problem diagnosis, for testing during development we need to create small partitions. I would keep updating about this project. If you need more details, do drop me an email.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-897834075480374466?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/897834075480374466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=897834075480374466' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/897834075480374466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/897834075480374466'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/11/ubuntu-set-up-iscsi-initiator-and.html' title='Ubuntu: Set up iSCSI initiator and target'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-7367244242266395932</id><published>2010-11-07T20:45:00.000-08:00</published><updated>2010-11-07T22:56:08.933-08:00</updated><title type='text'>Ubuntu: How to create full system backup</title><content type='html'>Since I'm playing around my computer to install iSCSI target and initiator, I needed to create volume groups. That involves partitioning and formatting of my hard drive. Hence I'm very sure this would result in the loss of files from my hard drive :) So I wanted to take full system back up of my Ubuntu. I found a very useful and simple to-do list &lt;a href="http://ubuntuforums.org/showthread.php?t=35087"&gt;here&lt;/a&gt;. I am going to list those steps here FMR(For My Reference).&lt;br /&gt;&lt;br /&gt;The general idea in taking full system back up in Ubuntu(or any Linux for that matter), you can create one compressed archive of all the files with folder structure,then uncompress the archive when you want and viola you have saved your files! Unlike Windows, the creating back up and restoring can be done when the system is running. Warning: while restoring we have to be careful where we uncompress the files to avoid losing data. Here are the steps:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Become a root user using "&lt;span style="font-style: italic;"&gt;sudo su&lt;/span&gt;". Warning: be cautious  when you are a super user and execute a command from online, there is a single command which can destroy the entire filesytem!&lt;/li&gt;&lt;li&gt;Go to root of the filesystem using "&lt;span style="font-style: italic;"&gt;cd /&lt;/span&gt;". This would be the place where your back up archive file would be created. Feel free to create the file in remote drives directly.&lt;/li&gt;&lt;li&gt;Then use the following single command to create the backup archive&lt;br /&gt;&lt;pre class="alt2" dir="ltr" style="margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 34px; text-align: left; overflow: auto;"&gt;tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /&lt;/pre&gt;&lt;br /&gt;This file would be really big and if you want to use better compression technique, you can also create bzip2 files.&lt;br /&gt;&lt;pre class="alt2" dir="ltr" style="margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 34px; text-align: left; overflow: auto;"&gt;tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys /&lt;/pre&gt;&lt;br /&gt;This commands take a long time to create the file. The explanation for the command and the options:&lt;ul&gt;&lt;li&gt;c- compress, v- verbose, p- preserve permissions&lt;br /&gt;&lt;/li&gt;&lt;li&gt;backup.tar - filename for the backup file&lt;/li&gt;&lt;li&gt;You need to exclude the directories that doesn't contain useful files and the back up file itself. Remove any /mnt if you need to avoid backing up other mounted partitions too.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Ignore the error message like "&lt;span style="font-style: italic;"&gt;tar: /: file changed as we read it&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;tar: Exiting with failure status due to previous errors&lt;/span&gt;" which you might get at the end of the process.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Restoring:&lt;br /&gt;&lt;/b&gt;The command to restore the file from the same place as root of the filesystem,&lt;br /&gt;&lt;pre class="alt2" dir="ltr" style="margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 34px; text-align: left; overflow: auto;"&gt; tar xvpfz backup.tgz -C /&lt;/pre&gt;&lt;br /&gt;Make sure you create the folders that you excluded from the back up archive. So this would be the list of directories if you had used the above command:&lt;pre class="alt2" dir="ltr" style="margin: 0px; padding: 6px; border: 1px inset; width: 640px; height: 98px; text-align: left; overflow: auto;"&gt;mkdir proc&lt;br /&gt;mkdir lost+found&lt;br /&gt;mkdir mnt&lt;br /&gt;mkdir sys&lt;br /&gt;etc...&lt;/pre&gt;&lt;br /&gt;Then reboot the system to complete the process.&lt;/li&gt;&lt;/ul&gt;Thanks to the source: &lt;a href="http://ubuntuforums.org/showthread.php?t=35087"&gt;http://ubuntuforums.org/showthread.php?t=35087&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-7367244242266395932?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/7367244242266395932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=7367244242266395932' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7367244242266395932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7367244242266395932'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/11/ubuntu-how-to-create-full-system-backup.html' title='Ubuntu: How to create full system backup'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-904539628536709652</id><published>2010-09-26T20:08:00.000-07:00</published><updated>2010-10-03T13:17:13.787-07:00</updated><title type='text'>Ubuntu: Configuring Webcam and Microphone in Lenovo Y530</title><content type='html'>I have a Lenovo Y530 laptop. I had Windows then being the devoted Linux girl, I installed Ubuntu 9.10 on it. The laptop has built-in webcam(1.3M pixels). It was working fine with windows but got screwed up in ubuntu. So I set out to find out how to fix it. At first glance it looked like there was no proper solution available online. But after hours of search, I found the easy steps buried under a bunch of useless/complex solutions. So I wanted to document the exact steps I followed to configure the webcam.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I tried installing cheese(webcam booth tool for linux) and used Ekiga softphone. You can use either of this tool to check if the webcam is listed in video devices list. In Cheese, the screen had this test screen and both the tools din't recognize the webcam.&lt;/li&gt;&lt;li&gt;Then in Terminal, try "lsusb". It would list all the USB devices connected to the computer. A sample lsusb would look like this (this has no webcam)&lt;br /&gt;&lt;pre style="width: 100%;"&gt;&lt;br /&gt;Bus 005 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader&lt;br /&gt;Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 002 Device 003: ID 046d:c016 Logitech, Inc. M-UV69a/HP M-UV96 Optical Wheel Mouse&lt;br /&gt;Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub&lt;br /&gt;Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub&lt;br /&gt;&lt;/pre&gt;The 8 digit number followed by ID is the unique ID of the hardware device. If at all you want to search for solutions for any device use this number in your searches and you will more likely land in the page you want. When I ran this cmd, the output din't have any device listed in it. Then in some thread in &lt;a href="http://ubuntuforums.org/"&gt;Ubuntu forums&lt;/a&gt;(an excellent place to start your search), someone asked to use hot keys to toggle the webcam. In Lenovo Y530, its Fn+Esc. After that, lsusb listed the device as in, &lt;pre&gt;&lt;span dir="ltr" id=":1s"&gt;Bus 002 Device 002: ID 04f2:b105 Chicony Electronics Co., Ltd&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Now, I searched the ID with all related keywords, it landed &lt;a href="http://www.ideasonboard.org/uvc/"&gt;here&lt;/a&gt;. I checked for my device and saw that it was complaint and all i have to do is download the v4l dvb drivers and viola.&lt;/li&gt;&lt;li&gt;Then follow the steps listed in this &lt;a href="http://linuxtv.org/repo/"&gt;link&lt;/a&gt;. I downloaded the latest version of V4L/DVB via web browser and following cmds "make", "make install". [&lt;span style="font-weight: bold;"&gt;don't forget to do, "sudo make install" - I know its simple but trust me you don't want to miss it&lt;/span&gt;]&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Then happened the weirdest thing. After rebooting the system and checking if webcam worked with cheese, the microphone got screwed. When open the sound preferences dialog(System-&gt;Preferences-&gt;Sound), in the Input tab, there was no device listed. Without proper knowledge about the thread flow, I removed pulseaudio from the system. Then it was a fresh start as with the webcam. The steps followed were the following:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In Terminal, use this cmd &lt;pre&gt;lspci -v | grep -i audio&lt;/pre&gt;&lt;br /&gt;The result would print out the Audio device if configured right. In my case, it returned empty result.&lt;/li&gt;&lt;li&gt;So I downloaded the alsa drivers, util, lib files from &lt;a href="http://www.alsa-project.org/main/index.php/Download"&gt;here&lt;/a&gt;. Followed this steps &lt;ul&gt;&lt;li&gt;copy the tar.gz files to "/usr/src/alsa" - if you have the folder already or create one if you don't&lt;/li&gt;&lt;li&gt;Then unzip the files using "sudo tar xjf alsa-driver*". Similarly util and lib files(change tar options as you require)&lt;/li&gt;&lt;li&gt;Then we have to go each directory and do "./configure", "make", "make install".&lt;/li&gt;&lt;li&gt;During the "./configure" if any error pops, you have to clear that for the installation to complete. I am just listing the problems I faced. &lt;ul&gt; &lt;li&gt; Problem: During the "make" of Util files&lt;br /&gt;&lt;pre&gt; &lt;span dir="ltr" id=":z7"&gt;xmlto man alsactl_init.xml&lt;br /&gt;/bin/bash: xmlto: command not found&lt;span style="font-family:Georgia,serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Solution: &lt;pre&gt;sudo apt-get install xmlto&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Problem: During the "./configure" of Util files &lt;pre&gt;checking for new_panel in -lpanelw... no&lt;br /&gt;configure: error: panelw library not found&lt;/pre&gt;&lt;br /&gt;Solution: Create soft links to the library files. &lt;a href="http://monespaceperso.org/blog-en/2009/08/31/upgrade-alsa-1-0-21-on-ubuntu-jaunty-9-04/"&gt;click here for source&lt;/a&gt; &lt;pre&gt; sudo ln -s libpanelw.so.5 /usr/lib/libpanelw.so&lt;br /&gt;sudo ln -s libformw.so.5 /usr/lib/libformw.so&lt;br /&gt;sudo ln -s libmenuw.so.5 /usr/lib/libmenuw.so&lt;br /&gt;sudo ln -s libncursesw.so.5 /lib/libncursesw.so&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;Then reboot the system. Now everything works perfectly fine.&lt;br /&gt;&lt;br /&gt;Later added: As I mentioned in the post, I accidentally removed pulseaudio from my system. So when I tried to do skype call, both sides webcam worked fine. But audio had too much static noise. So I had to install pulseaudio. Then reinstalled skype. Skype call works fine. But still if I use the system's music player, then try skype calls again audio has static noise. I read from a forum that "sudo killall pulseaudio" and then restarting skype helps. But that is not efficient solution. If someone has permanent solution to this please drop a comment. Thanks in advance.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-904539628536709652?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/904539628536709652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=904539628536709652' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/904539628536709652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/904539628536709652'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/09/configuring-webcam-and-microphone-in.html' title='Ubuntu: Configuring Webcam and Microphone in Lenovo Y530'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-3552823265877248876</id><published>2010-09-12T20:19:00.000-07:00</published><updated>2011-02-18T16:22:29.306-08:00</updated><title type='text'>Servlets</title><content type='html'>&lt;div style="text-align: justify;"&gt;Servlets are replacing CGI script at most enterprise computing. They both perform similar operations of creating and displaying HTML pages dynamically. The basic differences between the two:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;CGI - Platform dependent, hence they cannot utilize server's capabilities; spawns new process for every request, hence resource intensive; &lt;/li&gt;&lt;li&gt;Servlets - Since written in Java they can be executed in servers without any modifications as per "write once, run anywhere"; spawns new threads within the server process, hence lite weight.&lt;/li&gt;&lt;/ul&gt;Lifecycle of servlets:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;init()&lt;/span&gt; - initializes the servlet&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;service(ServletRequest , ServletResponse)&lt;/span&gt; - all url's access this method and here we delegate to other service methods of form &lt;span style="font-weight: bold;"&gt;doXXX(HttpServletRequest  , HttpServletResponse)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;destroy()&lt;/span&gt; - destroys the servlet&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-3552823265877248876?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/3552823265877248876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=3552823265877248876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/3552823265877248876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/3552823265877248876'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/09/servlets.html' title='Servlets'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-6064099301130393980</id><published>2010-09-09T19:55:00.000-07:00</published><updated>2010-11-09T18:43:44.911-08:00</updated><title type='text'>Reset root password for phpmyadmin/mysql</title><content type='html'>I recently faced an issue where I forgot the root password for mysql and ended up searching for simple procedure to unlock it by resetting the password. So I want to save here the steps to unlock the phpmyadmin if I should loose my root password again. Then I can skip  the searching-for-an-hour part and go straight to the unlocking part. (Thanks to &lt;a class="bigusername" href="http://ubuntuforums.org/member.php?u=135461"&gt;fredanthony&lt;/a&gt; and for source thread: &lt;a href="http://ubuntuforums.org/showthread.php?t=227704"&gt;click here&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;The error message you get when you enter wrong password in the login page is : &lt;blockquote&gt;&lt;/blockquote&gt;"&lt;span style="font-weight: bold;"&gt;#&lt;/span&gt;&lt;span style="font-weight: bold;" class="posthilit"&gt;1045&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; - Access denied for user 'root'@'localhost' (using  password: NO)&lt;/span&gt; "&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Steps:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Stop mysql - &lt;span style="font-style: italic; font-weight: bold;"&gt;$ /etc/init.d/mysql stop&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Kill all mysql related processes. The ps list can be pretty big and confusing so better use grep to filter mysql processes and use only those pids in kill command. -&lt;span style="font-weight: bold; font-style: italic;"&gt; $ ps waux | grep mysql, $kill -9 pids&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Open a new session of mysql by skipping permissions - &lt;span style="font-weight: bold; font-style: italic;"&gt;$ /usr/bin/mysqld_safe --skip-grant-tables       &lt;/span&gt;&lt;/li&gt;&lt;li&gt;While the above session is open, in a new tab open a new session of mysql - &lt;span style="font-weight: bold; font-style: italic;"&gt;$ /usr/bin/mysql       &lt;/span&gt;&lt;/li&gt;&lt;li&gt;Inside the new session,change the database &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;- (inside mysql)$use mysql;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;The critical part of our unlocking process is resetting the password for root user &lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;-(inside mysql) $&lt;/span&gt;&lt;/span&gt;UPDATE user SET Password=PASSWORD('YOUR_PASSWORD_HERE') &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt; WHERE Host='localhost' AND User='root';       - &lt;/span&gt;This step sets new password for the root user.&lt;/li&gt;&lt;li&gt;Then quit the mysql sessions and restart the mysql - &lt;span style="font-weight: bold; font-style: italic;"&gt;$quit, $/etc/init.d/mysql restart&lt;/span&gt;&lt;/li&gt;&lt;li&gt;try logging into phpmyadmin with new password you set in update command and viola!&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;P.S: List of useful SQL command syntax - &lt;a href="http://www.pantz.org/software/mysql/mysqlcommands.html"&gt;source&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;METHOD 2:&lt;br /&gt;  This step is to change the MYSQL root password. Source: &lt;a href="https://help.ubuntu.com/10.04/serverguide/C/mysql.html"&gt;Ubuntu help documentation&lt;/a&gt;. In a terminal enter the following command:&lt;br /&gt;&lt;br /&gt;"&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;sudo dpkg-reconfigure mysql-server-5.1&lt;/span&gt;&lt;/span&gt;&lt;span class="command"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;However verify you have mysql-server-5.1 in your system. To find that, in terminal type "&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;mysql -V"&lt;/span&gt;&lt;/span&gt;. The result would print out details about the mysql server installed in your system.Sample result was&lt;br /&gt; "&lt;span style="font-style: italic;"&gt;mysql  Ver 14.14 Distrib &lt;span style="font-weight: bold;"&gt;5.1&lt;/span&gt;.41, for debian-linux-gnu (i486) using readline 6.1&lt;/span&gt;". Hence I use 5.1 in the above command. When you run the reconfigure command, it will prompt you to enter password and restarts the mysql daemon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-6064099301130393980?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/6064099301130393980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=6064099301130393980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/6064099301130393980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/6064099301130393980'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/09/reset-root-password-for-phpmyadminmysql.html' title='Reset root password for phpmyadmin/mysql'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-8556186442928037396</id><published>2010-08-29T18:04:00.000-07:00</published><updated>2011-03-16T18:11:17.181-07:00</updated><title type='text'>Ubuntu: Tips and tricks</title><content type='html'>&lt;div style="text-align: justify;"&gt;An excellent and powerful feature about Ubuntu or any other Linux machines is that you can do anything/everything with a single command in a terminal. As with great powers comes great responsibility of understanding(possible) and remembering(absolutely impossible) those powerful commands! So this post would have simple and sometimes complex(which I doubt) commands for working your way around Ubuntu. Please contribute to this list, if you wish. Thanks in advance.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;commands: &lt;/b&gt;&lt;br /&gt;&lt;table border="1" cellpadding="3" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Install eclipse&lt;/td&gt;&lt;td&gt;sudo apt-get install eclipse&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Uninstall eclipse&lt;/td&gt;&lt;td&gt; sudo apt-get autoremove eclipse&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Copy entire directory in Ubuntu&lt;/td&gt;&lt;td&gt; cp -r src_path/folder/* dest_path&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Install LAMP stack &lt;/td&gt;&lt;td&gt;sudo apt-get install lamp-server^&lt;br /&gt;- ^ cadet symbol is mandatory&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Restart/Start/Stop Apache &lt;/td&gt;&lt;td&gt;sudo /etc/init.d/apache2 restart/start/stop&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Install phpmyadmin&lt;/td&gt;&lt;td&gt;sudo apt-get install libapache2-mod-auth-mysql phpmyadmin&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Cleaning up after any uninstall&lt;/td&gt;&lt;td&gt;sudo apt-get autoremove&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Start/Stop MySql&lt;/td&gt;&lt;td&gt;/etc/init.d/mysql start/stop&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Create softlink for phpmyadmin in Ubuntu 10.04(access as http://localhost/pma/index.php)&lt;/td&gt;&lt;td&gt;sudo ln -s /usr/share/phpmyadmin /var/www/pma&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Open folder as root user&lt;br /&gt;- AVOID this and prefer using terminal and sudo for executing commands&lt;/td&gt;&lt;td&gt;gksudo nautilus&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Print out processor information&lt;/td&gt;&lt;td&gt;cat&lt;space&gt;/proc/cpuinfo&lt;/space&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;To find out if 32 bit or 64 bit linux kernel&lt;/td&gt;&lt;td&gt;uname -a&lt;br /&gt;- if result has i386/i486/i586/i686 GNU/LINUX, then 32 bit or x86_64 GNU/Linux, then 64 bit&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;To view .chm files in Ubuntu&lt;br /&gt;- chm = Microsoft compiled HTML files format&lt;br /&gt;&lt;/td&gt;&lt;td&gt;Just to read use "xchm"(sudo apt-get install xchm). To edit the file and republish in different format, follow the &lt;a href="http://www.ubuntugeek.com/how-to-convert-chm-files-to-html-or-pdf-files.html"&gt;source here&lt;/a&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;To find the version of JDK in your linux&lt;/td&gt;&lt;td&gt;"java -version"&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;To create aliases for often used complex commands&lt;/td&gt;&lt;td&gt;Cmd: alias alias_name="alias_cmd --options".If you got more aliases and you need it for all sessions hereafter, create a file "./alias" (name is for your reference, any name should do) in home directory. Add all the aliases command you need.Add the following lines in file $HOME/.bashrc, &lt;pre&gt;&lt;span style="color:DarkOrange;"&gt;# Source the aliases, if a separate file exists&lt;/span&gt;&lt;br /&gt;if [ -e $HOME/.alias ]; then&lt;br /&gt;[ -n "$PS1" ] &amp;amp;&amp;amp; . $HOME/.alias&lt;br /&gt;fi&lt;br /&gt;&lt;/pre&gt; and execute "source $HOME/.bashrc". &lt;a href="http://ubuntuforums.org/showthread.php?t=204382"&gt;Source here.&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;To change password for a user account&lt;/td&gt;&lt;td&gt;cmd: "passwd". You will be prompted to enter current, new and retype new password. It should be more than 6 char long.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;To change login shell&lt;/td&gt;&lt;td&gt;Find the current shell, "echo $SHELL", the env variable has the current shell info. Then find list of valid shell logins for your system by "cat /etc/shells". Finally to change to new shell, "chsh -s &lt;span style="font-style: italic;"&gt;newshell&lt;/span&gt;" where newshell is the full pathname taken from /etc/shells. You will be prompted for password. It will take effect from next login.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;To clear the contents of a file without deleting it&lt;br /&gt;&lt;/td&gt;&lt;td&gt;We know "cat filename" - print the file on terminal, "nano filename" - to edit line by line, "&gt; filename" - clear the contents of the file without destroying the file.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;To use gcc-3.x version instead of default gcc in Ubuntu in 10.04&lt;br /&gt;&lt;/td&gt;&lt;td&gt;You need to download required 3.x version, I need 3.4 so I downloaded  &lt;a href="http://packages.ubuntu.com/jaunty/i386/gcc-3.4-base/download" target="_blank"&gt;gcc-3.4-base&lt;/a&gt;, &lt;a href="http://packages.ubuntu.com/jaunty/i386/cpp-3.4/download" target="_blank"&gt;cpp-3.4&lt;/a&gt;, and&lt;a href="http://packages.ubuntu.com/jaunty/i386/gcc-3.4/download" target="_blank"&gt; gcc-3.4 &lt;/a&gt;Then "sudo dpkg -i *.deb", this would select the removed databases and install the gcc. Your default gcc would still be the same and both version co-exist. While compiling just use "gcc-3.4". Note: "gcc -v" displays the version of gcc.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;To execute user defined script from any directory in any session&lt;br /&gt;&lt;/td&gt;&lt;td&gt;Lets say you got a script named "first" and you want to execute the script just like other linux commands like "echo" from anywhere at shell prompt. In short, you need to add your bin directory to the PATH env variable. Thats what exactly we do here:&lt;br /&gt;1. "mkdir bin" --&gt; in your home directory create a directory called bin&lt;br /&gt;. Its a good practice to use "bin" folder to store your scripts.&lt;br /&gt;2. "cp first ~/bin" --&gt; copy all your tested script files to the bin directory.&lt;br /&gt;3. "cd" --&gt; go to root directory, thats where you can find .bash_profile.&lt;br /&gt;4. "vi .bash_profile" --&gt; open the profile in vi editor. This file has all startup settings.&lt;br /&gt;5. "export PATH=$PATH:~/bin" --&gt;append the path of bin directory to env variable PATH so system can find the executable. Don't forget the ":" and replace "~" with full path to your directory if you are using other directory than your home. Save the vi file using "&lt;esc&gt;:wq".&lt;br /&gt;4. "first" --&gt; it should work from any directory of the user.&lt;/esc&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How to install apache server&lt;/td&gt;&lt;td&gt;In terminal:&lt;br /&gt;"sudo apt-get install apache2".&lt;br /&gt;This would install,configure the server for you. To check in browser, "http://localhost"&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How to open "rar"/"zip" files&lt;br /&gt;&lt;/td&gt;&lt;td&gt;1. First install "sudo apt-get install unrar". Then "unrar x filename.rar" where filename.rar = your file2. To unzip files, in terminal "unzip filename". -d option specifies the target directory for the files.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Create alias ip address in Linux&lt;/td&gt;&lt;td&gt;"ifconfig INTERFACE:ctr IP_ADDR netmask 255.255.255.0 up"Exp: INTERFACE - the interface in which you want to add the new ip address. ctr - start from 0 and increment for every new alias ip. IP_ADDR - the new alias ip address you want to add. netmask, up - keywords mandatory. Calculate the netmask and update it. If i want to add 192.168.30.10 to eth1 the command would be "ifconfig eth1:0 192.168.30.10 netmask 255.255.255.0 up".&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;To display unix timestamp&lt;/td&gt;&lt;td&gt;"date" displays the date and time. If you want the unix timestamp use "date +%s". Eg: For Mon Jan 24 21:42:57 PST 2011, the timestamp is 1295934173. Use this &lt;a href="http://www.unixtimestamp.com/index.php"&gt;site&lt;/a&gt; to find out timestamp given date and time.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How to find version of Tomcat&lt;br /&gt;&lt;/td&gt;&lt;td&gt;1. "cd $TOMCAT_HOME/bin" --&gt;Go to TOMCAT_HOME - root folder of tomcat installation&lt;br /&gt;2. "sh version.sh" --&gt;will print out the version details of tomcat, jdk&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;How to open new terminal and execute commands from a terminal&lt;br /&gt;&lt;/td&gt;&lt;td&gt;The command is "screen". In the old terminal, "screen command_to_execute" will open up terminal inside this one. Look &lt;a href="http://www.thegeekstuff.com/2010/07/screen-command-examples/"&gt;here&lt;/a&gt; for options to detach the new terminal.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;/tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;P.S: Usually blogger has a bugging problem of inserting unwanted spaces if you insert a table in Edit Html section. To avoid the pitfall, after pasting the table code, remove all the spaces. Hence the code like this  (avoiding printing it as table)&lt;br /&gt;&lt;br /&gt;table&lt;br /&gt;tbody&lt;br /&gt;tr&lt;br /&gt;td /td&lt;br /&gt;tr&lt;br /&gt;/tbody&lt;br /&gt;table&lt;br /&gt;&lt;br /&gt;After removing the extra spaces would look like this,&lt;br /&gt;&lt;br /&gt;table tbody tr td /td /tr /tbody /table&lt;br /&gt;&lt;br /&gt;Now the code looks confusing, so better edit the table with spaces and finally before publishing it remove the spaces. Hope this helps someone!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-8556186442928037396?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/8556186442928037396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=8556186442928037396' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8556186442928037396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8556186442928037396'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/08/tips-and-tricks.html' title='Ubuntu: Tips and tricks'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-8894929169556003819</id><published>2010-05-23T09:39:00.000-07:00</published><updated>2010-05-25T20:28:46.190-07:00</updated><title type='text'>To-Do: Run a marathon</title><content type='html'>&lt;div style="text-align: justify;"&gt;            Just like every other Sunday morning, I started the hike in Mission peak. The trial never gets easy even if you hike them every week. The climate was awesome as usual. While we were climbing down the trail we saw the runners of &lt;a href="http://www.abovethefog.net/ohlone50k"&gt;&lt;b&gt;&lt;span style="color: rgb(0, 51, 153);font-size:medium;" &gt;23rd Annual Ohlone 50K Wilderness Run&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;            Its a 31 mile run for some good cause. I saw people from all age groups run for the cause. When I saw them, I added a new item to my bucket list[list of things I plan to do before life ends] and that is to run a marathon for a cause. And I really do hope I am able to do it not just once but almost every year. I will make it happen soon!! For now I will just add my small achievement of touching the mission peak here.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_aEbOMI5mrEY/S_ld36XqxgI/AAAAAAAAGQ4/SJ-t-Kghv7c/s1600/DSC05862.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_aEbOMI5mrEY/S_ld36XqxgI/AAAAAAAAGQ4/SJ-t-Kghv7c/s320/DSC05862.JPG" alt="" id="BLOGGER_PHOTO_ID_5474510037188265474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;View from Mission peak&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_aEbOMI5mrEY/S_ld3XtpGWI/AAAAAAAAGQw/7V4jmEdAKLY/s1600/DSC05849.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_aEbOMI5mrEY/S_ld3XtpGWI/AAAAAAAAGQw/7V4jmEdAKLY/s320/DSC05849.JPG" alt="" id="BLOGGER_PHOTO_ID_5474510027885189474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Looking back at the trail&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/476309480445609371-8894929169556003819?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/8894929169556003819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=8894929169556003819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8894929169556003819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8894929169556003819'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/05/to-do-run-marathon.html' title='To-Do: Run a marathon'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_aEbOMI5mrEY/S_ld36XqxgI/AAAAAAAAGQ4/SJ-t-Kghv7c/s72-c/DSC05862.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-2669483146315724788</id><published>2010-05-05T20:55:00.000-07:00</published><updated>2010-05-06T12:48:20.178-07:00</updated><title type='text'>PHP MySql POST GET Cookies Session - Bits and information</title><content type='html'>I always feel its easier to remember details if we learn it as differences between two objects. So I want to blog the basic differences between cookies and session, POST and GET method. And bits and pieces of information about UNION,UNION ALL and some more. This post has so many random information. Let me know if you find something wrong or different.&lt;br /&gt;&lt;br /&gt;Three ways to move information across web pages:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;links: &lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;a link with href set to destination page.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Forms: set action to point to target, method of how server should process information sent, encoding type optional. Both 1 and 2 requires user action like a click.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Without any user action, user header in PHP to move to another page. header("Location: page.php");&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cookies:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Cookies are stored at the client's computer.&lt;/li&gt;&lt;li&gt;Once stored at client comp by an application, it can be accessed by any web page of that application.&lt;/li&gt;&lt;li&gt;It contains variable = value pairs of information.&lt;/li&gt;&lt;li&gt;Cookies are more useful for applications that has no database.&lt;/li&gt;&lt;li&gt;Cookies will be available from the next page and not in the current page where it was set.&lt;/li&gt;&lt;li&gt;In PHP, setcookie('variable','value');  sets the cookie and if you don't mention time, this cookie will expire when user exits the application.&lt;/li&gt;&lt;li&gt;On setting the cookie, it gets stored in one of many built in arrays of PHP called $_COOKIE. For accessing your cookie variable just refer the array with the variable name like $_COOKIE['variable']&lt;/li&gt;&lt;li&gt;If we want our cookie to be present even after user exits application then we have to mention the expiration time while we set the cookie. We can use two functions along with setcookie() - time and mktime. time() - returns the current time, we have to add the seconds for which the cookie needs to be alive. eg. setcookie('var','val',time()+3600) - to set cookie alive for 1 hour(60*60 seconds). mktime() - returns date and time and the order of arguments passed is hr,min,sec,mon,day, year. eg. setcookie('var','val',mktime(3,0,0,5,6,2010)); - to make it expire by 3am of May 6th 2010.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;To remove cookies, use the same setcookie without any values passed. eg. setcookie('var'); setcookie('var','');&lt;br /&gt;&lt;/li&gt;&lt;li&gt;setcookie limitation: It has to be before any output is sent to the client browser. This limitation is with both session and cookie.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Session:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Session details are stored in a file at the server side. In Unix and Linux systems, in \tmp folder and in Windows folder called sessiondata. We can change the location of where the file is stored by chaning session.save_path value in php.ini.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Session ID - long nonsense number for every client which cannot be guessed or forged. In PHP, system variable is used for session ID - PHPSESSID.&lt;/li&gt;&lt;li&gt;Session ID is passed to every page to access the session details. There are three ways to pass them. 1. If cookies turned on, use the cookies. 2. For links, use the URL. 3. Use hidden variables for form with POST method.&lt;/li&gt;&lt;li&gt;Session variable is got and stored in $_SESSION built in array(similar to $_COOKIE array in cookies). They are accessed same way as in cookies.&lt;/li&gt;&lt;li&gt;For session to work we need to enable, track_vars while installing PHP.(default its turned on from PHP 4.0).&lt;/li&gt;&lt;li&gt;If cookie is turned off at the client side, trans_sid should be enabled to transfer session id. To enable that use session.use_trans_sid = 1 in php.ini.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Start a session: session_start() - If sessionID is found, then load $_SESSION with variables and their values. If no ID is found, then it is first time so create a new session and set PHPSESSID.&lt;/li&gt;&lt;li&gt;Save a session variable: $_SESSION['var'] = 'val';&lt;/li&gt;&lt;li&gt;Close a session: session_destroy() - destroys the session details.&lt;/li&gt;&lt;li&gt;session_id() - returns the PHPSESSID value - current session id.&lt;/li&gt;&lt;li&gt;unset($_SESSION) - unset the session details in the current page.&lt;/li&gt;&lt;li&gt;Limitation: session has to be set before any output is sent to the client browser.     &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;We know that POST and GET are ways of indicating how the server should process the information sent by the form.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;POST:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Sends information in 2 steps. 1. browser contacts form processing server specified in action. 2. Once contact has been established, send data to server in separate transmission.&lt;/li&gt;&lt;li&gt;On server side: 1. read parameters from a standard location. 2. After read, decode parameters before application use form variables. &lt;/li&gt;&lt;li&gt;To get post variables from earlier form use built in array $_POST.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;GET:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In a single transmission, data is sent to the server. Data is appended by the browser to action URL.&lt;/li&gt;&lt;li&gt;This is the default method if not specified otherwise.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;On server side, gets information passed at the end of the URL.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;POST or GET what to use?&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;GET: best transmission performance(single transmission) and apt for small forms with short/few fields.&lt;/li&gt;&lt;li&gt;POST: Apt for forms with many/long text fields.&lt;/li&gt;&lt;li&gt;If inexperienced with server programming use GET to avoid extra steps of processing- read/decode as in POST.&lt;/li&gt;&lt;li&gt;For security purpose, use POST to avoid the information you transmit to be available in open for hackers to track. POST has security holes too but atleast it has encoding when transmitting.&lt;/li&gt;&lt;li&gt;To invoke server processing outside form tag, eg in a tag, use GET because it lets us use form-like parameters as part of URL.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;ENCTYPE field in FORM tag:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Two types of enctype options available. 1. Multipart and 2. Text/plain&lt;/li&gt;&lt;li&gt;Multipart: forms with file selection fields for upload by user.&lt;/li&gt;&lt;li&gt;text/plain: used along with mailto in action attr of form tag. While sending forms to email server rather than a server.&lt;/li&gt;&lt;li&gt;The default encoding type: Internet media type Application/x-www-form-urlencode.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;UNION and UNION ALL:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Union all - combines rows from multiple row sources into one result set. It includes duplicates.&lt;/li&gt;&lt;li&gt;Union - does the same thing as union all but excludes duplicates, result would be sorted here without duplicates.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Polymorphism in OO langauges:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Ability of 2 or more objects belonging to different classes to respond to exactly same message in different class specific ways.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-2669483146315724788?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/2669483146315724788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=2669483146315724788' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/2669483146315724788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/2669483146315724788'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/05/php-mysql-post-get-cookies-session-bits.html' title='PHP MySql POST GET Cookies Session - Bits and information'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-2116472866961355147</id><published>2010-05-05T20:15:00.000-07:00</published><updated>2010-05-05T20:55:10.325-07:00</updated><title type='text'>Thread programming in Java</title><content type='html'>&lt;div style="text-align: justify;"&gt;I spent a day in library refreshing stuffs I learned long back(not so long!) while I was in undergrad. Since my memory is fresh with these topics, I thought I should blog them so next time I can find it all in one place. On a different note, a day spent studying/reading in library is well spent! Okay back to Threads in Java.&lt;br /&gt;&lt;br /&gt;Thread - class, Runnable - interface which has the thread implementations. For our application class to use thread we need to either implement or subclass or make the class a member class of our application. Thus three ways to create threads:&lt;br /&gt;&lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;Extend Thread class:  For standalone applications that don't need to extend another class.&lt;/li&gt;&lt;li&gt;Implement Runnable interface: For classes that need to extend other classes. Due to single inheritance, we can achieve threads by implementing the interface. Eg: Applets that extend JApplet and can't extend Thread too.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Construct a thread passing an inner class that is Runnable: For threads with tiny run methods and little outside interaction.&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;Thread life cycle functions:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Thread()&lt;/span&gt; - When subclassing Thread class&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Thread(name)&lt;/span&gt; - when subclassing + for debugging &lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;start()&lt;/span&gt; - Begins process of assigning CPU time to a thread. Finally it results in calling &lt;span style="font-weight: bold;"&gt;run()&lt;/span&gt; method of the thread object.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;suspend(), resume(),stop()&lt;/span&gt; - deprecated. Because these suspend and resume functions can cause deadlocks.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;interrupt()&lt;/span&gt; - interrupt whatever the thread is doing&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;boolean isAlive() &lt;/span&gt;- returns true if thread is neither finished or terminated by call to its stop()&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;join()&lt;/span&gt; - to wait for a thread to finish&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;get/setPriority()&lt;/span&gt; - higher priority threads gets first chance of CPU&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;wait(), notify(), notifyAll()&lt;/span&gt; - semaphore and for thread synchronization.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;synchronised &lt;/span&gt;- keyword - can be used for any object in Java. When used over an object or a method, threads will wait if one thread has already started running.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Thread synchronization:&lt;/span&gt;&lt;br /&gt;       The wait, notify and notifyAll methods allow any java.lang.Object to be used as a synchronization target.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;wait()&lt;/span&gt;:&lt;br /&gt;       This causes the current thread to &lt;span style="font-weight: bold;"&gt;block&lt;/span&gt; in given object until awakened by notify or notifyAll.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;notify():&lt;/span&gt;&lt;br /&gt;      &lt;span style="font-weight: bold;"&gt;Random&lt;/span&gt;ly selected thread waiting on this object is awakened. Then that thread tries to regain the monitor lock. If wrong thread is awakened, will result in deadlock.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;notifyAll():&lt;/span&gt;&lt;br /&gt;      &lt;span style="font-weight: bold;"&gt;All &lt;/span&gt;threads waiting on this object is awakened. Then all try for the monitor lock. Hopefully one of them succeed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Best practices:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To avoid deadlock, use notifyAll to wake up waiting threads.&lt;/li&gt;&lt;li&gt;To avoid using deprecated method - stop, use the variable as a flag and use it to find if the thread is done executing.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-2116472866961355147?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/2116472866961355147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=2116472866961355147' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/2116472866961355147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/2116472866961355147'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/05/thread-programming-in-java.html' title='Thread programming in Java'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-5594027057598361483</id><published>2010-04-21T17:56:00.000-07:00</published><updated>2010-04-21T21:13:59.396-07:00</updated><title type='text'>Today's scribbling</title><content type='html'>I took a tamil book from Sunnyvale Library for my Mom but I ended up drawing the art that was on the cover! And of course I am reading the book too. Here is my reproduction of the art :)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_aEbOMI5mrEY/S8-gAXcGlfI/AAAAAAAAGN8/tOplrHhTETY/s1600/suji_art_april_21_2010_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 233px; height: 320px;" src="http://1.bp.blogspot.com/_aEbOMI5mrEY/S8-gAXcGlfI/AAAAAAAAGN8/tOplrHhTETY/s320/suji_art_april_21_2010_1.png" alt="" id="BLOGGER_PHOTO_ID_5462760801176032754" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While I was at it, I drew something for my niece Ovia too. Her favorite character of the bunch, Goofy.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_aEbOMI5mrEY/S8-gqCu_zjI/AAAAAAAAGOE/dzME3mu2g20/s1600/suji_art_april_21_2010_0002.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 233px; height: 320px;" src="http://1.bp.blogspot.com/_aEbOMI5mrEY/S8-gqCu_zjI/AAAAAAAAGOE/dzME3mu2g20/s320/suji_art_april_21_2010_0002.png" alt="" id="BLOGGER_PHOTO_ID_5462761517172641330" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;There are lot more art on the book's cover, I will post them later!! Ciao.&lt;br /&gt;&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/476309480445609371-5594027057598361483?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/5594027057598361483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=5594027057598361483' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/5594027057598361483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/5594027057598361483'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/04/todays-scribbling.html' title='Today&apos;s scribbling'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_aEbOMI5mrEY/S8-gAXcGlfI/AAAAAAAAGN8/tOplrHhTETY/s72-c/suji_art_april_21_2010_1.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-8060429453199335451</id><published>2010-04-12T18:37:00.000-07:00</published><updated>2010-04-12T22:07:05.927-07:00</updated><title type='text'>Who said I can't touch Mission Peak?</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_aEbOMI5mrEY/S8POLs8u3hI/AAAAAAAAGMA/pfBCO36bYBE/s1600/MissionPeak_the_Peak.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 314px;" src="http://2.bp.blogspot.com/_aEbOMI5mrEY/S8POLs8u3hI/AAAAAAAAGMA/pfBCO36bYBE/s320/MissionPeak_the_Peak.jpg" alt="" id="BLOGGER_PHOTO_ID_5459433873742945810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Well, I have this habit of proving myself to be what I claim, when somebody challenges me. So thats what happened when my uncle said I can't hike all the way to the &lt;a href="http://www.exerciseforthereader.org/misspeak/"&gt;Mission peak&lt;/a&gt; and I did it. Its this mountain hiking place in Milpitas. My uncle hikes the place with his pals every Saturday. I am an outdoorsy person. But my uncle had hard time believing it and challenged me to touch the peak this sunday(April 11th, 2010). Hence started one of my memorable experience.&lt;br /&gt;&lt;br /&gt;I used to go trekking every summer when I visit here while I was in undergrad. But that was just simple not-so-steep mountain climb. This one was longer and steeper than the usual place in Los Altos. We reached the place on time and started climbing. It was steep right from the foot of the mountain. To be honest initially it was tough, but not something I can't handle. We saw a "big" rabbit sleeping on the grass near the trail, light drizzle and so many beautiful scenes as we hiked. The peak of this experience is the peak itself. We couldn't have picked a day with such worse weather. Though it was so mild and fun at the bottom as we reached peak, wind was very strong. It literally pushed us through in some places, I am not exaggerating. The peak was so beautiful and was worth the pain and cold. The fun part was when we started climbing down. It was more difficult than climbing up because it was very difficult to put a break. If you loose a minute of your body control and let your legs loose you will snowball down to the bottom of the mountain, well may be not in good shape because the trail bends in place!!&lt;br /&gt;&lt;br /&gt;It took 3 hours for the climb but as I said, it was all worth it. Now, my family agrees I am an outdoorsy person. I am planning to continue this awesome hiking every weekend in this summer!! But I seriously hope the wind becomes weaker and it is not so cold in the coming weeks.&lt;br /&gt;&lt;br /&gt;P.S: I touched the Mission Peak proof is the picture above.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-8060429453199335451?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/8060429453199335451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=8060429453199335451' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8060429453199335451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8060429453199335451'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/04/who-said-i-cant-touch-mission-peak.html' title='Who said I can&apos;t touch Mission Peak?'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_aEbOMI5mrEY/S8POLs8u3hI/AAAAAAAAGMA/pfBCO36bYBE/s72-c/MissionPeak_the_Peak.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-7610268700394250329</id><published>2010-04-11T18:47:00.000-07:00</published><updated>2010-04-12T18:56:23.792-07:00</updated><title type='text'>POSIX Thread programming in C</title><content type='html'>&lt;div style="text-align: justify;"&gt;I have to work on a project for Network programming subject this semester. The project objective is to develop an application that acts as a TCP server on top of UDP socket. Hence our project should take care of everything a TCP server basically and internally does for us, right from three way handshake till 4 way handshake. While there is that, the server have to be concurrent and it should handle few attacks like xmas tree, syn flooding.&lt;br /&gt;&lt;br /&gt;So for the concurrency in server handling, our team decided to go with thread instead of forking new process to handle incoming connections since thread is lighter than forking. But the real reason being is I have worked on process creation in Unix for some projects in Undergrad. But I never experimented with thread creation. So what is learning when there is no experimentation involved.&lt;br /&gt;&lt;br /&gt;While I am at it, I thought I should also blog the things I learn from thread programming in C. These things usually tend to slip away with time. Hence the post. Now this post may contain very basic instructions but for me these are baby steps. So if you are looking for complex details, this is not the post you should be reading. Thanks.&lt;br /&gt;&lt;br /&gt;Misc:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;Good sources: &lt;a href="https://computing.llnl.gov/tutorials/pthreads/"&gt;source1&lt;/a&gt;,&lt;a href="http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html"&gt; source2&lt;/a&gt;, &lt;a href="http://www.google.com/"&gt;source3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;All thread programs need "&lt;span style="font-weight: bold;"&gt;#include &lt;pthread.h&gt;&lt;/pthread.h&gt;&lt;/span&gt;" and while compiling use "&lt;span style="font-weight: bold;"&gt;gcc -pthread filename.c&lt;/span&gt;" to include pthread.h. Hence use IDE to write code but terminal to run the files.&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;to&gt;&lt;/to&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-7610268700394250329?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/7610268700394250329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=7610268700394250329' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7610268700394250329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7610268700394250329'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/04/posix-thread-programming-in-c.html' title='POSIX Thread programming in C'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-6806971110188036826</id><published>2010-04-07T14:18:00.000-07:00</published><updated>2010-04-12T18:56:44.919-07:00</updated><title type='text'>Virtual OS</title><content type='html'>&lt;div style="text-align: justify;"&gt;I never really appreciated the use of  virtual OS softwares until I had to carry two laptops around all day just because the simulator I need for the network lab assignment can run only on windows. So here I am installing VMware in Ubuntu 9.10 followed by Windows XP and over it the famous OPNET. I am charting the steps for my future reference and to help if someone happen to stumble upon my blog.  I am also chart out other miscellaneous things that I had to learn when I do this.&lt;br /&gt;&lt;br /&gt;Miscellaneous:&lt;br /&gt;&lt;br /&gt;1. How to find RAM on ubuntu ? &lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;gnome-system-monitor &amp;amp;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;    This system monitor provides better visualization of the system resources and its usage ( &lt;a href="http://www.cyberciti.biz/tips/how-much-ram-does-my-linux-system.html"&gt;Source&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. How to run .rpm file in Ubuntu?&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;   sudo apt-get install alien&lt;/li&gt;&lt;li&gt;   alien -k name_of_rpm_file.rpm&lt;/li&gt;&lt;li&gt;   dpkg -i file.deb&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;  The "alien" converts the rpm file into its .deb equivalent.  Then run the .deb file to install the package which we downloaded as .rpm file. (&lt;a href="http://embraceubuntu.com/2005/09/23/installing-using-an-rpm-file/"&gt;source&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;3. How to remove non empty directory in linux?&lt;br /&gt;&lt;br /&gt;    rm -rf &lt;name of="" directory=""&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;This forces and does remove non empty directory recursively. Caution while removing root directories. &lt;span style="text-decoration: underline;"&gt;(&lt;/span&gt;&lt;a href="http://www.linuxquestions.org/questions/linux-from-scratch-13/removing-non-empty-directory-342317/"&gt;source&lt;/a&gt;)&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;4. How to run .deb file in linux?&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;   dpkg -i name.deb&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;It installs the software from the package. (&lt;a href="http://www.cyberciti.biz/faq/ubuntu-linux-how-do-i-install-deb-packages/"&gt;source&lt;/a&gt;)&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;5. What is difference between .rpm and .deb installations? which one is preferred?&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;   RPM and DEB are both package types. While using RPM, we have to take care of all dependency between files in the installation process. In DEB it is taken care and we have to just use the above command and install the package. RPM can be very frustrating and time consuming. &lt;codejunkie reply="" at=""&gt;&lt;a href="http://ubuntuforums.org/archive/index.php/t-50050.html"&gt;(source&lt;/a&gt;)&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;Main VMware installation: &lt;span style="text-decoration: underline;"&gt;(&lt;/span&gt;&lt;a href="http://www.ubuntugeek.com/how-to-install-vmware-server-2-0-x-in-ubuntu-9-10-karmic.html"&gt;source1&lt;/a&gt;) &lt;span style="text-decoration: underline;"&gt;(&lt;/span&gt;&lt;a href="http://www.howtoforge.com/how-to-install-vmware-server-2-on-ubuntu-9.10-p2"&gt;source2&lt;/a&gt;)&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;1. Download .tar.gz file from vmware site and also register to get the license details.&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;2. Uncompress the file  using "tar -zvxf VMware-server-2.0.2-203138.i386.tar.gz"&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;3. go to the directory "vmware-server-distrib" and execute "./vmware-install.pl"&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;4. It looks like we need to download the patches to install vmware separately. We can get that using  "wget  http://www.ubuntugeek.com/images/vmware-server.2.0.1_x64-modules-2.6.30.4-fix.tgz"&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;5. Uncompress the file using "tar xvzf vmware-server.2.0.1_x64-modules-2.6.30.4-fix.tgz" and execute the shell as super user  using "sh vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh"&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;6. To avoid directory confusions, we need to remove a directory as super user using "rm -rf /usr/lib/vmware/modules/binary"&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;7. After installing the patch required, we should be able to run "./vmware-config.pl" command successfully.&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;8.Then follow the instructions in the installation.&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;9. Continue with the default values specified for the network connections, NAT creations.&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;10. After a lot of probing and poking, it will ask for the activation license serial number. You would have it in a link in the registration mail. Then follow the on screen instructions.&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;11. If everything goes successful, you will get the following screen&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;Starting VMware services:&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;Virtual machine monitor                                             done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;Virtual machine communication interface                             done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;Virtual ethernet                                                    done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;Bridged networking on /dev/vmnet0                                   done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;Host-only networking on /dev/vmnet1 (background)                    done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;DHCP server on /dev/vmnet1                                          done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;Host-only networking on /dev/vmnet8 (background)                    done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;DHCP server on /dev/vmnet8                                          done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;NAT service on /dev/vmnet8                                          done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;VMware Server Authentication Daemon (background)                    done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;Shared Memory Available                                             done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;Starting VMware management services:&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;VMware Server Host Agent (background)                               done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;VMware Virtual Infrastructure Web Access&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;Starting VMware autostart virtual machines:&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;Virtual machines                                                    done&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;The configuration of VMware Server 2.0.2 build-203138 for Linux for this&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;span style="font-size:85%;"&gt;running kernel completed successfully.&lt;/span&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;12. Now we have to manage the server using firefox browser. In address space type https://&lt;ip&gt;:8333 for HTTPS and http://&lt;ip&gt;:8222 for HTTP.&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;13. After adding the certificate security, we need to login as root. If we don't have a password set for root, we can do it using "sudo passwd root". For this to happen, user should have administrator privileges.&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;14. Login using the newly set root password.&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;15. Use the interface to install new OS and continue working on OS over OS..&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;16. Create a virtual machine with options as  Windows XP, NAT, 256MB RAM, 8GB memory, with CD and USB linked to host operating system.&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;17. Insert Windows(in my case) installation cd in the disc drive and when you power on the virtual machine, it would detect automatically and start the installation process. I noticed that this process was far more easier than installing windows on a real machine.&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;18. Install VMware tools to get good responsiveness.&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;19. Enjoy working on two OS seamlessly.&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;Happy Coding!!&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;LATER ADDED:&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;   God it feels so good to have both the OS in one laptop and to swtich between them easily. Anyways I found one other excellent guide to do the same as I stated above. It just uses apt-get to install vmware server. But I prefer, when you want to learn, do it by downloading package and installing it. You will learn more than you signed up for. But in future when you are just reinstalling, you can just follow the simple steps as here. (&lt;a href="http://ubuntuforums.org/showthread.php?t=183209"&gt;source&lt;/a&gt;)&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;br /&gt;&lt;name of="" directory=""&gt;&lt;codejunkie reply="" at=""&gt;&lt;ip&gt;&lt;ip&gt;&lt;/ip&gt;&lt;/ip&gt;&lt;/codejunkie&gt;&lt;/name&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-6806971110188036826?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/6806971110188036826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=6806971110188036826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/6806971110188036826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/6806971110188036826'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/04/virtual-os.html' title='Virtual OS'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-962890197215544499</id><published>2010-03-29T13:16:00.000-07:00</published><updated>2010-03-29T20:25:07.288-07:00</updated><title type='text'>Art - Love of my life</title><content type='html'>&lt;div style="text-align: justify;"&gt;         Its been a long time, I posted something non technical and about my interests. Well, the title is pretty clear about what I am gonna talk about in this post. I always had a knack for painting and all the artsy stuffs. Given that nobody in my family's been interested in art, this is something that I can proudly say I immensely enjoy learning with an open mind. As one of my art teacher told me, art is all about having an open mind and different perspective on a scene. All this started when I very badly wanted to do something for school annual day competitions. I had a friend who was very good at drawing things as such, I guess I can say I may be inspired by him. When I won the drawing competition, I felt so happy and started doing more paintings. Till now I have done quite a number of drawings and few paintings. I love&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;drawing cartoons: &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_aEbOMI5mrEY/S7FsdK4s6sI/AAAAAAAAGJ8/wVILasSOZIM/s1600/suji_drawing_2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 240px; height: 320px;" src="http://4.bp.blogspot.com/_aEbOMI5mrEY/S7FsdK4s6sI/AAAAAAAAGJ8/wVILasSOZIM/s320/suji_drawing_2.JPG" alt="" id="BLOGGER_PHOTO_ID_5454259872116566722" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Glass painting:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_aEbOMI5mrEY/S7FsqXAbeAI/AAAAAAAAGKE/zGoST00BJKE/s1600/glass_painting.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_aEbOMI5mrEY/S7FsqXAbeAI/AAAAAAAAGKE/zGoST00BJKE/s320/glass_painting.JPG" alt="" id="BLOGGER_PHOTO_ID_5454260098708502530" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Oil painting:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_aEbOMI5mrEY/S7FtJORZqsI/AAAAAAAAGKM/z-fVMWXCidw/s1600/DSC04928.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_aEbOMI5mrEY/S7FtJORZqsI/AAAAAAAAGKM/z-fVMWXCidw/s320/DSC04928.JPG" alt="" id="BLOGGER_PHOTO_ID_5454260628939713218" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Coffee painting (Monochromatic painting): &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_aEbOMI5mrEY/S7FtJbqtI3I/AAAAAAAAGKU/qZ7sewzUwT0/s1600/DSC04932.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_aEbOMI5mrEY/S7FtJbqtI3I/AAAAAAAAGKU/qZ7sewzUwT0/s320/DSC04932.JPG" alt="" id="BLOGGER_PHOTO_ID_5454260632535507826" border="0" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;And ofcourse trying out pencil shading and other stuffs.&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;  I did a lot of glass paintings in college which I gifted my friends and professors. Even last week when I talked after one year to my research professor for whom I gave a picture as our farewell gift, he said everybody loved it. These little things make me happy and content with my ability. &lt;br /&gt;   Recently since I am busy between chaffering Ovia to school and amma to shopping, working on MS projects and course work, I rarely find time to paint. But when I do, it becomes my world!!! Hope I would soon post many more of my work :)&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/476309480445609371-962890197215544499?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/962890197215544499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=962890197215544499' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/962890197215544499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/962890197215544499'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/03/art-love-of-my-life.html' title='Art - Love of my life'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_aEbOMI5mrEY/S7FsdK4s6sI/AAAAAAAAGJ8/wVILasSOZIM/s72-c/suji_drawing_2.JPG' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-3153349216945604153</id><published>2010-02-12T15:41:00.000-08:00</published><updated>2010-04-12T18:57:27.050-07:00</updated><title type='text'>How to send an email using mutt in ssh session in a Linux machine?</title><content type='html'>&lt;div style="text-align: justify;"&gt;The process is simple.&lt;br /&gt;&lt;br /&gt;1. install a ssh client in your machine. In a command line,&lt;br /&gt;"sudo apt-get install openssh-client openssh-server"&lt;br /&gt;&lt;br /&gt;Note: server is optional.&lt;br /&gt;&lt;br /&gt;2. You will need a shell account. Its available for free from &lt;a href="http://sdf.org/?telnet"&gt;sdf.org&lt;/a&gt;. Just follow the instructions printed on the applet. After creating an account, logout from that account.&lt;br /&gt;&lt;br /&gt;3. In the command line, type&lt;br /&gt;&lt;br /&gt;"ssh &lt;username&gt;@sdf.lonestar.org"&lt;/username&gt;&lt;br /&gt;&lt;username&gt;&lt;/username&gt;&lt;br /&gt;&lt;username&gt;4. The connection will prompt for the password that you configured with the sdf account. Type it in and press enter.&lt;/username&gt;&lt;br /&gt;&lt;username&gt;&lt;/username&gt;&lt;br /&gt;&lt;username&gt;5. If the password is right, you will have to configure your backspace key and then a crescent will appear and you can start typing your unix commands.&lt;/username&gt;&lt;br /&gt;&lt;username&gt;&lt;/username&gt;&lt;br /&gt;&lt;username&gt;6. For sending mail, you need to open a mail client. I am using mutt. In the command line, type&lt;/username&gt;&lt;br /&gt;&lt;username&gt;&lt;/username&gt;&lt;br /&gt;&lt;username&gt;"mutt"&lt;/username&gt;&lt;br /&gt;&lt;username&gt;&lt;/username&gt;&lt;br /&gt;&lt;username&gt;It will open the inbox. The set of controls that are available will be listed on the top. You will have to setup the /Mail folder, just enter yes and the OS will take care of it.&lt;/username&gt;&lt;br /&gt;&lt;username&gt;&lt;/username&gt;&lt;br /&gt;&lt;username&gt;7. To send a new mail, press "m" or to reply to a mail press "r". It will prompt for To: address and then Subject: After the subject, the pico text editor(may be a different editor) opens and you can type in anything you want. Then press "ctrl+o" to write it out and press "ctrl+x" to exit the editor. The screen will return to the compose mail page. Press "y" to send the message out.&lt;/username&gt;&lt;br /&gt;&lt;username&gt;&lt;/username&gt;&lt;br /&gt;&lt;username&gt;You can explore about other options like adding cc, attaching a file, replying to a group, deleting the mail as you go.&lt;/username&gt;&lt;br /&gt;&lt;username&gt;&lt;/username&gt;&lt;br /&gt;&lt;username&gt;Note: These steps are based on Ubuntu 9.10 OS. If there is a better option to anything I listed here, please share it in the comments field. Thanks in advance.&lt;/username&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-3153349216945604153?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/3153349216945604153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=3153349216945604153' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/3153349216945604153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/3153349216945604153'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/02/how-to-send-email-using-mutt-in-ssh.html' title='How to send an email using mutt in ssh session in a Linux machine?'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-1832080425888130795</id><published>2010-01-12T19:18:00.000-08:00</published><updated>2010-04-12T18:57:06.774-07:00</updated><title type='text'>String reverse in Java</title><content type='html'>&lt;div style="text-align: justify;"&gt;In SPOJ, there is a &lt;a href="https://www.spoj.pl/problems/ADDREV/"&gt;problem&lt;/a&gt; to take two integers and reverse them and find their sum and reverse the sum.&lt;br /&gt;&lt;br /&gt;The catch here is when two large integers are given. In java there is a object to help you with reverse, for deleting a char at a index in a string and lot more. It is &lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html"&gt;StringBuffer&lt;/a&gt; class.&lt;br /&gt;&lt;br /&gt;But the solutions to the problems in C takes very less time and space than Java does. I am not sure how thats possible.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-1832080425888130795?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/1832080425888130795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=1832080425888130795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1832080425888130795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1832080425888130795'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/01/string-reverse-in-java.html' title='String reverse in Java'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-7555294930778808221</id><published>2010-01-12T12:37:00.001-08:00</published><updated>2010-01-12T12:44:54.191-08:00</updated><title type='text'>Factorial and their trailing zeroes</title><content type='html'>In SPOJ, there is a &lt;a href="http://www.spoj.pl/problems/FCTRL/"&gt;problem&lt;/a&gt; to find the number of trailing zeroes in the factorial of a number. Though the question seems intimidating, the solution is rather simple.&lt;br /&gt;&lt;br /&gt;zeroes come from multiplying the number by 10. To find the number of times the factorial has been multiplied by 10, we can find the number of times 10 is a factor in the factorial expansion of the number. 5 x 2 = 10 is also possible. So instead of finding the factors of 10, we can find it for 5. All the powers of 5 like, 25,125,etc should also be considered to add number of 5 factors to the expansion.&lt;br /&gt;&lt;br /&gt;Thus, to find number of trailing zeroes, keep adding the floor of (num/power of 5) until the division is less than 1. The reason why we ignore the reminders in the factors are we need only whole factors not partial ones.&lt;br /&gt;&lt;br /&gt;For more detailed explanation see the &lt;a href="http://www.purplemath.com/modules/factzero.htm"&gt;Source&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-7555294930778808221?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/7555294930778808221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=7555294930778808221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7555294930778808221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7555294930778808221'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/01/factorial-and-their-trailing-zeroes.html' title='Factorial and their trailing zeroes'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-1116176512027706535</id><published>2010-01-11T17:57:00.000-08:00</published><updated>2010-01-11T18:04:36.307-08:00</updated><title type='text'>BitInteger Java solution for finding factorial</title><content type='html'>In SPOJ, there is a &lt;a href="http://www.spoj.pl/problems/FCTRL2/"&gt;problem&lt;/a&gt; to find factorial for numbers between 1 and 100. Though the algorithm for the problem is very easy and simple, finding the right datatype to handle the factorial of larger numbers was not so easy. But the solution is however made simple by &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html"&gt;java.math.Integer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Amazing thing about BigInteger, the number of digits that it can hold is limited by the memory of the system. It would be unfair to the rest of people who are trying to find the solution if I post the solution here but I can sure help others and save the time I spent researching on this problem.&lt;br /&gt;&lt;br /&gt;Follow this sample program: &lt;a href="http://leepoint.net/notes-java/data/numbers/60factorial.html"&gt;http://leepoint.net/notes-java/data/numbers/60factorial.htm&lt;/a&gt;&lt;a href="http://leepoint.net/notes-java/data/numbers/60factorial.html"&gt;l&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-1116176512027706535?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/1116176512027706535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=1116176512027706535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1116176512027706535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1116176512027706535'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2010/01/bitinteger-java-solution-for-finding.html' title='BitInteger Java solution for finding factorial'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-4950904468850021188</id><published>2009-02-05T00:32:00.000-08:00</published><updated>2009-02-05T08:56:56.772-08:00</updated><title type='text'>DalalBull 2009</title><content type='html'>"This story only inspired to get the Coordinator post for DalalBull next year. No matter what happens or who coordinates the event, I will make sure next year, Dalal Bull gets the spotlight right from day one. I will write about it next year."&lt;br /&gt;&lt;br /&gt;-Sujeetha (Myself) a year ago.&lt;br /&gt;&lt;br /&gt;I am glad that I could get to coordinate the onsite event this year. This year's experience was the pinnacle of all my extracurricular activities. I am talking about Dalalbull, an event in &lt;a href="http://kurukshetra.org.in/"&gt;Kurukshetra&lt;/a&gt; which is about simulation of stock market. There is both online and onsite event of Dalalbull. The online event was coordinated by shanketh, one of my classmate.I organized the onsite event. For the onsite, we had 5 organizers just like last year. 2 girls and 3 boys from same class. But this year it was from IT dept. Last year it was myself, usha, thanu, rajesh and pradep who did the organizing work. This year it was prathyusha, gayathri, ramki, rahul and ganesh. The work started by first reviewing our last year software, then fixed some bugs. The organizers this time did a wonderful job. The ultimate experience was the volunteer meet. Dalalbull, being an event which involves the maximum number of volunteers and the largest hall in college for venue, solely depends on volunteer's enthu for a good show. We arranged at 2 the meeeting in 111. But only after 2.30 some volunteers entered the hall. One person who I really should mention is dharani of second year computer science. This junior had super contacts and arranged like 100 volunteers(first and second years, both girls and boys) for the event in just one phone call(slightly exaggerated!). In the meet, I really understood the difficulty in making all 100 people listen to you. I understood the difficulites of the faculty. After the meet, I completely lost my voice but I gained confidence that I am still the same good old speaker who used to get prizes for debates and state level speech competitions.  The hall 13 where the event was supposed to take place was just getting ready for the computer installation after the Contraption event. When my hostel curfew got over, my work still continued. Myself, kalpu and abi went to first year block and conducted an informal meeting there. Then finally on first day of the event, I heard as usual the night was a nightmare for the guys.&lt;br /&gt;&lt;br /&gt;          So the day started by first setting the computers, this time we had 30 systems like last year. Some juniors helped to set up the LAN to all computers. This time there was no problem with LAN wire at all. Thanks to vishnu and the juniors. I forgot to mention about some of my friends who helped me the most in conducting this event. Abi and kalpu spent their time with me by helping me in every aspect I could think of. The onsite event had a great help from thanumalayan. For record, he is not the coordinator, but off the record he is one of the coordinator. He helped me by staying in the hall the day before the event. Thanks to vicky for arranging the lunch at the hall.&lt;br /&gt;&lt;br /&gt;       My voice was completely out by the end of the day.  Finally we had a successful event. No fight, no complaints.&lt;br /&gt;&lt;br /&gt;to be contd.........&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-4950904468850021188?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/4950904468850021188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=4950904468850021188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4950904468850021188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4950904468850021188'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2009/02/dalalbull-2009.html' title='DalalBull 2009'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-5118612885387923936</id><published>2008-12-21T02:09:00.000-08:00</published><updated>2008-12-21T02:16:00.084-08:00</updated><title type='text'>KURUKSHETRA - BATTLE BEGINS</title><content type='html'>One more year has gone by.. I could say this because the next big thing in my calendar is &lt;a href="http://kurukshetra.org.in/"&gt;KURUKSHETRA'09&lt;/a&gt;. I never believed in adage. According to me its all crap. But one thing I learnt from Kuruk is "united we stand, divided we fall". All students of our college work together to make this great event. Do check out the &lt;a href="http://kurukshetra.org.in/"&gt;website&lt;/a&gt;. Lot of online events are open.&lt;br /&gt;&lt;br /&gt;the website address is : &lt;a href="http://kurukshetra.org.in/"&gt;http://kurukshetra.org.in/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The battle begins on Jan 21st. But registerations open now !!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-5118612885387923936?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/5118612885387923936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=5118612885387923936' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/5118612885387923936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/5118612885387923936'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/12/kurukshetra-battle-begins.html' title='KURUKSHETRA - BATTLE BEGINS'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-4337202612107501671</id><published>2008-08-20T23:39:00.000-07:00</published><updated>2008-08-20T23:50:16.583-07:00</updated><title type='text'>Quine programs</title><content type='html'>A “&lt;dfn&gt;quine&lt;/dfn&gt;” (or “&lt;dfn&gt;selfrep&lt;/dfn&gt;”) is a computer program which prints its own listing. &lt;br /&gt;&lt;br /&gt;complex yet trivial code to print the own source file is&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;char *p="#include&lt;stdio.h&gt;%c%cchar *p=%c%s%c; %c%cint main(){%c%cprintf(p,13,10,34,p,34,13,10,13,10,13,10,13,10); %c%cgetch();%c%c }";&lt;br /&gt;&lt;br /&gt;int main(){&lt;br /&gt;printf(p,13,10,34,p,34,13,10,13,10,13,10,13,10);&lt;br /&gt;getch();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Lot more about this type of programming in&lt;br /&gt;&lt;a href="http://www.madore.org/%7Edavid/computers/quine.html"&gt;http://www.madore.org/~david/computers/quine.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-4337202612107501671?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/4337202612107501671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=4337202612107501671' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4337202612107501671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4337202612107501671'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/08/quine-programs.html' title='Quine programs'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-7358681261524644278</id><published>2008-06-25T16:41:00.000-07:00</published><updated>2008-06-25T17:09:08.261-07:00</updated><title type='text'>Googly Google</title><content type='html'>Well, just like everybody I was there doing my business, yes browsing through technical blogs for passing time. Trust thats one good freetime job. So I came across this blog, it has informations to help you chat well and also to write Project Management Exams.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sanjaykattimani.blogspot.com/"&gt;  http://sanjaykattimani.blogspot.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;From that blog I came across this Google's yet another invention or what ever it is, Toogle. Nice and bubbly.&lt;br /&gt;Just like Google image search, here the slight difference is the image is drawn with the search string.&lt;br /&gt;&lt;br /&gt;Speaking of searches and Google, this feature really helps you if the website you are looking for has no custom Google search.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.google.com/advanced_search"&gt;http://www.google.com/advanced_search&lt;/a&gt;&lt;br /&gt;And trust me, it gives better result than custom search.&lt;br /&gt;&lt;br /&gt;I will sure update more about Google's products.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-7358681261524644278?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/7358681261524644278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=7358681261524644278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7358681261524644278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7358681261524644278'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/06/googly-google.html' title='Googly Google'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-1922762458557843284</id><published>2008-06-25T14:44:00.000-07:00</published><updated>2008-06-25T14:50:37.386-07:00</updated><title type='text'>Intriguing Puzzles</title><content type='html'>As I am  preparing for my placements, I was on the lookout for books with puzzles to work out and to train the mind to think. I came across this book name in many forums I saw. So when I searched for this book, viola I got a pdf copy of the book online. The book name is Shakuntala- Puzzles to puzzle you. This book is recommended for anybody who is looking forward to Infosys interviews.&lt;br /&gt;&lt;br /&gt;P.S : solutions are at pg.89&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.scribd.com/doc/2052493/Devi-ShakuntalaPuzzles-To-Puzzle-You"&gt;http://www.scribd.com/doc/2052493/Devi-ShakuntalaPuzzles-To-Puzzle-You&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-1922762458557843284?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/1922762458557843284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=1922762458557843284' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1922762458557843284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1922762458557843284'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/06/intriguing-puzzles.html' title='Intriguing Puzzles'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-4165264882244628056</id><published>2008-06-12T14:42:00.000-07:00</published><updated>2008-06-12T15:12:40.145-07:00</updated><title type='text'>Puzzles</title><content type='html'>Interesting how these puzzles make your mind fresh. Anyways, I am right now in a puzzle solving spree.. So I was searching for some websites with puzzles .. and found an excellent website, where I can learn and think,&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.allexperts.com/q/Puzzle-Solving-1841/"&gt;http://en.allexperts.com/q/Puzzle-Solving-1841/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Trust me, this is good. I am going to blog down the supporting theorems and techniques for later reference.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Bayes Theorem:&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;P(A|B) = P(AnB)/P(B)&lt;br /&gt;&lt;br /&gt;P(A|B) - conditional probability. Probability of A happening given B has happened.&lt;br /&gt;P(A) &amp;amp; P(B)  - prior probability.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Multiplication tricks:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;Multiplication of two digit number by 11:&lt;br /&gt;        &lt;/span&gt;The result will be the first digit, sum of the two digit and the second digit of the given number.&lt;br /&gt;Eg: 4_2 is the two digit number. The result would be  462, where 6 is sum of first (4) &amp;amp; second(2) digit.&lt;br /&gt;Given 4_8, the result would be 528, since when we add 4+8= 12 add 1 to first digit, and follow the rule above.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Multiplication of any number by 5:&lt;/span&gt;&lt;br /&gt;       *Divide the number by 2&lt;br /&gt;       *If there is a remainder, add 5 to the answer. Else, add 0 to the remainder.&lt;br /&gt;Eg: 246 * 5 :&lt;br /&gt;246/2 = 123 (no remainder)&lt;br /&gt;So result would be 1230.&lt;br /&gt;&lt;br /&gt;Say, given 235 * 5:&lt;br /&gt;235/2 = 117(there is a remainder)&lt;br /&gt;so result will be 1175.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Division Techniques:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Divisible by 4, 8,16:&lt;/span&gt;&lt;br /&gt;       Any number  is divisible by 4, only if the last 2 digits of the number are divisible by 4. Similarly for 8 and 16, the last 3 and 4 digits should be considered.&lt;br /&gt;Eg:&lt;br /&gt;5632 is divisible by 4, since 32 is divisible by 4.&lt;br /&gt;It is also divisible by 8, since 632 is divisible by 8.&lt;br /&gt;It is also divisible by 16, since 5632 is divisible by 16.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Divisible by 3,9:&lt;/span&gt;&lt;br /&gt;        A number is divisible by 3 only if the sum of its digit is divisible by 3. Similarly for 9, the sum of digits should be divisible by 9.&lt;br /&gt;Eg:&lt;br /&gt;  23541 is divisible by 3, since 2+3+4+5+1 = 15 is divisible by 3.&lt;br /&gt;  334242 is divisible by 9, since 3+3+4+2+4+2=18 is divisible by 9.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Divisible by 11: &lt;/span&gt;&lt;br /&gt;     A number is divisible by 11, only if the difference between the sum of its digit in the odd places and the sum of its digit in the even places are either 0 or a number divisible by 11.&lt;br /&gt;Eg:&lt;br /&gt;4832718 is divisible by 11. Since (8+7+3+4) - (1+2+8) = 22 - 11 = 11 divisible by 11.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-4165264882244628056?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/4165264882244628056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=4165264882244628056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4165264882244628056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4165264882244628056'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/06/puzzles.html' title='Puzzles'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-1123499866227571518</id><published>2008-06-11T15:39:00.000-07:00</published><updated>2008-08-21T00:32:33.665-07:00</updated><title type='text'>To calculate day of the week</title><content type='html'>When I was reading through some placement question papers, I found this problem asked quite a few times.&lt;br /&gt;Q: Given a date, we have to find out the day of the week.&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;﻿&lt;span style="font-size:100%;"&gt;1) C = 2(3-(cent%4))&lt;br /&gt;&lt;/span&gt;﻿&lt;span style="font-size:100%;"&gt;where cent = first 2 digits of the century&lt;br /&gt;2) y = year + floor(year/4)&lt;br /&gt;where year = last two digits of the year given&lt;br /&gt;3)m = choose from the table&lt;br /&gt;&lt;table border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Month&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; January &lt;/td&gt; &lt;td&gt;0(leap year-3)&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; Febuary &lt;/td&gt; &lt;td&gt;3(leap year-6)&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; March &lt;/td&gt; &lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; April &lt;/td&gt; &lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; May &lt;/td&gt; &lt;td&gt;1&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; June &lt;/td&gt; &lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; July &lt;/td&gt; &lt;td&gt;6&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; August &lt;/td&gt; &lt;td&gt;2&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; September &lt;/td&gt; &lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; October &lt;/td&gt; &lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; November&lt;/td&gt; &lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;td&gt; December&lt;/td&gt; &lt;td&gt;5&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;4)sum = c + y + m + date given&lt;br /&gt;5)val = sum%7&lt;br /&gt;6) sun - 0,mon-1,tue-2,... sat - 6, use value and find the day&lt;br /&gt;&lt;br /&gt;Sample program:&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt;int leapyearMonValue[] = {0,3,3,6,1,4,6,2,5,0,3,5};&lt;br /&gt;int nonleapyearMonValue[] = {3,6,3,6,1,4,6,2,5,0,3,5};&lt;br /&gt;&lt;br /&gt;void calculateDay(int date,int mon,int year)&lt;br /&gt;{&lt;br /&gt;     int val,cent,monval,yr,i=3,temp,leapyear=0;&lt;br /&gt;     int splitcent[4],wrongInput=0;&lt;br /&gt;     if(year%4 == 0)&lt;br /&gt;       leapyear = 1;&lt;br /&gt;     if(mon&gt;12 || mon &lt;1)&lt;br /&gt;      wrongInput = 1;&lt;br /&gt;     if(date==30 &amp;amp;&amp;amp; !(mon%2) || mon==7 || mon==1)&lt;br /&gt;        wrongInput = 1;&lt;br /&gt;     if(mon==2 &amp;amp;&amp;amp; date&gt;28 &amp;amp;&amp;amp; !leapyear)&lt;br /&gt;        wrongInput = 1;&lt;br /&gt;     if(!wrongInput)&lt;br /&gt;     {&lt;br /&gt;     while(year)&lt;br /&gt;     {&lt;br /&gt;                splitcent[i--] = year%10;&lt;br /&gt;                year = year/10;&lt;br /&gt;     }&lt;br /&gt;     temp = splitcent[0]*10 + splitcent[1];&lt;br /&gt;     cent = 2*(3-(temp%4));&lt;br /&gt;     temp = splitcent[2]*10 + splitcent[3];&lt;br /&gt;     yr = temp + floor(temp/4);&lt;br /&gt;     if(leapyear)&lt;br /&gt;                 monval = leapyearMonValue[mon-1];&lt;br /&gt;     else&lt;br /&gt;                 monval = nonleapyearMonValue[mon-1];&lt;br /&gt;     val = cent + yr + monval + date;&lt;br /&gt;     val = val%7;&lt;br /&gt;     switch(val)&lt;br /&gt;     {&lt;br /&gt;                case 0:&lt;br /&gt;                     {&lt;br /&gt;                              printf("day is Sunday\n");&lt;br /&gt;                              break;&lt;br /&gt;                     }&lt;br /&gt;                case 1:&lt;br /&gt;                     {&lt;br /&gt;                              printf("day is Monday\n");&lt;br /&gt;                              break;&lt;br /&gt;                     }&lt;br /&gt;               case 2:&lt;br /&gt;                     {&lt;br /&gt;                              printf("day is Tuesday\n");&lt;br /&gt;                              break;&lt;br /&gt;                     }&lt;br /&gt;               case 3:&lt;br /&gt;                     {&lt;br /&gt;                              printf("day is Wednesday\n");&lt;br /&gt;                              break;&lt;br /&gt;                     }&lt;br /&gt;               case 4:&lt;br /&gt;                     {&lt;br /&gt;                              printf("day is Thursday\n");&lt;br /&gt;                              break;&lt;br /&gt;                     }&lt;br /&gt;               case 5:&lt;br /&gt;                     {&lt;br /&gt;                              printf("day is Friday\n");&lt;br /&gt;                              break;&lt;br /&gt;                     }&lt;br /&gt;               case 6:&lt;br /&gt;                     {&lt;br /&gt;                              printf("day is Saturday\n");&lt;br /&gt;                              break;&lt;br /&gt;                     }&lt;br /&gt;               default:&lt;br /&gt;                              printf("wrong calculation\n");&lt;br /&gt;     }&lt;br /&gt;     }&lt;br /&gt;     else&lt;br /&gt;      printf("wrong Input... check the date, mon \n");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;    int date,mon,year;&lt;br /&gt;    printf("Enter the date in format DD/MM/YYYY\t eg: 14/11/2007\n");&lt;br /&gt;    scanf("%d/%d/%d",&amp;amp;date,&amp;amp;mon,&amp;amp;year);&lt;br /&gt;    calculateDay(date,mon,year);&lt;br /&gt;    getch();&lt;br /&gt;    return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Courtesy:&lt;a href="http://en.wikipedia.org/wiki/Calculating_the_day_of_the_week"&gt;&lt;br /&gt;Wikipedia&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-1123499866227571518?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/1123499866227571518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=1123499866227571518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1123499866227571518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1123499866227571518'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/06/to-calculate-day-of-week.html' title='To calculate day of the week'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-4129822911147289496</id><published>2008-05-27T15:50:00.000-07:00</published><updated>2008-05-28T12:43:58.858-07:00</updated><title type='text'>Basic Unix Commands</title><content type='html'>Some commands were practiced in the lab. So since this is just for future brush up during interviews it will have only extra features, basic features I have to try and remember.&lt;br /&gt;&lt;br /&gt;Very effective:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;chmod &lt;/span&gt;- changes permission for directories/files. eg: chmod ugo+r+w+x filename -  gives u-user,g-group,o-others the permission to read(r),write(w) and execute(x). For directory, execute permission is required.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;ls&lt;/span&gt; - list files in the directory. The options most commonly used are -l which is to print file list with permissions, time modified, user details and the other option -a prints all files including the . and .. directories.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;ff&lt;/span&gt; - find files. This command is used to search for a file throughout all available directories.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;diff&lt;/span&gt; - The command which is really unique to unix. This command compares the two files and prints the differences with line numbers.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;| - &lt;/span&gt;pipe. This allows commands to be combined.&lt;/li&gt;&lt;/ul&gt;Very Basic:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; cp -  copy command. This copies file from one location/one name to other location/another name.&lt;/li&gt;&lt;li&gt;mv - move command. This moves/changes file location or name respectively. One had to be careful, 'cause this results in deletion of the original file.&lt;/li&gt;&lt;li&gt;cd - change directory. When typed with no argument, it takes to home directory.&lt;/li&gt;&lt;li&gt; pwd - current working directory.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;wc - word count. The order is lines,words and characters.&lt;/li&gt;&lt;li&gt;gzip &amp;amp; gunzip - compression/decompression of files.&lt;/li&gt;&lt;li&gt;finger - cmd to print details about user. Finger protocol (network).&lt;/li&gt;&lt;li&gt;telnet, ftp, rlogin - used for connecting to outer hosts.&lt;/li&gt;&lt;li&gt;kill - kills process forcibly&lt;/li&gt;&lt;li&gt;ps - lists the process run by you.&lt;/li&gt;&lt;li&gt;du - prints disk usuage.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-4129822911147289496?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/4129822911147289496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=4129822911147289496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4129822911147289496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4129822911147289496'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/05/basic-unix-commands.html' title='Basic Unix Commands'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-4805466074125252665</id><published>2008-05-19T15:58:00.000-07:00</published><updated>2008-05-19T16:07:39.646-07:00</updated><title type='text'>Placement Preparation</title><content type='html'>&lt;p&gt;Phew!!!! Exams are over, now starts the amazing race towards my own cubicle somewhere in a company. For starters, its placement preparation time. Right now I am enjoying and also studying which is a lethal combination.With this introduction, I am going to blog down all my materials for later references. First day, we are starting with Algorithms.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;When we say algorithm, we have tons for everything.So I am going to start learning the basic algorithms first. I am reading from planetmath.org. Its really good. So much technicality and maths are there.&lt;br /&gt;&lt;br /&gt;Today(day 1) I read about &lt;a href="http://planetmath.org/?op=getobj&amp;amp;from=objects&amp;amp;name=SelectionSort"&gt;selection sort&lt;/a&gt;,&lt;a href="http://planetmath.org/encyclopedia/BinarySearch.html"&gt;binary search&lt;/a&gt;,&lt;a href="http://planetmath.org/encyclopedia/InsertionSort.html"&gt;insertion sort&lt;/a&gt;,&lt;a href="http://planetmath.org/?op=getobj&amp;amp;from=objects&amp;amp;name=Bubblesort"&gt;bubble sort&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-4805466074125252665?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/4805466074125252665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=4805466074125252665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4805466074125252665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/4805466074125252665'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/05/placement-preparation.html' title='Placement Preparation'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-7609334258170999141</id><published>2008-04-06T01:47:00.000-07:00</published><updated>2008-04-06T02:06:41.300-07:00</updated><title type='text'>Intel Internship Interview</title><content type='html'>I got shortlisted for Intel Internship from out of 116 people who initially submitted their resume with CUIC(Centre for University Industry Collaboration). The interviewer told us he selected those resumes that were different ,interesting and got his attenation, when asked. We knew the shortlisted candidates are going to write some test initially and then the face interview which is on some other day. But the shortlisted teams were asked to come the same day for face interview.  We had to run from the lab which was still 12.10 to the CUIC for interview. I was the first person to be interviewed. My first personal interview, I should say, was really great. I was not at all frightened which my seniors told me that we would be. I was really freaking out in the interview place. The interviewer finally told me he found me really good. But since I was the first person, he told the results would be relative. So I guess the 2 students who got selected did well when compared to me. I was upset at first, then encouragement from my family and friends, gave me this new short term goal, to get a internship offer from the next company be whatever it is. I am going to attend all the interviews and going to be busy this summer. I will sure, write about the next experience soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-7609334258170999141?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/7609334258170999141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=7609334258170999141' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7609334258170999141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7609334258170999141'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/04/intel-internship-interview.html' title='Intel Internship Interview'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-7536873425202441860</id><published>2008-04-05T23:54:00.000-07:00</published><updated>2008-04-06T00:48:21.781-07:00</updated><title type='text'>Kurukshetra '08 - Dalal Bull :)</title><content type='html'>Well what can I say about Kurukshetra '08. It was a huge success. Its just the second year but it had reached all corners of India. After coming to college, the day I felt really proud about myself was the two days I spent with my Dalal Bull team. I dont know I had this urge to work for kuruk and as per the saying "where there is a will , there is a way", I got lot of works. First thing that happened was the Website creation job. One day Bhuvana and Suki stormed into my room and told me they wanted some people for website creation. Since I had no prior experience  in website creation, I was little hesitant, then what the heck man, If you dont learn in college when are you going to learn ah? So enrolled my name and we all 6 rolled our sleeves and entered the web desinging world. We spent like a month and every weekend formal meetings to discuss about the progress was held(:D). 6 were divided into 3 teams of 2. My partner was Subashini, who is working with me in almost all projects till now. The final work gained many appreciations from seniors. When they hosted it, we were all flying in the sky. Then came the maketing work, we worked under Niranchana 4th year ECE. We have to call up the list of students given to us and explain them about kurukshetra and to ask some questions and to get some feedback. It was so nice talking to new people like professionals ha ha.. but hey its my second job. Then came the final bonanza, the organising post for the prestigious, DALAL BULL. In the first year Kurukshetra, I volunteered in Dalal Bull, all the 3 days I saw no event than this. The second year I planned to visit all programmes. One day my classmates Rajesh and Thanumalayan, asked me to assist them to organise the onsite Dalal Bull event. I was so excited about it and spent some quality time with the team. Our event was to take place on 2nd and 3rd day.&lt;br /&gt;              Okay the day before the first day of Dalal Bull, our coordinator, 4th year mechanical,Kapilesh called all three of us and showed us the venue ie hall no 13 where the computers and LAN has been set up. Rajesh and Thanu has to remain there and install softwares ie PHP and set up the server, since my hostel closes by 9, I came bidding them aideu. Thanu asked me to get some backup softwares the next day , I was to come by 7.30 in the morning to the venue and relieve the others.  The next day morning I got some 12 missed calls and messages asking me to come immediately to the hall with windows XP cd, php Xampp installation cd. I called them and found out that the server had windows vista and Xampp is not properly installed in vista. Then I rushed off and found the night was a mess for the boys.&lt;br /&gt;                   While Thanu went home to get his computer and Rajesh to find some xp system from hostel, I was trying to install Xampp in vista. By simply changing the drive from C to D. The Xampp was up and running in no time. We had some nice laughs afterwards and some appreciation from seniors. That felt good.&lt;br /&gt;                 The LAN wires were old, but the person assured it will work. When the event started, initially everything went so smooth, that we had no work and were sitting simply overviewing the server activities and the database entries. Then after 3 or 4 hours, everything started to create problem the projector's LAN wire got stomped so had to find new one for that, the server got disconnected from the LAN.  But overall the first day had some ups and downs. The ups were there was some 700 to 800 registerations for the event.  Really huge turn out at the hall. Volunteers (first and second years) had to work some extra shifts to operate the computers and to manage the crowd.&lt;br /&gt;                     The second day, same 7.30 but no problem with server this time but with the projector again and its LAN wire. Second day was hectic and everybody got tired pretty soon. But finally the utlimate comedy was the final 1 hour of the game. There was some sudden change in the normal flow and a CEGian got first in the game.  Some people started disagreeing with this, but coordinator solved the problem smoothly.&lt;br /&gt;                    Seniors again gave nice comments about our work. The entire experience gained from the two days was Really a great one.  This story only inspired to get the Coordinator post for DalalBull next year. No matter what happens or who coordinates the event, I will make sure next year, Dalal Bull gets the spotlight right from day one. I will write about it next year.&lt;br /&gt;&lt;br /&gt;Kurukshetral Terms:&lt;br /&gt;      Core -  10 decision heads of Kurukshetra Team, these decision makers are first in hierarchy.(always the 4th years. the selection process is crucial, I am not interested in this positon)&lt;br /&gt;    Coordinator -  For an event, Coordinator is like core and does all decision making. (usually 4th years. I am so much into getting this positon for Dalal Bull next year)&lt;br /&gt;   Organiser -  For an event, Organisers are the workers. We are responsible to write the software and to handle the crisis. (I have been this and had a quality experience)&lt;br /&gt;   DalalBull -  simulation of stock market. There was both online and onsite event. I organised the onsite event.&lt;br /&gt;   Volunteers -  The people who helps all the above personnels. (I have been this and enjoyed working )&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-7536873425202441860?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/7536873425202441860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=7536873425202441860' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7536873425202441860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7536873425202441860'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/04/kurukshetra-08-dalal-bull.html' title='Kurukshetra &apos;08 - Dalal Bull :)'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-1675826356668689180</id><published>2008-02-17T00:29:00.000-08:00</published><updated>2008-02-18T06:53:21.336-08:00</updated><title type='text'>Microsoft Intern question paper</title><content type='html'>&lt;p&gt;Well I attended Microsoft Internship written test. The question paper was um..okay. They concentrated more on concepts. The "reading between lines" concept was requried to answer all the questions. We were asked to register first, then assemble for a presentation. The presentation was done by a microsoft personnel (dint tell us his name). There were around 400 students from all over tamilnadu. The written test was conducted for around 2500 students alround India. The presentation was about MS's 3 teams for which the internship program was conducted. They were&lt;/p&gt;&lt;ul&gt;&lt;li&gt;MS IT global team&lt;/li&gt;&lt;li&gt;MS consulting&lt;/li&gt;&lt;li&gt;MS IDC(Indian Develvopment Center)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The test started at 11.10 am exactly. The question paper was divided into sections. There were 5 sections. Each section was alloted timings based on I guess.. Importance. The 5 sections were(in order)&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Analytical&lt;/li&gt;&lt;li&gt;Software Engineering&lt;/li&gt;&lt;li&gt;C and C++ programming&lt;/li&gt;&lt;li&gt;Operating System concepts&lt;/li&gt;&lt;li&gt;RDBMS&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The question paper for next section is given only after collecting the previous section's paper. The questions were asked to test our understanding level and how well we learnt concepts rather than how we mugged up. Sample questions are:&lt;/p&gt;&lt;p&gt;Analytical:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Assign a 6 letter code for employees of a company. A-E(5) characters and 0 - 9(10) digits are to be used, whereas first 3 letters are characters and others are digits. Find the proability that all 3 characters are the same. &lt;/li&gt;&lt;li&gt;Given a pie chart find the corresponding number of people... etc.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Operating system:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;In deadlock prevention, hold and wait can be avoided by which protocol. There are 2 protocols and both were given as options. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;C and C++ programming:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Enumeration is an Userdefined datatype.&lt;/li&gt;&lt;li&gt;List is used instead of array and is preferred when &lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;For sequential access.&lt;/li&gt;&lt;li&gt;For random access and some more options. &lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;The default access specifier for inheritance in C++ is ......&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-1675826356668689180?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/1675826356668689180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=1675826356668689180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1675826356668689180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1675826356668689180'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/02/microsoft-intern-question-paper.html' title='Microsoft Intern question paper'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-6619564745295603067</id><published>2008-02-11T22:34:00.000-08:00</published><updated>2008-02-11T23:14:15.973-08:00</updated><title type='text'>Struct &amp;&amp; Union</title><content type='html'>STRUCTURE:&lt;br /&gt;&lt;br /&gt;    A structure is a group of items in which each item can be refrenced with its own identifier and such item is called "member" of the structure. Aka record and field of the reord sometimes.&lt;br /&gt;&lt;br /&gt;Matter-of-fact details:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    For declaring structures, there are 3 methods &lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;struct { //members }struct_varname;&lt;/li&gt;&lt;li&gt;struct struct_tag {//members} ;    struct struct_tag   struct_varname;    &lt;/li&gt;&lt;li&gt;typedef struct {//members} TYPENAME;  TYPENAME varname;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;the typedef declaration sometimes used to achieve the flavor of ADT specification within a C program.&lt;/li&gt;&lt;li&gt;A member of structure may be declared to another structure. Eg: struct var1{  struct var2; struct var3; };&lt;/li&gt;&lt;li&gt;ANSI standard C allows assignment of structures of the same type. But the original C developed by Kernighan and Ritchie doesnt allow this type of assignment but the field wise assignment.&lt;/li&gt;&lt;li&gt;Two structures cannot be compared for equality in a single operation in C.&lt;/li&gt;&lt;li&gt;Same identifier can be reused to name members of different structures. No ambiguity caused because while refrencing, the memeber name is followed by the structure name.&lt;/li&gt;&lt;li&gt;Amount of memory specified by the structure is the sum of the storage specified by the members of the structure.&lt;/li&gt;&lt;li&gt;There are boundary restrictions in some system. For eg: if there is a member of integer, it will start from memory location which is divisible by 4 (assuming integer occupies 4 bytes).&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;UNION:&lt;/p&gt;&lt;p&gt;     C allows another type of structure, the &lt;strong&gt;union, &lt;/strong&gt;which permits a variable to be interpreted in several different ways.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-6619564745295603067?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/6619564745295603067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=6619564745295603067' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/6619564745295603067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/6619564745295603067'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/02/struct-union.html' title='Struct &amp;&amp; Union'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-1455588840581901344</id><published>2008-02-11T12:38:00.000-08:00</published><updated>2008-02-11T12:52:39.444-08:00</updated><title type='text'>SPOJ Techniques</title><content type='html'>&lt;p&gt;SPOJ online judge is one of the judges which is used by many of the college students. So far only few problems are solved, many techniques have been learned from mistakes. When the solution is submitted the judge gives the result in code. The code has to be interpreted as follows:&lt;br /&gt;&lt;br /&gt;1. AC - accepted - your program ran successfully and gave a correct answer&lt;br /&gt;&lt;br /&gt;2. WA - wrong answer - your program ran successfully, but gave an incorrect answer&lt;br /&gt;&lt;br /&gt;3. TLE - time limit exceeded - your program was compiled successfully, but it didn't stop before time limit&lt;br /&gt;&lt;br /&gt;4. CE - compilation error - your program couldn't be compiled; compiler's errors can be seen from www and are sent via mail if your preferences say so; note: only some languages can give CE, syntax errors in intrerpreted languages can lead to WA (Python - no pre-checking syntax or Perl - CE only afer a basic syntax check)&lt;br /&gt;&lt;br /&gt;5. RE - runtime error - your program was compiled succesfully, but it exited with an error; possible codes are:&lt;br /&gt;- SIGSEGV (signal 11) - most common, "segmentation fault"&lt;br /&gt;- SIGXFSZ (signal 25) - "output limit exceeded"&lt;br /&gt;- SIGFPE (signal 8) - "floating point error", like division by zero, etc.&lt;br /&gt;- SIGABRT (signal 6) - raised by the program itself; C++ STL does it under some conditions&lt;br /&gt;- NZEC (non-zero exit code) - helps telling crash from WA with interpreted languages&lt;br /&gt;- other - there are other signals which can cause program to terminate, all remaining are shown as other&lt;br /&gt;&lt;br /&gt;problems solved: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;    &lt;a href="http://www.spoj.pl/problems/CANDY/"&gt;CANDY&lt;/a&gt;&lt;/li&gt;&lt;li&gt;    &lt;a href="http://www.spoj.pl/problems/TEST/"&gt;Life, the Universe, and Everything&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; In the future, the techniques for string manipulation with code will be updated :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-1455588840581901344?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/1455588840581901344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=1455588840581901344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1455588840581901344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1455588840581901344'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/02/spoj-techniques.html' title='SPOJ Techniques'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-629973762932346840</id><published>2008-02-11T11:57:00.000-08:00</published><updated>2008-02-11T12:46:15.001-08:00</updated><title type='text'>DataStructures</title><content type='html'>DATA TYPE:&lt;br /&gt;A method of interpreting a bit pattern.&lt;br /&gt;&lt;br /&gt;ABSTRACT DATA TYPES:&lt;br /&gt;Tool for specifying the logical properties of the datatype. Its java counterpart is interface. It declares the methods,but the implementation details are not mentioned and can be changed according to the context of the class that implements the interface. Hence here, it defines the logical properties abstractly.&lt;br /&gt;Eg: For array,&lt;br /&gt;&lt;br /&gt;ADT definitions:&lt;br /&gt;&lt;br /&gt;abstract typedef &lt;&lt;eltype,ub&gt;&gt; array(ub,eltype);&lt;br /&gt;condition type(ub) == int;&lt;br /&gt;&lt;br /&gt;This specifies that array in C will have two arguments one is ub(upper bound) and the other is eltype(element type). Upper bound is specified to allocate that many number of contiguous memory locations. The element type specifies which type of element each mem. location is going to hold.&lt;br /&gt;This can be extended to other language array representation with some details. For eg in Pascal, int arr[-3..10] specifies both upper bound and lower bound for the array along with eltype of int. Thus ADT would be sth like&lt;br /&gt;&lt;br /&gt;abstract typedef &lt;&lt;eletype,lb,up&gt;&gt; array(lb,up,eletype);&lt;br /&gt;condition type(ub) &amp;amp;&amp;amp; type(lb) == int;&lt;br /&gt;&lt;br /&gt;DATASTRUCTURES:&lt;br /&gt;&lt;br /&gt;COMPOSITE OR STRUCTURED DATATYPES:&lt;br /&gt;These are made up of simpler data structures. One such datatype is array.&lt;br /&gt;&lt;br /&gt;ARRAY:&lt;br /&gt;Array is a finite ordered set of homogeneous elements.&lt;br /&gt;&lt;br /&gt;finite: Only finite no. of elements can be stored in an array.&lt;br /&gt;ordered set: the elements are arranged.&lt;br /&gt;homogeneous: may contain one datatype or the other but not the both.&lt;br /&gt;&lt;br /&gt;we know in C, int a[10] declares a continuous memory locations starting from a till a+10*sizeof(int). The base (a) is a pointer to the starting location of the array. The disadvantage of the array is that it contains homogeneous elements. But it the simplest form of storing large value.&lt;br /&gt;Another disadvantage interms of efficiency, while dealing with large number of inputs, the insertion and delete all are difficult or atleast will not be efficient.Mutlidimensional arrays are viewed as single dimensional arrays stacked together. The array can be represented as row-major representation where a[2][1] is represented as,&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; --------&lt;br /&gt;|a[0][0] |&lt;br /&gt; --------&lt;br /&gt;|a[0][1] |&lt;br /&gt; --------&lt;br /&gt;|a[1][0] |&lt;br /&gt; --------&lt;br /&gt;|a[1][1] |&lt;br /&gt; --------&lt;br /&gt;|a[2][0] |&lt;br /&gt; --------&lt;br /&gt;|a[2][1] |&lt;br /&gt; ---------&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-629973762932346840?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/629973762932346840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=629973762932346840' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/629973762932346840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/629973762932346840'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/02/datastructures.html' title='DataStructures'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-5949262747720762620</id><published>2008-02-11T11:25:00.000-08:00</published><updated>2011-06-17T17:55:37.774-07:00</updated><title type='text'>I am BACK!!</title><content type='html'>Back after a long time. Got lot of things to pour in. Things swamped in&lt;br /&gt;the first in, first out fashion.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.google.co.in/intl/en/productprodigy/"&gt;&lt;strong&gt;Google's Product Prodigy Competition&lt;/strong&gt; &lt;/a&gt;:&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="left"&gt;Though we dint make it into the &lt;a href="http://www.google.co.in/intl/en/productprodigy/shortlisted.html"&gt;shortlisted teams&lt;/a&gt;, the experience was a piece of cake. Sitting around the table as in meetings(though haven't seen real meetings, I have picture of it from the films), discussing the pros and cons of every idea about the product gave us real insight into the product development details. Our product was Green Paper. Not to be confused with the &lt;a href="http://en.wikipedia.org/wiki/Green_paper"&gt;Green paper&lt;/a&gt;- government's tentative report. Our aim was all about going paperless by providing secure storage and cataloging of receipts and documents online and sharing them with anyone who has internet connection. The motive behind the product is the complete digitization of paper receipts and documents which in turn reduces vast consumption of papers thereby contributing to a greener environment. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;a href="https://docs.google.com/View?id=dgnhr9kp_118d67j5bcb&amp;amp;pli=1"&gt;Link&lt;/a&gt; to our paper.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.tgmc.in/"&gt;TGMC'07&lt;/a&gt;:&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;The project was not completed due to certain unforeseen situations. Similarly here, experience was a gain.&lt;/p&gt;&lt;a href="https://docs.google.com/View?id=dgnhr9kp_62gkqwtt"&gt;Link&lt;/a&gt; to our paper. &lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-5949262747720762620?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/5949262747720762620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=5949262747720762620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/5949262747720762620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/5949262747720762620'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2008/02/i-am-back.html' title='I am BACK!!'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-9193193723816043230</id><published>2007-09-14T09:01:00.000-07:00</published><updated>2007-09-14T09:09:21.204-07:00</updated><title type='text'>5th Sem Projects</title><content type='html'>The 5th sem is going to be hectic and fun( i guess). Because lots of projects and lots of work but no time. The projects signed in for this semester are&lt;br /&gt;&lt;ul&gt;&lt;li&gt;TGMC IBM 2007, The Great Mind Challenge, is all about database management and implementation of IBM tools. &lt;/li&gt;&lt;li&gt;Product Prodigy, Google. This is all about ideas and conceptualism. The inspiring quote given in the google poster was "Once upon a time, Google was just an idea. Tell us yours". &lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;To find more about the projects:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.tgmc.in/"&gt;TGMC IBM 07&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.google.co.in/intl/en/productprodigy/"&gt;ProductProdigy,Google&lt;/a&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-9193193723816043230?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/9193193723816043230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=9193193723816043230' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/9193193723816043230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/9193193723816043230'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/09/5th-sem-projects.html' title='5th Sem Projects'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-7197382715292211738</id><published>2007-08-20T08:49:00.000-07:00</published><updated>2007-08-20T09:01:44.016-07:00</updated><title type='text'>Networks Lab Excercises</title><content type='html'>&lt;span style="font-size:180%;"&gt;FTP:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The FTP (File Transfer Protocol) utility program is commonly used for copying files to and from other computers. These computers may be at the same site or at different sites thousands of miles apart. FTP is a general protocol that works on UNIX systems as well as a variety of other (non-UNIX) systems.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For the purposes of this Web page, the local machine refers to the machine you are initially logged into, the one on which you type the ftp command. The remote machine is the other one, the one that is the argument of the ftp command.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A user interface for the standard File Transfer Protocol for ARPANET, FTP acts as an interpreter on the remote machine. The user may type a number of UNIX-like commands under this interpreter to perform desired actions on the remote machine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Most operating systems and communication programs now include some form of an FTP utility program, but the commands differ slightly between them. The following explanations and alphabetical list of commands refers to the common FTP utility program as provided on a UNIX machine. Check the documentation for your own machine to determine the comparable commands.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Most computers today include a windows-based type FTP program that is more PC-oriented and does not require full knowledge of these commands.&lt;br /&gt;You can also perform FTP through a browser. For example, bring up Internet Explorer and type in&lt;br /&gt;ftp://yourLoginName@IPaddress&lt;br /&gt;&lt;br /&gt;instead of a normal web page URL.&lt;br /&gt;&lt;br /&gt;The FTP site of the Computer Science department at CSU requires the user to use sftp, the secure version of FTP. Just type sftp instead of ftp, when you are using FTP in a terminal window.&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;Getting Started&lt;br /&gt;To connect your local machine to the remote machine, type&lt;br /&gt;ftp machinename&lt;br /&gt;&lt;br /&gt;where machinename is the full machine name of the remote machine, e.g., purcell.cs.colostate.edu. If the name of the machine is unknown, you may type&lt;br /&gt;&lt;br /&gt;ftp machinennumber&lt;br /&gt;&lt;br /&gt;where machinennumber is the net address of the remote machine, e.g., 129.82.45.181. In either case, this command is similar to logging onto the remote machine. If the remote machine has been reached successfully, FTP responds by asking for a loginname and password.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When you enter your own loginname and password for the remote machine, it returns the prompt&lt;br /&gt;ftp&gt;&lt;br /&gt;&lt;br /&gt;and permits you access to your own home directory on the remote machine. You should be able to move around in your own directory and to copy files to and from your local machine using the FTP interface commands given on the following page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Anonymous FTP&lt;br /&gt;At times you may wish to copy files from a remote machine on which you do not have a loginname. This can be done using anonymous FTP.&lt;br /&gt;&lt;br /&gt;When the remote machine asks for your loginname, you should type in the word anonymous. Instead of a password, you should enter your own electronic mail address. This allows the remote site to keep records of the anonymous FTP requests.&lt;br /&gt;&lt;br /&gt;Once you have been logged in, you are in the anonymous directory for the remote machine. This usually contains a number of public files and directories. Again you should be able to move around in these directories. However, you are only able to copy the files from the remote machine to your own local machine; you are not able to write on the remote machine or to delete any files there.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Common FTP Commands&lt;br /&gt;&lt;br /&gt;? to request help or information about the FTP commands&lt;br /&gt;ascii to set the mode of file transfer to ASCII&lt;br /&gt;(this is the default and transmits seven bits per character)&lt;br /&gt;binary to set the mode of file transfer to binary&lt;br /&gt;(the binary mode transmits all eight bits per byte and thus provides less chance of a transmission error and must be used to transmit files other than ASCII files)&lt;br /&gt;bye to exit the FTP environment (same as quit)&lt;br /&gt;cd to change directory on the remote machine&lt;br /&gt;close to terminate a connection with another computer&lt;br /&gt;close brubeck closes the current FTP connection with brubeck,&lt;br /&gt;but still leaves you within the FTP environment.&lt;br /&gt;delete to delete (remove) a file in the current remote directory (same as rm in UNIX)&lt;br /&gt;get to copy one file from the remote machine to the local machine&lt;br /&gt;get ABC DEF copies file ABC in the current remote directory to (or on top of) a file named DEF in your current local directory.&lt;br /&gt;get ABC copies file ABC in the current remote directory to (or on top of) a file with the same name, ABC, in your current local directory.&lt;br /&gt;help to request a list of all available FTP commands&lt;br /&gt;lcd to change directory on your local machine (same as UNIX cd)&lt;br /&gt;ls to list the names of the files in the current remote directory&lt;br /&gt;mkdir to make a new directory within the current remote directory&lt;br /&gt;mget to copy multiple files from the remote machine to the local machine;&lt;br /&gt;you are prompted for a y/n answer before transferring each file&lt;br /&gt;mget * copies all the files in the current remote directory to your current local directory, using the same filenames. Notice the use of the wild card character, *.&lt;br /&gt;mput to copy multiple files from the local machine to the remote machine;&lt;br /&gt;you are prompted for a y/n answer before transferring each file&lt;br /&gt;open to open a connection with another computer&lt;br /&gt;open brubeck opens a new FTP connection with brubeck;&lt;br /&gt;you must enter a username and password for a brubeck account&lt;br /&gt;(unless it is to be an anonymous connection).&lt;br /&gt;put to copy one file from the local machine to the remote machine&lt;br /&gt;pwd to find out the pathname of the current directory on the remote machine&lt;br /&gt;quit to exit the FTP environment (same as bye)&lt;br /&gt;rmdir to to remove (delete) a directory in the current remote directory&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Further Information&lt;br /&gt;Many other interface commands are available. Also FTP can be run with different options. Please refer to your manual or the UNIX man page on ftp for more information.&lt;br /&gt;See also the SILS FTP Tutorial&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example Sessions&lt;br /&gt;Examples of two FTP sessions are given on the next two pages. These show the type of interaction you may expect when using the ftp utility.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example of Anonymous FTP Session&lt;br /&gt;% ftp cs.colorado.edu&lt;br /&gt;Connected to cs.colorado.edu.&lt;br /&gt;220 bruno FTP server (SunOS 4.1) ready.&lt;br /&gt;Name (cs.colorado.edu:yourlogin): anonymous&lt;br /&gt;331 Guest login ok, send ident as password.&lt;br /&gt;Password:&lt;br /&gt;230-This server is courtesy of Sun Microsystems, Inc.&lt;br /&gt;230-&lt;br /&gt;230-The data on this FTP server can be searched and accessed via WAIS, using&lt;br /&gt;230-our Essence semantic indexing system. Users can pick up a copy of the&lt;br /&gt;230-WAIS ".src" file for accessing this service by anonymous FTP from&lt;br /&gt;230-ftp.cs.colorado.edu, in pub/cs/distribs/essence/aftp-cs-colorado-edu.src&lt;br /&gt;230-This file also describes where to get the prototype source code and a&lt;br /&gt;230-paper about this system.&lt;br /&gt;230-&lt;br /&gt;230-&lt;br /&gt;230 Guest login ok, access restrictions apply.&lt;br /&gt;ftp&gt; cd /pub/HPSC&lt;br /&gt;250 CWD command successful.&lt;br /&gt;ftp&gt; ls&lt;br /&gt;200 PORT command successful.&lt;br /&gt;150 ASCII data connection for /bin/ls (128.138.242.10,3133) (0 bytes).&lt;br /&gt;ElementsofAVS.ps.Z&lt;br /&gt;. . .&lt;br /&gt;execsumm_tr.ps.Z&lt;br /&gt;viShortRef.ps.Z&lt;br /&gt;226 ASCII Transfer complete.&lt;br /&gt;418 bytes received in 0.043 seconds (9.5 Kbytes/s)&lt;br /&gt;ftp&gt; get README&lt;br /&gt;200 PORT command successful.&lt;br /&gt;150 ASCII data connection for README (128.138.242.10,3134) (2881 bytes).&lt;br /&gt;226 ASCII Transfer complete.&lt;br /&gt;local: README remote: README&lt;br /&gt;2939 bytes received in 0.066 seconds (43 Kbytes/s)&lt;br /&gt;ftp&gt; bye&lt;br /&gt;221 Goodbye.&lt;br /&gt;% ls&lt;br /&gt;. . .&lt;br /&gt;README&lt;br /&gt;. . .&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;An FTP session to obtain the HPSC README file from the cs.colorado.edu anonymous ftp directory using a loginname of anonymous and a password of one's own electronic mail address.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example of Regular FTP Session&lt;br /&gt;% ftp nordsieck.cs.colorado.edu&lt;br /&gt;Connected to nordsieck.cs.colorado.edu.&lt;br /&gt;220 nordsieck FTP server (Version 5.53 Tue Aug 25 10:46:12 MDT 1992) ready.&lt;br /&gt;Name (nordsieck.cs.colorado.edu:yourlogin): yourlogin&lt;br /&gt;331 Password required for yourlogin.&lt;br /&gt;Password:&lt;br /&gt;230 User yourlogin logged in.&lt;br /&gt;ftp&gt; cd HPSC/exercises&lt;br /&gt;250 CWD command successful.&lt;br /&gt;ftp&gt; ls&lt;br /&gt;200 PORT command successful.&lt;br /&gt;550 No files found.&lt;br /&gt;ftp&gt; put tmul.out&lt;br /&gt;200 PORT command successful.&lt;br /&gt;150 Opening ASCII mode data connection for tmul.out.&lt;br /&gt;226 Transfer complete.&lt;br /&gt;local: tmul.out remote: tmul.out&lt;br /&gt;1882 bytes sent in 0.0095 seconds (1.9e+02 Kbytes/s)&lt;br /&gt;ftp&gt; ls&lt;br /&gt;200 PORT command successful.&lt;br /&gt;150 Opening ASCII mode data connection for file list.&lt;br /&gt;tmul.out&lt;br /&gt;226 Transfer complete.&lt;br /&gt;9 bytes received in 0.0021 seconds (4.3 Kbytes/s)&lt;br /&gt;ftp&gt; mput *&lt;br /&gt;mput Makefile? y&lt;br /&gt;200 PORT command successful.&lt;br /&gt;150 Opening ASCII mode data connection for Makefile.&lt;br /&gt;226 Transfer complete.&lt;br /&gt;local: Makefile remote: Makefile&lt;br /&gt;1020 bytes sent in 0.0062 seconds (1.6e+02 Kbytes/s)&lt;br /&gt;mput tmul.out? n&lt;br /&gt;ftp&gt; quit&lt;br /&gt;221 Goodbye.&lt;br /&gt;% ls&lt;br /&gt;. . .&lt;br /&gt;Makefile&lt;br /&gt;tmul.out&lt;br /&gt;. . .&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;SMTP:&lt;/span&gt;&lt;br /&gt;This is a list of the SMTP client commands. Useful for manually debugging SMTP mail connections.&lt;br /&gt;SMTP Commands HELO&lt;br /&gt;MAIL FROM:&lt;br /&gt;RCPT TO:&lt;br /&gt;DATA&lt;br /&gt;RSET&lt;br /&gt;SEND FROM:&lt;br /&gt;SOML FROM:&lt;br /&gt;SAML FROM:&lt;br /&gt;VRFY&lt;br /&gt;EXPN&lt;br /&gt;HELP [ ]&lt;br /&gt;NOOP&lt;br /&gt;QUIT&lt;br /&gt;TURN&lt;br /&gt;SMTP Replies 211 System status, or system help reply&lt;br /&gt;214 Help message&lt;br /&gt;220 Service ready&lt;br /&gt;221 Service closing transmission channel&lt;br /&gt;250 Requested mail action okay, completed&lt;br /&gt;251 User not local; will forward to&lt;br /&gt;&lt;br /&gt;354 Start mail input; end with .&lt;br /&gt;&lt;br /&gt;421 Service not available, closing transmission channel&lt;br /&gt;450 Requested mail action not taken: mailbox unavailable&lt;br /&gt;451 Requested action aborted: local error in processing&lt;br /&gt;452 Requested action not taken: insufficient system storage&lt;br /&gt;&lt;br /&gt;500 Syntax error, command unrecognized&lt;br /&gt;501 Syntax error in parameters or arguments&lt;br /&gt;502 Command not implemented&lt;br /&gt;503 Bad sequence of commands&lt;br /&gt;504 Command parameter not implemented&lt;br /&gt;550 Requested action not taken: mailbox unavailable&lt;br /&gt;551 User not local; please try&lt;br /&gt;552 Requested mail action aborted: exceeded storage allocation&lt;br /&gt;553 Requested action not taken: mailbox name not allowed&lt;br /&gt;554 Transaction &lt;span style="font-size:78%;"&gt;failed&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;POP3 COMMANDS:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;/span&gt;This is a list of the POP3 client commands. Useful for manually debugging POP3 mail connections.&lt;br /&gt;Basic POP3 Commands (work in all implementations)&lt;br /&gt;Commands in the AUTHORISATION state: USER name&lt;br /&gt;PASS string&lt;br /&gt;QUIT&lt;br /&gt;Commands in the TRANSACTION state: STAT&lt;br /&gt;LIST [msg]&lt;br /&gt;RETR msg&lt;br /&gt;DELE msg&lt;br /&gt;NOOP&lt;br /&gt;RSET&lt;br /&gt;Commands in the UPDATE state: QUIT&lt;br /&gt;Optional POP3 Commands (only work in some implementations)&lt;br /&gt;Commands in the AUTHORISATION state: APOP name digest&lt;br /&gt;Commands in the TRANSACTION state: TOP msg n&lt;br /&gt;UIDL [msg]&lt;br /&gt;POP3 Replies +OK&lt;br /&gt;-ERR&lt;br /&gt;Other than the STAT, LIST, and UIDL commands, only "+OK" and "-ERR" are significant in the reply. Any text supplied in addition to the standard reply may be ignored by the client. However, if supplied, it may be interpreted by teh client for extended functionality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-7197382715292211738?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/7197382715292211738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=7197382715292211738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7197382715292211738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/7197382715292211738'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/08/networks-lab-excercises.html' title='Networks Lab Excercises'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-5470768103378542140</id><published>2007-08-16T02:57:00.001-07:00</published><updated>2011-06-19T20:48:26.344-07:00</updated><title type='text'>Google's Interview  Question</title><content type='html'>This question my uncle asked me to solve, was a Google's interview question and it was very good. I enjoyed solving it, but the irony is I am not sure if it is correct. So i am publishing the question  and my algorithm.&lt;br /&gt;&lt;br /&gt;Question: You are asked to write an algorithm to find the serial number of the column name in Excel (Note:In Excel, the column name is in Uppercase like A,..Z,AA...AAZ..)&lt;div&gt;&lt;br /&gt;Sample input:&lt;br /&gt;AAZ&lt;br /&gt;Sample output:&lt;br /&gt;728&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Recursive algorithm:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;long int Excel(char col[],int len)&lt;br /&gt;{&lt;br /&gt;int  c = col[n-1] - 64; /* ASCII value of letter just before A, for A being 1*/&lt;br /&gt;if(len==1)&lt;br /&gt;    return c;&lt;br /&gt;else&lt;br /&gt;    return(Excel(col,len-1)*26 + c);&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Solution:&lt;/div&gt;&lt;div&gt;  This problem is similar to converting any String to an Integer. For an Integer like 372, we do (3*100)+(7*10) + (2*1). We multiply each digit with its places value  which is of base 10. Similarly, here each digit has 26 possible values. &lt;/div&gt;&lt;div&gt;  For input AAZ,  we do (A*26*26)+(A*26)+(Z*1) where as A = 1, B= 2,.., Z = 26. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Special cases:&lt;/div&gt;&lt;div&gt; 1. Ip: "a" - convert input to UpperCase. &lt;/div&gt;&lt;div&gt; 2. Ip: "A" - Classic calculation of char - 'A' would return zero. But we need 1, hence we move the base to one char below 'A'.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;meta equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;meta equiv="Content-Style-Type" content="text/css"&gt; &lt;title&gt;&lt;/title&gt; &lt;meta name="Generator" content="Cocoa HTML Writer"&gt; &lt;meta name="CocoaVersion" content="1038.35"&gt; &lt;style type="text/css"&gt; p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px} span.s1 {color: #a20068} span.s2 {color: #3c00ff} span.s3 {color: #0000cf} span.Apple-tab-span {white-space:pre} &lt;/style&gt;   &lt;p class="p1"&gt;&lt;span class="s1"&gt;public&lt;/span&gt; &lt;span class="s1"&gt;void&lt;/span&gt; findSerialNumberInExcel(String columnName){&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="s1"&gt;char&lt;/span&gt;[] inputArray = columnName.toUpperCase().toCharArray();&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="s1"&gt;int&lt;/span&gt; base = &lt;span class="s2"&gt;'A'&lt;/span&gt; - 1;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="s1"&gt;int&lt;/span&gt; num = inputArray[0] - base;&lt;/p&gt; &lt;p class="p2"&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="s1"&gt;for&lt;/span&gt;(&lt;span class="s1"&gt;int&lt;/span&gt; i=1; i&amp;lt; inputArray.&lt;span class="s3"&gt;length&lt;/span&gt;; i++){&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;num = (num * 26) + (inputArray[i] - base);&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;}&lt;/p&gt; &lt;p class="p2"&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;System.&lt;span class="s3"&gt;out&lt;/span&gt;.println(num);&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="Apple-tab-span"&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-5470768103378542140?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/5470768103378542140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=5470768103378542140' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/5470768103378542140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/5470768103378542140'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/08/you-know-whos-question.html' title='Google&apos;s Interview  Question'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-3314626223963403675</id><published>2007-06-20T16:36:00.000-07:00</published><updated>2007-07-06T00:29:17.212-07:00</updated><title type='text'>DBMS project snapshots</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;a href="http://bp2.blogger.com/_aEbOMI5mrEY/RoGcJPmnt8I/AAAAAAAAAH4/bwj5R75N8Vk/s1600-h/first.bmp"&gt;&lt;img id="BLOGGER_PHOTO_ID_5080513537271904194" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_aEbOMI5mrEY/RoGcJPmnt8I/AAAAAAAAAH4/bwj5R75N8Vk/s320/first.bmp" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080519507276445730" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_aEbOMI5mrEY/RoGhkvmnuCI/AAAAAAAAAIo/2WXTQrRLuW8/s320/Loading.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080478406309967378" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_aEbOMI5mrEY/RoF8MWkl9hI/AAAAAAAAAFY/Fbl5thLMtWk/s320/designation_police.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080479720569959970" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp3.blogger.com/_aEbOMI5mrEY/RoF9Y2kl9iI/AAAAAAAAAFg/3FMWDkFYiSk/s320/Police_Correctid.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080491613334402610" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_aEbOMI5mrEY/RoGINGkl9jI/AAAAAAAAAFo/o5Q67yyu9l0/s320/Police_invalidpwd.bmp" border="0" /&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;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;img id="BLOGGER_PHOTO_ID_5080495659193595458" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_aEbOMI5mrEY/RoGL4mkl9kI/AAAAAAAAAFw/8znQ5YK4tGw/s320/Police_Signin.bmp" border="0" /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080497252626462290" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_aEbOMI5mrEY/RoGNVWkl9lI/AAAAAAAAAF4/9fk1hRr3_Fc/s320/Police_view.bmp" border="0" /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080497252626462306" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_aEbOMI5mrEY/RoGNVWkl9mI/AAAAAAAAAGA/pcoCCku3gVA/s320/Citizen.bmp" border="0" /&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&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080497256921429618" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_aEbOMI5mrEY/RoGNVmkl9nI/AAAAAAAAAGI/9DaoQrvtj2Y/s320/View_EAD.bmp" border="0" /&gt; &lt;img id="BLOGGER_PHOTO_ID_5080497256921429634" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_aEbOMI5mrEY/RoGNVmkl9oI/AAAAAAAAAGQ/b67pp5JRCd8/s320/EAD.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080497261216396946" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp3.blogger.com/_aEbOMI5mrEY/RoGNV2kl9pI/AAAAAAAAAGY/NfIpfmagmzM/s320/View_License.bmp" border="0" /&gt; &lt;img id="BLOGGER_PHOTO_ID_5080502810314143394" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp3.blogger.com/_aEbOMI5mrEY/RoGSY2kl9qI/AAAAAAAAAGg/9IhEQ7h0Yu0/s320/License.bmp" border="0" /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080504077329495794" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_aEbOMI5mrEY/RoGTimkl9vI/AAAAAAAAAHI/cGEuW3co-3I/s320/View_Creditcard.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080502814609110706" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_aEbOMI5mrEY/RoGSZGkl9rI/AAAAAAAAAGo/LrIlZhUpgrQ/s320/CreditCard.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;img id="BLOGGER_PHOTO_ID_5080502814609110722" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_aEbOMI5mrEY/RoGSZGkl9sI/AAAAAAAAAGw/27oXcf7nnUs/s320/View_Passport.bmp" border="0" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5080502818904078034" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_aEbOMI5mrEY/RoGSZWkl9tI/AAAAAAAAAG4/8mcKPbw7moA/s320/Travel.bmp" border="0" /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080502818904078050" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_aEbOMI5mrEY/RoGSZWkl9uI/AAAAAAAAAHA/-Uq-9DcZ464/s320/designation_fbi.bmp" border="0" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5080506912007911170" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_aEbOMI5mrEY/RoGWHmkl9wI/AAAAAAAAAHQ/IJa7ButvMJI/s320/fbi_login.bmp" border="0" /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080506920597845826" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_aEbOMI5mrEY/RoGWIGkl90I/AAAAAAAAAHw/VZwIU2huxzs/s320/Home_login.bmp" border="0" /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080506912007911186" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_aEbOMI5mrEY/RoGWHmkl9xI/AAAAAAAAAHY/XmO78pWv5jE/s320/FBI_choose.bmp" border="0" /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080506916302878498" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp3.blogger.com/_aEbOMI5mrEY/RoGWH2kl9yI/AAAAAAAAAHg/K-0DisF0qLA/s320/FBI_lodgecomplaint.bmp" border="0" /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080506916302878514" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp3.blogger.com/_aEbOMI5mrEY/RoGWH2kl9zI/AAAAAAAAAHo/fXlmr4L8kic/s320/designation_homeland.bmp" border="0" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;img id="BLOGGER_PHOTO_ID_5080513545861838802" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_aEbOMI5mrEY/RoGcJvmnt9I/AAAAAAAAAIA/FtmpM0_b3CE/s320/Home_login.bmp" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5080513550156806114" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_aEbOMI5mrEY/RoGcJ_mnt-I/AAAAAAAAAII/GCUYclubhUo/s320/Home_choose.bmp" border="0" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080513554451773426" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_aEbOMI5mrEY/RoGcKPmnt_I/AAAAAAAAAIQ/VO8j1mqlQLA/s320/Home_logindet.bmp" border="0" /&gt;&lt;img id="BLOGGER_PHOTO_ID_5080513554451773442" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp2.blogger.com/_aEbOMI5mrEY/RoGcKPmnuAI/AAAAAAAAAIY/Ma95SHPZ1MQ/s320/Home_Nomoreperson.bmp" border="0" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5080518635398084626" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp1.blogger.com/_aEbOMI5mrEY/RoGgx_mnuBI/AAAAAAAAAIg/vvFvaVsz2L8/s320/Last.bmp" border="0" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-3314626223963403675?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/3314626223963403675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=3314626223963403675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/3314626223963403675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/3314626223963403675'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/06/dbms-project-snanpshots.html' title='DBMS project snapshots'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_aEbOMI5mrEY/RoGcJPmnt8I/AAAAAAAAAH4/bwj5R75N8Vk/s72-c/first.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-1528587243324440074</id><published>2007-06-07T14:52:00.000-07:00</published><updated>2007-06-07T14:55:37.124-07:00</updated><title type='text'>DFS AND BFS Algorithms</title><content type='html'>Reference:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/depthSearch.htm"&gt;DFS alogrithm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/breadthSearch.htm"&gt;BFS algorithm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-1528587243324440074?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/1528587243324440074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=1528587243324440074' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1528587243324440074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1528587243324440074'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/06/depth-first-search-algorithm.html' title='DFS AND BFS Algorithms'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-8215306318824331048</id><published>2007-06-06T14:51:00.000-07:00</published><updated>2007-06-06T14:53:25.135-07:00</updated><title type='text'>PUZZLES</title><content type='html'>Really interesting puzzles and lot more:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.brainbashers.com/index.asp"&gt;BrainBashers-easy puzzles&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.techinterviews.com/?p=325"&gt;Google interview questions&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-8215306318824331048?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/8215306318824331048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=8215306318824331048' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8215306318824331048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8215306318824331048'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/06/puzzles.html' title='PUZZLES'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-269274217168901171</id><published>2007-06-05T21:30:00.000-07:00</published><updated>2007-06-05T21:33:59.012-07:00</updated><title type='text'>TNS, TNSnames.ora</title><content type='html'>&lt;u&gt;TNS &lt;/u&gt;&lt;br /&gt;&lt;u&gt;&lt;/u&gt;&lt;br /&gt;TNS or Transparent Network Substrate &lt;a href="http://www.orafaq.com/glossary/faqglosi.htm#IS"&gt;is&lt;/a&gt; &lt;a href="http://www.orafaq.com/glossary/faqgloso.htm#Oracle"&gt;Oracle&lt;/a&gt;'s networking architecture. TNS provides a uniform &lt;a href="http://www.orafaq.com/glossary/faqglosa.htm#Application"&gt;application&lt;/a&gt; interface to enable network applications to access the underlying network protocols transparently.&lt;br /&gt;&lt;a name="TNSNAMES_ORA"&gt;&lt;/a&gt;&lt;br /&gt;&lt;u&gt;TNSNAMES.ORA &lt;/u&gt;&lt;br /&gt;&lt;br /&gt;TNSNAMES.ORA &lt;a href="http://www.orafaq.com/glossary/faqglosi.htm#IS"&gt;is&lt;/a&gt; an &lt;a href="http://www.orafaq.com/glossary/faqglosa.htm#ASCII"&gt;ASCII&lt;/a&gt; text &lt;a href="http://www.orafaq.com/glossary/faqglosf.htm#File"&gt;file&lt;/a&gt; that provides &lt;a href="http://www.orafaq.com/glossary/faqgloss.htm#SQL_Net"&gt;SQL*Net&lt;/a&gt; with server location and necessary connection strings needed to connect to &lt;a href="http://www.orafaq.com/glossary/faqgloso.htm#Oracle"&gt;Oracle&lt;/a&gt; databases. This &lt;a href="http://www.orafaq.com/glossary/faqglosf.htm#File"&gt;file&lt;/a&gt; normally resides in the ORACLE_HOME\NETWORK\ADMIN directory.&lt;br /&gt;&lt;br /&gt;REFERENCE:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.orafaq.com/glossary/"&gt;Oracle Glossary&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-269274217168901171?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/269274217168901171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=269274217168901171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/269274217168901171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/269274217168901171'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/06/tns-tnsnamesora.html' title='TNS, TNSnames.ora'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-2670586435826764936</id><published>2007-06-05T00:24:00.000-07:00</published><updated>2007-06-06T16:51:21.139-07:00</updated><title type='text'>BOYER MOORE ALGORITHM</title><content type='html'>Algorithm's explanation and more.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www-igm.univ-mlv.fr/~lecroq/string/node14.html"&gt;See here.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-2670586435826764936?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/2670586435826764936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=2670586435826764936' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/2670586435826764936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/2670586435826764936'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/06/boyer-moore-algorithm.html' title='BOYER MOORE ALGORITHM'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-9061668382467983666</id><published>2007-06-04T15:47:00.000-07:00</published><updated>2007-06-05T15:07:24.393-07:00</updated><title type='text'>Regular Expressions</title><content type='html'>Pattern:&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#cc0000;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Writing_a_Regular_Expression_Pattern"&gt;http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Writing_a_Regular_Expression_Pattern&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://macromates.com/textmate/manual/regular_expressions"&gt;http://macromates.com/textmate/manual/regular_expressions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.webreference.com/js/column5/modifiers.html"&gt;http://www.webreference.com/js/column5/modifiers.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.javascriptkit.com/javatutors/redev.shtml"&gt;http://www.javascriptkit.com/javatutors/redev.shtml&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;These sites contains the important regular expression pattern we would possibly use.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-9061668382467983666?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/9061668382467983666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=9061668382467983666' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/9061668382467983666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/9061668382467983666'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/06/regular-expressions.html' title='Regular Expressions'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-8433481152424531302</id><published>2007-05-30T14:42:00.000-07:00</published><updated>2007-05-30T15:06:00.952-07:00</updated><title type='text'>DIFFICULT HTML TAGS</title><content type='html'>HTML TAGS FOR MAIL SENDING AND LINKING:&lt;br /&gt;&lt;br /&gt;    1.If locked in a frame set the target attribute in anchor tag to "_top" for getting out of the frame.&lt;br /&gt;    &lt;br /&gt;    2.For sending mails using outlook express the following form is used in the href attribute of the anchor tag&lt;br /&gt;&lt;br /&gt;   href="mailto:someone@microsoft.com?subject=hello%20again"&lt;br /&gt;&lt;br /&gt; where the mailid is someone@microsoft.com and the subject is hello again. Here %20 is used to enforce space between words.&lt;br /&gt;&lt;br /&gt;    3.More advanced feature in mailing is bcc and cc.. inorder to include that too in mailto attribute the following tag is used&lt;br /&gt;&lt;br /&gt;href="mailto:someone@microsoft.com?cc=someoneelse@microsoft.com&amp;bcc=andsomeoneelse2@microsoft.com&amp;subject=Summer%20Party&amp;body=You%20are%20invited%20to%20a%20big%20summer%20party!"&lt;br /&gt;&lt;br /&gt; where the mailid is same and cc to someoneelse@microsoft.com and bcc to andsomeoneelse2 with subject "summer party" and the body of the mail is "You are invited to a big summer party!".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-8433481152424531302?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/8433481152424531302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=8433481152424531302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8433481152424531302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8433481152424531302'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/05/difficult-html-tags.html' title='DIFFICULT HTML TAGS'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-8451934060582463873</id><published>2007-05-30T13:26:00.000-07:00</published><updated>2007-06-05T15:08:01.945-07:00</updated><title type='text'>HTML</title><content type='html'>&lt;p&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;HTML BASICS:&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;HTML is a text file with markup tags.&lt;/li&gt;&lt;li&gt;Markup tags tell the web browser "how to display the page".&lt;/li&gt;&lt;li&gt;.htm/.html both extensions are allowed while saving the files. &lt;/li&gt;&lt;li&gt;.htm is used when some softwares demand only 3 letter file extension, but now with newer softwares it is recommended we follow .html.&lt;/li&gt;&lt;li&gt;&lt;&gt; - angular brackets. &lt;&gt; - start tag , &lt;!-- here i used a  character entity to insert a special meaning to &lt;&gt;&lt;/&gt; - end tag.&lt;/li&gt;&lt;li&gt;attributes are always found in start tags.&lt;/li&gt;&lt;li&gt;it comes in name and value pairs.&lt;/li&gt;&lt;li&gt;this is the comment tag &lt;!-- this is comment --&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="8"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;th align="left"&gt;Result&lt;/th&gt;&lt;br /&gt;&lt;th align="left"&gt;Description&lt;/th&gt;&lt;br /&gt;&lt;th align="left"&gt;Entity Name&lt;/th&gt;&lt;br /&gt;&lt;th align="left"&gt;Entity Number&lt;/th&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;non-breaking space&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&amp;amp;#160;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;less than&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&amp;amp;lt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&amp;gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;greater than&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&amp;amp;gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&amp;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;ampersand&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&amp;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;"&lt;/td&gt;&lt;br /&gt;&lt;td&gt;quotation mark&lt;/td&gt;&lt;br /&gt;&lt;td&gt;"&lt;/td&gt;&lt;br /&gt;&lt;td&gt;"&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;'&lt;/td&gt;&lt;br /&gt;&lt;td&gt;apostrophe &lt;/td&gt;&lt;br /&gt;&lt;td&gt;&amp;amp;apos; (does not work in IE)&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&amp;amp;#39;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The easy reference to Html and other things are found in this link &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;a href="http://www.w3schools.com/"&gt;http://www.w3schools.com/&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt;To practise the html tags use this simple editor provided by the w3schools &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;a href="http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic"&gt;http://www.w3schools.com/html/tryit.asp?filename=tryhtml_basic&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-8451934060582463873?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/8451934060582463873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=8451934060582463873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8451934060582463873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/8451934060582463873'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/05/html.html' title='HTML'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-6680639067108018787</id><published>2007-05-29T14:27:00.000-07:00</published><updated>2007-05-30T12:44:59.356-07:00</updated><title type='text'>Dynamic HTML</title><content type='html'>&lt;strong&gt;&lt;em&gt;&lt;span style="font-family:Arial;font-size:100%;"&gt;DEFINITION:&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;The ability to make changes in real time to a web document after it has been downloaded by the user, without requiring additional trips back to the server.&lt;br /&gt;&lt;br /&gt;Can also check here...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sitepoint.com/article/beginners-guide-dhtml"&gt;http://www.sitepoint.com/article/beginners-guide-dhtml&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-6680639067108018787?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/6680639067108018787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=6680639067108018787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/6680639067108018787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/6680639067108018787'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/05/dynamic-html.html' title='Dynamic HTML'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-476309480445609371.post-1512486711422617426</id><published>2007-05-21T19:31:00.000-07:00</published><updated>2007-05-30T13:11:52.774-07:00</updated><title type='text'>Algorithms</title><content type='html'>Very good algorithm book&lt;br /&gt;&lt;br /&gt;Introduction to Algorithms by Thomas H  Cormen&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/476309480445609371-1512486711422617426?l=sujeetha.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sujeetha.blogspot.com/feeds/1512486711422617426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=476309480445609371&amp;postID=1512486711422617426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1512486711422617426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/476309480445609371/posts/default/1512486711422617426'/><link rel='alternate' type='text/html' href='http://sujeetha.blogspot.com/2007/05/algorithms.html' title='Algorithms'/><author><name>Suji</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://2.bp.blogspot.com/_aEbOMI5mrEY/S-Eir2Mn2GI/AAAAAAAAGPo/HUa4TBEKx2c/s1600-R/6.png'/></author><thr:total>0</thr:total></entry></feed>
