<?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-11311488</id><updated>2011-11-27T17:23:42.350-08:00</updated><category term='C#'/><category term='C++'/><category term='oracle sql timestamp'/><category term='books learning'/><category term='unix tricks'/><category term='Intel Advertisment'/><category term='motivation book'/><category term='C++ Best-Practices'/><category term='house search walkscore'/><category term='Framework'/><category term='Home ownership'/><category term='Mac imaging'/><category term='mac'/><category term='macbook'/><category term='unix linux'/><category term='poker'/><category term='RSS reader'/><category term='c++ streams'/><category term='java xml'/><category term='house m.d'/><title type='text'>Kalyan Chakravorty Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default?start-index=101&amp;max-results=100'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>270</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-11311488.post-3184991952754113968</id><published>2010-01-12T12:55:00.000-08:00</published><updated>2010-01-12T12:57:58.110-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='motivation book'/><title type='text'>Drive Book Notes</title><content type='html'>&lt;a href="http://www.amazon.com/gp/product/0143145088/ref=s9_simi_gw_s0_p14_i1?pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_s=center-2&amp;pf_rd_r=00NVCMVT426X828EX00S&amp;pf_rd_t=101&amp;pf_rd_p=470938631&amp;pf_rd_i=507846"&gt;Drive &lt;/a&gt; by Daniel H Pink talks essentially about 3 things &lt;br /&gt;&lt;br /&gt;A - Autonomous&lt;br /&gt;M - Mastery&lt;br /&gt;P - Progress&lt;br /&gt;&lt;br /&gt;These three characteristics are primary motivators which drive us.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-3184991952754113968?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/3184991952754113968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=3184991952754113968' title='39 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3184991952754113968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3184991952754113968'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2010/01/drive-book-notes.html' title='Drive Book Notes'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>39</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7991207845354292282</id><published>2009-08-17T23:25:00.001-07:00</published><updated>2009-08-17T23:25:37.195-07:00</updated><title type='text'>Copay and coinsurnace</title><content type='html'>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/TizjzxViENc&amp;hl=en&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/TizjzxViENc&amp;hl=en&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7991207845354292282?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7991207845354292282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7991207845354292282' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7991207845354292282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7991207845354292282'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/08/copay-and-coinsurnace.html' title='Copay and coinsurnace'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-5383504709919717399</id><published>2009-06-06T10:52:00.000-07:00</published><updated>2009-06-06T10:55:17.637-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='books learning'/><title type='text'>Why and what to read?</title><content type='html'>Often times I pick up a book loose interest in it and leave it and it is on my to do list to finish the book. Have you ever faced such situation?&lt;br /&gt;&lt;br /&gt;I have realized this plan works for me and I am sure it will be different for every individual&lt;br /&gt;&lt;br /&gt;- Decide what you want to study&lt;br /&gt;- Question yourself as to why are you studying&lt;br /&gt;- After I read a chapter can I summarize the chapter in a few sentences.&lt;br /&gt;- Can I write a good/bad review for this book.&lt;br /&gt;- Use the book learning and APPLY&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-5383504709919717399?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/5383504709919717399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=5383504709919717399' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5383504709919717399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5383504709919717399'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/06/why-and-what-to-read.html' title='Why and what to read?'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-653765273165808237</id><published>2009-05-30T00:24:00.000-07:00</published><updated>2009-05-30T00:25:32.694-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Intel Advertisment'/><title type='text'>Intel Ad Is Amazing.</title><content type='html'>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/jqLPHrCQr2I&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/jqLPHrCQr2I&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-653765273165808237?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/653765273165808237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=653765273165808237' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/653765273165808237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/653765273165808237'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/05/intel-ad-is-amazing.html' title='Intel Ad Is Amazing.'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-3007363135974761068</id><published>2009-05-28T16:02:00.000-07:00</published><updated>2009-05-28T16:03:07.201-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mac imaging'/><title type='text'>Mac imaging software</title><content type='html'>&lt;a href="http://www.jamfsoftware.com/products/casper.php"&gt; Casper &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-3007363135974761068?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/3007363135974761068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=3007363135974761068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3007363135974761068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3007363135974761068'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/05/mac-imaging-software.html' title='Mac imaging software'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-3393922431536809700</id><published>2009-05-23T11:54:00.000-07:00</published><updated>2009-05-23T11:56:04.899-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RSS reader'/><title type='text'>Trying new RSS reader</title><content type='html'>Trying the new  &lt;a href="http://www.newsgator.com"&gt; Newsgator (mamidi) &lt;/a&gt; to check the RSS thing now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-3393922431536809700?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/3393922431536809700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=3393922431536809700' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3393922431536809700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3393922431536809700'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/05/trying-new-rss-reader.html' title='Trying new RSS reader'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-666093830389221950</id><published>2009-05-14T07:33:00.000-07:00</published><updated>2009-05-14T07:35:20.087-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix tricks'/><title type='text'>Combine two files line by line</title><content type='html'>file1&lt;br /&gt;-----&lt;br /&gt;a&lt;br /&gt;b&lt;br /&gt;c&lt;br /&gt;&lt;br /&gt;file2&lt;br /&gt;-----&lt;br /&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;&lt;br /&gt;Output&lt;br /&gt;------&lt;br /&gt;a 1&lt;br /&gt;b 2&lt;br /&gt;c 3&lt;br /&gt;&lt;br /&gt;Use this: paste -d"\0" file1 file2 &gt; Output&lt;br /&gt;&lt;br /&gt;From: &lt;a href="http://www.computing.net/answers/unix/combining-files-line-by-line/7632.html"&gt; Here &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-666093830389221950?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/666093830389221950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=666093830389221950' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/666093830389221950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/666093830389221950'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/05/combine-two-files-line-by-line.html' title='Combine two files line by line'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-8012410576889179042</id><published>2009-05-02T09:05:00.001-07:00</published><updated>2009-05-02T10:32:25.811-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Home ownership'/><title type='text'>Home ownership woes?</title><content type='html'>I am not in the market for hunting homes but thought it might be a good idea to check what the process is&lt;br /&gt;&lt;br /&gt;First steps detailed here are pretty good&lt;br /&gt;&lt;li&gt; &lt;a href="http://www.homeownership-wa.org/steps.htm"&gt;Home Ownership&lt;/a&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;Some highlights &lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; Education &lt;/li&gt;&lt;br /&gt;&lt;li&gt; Credit History &lt;/li&gt;&lt;br /&gt;&lt;li&gt; Budget &lt;/li&gt;&lt;br /&gt;&lt;li&gt; Research &lt;/li&gt;&lt;br /&gt;&lt;li&gt; Pre approval &lt;/li&gt;&lt;br /&gt;&lt;li&gt; Your Priorties &lt;/li&gt;&lt;br /&gt;&lt;li&gt; The search &lt;/li&gt;&lt;br /&gt;&lt;li&gt; You are home &lt;/li&gt; &lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;I think choosing the right people for the job is what matters. To start with I will focus on choosing the right Realtor.&lt;br /&gt;&lt;br /&gt;I see that most of the realtors claim that they are not pushy and are not like car salesman. Why are car salesman looked so down upon? Can a car salesman not say that I am not like a Realtor. &lt;br /&gt;&lt;br /&gt;Well from my perspective these are two different salesman in two different contexts, one is selling you something in the range of 20K to 30K (if you are buying cars like Camry , Accord, Corolla, Civic etc).&lt;br /&gt;&lt;br /&gt;Realtor is trying to get you into a house you like worth close to 200K to 400K (shouldn't I just go to &lt;a href="http://www.redfin.com"&gt;Redfin&lt;/a&gt;). So the Realtor cannot be pushy like a cars salesman since I would be uncomfortable since it is such a huge amount and will walk away from it. I am not an expert but I would choose these when selecting realtor&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; Experience &lt;/li&gt;&lt;br /&gt;&lt;li&gt; References &lt;/li&gt;&lt;br /&gt;&lt;li&gt; In all circumstances he should have your interest &lt;/li&gt;&lt;br /&gt;&lt;li&gt; How comfortable he is with comparable sales and running repeatedly &lt;li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Choosing a realtor is almost like you started a small company and hiring your first employee, would you hire someone if he did not have your interest.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A lot of home ownership is dependent on whom you choose at the end of the day as he or she can be the deal breaker. I will not like a realtor recommending me something without doing his research and showing me the numbers (As said "numbers don't lie").&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-8012410576889179042?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/8012410576889179042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=8012410576889179042' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/8012410576889179042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/8012410576889179042'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/05/home-ownership-woes.html' title='Home ownership woes?'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-1526122257000608644</id><published>2009-04-23T17:52:00.000-07:00</published><updated>2009-04-23T17:54:18.394-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oracle sql timestamp'/><title type='text'>Oracle setting timestamp format and query</title><content type='html'>alter session set NLS_DATE_FORMAT='DD-MM-YYYY HH24:MI:SS'&lt;br /&gt;&lt;br /&gt;select * from table where date &gt; to_date('2009-04-01','yyyy-mm-dd');&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-1526122257000608644?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/1526122257000608644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=1526122257000608644' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1526122257000608644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1526122257000608644'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/04/oracle-setting-timestamp-format-and.html' title='Oracle setting timestamp format and query'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-1900977450277437633</id><published>2009-04-11T10:47:00.000-07:00</published><updated>2009-04-11T10:50:51.816-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macbook'/><title type='text'>Problems with macbook</title><content type='html'>I started having this problem with my macbook and apparently I am not the only one&lt;br /&gt;&lt;a href="http://www.flickr.com/search/?q=macbook%20crack&amp;w=all"&gt; MacBook Crack &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-1900977450277437633?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/1900977450277437633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=1900977450277437633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1900977450277437633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1900977450277437633'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/04/problems-with-macbook.html' title='Problems with macbook'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-69045245565365807</id><published>2009-04-11T10:35:00.000-07:00</published><updated>2009-04-11T10:42:08.387-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix linux'/><title type='text'>How to run a process even when your session ends and exits</title><content type='html'>Process : &lt;br /&gt;-run process (from zshell)&lt;br /&gt;&lt;br /&gt;-Ctrl-Z (to suspend)&lt;br /&gt;&lt;br /&gt;-disown &lt;br /&gt;&lt;br /&gt;-kill -CONT &lt;processID&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-69045245565365807?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/69045245565365807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=69045245565365807' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/69045245565365807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/69045245565365807'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/04/how-to-run-process-even-when-your.html' title='How to run a process even when your session ends and exits'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-6147469735513760813</id><published>2009-04-05T11:53:00.000-07:00</published><updated>2009-04-05T11:54:36.182-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='house search walkscore'/><title type='text'>WalkScore of a Place</title><content type='html'>&lt;a href="http://walkscore.com/"&gt;Get Walkscore of your place &lt;/a&gt; is a pretty handy tool to find out how accessible is your place to the nearby restaurants, gorceries, banks etc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-6147469735513760813?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/6147469735513760813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=6147469735513760813' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6147469735513760813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6147469735513760813'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/04/walkscore-of-place.html' title='WalkScore of a Place'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-5479515043168336430</id><published>2009-03-25T15:56:00.000-07:00</published><updated>2009-03-25T15:58:29.085-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++ streams'/><title type='text'>Write a binary stream (cannot output to a string)</title><content type='html'>std::string s(record.data.buf(), record.data.size());&lt;br /&gt;ofstream file1;&lt;br /&gt;file1.open ("/tmp/kalyan",ios::binary);&lt;br /&gt;file1.write(bytebuffer, size);&lt;br /&gt;file1.close();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-5479515043168336430?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/5479515043168336430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=5479515043168336430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5479515043168336430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5479515043168336430'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/03/write-binary-stream-cannot-output-to.html' title='Write a binary stream (cannot output to a string)'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-1928572352404308217</id><published>2009-02-15T12:02:00.001-08:00</published><updated>2009-02-15T12:03:50.780-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='poker'/><title type='text'>Poker Basics</title><content type='html'>Frpm "pokerbasics.com"&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.72os.com/images/Poker-hands.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 315px; height: 545px;" src="http://www.72os.com/images/Poker-hands.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-1928572352404308217?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/1928572352404308217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=1928572352404308217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1928572352404308217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1928572352404308217'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/02/poker-basics.html' title='Poker Basics'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-6659254742204558031</id><published>2009-02-14T14:22:00.000-08:00</published><updated>2009-02-14T14:24:04.056-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>Better terminal for Mac</title><content type='html'>&lt;a href="http://iterm.sourceforge.net/"&gt; Iterm &lt;/a&gt; is pretty good if you are not happy with the mac osx built in terminal&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-6659254742204558031?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/6659254742204558031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=6659254742204558031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6659254742204558031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6659254742204558031'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/02/better-terminal-for-mac.html' title='Better terminal for Mac'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-4673683140864044184</id><published>2009-01-31T11:17:00.000-08:00</published><updated>2009-01-31T11:18:01.244-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++ Best-Practices'/><title type='text'>Prefix and Postfix operators in C++?</title><content type='html'>Thanks to stackoverflow "JProgrammer" &lt;br /&gt;&lt;br /&gt;"Taking a leaf from Scott Meyers, More Effective c++ Item 6: Distinguish between prefix and postfix forms of increment and decrement operations.&lt;br /&gt;&lt;br /&gt;The prefix version is always preferred over the postfix in regards to objects, especially in regards to iterators.&lt;br /&gt;&lt;br /&gt;The reason for this if you look at the call pattern of the operators.&lt;br /&gt;&lt;br /&gt;// Prefix&lt;br /&gt;Integer&amp; Integer::operator++()&lt;br /&gt;{&lt;br /&gt;    *this += 1;&lt;br /&gt;    return *this;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Postfix&lt;br /&gt;const Integer Integer::operator++(int)&lt;br /&gt;{&lt;br /&gt;    Integer oldValue = *this;&lt;br /&gt;    ++(*this);&lt;br /&gt;    return oldValue;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Looking at this example it is easy to see how the prefix operator will always be more efficient than the postfix. Because of the need for a temporary object in the use of the postfix.&lt;br /&gt;&lt;br /&gt;This is why when you see examples using iterators they always use the prefix version.&lt;br /&gt;&lt;br /&gt;But as you point out for int's there is effectively no difference because of compiler optimisation that can take place.&lt;br /&gt;"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-4673683140864044184?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/4673683140864044184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=4673683140864044184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4673683140864044184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4673683140864044184'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/01/prefix-and-postfix-operators-in-c.html' title='Prefix and Postfix operators in C++?'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7912571939974106888</id><published>2009-01-21T16:49:00.003-08:00</published><updated>2009-01-21T16:49:34.974-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java xml'/><title type='text'>XML Streaming</title><content type='html'>// Creates a new reader (potentially recycled).&lt;br /&gt;     XMLInputFactory factory = XMLInputFactory.newInstance();&lt;br /&gt;     XMLStreamReader reader = factory.createXMLStreamReader(inputStream);&lt;br /&gt;     &lt;br /&gt;     while (reader.getEventType() != XMLStreamConstants.END_DOCUMENT) {&lt;br /&gt;         switch (reader.next()) {&lt;br /&gt;             case XMLStreamConstants.START_ELEMENT:&lt;br /&gt;             if (reader.getLocalName().equals("Time")) {&lt;br /&gt;                  // Reads primitive types (int) attributes directly (no memory allocation).&lt;br /&gt;                  time.hour = reader.getAttributeValue("hour").toInt();&lt;br /&gt;                  time.minute = reader.getAttributeValue("minute").toInt();&lt;br /&gt;                  time.second = reader.getAttributeValue("second").toInt();&lt;br /&gt;             }&lt;br /&gt;             ...&lt;br /&gt;             break;&lt;br /&gt;         }         &lt;br /&gt;     }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7912571939974106888?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7912571939974106888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7912571939974106888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7912571939974106888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7912571939974106888'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/01/xml-streaming_21.html' title='XML Streaming'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7663872829175499884</id><published>2009-01-21T16:49:00.001-08:00</published><updated>2009-01-21T16:49:34.561-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java xml'/><title type='text'>XML Streaming</title><content type='html'>// Creates a new reader (potentially recycled).&lt;br /&gt;     XMLInputFactory factory = XMLInputFactory.newInstance();&lt;br /&gt;     XMLStreamReader reader = factory.createXMLStreamReader(inputStream);&lt;br /&gt;     &lt;br /&gt;     while (reader.getEventType() != XMLStreamConstants.END_DOCUMENT) {&lt;br /&gt;         switch (reader.next()) {&lt;br /&gt;             case XMLStreamConstants.START_ELEMENT:&lt;br /&gt;             if (reader.getLocalName().equals("Time")) {&lt;br /&gt;                  // Reads primitive types (int) attributes directly (no memory allocation).&lt;br /&gt;                  time.hour = reader.getAttributeValue("hour").toInt();&lt;br /&gt;                  time.minute = reader.getAttributeValue("minute").toInt();&lt;br /&gt;                  time.second = reader.getAttributeValue("second").toInt();&lt;br /&gt;             }&lt;br /&gt;             ...&lt;br /&gt;             break;&lt;br /&gt;         }         &lt;br /&gt;     }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7663872829175499884?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7663872829175499884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7663872829175499884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7663872829175499884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7663872829175499884'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/01/xml-streaming.html' title='XML Streaming'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7625227616004453465</id><published>2009-01-19T20:37:00.000-08:00</published><updated>2009-01-19T20:38:27.501-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>C# Book to Read</title><content type='html'>&lt;a href="http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321246756"&gt; .Net Framework guidelines &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7625227616004453465?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7625227616004453465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7625227616004453465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7625227616004453465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7625227616004453465'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/01/c-book-to-read.html' title='C# Book to Read'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-3878276084418313161</id><published>2009-01-14T10:59:00.000-08:00</published><updated>2009-01-14T11:05:00.713-08:00</updated><title type='text'>Setting up a multiple display with MAC and linux</title><content type='html'>This is my personal preferences can change:&lt;br /&gt;&lt;br /&gt;1. Run Synergy server on linux&lt;br /&gt;http://synergy2.sourceforge.net/&lt;br /&gt;&lt;br /&gt;2. Run synergyc client on mac&lt;br /&gt;http://sourceforge.net/projects/synergykm&lt;br /&gt;&lt;br /&gt;3. Edit .synergy.conf on your home directory &lt;br /&gt;&lt;br /&gt;  section: screens&lt;br /&gt;      linux desktop:&lt;br /&gt;      mac client:&lt;br /&gt;  end&lt;br /&gt;  section: links&lt;br /&gt;      mac client:&lt;br /&gt;          right = linux desktop&lt;br /&gt;      linux desktop:&lt;br /&gt;          left  = mac client&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;4. On you mac terminal i do this &lt;br /&gt;alias command="killall -c ssh; ssh -nf -L 24800:localhost:24800 -L 5917:localhost:5901 -L 5918:localhost:5902 linuxbox -- 'sleep 999999999'"&lt;br /&gt;&lt;br /&gt;There could be a better method here&lt;br /&gt;&lt;br /&gt;5. For connecting the macbook to another monitor use this &lt;br /&gt;mini dvi to vga adapter&lt;br /&gt;http://store.apple.com/us/product/M9320G/A&lt;br /&gt;&lt;br /&gt;You might have to restart your mac book here.&lt;br /&gt;&lt;br /&gt;Vola you are done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-3878276084418313161?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/3878276084418313161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=3878276084418313161' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3878276084418313161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3878276084418313161'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2009/01/setting-up-multiple-display-with-mac.html' title='Setting up a multiple display with MAC and linux'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7489833298219605739</id><published>2008-12-30T10:55:00.000-08:00</published><updated>2008-12-30T10:56:23.064-08:00</updated><title type='text'>Factory Method Pattern</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Factory_method_pattern"&gt;Factory Method Pattern&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7489833298219605739?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7489833298219605739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7489833298219605739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7489833298219605739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7489833298219605739'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/12/factory-method-pattern.html' title='Factory Method Pattern'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-5939152700795893182</id><published>2008-12-28T13:41:00.000-08:00</published><updated>2008-12-28T13:46:56.660-08:00</updated><title type='text'>Container Summary Complexity from StrousStroup</title><content type='html'>Vector&lt;br /&gt;&lt;br /&gt;[] - const&lt;br /&gt;List Operations - O(n)+&lt;br /&gt;Iterators - Random &lt;br /&gt;&lt;br /&gt;List&lt;br /&gt;&lt;br /&gt;List operation - const&lt;br /&gt;Front operations - const&lt;br /&gt;Back operations - const&lt;br /&gt;Iterators - Bi&lt;br /&gt;&lt;br /&gt;Dequeue&lt;br /&gt;[] - const&lt;br /&gt;List operations - O(n)&lt;br /&gt;Front operations - const&lt;br /&gt;Back operations - const&lt;br /&gt;Iterators - Ran&lt;br /&gt;&lt;br /&gt;List operations include &lt;br /&gt;- Insert&lt;br /&gt;- erase&lt;br /&gt;- clear&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-5939152700795893182?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/5939152700795893182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=5939152700795893182' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5939152700795893182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5939152700795893182'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/12/container-summary-complexity-from.html' title='Container Summary Complexity from StrousStroup'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-266592334279077781</id><published>2008-12-27T18:54:00.000-08:00</published><updated>2008-12-27T20:01:12.910-08:00</updated><title type='text'>StrousStroup Container Design : Review</title><content type='html'>Notes from Container Design Chapter in StrousStroup&lt;br /&gt;&lt;br /&gt;- What is a container?&lt;br /&gt;A Container is an object that holds other objects&lt;br /&gt;&lt;br /&gt;- What is an iterator?&lt;br /&gt;Iterator is a means of traversing objects in the container (Used to navigate containers)&lt;br /&gt;&lt;br /&gt;- Important member of a Container for iterator &lt;br /&gt;iterator begin() //points to the first element&lt;br /&gt;const_iterator begin() const &lt;br /&gt;&lt;br /&gt;iterator end() //points to one-past-last element&lt;br /&gt;const_iterator end() const&lt;br /&gt;&lt;br /&gt;reverse_iterator rbegin()&lt;br /&gt;const_reverse_iterator ebegin() const;&lt;br /&gt;&lt;br /&gt;reverse_iterator end()&lt;br /&gt;const_reverse_iterator rend() const;&lt;br /&gt;&lt;br /&gt;- Element access in a vector &lt;br /&gt;&lt;br /&gt;reference operator[] (size_type n); //unchecked access&lt;br /&gt;&lt;br /&gt;reference at (size_type n); //checked access&lt;br /&gt;&lt;br /&gt;- Passing vectors &lt;br /&gt;&lt;br /&gt;f1(vector&lt;int&gt; &amp;)&lt;br /&gt;f2(const vector&lt;int&gt; &amp;)&lt;br /&gt;&lt;br /&gt;vector&lt;int&gt; v(1000);&lt;br /&gt;f1(v) //pass reference&lt;br /&gt;&lt;br /&gt;- reserve in vector allocates space in advance&lt;br /&gt;&lt;br /&gt;- capacity() gives the current numbers of reserved memory slots&lt;br /&gt;&lt;br /&gt;- size() gives the current number of elements&lt;br /&gt;&lt;br /&gt;- Pointer cannot address a unit of memory smaller than a byte &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Link &lt;br /&gt;&lt;a href="ttp://www.google.com/codesearch/p?hl=en#idzXPy6vxhM/libg++-2.7.2/libstdc++/stl/vector.h&amp;q=vector%20lang:c++"&gt; Vector Code&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-266592334279077781?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/266592334279077781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=266592334279077781' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/266592334279077781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/266592334279077781'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/12/strousstroup-container-design-review.html' title='StrousStroup Container Design : Review'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-1798425234360815197</id><published>2008-12-25T12:19:00.000-08:00</published><updated>2008-12-25T12:24:26.023-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='house m.d'/><title type='text'>Teenage Wasteland (The Who Actually from Baba O'reilly)</title><content type='html'>&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/HcyuJTgKjZc&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/HcyuJTgKjZc&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-1798425234360815197?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/1798425234360815197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=1798425234360815197' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1798425234360815197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1798425234360815197'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/12/teenage-wasteland-who-actually-from.html' title='Teenage Wasteland (The Who Actually from Baba O&apos;reilly)'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-2092708535199556463</id><published>2008-12-24T19:08:00.000-08:00</published><updated>2008-12-24T19:16:44.558-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ Abstract Base Classes</title><content type='html'>#include "string"&lt;br /&gt;  #include "sstream"&lt;br /&gt;  using namespace std;&lt;br /&gt;  &lt;br /&gt;  class AbstractStatic {&lt;br /&gt;  &lt;br /&gt;  public:&lt;br /&gt;     static std::string constructKey(int a, int b) {&lt;br /&gt;  &lt;br /&gt;          std::ostringstream ostr;&lt;br /&gt;  &lt;br /&gt;          ostr &amp;laquo;&amp;laquo; a &amp;laquo;&amp;laquo; ":" &amp;laquo;&amp;laquo; b &amp;laquo;&amp;laquo; endl;&lt;br /&gt;          return ostr.str();&lt;br /&gt;     }&lt;br /&gt;     virtual  std::string makekey(int a, int b) = 0;&lt;br /&gt;      virtual ~AbstractStatic();&lt;br /&gt;  &lt;br /&gt;  };&lt;br /&gt;  &lt;br /&gt;  class AbstractConcrete: public AbstractStatic&lt;br /&gt;  {&lt;br /&gt;      public:&lt;br /&gt;       std::string makeKey(int a, int b) {&lt;br /&gt;          std::ostringstream ostr;&lt;br /&gt;  &lt;br /&gt;          ostr &amp;laquo;&amp;laquo; a &amp;laquo;&amp;laquo; "+" &amp;laquo;&amp;laquo;  b &amp;laquo;&amp;laquo; endl;&lt;br /&gt;          return ostr.str();&lt;br /&gt;      }&lt;br /&gt;  &lt;br /&gt;  };&lt;br /&gt;  &lt;br /&gt;  void foo(AbstractStatic* a) {&lt;br /&gt;  &lt;br /&gt;      cout &amp;laquo;&amp;laquo; "In function foo" &amp;laquo;&amp;laquo; endl;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  int main(int argc, char* argv[]) {&lt;br /&gt;  &lt;br /&gt;     AbstractStatic* as;&lt;br /&gt;     AbstractStatic as; //this is an erro and foo(as) is also an error&lt;br /&gt;      string a = AbstractConcrete::constructKey(1,2);&lt;br /&gt;      foo(as);&lt;br /&gt;      cout &amp;laquo;&amp;laquo; a &amp;laquo;&amp;laquo; endl;&lt;br /&gt;      return 0;&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-2092708535199556463?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/2092708535199556463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=2092708535199556463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2092708535199556463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2092708535199556463'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/12/c-abstract-base-classes.html' title='C++ Abstract Base Classes'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-5791066863440659574</id><published>2008-12-24T11:43:00.000-08:00</published><updated>2008-12-24T11:45:20.887-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>VNC Client for MAC</title><content type='html'>Stumbled upon this sourceforge project for VNC Client for MAC &lt;br /&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/cotvnc/"&gt;Chicken for VNC &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-5791066863440659574?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/5791066863440659574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=5791066863440659574' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5791066863440659574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5791066863440659574'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/12/vnc-client-for-mac.html' title='VNC Client for MAC'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-1880131953226106419</id><published>2008-12-20T00:29:00.001-08:00</published><updated>2008-12-20T00:29:40.678-08:00</updated><title type='text'>STL MAP</title><content type='html'>From deez.info&lt;br /&gt;&lt;br /&gt;"&lt;br /&gt;&lt;br /&gt;Let’s say you have two STL std::maps with identical types, and you want to copy all the elements from one to the other. The easiest way to do this is to use map::insert():&lt;br /&gt;&lt;br /&gt;typedef std::map&lt;key_type, value_type&gt; map_t;&lt;br /&gt;&lt;br /&gt;map_t map1;&lt;br /&gt;map_t map2;&lt;br /&gt;&lt;br /&gt;// Copy all elements from map1 to map2&lt;br /&gt;map2.insert(map1.begin(), map1.end());&lt;br /&gt;&lt;br /&gt;Alternatively, you could use the STL std::copy algorithm:&lt;br /&gt;&lt;br /&gt;// Copy all elements from map1 to map2.&lt;br /&gt;std::copy(map1.begin(), map1.end(), std::inserter(map2, map2.begin()));&lt;br /&gt;&lt;br /&gt;Both methods’ performance should be an amortized O(n) because they insert records in sorted order and use the hinting form of map::insert.&lt;br /&gt;&lt;br /&gt;Note that because both methods ultimately call map::insert they will not overwrite a preexisting key’s associated value. In other words, if map1 has the value V1 associated with key K and map2 the value V2 associated with the same key K, V2 will remain in map2 after the copy operation.&lt;br /&gt;&lt;br /&gt;Let’s say you want to perform the copy but have map1’s values overwrite map2’s for identical keys. The first way to solve this problem that entered my mind was to write my own OutputIterator which performs an overwriting assignment and pass it to std::copy. However, there’s a far simpler approach. You can copy map2’s values into map1, relying on the fact that map2’s values won’t overwrite map1’s, and then swap the results:&lt;br /&gt;&lt;br /&gt;map1.insert(map2.begin(), map2.end());&lt;br /&gt;map2.swap(map1);&lt;br /&gt;&lt;br /&gt;Thanks, Sam, for helping me figure all this out.&lt;br /&gt;"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-1880131953226106419?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/1880131953226106419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=1880131953226106419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1880131953226106419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1880131953226106419'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/12/stl-map.html' title='STL MAP'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-6036424066894023391</id><published>2008-11-22T18:15:00.000-08:00</published><updated>2008-11-22T18:19:44.376-08:00</updated><title type='text'>New York Times Time Machine</title><content type='html'>From &lt;br /&gt;&lt;br /&gt;&lt;a href="http://open.blogs.nytimes.com/2008/05/21/the-new-york-times-archives-amazon-web-services-timesmachine/"&gt;&lt;br /&gt;New York Times Machine&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Interestingly good open source which is used:&lt;br /&gt;&lt;br /&gt;a) &lt;a href="http://jets3t.s3.amazonaws.com/toolkit/toolkit.html"&gt;JetS3T&lt;/a&gt;&lt;br /&gt;b) &lt;a href="http://www.lowagie.com/iText/"&gt; iText &lt;/a&gt;&lt;br /&gt;c) &lt;a href="http://72.5.124.55/products/java-media/jai/downloads/download-1_1_1.html"&gt;Java API for Image Processing&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-6036424066894023391?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/6036424066894023391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=6036424066894023391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6036424066894023391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6036424066894023391'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/11/new-york-times-time-machine.html' title='New York Times Time Machine'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7637932764237486826</id><published>2008-10-18T11:07:00.001-07:00</published><updated>2008-10-18T11:16:12.047-07:00</updated><title type='text'>Books to read :)</title><content type='html'>Someday will read these book ;) &lt;br /&gt;&lt;br /&gt;- &lt;a href="http://www.amazon.com/Creative-Work-Constructive-Business-Transforming/dp/B000Z5ENZS"&gt;Creative Habit&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://http://www.amazon.com/Downshifting-Reinventing-Success-Slower-Track/dp/0060921587"&gt; DownShifting&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.amazon.com/What-Color-Your-Parachute-2009/dp/1580089305"&gt;What color is your parachute&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7637932764237486826?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7637932764237486826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7637932764237486826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7637932764237486826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7637932764237486826'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/10/books-to-read_18.html' title='Books to read :)'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7342065299871948745</id><published>2008-10-18T11:07:00.000-07:00</published><updated>2008-10-18T11:15:28.238-07:00</updated><title type='text'>Books to read :)</title><content type='html'>Someday will read these book ;) &lt;br /&gt;&lt;br /&gt;- &lt;a href="http://www.amazon.com/Creative-Work-Constructive-Business-Transforming/dp/B000Z5ENZS"&gt;Creative Habit&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://http://www.amazon.com/Downshifting-Reinventing-Success-Slower-Track/dp/0060921587"&gt; DownShifting&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.amazon.com/What-Color-Your-Parachute-2009/dp/1580089305"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7342065299871948745?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7342065299871948745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7342065299871948745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7342065299871948745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7342065299871948745'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/10/books-to-read.html' title='Books to read :)'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7455241120988596119</id><published>2008-10-05T10:07:00.000-07:00</published><updated>2008-10-05T11:31:16.295-07:00</updated><title type='text'>Don't make me think</title><content type='html'>Reading this book off late  &lt;a href="http://www.amazon.com/Dont-Make-Me-Think-Usability/dp/0321344758"&gt; Don't Make me think &lt;/a&gt;, Will keep updating it with interesting things which I find&lt;br /&gt;&lt;br /&gt;1. Sherlock holmes to Dr Watson (on earth revolving around sun)&lt;br /&gt;"What the deuce is it for me? You say we go around the sun. If we went round the moon it would not make a pennyworth of difference to me or to my work"&lt;br /&gt;&lt;br /&gt;2. Nothing important should be more than 2 clicks away.&lt;br /&gt;&lt;br /&gt;3. Creating a site get rid of the question marks&lt;br /&gt;  - If you can create a button do that don't make it a link.&lt;br /&gt;  - Make pages self-evident&lt;br /&gt;&lt;br /&gt;4. We dont read pages we just scan them&lt;br /&gt;  - How users read the web (www.useit.com)&lt;br /&gt; &lt;br /&gt;5. We don't make optimal choices. We staisfice(Models of man:Social and Rational)&lt;br /&gt;  -&lt;a href="http://www.amazon.com/Sources-Power-People-Make-Decisions/dp/0262611465"&gt;How people make decisions&lt;/a&gt;&lt;br /&gt;  - We choose the first reasonable option.&lt;br /&gt;&lt;br /&gt;6. We don't figure out how things work, we muddle through&lt;br /&gt;&lt;br /&gt;7. If your audience is going to act like your're designing billboards then design great billboards.&lt;br /&gt;&lt;br /&gt;8. Billboards design 101&lt;br /&gt;   - Create a clear visual hierarchy on each page&lt;br /&gt;   - Take advantage of conventions&lt;br /&gt;   - Break up page into clearly defined areas&lt;br /&gt;   - Make it obvious what is clickable&lt;br /&gt;   - Minimize noise&lt;br /&gt;9. Three mindless unambigous clicks  equlas one click that requires thought.&lt;br /&gt;   - Making choices mindless.&lt;br /&gt;&lt;br /&gt;10. "Get rid of half the words on each page then get rid of half of what's left"&lt;br /&gt;   - &lt;a href="http://www.amazon.com/Elements-Style-Coyote-Canyon-Classics/dp/0979660742"&gt;Elemts of Style &lt;/a&gt;&lt;br /&gt;   - Eliminates instructions by making everything self explanatory&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7455241120988596119?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7455241120988596119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7455241120988596119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7455241120988596119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7455241120988596119'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/10/dont-make-me-think.html' title='Don&apos;t make me think'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7849655793486945428</id><published>2008-08-29T00:43:00.000-07:00</published><updated>2008-08-29T00:44:14.528-07:00</updated><title type='text'>Java Timer and TimerTask</title><content type='html'>From java2s.com&lt;br /&gt;&lt;br /&gt;"import java.util.Timer;&lt;br /&gt;import java.util.TimerTask;&lt;br /&gt;&lt;br /&gt;class MyTimerTask extends TimerTask {&lt;br /&gt;  public void run() {&lt;br /&gt;    System.out.println("Timer task executed.");&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class MainClass {&lt;br /&gt;  public static void main(String args[]) {&lt;br /&gt;    MyTimerTask myTask = new MyTimerTask();&lt;br /&gt;    Timer myTimer = new Timer();&lt;br /&gt;&lt;br /&gt;    /*&lt;br /&gt;     * Set an initial delay of 1 second, then repeat every half second.&lt;br /&gt;     */&lt;br /&gt;    myTimer.schedule(myTask, 1000, 500);&lt;br /&gt;&lt;br /&gt;    try {&lt;br /&gt;      Thread.sleep(5000);&lt;br /&gt;    } catch (InterruptedException exc) {&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    myTimer.cancel();&lt;br /&gt;  }&lt;br /&gt;}"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7849655793486945428?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7849655793486945428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7849655793486945428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7849655793486945428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7849655793486945428'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/08/java-timer-and-timertask.html' title='Java Timer and TimerTask'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-2979726211424405179</id><published>2008-08-23T14:12:00.000-07:00</published><updated>2008-08-23T14:18:33.631-07:00</updated><title type='text'>Olympics Mania!</title><content type='html'>Recently stumbled upon this article on USATF site &lt;br /&gt;&lt;br /&gt;&lt;a href"http://www.usatf.org/about/leadership/ShinSplintsBlog/"&gt; Performance and Responsibility &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Key points which i really liked about this article &lt;br /&gt;&lt;br /&gt;"The Olympics are about good timing, good luck, good preparation and good execution. All those things have to come together"&lt;br /&gt;&lt;br /&gt;"Dropping a baton isn't bad luck, it's bad execution."&lt;br /&gt;&lt;br /&gt;"When the men's marathon concludes on Sunday, we'll still be the World's #1 Team in terms of medal count. We can be a much better team. And we will be."&lt;br /&gt;&lt;br /&gt;It's goals like these which can make things happen. I think perhaps the most disheartening part of olympics for me was looking at lolo jones crying after she lost, considering that she was winning all the way to hit the penultimate hurdle not sure whether to call that bad luck or bad preparation and I am almost sure it is bad luck.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-2979726211424405179?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/2979726211424405179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=2979726211424405179' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2979726211424405179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2979726211424405179'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/08/olympics-mania.html' title='Olympics Mania!'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-4147677337272231685</id><published>2008-08-15T15:18:00.000-07:00</published><updated>2008-08-15T15:19:32.754-07:00</updated><title type='text'>Lucene and Solr</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Solr"&gt; Solr &lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Lucene"&gt; Lucene &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-4147677337272231685?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/4147677337272231685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=4147677337272231685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4147677337272231685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4147677337272231685'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/08/lucene-and-solr.html' title='Lucene and Solr'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-671157101592832283</id><published>2008-08-04T13:54:00.001-07:00</published><updated>2008-08-04T13:54:50.837-07:00</updated><title type='text'>Matching Brace in eclipse</title><content type='html'>&lt;a href="http://dev.eclipse.org/newslists/news.eclipse.tools/msg17659.html"&gt; Matching Brace in Eclipse &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-671157101592832283?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/671157101592832283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=671157101592832283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/671157101592832283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/671157101592832283'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/08/matching-brace-in-eclipse.html' title='Matching Brace in eclipse'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-5071306029272676468</id><published>2008-07-29T13:46:00.000-07:00</published><updated>2008-07-29T13:49:23.676-07:00</updated><title type='text'>Google Protocol Buff and JSON</title><content type='html'>&lt;a href="http://google-opensource.blogspot.com/2008/07/protocol-buffers-googles-data.html"&gt; Google Protocol Buff &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.json.org"&gt; JSON &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-5071306029272676468?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/5071306029272676468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=5071306029272676468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5071306029272676468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5071306029272676468'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/07/google-protocol-buff.html' title='Google Protocol Buff and JSON'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-567660711745815139</id><published>2008-07-26T12:55:00.000-07:00</published><updated>2008-07-26T18:41:40.168-07:00</updated><title type='text'>Why Randy Paush is my hero</title><content type='html'>Simple reason I watched his video and haven't seen anyone with such energy&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ji5_MqicxSo&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/ji5_MqicxSo&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-567660711745815139?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/567660711745815139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=567660711745815139' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/567660711745815139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/567660711745815139'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/07/why-randy-paush-became-my-hero.html' title='Why Randy Paush is my hero'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-5045941049859811721</id><published>2008-07-19T14:07:00.000-07:00</published><updated>2008-07-19T14:13:09.101-07:00</updated><title type='text'>What is your tax bracket?</title><content type='html'>From &lt;br /&gt;http://www.bargaineering.com/articles/2008-federal-income-tax-brackets-official-irs-figures.html&lt;br /&gt;&lt;br /&gt;"&lt;br /&gt;2008 Tax Brackets&lt;br /&gt;Tax         Single              Married Filing Jointly&lt;br /&gt;10%      Not over $8,025      Not over $16,050&lt;br /&gt;15%      $8,025 - $32,550     $16,050 - $65,100&lt;br /&gt;25%      $32,550 - $78,850    $65,100 - $131,450&lt;br /&gt;28%      $78,850 - $164,550   $131,450 - $200,300&lt;br /&gt;33%      $164,550 - $357,700  $200,300 - $357,700&lt;br /&gt;35%       Over $357,700        Over $357,700&lt;br /&gt;"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-5045941049859811721?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/5045941049859811721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=5045941049859811721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5045941049859811721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5045941049859811721'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/07/what-is-your-tax-bracket.html' title='What is your tax bracket?'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-3443489503013501111</id><published>2008-07-14T00:02:00.000-07:00</published><updated>2008-07-14T00:06:17.363-07:00</updated><title type='text'>What is equity</title><content type='html'>From financial-dictionary.com &lt;br /&gt;&lt;br /&gt;"Equity is a term whose meaning depends very much on the context. In general, you can think of equity as ownership in any asset after all debts associated with that asset are paid off. For example, a car or house with no outstanding debt is considered the owner's equity since he or she can readily sell the items for cash. Stocks are equity because they represent ownership of a company, whereas bonds are classified as debt because they represent an obligation to pay and not ownership of assets."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-3443489503013501111?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/3443489503013501111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=3443489503013501111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3443489503013501111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3443489503013501111'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/07/what-is-equity.html' title='What is equity'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-2811141939215944670</id><published>2008-07-06T11:41:00.000-07:00</published><updated>2008-07-06T11:42:19.096-07:00</updated><title type='text'>Google Acquisitions</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/List_of_Google_acquisitions"&gt;Google Acquisitions&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-2811141939215944670?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/2811141939215944670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=2811141939215944670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2811141939215944670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2811141939215944670'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/07/google-acquisitions.html' title='Google Acquisitions'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7385312178397521119</id><published>2008-07-04T15:34:00.000-07:00</published><updated>2008-07-04T15:35:20.888-07:00</updated><title type='text'>Inspirational Quote</title><content type='html'>From Jack Welch &lt;br /&gt;&lt;br /&gt;"Control your destiny or someone else will" &lt;br /&gt;&lt;br /&gt;Deservingly true.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7385312178397521119?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7385312178397521119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7385312178397521119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7385312178397521119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7385312178397521119'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/07/inspirational-quote.html' title='Inspirational Quote'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-3855128304528214541</id><published>2008-07-04T11:54:00.000-07:00</published><updated>2008-07-04T11:56:25.934-07:00</updated><title type='text'>Amazing Quote :)</title><content type='html'>This quote I stumbled upon&lt;br /&gt;&lt;br /&gt;"When a man with experience meet a man with money, the man with money gets the experience and the man with experience gets the money"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-3855128304528214541?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/3855128304528214541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=3855128304528214541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3855128304528214541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/3855128304528214541'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/07/amazing-quote.html' title='Amazing Quote :)'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-421572943799918518</id><published>2008-06-25T07:01:00.000-07:00</published><updated>2008-06-25T07:02:13.059-07:00</updated><title type='text'>Print XML without parsing</title><content type='html'>use HTML::Entities;&lt;br /&gt; print "PRE" encode_entities($xml) "/PRE"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-421572943799918518?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/421572943799918518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=421572943799918518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/421572943799918518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/421572943799918518'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/06/print-xml-without-parsing.html' title='Print XML without parsing'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-6938376723543183693</id><published>2008-06-23T07:36:00.001-07:00</published><updated>2008-06-23T07:36:53.561-07:00</updated><title type='text'>What is Street Date?</title><content type='html'>Taken from Wikipedia http://en.wikipedia.org/wiki/Street_date&lt;br /&gt;&lt;br /&gt;"In business, a street date is the date a particular product is to be released for sale to the general public.&lt;br /&gt;&lt;br /&gt;Typically, retailers receive shipments of stock prior to its street date release, so that the product can be placed on display shelves for store opening that day. Shipments come marked very clearly with a "do not sell before release date" label designating a street date mandated by the distributor. Shipments may sometimes arrive up to three weeks in advance.&lt;br /&gt;&lt;br /&gt;Retail outlets can be severely punished by manufacturers for releasing a product even a day before the street date. If a retailer breaches the contract establishing a street date, the manufacturer may impose fines, may withdraw privileges to distribute future products from that manufacturer, and may file a lawsuit to enforce the contract. However, there is no documentation of a retail chain or store being fined or any action taken against them."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-6938376723543183693?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/6938376723543183693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=6938376723543183693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6938376723543183693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6938376723543183693'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/06/what-is-street-date.html' title='What is Street Date?'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-2831392438344230909</id><published>2008-06-20T16:34:00.001-07:00</published><updated>2008-06-20T16:34:36.258-07:00</updated><title type='text'>Rectangular word copy/paste/delete</title><content type='html'>hold down the [Alt] key while you click and drag&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-2831392438344230909?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/2831392438344230909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=2831392438344230909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2831392438344230909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2831392438344230909'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/06/rectangular-word-copypastedelete.html' title='Rectangular word copy/paste/delete'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-5814922594766347529</id><published>2008-06-18T15:35:00.000-07:00</published><updated>2008-06-18T15:37:07.474-07:00</updated><title type='text'>ByteBuffer to String</title><content type='html'>ByteBuffer bytebuff = ...;&lt;br /&gt;     byte[] bytearr = new byte[bytebuff.remaining()];&lt;br /&gt;     bytebuff.get(bytearray);&lt;br /&gt;     String s = new String(bytearray);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-5814922594766347529?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/5814922594766347529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=5814922594766347529' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5814922594766347529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5814922594766347529'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/06/bytebuffer-to-string.html' title='ByteBuffer to String'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-5384955476719645606</id><published>2008-06-12T17:06:00.000-07:00</published><updated>2008-06-12T17:09:57.377-07:00</updated><title type='text'>Firefox download day Jun 17th</title><content type='html'>From firefox website the download day has been announced to June 17th&lt;br /&gt;&lt;a href="http://www.spreadfirefox.com/en-US/worldrecord" &gt;&lt;img border="0" alt="Download Day 2008" title="Download Day 2008" src="http://www.spreadfirefox.com/sites/all/themes/spreadfirefox_RCS/images/download-day/buttons/en-US/468x60_dday.png" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-5384955476719645606?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/5384955476719645606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=5384955476719645606' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5384955476719645606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5384955476719645606'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/06/firefox-download-day-jun-17th.html' title='Firefox download day Jun 17th'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-4251583213031118924</id><published>2008-06-11T16:28:00.000-07:00</published><updated>2008-06-12T17:02:32.345-07:00</updated><title type='text'>XML vs JSON</title><content type='html'>I always thought XML was too verbose, although XML acts as a great plumbing agent. &lt;br /&gt;People using data exchange cannot afford to use such verbose data methods to transfer a vast amount of data over the wire. &lt;br /&gt;&lt;br /&gt;JSON seem to be the way to go. Need to get more educated on it. &lt;a link="http://www.json.org/"&gt;JSON&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-4251583213031118924?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/4251583213031118924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=4251583213031118924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4251583213031118924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4251583213031118924'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/06/xml-vs-json.html' title='XML vs JSON'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-1800657150633681959</id><published>2008-06-11T12:41:00.000-07:00</published><updated>2008-06-11T12:43:35.911-07:00</updated><title type='text'>Cut Command in Unix</title><content type='html'>Cut command in unix can make your life a lot easier. &lt;br /&gt;&lt;br /&gt;Most important of them are &lt;br /&gt;&lt;br /&gt;-d (delimiter) by which the fields are separated&lt;br /&gt;-f (fields) fields which you want to get it printed. &lt;br /&gt;&lt;br /&gt;E.g w | cut -d' ' -f 1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-1800657150633681959?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/1800657150633681959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=1800657150633681959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1800657150633681959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1800657150633681959'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/06/cut-command-in-unix.html' title='Cut Command in Unix'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7418364170464422364</id><published>2008-06-07T17:02:00.000-07:00</published><updated>2008-06-12T17:05:35.805-07:00</updated><title type='text'>Create History with FireFox</title><content type='html'>Help firefox create history , and you can be a part of it&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.spreadfirefox.com/en-US/worldrecord/"&gt; FireFox WorldRecord &lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.spreadfirefox.com/en-US/worldrecord" &gt;&lt;img border="0" alt="Download Day 2008"  title="Download Day 2008" src="http://www.spreadfirefox.com/sites/all/themes/spreadfirefox_RCS/images/download-day/buttons/en-US/dday_badge_fox.png" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7418364170464422364?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7418364170464422364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7418364170464422364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7418364170464422364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7418364170464422364'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/06/create-history-with-firefox.html' title='Create History with FireFox'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-2140824779906628095</id><published>2008-06-06T20:45:00.000-07:00</published><updated>2008-06-06T20:47:45.153-07:00</updated><title type='text'>What is the availability of blogspot?</title><content type='html'>I often find my site  to be unavailable (no one mentions why was it down), i wonder blogspot availability is 95% :) seems to be a good number. &lt;br /&gt;&lt;br /&gt;That is the price of using a free thingy would be :) ,&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-2140824779906628095?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/2140824779906628095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=2140824779906628095' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2140824779906628095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2140824779906628095'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/06/what-is-availability-of-blogspot.html' title='What is the availability of blogspot?'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-539323109411359961</id><published>2008-06-01T07:26:00.000-07:00</published><updated>2008-06-01T07:31:37.455-07:00</updated><title type='text'>IPL final</title><content type='html'>It is between Chennai vs Rajashtan!&lt;br /&gt;&lt;br /&gt;No one expected :) this to be the case, I hardly watched all the matches :) but should to be able to buy one. Some free options from google search though not sure if they work &lt;br /&gt;&lt;br /&gt;http://live-sports-streaming.blogspot.com/&lt;br /&gt;http://picasa.tv&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-539323109411359961?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/539323109411359961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=539323109411359961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/539323109411359961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/539323109411359961'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/06/ipl-final.html' title='IPL final'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-6003984223037720126</id><published>2008-05-31T00:04:00.001-07:00</published><updated>2008-05-31T00:04:48.926-07:00</updated><title type='text'>Gartner top 10</title><content type='html'>from ehomeupgrade.com&lt;br /&gt;Gartner’s top 10 disruptive technologies 2008-2012:&lt;br /&gt;&lt;br /&gt;    * Multicore and hybrid processors&lt;br /&gt;    * Virtualisation and fabric computing&lt;br /&gt;    * Social networks and social software&lt;br /&gt;    * Cloud computing and cloud/Web platforms&lt;br /&gt;    * Web mashups&lt;br /&gt;    * User Interface&lt;br /&gt;    * Ubiquitous computing&lt;br /&gt;    * Contextual computing&lt;br /&gt;    * Augmented reality&lt;br /&gt;    * Semantics&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-6003984223037720126?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/6003984223037720126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=6003984223037720126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6003984223037720126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6003984223037720126'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/05/gartner-top-10.html' title='Gartner top 10'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-9148527471234848982</id><published>2008-05-28T17:37:00.000-07:00</published><updated>2008-05-28T17:38:30.751-07:00</updated><title type='text'>Java  ByteBuffer</title><content type='html'>from java.sun.com&lt;br /&gt; Invariants&lt;br /&gt;&lt;br /&gt;The following invariant holds for the mark, position, limit, and capacity values:&lt;br /&gt;&lt;br /&gt;    0 &lt;= mark &lt;= position &lt;= limit &lt;= capacity &lt;br /&gt;&lt;br /&gt;A newly-created buffer always has a position of zero and a mark that is undefined. The initial limit may be zero, or it may be some other value that depends upon the type of the buffer and the manner in which it is constructed. The initial content of a buffer is, in general, undefined.&lt;br /&gt;Clearing, flipping, and rewinding&lt;br /&gt;&lt;br /&gt;In addition to methods for accessing the position, limit, and capacity values and for marking and resetting, this class also defines the following operations upon buffers:&lt;br /&gt;&lt;br /&gt;    *&lt;br /&gt;&lt;br /&gt;      clear() makes a buffer ready for a new sequence of channel-read or relative put operations: It sets the limit to the capacity and the position to zero.&lt;br /&gt;    *&lt;br /&gt;&lt;br /&gt;      flip() makes a buffer ready for a new sequence of channel-write or relative get operations: It sets the limit to the current position and then sets the position to zero.&lt;br /&gt;    *&lt;br /&gt;&lt;br /&gt;      rewind() makes a buffer ready for re-reading the data that it already contains: It leaves the limit unchanged and sets the position to zero.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-9148527471234848982?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/9148527471234848982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=9148527471234848982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/9148527471234848982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/9148527471234848982'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/05/java-bytebuffer.html' title='Java  ByteBuffer'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-2161024735770785694</id><published>2008-05-28T13:40:00.000-07:00</published><updated>2008-05-28T13:42:58.602-07:00</updated><title type='text'>Java Basics</title><content type='html'>cretaeClassObject (String name) &lt;br /&gt;{&lt;br /&gt;    Object retObj = null;&lt;br /&gt;    return(retObj = Class.forName(name).newInstance());&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-2161024735770785694?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/2161024735770785694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=2161024735770785694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2161024735770785694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2161024735770785694'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/05/java-basics.html' title='Java Basics'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-404061192881442484</id><published>2008-05-27T10:26:00.000-07:00</published><updated>2008-05-27T10:27:43.424-07:00</updated><title type='text'>Java NIO</title><content type='html'>http://exampledepot.com/egs/java.nio/pkg.html&lt;br /&gt;&lt;br /&gt;http://java.sun.com/j2se/1.4.2/docs/api/java/nio/channels/Selector.html&lt;br /&gt;&lt;br /&gt;http://www.cs.brown.edu/courses/cs161/papers/j-nio-ltr.pdf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-404061192881442484?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/404061192881442484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=404061192881442484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/404061192881442484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/404061192881442484'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/05/java-nio.html' title='Java NIO'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-2420456342609692619</id><published>2008-03-06T16:54:00.001-08:00</published><updated>2008-03-06T16:54:52.538-08:00</updated><title type='text'>Check if hash value is empty</title><content type='html'>unless (%hash) {&lt;br /&gt;  hash is empty&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-2420456342609692619?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/2420456342609692619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=2420456342609692619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2420456342609692619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/2420456342609692619'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/03/check-if-hash-value-is-empty.html' title='Check if hash value is empty'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-8963825813344606501</id><published>2008-02-27T12:49:00.000-08:00</published><updated>2008-02-27T12:50:29.986-08:00</updated><title type='text'>Memory taken by a process</title><content type='html'>watch -n 1 cat /proc/proc number/status&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-8963825813344606501?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/8963825813344606501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=8963825813344606501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/8963825813344606501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/8963825813344606501'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/02/memory-taken-by-process.html' title='Memory taken by a process'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-4551786287235380415</id><published>2008-02-07T09:49:00.001-08:00</published><updated>2008-02-07T09:49:33.432-08:00</updated><title type='text'>What is a freudian slip</title><content type='html'>http://en.wikipedia.org/wiki/Freudian_slip&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-4551786287235380415?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/4551786287235380415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=4551786287235380415' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4551786287235380415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4551786287235380415'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2008/02/what-is-freudian-slip.html' title='What is a freudian slip'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7010823041581890725</id><published>2007-12-08T00:15:00.000-08:00</published><updated>2007-12-08T00:17:28.909-08:00</updated><title type='text'>What greg wilson reads?</title><content type='html'>I head greg when he was talking about beautiful code and hence then started to look at his blog&lt;br /&gt;&lt;br /&gt;I find his reads to be pretty good &lt;br /&gt;http://pyre.third-bit.com/blog/archives/1145.html&lt;br /&gt;pasted from the link above&lt;br /&gt;What I Read&lt;br /&gt;&lt;br /&gt;A grad student mailed me this morning to ask me what I read to stay on top of things. In no particular order:&lt;br /&gt;&lt;br /&gt;Journals&lt;br /&gt;&lt;br /&gt;    * ACM Computing Surveys&lt;br /&gt;    * ACM Queue&lt;br /&gt;    * ACM SIGCSE Bulletin&lt;br /&gt;    * ACM SIGSOFT Software Engineering Notes&lt;br /&gt;    * ACM Transactions on Software Engineering and Methodology&lt;br /&gt;    * Communications of the ACM&lt;br /&gt;    * IEEE Computer&lt;br /&gt;    * Computer Science Education&lt;br /&gt;    * Computing in Science &amp; Engineering&lt;br /&gt;    * Empirical Software Engineering&lt;br /&gt;    * IEEE Software&lt;br /&gt;    * IEEE Transactions on Software Engineering&lt;br /&gt;    * Journal of Software Maintenance and Evolution&lt;br /&gt;    * SIGCSE: Technical Symposium on Computer Science Education&lt;br /&gt;    * Software: Practice and Experience&lt;br /&gt;&lt;br /&gt;Blogs&lt;br /&gt;&lt;br /&gt;    * Adam Goucher&lt;br /&gt;    * Apress&lt;br /&gt;    * Artima&lt;br /&gt;    * Beautiful Code&lt;br /&gt;    * Blake Winton&lt;br /&gt;    * CBC | Toronto News&lt;br /&gt;    * CBC | World News&lt;br /&gt;    * Computer Science Community&lt;br /&gt;    * Consulting Toolsmiths - Matt Doar&lt;br /&gt;    * Cool Tools&lt;br /&gt;    * CTWatch Blog&lt;br /&gt;    * Daily Life in an Ivory Basement&lt;br /&gt;    * Daily Python-URL&lt;br /&gt;    * David Crow&lt;br /&gt;    * Diomidis D. Spinellis&lt;br /&gt;    * DrDobbs Portal Blog&lt;br /&gt;    * Google Code - Updates&lt;br /&gt;    * Google Summer of Code Blog&lt;br /&gt;    * Google Testing Blog&lt;br /&gt;    * Irving Reid&lt;br /&gt;    * Jazz Community Events&lt;br /&gt;    * Jazz Community News&lt;br /&gt;    * Joe Gregorio&lt;br /&gt;    * Joel on Software&lt;br /&gt;    * Jon Udell&lt;br /&gt;    * Lambda the Ultimate - Programming Languages Weblog&lt;br /&gt;    * Microsoft Research Publications&lt;br /&gt;    * O’Reilly Media, Inc. New Books&lt;br /&gt;    * O’Reilly Radar&lt;br /&gt;    * python-dev Summaries&lt;br /&gt;    * Safari Tech Books Online&lt;br /&gt;    * Schneier on Security&lt;br /&gt;    * ShowMeDo’s latest videos&lt;br /&gt;    * Strange Maps&lt;br /&gt;    * Streetknit&lt;br /&gt;    * The Tucows Blog&lt;br /&gt;    * Toronto Before: A Step Into The Past&lt;br /&gt;    * Upcoming.org: Events Search for&lt;br /&gt;    * Victor Ng&lt;br /&gt;    * Women in Technology&lt;br /&gt;    * xkcd.com&lt;br /&gt;&lt;br /&gt;This entry was&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7010823041581890725?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7010823041581890725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7010823041581890725' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7010823041581890725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7010823041581890725'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/12/what-greg-wilson-reads.html' title='What greg wilson reads?'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-6495058813185362245</id><published>2007-11-20T09:29:00.001-08:00</published><updated>2007-11-20T09:31:04.024-08:00</updated><title type='text'>7 Habits of innnovation</title><content type='html'>fromt thinksimplenow.com&lt;br /&gt;Have you ever looked at super creative or innovative people, and felt they are special beings blessed with gifts? Have you felt that you are not as fortunate? I used to feel this way. I have since learned that creativity is more about psychology than intellect, and there are no secrets to being creative. Actually, there is no such thing as “being more creative”, you are already a creative being.&lt;br /&gt;&lt;br /&gt;I’m sure we can all relate to moments when we felt stuck trying to tap into our own creativity. Did you know that this block is merely your mind at work? Your mind is creating all sorts of assumptions, self-imposed constraints and self-limiting inhibitions. I have found that we can remove these assumptions just by being in the moment; start doing, and stop thinking.&lt;br /&gt;&lt;br /&gt;Here are seven habits found in highly innovative and creative people that I’ve organized and summarized from Scott Berkun’s “the myths of innovation“.&lt;br /&gt;&lt;br /&gt;1. Persistence - Innovation involves more than just great ideas. We need faith, hard work and a laser sharp focus for the end result to keep persisting for our vision in the face of roadblocks. We tend to see the end result of a creative idea in awe, but what we don’t see are the actions, hard work and persistence behind the scene to make the vision a reality.&lt;br /&gt;&lt;br /&gt;“Invention is 1% inspiration, 99% perspiration“,&lt;br /&gt;–Thomas A. Edison&lt;br /&gt;&lt;br /&gt;2. Remove Self-Limiting Inhibitions - Under the spell of inhibition, we feel limited and stuck. We need to free ourselves from these mind-created constraints by removing assumptions and restrictions. This is what we refer to when we say “think outside the box”. Encourage ourselves to be open to new ideas and solutions without setting limiting beliefs. Remember, innovation is more about psychology than intellect.&lt;br /&gt;&lt;br /&gt;3. Take Risks, Make Mistakes - I believe that part of the reason why we create self-imposed inhibition is due to our fear of failure. Expect that some ideas will fail in the process of learning. Build prototypes often, test them out on people, gather feedback, and make incremental changes. Rather than treating the mistakes as failures, think of them as experiments. “Experiment is the expected failure to deliberately learn something.” (Scott Berkun). Instead of punishing yourself for the failures, accept them, then take your newfound knowledge and put it towards finding the best solution. Live up to your goal of producing the best result, but understand you might hit roadblocks along the way.&lt;br /&gt;&lt;br /&gt;“I have not failed. I’ve just found 10,000 ways that won’t work.”&lt;br /&gt;–Thomas A. Edison&lt;br /&gt;&lt;br /&gt;4. Escape - Our environment can and does effect how we feel. The more relaxed and calm we are internally, the more receptive we are to tap into our flowing creativity. This is why ideas sometimes come to us in the shower or while we’re alone. Each of us have different triggers to access our creative energy. I get into the ‘creative zone’ from sitting at my dining table, with a warm cup of chai, and my noise-canceling headphones. Many great thinkers go on long walks to help them solve problems. Experiment and find what works for you.&lt;br /&gt;&lt;br /&gt;5. Writing Things Down - Many innovators and creative people keep a journal to jot down ideas and thoughts. Some keep a sketch book, scrap book, post-it notes, loose paper. They all have a method to capture their thoughts, to think on paper, to drop their inhibitions and start the creative process. Leonardo Da Vinci’s famous notebook was purchased by Bill Gates for $30.8 Million dollars.&lt;br /&gt;&lt;br /&gt;6. Find Patterns &amp; Create Combinations - Ideas come from other ideas. Did you know that Edison wasn’t the first one who came up with the invention of the light bulb? He was the first to build a workable carbon filament inside a glass bulb, that made light bulbs last longer. You can increase your exposure to new ideas, look for patterns and see how you can combine ideas to improve upon existing solutions.&lt;br /&gt;&lt;br /&gt;7. Curiosity - Many innovators are just curious people who are inquisitive, and like to solve problems. Practice seeing things differently. For example, When seeing the solution to a problem, ask yourself, “What are some alternative ways to doing this?”. Ask a lot of questions and challenge the norms or existing methods.&lt;br /&gt;&lt;br /&gt;Here are some techniques you can apply to cultivate creativity:&lt;br /&gt;&lt;br /&gt;    * Keep a Journal - Practice writing every thought, idea, and inspiration down. Practice, brainstorming and thinking on paper.&lt;br /&gt;    * Solve the Opposite Problem - Scott talked about this technique. The idea is to invent and brainstorm by solving the opposite problem that you are trying to solve. So, for example, if you are trying to create “The best laptop design”, then start with ideas to create “The worst laptop design”. For each idea you come up with, flip it. For example, if “heavy and clunky” is one idea for “The worst laptop design”, then flipping that might give me “light and sleek” which can be used in “The best laptop design”.&lt;br /&gt;      This technique works especially well when brainstorming in a group.The technique sounds so silly that people will become playful when answering. Humor brings down inhibition and encourages people to say things out aloud. People feel less insecure and more open.&lt;br /&gt;    * Find A Creative Environment - Find a relaxing or inspiring environment that triggers your creativity. Try different spots until you find some that really bring out the best in you. I alternate between my living room (which I have carefully decorated) and a couple of local coffee shops.&lt;br /&gt;    * Do something fun - If you’re stuck on something, shift your thoughts by going to do something fun and completely different. Come back to it with a fresh mind.&lt;br /&gt;    * Partnering - Find creative partnerships with another. New ideas can surface as a result of two forces that would not have been arrived by a single person. Brainstorm together.&lt;br /&gt;    * ‘Commit to Failure’ - “Commit yourself to taking enough risks that you will fail some of the time. If you’re not failing, we’re not doing something sufficiently difficult or creative.” -Scott Berkun&lt;br /&gt;    * Talk to Someone About It - I have found that when I try to articulate a particular problem to someone, that I’ll somehow articulate my solution, as well. When explaining my situation, I’m not expecting them to solve my problem, but rather act as a ‘bouncing board’ for ideas.&lt;br /&gt;    * **Plan for Roadblocks -Commit to efforts to overcome potential setbacks. It’s worthwhile to identify and have a plan for non-creative items that may inhibit creative thinking. Scott talked about the most common roadblocks people face: Loss of motivation, ran out of money, unable to convince key person.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-6495058813185362245?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/6495058813185362245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=6495058813185362245' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6495058813185362245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/6495058813185362245'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/11/7-habits-of-innnovation.html' title='7 Habits of innnovation'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-1577882849298291341</id><published>2007-11-18T23:06:00.000-08:00</published><updated>2007-11-18T23:17:18.493-08:00</updated><title type='text'>C++ tricks from Jim Brooks</title><content type='html'>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;&lt;br /&gt;&lt;html&gt;&lt;br /&gt;&lt;!-- (C) 2005 Jim Brooks --&gt;&lt;br /&gt;&lt;head&gt;&lt;br /&gt;&lt;title&gt;C++ Programming Language&lt;/title&gt;&lt;br /&gt;&lt;link rel='icon' type='image/png' href='../im/favicon.png'/&gt; &lt;br /&gt;&lt;meta name='title'       content='C++ Programming Language'&gt;&lt;br /&gt;&lt;meta name='description' content='C++ programming language'&gt;&lt;br /&gt;&lt;meta name='keywords'    content='C++ STL programming language, C++ STL resources, C++ tricks recipes, Standard Template Library, C++ common phrases expressions idioms, C++ code snippets, C++ pitfalls traps quirks caveats, programming tricks, GNU gcc g++, '&gt;&lt;br /&gt;&lt;style type='text/css'&gt;&lt;br /&gt;body {&lt;br /&gt;    background-color: #dfc0c0;&lt;br /&gt;    color: #d00000;&lt;br /&gt;    font-family: Arial, Helvetica, sans-serif;&lt;br /&gt;    marginwidth: 8;&lt;br /&gt;    marginheight: 8;&lt;br /&gt;}&lt;br /&gt;td { &lt;br /&gt;    color: #d00000;&lt;br /&gt;    font-family: Arial, Helvetica, sans-serif;&lt;br /&gt;}&lt;br /&gt;pre {&lt;br /&gt;    color: #b0b0b0;&lt;br /&gt;    font-family: Courier,monospace;&lt;br /&gt;    font-weight: bolder;&lt;br /&gt;    font-size: 15px;&lt;br /&gt;}&lt;br /&gt;h1 {&lt;br /&gt;    color: #d00000;&lt;br /&gt;    font-family: Arial, Helvetica, sans-serif;&lt;br /&gt;    font-size: 32px;&lt;br /&gt;}&lt;br /&gt;.legal {&lt;br /&gt;    color: gold;  font-style: italic; font-size: 14px;&lt;br /&gt;    font-family: Arial, Helvetica, sans-serif;&lt;br /&gt;}&lt;br /&gt;A:plain     { color: #df8000; }&lt;br /&gt;A:link      { color: #df8000; }&lt;br /&gt;A:active    { color: #df8000; }&lt;br /&gt;A:visited   { color: #df8000; }&lt;br /&gt;A:hover     { color: red; }&lt;br /&gt;&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;style type='text/css'&gt;&lt;br /&gt;pre {&lt;br /&gt;    color: #808080;&lt;br /&gt;}&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;/head&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;h1&gt;&lt;!--&lt;img src='im/c++.png' hspace='2'&gt;&amp;nbsp;&amp;nbsp;--&gt;C++ Programming&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;table color='#dfc0c0' cellpadding='4' cellspacing='0' border='0' width='100%' align='center'&gt;&lt;tbody&gt; &lt;br /&gt;&lt;tr valign='top'&gt;&lt;td width='100%' align='left'&gt; &lt;br /&gt;    &lt;table width='100%' cellpadding='0' cellspacing='0' border='0'&gt;&lt;tbody&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_left_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='100%' background='imb/top_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_right_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td background='imb/corner_left.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/pixel.gif'&gt; &lt;br /&gt;            &lt;p&gt;&lt;/p&gt; &lt;br /&gt;            &lt;p align='center'&gt; &lt;br /&gt;            &lt;font face='Arial,Helvetica,sans-serif' size='4' color='#d00000'&gt;&lt;b&gt;Index&lt;/b&gt;&lt;/font&gt; &lt;br /&gt;            &lt;/p&gt; &lt;br /&gt;&lt;br /&gt;          &lt;font face='Arial,Helvetica,sans-serif'&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- begin text --&gt; &lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href='#C++ Tricks'&gt;C++ Tricks&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href='#STL Code Snippets'&gt;STL Code Snippets&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href='#Stream Code Snippets'&gt;Stream Code Snippets&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href='#Redirecting Streams'&gt;Redirecting Streams&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href='#Overloaded Operators'&gt;Overloaded Operators&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href='#Defining Stream Out Operator'&gt;Defining operator&amp;lt;&amp;lt;()&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href='#Pitfalls'&gt;C++ Pitfalls &amp;amp; Traps&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href='#STL Pitfalls'&gt;STL Pitfalls &amp;amp; Traps&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href='#C Preprocessor Tricks'&gt;C Preprocessor Tricks&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Please &lt;a href='../misc/eml.php'&gt;click here&lt;/a&gt; if you notice any mistakes or have additions.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt; &lt;br /&gt;&lt;!--- end text --&gt; &lt;br /&gt;            &lt;/font&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/corner_right.gif' width='15'&gt; &lt;br /&gt;                &lt;img src='imb/one_trans_pixel.gif' width='15' height='1' border='0'&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_left_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/bottom_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_right_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;a name='C++ Tricks'&gt;&lt;/a&gt;&lt;br /&gt;&lt;table color='#dfc0c0' cellpadding='4' cellspacing='0' border='0' width='100%' align='center'&gt;&lt;tbody&gt; &lt;br /&gt;&lt;tr valign='top'&gt;&lt;td width='100%' align='left'&gt; &lt;br /&gt;    &lt;table width='100%' cellpadding='0' cellspacing='0' border='0'&gt;&lt;tbody&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_left_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='100%' background='imb/top_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_right_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td background='imb/corner_left.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/pixel.gif'&gt; &lt;br /&gt;            &lt;p&gt;&lt;/p&gt; &lt;br /&gt;            &lt;p align='center'&gt; &lt;br /&gt;            &lt;font face='Arial,Helvetica,sans-serif' size='4' color='#d00000'&gt;&lt;b&gt;C++ Tricks&lt;/b&gt;&lt;/font&gt; &lt;br /&gt;            &lt;/p&gt; &lt;br /&gt;&lt;br /&gt;          &lt;font face='Arial,Helvetica,sans-serif'&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- begin text --&gt; &lt;br /&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;// To turn a fundamental type into a (somewhat) distinct type.&lt;br /&gt;#define DECLARE_DISTINCT_TYPE( CLASS, T )                           \&lt;br /&gt;class CLASS                                                         \&lt;br /&gt;{                                                                   \&lt;br /&gt;public:                                                             \&lt;br /&gt;    CLASS( T val ) : mVal(val) { }                                  \&lt;br /&gt;    operator T() const { return mVal; }                             \&lt;br /&gt;    CLASS&amp; operator=( const T&amp; val ) { mVal = val; return *this; }  \&lt;br /&gt;private:                                                            \&lt;br /&gt;    T mVal;                                                         \&lt;br /&gt;};&lt;br /&gt;DECLARE_DISTINCT_TYPE( Radian, float )&lt;br /&gt;DECLARE_DISTINCT_TYPE( Degree, float )&lt;br /&gt;void Rotate( Radian rad );  // these overloaded functions become possible&lt;br /&gt;void Rotate( Degree deg );  // yet can be manipulated as floats&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt; &lt;br /&gt;&lt;!--- end text --&gt; &lt;br /&gt;            &lt;/font&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/corner_right.gif' width='15'&gt; &lt;br /&gt;                &lt;img src='imb/one_trans_pixel.gif' width='15' height='1' border='0'&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_left_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/bottom_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_right_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;a name='STL Code Snippets'&gt;&lt;/a&gt;&lt;br /&gt;&lt;table color='#dfc0c0' cellpadding='4' cellspacing='0' border='0' width='100%' align='center'&gt;&lt;tbody&gt; &lt;br /&gt;&lt;tr valign='top'&gt;&lt;td width='100%' align='left'&gt; &lt;br /&gt;    &lt;table width='100%' cellpadding='0' cellspacing='0' border='0'&gt;&lt;tbody&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_left_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='100%' background='imb/top_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_right_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td background='imb/corner_left.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/pixel.gif'&gt; &lt;br /&gt;            &lt;p&gt;&lt;/p&gt; &lt;br /&gt;            &lt;p align='center'&gt; &lt;br /&gt;            &lt;font face='Arial,Helvetica,sans-serif' size='4' color='#d00000'&gt;&lt;b&gt;STL Code Snippets&lt;/b&gt;&lt;/font&gt; &lt;br /&gt;            &lt;/p&gt; &lt;br /&gt;&lt;br /&gt;          &lt;font face='Arial,Helvetica,sans-serif'&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- begin text --&gt; &lt;br /&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;// Vector:&lt;br /&gt;vector&lt;string&gt; vec;&lt;br /&gt;vec.push_back( name );      // push_back() means append&lt;br /&gt;vec.clear();&lt;br /&gt;&lt;br /&gt;// Iterating thru a container:&lt;br /&gt;vector&lt;string&gt; files;&lt;br /&gt;vector&lt;string&gt;::iterator itr;&lt;br /&gt;for ( itr = files.begin(); itr != files.end(); ++itr )&lt;br /&gt;    cout &lt;&lt; *itr &lt;&lt; endl;&lt;br /&gt;&lt;br /&gt;// Iterating by subscript using an index (N/A to associative containers):&lt;br /&gt;vector&lt;MyClass&gt; vec;&lt;br /&gt;for ( int i = 0; i &lt; vec.size(); ++i )&lt;br /&gt;&lt;br /&gt;// Building and iterating thru a map and using pairs:&lt;br /&gt;map&lt;string,int&gt; mp;&lt;br /&gt;mp.insert( pair&lt;string,int&gt;( "a", 1 ) );&lt;br /&gt;mp.insert( pair&lt;string,int&gt;( "b", 2 ) );&lt;br /&gt;mp.insert( pair&lt;string,int&gt;( "c", 3 ) );&lt;br /&gt;map&lt;string,int&gt;::iterator itr;&lt;br /&gt;for ( itr = mp.begin(); itr != mp.end(); ++itr )&lt;br /&gt;    cout &lt;&lt; itr-&gt;first &lt;&lt; " " &lt;&lt; itr-&gt;second &lt;&lt; endl;&lt;br /&gt;&lt;br /&gt;// To test if a key exists in a map/set:&lt;br /&gt;if ( mMap.find(key) != mMap.end() )&lt;br /&gt;&lt;br /&gt;// Adding then removing from a container.&lt;br /&gt;list&lt;int&gt; l;&lt;br /&gt;for ( int i = 0; i &lt; 10; ++i )&lt;br /&gt;    l.push_back( i );  // append&lt;br /&gt;while ( ! l.empty() )&lt;br /&gt;{   // Prints/pops oldest (head) element first,&lt;br /&gt;    cout &lt;&lt; l.front() &lt;&lt; endl;&lt;br /&gt;    l.pop_front();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// If no match.&lt;br /&gt;if ( map.find("key") == map.end() ) cout &lt;&lt; "not found" &lt;&lt; endl;&lt;br /&gt;&lt;br /&gt;// Print a container.&lt;br /&gt;list&lt;string&gt; con;&lt;br /&gt;copy( con.begin(), con.end(), ostream_iterator&lt;string&gt;(cout," ") );&lt;br /&gt;&lt;br /&gt;// Copy a container:&lt;br /&gt;copy( con1.begin(), con1.end(),&lt;br /&gt;      con2 );                // WRONG/PITFALL if con2 smaller than con1&lt;br /&gt;&lt;br /&gt;con2.clear();&lt;br /&gt;copy( con1.begin(), con1.end(),&lt;br /&gt;      back_inserter(con2) ); // OK if con2 smaller than con1&lt;br /&gt;&lt;br /&gt;// Sorting using a binary predicate:&lt;br /&gt;// An alternative (using the container container pointers instead&lt;br /&gt;// of values) that doesn't need a binary predicate is to define&lt;br /&gt;// your own operator&lt;() which sort() uses by default.&lt;br /&gt;bool BinPred( const Class&amp; o1, const Class&amp; o2 )&lt;br /&gt;{&lt;br /&gt;    return o1.val &lt; o2.val;&lt;br /&gt;}&lt;br /&gt;vector&lt;Class&gt; vec;&lt;br /&gt;sort( vec.begin(), vec.end(), BinPred );&lt;br /&gt;&lt;br /&gt;// A function that returns a pair.&lt;br /&gt;// The pair is returned by value (like a struct would be, so it isn't dangling).&lt;br /&gt;std::pair&lt;float,float&gt;&lt;br /&gt;&lt;br /&gt;AddMul( float x, float y )&lt;br /&gt;{&lt;br /&gt;    std::pair&lt;float, float&gt; res;&lt;br /&gt;    res.first  = x + y;&lt;br /&gt;    res.second = x * y;&lt;br /&gt;    return res;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Print a binary number in base 2 using bitset.&lt;br /&gt;#include &lt;bitset&gt;&lt;br /&gt;bitset&lt;8&gt; val = 0xff;&lt;br /&gt;cout &lt;&lt; val;&lt;br /&gt;&lt;br /&gt;// Turn string to all upper-case.&lt;br /&gt;string s;&lt;br /&gt;transform( s.begin(), s.end(),&lt;br /&gt;           s.end(),&lt;br /&gt;           toupper );&lt;br /&gt;&lt;br /&gt;// Distance between two iterators.&lt;br /&gt;distance( itr1, itr2 )&lt;br /&gt;&lt;br /&gt;// Getting the iterator of an item that was inserted into a map:&lt;br /&gt;// (a multimap/multiset differs, adapted from gfx_share.hh)&lt;br /&gt;std::pair&lt;typename Map::iterator,bool&gt; insertion;&lt;br /&gt;insertion = mMap.insert( std::make_pair( *obj, std::make_pair(copy,1) ) );&lt;br /&gt;itr = insertion.first;  // insertion is assumed to succeed (bool not checked)&lt;br /&gt;&lt;br /&gt;// Replacing/substituting chars of a string.&lt;br /&gt;// string::replace() is really an overwrite, not a substitution.&lt;br /&gt;char&lt;br /&gt;Unix2DosDirChar( char c )&lt;br /&gt;{&lt;br /&gt;    return c == '/' ? '\': c;&lt;br /&gt;}&lt;br /&gt;string&lt;br /&gt;Unix2DosDir( const string&amp; dirname )&lt;br /&gt;{&lt;br /&gt;    string s = dirname;&lt;br /&gt;    std::transform( s.begin(), s.end(),&lt;br /&gt;                    s.begin(),&lt;br /&gt;                    Unix2DosDirChar );&lt;br /&gt;    return s;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt; &lt;br /&gt;&lt;!--- end text --&gt; &lt;br /&gt;            &lt;/font&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/corner_right.gif' width='15'&gt; &lt;br /&gt;                &lt;img src='imb/one_trans_pixel.gif' width='15' height='1' border='0'&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_left_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/bottom_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_right_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;a name='Stream Code Snippets'&gt;&lt;/a&gt;&lt;br /&gt;&lt;table color='#dfc0c0' cellpadding='4' cellspacing='0' border='0' width='100%' align='center'&gt;&lt;tbody&gt; &lt;br /&gt;&lt;tr valign='top'&gt;&lt;td width='100%' align='left'&gt; &lt;br /&gt;    &lt;table width='100%' cellpadding='0' cellspacing='0' border='0'&gt;&lt;tbody&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_left_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='100%' background='imb/top_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_right_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td background='imb/corner_left.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/pixel.gif'&gt; &lt;br /&gt;            &lt;p&gt;&lt;/p&gt; &lt;br /&gt;            &lt;p align='center'&gt; &lt;br /&gt;            &lt;font face='Arial,Helvetica,sans-serif' size='4' color='#d00000'&gt;&lt;b&gt;Stream Code Snippets&lt;/b&gt;&lt;/font&gt; &lt;br /&gt;            &lt;/p&gt; &lt;br /&gt;&lt;br /&gt;          &lt;font face='Arial,Helvetica,sans-serif'&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- begin text --&gt; &lt;br /&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;// Save/restore stream flags.&lt;br /&gt;std::ios::fmtflags savedFlags = cout.flags();&lt;br /&gt;...&lt;br /&gt;cout.flags(savedFlags);&lt;br /&gt;&lt;br /&gt;// showbase (eg automatically print &amp;quot;0x&amp;quot; prefix for hex, etc).&lt;br /&gt;cout.setf( std::ios::showbase );&lt;br /&gt;&lt;br /&gt;// Set float precision.&lt;br /&gt;mStream.setf( ios::fixed, ios::floatfield );&lt;br /&gt;mStream.precision( 20 );&lt;br /&gt;&lt;br /&gt;// Writing to an integer to a stream using width/precision.&lt;br /&gt;// Note that width/precision is discarded after every call to stream object!&lt;br /&gt;std::cout &amp;lt;&amp;lt; std::setw(5) &amp;lt;&amp;lt; std::setfill('0') &amp;lt;&amp;lt; x &amp;lt;&amp;lt; ' ';&lt;br /&gt;std::cout &amp;lt;&amp;lt; std::setw(5) &amp;lt;&amp;lt; std::setfill('0') &amp;lt;&amp;lt; y &amp;lt;&amp;lt; ' ';&lt;br /&gt;std::cout &amp;lt;&amp;lt; std::setw(5) &amp;lt;&amp;lt; std::setfill('0') &amp;lt;&amp;lt; z &amp;lt;&amp;lt; ' ' &amp;lt;&amp;lt; std::endl;&lt;br /&gt;&lt;br /&gt;// Convert an int to a string stream for the purpose&lt;br /&gt;// of passing the int as a C++ string.&lt;br /&gt;int i;&lt;br /&gt;ostringstream ss;&lt;br /&gt;ss &amp;lt;&amp;lt; i; Print( ss.str() );&lt;br /&gt;&lt;br /&gt;// Open for reading to test if file is empty.&lt;br /&gt;strm.open( fname, ios::in|ios::binary );&lt;br /&gt;if ( strm.good() &amp;&amp; strm.is_open() )&lt;br /&gt;{&lt;br /&gt;    // File exists.  Is it empty?&lt;br /&gt;    strm.seekg(1);&lt;br /&gt;    char c; strm &amp;gt;&amp;gt; c;  // a read is required to trigger EOF, seekg(1) alone won't&lt;br /&gt;    if ( strm.eof() )&lt;br /&gt;        cout &amp;lt;&amp;lt; &amp;quot;File exists and is empty.&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;    else&lt;br /&gt;        cout &amp;lt;&amp;lt; &amp;quot;File exists and contains data.&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;    cout &amp;lt;&amp;lt; &amp;quot;File doesn't exist.&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Reopen in R/W mode.&lt;br /&gt;strm.close();&lt;br /&gt;strm.clear();&lt;br /&gt;strm.open( fname, ios::in|ios::out|ios::trunc|ios::binary );&lt;br /&gt;strm.seekp(0);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt; &lt;br /&gt;&lt;!--- end text --&gt; &lt;br /&gt;            &lt;/font&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/corner_right.gif' width='15'&gt; &lt;br /&gt;                &lt;img src='imb/one_trans_pixel.gif' width='15' height='1' border='0'&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_left_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/bottom_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_right_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;a name='Redirecting Streams'&gt;&lt;/a&gt;&lt;br /&gt;&lt;table color='#dfc0c0' cellpadding='4' cellspacing='0' border='0' width='100%' align='center'&gt;&lt;tbody&gt; &lt;br /&gt;&lt;tr valign='top'&gt;&lt;td width='100%' align='left'&gt; &lt;br /&gt;    &lt;table width='100%' cellpadding='0' cellspacing='0' border='0'&gt;&lt;tbody&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_left_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='100%' background='imb/top_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_right_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td background='imb/corner_left.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/pixel.gif'&gt; &lt;br /&gt;            &lt;p&gt;&lt;/p&gt; &lt;br /&gt;            &lt;p align='center'&gt; &lt;br /&gt;            &lt;font face='Arial,Helvetica,sans-serif' size='4' color='#d00000'&gt;&lt;b&gt;Redirecting Streams&lt;/b&gt;&lt;/font&gt; &lt;br /&gt;            &lt;/p&gt; &lt;br /&gt;&lt;br /&gt;          &lt;font face='Arial,Helvetica,sans-serif'&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- begin text --&gt; &lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;To write a class that redirects a stream to something else, define your own&lt;br /&gt;streambuf class, then construct an ostream with pointer to the streambuf object.&lt;br /&gt;An example is in Nicolais Josuttis's STL book.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;A faux-pas is trying to derive from ostream (see prog/c++/streamRedirectionFauxPas.cc).&lt;br /&gt;One problem is that passing endl will result in a &amp;quot;bad cast&amp;qout; exception (g++ 3/4).&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;http://shekel.jct.ac.il/cc-res/online-doc/libgPP/iostream_28.html&lt;br /&gt;&lt;br&gt;http://www.lysator.liu.se/c/bs-errata-1.html&lt;br /&gt;&lt;br&gt;http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#6&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt; &lt;br /&gt;&lt;!--- end text --&gt; &lt;br /&gt;            &lt;/font&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/corner_right.gif' width='15'&gt; &lt;br /&gt;                &lt;img src='imb/one_trans_pixel.gif' width='15' height='1' border='0'&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_left_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/bottom_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_right_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;br /&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;a name='Defining Stream Out Operator'&gt;&lt;/a&gt;&lt;br /&gt;&lt;table color='#dfc0c0' cellpadding='4' cellspacing='0' border='0' width='100%' align='center'&gt;&lt;tbody&gt; &lt;br /&gt;&lt;tr valign='top'&gt;&lt;td width='100%' align='left'&gt; &lt;br /&gt;    &lt;table width='100%' cellpadding='0' cellspacing='0' border='0'&gt;&lt;tbody&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_left_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='100%' background='imb/top_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_right_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td background='imb/corner_left.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/pixel.gif'&gt; &lt;br /&gt;            &lt;p&gt;&lt;/p&gt; &lt;br /&gt;            &lt;p align='center'&gt; &lt;br /&gt;            &lt;font face='Arial,Helvetica,sans-serif' size='4' color='#d00000'&gt;&lt;b&gt;Defining operator&amp;lt;&amp;lt()&lt;/b&gt;&lt;/font&gt; &lt;br /&gt;            &lt;/p&gt; &lt;br /&gt;&lt;br /&gt;          &lt;font face='Arial,Helvetica,sans-serif'&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- begin text --&gt; &lt;br /&gt;&lt;br /&gt;The idea is to overload operator&amp;lt;&amp;lt;() with your user-defined type.&lt;br /&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;class Point&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;    int x, y;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;ostream&amp;&lt;br /&gt;operator&amp;lt;&amp;lt;( ostream&amp; strm, const Point&amp; obj )&lt;br /&gt;{&lt;br /&gt;    strm &amp;lt;&amp;lt; &amp;quot;(&amp;quot; &amp;lt;&amp;lt; obj.x &amp;lt;&amp;lt; &amp;quot;,&amp;quot; &amp;lt;&amp;lt; obj.y &amp;lt;&amp;lt; &amp;quot;)&amp;quot;;&lt;br /&gt;    return strm;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt; &lt;br /&gt;&lt;!--- end text --&gt; &lt;br /&gt;            &lt;/font&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/corner_right.gif' width='15'&gt; &lt;br /&gt;                &lt;img src='imb/one_trans_pixel.gif' width='15' height='1' border='0'&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_left_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/bottom_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_right_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;a name='Overloaded Operators'&gt;&lt;/a&gt;&lt;br /&gt;&lt;table color='#dfc0c0' cellpadding='4' cellspacing='0' border='0' width='100%' align='center'&gt;&lt;tbody&gt; &lt;br /&gt;&lt;tr valign='top'&gt;&lt;td width='100%' align='left'&gt; &lt;br /&gt;    &lt;table width='100%' cellpadding='0' cellspacing='0' border='0'&gt;&lt;tbody&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_left_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='100%' background='imb/top_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_right_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td background='imb/corner_left.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/pixel.gif'&gt; &lt;br /&gt;            &lt;p&gt;&lt;/p&gt; &lt;br /&gt;            &lt;p align='center'&gt; &lt;br /&gt;            &lt;font face='Arial,Helvetica,sans-serif' size='4' color='#d00000'&gt;&lt;b&gt;Overloaded Operators&lt;/b&gt;&lt;/font&gt; &lt;br /&gt;            &lt;/p&gt; &lt;br /&gt;&lt;br /&gt;          &lt;font face='Arial,Helvetica,sans-serif'&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- begin text --&gt; &lt;br /&gt;&lt;br /&gt;&lt;o&gt;&lt;br /&gt;Overloaded operators, except assignment, are inherited.&lt;br /&gt;But subtle compiler errors can occur.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Let's say you have two related classes that are logically different types,&lt;br /&gt;but are structurally equivalent (identical members).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;class Vertex&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;    Vertex&amp;amp; operator+( const Vertex&amp;amp; src );&lt;br /&gt;&lt;br /&gt;    float x, y, z;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;class WorldVertex : public Vertex&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Now try adding two derived objects:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;void Draw( const WorldVertex&amp;amp; v );&lt;br /&gt;&lt;br /&gt;WorldVertex v1, v2, v3;&lt;br /&gt;v3 = v1 + v2;      // compile error&lt;br /&gt;Draw( v1 + v2 );   // ok&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Some compilers will give obscure errors, leading you to think&lt;br /&gt;that you need to duplicate all the overloaded operator code&lt;br /&gt;into every derived class.  That wouldn't ideal.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;What's happening in &lt;code&gt;v3 = v1 + v2&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;is that Vertex::operator+() is called which returns a base Vertex object,&lt;br /&gt;not a derived WorldVertex object.&lt;br /&gt;You might think assigning a base object into a derived object is an immediate error.&lt;br /&gt;But the C++ compiler first tries to find the matching assignment operator&lt;br /&gt;such as Derived&amp;amp; operator=( const Base&amp;amp; ):&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;class WorldVertex : public Vertex&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;&lt;br /&gt;    WorldVertex&amp;amp; operator=( const Vertex&amp;amp; src )&lt;br /&gt;    {&lt;br /&gt;        x = src.x;&lt;br /&gt;        y = src.y;&lt;br /&gt;        z = src.z;&lt;br /&gt;        return *this;&lt;br /&gt;    }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Because these classes are structurally equivalent,&lt;br /&gt;Derived&amp; operator=( const Base&amp; ) does make sense,&lt;br /&gt;as it can simply copy .x, .y, .z.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;!--- end text --&gt; &lt;br /&gt;            &lt;/font&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/corner_right.gif' width='15'&gt; &lt;br /&gt;                &lt;img src='imb/one_trans_pixel.gif' width='15' height='1' border='0'&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_left_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/bottom_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_right_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;a name='Pitfalls'&gt;&lt;/a&gt;&lt;br /&gt;&lt;table color='#dfc0c0' cellpadding='4' cellspacing='0' border='0' width='100%' align='center'&gt;&lt;tbody&gt; &lt;br /&gt;&lt;tr valign='top'&gt;&lt;td width='100%' align='left'&gt; &lt;br /&gt;    &lt;table width='100%' cellpadding='0' cellspacing='0' border='0'&gt;&lt;tbody&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_left_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='100%' background='imb/top_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_right_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td background='imb/corner_left.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/pixel.gif'&gt; &lt;br /&gt;            &lt;p&gt;&lt;/p&gt; &lt;br /&gt;            &lt;p align='center'&gt; &lt;br /&gt;            &lt;font face='Arial,Helvetica,sans-serif' size='4' color='#d00000'&gt;&lt;b&gt;C++ Pitfalls &amp;amp; Traps&lt;/b&gt;&lt;/font&gt; &lt;br /&gt;            &lt;/p&gt; &lt;br /&gt;&lt;br /&gt;          &lt;font face='Arial,Helvetica,sans-serif'&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- begin text --&gt; &lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;C++ has a zillion pitfalls, this lists some of the worst.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- duhh, so obvious&lt;br /&gt;&lt;li&gt;delete vs. delete[]&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;The pitfall every C++ programmer falls into repeatedly.&lt;br /&gt;&lt;a href='http://www.valgrind.org'&gt;Valgrind&lt;/a&gt; can pull you out.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;--&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Reusing or abusing assignment operator=() in a copy constructor:&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;This pitfall exists with more complex classes whose members aren't fundamental types.&lt;br /&gt;Assignment operators should free members before reassigning them.&lt;br /&gt;If an operator=() that frees resources is called in a copy constructor,&lt;br /&gt;it will try to free garbage.  A solution is have separate Copy() and Free() methods.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;class Class&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;    Class( const Class&amp; src )&lt;br /&gt;    {&lt;br /&gt;       *this = src;      // the temptation to write terse code leads to a pitfall&lt;br /&gt;    }&lt;br /&gt;    Class&amp; operator=( const Class&amp; src )&lt;br /&gt;    {&lt;br /&gt;        delete mObj;     // free members&lt;br /&gt;        mObj = src.Obj;  // reassign members&lt;br /&gt;        return *this;&lt;br /&gt;    }&lt;br /&gt;private:&lt;br /&gt;    Class2*   mObj;&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Method overriding will fail if you forget to write virtual&lt;br /&gt;by a method in base class or the function signatures differ. &lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Calling a virtual method from a base constructor.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Think about the order of construction: the derived object hasn't been constructed yet.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Default copy constructors or assignment operators may cause trouble.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Safegaurds writing a dummy default copy constructor as private and/or with assert(0).&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;A constructor with a single arg might be misinterpreted as a conversion operator.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Use the keyword &lt;code&gt;explicit&lt;/code&gt; if conversion isn't desired.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;Class( int );&lt;br /&gt;int n;&lt;br /&gt;Class obj = n; // converts an int to a Class obj !!&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Temporary objects and reference args&lt;/li&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;void Byref( int&amp; x )&lt;br /&gt;{&lt;br /&gt;    ...&lt;br /&gt;    x = y;&lt;br /&gt;}&lt;br /&gt;Byref( a + 2 );   // oops, result went nowhere into a temp&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;operator bool()&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;operator bool() is seductive for tersely testing if an object is valid:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;class Data&lt;br /&gt;{&lt;br /&gt;public:&lt;br /&gt;    operator bool() const { return mValid; }&lt;br /&gt;private:&lt;br /&gt;    string mData;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;void Process( Data&amp; data )&lt;br /&gt;{&lt;br /&gt;    // Valid data?&lt;br /&gt;    if ( data )&lt;br /&gt;    {&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;Let's say two objects are valid but their values (members) differ.&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;if ( data0 == data1 ) return;&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;You'd think return won't happen.  But it will.&lt;br /&gt;This is what's compiled:&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;if ( bool(data0) == bool(data1) ) return;  // true == true&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;The pitfall is implicit conversion.&lt;br /&gt;The class doesn't define operator==().&lt;br /&gt;But the compiler doesn't supply a default memberwise comparison&lt;br /&gt;as you might assume.&lt;br /&gt;Rather, the compiler implicity converts both operands to bools.&lt;br /&gt;Because that's precisely what operator bool() is for.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- end text --&gt; &lt;br /&gt;            &lt;/font&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/corner_right.gif' width='15'&gt; &lt;br /&gt;                &lt;img src='imb/one_trans_pixel.gif' width='15' height='1' border='0'&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_left_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/bottom_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_right_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;a name='STL Pitfalls'&gt;&lt;/a&gt;&lt;br /&gt;&lt;table color='#dfc0c0' cellpadding='4' cellspacing='0' border='0' width='100%' align='center'&gt;&lt;tbody&gt; &lt;br /&gt;&lt;tr valign='top'&gt;&lt;td width='100%' align='left'&gt; &lt;br /&gt;    &lt;table width='100%' cellpadding='0' cellspacing='0' border='0'&gt;&lt;tbody&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_left_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='100%' background='imb/top_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_right_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td background='imb/corner_left.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/pixel.gif'&gt; &lt;br /&gt;            &lt;p&gt;&lt;/p&gt; &lt;br /&gt;            &lt;p align='center'&gt; &lt;br /&gt;            &lt;font face='Arial,Helvetica,sans-serif' size='4' color='#d00000'&gt;&lt;b&gt;STL Pitfalls &amp;amp; Traps&lt;/b&gt;&lt;/font&gt; &lt;br /&gt;            &lt;/p&gt; &lt;br /&gt;&lt;br /&gt;          &lt;font face='Arial,Helvetica,sans-serif'&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- begin text --&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;end()&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;for ( itr = files.begin(); itr &lt; files.end(); ++itr )  // WRONG&lt;br /&gt;for ( itr = files.begin(); itr != files.end(); ++itr ) // ok&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;reserve() vs. resize()&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;resize() expands the container -- reserve() doesn't!&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Incrementing iterators&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;while ( itr++ != files.end() ) // WRONG, itr incremented past end&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Short destination containers&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;This could be a bug if vec2 is shorter than vec.&lt;br /&gt;&lt;br&gt;copy() won't extend the destination container.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;  copy( vec.begin(), vec.end(),&lt;br /&gt;        vec2.begin() );&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;One solution is: vec2.resize( vec1.size() ).&lt;br /&gt;&lt;br&gt;Another is to use an insert iterator (insertor):&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;  copy( vec.begin(), vec.end(),&lt;br /&gt;        back_inserter(vec2) );&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Catenating a string with a char&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;  char baseName[] = "myfile";&lt;br /&gt;  string suffix = "txt";&lt;br /&gt;  string fileName = baseName + '.' + suffix;   // WRONG&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;This is wrong because the compiler misinterprets this as C's way&lt;br /&gt;of adding an integer to a pointer rather than as C++ string catenation.&lt;br /&gt;That is, the compiler's intepretation is:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;  string fileName = &amp;baseName[ int('.') ] + suffix;&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt; &lt;br /&gt;&lt;!--- end text --&gt; &lt;br /&gt;            &lt;/font&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/corner_right.gif' width='15'&gt; &lt;br /&gt;                &lt;img src='imb/one_trans_pixel.gif' width='15' height='1' border='0'&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_left_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/bottom_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_right_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;a name='C Preprocessor Tricks'&gt;&lt;/a&gt;&lt;br /&gt;&lt;table color='#dfc0c0' cellpadding='4' cellspacing='0' border='0' width='100%' align='center'&gt;&lt;tbody&gt; &lt;br /&gt;&lt;tr valign='top'&gt;&lt;td width='100%' align='left'&gt; &lt;br /&gt;    &lt;table width='100%' cellpadding='0' cellspacing='0' border='0'&gt;&lt;tbody&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_left_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='100%' background='imb/top_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_right_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td background='imb/corner_left.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/pixel.gif'&gt; &lt;br /&gt;            &lt;p&gt;&lt;/p&gt; &lt;br /&gt;            &lt;p align='center'&gt; &lt;br /&gt;            &lt;font face='Arial,Helvetica,sans-serif' size='4' color='#d00000'&gt;&lt;b&gt;C Preprocessor Tricks&lt;/b&gt;&lt;/font&gt; &lt;br /&gt;            &lt;/p&gt; &lt;br /&gt;&lt;br /&gt;          &lt;font face='Arial,Helvetica,sans-serif'&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- begin text --&gt; &lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Macro to expand a unique name:&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;font face='Courier,monospace'&gt;&lt;pre&gt;&lt;br /&gt;// Arcane indirect trick to give a variable a unique name.&lt;br /&gt;// Subtlety: If written on the same line, UNIQUE_NAME() expands the same name.&lt;br /&gt;#define UNIQUE_NAME__(NAME,LINE) NAME##LINE&lt;br /&gt;#define UNIQUE_NAME_(NAME,LINE)  UNIQUE_NAME__(NAME,LINE)&lt;br /&gt;#define UNIQUE_NAME(NAME)        UNIQUE_NAME_(NAME,__LINE__)&lt;br /&gt;&lt;/pre&gt;&lt;/font&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt; &lt;br /&gt;&lt;!--- end text --&gt; &lt;br /&gt;            &lt;/font&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/corner_right.gif' width='15'&gt; &lt;br /&gt;                &lt;img src='imb/one_trans_pixel.gif' width='15' height='1' border='0'&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_left_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/bottom_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_right_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;!-- ------------------------------------------------------------------------ --&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table color='#dfc0c0' cellpadding='4' cellspacing='0' border='0' width='40%' align='center'&gt;&lt;tbody&gt; &lt;br /&gt;&lt;tr valign='top'&gt;&lt;td width='100%' align='left'&gt; &lt;br /&gt;    &lt;table width='100%' cellpadding='0' cellspacing='0' border='0'&gt;&lt;tbody&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_left_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='100%' background='imb/top_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td width='15'&gt;&lt;img src='imb/corner_right_up.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td background='imb/corner_left.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/pixel.gif'&gt; &lt;br /&gt;&lt;br /&gt;          &lt;font face='Arial,Helvetica,sans-serif'&gt; &lt;br /&gt;&lt;br /&gt;&lt;!--- begin text --&gt; &lt;br /&gt;&lt;center&gt;&lt;font size='-1'&gt; &lt;br /&gt;&lt;a href='../'&gt;home&lt;/a&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;br&gt;&amp;copy; 2007 Jim Brooks &lt;br /&gt;&lt;br&gt; &lt;br /&gt;&lt;br /&gt;&lt;!-- hhmts start --&gt;Last modified: Thu May 24 14:11:14 EDT 2007 &lt;!-- hhmts end --&gt;&lt;br /&gt; &lt;br /&gt;&lt;/font&gt;&lt;/center&gt; &lt;br /&gt; &lt;br /&gt;&lt;!--- end text --&gt; &lt;br /&gt;            &lt;/font&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/corner_right.gif' width='15'&gt; &lt;br /&gt;                &lt;img src='imb/one_trans_pixel.gif' width='15' height='1' border='0'&gt; &lt;br /&gt;            &lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;        &lt;tr valign='top'&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_left_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td background='imb/bottom_line.gif'&gt;&lt;img src='imb/one_trans_pixel.gif' width='125' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;            &lt;td&gt;&lt;img src='imb/corner_right_down.gif' width='15' height='15' border='0'&gt;&lt;/td&gt; &lt;br /&gt;        &lt;/tr&gt; &lt;br /&gt;    &lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt; &lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;br /&gt;&lt;br /&gt;&lt;br&gt; &lt;br /&gt;&lt;font size='-5' face='Arial,sans-serif' color='#dfc0c0'&gt; &lt;br /&gt;keywords: C++ STL programming language, C++ STL resources, C++ tricks recipes, Standard Template Library, C++ common phrases expressions idioms, C++ code snippets, C++ pitfalls traps quirks caveats, programming tricks, GNU gcc g++,  &lt;br /&gt;&lt;/font&gt; &lt;br /&gt;   &lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-1577882849298291341?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/1577882849298291341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=1577882849298291341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1577882849298291341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1577882849298291341'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/11/c-tricks-from-jim-brooks.html' title='C++ tricks from Jim Brooks'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-8034359487135357460</id><published>2007-11-15T18:01:00.000-08:00</published><updated>2007-11-15T18:03:19.488-08:00</updated><title type='text'>What is embedded database</title><content type='html'>&lt;h1 class="documentFirstHeading"&gt;&lt;br /&gt;&lt;/h1&gt;&lt;h1 class="documentFirstHeading"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-weight: bold;"&gt;from dbazine.com&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/h1&gt;&lt;h1 class="documentFirstHeading"&gt;Embedded Database Primer&lt;/h1&gt;              &lt;div class="documentActions"&gt;     &lt;ul&gt;&lt;li&gt;             &lt;a href="http://www.dbazine.com/ofinterest/oi-articles/koopmann5/sendto_form"&gt;                              &lt;img src="http://www.dbazine.com/mail_icon.gif" alt="Send this page to somebody" title="Send this page to somebody" height="16" width="16" /&gt;             &lt;/a&gt;         &lt;/li&gt;&lt;li&gt;             &lt;a href="javascript:this.print();"&gt;                              &lt;img src="http://www.dbazine.com/print_icon.gif" alt="Print this page" title="Print this page" height="16" width="16" /&gt;             &lt;/a&gt;         &lt;/li&gt;&lt;/ul&gt;        &lt;/div&gt;              &lt;div class="documentDescription"&gt;by James F. Koopmann&lt;/div&gt;                            &lt;div class="plain"&gt;             &lt;h2&gt;Introduction&lt;/h2&gt; &lt;p&gt;If you’re anything like me, staying on top of current trends within the field of database administration is highly challenging at times. We are continually bombarded with new trends and technology that we cannot normally afford to try. For quite awhile, I have wondered what embedded databases were all about. I think of embedded databases as something small and contained in my cellular phone or as maintaining some information within my automobile. But what is the embedded database world really like? &lt;/p&gt; &lt;p&gt;I decided to reduce my learning curve and develop a primer about embedded databases by interviewing a vendor with this expertise. I posed a few high-level questions to &lt;strong&gt;Steve Wampler, Director of Database Marketing&lt;/strong&gt;, &lt;span class="link-external"&gt;&lt;a href="http://www.birdstep.com/"&gt;Birdstep Technology&lt;/a&gt;&lt;/span&gt; who has worked successfully with embedded databases for some time:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. What exactly defines an embedded database?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;We define an embedded database as a software component that is part of the application, not a separate running application. Its operations are invoked by the application. Another way to look at it is that embedded databases are embedded within an application.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. Can you explain to the layman how a database is embedded within an application?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;It is embedded either as in-line code or linked libraries. In either case, it's code that is executed only when invoked by the application.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. How long has the embedded database industry been around?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;More than 20 years — one could argue that since the beginning of software, embedded databases have been in existence.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. What drives the new features introduced in the embedded industry?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This is vendor-dependent. What you are seeing today is an application view for development — meaning features are being developed to do certain application tasks.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. What is the fastest growing business use for embedded databases?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;One of the hottest is automotive.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. Does the embedded database community compete with the larger RDBMS vendors and in what regards?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;In some cases, yes. One needs to look at the database market as a continuum with the embedded on one end and the enterprise on the other. There is a point in the continuum where the embedded databases are competing with the enterprise databases. Typically, this is a case where the plethora of features in enterprise databases is more important than the cost, size, and performance. These last three factors are the key advantage of embedded database over enterprise database. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. How do embedded databases differ from the typical relational databases such as Oracle, DB2, and SQL Server?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;These databases are big, expensive, and slow. They are general purpose because they must serve a wide range of applications and users. They tend to be separate running applications that are independent of the system application.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. What are the top three features or business solutions for embedded databases?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Performance, small size, and price.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. Are embedded databases relational?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Yes. There are databases that are hierarchical (network model, XML model) as well.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. What is the Network Data Model?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The relational database model establishes and maintains inter-record relationships through common data fields. The Network Database Model establishes inter-record relationships directly, through physical links between the related records, rather than through common data fields. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. What applications are better suited for embedded databases?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Application-specific systems that have no or limited human administration or interruption.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. What type of applications are not meant for embedded databases?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Large enterprise systems.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. Are there any instances where you have seen successful conversions from major RDBMS vendors to an embedded database system?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Usually in business automation systems where the database needs to handle large data, multiple users, but can't be too expensive and must be allowed to be redistributed by the developer.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. What are the administration duties for maintaining an embedded database environment?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;These are minimal because the application is usually the administrator.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. What are the tuning opportunities of an embedded database? Is there much a DBA can do for such a small footprint?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;It depends on the functionality of the database. In our case, tuning can come through cache management (performance), using SQL or Native API (performance), user-defined procedures and functions.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. How exactly do embedded databases speed time to delivery of applications and cut development costs?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Every software application manages data. In most cases, the data is managed in a flat file — and this is fine for these applications as long as they have a short life cycle and their data is stagnant. If the application is going to have a long life cycle and/or going to grow in its use, having a database management system is 100 times cheaper to buy than to build and in many years quicker to develop.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. How robust is the availability, reliability, and recoverability of embedded databases?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Very robust — because of their applications, this is a must.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. When I hear high performance for embedded databases I immediately think they surely cannot keep up with the “big boys” in relational databases. What can we expect as far as performance from an embedded database?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This is highly dependent on if the application is mostly reading, writing, updating, etc. Typically you can find order-of-magnitude better performance in embedded database. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Q. Are there any typical limits to the size of an embedded database such as data size, footprint, or instruction set?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;No.&lt;/p&gt; &lt;h2&gt;Conclusion&lt;/h2&gt; &lt;p&gt;Embedded databases differ from typical databases such as DB2, Oracle, and SQL Server in that it is completely integrated into the application or hardware device in such a way that the end-user has very little knowledge, if any, of its existence. Users and administrators are not burdened with time-consuming installations or maintenance as the database is literally packaged with the application and should be self maintaining. &lt;/p&gt; &lt;p&gt;Embedded databases are meant to run on many different platforms with various programming interfaces. The nature of embedding databases’ instruction sets being linked specifically within and for a specific application gives them a small footprint. A reduced instruction set allows them to achieve performance that is hard to beat. Surely, you wouldn’t want to put an Oracle instance within your cellular phone, but I might in my automobile.&lt;/p&gt; &lt;p align="center"&gt;--&lt;/p&gt; &lt;p&gt;&lt;strong&gt;James F. Koopmann&lt;/strong&gt; is dedicated to providing technical advantage and guidance to companies within information technology. Over the years, James has worked with a variety of database-centric software and tools vendors as strategist, architect, DBA, and performance expert. He is an accomplished author appearing regularly within printed publications across the Web, and speaking at local area User Groups as well as industry conferences. He may be reached at &lt;span class="link-mailto"&gt;&lt;a href="mailto:jkoopmann@pinehorse.com"&gt;jkoopmann@pinehorse.com&lt;/a&gt;&lt;/span&gt; or &lt;span class="link-external"&gt;&lt;a href="http://www.pinehorse.com/"&gt;www.pinehorse.com&lt;/a&gt;&lt;/span&gt;.&lt;br /&gt;&lt;/p&gt;         &lt;/div&gt;                    &lt;!--  &lt;span condition="creator" translate="box_created_by"&gt;     Created by   &lt;/span&gt; --&gt;&lt;!--  &lt;a href="#" condition="creator_home" attributes="href creator_home" content="creator"&gt;     bob   &lt;/a&gt; --&gt;    &lt;!--  &lt;span condition="not: creator_home" content="creator"&gt;     bob   &lt;/span&gt; --&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-8034359487135357460?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/8034359487135357460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=8034359487135357460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/8034359487135357460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/8034359487135357460'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/11/what-is-embedded-database.html' title='What is embedded database'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-7424655372132861225</id><published>2007-11-08T10:24:00.000-08:00</published><updated>2007-11-08T10:28:09.553-08:00</updated><title type='text'>Interesting People</title><content type='html'>I wish I could meet these fabulous people one day :)&lt;br /&gt;&lt;br /&gt;http://en.wikipedia.org/wiki/Eliot_Spitzer&lt;br /&gt;http://en.wikipedia.org/wiki/Shirley_Ann_Jackson&lt;br /&gt;http://en.wikipedia.org/wiki/Padmasree_Warrior&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-7424655372132861225?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/7424655372132861225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=7424655372132861225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7424655372132861225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/7424655372132861225'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/11/interesting-people.html' title='Interesting People'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-1771873472288231544</id><published>2007-11-01T23:52:00.000-07:00</published><updated>2007-11-01T23:55:57.800-07:00</updated><title type='text'>Good Investment Books</title><content type='html'>1. Intelligent Investor (Benjamin Graham)&lt;br /&gt;http://www.amazon.com/Intelligent-Investor-Book-Practical-Counsel/dp/B0002X1JKU/ref=pd_bbs_sr_1/104-2886434-5656728?ie=UTF8&amp;amp;s=books&amp;amp;qid=1193986477&amp;amp;sr=8-1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-1771873472288231544?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/1771873472288231544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=1771873472288231544' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1771873472288231544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1771873472288231544'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/11/good-investment-books.html' title='Good Investment Books'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-5657604515766500399</id><published>2007-06-21T12:27:00.000-07:00</published><updated>2007-06-21T12:28:26.712-07:00</updated><title type='text'>Prompt for linux</title><content type='html'>Hit upon the basics of linux shell, (will add more)&lt;br /&gt;&lt;br /&gt;1. &lt;span style=";font-family:Arial;font-size:85%;"  &gt;export PS1="[${LOGNAME}@$(hostname)] # "&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-5657604515766500399?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/5657604515766500399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=5657604515766500399' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5657604515766500399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/5657604515766500399'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/06/prompt-for-linux.html' title='Prompt for linux'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-1350813220066796861</id><published>2007-05-16T10:30:00.002-07:00</published><updated>2007-05-16T10:35:07.802-07:00</updated><title type='text'>Diff between only specified lines in unix</title><content type='html'>diff &lt; (sed '&lt;line1\&gt; line1,&lt;line2\&gt;line2!d'  &lt;file-1&gt;file1)  &lt; (sed 'line1,line2 !d&lt;line1\&gt;&lt;line2\&gt;'  &lt;file-2&gt;file2)&lt;/file-2&gt;&lt;/line2\&gt;&lt;/line1\&gt;&lt;/file-1&gt;&lt;/line2\&gt;&lt;/line1\&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-1350813220066796861?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/1350813220066796861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=1350813220066796861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1350813220066796861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/1350813220066796861'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/05/diff-between-only-specified-lines-in_2514.html' title='Diff between only specified lines in unix'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-4416173563105134656</id><published>2007-05-14T11:15:00.000-07:00</published><updated>2007-05-14T11:16:12.811-07:00</updated><title type='text'>Converting Numbers to Strings and Strings to Numbers in C++</title><content type='html'>http://www.parashift.com/c++-faq-lite/misc-technical-issues.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-4416173563105134656?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/4416173563105134656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=4416173563105134656' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4416173563105134656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4416173563105134656'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/05/converting-numbers-to-strings-and.html' title='Converting Numbers to Strings and Strings to Numbers in C++'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-4552139576686575761</id><published>2007-03-24T09:43:00.000-07:00</published><updated>2007-03-24T09:44:50.971-07:00</updated><title type='text'>Managing C++ Objects</title><content type='html'>http://billharlan.com/pub/papers/Managing_Cpp_Objects.html&lt;br /&gt;&lt;br /&gt;Managing C++ Objects&lt;br /&gt;&lt;br /&gt;Here are some guidelines I have found useful for writing C++ classes. There are many good books on the subject, but they have not been sufficient to keep me out of trouble. The first time I returned to writing C++ after a year of writing Java, I was appalled at how much my design was constrained by managing the lifetime of objects. When C++ classes share objects, then they must negotiate who owns the object. Garbage collection is not available, and smart pointers often fall short.&lt;br /&gt;§    Simple constructors&lt;br /&gt;&lt;br /&gt;If your preferred constructor takes arguments, then define a default constructor (no arguments) and make it protected. Derived classes will require this method.&lt;br /&gt;&lt;br /&gt;Define protected initialization methods void init(...) with arguments, and call them from your preferred constructors. Each initialization method should set all member variables to a valid state, without relying on constructor initialization blocks. Use these initialization methods from your public copy constructor and assignment operator, if required.&lt;br /&gt;&lt;br /&gt;Remove everything from constructor initialization blocks except the simplest constructor of a superclass (preferably a default constructor). Call protected superclass initialization methods from the subclass initialization methods. Make initialization methods non-virtual to avoid hiding by derived classes (since the name will always be init(...).)&lt;br /&gt;&lt;br /&gt;All init(...) methods should first call the init() equivalent of a default constructor, to initialize all member pointers, perhaps to nulls. If your constructor fails and throws an exception, then the destructor can be called safely.&lt;br /&gt;&lt;br /&gt;Your constructors will now be much more flexible and robust. Derived class constructors can manipulate their arguments before initializing the superclass. (Superclass constructors can only be called in initialization blocks.) Within a single class, you can share more initialization between alternative constructors. You need not worry about the order of initialization blocks.&lt;br /&gt;§    Implement "The Big Three"&lt;br /&gt;&lt;br /&gt;Always define a copy constructor and an assignment operator. Don't let anyone use the default implementations. If your class contains pointers to objects which your class does not plan to delete, then just make these two methods private, without an implementation. Do not implement versions that make shallow copies. You do not want a user to accidentally make copies on the stack if required to call a non-copy constructor or clone method instead. Making copies of objects should be a very deliberate step Conversion operators (single-argument constructors) can be dangerous for the same reason.&lt;br /&gt;&lt;br /&gt;Define a virtual destructor unless you never want anyone to derive from your class. Define a protected non-virtual void dispose() method that deletes the object's resources, then call this method from your destructor. (This is the destructor equivalent of an init() method.) You can use this method in assignment operators, initialization, and derived classes.&lt;br /&gt;§    No references as members&lt;br /&gt;&lt;br /&gt;A class member should never be a reference, whether const or non-const. A member's object reference can only be set in the initialization block of a constructor. You will not be able to set a reference member in an initialization method. A reference permanently prevents your class from replacing the object dynamically.&lt;br /&gt;§    Optional ownership&lt;br /&gt;&lt;br /&gt;If a constructor or initialization method takes a non-const object as an argument, then you must decide whether this wrapper class will assume ownership of this object. The destructor of a Bridge or Decorator class might need to delete the contained object. Or maybe not. If you have any doubt, then the constructor should allow the user to choose.&lt;br /&gt;§    No pointers as arguments&lt;br /&gt;&lt;br /&gt;Pass all objects to class methods and constructors as references. There is absolutely no advantage to passing objects as pointers. This rule is equally valid whether the objects are const or not.&lt;br /&gt;&lt;br /&gt;I've already recommended that all class members be saved as pointers. You can easily take the address of an argument reference (with an ampersand) and assign it to your member pointer. Some C++ programmers do not seem to realize that the address of a reference is the same as the address of the original object. So they pass pointers when they want to save the argument, and references when they do not. This is a poor form of documentation, based on a misunderstanding.&lt;br /&gt;&lt;br /&gt;If an object is passed to a constructor or initialization method, the user can expect the class to hang onto it. If a method saves an object from an argument, choose an appropriate name, like setColor(Color&amp;) or addInterpolator(Interpolator&amp;).&lt;br /&gt;&lt;br /&gt;The worst excuse for using a pointer as an argument is that you want to give it a default value of null (0). You still have to document what a null object is supposed to mean. Worse, the user may overlook that the argument exists or is optional. Declare a separate method that lacks the extra argument. The effort is negligible.&lt;br /&gt;§    Returning objects&lt;br /&gt;&lt;br /&gt;One can always return objects from class methods by reference, either const or non-const. A user can take the address of the reference, if necessary, to save the object. But there are no drawbacks to returning objects always as pointers. Consistency is preferable, and most API's return pointers.&lt;br /&gt;&lt;br /&gt;If you return an object allocated on the heap (with a new), then be clear who has ownership of the object--your class, the recipient, or a third party.&lt;br /&gt;&lt;br /&gt;Think about whether you are breaking encapsulation of member data in a way that will prevent modification later.&lt;br /&gt;&lt;br /&gt;Never return a reference to a class member allocated on the stack in the header file. If your class replaces the value, then the user may be left with an invalid reference, even though your object still exists. (Other reasons: Your class will never be able to remove the object as a member. A user may manipulate the logic of your class in unexpected ways.)&lt;br /&gt;&lt;br /&gt;A method should modify an object constructed by the user by accepting it as a non-const reference. Returning the same object would be redundant and confusing.&lt;br /&gt;§    Clean header files&lt;br /&gt;&lt;br /&gt;A header file ideally includes only the header file of super-classes or of standard C++ libraries. All other classes can be forward declared, like class ClassName; or template class ClassName;. Forward declarations will greatly simplify your "make" dependencies and speed your builds. Repairs will be easier.&lt;br /&gt;&lt;br /&gt;Member variables that are saved by value require your header to include another header file. Consider allocating such members on the heap, even if you must delete them in the destructor. Save member objects by value only when the default constructor creates a lightweight object with a useful state.&lt;br /&gt;&lt;br /&gt;If you have reasons to put your entire implementation in the header file, then of course you cannot take advantage of forward declarations.&lt;br /&gt;§    Write more Java&lt;br /&gt;&lt;br /&gt;When you get a chance, write more Java to free your mind of such distractions. Your C++ will improve.&lt;br /&gt;§    Examples&lt;br /&gt;&lt;br /&gt;See an illustration of some of these patterns in [ ../code/cpp_prototype ] .&lt;br /&gt;&lt;br /&gt;Bill Harlan&lt;br /&gt;&lt;br /&gt;1998&lt;br /&gt;&lt;br /&gt; Revision: 1.21 2004/09/14 18:01:26 harlan Exp $ &lt;br /&gt;&lt;br /&gt;Return to parent directory.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-4552139576686575761?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/4552139576686575761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=4552139576686575761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4552139576686575761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/4552139576686575761'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/03/managing-c-objects.html' title='Managing C++ Objects'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-116855719618313250</id><published>2007-01-11T15:12:00.000-08:00</published><updated>2007-01-11T15:13:16.663-08:00</updated><title type='text'>Process start time in Unix</title><content type='html'>To find the start time of a process in unix use&lt;br /&gt;&lt;br /&gt;ps -fu &lt;pid&gt;&lt;br /&gt;&lt;br /&gt;zgrep "tosearch" *.gx | tr ',' '\12' | grep "tosearch"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-116855719618313250?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/116855719618313250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=116855719618313250' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116855719618313250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116855719618313250'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/01/process-start-time-in-unix.html' title='Process start time in Unix'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-116849913636977404</id><published>2007-01-10T23:04:00.000-08:00</published><updated>2007-01-10T23:05:36.796-08:00</updated><title type='text'>Thread Safe and Thread Aware</title><content type='html'>From codeproject.com(http://www.codeproject.com/csharp/syncroot.asp)&lt;br /&gt;&lt;br /&gt;Thread aware:&lt;br /&gt;&lt;br /&gt;At any given time, at most one thread can be active on the object. The object is aware of the threads around it and protects itself from the threads by putting all the threads in a queue. Since there can be only a single thread active on the object at any given time, the object will always preserve its state. There will not be any synchronization problems.&lt;br /&gt;Thread safe:&lt;br /&gt;&lt;br /&gt;At a given time, multiple threads can be active on the object. The object knows how to deal with them. It has properly synchronized access to its shared resources. It can preserve its state data in this multi-threaded environment (i.e. it will not fall into intermediate and/or indeterminate states). It is safe to use this object in a multi-threaded environment.&lt;br /&gt;&lt;br /&gt;Using an object that is neither thread-aware nor thread-safe may result in getting incorrect and random data and mysterious exceptions (due to trying to access the object when it is being used by a thread and is in an unstable, in-between state at the instant of access of the second thread).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-116849913636977404?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/116849913636977404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=116849913636977404' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116849913636977404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116849913636977404'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/01/thread-safe-and-thread-aware.html' title='Thread Safe and Thread Aware'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-116839649326801209</id><published>2007-01-09T18:34:00.000-08:00</published><updated>2007-01-09T18:34:53.660-08:00</updated><title type='text'>Efficient VIM editing</title><content type='html'>http://jmcpherson.org/editing.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-116839649326801209?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/116839649326801209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=116839649326801209' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116839649326801209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116839649326801209'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2007/01/efficient-vim-editing.html' title='Efficient VIM editing'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-116528316154601704</id><published>2006-12-04T17:45:00.001-08:00</published><updated>2006-12-04T17:46:01.653-08:00</updated><title type='text'>Good Hash Discussion</title><content type='html'>http://burtleburtle.net/bob/hash/doobs.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-116528316154601704?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/116528316154601704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=116528316154601704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116528316154601704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116528316154601704'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/12/good-hash-discussion_04.html' title='Good Hash Discussion'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-116500160471097315</id><published>2006-12-01T11:33:00.000-08:00</published><updated>2006-12-01T11:33:59.573-08:00</updated><title type='text'>Timers in C#</title><content type='html'>From msdn2.microsoft.com&lt;br /&gt;private void CreateTimer()&lt;br /&gt;{&lt;br /&gt;    System.Timers.Timer Timer1 = new System.Timers.Timer();&lt;br /&gt;    Timer1.Enabled = true;&lt;br /&gt;    Timer1.Interval = 5000;&lt;br /&gt;    Timer1.Elapsed +=&lt;br /&gt;       new System.Timers.ElapsedEventHandler(Timer1_Elapsed);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void Timer1_Elapsed(object sender,&lt;br /&gt;System.Timers.ElapsedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    System.Windows.Forms.MessageBox.Show("Elapsed!",&lt;br /&gt;       "Timer Event Raised!");&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-116500160471097315?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/116500160471097315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=116500160471097315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116500160471097315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116500160471097315'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/12/timers-in-c.html' title='Timers in C#'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-116474179593709129</id><published>2006-11-28T11:20:00.000-08:00</published><updated>2006-11-28T11:23:16.376-08:00</updated><title type='text'>Berkeley DB</title><content type='html'>From : http://pybsddb.sourceforge.net/ref/intro/terrain.html&lt;br /&gt;1. Berkeley DB is an embedded database that supports fairly simple data access with a rich set of data management services&lt;br /&gt;&lt;br /&gt;Data access in this context means&lt;br /&gt;a) insert b)update c)search d)delete&lt;br /&gt;Data management in this context means that &lt;br /&gt;a)Concurrency b)Transactions c)Recovery&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-116474179593709129?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/116474179593709129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=116474179593709129' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116474179593709129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116474179593709129'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/11/berkeley-db.html' title='Berkeley DB'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-116250990358298467</id><published>2006-11-02T15:24:00.000-08:00</published><updated>2006-11-02T15:25:04.203-08:00</updated><title type='text'>Unix Ports</title><content type='html'>From Google groups&lt;br /&gt;&lt;br /&gt;netstat -lp&lt;br /&gt;&lt;br /&gt;It will tell you which task is listening on the port.&lt;br /&gt;&lt;br /&gt;fuser -v -n tcp 32768&lt;br /&gt;&lt;br /&gt;Will tell you which task is listening on the specified port and under&lt;br /&gt;which account it's running.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-116250990358298467?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/116250990358298467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=116250990358298467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116250990358298467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116250990358298467'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/11/unix-ports.html' title='Unix Ports'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-116219882445455193</id><published>2006-10-30T00:59:00.000-08:00</published><updated>2006-10-30T01:01:13.990-08:00</updated><title type='text'>IE6 duh?</title><content type='html'>urns out, IE doesn't like the script tags if they are using element minimization. I got the page rendering just as I intended by changing the tag to look like this:&lt;br /&gt;&lt;br /&gt;&lt;!--&lt;script language="javascript" type="text/javascript" src="script.js"&gt;&lt;/script&gt; --&gt;&lt;br /&gt;&lt;br /&gt;Doing some research, I came across this post in theList by Eric Vitiello which clarifies this more. Apparently the DTD declaration for the script tag says &lt;!ELEMENT script (#PCDATA)&gt;, and the XHTML specs says (under Appendix C. 3):&lt;br /&gt;&lt;br /&gt;    Given an empty instance of an element whose content model is not EMPTY (for example, an empty title or paragraph) do not use the minimized form (e.g. use &lt;p&gt; &lt;/p&gt; and not &lt;p /&gt;).&lt;br /&gt;&lt;br /&gt;So, I guess this isn't really a bug in IE. I'd think instead, that this is a bug in the DTD itself. The script tag doesn't have to contain #PCDATA (in fact, I consider it graceful if it doesn't), and forcing it is, well, stupid.&lt;br /&gt;&lt;br /&gt;For now, I am explicitly closing the script tag with a seperate closing tag, and everything seems to be working well. Does anyone have any idea about handling this better, preferably with minimized element closures&lt;br /&gt;&lt;br /&gt;stolen from piecesofrakesh.blogspot.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-116219882445455193?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/116219882445455193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=116219882445455193' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116219882445455193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116219882445455193'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/10/ie6-duh.html' title='IE6 duh?'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-116165712115064379</id><published>2006-10-23T19:31:00.000-07:00</published><updated>2006-10-23T19:32:01.666-07:00</updated><title type='text'>When do you need a pointer to a reference?</title><content type='html'>From C++ groups&lt;br /&gt;&gt; Why/when would someone need a pointer to a reference?&lt;br /&gt;&lt;br /&gt;Never. A reference is another name for a real thing. A pointer can only&lt;br /&gt;point to a real thing - it can't point to a name for a real thing.&lt;br /&gt;&lt;br /&gt;References are often implemented as secret pointers, but it breaks the&lt;br /&gt;language if you try to get a handle on this secret pointer - it is an&lt;br /&gt;implementation detail.&lt;br /&gt;&lt;br /&gt;If you meant a reference to a pointer, use this when you need something to&lt;br /&gt;grab your pointer, point it to something else, and give the result back to&lt;br /&gt;you. Consider a parser that reads statements written by the user:&lt;br /&gt;&lt;br /&gt;        WORD_TYPE getWord (char *&amp;statement);&lt;br /&gt;&lt;br /&gt;Each time you call this function it finds a word, returns its type, and&lt;br /&gt;points the pointer off the end of the word.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-116165712115064379?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/116165712115064379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=116165712115064379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116165712115064379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116165712115064379'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/10/when-do-you-need-pointer-to-reference.html' title='When do you need a pointer to a reference?'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-116133019950269611</id><published>2006-10-20T00:42:00.000-07:00</published><updated>2006-10-20T00:43:19.753-07:00</updated><title type='text'>VIM split</title><content type='html'>Vim viewport keybinding quick reference&lt;br /&gt;&lt;br /&gt;:sp will split the Vim window horizontally. Can be written out entirely as :split .&lt;br /&gt;&lt;br /&gt;:vsp will split the Vim window vertically. Can be written out as :vsplit .&lt;br /&gt;&lt;br /&gt;Ctrl-w Ctrl-w moves between Vim viewports.&lt;br /&gt;&lt;br /&gt;Ctrl-w j moves one viewport down.&lt;br /&gt;&lt;br /&gt;Ctrl-w k moves one viewport up.&lt;br /&gt;&lt;br /&gt;Ctrl-w h moves one viewport to the left.&lt;br /&gt;&lt;br /&gt;Ctrl-w l moves one viewport to the right.&lt;br /&gt;&lt;br /&gt;Ctrl-w = tells Vim to resize viewports to be of equal size.&lt;br /&gt;&lt;br /&gt;Ctrl-w - reduce active viewport by one line.&lt;br /&gt;&lt;br /&gt;Ctrl-w + increase active viewport by one line.&lt;br /&gt;&lt;br /&gt;Ctrl-w q will close the active window.&lt;br /&gt;&lt;br /&gt;Ctrl-w r will rotate windows to the right.&lt;br /&gt;&lt;br /&gt;Ctrl-w R will rotate windows to the left.&lt;br /&gt;&lt;br /&gt;From Linux.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-116133019950269611?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/116133019950269611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=116133019950269611' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116133019950269611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116133019950269611'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/10/vim-split.html' title='VIM split'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-116129478670949321</id><published>2006-10-19T14:52:00.000-07:00</published><updated>2006-10-19T14:54:39.396-07:00</updated><title type='text'>Javascript :quirkmodes.org</title><content type='html'>http://www.quirkmodes.org&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-116129478670949321?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/116129478670949321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=116129478670949321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116129478670949321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/116129478670949321'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/10/javascript-quirkmodesorg.html' title='Javascript :quirkmodes.org'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115920520142712008</id><published>2006-09-25T10:26:00.000-07:00</published><updated>2006-09-25T10:26:42.096-07:00</updated><title type='text'>CRON</title><content type='html'>&lt;span style="font-weight:bold;"&gt;minute hour dom month dow user cmd&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;minute This controls what minute of the hour the command will run on,&lt;br /&gt;  and is between '0' and '59'&lt;br /&gt;hour This controls what hour the command will run on, and is specified in&lt;br /&gt;         the 24 hour clock, values must be between 0 and 23 (0 is midnight)&lt;br /&gt;dom This is the Day of Month, that you want the command run on, e.g. to&lt;br /&gt;  run a command on the 19th of each month, the dom would be 19.&lt;br /&gt;month This is the month a specified command will run on, it may be specified&lt;br /&gt;  numerically (0-12), or as the name of the month (e.g. May)&lt;br /&gt;dow This is the Day of Week that you want a command to be run on, it can&lt;br /&gt;  also be numeric (0-7) or as the name of the day (e.g. sun).&lt;br /&gt;user This is the user who runs the command.&lt;br /&gt;cmd This is the command that you want run. This field may contain &lt;br /&gt;  multiple words or spaces.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115920520142712008?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115920520142712008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115920520142712008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115920520142712008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115920520142712008'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/09/cron.html' title='CRON'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115888814367049114</id><published>2006-09-21T18:21:00.000-07:00</published><updated>2006-09-21T18:23:03.770-07:00</updated><title type='text'>AJAX the Diagram</title><content type='html'>http://www.adaptivepath.com/images/publications/essays/ajax-fig1.png&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115888814367049114?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115888814367049114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115888814367049114' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115888814367049114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115888814367049114'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/09/ajax-diagram.html' title='AJAX the Diagram'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115620148541356596</id><published>2006-08-21T16:04:00.000-07:00</published><updated>2006-08-21T16:11:25.146-07:00</updated><title type='text'>STL:Map</title><content type='html'>from metashell.com&lt;br /&gt;#pragma warning(disable: 4786)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include &lt;iostream&gt;&lt;br /&gt;#include &lt;string&gt;&lt;br /&gt;#include &lt;!map!&gt;&lt;br /&gt;&lt;br /&gt;using namespace std;&lt;br /&gt;&lt;br /&gt;int main() {&lt;br /&gt;         map &lt;string, int&gt; ass_array;&lt;br /&gt;&lt;br /&gt;        // Assign keys and values&lt;br /&gt;&lt;br /&gt;        ass_array["fat"] = 0;&lt;br /&gt;        ass_array["sodium"] = 45;&lt;br /&gt;        ass_array["totalcarb"] = 46;&lt;br /&gt;        ass_array["protien"] = 0;&lt;br /&gt;&lt;br /&gt;        // Insert Value&lt;br /&gt;&lt;br /&gt;        ass_array.insert( map&lt;string, int&gt;::value_type( "potassium", 25 ) );&lt;br /&gt;&lt;br /&gt;        // Print value of sodium&lt;br /&gt;&lt;br /&gt;        cout &lt;&lt; ass_array["sodium"] &lt;&lt; endl;&lt;br /&gt;        cout &lt;&lt; "The map has " &lt;&lt; ass_array.size() &lt;&lt; " entries.\n";&lt;br /&gt;&lt;br /&gt;        // Iterator used to hold position in the map&lt;br /&gt;&lt;br /&gt;        map&lt;string,int&gt;::iterator loc;&lt;br /&gt;&lt;br /&gt;        // Returns same value as ass_array.end() if not find.&lt;br /&gt;&lt;br /&gt;        loc = ass_array.find("sugar");&lt;br /&gt;&lt;br /&gt;        if(loc != ass_array.end())&lt;br /&gt;                cout &lt;&lt; "Sugar found!\n";&lt;br /&gt;        else&lt;br /&gt;                cout &lt;&lt; "No Sugar\n";&lt;br /&gt;&lt;br /&gt;        return 0; &lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115620148541356596?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115620148541356596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115620148541356596' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115620148541356596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115620148541356596'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/08/stlmap.html' title='STL:Map'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115618879851468239</id><published>2006-08-21T12:32:00.000-07:00</published><updated>2006-08-21T12:33:26.720-07:00</updated><title type='text'>STL:Sort</title><content type='html'>From msoe.edu&lt;br /&gt;&lt;br /&gt;#include &lt;vector&gt;&lt;br /&gt;#include &lt;algorithm&gt;  // Include algorithms&lt;br /&gt;using namespace std;&lt;br /&gt;&lt;br /&gt;vector&lt;int&gt; vec;&lt;br /&gt;vec.push_back (10);&lt;br /&gt;vec.push_back (3);&lt;br /&gt;vec.push_back (7);&lt;br /&gt;&lt;br /&gt;sort(vec.begin(), vec.end()); // Sort the vector&lt;br /&gt;&lt;br /&gt;// The vector now contains: 3, 7, 10&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115618879851468239?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115618879851468239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115618879851468239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115618879851468239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115618879851468239'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/08/stlsort.html' title='STL:Sort'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115618871299752846</id><published>2006-08-21T12:31:00.000-07:00</published><updated>2006-08-21T12:31:53.303-07:00</updated><title type='text'>STL: find</title><content type='html'>list&lt;int&gt; nums;&lt;br /&gt;list&lt;int&gt;::iterator nums_iter;&lt;br /&gt;&lt;br /&gt;nums.push_back (3);&lt;br /&gt;nums.push_back (7);&lt;br /&gt;nums.push_front (10);&lt;br /&gt;&lt;br /&gt;nums_iter = find(nums.begin(), nums.end(), 3); // Search the list.&lt;br /&gt;if (nums_iter != nums.end())&lt;br /&gt;{&lt;br /&gt;    cout &lt;&lt; "Number " &lt;&lt; (*nums_iter) &lt;&lt; " found." &lt;&lt; endl; // 3&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;    cout &lt;&lt; "Number not found." &lt;&lt; endl;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115618871299752846?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115618871299752846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115618871299752846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115618871299752846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115618871299752846'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/08/stl-find.html' title='STL: find'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115567802147179762</id><published>2006-08-15T14:39:00.000-07:00</published><updated>2006-08-15T14:40:28.810-07:00</updated><title type='text'>Sharing mouse and keyboard between two computers with different operating system</title><content type='html'>from http://synergy2.sourceforge.net&lt;br /&gt;&lt;br /&gt;Running Synergy&lt;br /&gt;&lt;br /&gt;Synergy lets you use one keyboard and mouse across multiple computers. To do so it requires that all the computers are connected to each other via TCP/IP networking. Most systems come with this installed.&lt;br /&gt;&lt;br /&gt;Step 1 - Choose a server&lt;br /&gt;&lt;br /&gt;The first step is to pick which keyboard and mouse you want to share. The computer with that keyboard and mouse is called the "primary screen" and it runs the synergy server. All of the other computers are "secondary screens" and run the synergy client.&lt;br /&gt;&lt;br /&gt;Step 2 - Install the software&lt;br /&gt;&lt;br /&gt;Second, you install the software. Choose the appropriate package and install it. For example, on Windows you would run SynergyInstaller. You must install the software on all the computers that will share the mouse and keyboard (clients and server). On OS X you'll just have a folder with some documentation and two programs. You can put this folder anywhere.&lt;br /&gt;&lt;br /&gt;Step 3 - Configure and start the server&lt;br /&gt;&lt;br /&gt;Next you configure the server. You'll tell synergy the name of the primary and secondary screens, which screens are next to which, and choose desired options. On Windows there's a dialog box for setting the configuration. On other systems you'll create a simple text file.&lt;br /&gt;&lt;br /&gt;Note that when you tell synergy that screen A is to the left of screen B this does not imply that B is to the right of A. You must explicitly indicate both relations. If you don't do both then when you're running synergy you'll find you're unable to leave one of the screens.&lt;br /&gt;&lt;br /&gt;Windows&lt;br /&gt;On Windows run synergy by double clicking on the synergy file. This brings up a dialog. Configure the server:&lt;br /&gt;&lt;br /&gt;    * Click the Share this computer's keyboard and mouse (server) radio button&lt;br /&gt;    * Click the Screens &amp; Links Configure... button&lt;br /&gt;    * Click the + button to add the server to the Screens list&lt;br /&gt;          o Enter the name of server (the computer's name is the recommended name)&lt;br /&gt;          o Optionally enter other names the server is known by&lt;br /&gt;          o Click OK &lt;br /&gt;    * Use the + button to add your other computers&lt;br /&gt;          o Using a computer's name as its screen name is recommended&lt;br /&gt;          o Choose desired screen options on the Add Screen dialog &lt;br /&gt;    * Use the controls under Links to link screens together&lt;br /&gt;          o Click (once) on the server's name in the Screens list&lt;br /&gt;          o Choose the screen to the left of the server; use --- if there is no screen to the left of the server&lt;br /&gt;          o Choose the screens to the right, above and below the server&lt;br /&gt;          o Repeat the above steps for all the other screens &lt;br /&gt;    * Click OK to close the Screens &amp; Links dialog&lt;br /&gt;    * Use Options... to set desired options&lt;br /&gt;    * If the server's screen name is not the server's computer name:&lt;br /&gt;          o Click Advanced...&lt;br /&gt;          o Enter the server's screen name next to Screen Name&lt;br /&gt;          o Click OK &lt;br /&gt;&lt;br /&gt;Now click Test. The server will start and you'll see a console window with log messages telling you about synergy's progress. If an error occurs you'll get one or more dialog boxes telling you what the errors are; read the errors to determine the problem then correct them and try Test again. See Step 5 for typical errors.&lt;br /&gt;&lt;br /&gt;Unix or Mac OS X&lt;br /&gt;Create a text file named synergy.conf with the following:&lt;br /&gt;&lt;br /&gt;    section: screens&lt;br /&gt;       screen1:&lt;br /&gt;       screen2:&lt;br /&gt;    end&lt;br /&gt;    section: links&lt;br /&gt;       screen1:&lt;br /&gt;           right = screen2&lt;br /&gt;       screen2:&lt;br /&gt;           left = screen1&lt;br /&gt;    end&lt;br /&gt;&lt;br /&gt;Replace each occurrence of screen1 with the host name of the primary screen computer (as reported by the hostname program) and screen2 with the host name of a secondary screen computer. In the above example, screen2 is to the right of screen1 and screen1 is to the left of screen2. If necessary you should replace right and left with left, right, up, or down. If you have more than two computers you can add those too: add each computer's host name in the screens section and add the appropriate links. See the configuration guide for more configuration possibilities.&lt;br /&gt;&lt;br /&gt;Now start the server. Normally synergy wants to run "in the background." It detaches from the terminal and doesn't have a visible window, effectively disappearing from view. Until you're sure your configuration works, you should start synergy "in the foreground" using the -f command line option.&lt;br /&gt;&lt;br /&gt;On unix type the command below in a shell. If synergys is not in your PATH then use the full pathname.&lt;br /&gt;&lt;br /&gt;    synergys -f --config synergy.conf&lt;br /&gt;&lt;br /&gt;On OS X open Terminal in the Utilities folder in the Applications folder. Drag the synergys program from the synergy folder onto the Terminal window. The path to the synergys program will appear. Add the following to the same line, type a space at the end of the line but don't press enter:&lt;br /&gt;&lt;br /&gt;    -f --config &lt;br /&gt;&lt;br /&gt;Now drag the synergy.conf file onto the Terminal window and press enter. Check the reported messages for errors. Use ctrl+c to stop synergy if it didn't stop automatically, correct any problems, and start it again.&lt;br /&gt;&lt;br /&gt;Step 4 - Start the clients&lt;br /&gt;&lt;br /&gt;Next you start the client on each computer that will share the server's keyboard and mouse.&lt;br /&gt;&lt;br /&gt;Windows&lt;br /&gt;On Windows run synergy by double clicking on the synergy file. This brings up a dialog. Configure the client:&lt;br /&gt;&lt;br /&gt;    * Click the Use another computer's shared keyboard and mouse (client) radio button&lt;br /&gt;    * Enter the server's computer name next to Other Computer's Host Name&lt;br /&gt;          o This is not the server's screen name, unless you made that the server's host name as recommended &lt;br /&gt;    * If the client's screen name is not the client's computer name:&lt;br /&gt;          o Click Advanced...&lt;br /&gt;          o Enter the client's screen name next to Screen Name&lt;br /&gt;          o Click OK &lt;br /&gt;&lt;br /&gt;Now click Test.&lt;br /&gt;&lt;br /&gt;Unix or Mac OS X&lt;br /&gt;To start a client on unix, enter the following:&lt;br /&gt;&lt;br /&gt;    synergyc -f server-host-name&lt;br /&gt;&lt;br /&gt;where server-host-name is replaced by the host name of the computer running the synergy server. If synergyc is not in your PATH then use the full pathname.&lt;br /&gt;&lt;br /&gt;On OS X open Terminal in the Utilities folder in the Applications folder. Drag the synergyc program from the synergy folder onto the Terminal window. The path to the synergys program will appear. Add the following to the same line and press enter:&lt;br /&gt;&lt;br /&gt;    -f server-host-name&lt;br /&gt;&lt;br /&gt;When you added the client to the server's configuration you chose a name for the client. If that name was not client's host name then you must tell the client the name you used. Instead of the above command use this instead:&lt;br /&gt;&lt;br /&gt;    synergyc -f --name name server-host-name&lt;br /&gt;&lt;br /&gt;where name is the name for the client in the server's configuration. (On OS X drag the synergyc program to the Terminal window rather than typing synergyc.)&lt;br /&gt;&lt;br /&gt;Step 5 - Test&lt;br /&gt;&lt;br /&gt;Clients should immediately report a successful connection or one or more error messages. Some typical problems and possible solutions are below. See the troubleshooting and the FAQ pages for more help.&lt;br /&gt;&lt;br /&gt;    * failed to open screen (X11 only)&lt;br /&gt;&lt;br /&gt;      Check permission to open the X display;&lt;br /&gt;      check that the DISPLAY environment variable is set&lt;br /&gt;      use the --display command line option.&lt;br /&gt;&lt;br /&gt;    * address already in use&lt;br /&gt;&lt;br /&gt;      Another program (maybe another copy of synergy) is using the synergy port; stop the other program or choose a different port in the Advanced... dialog. If you change the port you must make the same change on all of the clients, too.&lt;br /&gt;&lt;br /&gt;    * connection forcefully rejected&lt;br /&gt;&lt;br /&gt;      The synergy client successfully contacted the server but synergy wasn't running or it's running on a different port. You may also see this if there's a firewall blocking the host or port. Make sure synergy is running on the server and check for a firewall.&lt;br /&gt;&lt;br /&gt;    * already connected&lt;br /&gt;&lt;br /&gt;      Check that the synergy client isn't already running.&lt;br /&gt;&lt;br /&gt;    * refused client&lt;br /&gt;&lt;br /&gt;      Add the client to the server's configuration file.&lt;br /&gt;&lt;br /&gt;    * connection timed out&lt;br /&gt;&lt;br /&gt;      Check that server-host-name is correct.&lt;br /&gt;      Check that you don't have a firewall blocking the server or synergy port.&lt;br /&gt;&lt;br /&gt;    * connection failed&lt;br /&gt;&lt;br /&gt;      Check that server-host-name is correct.&lt;br /&gt;&lt;br /&gt;If you get the error "Xlib: No protocol specified" you're probably running synergy as root while logged in as another user. X11 may prevent this for security reasons. Either run synergy as the same user that's logged in or (not recommended) use "xhost +" to allow anyone to connect to the display.&lt;br /&gt;&lt;br /&gt;When successful you should be able to move the mouse off the appropriate edges of your server's screen and have it appear on a client screen. Try to move the mouse to each screen and check all the configured links. Check the mouse buttons and wheel and try the keyboard on each client. You can also cut-and-paste text, HTML, and images across computers (HTML and images are not supported on OS X yet).&lt;br /&gt;&lt;br /&gt;Step 6 - Run&lt;br /&gt;&lt;br /&gt;Once everything works correctly, stop all the clients then the server. Then start the server with the Start button on Windows and without the -f option on Unix and Mac OS X. Finally start the clients similarly. On Windows before clicking Start you may want to set the Logging Level to Warning so the logging window doesn't pop up (because you currently can't close it, just minimize it).&lt;br /&gt;&lt;br /&gt;You can also configure synergy to start automatically when your computer starts or when you log in. See the autostart guide for more information.&lt;br /&gt;&lt;br /&gt;Command Line Options Guide&lt;br /&gt;&lt;br /&gt;Common Command Line Options&lt;br /&gt;The following options are supported by synergys and synergyc.&lt;br /&gt;  -d,  --debug level     use debugging level level&lt;br /&gt;   --daemon   run as a daemon (Unix) or background (Windows)&lt;br /&gt;  -f,  --no-daemon   run in the foreground&lt;br /&gt;     --display display     connect to X server at display (X11 only)&lt;br /&gt;  -n,  --name name   use name instead of the hostname&lt;br /&gt;   --restart   automatically restart on failures&lt;br /&gt;  -1,  --no-restart   do not restart on failure&lt;br /&gt;  -h,  --help   print help and exit&lt;br /&gt;   --version   print version information and exit&lt;br /&gt;&lt;br /&gt;Debug levels are from highest to lowest: FATAL, ERROR, WARNING, NOTE, INFO, DEBUG, DEBUG1, and DEBUG2. Only messages at or above the given level are logged. Messages are logged to a terminal window when running in the foreground. Unix logs messages to syslog when running as a daemon. The Windows NT family logs messages to the event log when running as a service. The Windows 95 family shows FATAL log messages in a message box and others in a terminal window when running as a service.&lt;br /&gt;&lt;br /&gt;The --name option lets the client or server use a name other than its hostname for its screen. This name is used when checking the configuration.&lt;br /&gt;&lt;br /&gt;Neither the client nor server will automatically restart if an error occurs that is sure to happen every time. For example, the server will exit immediately if it can't find itself in the configuration. On X11 both the client and server will also terminate if the connection to the X server is lost (usually because it died).&lt;br /&gt;&lt;br /&gt;Server Command Line Options&lt;br /&gt;&lt;br /&gt;    synergys [options]&lt;br /&gt;&lt;br /&gt;The server accepts the common options and:&lt;br /&gt;&lt;br /&gt;  -a,  --address address     listen for connections on address address&lt;br /&gt;  -c,  --config pathname     read configuration from pathname&lt;br /&gt;&lt;br /&gt;address has one of the following forms:&lt;br /&gt;&lt;br /&gt;    hostname&lt;br /&gt;    :port&lt;br /&gt;    hostname:port&lt;br /&gt;&lt;br /&gt;hostname is a hostname or IP address of a network interface on the server system (e.g. somehost or 192.168.1.100). port is a port number from 1 to 65535. hostname defaults to the system's hostname and port defaults to 24800.&lt;br /&gt;&lt;br /&gt;Client Command Line Options&lt;br /&gt;&lt;br /&gt;    synergyc [options] address[:port]&lt;br /&gt;&lt;br /&gt;address is the hostname or IP address of the server and port is the optional netw&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115567802147179762?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115567802147179762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115567802147179762' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115567802147179762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115567802147179762'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/08/sharing-mouse-and-keyboard-between-two.html' title='Sharing mouse and keyboard between two computers with different operating system'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115557526428783535</id><published>2006-08-14T10:07:00.000-07:00</published><updated>2006-08-14T10:07:44.920-07:00</updated><title type='text'>Explicit in C++</title><content type='html'>Using Explicit in C++&lt;br /&gt;&lt;br /&gt;In C++ it is possible to declare constructors for a class, taking a single parameter, and use those constructors for doing type conversion. For example:&lt;br /&gt;&lt;br /&gt;        class A {&lt;br /&gt;        public:&lt;br /&gt;                A(int);&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        void f(A) {}&lt;br /&gt;&lt;br /&gt;        void g()&lt;br /&gt;        {&lt;br /&gt;                A a1 = 37;&lt;br /&gt;&lt;br /&gt;                A a2 = A(47);&lt;br /&gt;&lt;br /&gt;                A a3(57);&lt;br /&gt;&lt;br /&gt;                a1 = 67;&lt;br /&gt;&lt;br /&gt;                f(77);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;A declaration like:&lt;br /&gt;&lt;br /&gt;        A a1 = 37;&lt;br /&gt;&lt;br /&gt;says to call the A(int) constructor to create an A object from the integer value. Such a constructor is called a "converting constructor".&lt;br /&gt;&lt;br /&gt;However, this type of implicit conversion can be confusing, and there is a way of disabling it, using a new keyword "explicit" in the constructor declaration:&lt;br /&gt;&lt;br /&gt;        class A {&lt;br /&gt;        public:&lt;br /&gt;                explicit A(int);&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        void f(A) {}&lt;br /&gt;&lt;br /&gt;        void g()&lt;br /&gt;        {&lt;br /&gt;                A a1 = 37;      // illegal&lt;br /&gt;&lt;br /&gt;                A a2 = A(47);   // OK&lt;br /&gt;&lt;br /&gt;                A a3(57);       // OK&lt;br /&gt;&lt;br /&gt;                a1 = 67;        // illegal&lt;br /&gt;&lt;br /&gt;                f(77);          // illegal&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;Using the explicit keyword, a constructor is declared to be&lt;br /&gt;"nonconverting", and explicit constructor syntax is required:&lt;br /&gt;&lt;br /&gt;        class A {&lt;br /&gt;        public:&lt;br /&gt;                explicit A(int);&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        void f(A) {}&lt;br /&gt;&lt;br /&gt;        void g()&lt;br /&gt;        {&lt;br /&gt;                A a1 = A(37);&lt;br /&gt;&lt;br /&gt;                A a2 = A(47);&lt;br /&gt;&lt;br /&gt;                A a3(57);&lt;br /&gt;&lt;br /&gt;                a1 = A(67);&lt;br /&gt;&lt;br /&gt;                f(A(77));&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;Note that an expression such as:&lt;br /&gt;&lt;br /&gt;        A(47)&lt;br /&gt;&lt;br /&gt;is closely related to function-style casts supported by C++. For example:&lt;br /&gt;&lt;br /&gt;        double d = 12.34;&lt;br /&gt;&lt;br /&gt;        int i = int(d);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Our Services&lt;br /&gt;&lt;br /&gt;Back to Home Page&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115557526428783535?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115557526428783535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115557526428783535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115557526428783535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115557526428783535'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/08/explicit-in-c.html' title='Explicit in C++'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115385175305334206</id><published>2006-07-25T11:21:00.000-07:00</published><updated>2006-07-25T11:22:33.856-07:00</updated><title type='text'>5 PHP Design Patterns</title><content type='html'>Five common PHP design patterns&lt;br /&gt;http://www-128.ibm.com/developerworks/library/os-php-designptrns/?ca=dnw-725&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115385175305334206?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115385175305334206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115385175305334206' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115385175305334206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115385175305334206'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/07/5-php-design-patterns.html' title='5 PHP Design Patterns'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115328841471184738</id><published>2006-07-18T22:49:00.000-07:00</published><updated>2006-07-18T22:55:51.550-07:00</updated><title type='text'>Writing your own newsreader</title><content type='html'>From:www.indicthreads.com&lt;br /&gt;XML feeds are the way today to keep a tab on what's happening in the blogosphere as well as to know about site updates and new additions. I had heard about two popular open source feature-rich Java APIs to deal with the feeds, ROME and Informa but could never really savor them.&lt;br /&gt;&lt;br /&gt;For one of my own sites where I, sort of hand-built the aggregator as Myjavaserevr does not allow deploying external JARs or Taglibs I did not get any chance to play with these APIs. So when I got some opportunity it was imperative that I tried them.&lt;br /&gt;&lt;br /&gt;The following is a very elementary example of using the two news aggregation libraries that imitates a newsreader. The examples, as I said, are pretty basic and they would make a hit to the specified Feed URL every time you call the JSPs. The code snippets are not meant to demonstrate good coding practice.&lt;br /&gt;&lt;br /&gt;Both the libraries support almost all versions of RSS, RDF and Atom and features such as dynamic discovery of feed format. Feature wise probably Informa has an upper hand (it supports OPML, recognizes the Enclosure element making it suitable to comprehend Podcast feeds and can be configured to use a persistence mechanism built over Hibernate) but what it lacks is availability of documents. There are no primers at the site and the code is very poorly commented making the Javadocs difficult to come to pace quickly. The two Java.net articles that I could, Google have been outdated, as I used the 0.6.5 version of the library.&lt;br /&gt;&lt;br /&gt;ROME, on the other hand, has very nice documentation available at its site, complete with code examples. Many desirable features are unfortunately still on the TODO list. For comprehending the "Enclosure" element ROME needs a separate plugin module (that also supports iTunes extensions). While I have not investigated them, there are a number of sub-projects based on both ROME and Informa, for example: there is a JSP Tag library based on Informa. There is a short review of various libraries here but I guess much stuff on Informa is not relevant now since its latest release.&lt;br /&gt;&lt;br /&gt;I am not mincing my words when I say that each API has its own strengths, Informa library is pretty bulky but supports OPML while Rome has a wider support for all kind of XML feeds and has a pluggable architecture. The good thing about these APIs is that they pretty much offer you everything that you may want to do with feeds, reading, generating your own, and creating a digest from multiple feeds and so on.&lt;br /&gt;&lt;br /&gt;To run these JSPs, needless to say, you would need to download Informa and ROME libraries. I ran these on jakarta-tomcat-5.0.28 / j2sdk1.4.2_06 and the only dependency I was missing was the JDOM jar that ROME needs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115328841471184738?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115328841471184738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115328841471184738' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115328841471184738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115328841471184738'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/07/writing-your-own-newsreader.html' title='Writing your own newsreader'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115323572389500603</id><published>2006-07-18T08:12:00.000-07:00</published><updated>2006-07-18T08:15:24.996-07:00</updated><title type='text'>Concurrent Prograaming Good Reference</title><content type='html'>Concept and Notations in Concurrent Programming By Andrews and Schneider&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115323572389500603?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115323572389500603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115323572389500603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115323572389500603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115323572389500603'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/07/concurrent-prograaming-good-reference.html' title='Concurrent Prograaming Good Reference'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115315970318886644</id><published>2006-07-17T11:06:00.000-07:00</published><updated>2006-07-17T11:08:23.616-07:00</updated><title type='text'>Attribute Types</title><content type='html'>from umn site&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3590/912/1600/attVal.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/3590/912/320/attVal.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115315970318886644?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115315970318886644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115315970318886644' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115315970318886644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115315970318886644'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/07/attribute-types.html' title='Attribute Types'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115302835273537616</id><published>2006-07-15T22:36:00.000-07:00</published><updated>2006-07-16T21:06:38.243-07:00</updated><title type='text'>Distance Measures</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3590/912/1600/distance.jpg"&gt;&lt;img style="FLOAT: left; MARGIN: 0pt 10px 10px 0pt; CURSOR: pointer" alt="" src="http://photos1.blogger.com/blogger/3590/912/320/distance.jpg" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115302835273537616?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115302835273537616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115302835273537616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115302835273537616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115302835273537616'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/07/distance-measures.html' title='Distance Measures'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115249784409540439</id><published>2006-07-09T19:17:00.000-07:00</published><updated>2006-07-09T19:17:24.276-07:00</updated><title type='text'>Concept Drift</title><content type='html'>http://www.bloglines.com/blog/Tilmann?id=6&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115249784409540439?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115249784409540439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115249784409540439' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115249784409540439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115249784409540439'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/07/concept-drift_09.html' title='Concept Drift'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115249781685105765</id><published>2006-07-09T19:16:00.000-07:00</published><updated>2006-07-09T19:17:02.166-07:00</updated><title type='text'>Concept Drift</title><content type='html'>http://www.bloglines.com/blog/Tilmann?id=6&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115249781685105765?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115249781685105765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115249781685105765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115249781685105765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115249781685105765'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/07/concept-drift.html' title='Concept Drift'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115245803581516153</id><published>2006-07-09T08:13:00.000-07:00</published><updated>2006-07-09T08:13:55.900-07:00</updated><title type='text'>On the Business Delegate Pattern</title><content type='html'>http://www-128.ibm.com/developerworks/java/library/j-ejb1022.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115245803581516153?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115245803581516153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115245803581516153' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115245803581516153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115245803581516153'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/07/on-business-delegate-pattern.html' title='On the Business Delegate Pattern'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115245742844579838</id><published>2006-07-09T08:02:00.000-07:00</published><updated>2006-07-09T08:03:48.670-07:00</updated><title type='text'>J2EE pattern langugae</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3590/912/1600/J2EEPatternLanguage.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/3590/912/320/J2EEPatternLanguage.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;from java.sun.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115245742844579838?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115245742844579838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115245742844579838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115245742844579838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115245742844579838'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/07/j2ee-pattern-langugae.html' title='J2EE pattern langugae'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115203459572024011</id><published>2006-07-04T10:35:00.000-07:00</published><updated>2006-07-04T10:36:36.006-07:00</updated><title type='text'>What is business logic?</title><content type='html'>&lt;p&gt; The part of an application program that performs the required data processing of the business. It refers to the routines that perform the data entry, update, query and report processing, and more specifically to the processing that takes place behind the scenes rather than the presentation logic required to display the data on the screen (GUI processing). Client applications are made up of a user interface and business logic. Server applications are mostly business logic.&lt;/p&gt; Both client and server applications also require communications links, but the network infrastructure, like the user interface, is not part of the business logic&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115203459572024011?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115203459572024011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115203459572024011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115203459572024011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115203459572024011'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/07/what-is-business-logic.html' title='What is business logic?'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115202889776807188</id><published>2006-07-04T08:59:00.000-07:00</published><updated>2006-07-04T09:01:38.146-07:00</updated><title type='text'>Design Patterns: Visual</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3590/912/1600/patmap.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/3590/912/320/patmap.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115202889776807188?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115202889776807188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115202889776807188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115202889776807188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115202889776807188'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/07/design-patterns-visual.html' title='Design Patterns: Visual'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115133282739733932</id><published>2006-06-26T07:35:00.000-07:00</published><updated>2006-06-26T07:40:27.473-07:00</updated><title type='text'>Berkeley DB: Part Three</title><content type='html'>Message Handler&lt;br /&gt;&lt;br /&gt;package db.GettingStarted;&lt;br /&gt;import com.sleepycat.db.Environment;&lt;br /&gt;import com.sleepycat.db.MessageHandler;&lt;br /&gt;&lt;br /&gt;public class MyMessageHandler implements MessageHandler&lt;br /&gt;{&lt;br /&gt;        // Our constructor does nothing&lt;br /&gt;        public MyMessageHandler() {}&lt;br /&gt;        public void message(Environment dbenv, String message)&lt;br /&gt;       {&lt;br /&gt;              // Put your special message handling code here&lt;br /&gt;       }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Set the databaseconfig to use this messagehandler&lt;br /&gt;package db.GettingStarted;&lt;br /&gt;import com.sleepycat.db.DatabaseConfig;&lt;br /&gt;...&lt;br /&gt;DatabaseConfig myDbConfig = new DatabaseConfig();&lt;br /&gt;MyMessageHandler mmh = new MyMessageHandler();&lt;br /&gt;myDbConfig.setMessageHandler(mmh);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115133282739733932?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115133282739733932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115133282739733932' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115133282739733932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115133282739733932'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/06/berkeley-db-part-three.html' title='Berkeley DB: Part Three'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-11311488.post-115133251582731527</id><published>2006-06-26T07:34:00.000-07:00</published><updated>2006-06-26T07:35:15.943-07:00</updated><title type='text'>Chimney Bluff State Park</title><content type='html'>http://www.fotosearch.com/CRT369/15420-01ns/&lt;br /&gt;&lt;br /&gt;Visited this on 06/25/06&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/11311488-115133251582731527?l=sreekalyan.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sreekalyan.blogspot.com/feeds/115133251582731527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=11311488&amp;postID=115133251582731527' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115133251582731527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/11311488/posts/default/115133251582731527'/><link rel='alternate' type='text/html' href='http://sreekalyan.blogspot.com/2006/06/chimney-bluff-state-park.html' title='Chimney Bluff State Park'/><author><name>kalyan</name><uri>http://www.blogger.com/profile/09861787750504158337</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
