<?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-34173777</id><updated>2012-01-30T18:04:23.192+05:30</updated><category term='pilgrimage'/><category term='Harvard'/><category term='amity'/><category term='movies'/><category term='mesra'/><category term='death'/><category term='christmas'/><category term='syllabus'/><category term='hacking'/><category term='mid semester'/><category term='hunger'/><category term='Delhi'/><category term='open source'/><category term='algorithms'/><category term='e-biz'/><category term='inauguration'/><category term='train'/><category term='match'/><category term='internship'/><category term='library'/><category term='marks'/><category term='UC'/><category term='Prerna Classes'/><category term='applications'/><category term='RSS'/><category term='first post'/><category term='feedback'/><category term='Sushreet'/><category term='tips'/><category term='anunay'/><category term='link'/><category term='biotechnology'/><category term='physics'/><category term='christ'/><category term='soumyadip'/><category term='c++'/><category term='Tank'/><category term='salsa'/><category term='faculty'/><category term='Self improvement'/><category term='linux'/><category term='neelanchal'/><category term='practicals'/><category term='dadima'/><category term='Indian food'/><category term='cognizance'/><category term='maths'/><category term='gopal'/><category term='studies'/><category term='programming'/><category term='mrinal'/><category term='Tarush'/><category term='tourism'/><category term='publicize'/><category term='legal'/><category term='Rutwik'/><category term='chemistry'/><category term='relaxation'/><category term='hostel'/><category term='blog'/><category term='computers'/><category term='MIT'/><category term='youth wing'/><category term='electronics'/><category term='rest'/><category term='wikipedia'/><category term='gmp'/><category term='loyola'/><category term='IIT'/><category term='Karan'/><category term='tutorials'/><category term='Mishra'/><category term='puzzles'/><category term='dosa'/><category term='interviews'/><category term='microsoft'/><category term='ubuntu'/><category term='US'/><category term='thomso'/><category term='chess'/><category term='fiction'/><category term='google'/><category term='unity'/><title type='text'>DeeKaying - Geekiness @ IIT Roorkee</title><subtitle type='html'>DeeKaying is the new term for geekiness on Campus. There you go: Its now officially on my blog!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.divye.in/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.divye.in/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>77</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34173777.post-7755584873221209293</id><published>2012-01-07T13:15:00.002+05:30</published><updated>2012-01-07T13:15:28.079+05:30</updated><title type='text'>Blogs mature over time</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;It's interesting to look at how my blog has grown over the years. It shows how lopsided the internet is in terms of traffic. The data speaks for itself:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-JgdHHBBsVYY/Twf39O38psI/AAAAAAAAEXs/vHWlpwgZ2rM/s1600/hits.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" src="http://3.bp.blogspot.com/-JgdHHBBsVYY/Twf39O38psI/AAAAAAAAEXs/vHWlpwgZ2rM/s640/hits.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-7755584873221209293?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/7755584873221209293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=7755584873221209293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7755584873221209293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7755584873221209293'/><link rel='alternate' type='text/html' href='http://www.divye.in/2012/01/blogs-mature-over-time.html' title='Blogs mature over time'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-JgdHHBBsVYY/Twf39O38psI/AAAAAAAAEXs/vHWlpwgZ2rM/s72-c/hits.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-7511352951477669066</id><published>2011-12-11T14:01:00.001+05:30</published><updated>2011-12-11T17:35:23.710+05:30</updated><title type='text'>Recurrences in Computational Complexity</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;a href="https://plus.google.com/116112361038874563676/posts" target="_blank"&gt;Manish Sharma&lt;/a&gt; asked me an interesting question over chat regarding recurrences and computational complexity estimation. The question was interesting enough that I thought that the answer would be of use to many more people in general so I'm posting it to my blog. In any case, a post to my blog was long overdue. So, here it is:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: white; line-height: 18px; text-align: -webkit-auto;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;The original question was:&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: white; line-height: 18px; text-align: -webkit-auto;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;How do you find the computational complexity of the recurrence:&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: white; line-height: 18px; text-align: -webkit-auto;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;T(n) = a.T(n . r) + b.T(n (1 - r)) + O(n)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;or, when pretty printed:&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://latex.codecogs.com/gif.latex?T(n)%20=%20aT(n%20r)%20+%20b%20T(n%20(1%20-%20r))%20+%20O(n)" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://latex.codecogs.com/gif.latex?T(n)%20=%20aT(n%20r)%20+%20b%20T(n%20(1%20-%20r))%20+%20O(n)" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Well, technically speaking, this question is phrased slightly ambiguously, so I'm phrasing it as below:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;T(n) = a T(n r) + b T(n (1-r)) + cn + d&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;a &amp;gt; 0, b &amp;gt; 0, c &amp;gt; 0,&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt; d belonging to R&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Pretty print:&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: white; line-height: 18px; text-align: -webkit-auto;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://latex.codecogs.com/gif.latex?T(n)%20=%20a%20T(n%20r)%20+%20b%20T(n%20(1-r))%20+%20c%20n" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://latex.codecogs.com/gif.latex?T(n)%20=%20a%20T(n%20r)%20+%20b%20T(n%20(1-r))%20+%20c%20n" /&gt;&lt;/a&gt;&lt;/div&gt;and while I'm at it, I'll point out to you that without loss of generality, I can impose the additional restriction that &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;r&lt;/span&gt; is in the range of 0.5 to 1.0.&lt;br /&gt;Pretty print:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://latex.codecogs.com/gif.latex?r%20\in%20[0.5,1]" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://latex.codecogs.com/gif.latex?r%20\in%20[0.5,1]" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;This is possible because I can simply take a recurrence equation where this isn't true and transform it to a recurrence where this is true by swapping the values of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;a&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;b&lt;/span&gt; and replacing the value of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;r&lt;/span&gt; with &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;(1-r)&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Given that the restrictions that I've imposed onto the original recurrence are valid, here are a few observations:&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;T(n)&lt;/span&gt; is atleast linear. This is because it already contains a&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; cn&lt;/span&gt; term in the recurrence.&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;r &amp;gt; (1-r)&lt;/span&gt; in all cases given the valid range of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;r&lt;/span&gt;. A corollary of this fact is that &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;n r &amp;gt; n (1- r)&lt;/span&gt; is always valid.&lt;/li&gt;&lt;li&gt;Since T(n) is atleast linear (and positive for n &amp;gt; 1 with a positive first derivative - which are the standard assumptions in such a problem), T(n r) &amp;gt; T(n (1 - r))&lt;/li&gt;&lt;/ol&gt;Now comes the tough part:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif; font-size: large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: white; line-height: 18px; text-align: -webkit-auto;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif; font-size: large;"&gt;&lt;b&gt;Case 1: T(n) is linear.&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="background-color: white; line-height: 18px; text-align: -webkit-auto;"&gt;&lt;br /&gt;Assume T(n) = A n + B with A &amp;gt; 0&lt;br /&gt;Therefore,&lt;br /&gt;T(n) = a T(nr) + b T(n(1-r)) + cn + d = a { A nr + B } + b { A n(1-r) + B} + cn = {Aar + Ab(1-r) + c} n + {aB + bB + d}&lt;br /&gt;&lt;br /&gt;Equating parts of the equation:&lt;br /&gt;Aar + Ab(1-r) + c = A&lt;br /&gt;aB + bB + d = B&lt;br /&gt;&lt;br /&gt;Simplifying,&lt;br /&gt;A = c/(1 - ar - b(1-r))&lt;br /&gt;B = d/(1 - (a+b))&lt;br /&gt;&lt;br /&gt;To satisfy our original assumption, A &amp;gt; 0 - we require that 1 - ar - b(1-r) &amp;gt; 0. That means, if ar + b(1-r) &amp;lt; 1 then T(n) is linear. This, of course, need not be true for all valid values of a and b, so for those values, our linearity assumption is violated.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif; font-size: large;"&gt;&lt;b&gt;Case 2: T(n) is superlinear.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If T(n) is a superlinear increasing function of n, then for sufficiently large values of n,&lt;br /&gt;there are 3 subcases:&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;a T(nr) &amp;gt; b T(n(1-r)) for n &amp;gt; K1&lt;/li&gt;&lt;li&gt;a T(nr) = b T(n(1-r)) for all n &amp;gt; K2&lt;/li&gt;&lt;li&gt;a T(nr) &amp;lt; b T(n(1-r)) &amp;nbsp;for n &amp;gt; K3&lt;/li&gt;&lt;/ol&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;Subcase 1: a T(nr) &amp;gt; b T(n(1-r)) when n -&amp;gt; infinity then&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;T(n) &amp;lt; 2a T(nr) + cn + d&lt;br /&gt;&lt;br /&gt;If 2a &amp;lt; 1 then the solution is O(n) - valid?&lt;br /&gt;If 2a = 1 then the solution is O(n log n)&lt;br /&gt;else the solution is O(n ^ log_(1/r)(2a))&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;Subcase 2: aT(nr) = b T(n(1-r)) for all n then&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;T(n) = 2a T(nr) + cn + d&lt;br /&gt;&lt;br /&gt;If 2a &amp;lt; 1 then the solution is again O(n) (tight bound) - valid?&lt;br /&gt;If 2a = 1 then the solution is again O(n log n) (tight bound)&lt;br /&gt;else the solution is O(n^log_(1/r)(2a)) (tight bound)&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;Subcase 3: a T(nr) &amp;lt; b T(n(1-r)) then&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;the solutions are similar to subcase 1 except that r is replaced by 1-r and a is replaced by b.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, 'Times New Roman', serif; font-size: large;"&gt;&lt;b&gt;Special case: When a = (1-r) and b = r.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The complexity should be O(n) under limit.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note: &lt;/b&gt;Case 2 seems sufficient to solve the problem but I've kept Case 1 for clarity. I think there &lt;b&gt;&lt;u&gt;might be bugs&lt;/u&gt;&lt;/b&gt; in the analysis too. If you notice any, please comment!&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-7511352951477669066?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/7511352951477669066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=7511352951477669066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7511352951477669066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7511352951477669066'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/12/recurrences-in-computational-complexity.html' title='Recurrences in Computational Complexity'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-2501248835532539857</id><published>2011-08-04T00:50:00.007+05:30</published><updated>2011-08-04T01:48:14.751+05:30</updated><title type='text'>The Case Against GM Foods: Putting our food security at the hands of an American Corporation</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="gmail_quote"&gt;&lt;br /&gt;I've always looked at Genetically Modified foods with a wary eye. Also, the fact that the US GM seed market is dominated by a single company - Monsanto - makes me even more suspicious (the obligatory Wiki Link -&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Monsanto"&gt;http://en.wikipedia.org/wiki/Monsanto&lt;/a&gt;). It is well known that Monsanto spends tons of money lobbying the US Food and Drug Administration (US-FDA) to ensure legal status for GM foods and to guide American legislation such that GM foods remain legal and no adverse regulatory laws are passed against GM foods.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-WO_UB2vDZN4/TjmlMzfnSmI/AAAAAAAACio/XI53YJWlASY/s1600/GM+FDA.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-WO_UB2vDZN4/TjmlMzfnSmI/AAAAAAAACio/XI53YJWlASY/s1600/GM+FDA.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;Source: &lt;a href="http://www.panacea-bocaf.org/"&gt;http://www.panacea-bocaf.org&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Nowadays, every supermarket I've been to in the US keeps GM foods next to non-GM foods. There are no clear label markings mandated by law that would allow a consumer to distinguish between GM and non-GM foods at a glance. Consumers are forced to read fine print on labels to determine if GM products have been used in the food chain of the product they're buying. Then too, things are hampered by the fact that there is no clear way to determine if a long chemical-sounding-name is a natural, nature-identical or artificially created ingredient. Things have gotten so bad that while I was in the US, I heard of a case where a company using the term - "no GM foods used for feeding chicken" for marketing purposes was sued and asked to include a disclaimer that GM foods have not been proven to cause any harm whatsoever and that GM foods are safe for use. Extreme measures like these make me much more distrustful of companies promoting GM foods.&lt;br /&gt;&lt;br /&gt;By the way, here's a chart from Wikipedia&amp;nbsp;that show's Monsanto's astronomical profits.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-9BlcYarr1J0/TjmhL3LumBI/AAAAAAAACig/3wA92ADzzXs/s1600/Monsanto_stock_price_2000-2010.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="289" src="http://1.bp.blogspot.com/-9BlcYarr1J0/TjmhL3LumBI/AAAAAAAACig/3wA92ADzzXs/s640/Monsanto_stock_price_2000-2010.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Source:&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/File:Monsanto_stock_price_2000-2010.jpg"&gt;http://en.wikipedia.org/wiki/File:Monsanto_stock_price_2000-2010.jpg&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;These profits are generated year after year and are only growing as acres and acres of farmland come under GM crop cultivation. GM crops typically are modified so that they are not self-replicating due to concerns about wild, unchecked replication. Though introduced for the right reasons, this constraint has set up a monopolistic market, one that cannot be shut down very easily. The fault lies in the fact that since the crops cannot be propagated season after season from the seeds, the farmer needs to approach the company holding the patents to the GM crops &lt;b&gt;every single year&lt;/b&gt;&amp;nbsp;in order to plant his crop. Also, since the seeds are patented (and the Intellectual property is vigorously defended by lawsuits) and there is a very very long approval process for GM foods, there is huge bar for companies that intend to enter this space and the incumbent - Monsanto - enjoys a virtual monopoly in this space. Not only is this disruptive to the natural cycle of (free) seed generation used by farmers, in the Indian context, it is tantamount to handing the base of our agricultural pyramid to an American company (Monsanto controls 90% of the GM seed market in America).&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-AgjWwytggjk/TjmkTTEydDI/AAAAAAAACik/tzmAoM5TODs/s1600/genengcrops.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="308" src="http://4.bp.blogspot.com/-AgjWwytggjk/TjmkTTEydDI/AAAAAAAACik/tzmAoM5TODs/s400/genengcrops.gif" style="cursor: move;" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;Image courtesy:&amp;nbsp;&lt;a href="http://www.planetsave.com/"&gt;http://www.planetsave.com&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Right now, &lt;b&gt;Indian farmers&lt;/b&gt; are responsible for the cost of vegetable production based on the cost of production, seed storage, fertilizer costs etc. The government controls market prices by setting a minimum support price (MSP) at which it will buy produce from farmers. Now, alter the situation and put an American corporation on the other side of the fence. Monsanto will have price control over the seeds that it supplies to farmers. Since there is virtually no cost to replicating seeds year after year (the R&amp;amp;D cost has probably been recouped by now), every rupee charged by the monopoly of Monsanto will go straight to its profit margins and to the bottom line cost of foodgrains in our country. As a corollary, our government (which procures over 50% of our foodgrains) will be paying farmers so that they can pass on some of the money to an MNC as the cost of seeds. Just imagine, every single man, woman and child in India will effectively be paying a food tax to an American corporation. This money will be money that will be leached from our country, just like the way the Britishers leached money through their Manchester Cotton mills while using raw cotton from India. Frankly speaking, it's a terrible idea.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-gY5uSQvCUP4/TjmnY9b0XLI/AAAAAAAACis/L4ZB4FceyKQ/s1600/against-bt-brinjal.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-gY5uSQvCUP4/TjmnY9b0XLI/AAAAAAAACis/L4ZB4FceyKQ/s1600/against-bt-brinjal.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;Courtesy: &lt;a href="http://www.greenpeace.in/"&gt;Greenpeace&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, let's come to the obvious question - "why would people buy GM crops?" The answer is quite obvious - there is a market for foods such as seedless brinjals (the Bt Brinjal product) just as there is a market for seedless watermelons. Also, GM crops are like drugs - first - show the public the high of high quality blemish-less, super-sized onions, brinjals, oranges, wheat etc. The public will get hooked onto the product and will generate high demand. Farmers will then cave into market forces and will be forced to plant GM crops in order to realize higher margins from their farmland. They will abandon their traditional methods of hybridization and seed selection and start buying seeds off-the-shelf from Monsanto. Monsanto could start off with supplying seeds for free to get farmers onboard (after all, besides the initial R&amp;amp;D cost, they really don't have large recurring costs in seed generation). Farmers would try it out and sell the GM produce on the market (they could even start a black market for GM crops on the sly if they so wished). Once the farmers are hooked onto the seeds, Monsanto - being a monopoly - could revise the rates citing XYZ concerns (as most monopolies are wont to do) and then you end up with an American corporation leaching supra-normal profits from us. And once the floodgates of GM crops open for this country, there is no going back because GM crops will freely intermingle with natural crops (a recent study showed that 80% of wild canola crop in North America had atleast 1 artificial gene after a few years of the introduction of GM Canola into the country). This is a really disturbing scenario. Monsanto will start out small, but will quickly grow into a mammoth agricultural concern having control over large swathes of our food supply chain. See the chart embedded below to see how a single company can take over a country's entire crop acreage.&lt;br /&gt;&lt;br /&gt;But before getting too far ahead of ourselves, let us analyze the Bt Brinjal issue. Farmers had opposed the Bt Brinjal project because of 2 major reasons - a dependence on a corporation for seeds every year and unproven health risks from GM foods. Indian farmers are smart in a way. But. if you notice, recently, the opposition to Bt Brinjal has quietened down and the images of demonstrating farmers have faded from public memory. Besides, Monsanto has been in India for about 3? years now and they have had plenty of time to figure out ways to win farmers over to their cause. However, despite all their efforts, there is bound to be opposition to the introduction of GM crops in India. So, how do they intend to overcome that? The answer is: "Lobby the government".&lt;br /&gt;&lt;br /&gt;Now, the Indian government can't be lobbied overtly. So, let's do it the Indian way: bribe a few ministers, pull in a few favours and get an independent authority created by an act of Parliament. (After all, the multitude of scams involving our MPs has clearly demonstrated that more than a few of them are for sale). That independent body will function like the US-FDA and grant approvals for all GM crops intending to be introduced into India. Also, by making it an autonomous non-profit body, they could conceivable claim exemption from the Right to Information Act by virtue of it not being a "public authority" as defined under the act. Then, it would remain a simple matter of getting just a few officials to fall into line and you'll have a green light for all kinds of GM crops being introduced into India. Not only that, to go one step further, India would become a testing ground for all kinds of GM crops that have to be introduced into other countries. Given the extremely lax oversight of our government departments, this is sure to lead to lots of issues for us in the future and when things start to go wrong in the country, we will conveniently have yet another government department to blame for not performing its job properly. The only difference is that this department is being brought into being for one and only one reason - to give Monsanto a crack in the wall to introduce GM foods into our country.&lt;br /&gt;&lt;br /&gt;Reviewing all this, you - my casual, tech inclined reader will feel that this scenario is quite far-fetched. So let me put forth a few supporting facts:&lt;br /&gt;&lt;br /&gt;1. Two reporters from&amp;nbsp;&lt;b&gt;Fox news&lt;/b&gt;&amp;nbsp;set out to research Monsanto and their claims on GM food safety.&amp;nbsp;&lt;b&gt;&lt;u&gt;Monsanto literally buried their report under a threat of a lawsuit&lt;/u&gt;&lt;/b&gt;. It's a really explosive video (one that I'd seen some time ago). You need to watch this to get the full context of what's happening in the GM world today.&lt;br /&gt;&lt;div class="separator" style="clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://0.gvt0.com/vi/axU9ngbTxKw/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/axU9ngbTxKw&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266"  src="http://www.youtube.com/v/axU9ngbTxKw&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;"&gt;Link:&amp;nbsp;&lt;a href="http://www.youtube.com/watch?v=axU9ngbTxKw"&gt;http://www.youtube.com/watch?v=axU9ngbTxKw&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;2. Greenpeace states that there is a &lt;b&gt;"secretive bill"&lt;/b&gt; that is likely to be tabled in the monsoon session of the Indian Parliament that seeks to create a &lt;b&gt;Biotechnology Regulatory Authority of India (BRAI) &lt;/b&gt;that will be an authority for clearing the introduction of GM foods into India. There has been no notable public discussion on the contents of this bill. More details here:&amp;nbsp;&lt;a href="http://www.greenpeace.in/take-action/save-your-food/stop-the-brai-bill.php?tyf"&gt;http://www.greenpeace.in/take-action/save-your-food/stop-the-brai-bill.php?tyf&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3. Monsanto has been trying out GM Wheat since before 2004. The &lt;u&gt;&lt;b&gt;plans to introduce it in North America were abandoned in 2004&lt;/b&gt;&lt;/u&gt;. Source:&amp;nbsp;&lt;a href="http://www.gmo-compass.org/eng/grocery_shopping/crops/22.genetically_modified_wheat.html"&gt;http://www.gmo-compass.org/eng/grocery_shopping/crops/22.genetically_modified_wheat.html&lt;/a&gt;&amp;nbsp;. However, recently, Monsanto has carried out trials of GM wheat in Australia (which is one of the largest exporters of Wheat in the world). Source:&amp;nbsp;&lt;a href="http://www.crikey.com.au/2010/09/17/gm-seed-for-australian-wheat-great-initiative-or-costly-experiment/"&gt;http://www.crikey.com.au/2010/09/17/gm-seed-for-australian-wheat-great-initiative-or-costly-experiment/&lt;/a&gt;. India is &lt;b&gt;one of the world's largest wheat growing nations&lt;/b&gt; and the introduction of GM wheat would give the &lt;b&gt;reigns of our food supply to single corporation's products&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;4. It is also important to note that there are &lt;b&gt;virtually no alternative companies in the marketplace&lt;/b&gt; to put out contradictory claims and act as whistleblowers. The ones selling the products are also the ones certifying them as safe. That's hardly something that would put your mind at ease. To make things worse, &lt;b&gt;Monsanto has a history of bringing large and costly lawsuits &lt;/b&gt;against companies and individuals that challenge the safety of their products - after all - their entire market base depends on the faith that the people have in the food that they are consuming and it would be highly detrimental to their plans if someone conclusively demonstrated that GM foods had an adverse impact on human health.&lt;br /&gt;&lt;br /&gt;After seeing all this, would you trust this company with your food? Take your time and think it over.&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #333333; font-weight: bold;"&gt;See these other articles to read more about this as portrayed in the media:&lt;/span&gt;&lt;br /&gt;&lt;div style="background: #fafafa; border-bottom: 1px #ddd dotted; border-top: 1px #ddd dotted; color: #333333; padding: 15px;"&gt;&lt;ol&gt;&lt;li&gt;A law unto itself, &lt;em&gt;&lt;a href="http://www.outlookindia.com/" target="_blank"&gt;www.outlookindia.com&lt;/a&gt;&lt;/em&gt;, March 8, 2010&lt;br /&gt; 		            &lt;a href="http://www.outlookindia.com/article.aspx?264454" name="1318f11d03609252_dna" target="_blank"&gt;http://www.outlookindia.com/article.aspx?264454&lt;/a&gt;&lt;/li&gt;&lt;li&gt;India says no to Bt brinjal, for now, &lt;em&gt;&lt;a href="http://www.rediff.com/" target="_blank"&gt;www.rediff.com&lt;/a&gt;&lt;/em&gt;, February 9, 2010&lt;br /&gt; 		            &lt;a href="http://business.rediff.com/report/2010/feb/09/india-says-no-to-bt-brinjal-for-now.htm" name="1318f11d03609252_red" target="_blank"&gt;http://business.rediff.com/report/2010/feb/09/india-says-no-to-bt-brinjal-for-now.htm&lt;/a&gt;&lt;/li&gt;&lt;li&gt;No GM trials in State: Katti, &lt;em&gt;Deccan Herald&lt;/em&gt;, July 20, 2011  &lt;br /&gt; 		            &lt;a href="http://www.deccanherald.com/content/177877/no-gm-trials-state-katti.html" name="1318f11d03609252_dh" target="_blank"&gt;http://www.deccanherald.com/content/177877/no-gm-trials-state-katti.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Biotech Bill: Sweeping powers, glaring omissions, &lt;em&gt;&lt;a href="http://www.rediff.com/" target="_blank"&gt;www.rediff.com&lt;/a&gt;&lt;/em&gt;, March 11, 2010&lt;br /&gt; 		            &lt;a href="http://business.rediff.com/column/2010/mar/11/guest-biotech-bill-glaring-omissions.htm" name="1318f11d03609252_out" target="_blank"&gt;http://business.rediff.com/column/2010/mar/11/guest-biotech-bill-glaring-omissions.htm&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Remember, Monsanto is a multi-billion dollar company and &lt;b&gt;has deep pockets&lt;/b&gt; to buy out the media through advertising dollars. This negative coverage might change substantially in the future to become positive coverage. So keep your eyes open for it.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-2501248835532539857?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/2501248835532539857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=2501248835532539857' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2501248835532539857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2501248835532539857'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/08/case-against-gm-foods-putting-our-food.html' title='The Case Against GM Foods: Putting our food security at the hands of an American Corporation'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-WO_UB2vDZN4/TjmlMzfnSmI/AAAAAAAACio/XI53YJWlASY/s72-c/GM+FDA.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-4257609465773692699</id><published>2011-07-22T02:46:00.002+05:30</published><updated>2011-07-22T02:46:39.248+05:30</updated><title type='text'>Facebook Goes the Google+ way - tries out Google+ style comment formats</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I was just browsing on Facebook and I was surprised to see a link to a video posted in the comments being shown inline. Here's how the new interface looks:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-XKEQF_7RI14/TiiWkIcQBUI/AAAAAAAACiY/a5pmchYUFuA/s1600/FBG%252B.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-XKEQF_7RI14/TiiWkIcQBUI/AAAAAAAACiY/a5pmchYUFuA/s1600/FBG%252B.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Suprisingly, the video player also seemed to be updated.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-ykzpaTsjm3k/TiiXGdGoOWI/AAAAAAAACic/dugq_ZdX4E8/s1600/VideoPlayer.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-ykzpaTsjm3k/TiiXGdGoOWI/AAAAAAAACic/dugq_ZdX4E8/s1600/VideoPlayer.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;See the new style controls?&lt;br /&gt;&lt;br /&gt;Hmm... It seems okay... Though the whole site could do with a big makeover...&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-4257609465773692699?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/4257609465773692699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=4257609465773692699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4257609465773692699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4257609465773692699'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/07/facebook-goes-google-way-tries-out.html' title='Facebook Goes the Google+ way - tries out Google+ style comment formats'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-XKEQF_7RI14/TiiWkIcQBUI/AAAAAAAACiY/a5pmchYUFuA/s72-c/FBG%252B.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-248700625556740463</id><published>2011-07-20T02:34:00.001+05:30</published><updated>2011-07-20T02:35:01.426+05:30</updated><title type='text'>The FBI Chargesheet for ISI Lobbying via Americans</title><content type='html'>I just came to know of the FBI chargesheet against Americans for channeling funds from the ISI for lobbying purposes. Read the entire chargesheet below.&lt;br /&gt;&lt;br /&gt;&lt;a title="View Fai Ahmad Complaint Affidavit on Scribd" href="http://www.scribd.com/doc/60358771/Fai-Ahmad-Complaint-Affidavit" style="margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block; text-decoration: underline;"&gt;Fai Ahmad Complaint Affidavit&lt;/a&gt; &lt;object id="doc_76775" name="doc_76775" height="600" width="100%" type="application/x-shockwave-flash" data="http://d1.scribdassets.com/ScribdViewer.swf" style="outline:none;" &gt;            &lt;param name="movie" value="http://d1.scribdassets.com/ScribdViewer.swf"&gt;&lt;param name="wmode" value="opaque"&gt;&lt;param name="bgcolor" value="#ffffff"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="FlashVars" value="document_id=60358771&amp;access_key=key-2kak80phvb76tm0lhnz7&amp;page=1&amp;viewMode=list"&gt;&lt;embed id="doc_76775" name="doc_76775" src="http://d1.scribdassets.com/ScribdViewer.swf?document_id=60358771&amp;access_key=key-2kak80phvb76tm0lhnz7&amp;page=1&amp;viewMode=list" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="600" width="100%" wmode="opaque" bgcolor="#ffffff"&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/34173777-248700625556740463?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/248700625556740463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=248700625556740463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/248700625556740463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/248700625556740463'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/07/fbi-chargesheet-for-isi-lobbying-via.html' title='The FBI Chargesheet for ISI Lobbying via Americans'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-3410038301485724755</id><published>2011-06-21T12:56:00.001+05:30</published><updated>2011-07-06T14:49:35.028+05:30</updated><title type='text'>Solved? LaTeX Error: pdf file is damaged - attempting to reconstruct xref table</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;&lt;u&gt;Update&lt;/u&gt;&lt;/b&gt;: Greater experience with this issue has given me greater clarity. The issue is not related to LaTeX. Getting this error message simply means that &lt;b&gt;evince&lt;/b&gt; tried to access the PDF file while it was being written to by &lt;b&gt;pdflatex&lt;/b&gt; or &lt;b&gt;latex&lt;/b&gt; and found it in a damaged state. This happens if you have a large pdf file being generated with lots of text or a number of figures. There's nothing to worry about if you get this error message. You can safely ignore it.&lt;br /&gt;&lt;br /&gt;---- Original Post Below ---&lt;br /&gt;&lt;br /&gt;This is just a short note for anyone coming across this problem while doing LaTeX work.&lt;br /&gt;&lt;div&gt;Google doesn't have a decent explanation for why this message occurs. I don't have one either&lt;/div&gt;&lt;div&gt;but I have isolated the cause for my particular issue and I hopefully have a fix.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The error under discussion is:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, Tahoma; font-size: 12px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="alt2" dir="ltr" style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: inset; border-bottom-width: 1px; border-color: initial; border-left-style: inset; border-left-width: 1px; border-right-style: inset; border-right-width: 1px; border-top-style: inset; border-top-width: 1px; color: black; height: 130px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; text-align: left; width: 640px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, Arial, Tahoma; font-size: 12px;"&gt;Error: PDF file is damaged - attempting to reconstruct xref table... Error: Couldn't find trailer dictionary Error: Couldn't read xref table Error: PDF file is damaged - attempting to reconstruct xref table... Error: Couldn't find trailer dictionary Error: Couldn't read xref table&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I hit this error while importing a PNG file exported from GIMP into my LaTeX thesis using the&amp;nbsp;&lt;/div&gt;&lt;div&gt;\includegraphics command. The PNG file probably had a few transparent pixels inserted due to&lt;/div&gt;&lt;div&gt;the editing process because the base image (which was unmodified) was imported without any&lt;/div&gt;&lt;div&gt;issue into the LaTeX PDF and this is something that LaTeX doesn't like.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I fixed this issue by simply removing the obnoxious PNG and converting that to a JPG. The&amp;nbsp;&lt;/div&gt;&lt;div&gt;problem got solved.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;If it helps you, let me know in the comments! :) &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-3410038301485724755?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/3410038301485724755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=3410038301485724755' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3410038301485724755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3410038301485724755'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/06/solved-latex-error-pdf-file-is-damaged.html' title='Solved? LaTeX Error: pdf file is damaged - attempting to reconstruct xref table'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-1856464262338450909</id><published>2011-06-17T22:08:00.000+05:30</published><updated>2011-09-29T01:47:51.610+05:30</updated><title type='text'>What is the difference between a mutex and a semaphore?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Okay. This is another common interview question. Here are a few of the points you should keep in mind:&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;b&gt;Q1: What is a semaphore?&lt;/b&gt;&lt;/div&gt;&lt;div&gt;* A semaphore is a mechanism to convey events between two or more cooperating processes. Now what does this mean exactly?&lt;br /&gt;In a typical multiprocessing machine, many processes are being timeshared on a single CPU. The degree to which computation will proceed in one process depends on how big a time slice it has been given by the OS CPU Scheduler. Thus, different processes will be at different stages of computation at any point of time. So, how do we coordinate across processes? We use semaphores to tell other processes that we've reached certain stages in our processing (via a sem_post) or to wait for other processes to tell us that they've reached certain well defined stages in their computation (via a sem_wait). These two major functions allow us to synchronize computation across process boundaries and this is the main function of a semaphore.&lt;br /&gt;&lt;br /&gt;Effectively, you can think of a semaphore as a click lock with many keys. Anybody who holds a key can open the lock. There can be multiple keys and multiple people can open the lock at any time. Anybody can lock the lock.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q2: What is a mutex?&lt;/b&gt;&lt;br /&gt;* A mutex is a mechanism to ensure mutual exclusion. In simple terms, this means that one and only 1 process will be allowed to execute a particular piece of code guarded by a mutex. This particular piece of code is called the critical section. A mutex has 2 major properties:&lt;br /&gt;1. Only one of the cooperating processes gains access to the critical section.&lt;br /&gt;2. Only the process that holds access to the critical section (called the owner of the mutex) can revoke its access to the critical section. (This is called ownership of the critical section or mutex).&lt;br /&gt;&lt;br /&gt;Effectively, a mutex is the concept of a lock + owner. There is a lock and only 1 key. Whoever uses a key to open the lock is called the owner of the mutex. Only he can lock the lock or open it. Thus, there can be at max 1 person at any time in the locked room.&lt;br /&gt;&lt;br /&gt;By ensuring that no more than 1 process can ever own and release the mutex, mutual exclusion is ensured.&lt;br /&gt;&lt;br /&gt;* A semaphore can be used to implement a mutex. This is possible if we associate the concept of an "owner" to a binary semaphore (a click lock with 1 key only). Look at the following pseudocode:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Global Initialization:&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sem_init(&amp;amp;sem, 1); // Binary Semaphore (ensures that only 1 process can enter the Critical Section)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;owner = 0; // No pid&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mutex Lock Code:&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sem_wait(&amp;amp;sem);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;owner = getpid();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;// Critical Section&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Mutex Unlock Code:&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;if (owner != getpid()) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;abort(); // non-owner is trying to unlock the mutex. Invalid state - abort. (Ensures Mutual Exclusion)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sem_post(&amp;amp;sem);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note how the unlock code verifies the owner of the lock and thus fulfills the function of a mutex. This is a requirement for ensuring that only the owner of the lock is able to unlock the code.&lt;br /&gt;&lt;br /&gt;This is in sharp contrast to some other uses of a semaphore.&lt;br /&gt;Consider the following example:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Global:&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sem_init(&amp;amp;sem1, 1);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sem_init(&amp;amp;sem2, 0);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;void f() {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; while(true) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;sem_wait(&amp;amp;sem1);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;// CS1&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;sem_post(&amp;amp;sem2);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;void g() {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; while(true) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;sem_wait(&amp;amp;sem2);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;// CS2&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp;sem_post(&amp;amp;sem1);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If f() and g() are 2 processes cooperating via the 2 semaphores, the way that the code is written ensures that the critical sections will be executed one after the other (CS1 - CS2 - CS1 - CS2 etc).&lt;br /&gt;This example illustrates the fact that semaphores can be used to convey events between 2 cooperating processes. In this case, the events being conveyed are the completion of the critical sections of f() and g(). Also note that in this example, the process that waits on a semaphore isn't the one that is posting to the semaphore. This is a major difference between a semaphore and a mutex because a mutex is unable to achieve such a behaviour.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Q3: What are counting semaphores?&lt;/b&gt;&lt;/div&gt;&lt;div&gt;* Semaphores also come in a variety of flavours. One such flavour is called a counting semaphore. A counting semaphore is one that is able to allow more than one process to successfully wait on it. It lets through some "count" number of processes through sem_waits. This makes a&amp;nbsp;counting semaphore more useful than a mutex - for example, it can be used to implement reader-writer locks or allow a fixed level of concurrency in a piece of code. Note that mutexes only allow for one process/thread in a critical section.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;* Please remember that mutexes need to be acquired and released by the same thread. A request release a mutex currently held by another process should be treated as invalid code. This is different from the behaviour of a semaphore. A semaphore may be WAIT-ed upon by one thread/process and be POST-ed by another. This is usually by design. Otherwise mutual exclusion cannot be guaranteed in all cases.&lt;br /&gt;&lt;br /&gt;I hope this makes the differences between semaphores and mutexes very clear. If you have any more doubts, just put in your questions in the comments!&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-1856464262338450909?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/1856464262338450909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=1856464262338450909' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1856464262338450909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1856464262338450909'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/06/what-is-difference-between-mutex-and.html' title='What is the difference between a mutex and a semaphore?'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-8233899071135893426</id><published>2011-06-16T04:26:00.006+05:30</published><updated>2011-06-16T05:18:15.609+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='puzzles'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>An approach better than Pancake Sorting for a restricted sort</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;The original source of the question for this blog post is again Algo Geeks.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's the problem description:&lt;/div&gt;&lt;blockquote class="gmail_quote" style="border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; margin-bottom: 0px; margin-left: 0.8ex; margin-right: 0px; margin-top: 0px; padding-left: 1ex;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;There is an array in an external system which cannot be accessed directly.&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;The system exposes 3 functions whose complexity is O(1) :&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new', monospace;"&gt;length()&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt; - returns the length of the array.&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new', monospace;"&gt;get(i)&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt; - returns the element at index i.&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new', monospace;"&gt;reverse(i,j)&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt; - reverses the elements in the array from index i to&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;index j (both indexes inclusive).&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;Sort the array in the best possible way using only these 3 operations?&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;The direct solution to sorting in this case is a Pancake Sort (see the video embedded below).&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;iframe allowfullscreen="" frameborder="0" height="349" src="http://www.youtube.com/embed/kk-_DDgoXfk" width="425"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;Pancake sort has a direct implementation complexity of O(N2) as locating the max element in the unsorted section of the array is an O(N) operation. Besides this, i&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;t is obvious that one cannot use standard quicksort or heapsort directly since a swap operation&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;isn't supplied. However, we can simulate a swap operation using the reverse operator. It's easy to do:&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;swap(i, j) = reverse(i + 1, j) reverse(i, i+1), reverse(i+1, j) where i, j are indices to the array.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;Given this&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;swap operation, we can then implement any O(n log n) sort that we desire since we already have random access via the get(i) function.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;However, we can do better:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Let us define a run as a sequence of consecutive values in the array.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;1. Go through the array and reverse descending runs - O(n) as reverse(i, j) is supplied. Now you have an array with many runs in ascending order. It looks something like a0, a1 ... ak, b0, b1, ... bl, c0, c1, ... cm ...&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;2. Perform a merge procedure pairwise for consecutive runs in the array. The merge is performed as follows:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;If a0, a1, a2 ...ak b0, b1, b2... bl are consecutive runs, then:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;a) Compare a0, b0 (using get() operation to get the values).&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&amp;nbsp; &amp;nbsp;--- Else If b0 &amp;lt; a0 then perform step (b).&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&amp;nbsp; &amp;nbsp;--- Else a0 is in its correct place, increment pointer to the 'a' array and repeat step 2 for a1... ak, b0 ... bl&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;b) reverse(a0 ... b0) and then reverse (ak ... a0) - giving b0, a0, a1 ... ak, b1, b2 .. bl. Repeat step 2 for the run a0, a1 ... ak, b1, b2 ... bl&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Complexity analysis:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Step 1 can be done in O(n) time. Using 2 indices to locate boundaries of runs and an O(1) reverse call, this is easy to achieve.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Step 2 The merge procedure requires 2 get() operations (one of which may be optimized away with careful coding) and (in the worst case) 2 reverse(i,j) operations. Therefore, the cost of putting 1 element in its correct position is O(1). Hence 2 sequences of lengths n and m can be merged in O(min{n, m}) swaps and O(max{n, m}) time.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Overall complexity:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Let us assume that we end up with K runs of lengths L1 - Lk from step 1. Cost of this step O(N)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Cost of merging adjacent runs = O(min{Li, Li+1}) (in terms of swaps), O(max{Li, Lj}) in terms of comparisons.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Total number of merges that will take place = K&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;The worst case for the problem will occur when all the arguments to min{ Li, Lj } are the same. This happens when the runs are of size N/K.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Therefore, cost of merge = O( N/K ) swaps (rather reverse(i,j) calls) and total number of merges = K. Hence overall swaps complexity is O( K * N/K ) = O( N ). However, overall comparison complexity remains O(N log N). So using the reverse operation, we've be able to optimize the number of swaps. However, we cannot breach the lower bound of Omega(n log n) for the number of comparisons required for sorting as this is a comparison based sort.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Comments invited!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;Also, make sure you follow me on Twitter at &lt;a href="http://twitter.com/divyekapoor"&gt;http://twitter.com/divyekapoor&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-8233899071135893426?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/8233899071135893426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=8233899071135893426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8233899071135893426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8233899071135893426'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/06/approach-better-than-pancake-sorting.html' title='An approach better than Pancake Sorting for a restricted sort'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/kk-_DDgoXfk/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-8212864838715109795</id><published>2011-06-16T01:38:00.002+05:30</published><updated>2011-06-16T01:45:44.896+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='interviews'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>A combinatorial game problem</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;So, I was lurking on the AlgoGeeks group when I came across this interesting question posted by Piyush from IIIT-Allahabad. Apparently, it came in a DE Shaw interview.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The original question is:&lt;/div&gt;&lt;div&gt;Given N heaps numbered sequentially from 1 to N that contain atleast 1 counter each, players move in turns to pick counters from the heaps. The rules of the game are such that counters can only be picked from the lowest numbered heap that is not empty. The question is: design an algorithm for optimal play that will determine which player will win given a configuration of heaps.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's my answer:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;There are only 2 types of heaps in this problem:&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;1. Optional heaps -&amp;gt; have &amp;gt; 1 coins&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;2. Non-optional heaps -&amp;gt; have = 1 coins&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;For optional heaps, optimal play dictates that you either pick all the elements from the heap or leave just one element in the heap when you play your turn. This is an obvious constraint because otherwise, you're putting your opponent in the driving seat with a heap configuration that is similar to yours and if he can force a win, he will! :)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;So, to repeat: there are only 2 things you can do with an optional heap - pick all or leave 1. Now, to get the solution for the game, read on:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;Start from the rightmost heap.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;This is base case - whoever gets this heap surely wins.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;Look at the heaps before it.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;If it is a non-optional heap (1 element only), then the assured outcome is the&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;inverse of the assured outcome of the next heap.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;If it is an optional heap, then the assured outcome for whoever is first is a win - irrespective of the&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;assured outcome of the next heap. This is because the player whose turn&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;it is to move can either pick up all the elements of the heap thus converting it&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;into the assured outcome of the next heap (if that is a loss for the other player)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;or can leave 1&amp;nbsp;element in the heap, thus getting a win by optimal play.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;When there are multiple optional heaps in sequence, the optimal play is&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;to always force your opponent to keep picking the last element from each heap&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;so that you retain control over the fate of the game. Hence, a sequence of&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;optional heaps is the same as a single optional heap.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;Unroll the loop till the first heap and output the assured outcome as the answer.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;For example 1 2 2 2 1:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;1 - Win&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;2 1 - Win for Player 1 at this stage&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;2 2 1 - Win for Player 1 at this stage&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;2 2 2 1 - Win for Player 1 at this stage&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;1 2 2 2 1 - Loss for Player 1 at this stage...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;Outcome: Loss&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;This is equivalent to 1 2 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;For eg.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;For the heap: 1 2 3 1 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;2 - win for player 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;1 2 - Loss for player 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;3 1 2 - Win for player 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;2 3 1 2 - Win for player 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;1 2 3 1 2 - Loss for player 1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;This is equivalent to 1 2 1 2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;For all the games discussed above:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;Game 1: 2 3 -&amp;gt; is the same as game 2 2 which is equivalent to 2 -&amp;gt; Player 1 wins&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;Game 2: 1 2 -&amp;gt; is a loss for player 1 for obvious reasons&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;Game 3: 2 1 -&amp;gt; is a win because of the optional heap&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;Game 4:&amp;nbsp;&lt;span style="color: #222222;"&gt;1,2,3,1,4 -&amp;gt; Loss for player 1. Equal to 1 2 2 1 2 -&amp;gt; 1 2 1 2 -&amp;gt; Loss&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;span style="color: #222222;"&gt;&lt;div&gt;Game 5: 1,1,2,3 -&amp;gt; Win for player 1. Equal to 1 1 2 2 -&amp;gt; 1 1 2 -&amp;gt; Win&lt;/div&gt;&lt;div&gt;Game 6: 2,1,3,4,5 -&amp;gt; Equal to 2 1 2 2 2 -&amp;gt; 2 1 2 -&amp;gt; Win for player 1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;div&gt;Nice question. Hope you enjoyed the solution too! :)&lt;/div&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;div&gt;Feel free to leave a comment if you liked it and&amp;nbsp;&lt;/div&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;div&gt;don't forget to follow me on Twitter at: &amp;nbsp;&lt;a href="http://twitter.com/divyekapoor"&gt;http://twitter.com/divyekapoor&lt;/a&gt;&lt;/div&gt;&lt;/span&gt; &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-8212864838715109795?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/8212864838715109795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=8212864838715109795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8212864838715109795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8212864838715109795'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/06/combinatorics-game-problem.html' title='A combinatorial game problem'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-5012361642733327889</id><published>2011-06-12T12:14:00.003+05:30</published><updated>2011-06-12T12:35:15.221+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='interviews'/><title type='text'>Printing all permutations of a string containing duplicate characters (C/C++)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;style type="text/css"&gt; &lt;!--  @page { margin: 2cm }  P { margin-bottom: 0.21cm }  A:link { so-language: zxx } --&gt; &lt;/style&gt;   &lt;br /&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;style type="text/css"&gt; &lt;!--  @page { margin: 2cm }  P { margin-bottom: 0.21cm }  A:link { so-language: zxx } --&gt; &lt;/style&gt;   &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;This is a follow up post to my earlier post on &lt;a href="http://divyekapoor.blogspot.com/2008/10/permutations-of-string-containing.html"&gt;printing all possible permutations of a string&lt;/a&gt; (also called Anagrams) using the C++ Standard Library. The earlier post is located &lt;a href="http://divyekapoor.blogspot.com/2008/10/permutations-of-string-containing.html"&gt;here&lt;/a&gt;. This post should have come on this blog about 3 years ago. I'm no longer interested in solving problems like this but I wanted to put this up for the millions of people who get this problem in interviews and the like and to retain the same for posterity.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;So, previously we've discussed how to print all possible permutations of a string without duplicates using the standard C++ library functions. That's all fine and dandy if we want to use the standard libraries – especially &lt;span style="font-family: 'Courier New', monospace;"&gt;next_permutation&lt;/span&gt;, but what happens if we have to write our own code to do so?&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;In this blog post I'll present recursive solutions to the problem of printing all the possible permutations of a string. I'll even take up the case where the input string contains repeated letters later on in this post. The resultant function will be able to print all possible distinct permutations of a string containing duplicate characters.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;Printing all permutations of a string containing no duplicate characters&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;b&gt;Code 1: The recursive solution for a string with no duplicate characters in C/C++&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;char * full_string;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;void permute(char * str, int length) {&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; if(length == 0) {&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(“%s\n”, full_string);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int i = 0; i &amp;lt; length; ++i) {&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; swap(str[0], str[i]);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permute(str+1, length-1);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; swap(str[0], str[i]);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-family: 'Times New Roman', serif;"&gt;Call like:&lt;/span&gt; permute(full_string, strlen(full_string));&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;To understand how this works, just look at the string “ABC”.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Let us assume that we have a magic function permute2 that generates all possible permutations of a given string of length 2.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Then, the permutations problem for the string “ABC” can then be broken down as:  &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-v1KQFAuONPg/TfRdiObPKUI/AAAAAAAAChc/BxTX8hE5Phw/s1600/CodeCogsEqn.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-v1KQFAuONPg/TfRdiObPKUI/AAAAAAAAChc/BxTX8hE5Phw/s1600/CodeCogsEqn.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;These permute2 values themselves can be broken down to smaller subproblems.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-PxtdObVjBJE/TfRdyxHHO3I/AAAAAAAAChg/2qsLh0OTatI/s1600/CodeCogsEqn+%25281%2529.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-PxtdObVjBJE/TfRdyxHHO3I/AAAAAAAAChg/2qsLh0OTatI/s1600/CodeCogsEqn+%25281%2529.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Here, it is obvious that permute1(any char) = char itself. This is the base case of this recursion. Unrolling the recursion for the 3 required values yields:&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;permute2(“BC”) = { “BC”, “CB” } &lt;/span&gt; &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;permute2(“AC”) = { “AC”, “CA”} &lt;/span&gt; &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;permute2(“AB”) = {“AB”, “BA”} &lt;/span&gt; &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;So the resultant sets of strings are:&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;permute3(“ABC”) = {“ABC”, “ACB”} U {“BAC”, “BCA”} U {“CAB”, “CBA”}&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;which is the set of all permutations of the string “ABC”. It is obvious to see that we are in fact just choosing the starting prefix of the permutation and then requesting the permute function to run on a smaller subproblem of permuting a smaller string.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;To generalize, we can state that we can get all the permutations of a string using the general recurrence:&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-XGUmW0JhjpI/TfRd-QiUxPI/AAAAAAAAChk/h9jVkwmnNtk/s1600/CodeCogsEqn+%25282%2529.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-XGUmW0JhjpI/TfRd-QiUxPI/AAAAAAAAChk/h9jVkwmnNtk/s1600/CodeCogsEqn+%25282%2529.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;This formula basically means that you select a character &lt;b&gt;sk&lt;/b&gt; from the string &lt;b&gt;S&lt;/b&gt; of length &lt;b&gt;n&lt;/b&gt; to represent the first character of the permutation, find all the permutations of the smaller string formed by removing &lt;b&gt;sk&lt;/b&gt;&amp;nbsp;from &lt;b&gt;S&lt;/b&gt; and extend the permutations thus obtained by prefixing &lt;b&gt;sk&lt;/b&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;This is essentially what the code above is implementing. The two swap statements perform the work of selecting an element &lt;b&gt;sk&lt;/b&gt; from the string &lt;b&gt;S&lt;/b&gt; and replacing it back after permuting the smaller string  &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;Printing all distinct permutations of a string containing duplicate characters&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;To achieve this, we just modify the above code a little. To avoid duplicates, we need to enforce the constraint that no character will be selected twice to place in the prefix before calling the subproblems. So, the resulting recursion gets modified as:&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-gD_MudbhKuM/TfReZLXd1SI/AAAAAAAACho/x3ia3E0gFIk/s1600/CodeCogsEqn+%25283%2529.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-gD_MudbhKuM/TfReZLXd1SI/AAAAAAAACho/x3ia3E0gFIk/s1600/CodeCogsEqn+%25283%2529.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;This simply means that at every stage of the recursion, pick only distinct characters. So, how do we do that? We pick the &lt;b&gt;sk&lt;/b&gt; in ascending order.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;b&gt;Code 2: C/C++ code for finding all distinct permutations of a string with duplicate characters in it&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;char* full_string;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;int counter = 0;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;void permute(char *str, int length) {&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; if(length == 0) {&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf("%s\n", full_string);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ++counter;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;// Find the smallest char in the string set it to be the first character. Solve the subproblem for the smaller string.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char *smallest = min_element(str, str + length);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; iter_swap(str, smallest);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permute(str+1, length-1);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;// Look for the smallest element greater than the first element of the current string&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char *smallest_greater = str + length;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(char *i = str+1; i != str+length; ++i)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(*i &amp;gt; *str &amp;amp;&amp;amp; (smallest_greater == str + length || *i &amp;lt; *smallest_greater)) &lt;/span&gt; &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smallest_greater = i;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(smallest_greater != str+length) {&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;// If such an element is found, swap it into the first slot and recurse&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; iter_swap(str, smallest_greater);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; permute(str+1, length-1);&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;// Repeat the loop if possible for the next greater character&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smallest_greater = str + length;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(char *i = str+1; i != str+length; ++i)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(*i &amp;gt; *str &amp;amp;&amp;amp; (smallest_greater == str + length || *i &amp;lt; *smallest_greater)) &lt;/span&gt; &lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smallest_greater = i;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;b&gt;Code Explanation:&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;The fact that we are selecting the character to put at the beginning of the string &lt;b&gt;str&lt;/b&gt; in strict ascending order gives us 2 major guarantees:&lt;br /&gt;&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;No character will be selected more than once. Hence the distinct selection requirement is satisfied.&lt;/li&gt;&lt;li&gt;All distinct characters in the string &lt;b&gt;str &lt;/b&gt;will be selected. Hence, all the permutations will end up being generated&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;A small bonus of selecting the &lt;b&gt;sk&lt;/b&gt; character in this fashion is that&amp;nbsp;the permutations generated in the output will be in lexicographical order (dictionary order). This makes it easy to verify the correctness of the program.&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;This code uses two functions that you might not be aware of :&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;The functions iter_swap and min_element are provided by the standard C++ library. They are really simple and you could code your own versions easily.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;b&gt;iter_swap&lt;/b&gt;  – it just swaps the  elements pointed to by the respective pointers without changing the  pointers themselves. So, it's basically equivalent to the function:&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;void  iter_swap(char *ptr1, char *ptr2) {&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;char   tmp = *ptr1; *ptr1 = *ptr2;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;*ptr2   = tmp;&lt;/span&gt;&lt;/div&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;b&gt;min_element&lt;/b&gt; – finds the location  of the minimum element that exists in the given range. In this case,  it is the char* pointer pointing to the location of that element. It  can be implemented like:&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;char  * min_element(char *start, char *end) { // end is 1 beyond the last  valid element&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;if(start   == end) return end; // empty range&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;char   *min_pos = start;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;for(char   *iter = start+1; iter != end; ++iter) {&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;if(*iter    &amp;lt; *min_pos) min_pos = iter;&lt;/span&gt;&lt;/div&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;return   min_pos;&lt;/span&gt;&lt;/div&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Of course, the standard library implements these as template functions so that they can be used with a variety of datatypes.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;b&gt;Code 3: The iterative solution.&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;The C++ standard library is an elegant repository of algorithms. You can also use the iterative &lt;b&gt;next_permutation&lt;/b&gt; function to generate all the permutations of a string which might contain duplicates. Mark Nelson has done a superb job of explaining how next_permutation works at &lt;a href="http://marknelson.us/2002/03/01/next-permutation/"&gt;http://marknelson.us/2002/03/01/next-permutation/&lt;/a&gt; - do take the time to go through his complete blog post. It is the best description of this algorithm till date. Sample code on how to use that function has already been provided in my &lt;a href="http://divyekapoor.blogspot.com/2008/10/permutations-of-string-containing.html"&gt;previous post&lt;/a&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;Code for this and many other algorithms can be found at the github archive: &lt;a href="http://github.com/swagatata/ds_and_algos"&gt;http://github.com/swagatata/ds_and_algos&lt;/a&gt;&lt;br /&gt;However, all this is a work in progress.&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-5012361642733327889?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/5012361642733327889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=5012361642733327889' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5012361642733327889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5012361642733327889'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/06/printing-all-permutations-of-string.html' title='Printing all permutations of a string containing duplicate characters (C/C++)'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-v1KQFAuONPg/TfRdiObPKUI/AAAAAAAAChc/BxTX8hE5Phw/s72-c/CodeCogsEqn.gif' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-5615947568030662991</id><published>2011-06-12T05:49:00.003+05:30</published><updated>2011-06-12T05:55:23.935+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='gmp'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>C++ BigIntegers: Installing GMP with the C++ class extensions (gmpxx.h)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;style type="text/css"&gt; &lt;!--  @page { margin: 2cm }  P { margin-bottom: 0.21cm }  A:link { so-language: zxx } --&gt; &lt;/style&gt;   &lt;br /&gt;&lt;div style="text-align:center"&gt;&lt;img src="http://gmplib.org/gmplogo2.png" alt="GMP Logo" /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;So I was spending some time with GMP today, trying to install it on my Ubunty Natty (11.04). [1] I wanted to finally get BigInteger support for C/C++ in a hassle free manner. Naturally, I turned to my trusty Synaptic to get and install the libraries. A quick search for libgmp in the repository turned up some old versions of GMP and some modified packages. I was surprized! I was expecting libgmp to be in the Ubuntu repository. A quick Google confirmed that Ubuntu doesn't ship with GMP 5 (which was the latest at the time of this blog post). So I set down to install the library from source. So, first things first:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;1) Get the &lt;span style="font-family: 'Courier New', monospace;"&gt;gmp-5.0.2 &lt;/span&gt;library (or whatever's the latest now) from &lt;a href="http://www.gmplib.org/"&gt;http://www.gmplib.org&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;2) Verify the file using &lt;span style="font-family: 'Courier New', monospace;"&gt;gpg&lt;/span&gt; (Always a good practice)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;gpg --verify gmp-5.0.2.tar.bz2.sig gmp-5.0.2.tar.bz2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;You might get an error at this stage saying that the public key is not available. To fix that, issue&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;gpg --search-keys &lt;key_id&gt;&lt;/key_id&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;and select the SWOX key from the options you get. The&amp;nbsp;KEY_ID is mentioned right below the download link on the gmplib download page. The &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;gmp-5.0.2.tar.bz2.sig&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; file can be downloaded from the downloads area of the site.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;Alternatively, you could check the SHA-1 or SHA-256 cryptographic checksum by extracting the .tar file from the .tar.bz2 or .tar.gz file and running &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;sha1sum gmp-5.0.2.tar&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; or &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;sha256sum gmp-5.0.2.tar&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;3) Extract the files from the archive&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;tar -xvjf gmp-5.0.2.tar.bz2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;4) Follow the installation instructions: Now here's the catch.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;If you follow the standard installation instructions which ask you to follow the 3 step procedure: &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;./configure , make , sudo make install &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;then you'll end up with only the C library built and installed. I did this and&amp;nbsp;I spent quite a bit of time today messing around with GMP, trying to get it to install the C++ classes for enabling BigInteger support. Unfortunately, Google didn't help in fixing this problem. I couldn't find a thread which mentioned the installation of the C++ extensions. However, reading miscellaneous blog posts on issues with installing GMP, I figured out that the switch to install the C++ extensions is &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;--enable-cxx&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; and it has to be passed to &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;./configure&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;. It seems obvious in hindsight but was really unobvious when I was figuring out the installation issues. So, here are the correct set of commands that you need to follow to get GMP to install with the C++ extensions.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;./configure --enable-cxx&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;make&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;make check&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;sudo make install&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Arial, sans-serif;"&gt;This will install GMP to your &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;/usr/local/include&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;and &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;/usr/local/lib&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: 'Courier New', monospace;"&gt; &lt;/span&gt;directories. I prefer this because you can easily remove the files and folders later with minimal system modifications should you so desire. Also, this is the recommended way for non-system installed packages (read install from source packages) to install themselves on a linux system.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;5) Verify that GMP has installed correctly&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;Create the following 2 programs to test out GMP:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;test1.c:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;#include &amp;lt;gmp.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;int main() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;mpz_t a, b, c;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;mpz_inits(a, b, c, NULL);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;mpz_set_si(a, rand());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;mpz_set_si(b, rand());&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;mpz_add(c, a, b);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;gmp_printf("%Zd + %Zd = &amp;nbsp;%Zd\n", a, b, c);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;// If you're not quitting, use mpz_clears(a, b, c, NULL)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;return EXIT_SUCCESS;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;Compile and test with: &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;gcc test1.c -lgmp -static -o test1 &amp;amp;&amp;amp; ./test1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;test2.cc:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;#include &amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;#include &amp;lt;cstdlib&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;#include &amp;lt;gmpxx.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;using namespace std;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;int main() {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;mpz_class a, b, c;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;a = rand();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;b = rand();&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;c = a + b;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;cout &amp;lt;&amp;lt; a &amp;lt;&amp;lt; " + " &amp;lt;&amp;lt; b &amp;lt;&amp;lt; " = " &amp;lt;&amp;lt; c &amp;lt;&amp;lt; endl;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;return EXIT_SUCCESS;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;Compile and run with: &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;g++ test2.cc -lgmpxx -lgmp -static -o test2 &amp;amp;&amp;amp; ./test2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;I've added the static flag to compile with the library included in the executable. If you want to use a shared library version of GMP, then omit the -static flag and make sure your &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;LD_LIBRARY_FLAGS&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; variable has &lt;span style="font-family: 'Courier New', monospace;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;/usr/local/lib&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; present in it.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; widows: 2;"&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: small;"&gt;[1]&amp;nbsp;GMP is the GNU Multi Precision computing library (Home page: http://www.gmplib.org) that provides unlimited precision computing support for C and C++. (Actually, the maximum limit of precision is 41 billion digits but by the time you get to that... hmm... you'll probably run out of space). Their code is very optimized and if you *ever* need BigInteger support in C or C++ - that's the way to go.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-5615947568030662991?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/5615947568030662991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=5615947568030662991' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5615947568030662991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5615947568030662991'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/06/installing-gmp-with-c-class-extensions.html' title='C++ BigIntegers: Installing GMP with the C++ class extensions (gmpxx.h)'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-3968512654065882299</id><published>2011-05-14T20:45:00.001+05:30</published><updated>2011-05-14T20:45:46.865+05:30</updated><title type='text'>Of Parting Friends</title><content type='html'>&lt;div&gt;Life goes on much as before, &lt;/div&gt;&lt;div&gt;The characters change but the books are old&lt;/div&gt;&lt;div&gt;The books, they speak; the words unfold&lt;/div&gt;&lt;div&gt;Life&amp;#39;s sweetest melodies.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;~~ Divye Kapoor, 14 May 2011&lt;/div&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-3968512654065882299?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/3968512654065882299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=3968512654065882299' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3968512654065882299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3968512654065882299'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/05/of-parting-friends.html' title='Of Parting Friends'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-776911689454491586</id><published>2011-05-09T13:38:00.001+05:30</published><updated>2011-05-09T13:38:48.024+05:30</updated><title type='text'>Swagat's Testimonial</title><content type='html'>It feels really good once in a while to receive a testimonial from a person you&amp;#39;ve worked with, one who truly understands you and your abilities. &lt;a href="http://letmeseeswagat.blogspot.com"&gt;Swagat&lt;/a&gt; has been a dear friend - one with whom I&amp;#39;ve spent countless hours and from whom I&amp;#39;ve learnt a lot. As part of the usual rituals before passing out from campus, he wrote me a testimonial. Here&amp;#39;s what he had to say:&lt;div&gt;  &lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;span class="Apple-style-span" style="font-family: verdana, arial; font-size: 11px; "&gt;&lt;div class="heading" style="color: rgb(45, 164, 198); font-weight: bold; line-height: 19px; font-size: 12px; float: left; width: 440px; "&gt;  &lt;a class="profile_link" target="_blank" href="http://192.168.121.9/php/yaadein2011/profile_view.php?view_id=vishnuec" style="text-decoration: none; color: rgb(45, 164, 198); "&gt;Swagat Konchada&lt;/a&gt; says:&lt;/div&gt;&lt;div class="content" style="line-height: 17px; margin-top: 3px; float: left; width: 490px; "&gt;  &lt;p&gt; &lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;In a few days, we&amp;#39;ll go our ways out of this place. In a few months, you&amp;#39;ll start a new life and all this &lt;/p&gt;&lt;div&gt;would be nothing but a memory. However, I think  our memories would be the best of the lot in my mind. &lt;/div&gt;  &lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;I learned more from Divye than from the rest of the campus. He&amp;#39;s a treasure of uncalculable amount of knowledge. And the best thing is there is no mystery behind why he is the DK. Many people have a superstition that hard work is for someone who has no ability/skill. DK is the first person who shattered such orthodoxy in me by proving how a combination of passion, ability and perseverance can make wonders in your life. Of many, I thank him for this one particularly. &lt;/div&gt;  &lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;Everyone knows the geeky side of DK. They remember him whenever they face with any problem regarding computers. They know he is the go to guy for all tech problems. They feel insecure at the sight of his confidence and knowledge. If only they&amp;#39;d look beyond the beauty of his brain into the beauty of his heart. To anyone who still doubt it, I can assure you that DK is human like you and me :). For me he is the goto guy for any problem. &lt;/div&gt;  &lt;div&gt; &lt;/div&gt;&lt;div&gt;He is my best friend. &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;I only wish the times we solved puzzles together, we discussed current affairs, we had dinner/rolls &lt;/div&gt;  &lt;div&gt;together, we participated in COGNI, we experimented with the piano, and a lot more... if only they&amp;#39;d last &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;forever... I&amp;#39;ll miss you man...&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;DK&amp;#39;s addendum:&lt;/b&gt; I won&amp;#39;t miss you. You know why? Because we&amp;#39;ll stay in touch. I don&amp;#39;t let friends get away so easily. BTW, you&amp;#39;re awesome! And thanks! :D&lt;/div&gt;  &lt;/div&gt;&lt;/span&gt;&lt;br&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-776911689454491586?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/776911689454491586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=776911689454491586' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/776911689454491586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/776911689454491586'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/05/swagats-testimonial.html' title='Swagat&apos;s Testimonial'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-6965815570313983816</id><published>2011-05-07T06:02:00.007+05:30</published><updated>2011-05-07T06:43:22.328+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='unity'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>An Introduction to Unity Keyboard Shortcuts</title><content type='html'>&lt;div&gt;&lt;img src="http://www.tuxmachines.org/images/ubuntu_unity_desktop_mockup_by_musl1m-d33znwv.png"&gt;&lt;br /&gt;Credit: &lt;a href="http://www.tuxmachines.org/node/50311"&gt;http://www.tuxmachines.org/node/50311&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, a number of people have posted that they don&amp;#39;t like the new &lt;a href="http://en.wikipedia.org/wiki/Unity_(desktop_environment)"&gt;Unity Desktop interface&lt;/a&gt; so much on the new &lt;a href="http://www.ubuntu.com"&gt;Ubuntu 11.04&lt;/a&gt;. You&amp;#39;re reading this guide because you probably are having trouble adjusting to it. I, on the other hand, am starting to find Unity quite an improvement over the so called Ubuntu Classic interface. So, to help you out, here are a couple of tips that will push you along on the path of becoming a Unity fanboy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Observation:&lt;/b&gt; The main menu bar for all applications has been shifted into the title bar. This is quite similar to the way the Mac handles things. The currently running application&amp;#39;s title bar is hidden in the top bar. To show it, you can either move your mouse over to the top bar or you can press the Alt key. I personally prefer the Alt key as it&amp;#39;s a keyboard friendly way of accessing the menu. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Many people have gripes with the left sidebar present in the Unity interface. The primary problem being that the default softwares on the left menu are not the ones they might be using the most. So, here are a few tips I&amp;#39;ve used to improve my experience with the sidebar.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Tip 1:&lt;/b&gt; Open the applications that you use frequently and locate their icons on the left panel. Right click on them and check mark the &amp;quot;Keep in Launcher&amp;quot; menu item. They end up being very readily available.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Tip 2:&lt;/b&gt; You can open the launcher menu from the keyboard by using the shortcut key Alt+F1. The topmost launcher icon gets highlighted and you can use the keyboard to navigate to the application that you want to switch to or start. If you want to directly start an application, use the Alt+F2 shortcut. (In Ubuntu Class this would bring up the Run box. Now, it brings up a sleeker interface to search for and open folders or applications).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Tip 3:&lt;/b&gt; The icons present in the launcher menu are rearrangable. Long click on the icons to make the icons draggable and modify the menu to suit your taste. A pro-tip here is that the top 10 menu items are accessible directly from the keyboard. So make sure you put your frequently used icons there. My suggestions are that you should have a Chrome/Firefox, Gedit, Terminal, Totem and Synaptic present in the top 10 icons.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Tip 4:&lt;/b&gt; As alluded to in Tip 3, the top 10 launcher icons are accessible via keyboard shortcuts. Press the Windows Key (Win key) along with a number to launch the corresponding icon. This will launch the application if it hasn&amp;#39;t started or switch to it if an instance of it already exists. This is pretty handy for switching between applications as you don&amp;#39;t need to go through the Alt+Tab mechanism and you can directly switch if you remember the launcher number of the application that you want to switch to.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For example, I frequently open a number of windows and when I want to switch over to my web browser (Chrome) whose icon is present at location 2 in my launcher, I just press Win+2. That&amp;#39;s it! I&amp;#39;m now in Chrome. Now if I want to go back to my code in Gedit, I just press Win+4 and I&amp;#39;m in Gedit. No messy Alt+Tab business. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So that concludes my short introduction to Unity and it&amp;#39;s keyboard shortcuts. I hope you liked it. A complete list of the keyboard shortcuts for Unity is in the image below. Feel free to comment if you have any tips of your own.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;img src="http://2.bp.blogspot.com/-tb3MpSaqx4w/TbnKpb65Q3I/AAAAAAAAAHc/25_nQXajKpI/s1600/Unity-keyboard-shortcuts.png" width="750px"&gt; &lt;br /&gt;&lt;br /&gt;Image Credits: &lt;a href="http://soumalyaray.blogspot.com/2011/04/ubuntu-unity-keyboard-shortcut-as.html"&gt;http://soumalyaray.blogspot.com/2011/04/ubuntu-unity-keyboard-shortcut-as.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-6965815570313983816?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/6965815570313983816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=6965815570313983816' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6965815570313983816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6965815570313983816'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/05/introduction-to-unity-keyboard.html' title='An Introduction to Unity Keyboard Shortcuts'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-tb3MpSaqx4w/TbnKpb65Q3I/AAAAAAAAAHc/25_nQXajKpI/s72-c/Unity-keyboard-shortcuts.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-6052831948544851377</id><published>2011-02-25T22:28:00.003+05:30</published><updated>2011-02-25T22:41:19.612+05:30</updated><title type='text'>Sadi Gali - Punjabi Lyrics and Meaning (in English) - Tanu Weds Manu</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-size:10.5pt; line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;Another superb song makes its appearance on the Bollywood scene. Sadi Gali from Tanu Weds Manu is a perfect Punjabi Dance track. Performed by Lehmber Husainpuri from RDB, words aren&amp;#39;t sufficient to describe it. Just listening to it makes you want to jump up and start tapping your feet to the music. It&amp;#39;s even garnered over a million plays on Youtube. In an effort to make this song&amp;#39;s lyrics accessible to the masses, here&amp;#39;s the meaning of the song in English paragraph by paragraph. I made it while listening to this song non-stop on loop. Hope you enjoy it!&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-size:10.5pt; line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/VwewYiJuyF0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-size:10.5pt; line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;Kudiyan de vich phir hassdi khed di&lt;br /&gt;[Hasdi] x 4 Khed di&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Ho, gutt di parandi teri naujawanu meldi&lt;br /&gt;[Naujawa-] x 4 -nu meldi&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;Again you&amp;#39;re smiling and playing in the midst of girls&lt;br /&gt;Ho, Your &amp;quot;gutt da paranda&amp;quot;* ties up youngsters (in your love)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;gutt da paranda = An artificial hair extender often worn by Punjabi women to increase the length of their locks.&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Kudiyan de vich phire hassdi khed di&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;College nu jaave ni tu naujwanu meldi&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Aashiqan nu darsh dikhaya karo&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Ni kadi sadi gali bhul ke vi&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;[Aaya karo ji kadi sadi gali bhul ke vi] x 3 times&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;Again you&amp;#39;re smiling and playing in the midst of girls&lt;br /&gt;You go to college and you meet youngsters&lt;br /&gt;Show yourself to your umpteen lovers&lt;br /&gt;Oh, Come by my way sometime, even if by mistake&lt;br /&gt;[Oh, please do come by my way sometime, even if by mistake] x 3&lt;br style="mso-special-character:line-break"&gt; &lt;br style="mso-special-character:line-break"&gt; &lt;b style="mso-bidi-font-weight:normal"&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;Goriyan gallan &amp;#39;ch tere toye badey fabde&lt;br /&gt;[Toye] x 4 badey fabde&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Mitran pyaaran nu sohne badey lagde&lt;br /&gt;[Sonhe be] x 4 badey lagde&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;Your dimples look superb on your fair cheeks&lt;br /&gt;Friends and Near-Dear ones find them really pretty&lt;br /&gt;[Toye = Dimples]&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Goriyan gallan &amp;#39;ch tere toye badey fabde&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Mitran pyaaran nu sohne badey lagde&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Thoda saade utte taras bhi khaya karo&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Ni kadi sadi gali bhul ke vi&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;[Aaya karo ji kadi sadi gali bhul ke vi] x 3 times&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;Your dimples look superb on your fair cheeks&lt;br /&gt;Friends and Near-Dear ones find them really pretty&lt;br /&gt;Have some pity on me too&lt;br /&gt;Oh, Come by my way sometime, even if by mistake&lt;br /&gt;[Oh, please do come by my way sometime, even if by mistake] x 3&lt;br /&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;Jidro vi lange munde maarde seetiyan&lt;br /&gt;[Maarde] x 4 seetiyan&lt;/b&gt;&lt;/span&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Ho kar de ishaare koi maarda geetiyan&lt;br /&gt;[Maarda] x 4 geetiyan&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-size:10.5pt; line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;Wherever you pass by guys whistle at you&lt;br /&gt;Somebody makes passes and runs rings around you (Pun: throws small pellets at you)&lt;/span&gt;&lt;/span&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Jidro vi lange munde maarde seetiyan&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Kar de ishaare koi maarda geetiyan&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Sajna nu aina na sataya karo&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Ni kadi sadi gali bhul ke vi&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Aaya karo ji kadi sadi gali bhul ke vi&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-size:10.5pt; line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;Wherever you pass by guys whistle at you&lt;br /&gt;Somebody makes passes and throws pebbles at you&lt;br /&gt;Don&amp;#39;t trouble your lovers so much&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;Oh, come by my way sometime, even if by mistake&lt;br /&gt;Oh, please do come sometime, even if by mistake&lt;br /&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Rab ne husn ditta maan nai karida&lt;/span&gt;&lt;br /&gt;[Maan ni] x 4 karida&lt;br /&gt;&lt;span class="apple-style-span"&gt;Aakkadan di agg vich ainwe nai sadee da&lt;br /&gt;[Ainwe ni] x 4 sadee da&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-size:10.5pt; line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;God has given you looks, don&amp;#39;t be proud&lt;br /&gt;Don&amp;#39;t burn so in the fire of arrogance&lt;/span&gt;&lt;/span&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Rab ne husn ditta maan nai kari da&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Aakkadan di agg vich ainwe nai sadee da&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Kade pyaar wala meeh barsaya karo&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Ni kadi sadi gali bhul ke vi&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;[Aaya karo ji kadi sadi gali bhul ke vi] x 3&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-size:10.5pt; line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;God has given you looks, don&amp;#39;t be proud&lt;br /&gt;Don&amp;#39;t burn so in the fire of arrogance&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;Do shower your droplets of love&lt;br /&gt;Oh, come by my way sometime, even if by mistake &lt;br /&gt;[Oh, please do come sometime, even if by mistake] x 3&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Lehmber ne ban jana tera manmeet ni&lt;br /&gt;[Tera ma] x 4 manmeet ni&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Sacchi succhi ohde naal pala tu preet ni&lt;br /&gt;[Pala tu] x 4 preet ni&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-size:10.5pt; line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;Lehmber (the singer) is going to become your lover&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;Get involved with him absolutely truly (with a pure heart)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Lehmber ne ban jana tera manmeet ni&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Sacchi succhi ohde naal pala tu preet ni&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Saareyan nu mangar na laaya karo&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Ni ji kadi sadi gali bhul ke vi&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;[Aaya karo ji kadi saadi gali bhul ke vi] x 7&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-size:10.5pt; line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;Lehmber (the singer) is going to become your lover&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;Get involved with him absolutely truly&lt;br /&gt;But don&amp;#39;t bring everyone with you (when you come by)&lt;br /&gt;Oh, come by my/his way sometime, even if by mistake &lt;br /&gt;[Oh, please do come sometime, even if by mistake] x 7&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;br style="mso-special-character:line-break"&gt; &lt;br style="mso-special-character:line-break"&gt; &lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="font-size:10.5pt; line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;Song Name: Sadi Gali&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10.5pt;line-height:115%; font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;;color:black"&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Film/Album: Tanu Weds Manu&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Singer(s): Lehmber Hussainpuri&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Music Director: Krsna&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Lyricist: Rajshekhar&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Length: 4:24&lt;/span&gt;&lt;br /&gt;&lt;span class="apple-style-span"&gt;Picturised on: R Madhavan, Kangna Ranaut&lt;/span&gt;&lt;br style="mso-special-character:line-break"&gt; &lt;br style="mso-special-character:line-break"&gt; &lt;b style="mso-bidi-font-weight:normal"&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style="mso-bidi-font-weight:normal"&gt;&lt;span style="font-size:10.5pt;line-height:115%;font-family:&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; color:black"&gt;If you find any errors - just let me know. Comments welcome! :)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-6052831948544851377?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.youtube.com/watch?v=ot1vaycn0jk&amp;feature=player_embedded#at=95' title='Sadi Gali - Punjabi Lyrics and Meaning (in English) - Tanu Weds Manu'/><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/6052831948544851377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=6052831948544851377' title='39 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6052831948544851377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6052831948544851377'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/02/sadi-gali-tanu-weds-manu-punjabi-lyrics.html' title='Sadi Gali - Punjabi Lyrics and Meaning (in English) - Tanu Weds Manu'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/VwewYiJuyF0/default.jpg' height='72' width='72'/><thr:total>39</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-3678674631842072173</id><published>2011-02-03T19:50:00.002+05:30</published><updated>2011-02-03T20:08:58.590+05:30</updated><title type='text'>How do you prevent other linux users from listing your files in a directory?</title><content type='html'>I&amp;#39;d got this question from Ahmet from Turkey via &lt;a href="http://vark.com"&gt;Aardvark&lt;/a&gt;. I&amp;#39;d known this answer for a while and it was trivial to reply. For posterity, here&amp;#39;s my answer:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;p&gt;The short and sweet answer:&lt;/p&gt;&lt;p&gt;1) Use the chmod tool to remove the &amp;quot;others read/write/execute&amp;quot; permission bits from the directories that you don&amp;#39;t want others to be viewing. A command like &lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;   chmod 750 /path/to/directory/root &lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;should do the trick. You might even want to consider the -R option for recursive application of these permissions.&lt;br /&gt;&lt;p&gt;Note: if you don't use the recursive option, you might be able to ls or cd into a subdirectory even if the parent directory has the permissions disabled.&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2) For an explanation of why this works, just have a look at this site: &lt;a href="http://www.perlfect.com/articles/chmod.shtml"&gt;http://www.perlfect.com/articles/chmod.shtml&lt;/a&gt; - the directory permissions section should make things clear.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A short synopsis is:&lt;/div&gt;&lt;div&gt;Read permission on a directory - Allows &lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;ls&lt;/font&gt; to list the files in the directory&lt;/div&gt;&lt;div&gt;Write permission on a directory - Allows files to be deleted&lt;/div&gt;&lt;div&gt;Execute permission on a directory - Allows a user to &lt;font class="Apple-style-span" face="&amp;#39;courier new&amp;#39;, monospace"&gt;cd&lt;/font&gt; into the directory&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Technically:&lt;/div&gt;&lt;div&gt;Read - Read the directory inode and hence list the files and related info&lt;/div&gt;&lt;div&gt;Write - Modify the directory inode&lt;/div&gt;&lt;div&gt;Execute - Allow a chdir(...) system call to succeed on the particular inode&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Removing these permissions is akin to saying that you don't want anybody else messing around with this inode (that you own).&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you want to know more about inodes, check out &lt;a href="http://en.wikipedia.org/wiki/Inode"&gt;Inodes on Wikipedia&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-3678674631842072173?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/3678674631842072173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=3678674631842072173' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3678674631842072173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3678674631842072173'/><link rel='alternate' type='text/html' href='http://www.divye.in/2011/02/how-do-you-prevent-other-linux-users.html' title='How do you prevent other linux users from listing your files in a directory?'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-3361611054734703734</id><published>2010-12-08T14:24:00.000+05:30</published><updated>2010-12-08T14:25:14.976+05:30</updated><title type='text'>Thank you from the Wikimedia Foundation</title><content type='html'>&lt;div class="gmail_quote"&gt;From: &lt;b class="gmail_sendername"&gt;Sue Gardner&lt;/b&gt; &lt;span dir="ltr"&gt;&amp;lt;...@&lt;a href="http://wikimedia.org"&gt;wikimedia.org&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;Date: Wed, Dec 8, 2010 at 1:41 PM&lt;br&gt;Subject: Thank you from the Wikimedia Foundation&lt;br&gt;  &lt;br&gt;&lt;br&gt;Dear Divye,&lt;br&gt; &lt;br&gt; Thank you for your gift of USD 100 to the Wikimedia Foundation, received on December 8, 2010. I'm very grateful for your support. &lt;br&gt; Your donation celebrates everything Wikipedia and its sister sites stand for: the power of information to help people live better lives, and the importance of sharing, freedom, learning and discovery. Thank you so much for helping to keep these projects freely available for their more than 400 million monthly readers around the world.&lt;br&gt;   &lt;br&gt; Your money supports technology and people. The Wikimedia Foundation develops and improves the technology behind Wikipedia and nine other projects, and sustains the infrastructure that keeps them up and running. The Foundation has a staff of about fifty, which provides technical, administrative, legal and outreach support for the global community of volunteers who write and edit Wikipedia. &lt;br&gt;   Many people love Wikipedia, but a surprising number don&amp;#39;t know it&amp;#39;s run by a non-profit. Please help us spread the word by telling a few of your friends.&lt;br&gt; &lt;br&gt; And again, thank you for supporting free knowledge.&lt;br&gt; &lt;br&gt; Sincerely Yours,&lt;br&gt; &lt;br&gt; &lt;br&gt; Sue Gardner&lt;br&gt; Executive Director&lt;br&gt; &lt;br&gt; * To donate: &lt;a href="http://donate.wikimedia.org" target="_blank"&gt;http://donate.wikimedia.org&lt;/a&gt;&lt;br&gt; * To visit our Blog: &lt;a href="http://blog.wikimedia.org" target="_blank"&gt;http://blog.wikimedia.org&lt;/a&gt;&lt;br&gt; * To follow us on Twitter: &lt;a href="http://twitter.com/wikimedia" target="_blank"&gt;http://twitter.com/wikimedia&lt;/a&gt;&lt;br&gt; * To follow us on Facebook: &lt;a href="http://www.facebook.com/wikipedia" target="_blank"&gt;http://www.facebook.com/wikipedia&lt;/a&gt;&lt;br&gt; &lt;br&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-3361611054734703734?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/3361611054734703734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=3361611054734703734' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3361611054734703734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3361611054734703734'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/12/thank-you-from-wikimedia-foundation.html' title='Thank you from the Wikimedia Foundation'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-8012761294287567529</id><published>2010-12-08T13:47:00.000+05:30</published><updated>2010-12-08T13:47:22.793+05:30</updated><title type='text'>Wikipedia - A big "Thank you"</title><content type='html'>&lt;a href="http://wikimediafoundation.org/wiki/Support_Wikipedia/en"&gt;&lt;img border="0" alt="Support Wikipedia" src="http://upload.wikimedia.org/wikipedia/commons/4/41/Fundraising_2009-horizontal-thanks-en.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I just made a donation of $100 to Wikipedia in recognition of the shared treasure of knowledge it maintains on such a huge wealth of topics. Thank you so much Wikipedia for all that you've done for me. I am indebted to you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-8012761294287567529?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://wikimediafoundation.org/wiki/Support_Wikipedia/en' title='Wikipedia - A big &quot;Thank you&quot;'/><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/8012761294287567529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=8012761294287567529' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8012761294287567529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8012761294287567529'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/12/wikipedia-big-thank-you.html' title='Wikipedia - A big &quot;Thank you&quot;'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-7102961310151102816</id><published>2010-12-03T02:42:00.000+05:30</published><updated>2010-12-03T02:43:12.825+05:30</updated><title type='text'>Google Interview Questions and the Google Campus Interview Process 2011</title><content type='html'>&lt;div&gt;Hi Guys, &lt;/div&gt;&lt;div&gt;   I know I&amp;#39;m not really writing a letter, but I really felt that I should jot down my impression of the Google Campus Placement process of 2010 before I forgot most of it. As a lot of my Facebook friends know by now, I&amp;#39;ve been given a campus placement offer by Google. Naturally, I&amp;#39;m really excited about it. Here&amp;#39;s the story of how it all happened - a blow by blow account. (Tip: The interview questions are well marked out in the narrative and you can skip to them if you&amp;#39;re not really interested in the campus process narrative).&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;   Google&amp;#39;s hiring process is known to be pretty tough and their engineers are counted among the best in the world. The first whiff of that came through when a couple of young techies and an HR landed on campus sometime in November to carry out their written test. 50 eligible candidates for the test and 50 copies of the question paper: +3 -1 was the scoring scheme - so no guessing! (or atleast very calculative guessing). Most of the interview questions were pretty standard in nature - probability, expectation, some coding questions. Judge for yourself. Here are the questions for 2010 (reconstructed from collective memory of all the candidates that gave the test).&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: &amp;#39;Times New Roman&amp;#39;; font-size: medium; "&gt;&lt;span id="internal-source-marker_0.1014862502925098" style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Google Placement Paper 2010&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;10th November 2010&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Eligibility : B Tech/IDD/M Tech/PHD-CSE&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;CGPA-7.0 for B Tech, 7.5 for M Tech&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Time Allocated : 65 mins&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;There were 17 objective questions and 1 subjective question.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;1) Given preorder traversal of a Binary Search Tree. From the given options you have to select which one can possibly be the inorder traversal of the tree.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;[If it is indeed a BST, then the correct answer should be the one which is in sorted order]&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;2) If u could find the (n/4)th element of an array in O(n) time, then what is the worst time complexity of quick sort algo if this algo is used to decide the pivot element.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Answer :&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt; It's O(nlogn), since we can write the execution time as &lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;T(n) = . T(n . r) + T(n (1 - r)) + O(n)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;where r is 1/4 for this case. &lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;for any r &amp;lt; 1, we have the expression recursively approaching &lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;T(n ) = T(n * r^2) + 2 T(n * r * (1 - r)) + T(n * (1 - r)^2) + 2O(n) ;  [O(n) = O(nr) + O(n(1-r))]&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;the number of O(n)s adds = log n/log r or logn/log(1-r) whichever is higher... but just logn times&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;3) find the min no of comparisons required to find both the max and min elements of an array containing 20 elements.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Ans) Can be done in a total of 28 comparisons. &lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;4) If an array[0...m-1,0....n-1] is stored in column major format how will u find the (i,j) element?&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;a)i*n+j&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;b)i*m+j&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;c)j*n+i&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;d)j*m+i&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;5)If an insurance company pays $5000 for complete loss, $1500 in case of a loss of $2000 and more and nothing in case the loss is less that $2000. It obviously pays nothing in case of no loss.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;If the probability of the first 3 events are 0.02,0.10 and 0.3 , find what should the company charge in order to make a profit of $50 from each customer&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;6) the prob of finding the parking slot occupied is 1/3.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;U find it empty for 9 consecutive days.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Find the prob that it will be empty on the 10th day.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;7) consider a NxN matrix in which the elements are either 0 or 1.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Find how many such matrixes are possible that are symmetric in nature(the matrix and its transpose count as 1.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;8) 1&amp;lt;=i,j,k&amp;lt;=300.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Find (i,j,k) pairs such that their sum is divisible by 3.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;(2,2,1) and (2,1,2) are counted as different.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;9) in the loop&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;int counter=0;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;for(i=0;i&amp;lt;10;i++)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;  for(j=i+1;j&amp;lt;10;j++)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;    for(k=j+1;k&amp;lt;10;k++)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;      for(l=k+1;l&amp;lt;10;l++)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;        for(m=l+1;m&amp;lt;10;m++)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;          counter++;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Find the value of counter in the end.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Ans. &lt;/span&gt;&lt;span style="font-size: 6.6pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: super; white-space: pre-wrap; "&gt;10&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;C&lt;/span&gt;&lt;span style="font-size: 6.6pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: sub; white-space: pre-wrap; "&gt;5&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;i,j,k,l,m can be any 5 different numbers between [0-9] such that i&amp;lt;j&amp;lt;k&amp;lt;l&amp;lt;m. So, choose any 5 numbers and there is only one way to arrange.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;10) Consider a set S of the first 10 natural numbers.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Find the number of subsets that do not contain consecutive elements.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Ans)&lt;/span&gt;&lt;br&gt;  &lt;p style="text-indent: 36pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Subsets of length 0 = 1&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-indent: 36pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Subsets of length 1 = 10&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-indent: 36pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Subsets of length 2 = 36&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-indent: 36pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Subsets of length 3 = 56&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-indent: 36pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Subsets of length 4 = 35&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-indent: 36pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Subsets of length 5 = 6&lt;/span&gt;&lt;/p&gt;  &lt;p style="text-indent: 36pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;                       Total = 144&lt;/span&gt;&lt;/p&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;11) A question on TestandSet(), which are used as locks.....taught in OS course.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;enter_CS()&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;//This is what I remember&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;{&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;while(TestandSet(X));&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;}&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Exit_CS()&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;{&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;X=0;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;}&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;12) A disk contains 16 partition unit , each unit contains 128 subunits, and each subunit contains 256 sectors of 512 byte each.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Find out what is total storage capacity?&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Also find out the no of bits required to identify each sector?&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Ans)&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt; 256 MB, 19 bits&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;13) Which of the following is not a Regular Language :&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;a)None given&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;b)(0^i).(1^j) such that i&amp;lt;j&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;c)(0^i).w.(1^j) such that w belongs to {0,1}* and i&amp;gt;=0&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;d) such that every pth input digit is 0 where p is a prime number&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;14)find the output&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;void f(char * x)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;{&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;x++;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;*x=&amp;#39;a&amp;#39;;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;}    &lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;int main()&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;{&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;char * str=&amp;quot;hello&amp;quot;;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;f(str);&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;cout&amp;lt;&amp;lt;str;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;system(&amp;quot;pause&amp;quot;);&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;span class="Apple-tab-span" style="white-space: pre; "&gt;	&lt;/span&gt;return 0;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;}&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;a) hello&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;b)hallo&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;c)allo&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;d)empty string&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;15)Given an sorted array, what is the complexity of finding weather a number is present n/2 times or not.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;a)O(lgn)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;b)O(n)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;c)O((lgn)^2)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;d)O(1)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;[Ans is option d]&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;16)The weight of a squence a0, a1,a2,... ,an is defined as a0+a1/2+a2/(2^2)+...+an/(2^(n)). A subsequence of a sequence is said to be a sequence with some of the elements deleted from the original sequence but the order of the sequence remaining the same. Now let X be  the maximum weight for a subsequence of a sequence a0,a1,a2,a3..,an. And Y be the maximum weight for a subsequence of the sequence a1,a1,a2,a3.....,an. Then X in terms of Y is&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;a) max(Y,a0+Y)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;b)max(Y,a0+Y/2)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;c)max(Y,a0+2*Y)&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;d)a0+Y/2&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;[opn b]&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;17) What is the complexity for finding all the leaders in an array? A leader is defined as an element which is greater than all the elements to its right.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;18) Subjective question&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Write a program to find the index in an circular array such that the string that is formed starting from that index is first in lexicographic order.&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;For Ex : in the circular array ABCDEABCCDE&lt;/span&gt;&lt;br&gt;  &lt;span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;The answer is 6 because the circular string starting from the element A in the 6th position comes first in the dictionary formed from all the possible strings of the circular array.&lt;/span&gt;&lt;/div&gt;  &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;   The pre-placement talk was well received (especially since the brother of one of the 2010 B.Tech passouts and an IIT Roorkee alumni had come for giving the PPT). Most of the interaction was very informal with questions ranging from mundane to the technical. Google Instant and the &amp;quot;Did you mean?&amp;quot; feature of Google were the hot topics of discussion and of course, how can we omit the discussion on the Google core search algorithm. The actual interview process was slated for 29th November. A number of questions were asked by the curious audience and very candidly answered by the techies. &lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;   The interview process began dot on time at 6:00 pm on 29th November. A couple of minutes spent getting things in order and off we go!&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;   The first indication that we were dealing with a company that was serious about the people it hired was the fact that it had arrived on campus as a team of 16 people hiring for 3 different profiles. The fact was that they were interviewing only 12 candidates shortlisted from the written test. A quick, back of the envelope calculation shows that they&amp;#39;ve spent more than Rs. 1 lakh per campus that they&amp;#39;ve visited (5,000 x 16 airfare + hotel + travel). All the interviews were soon cubbyholed in the board rooms on the first floor of the placement office and off started the mating ritual: people would go into rooms and emerge 45-50 minutes later after having an intense session. Here&amp;#39;s how my interviews went.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Interview 1: 45 minutes&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Q1. Given a graph with all vertices of even degree, how will you print the Euler&amp;#39;s tour of the graph?&lt;/div&gt;&lt;div&gt;A: Fleury&amp;#39;s Algorithm&lt;/div&gt;&lt;div&gt;  &lt;br&gt;&lt;/div&gt;&lt;div&gt;Q2. Given a set of overlapping intervals of the form (start, end), each of which is associated with a property (say S), print a sequence of disjoint intervals with all properties current valid in that interval.&lt;/div&gt;  &lt;div&gt;eg. (1, 3, S0) (2, 3, S1) (2, 4, S2) yields (1,2, S0), (2, 3, S0 + S1 + S2), (3,4,S2) as the disjoint intervals.&lt;/div&gt;&lt;div&gt;Also, code a solution to the above problem.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Q3. Design a site similar to &lt;a href="http://tinyurl.com"&gt;tinyurl.com&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Q4. Now scale it to higher loads.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Q5. Given that you now have 2 geographically separated datacenters and a request comes in for a url that&amp;#39;s not present in your current datacentre, how will you handle it?&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Q6. Various questions about failovers, replication, node failures, load balancing, redirects etc.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Interview 2: 45 minutes - This one went horribly.&lt;/div&gt;&lt;div&gt;Q1. Given a 2^n x 2^n chessboard and an infinite number of L shaped tiles (of size 2x2) which may be rotated and placed, is it possible to tile the entire chessboard leaving just a single gap?&lt;/div&gt;  &lt;div&gt;A: Yes. You can prove this by induction. Unfortunately, the solution didn&amp;#39;t strike during the interview.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Q2. Delete a node from a Binary search tree.&lt;/div&gt;&lt;div&gt;A: Standard data structures question&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Interview 3: 45 minutes&lt;/div&gt;&lt;div&gt;Q1. Print the elements of a matrix in spiral order (outside to inside). Make your code as efficient as possible. (an icebreaker question)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Q2. Given 2 numbers in base 10 with digits given in MSB to LSB order in a singly linked list, add the two numbers and return the result as a linked list in MSB to LSB order. Do this in &amp;lt; 4n operations on the given linked lists (including traversals) (this constraint was stated somewhat vaguely). Code up the solution. The more efficient the better. I gave multiple solutions to this problem (the first few methods had 4n operations).&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;The primary challenge in the interviews was the tight time limits within which we had to figure out solutions and code them up. Finally, I guess there was some CV evaluation from Mountain View and the offer letters materialized after a sleepless night for us. Congratulations Naman, Parth, Tanmay and Gunjan for also clearing Google. You guys rock!&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Other interesting questions:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Q1. Given a credit card number with a certain number of fixed digits and a certain number of digit placeholders, find the number of solutions such that the entire number yields a remainder of 3 when divided by 13. Use properties of modulus.&lt;/div&gt;  &lt;div&gt;A: This question has a DP that can be solved in O(m n) where n is the number of digit placeholders and m = 13. Brute force is O(10^n). Quite a tough question.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Q2. Given numbers of the form 2^i x 3^j x 5^k x 7^l - generate the numbers in ascending order of the sequence given i,j,k,l &amp;gt;= 0 and are integers. Give an efficient solution to this problem.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Best of luck to those that are still giving Google Interviews this season! :)&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-7102961310151102816?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/7102961310151102816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=7102961310151102816' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7102961310151102816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7102961310151102816'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/12/google-interview-questions-and-google.html' title='Google Interview Questions and the Google Campus Interview Process 2011'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-3639785834362295527</id><published>2010-11-22T16:27:00.008+05:30</published><updated>2011-03-03T11:34:30.485+05:30</updated><title type='text'>Tune Meri Jaana Kabhi Nahin Jaana - Lonely (Emptiness) - IIT Guwahati - Rohan Rathore</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/M9Con1pzolU/0.jpg"&gt;&lt;param name="movie" value="http://www.youtube.com/v/M9Con1pzolU&amp;fs=1&amp;source=uds" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266" src="http://www.youtube.com/v/M9Con1pzolU&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Update: Rohan Rathore and his tragic story is a hoax for sure. This is confirmed. &lt;/b&gt; &lt;br /&gt;&lt;p&gt;I've talked to my friends at IIT Guwahati and there is no record of such a person ever existing on campus. Nobody at IIT-G knew him and if a person dies in tragic circumstances, nearly everyone in the IIT knows it. The story about Rohan Rathore was created in order to gain views for a video on Youtube. So let us all put the "fake" Rohan Rathore to rest permanently as a person who never existed. Therefore, we can be very sure that the original singer of the song is Gajendra Verma. I'm leaving the original post below for archival purposes. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;------ Original Post follows ----&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;I was introduced to this song by Sanat nearly a month ago and today, after listening to it again on Youtube, &amp;nbsp;I really felt that I needed to transcribe its lyrics. It's such a soulful song that you can't help feeling sentimental after hearing it - especially since the IITian (Rohan Rathod) who wrote and sang it died of cancer 15 days after finishing this beautiful piece of music. Everywhere I've looked on the net, the lyrics have been littered with mistakes. This is my cleaned up version and hopefully it makes much more sense than the others.&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: arial; font-size: small;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: arial; font-size: small;"&gt;&lt;div&gt;(English Section)&lt;/div&gt;&lt;div&gt;Oh love of mine, with a song and a whine,&lt;/div&gt;&lt;div&gt;You're harsh and divine like truths and a lie.&lt;/div&gt;&lt;div&gt;But the tale ends not here; I have nothing to fear&lt;/div&gt;&lt;div&gt;for my love is a yell of forgiving and hold on.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the bright emptiness, in a room full of it,&lt;/div&gt;&lt;div&gt;is a cruel mistress - my heart!&lt;/div&gt;&lt;div&gt;I feel this unrest, that nests all hollowness,&lt;/div&gt;&lt;div&gt;for I have nowhere to go and I'm cold.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And I feel so lonely yeah...&lt;/div&gt;&lt;div&gt;There's a better place than this: emptiness.&lt;/div&gt;&lt;div&gt;And I'm so lonely yeah...&amp;nbsp;&lt;/div&gt;&lt;div&gt;There's a better place than this: emptiness yeah...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;alaap&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(Hindi Section)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Tune mere jaana, kabhi nahin jaana,&lt;/div&gt;&lt;div&gt;Ishq mera, dard mera&lt;/div&gt;&lt;div&gt;Tune mere jaana, kabhi nahin jaana,&lt;/div&gt;&lt;div&gt;Ishq mera, dard mera&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Aashiq tera...&amp;nbsp;&lt;/div&gt;&lt;div&gt;Bheed mein khoya rehta hai...&lt;/div&gt;&lt;div&gt;Jaane jahaan....&amp;nbsp;&lt;/div&gt;&lt;div&gt;Poocho toh itna kehta hai -&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That I feel so lonely yeah...&lt;/div&gt;&lt;div&gt;There's a better place than this: emptiness.&lt;/div&gt;&lt;div&gt;And I'm so lonely yeah...&amp;nbsp;&lt;/div&gt;&lt;div&gt;There's a better place than this: emptiness yeah...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;lt;piano closing instrumentals with alaap &amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also, for those who don't speak or understand hindi - here's a line by line translation of the hindi section:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Tune mere jaana, kabhi nahin jaana, (You, my love, have never ever realized)&lt;/div&gt;&lt;div&gt;Ishq mera, dard mera (my love, my pain)&amp;nbsp;&lt;/div&gt;&lt;div&gt;Tune mere jaana, kabhi nahin jaana, (You, my love, have never ever realized)&lt;/div&gt;&lt;div&gt;Ishq mera, dard mera (my love, my pain)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Aashiq tera... (Your lover)&lt;/div&gt;&lt;div&gt;Bheed mein khoya rehta hai... (remains lost in the crowd)&lt;/div&gt;&lt;div&gt;Jaane jahaan.... &amp;nbsp;(My dear love, wherever ...)&lt;/div&gt;&lt;div&gt;Poocho toh itna kehta hai - (... asked, he just says ...)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That I feel so lonely yeah...&lt;/div&gt;&lt;div&gt;There's a better place than this: emptiness.&lt;/div&gt;&lt;div&gt;And I'm so lonely yeah...&amp;nbsp;&lt;/div&gt;&lt;div&gt;There's a better place than this: emptiness yeah...&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hope all of you enjoy this as much as I do.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-3639785834362295527?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.youtube.com/watch?v=M9Con1pzolU&amp;feature=related' title='Tune Meri Jaana Kabhi Nahin Jaana - Lonely (Emptiness) - IIT Guwahati - Rohan Rathore'/><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/3639785834362295527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=3639785834362295527' title='50 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3639785834362295527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3639785834362295527'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/11/tune-mujhe-jaana-kabhi-nahin-jaana.html' title='Tune Meri Jaana Kabhi Nahin Jaana - Lonely (Emptiness) - IIT Guwahati - Rohan Rathore'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>50</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-2040139386132718263</id><published>2010-10-20T11:06:00.001+05:30</published><updated>2010-10-20T11:06:35.495+05:30</updated><title type='text'>What Microsoft is Today</title><content type='html'>I read this on the LinkedIn groups&amp;#39; Microsoft current and ex-employees forum and it really touched my heart. I&amp;#39;ve worked (more accurately, interned) at Microsoft and I can understand the pain that he has felt. Read the mail below and form your own opinions about MSFT.&lt;br&gt;  &lt;h1 style="color: rgb(0, 0, 0); font: bold 21px arial;"&gt;LinkedIn &lt;span style="color: rgb(102, 102, 102); font-weight: bold;"&gt;Groups&lt;/span&gt;&lt;/h1&gt;&lt;div class="gmail_quote"&gt;&lt;div&gt;&lt;table style="width: 550px; border-top: 4px solid rgb(51, 153, 204); font: 12px arial,sans-serif; margin: 0pt auto;" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td style="padding-bottom: 25px; font-size: 13px;"&gt;&lt;div class="im"&gt;       &lt;ul style="list-style-type: none; padding-left: 0pt; margin-bottom: 10px;"&gt;         &lt;li&gt;&lt;b&gt;Group:&lt;/b&gt; Microsoft - Current and Former Employees&lt;/li&gt;   			&lt;li&gt;&lt;b&gt;Discussion:&lt;/b&gt;             &lt;a href="http://www.linkedin.com/e/rdji6e-gfhfi9xz-5i/vaq/31900762/119215/24810663/view_disc/" target="_blank"&gt;I think MS is dying because of losing capability of innovation, losing capability to keep those talent people to work for her, and the fatal reseason of MS dying is Value of  Closing&amp;quot; and &amp;quot;Isolated&amp;quot;&lt;/a&gt;             &lt;/li&gt;        &lt;/ul&gt;       &lt;/div&gt;&lt;p&gt;                            &lt;span&gt;Here&amp;#39;s my personal experience of trying to innovate at Microsoft. I spent 14.5 years at there. I&amp;#39;m one of the co-inventors of ClearType, I have some 20-odd granted US Patents, so I think I have some credibility...&lt;br&gt;   &lt;br&gt; Approximately 2.5 of my Microsoft years were the best years of my (long) working life. About 12 of them were the worst years of my working life - by a very long way. &lt;br&gt; &lt;br&gt; I came to Microsoft in 1995 because I believed that with Windows and Office, it was the one company in the world best-placed to lead the transition from reading on paper to reading on screen which I could see was inevitable. Most of Microsoft thought I was crazy back in 1995 - &amp;quot;No-one will ever read anything longer than a short email on a screen&amp;quot; was the general consensus. Not so crazy now, eh?&lt;br&gt;   &lt;br&gt; My boss, Steve Shaiman, believed and supported the vision. We produced a strategic plan called &amp;quot;Read It Anywhere&amp;quot;, and began executing. In 1995. We were many years ahead of ANYONE else. Then Shaiman left - after a run-in with his VP, I understand. &lt;br&gt;   &lt;br&gt; The group I had come to Microsoft to run was tossed into the Windows organization (and later the NT organization). I had six different managers in three years, none of whom cared about the plan, all of whom wanted me to roll over and let the circling sharks of other teams tear the group to bits by taking its best engineers...&lt;br&gt;   &lt;br&gt; I fought successfully to keep the group together - right up to Divisional VP level, twice! - because I still believed the mission was important. I took most of that pain myself, while keeping the group focused on the plan - and innovating.&lt;br&gt;   &lt;br&gt; In 1998 I was fired, and only rescued with six hours left to run on my jobsearch by Dick Brass, who was an outsider (and thus viewed as prey by most of his fellow-VPs). He had come to Microsoft at BillG&amp;#39;s invitation to develop an eBooks project. TabletPC also came out of that team - but was forced to try to run a sprint while dragging a millstone behind it (Windows).&lt;br&gt;   &lt;br&gt; Jason Atlas has it right. Microsoft has become GM - or the IBM it used to ridicule. Ironically, IBM has rediscovered how to innovate, in the services space. If you&amp;#39;d invested in IBM a year ago, you&amp;#39;d have made a profit of 17%. &lt;br&gt;   &lt;br&gt; Microsoft will not die, at least not for a very long time. But it has become a plumbing company.&lt;br&gt; &lt;br&gt; Microsoft has had no leader able to drive innovation for a very long time. BillG checked out a number of years before he officially left. And the Windows &amp;amp; Office teams learned a long time ago how to frustrate his calls for more rapid innovation. I watched it happen. It took TEN YEARS before ClearType was turned on by default in Windows. Oh, it was grudgingly put in XP. But it was buried so deep few customers ever found it.&lt;br&gt;   &lt;br&gt; If you read my 1999 paper, The Magic of Reading (&lt;/span&gt;                            &lt;a href="http://www.linkedin.com/e/rdji6e-gfhfi9xz-5i/plh/http%3A%2F%2Fwww%2Ebillhillsite%2Ecom%2Fosprey%2Edoc/M743/" target="_blank"&gt;http://www.billhillsite.com/osprey.doc&lt;/a&gt;                            &lt;span&gt;), you&amp;#39;ll see we laid all the groundwork for Amazon&amp;#39;s Kindle and most of the other eBook software in the market today. Microsoft was there years before, and blew it.&lt;br&gt; &lt;br&gt; I was one of the 2009 casualties. Microsoft was right to get rid of me, at keast by teir rationale. I couldn&amp;#39;t find any way to get traction any more. I was just a spinning wheel. Now, I&amp;#39;m obviously biased. But I believe that when a company that knows how to innovate sees a team of smart people who&amp;#39;re really fired up to change the world, it moves obstacles out of their way. &lt;br&gt;   &lt;br&gt; Microsoft did exactly the opposite...&lt;/span&gt;                    &lt;br&gt;       &lt;span style="font-size: 11px; color: rgb(102, 102, 102); display: block; padding-top: 7px;"&gt;Posted by Bill Hill&lt;/span&gt;       &lt;/p&gt;     &lt;/td&gt;&lt;/tr&gt;     &lt;tr&gt;&lt;td style="background-color: rgb(235, 242, 249); text-align: center; padding: 10px;"&gt;       &lt;p&gt;       &lt;a href="http://www.linkedin.com/e/rdji6e-gfhfi9xz-5i/vaq/31900762/119215/24810663/view_disc/" style="margin-right: 20px;" target="_blank"&gt;&lt;b&gt;Comment &amp;amp;#187&lt;/b&gt;&lt;/a&gt;       &lt;a href="http://www.linkedin.com/e/rdji6e-gfhfi9xz-5i/ufv/119215/31900762/member/true/grp_email_unfollow_post/" style="margin-right: 20px;" target="_blank"&gt;&lt;b&gt;Stop Following Discussion &amp;amp;#187&lt;/b&gt;&lt;/a&gt;       &lt;/p&gt;     &lt;/td&gt;&lt;/tr&gt;     &lt;tr&gt;&lt;td style="min-height: 25px;"&gt;&lt;/td&gt;&lt;/tr&gt;     &lt;tr&gt;&lt;td style="padding-top: 10px; border-top: 1px solid rgb(204, 204, 204); color: rgb(102, 102, 102); font-size: 11px;"&gt;       &lt;p&gt;       &lt;/p&gt; &lt;p&gt;LinkedIn values your privacy. At no time has LinkedIn made your email address available to any other LinkedIn user without your permission. ©2010, LinkedIn Corporation.&lt;/p&gt;    &lt;/td&gt;&lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;/div&gt; &lt;/div&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-2040139386132718263?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/2040139386132718263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=2040139386132718263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2040139386132718263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2040139386132718263'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/10/what-microsoft-is-today.html' title='What Microsoft is Today'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-4597299848073805811</id><published>2010-08-27T04:00:00.000+05:30</published><updated>2010-08-27T04:01:10.251+05:30</updated><title type='text'>Are NoSQL implementations really faster than the usual SQL thing?</title><content type='html'>This was the question that I received from France via Aardvark. Here&amp;#39;s my response:&lt;br&gt;&lt;br&gt;&amp;quot;Faster&amp;quot; when applied to software implies a number of things - including the quality of implementation (which can sometimes play a very significant role). &lt;br&gt;  &lt;div class="gmail_quote"&gt;&lt;br&gt;Firstly, it is unfair to compare NoSQL and Relational databases because many NoSQL implementations do away with many of the hard guarantees of the relational world. So even though you might get a speed boost because of that, you&amp;#39;re compromising on durability or consistency in some cases. &lt;br&gt;   &lt;br&gt;Secondly, space usage is definitely a concern. Not everyone can afford the humongous disks that NoSQL implementations will invariably require (denormalization eats up space because of repetition - but this does not apply in all scenarios and can be mitigated with careful thought - YMMV).&lt;br&gt;   &lt;br&gt;Thirdly, nothing can beat RAM - so pure memcached implementations will beat a database anyday at the cost of durability of data. &lt;br&gt;&lt;br&gt;In short, treat &amp;quot;fast&amp;quot; as a term to be used with caution in this scenario as you are essentially comparing apples with oranges. If you still wish to look at some figures, check out &lt;a href="http://www.mysqlperformanceblog.com/2009/10/19/mysql_memcached_tyrant_part3/" target="_blank"&gt;http://www.mysqlperformanceblog.com/2009/10/19/mysql_memcached_tyrant_part3/&lt;/a&gt;&lt;br&gt;   &lt;br&gt;Hope this helps.&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-4597299848073805811?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/4597299848073805811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=4597299848073805811' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4597299848073805811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4597299848073805811'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/08/are-nosql-implementations-really-faster.html' title='Are NoSQL implementations really faster than the usual SQL thing?'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-3792827919688305549</id><published>2010-07-25T23:38:00.001+05:30</published><updated>2010-07-25T23:38:32.835+05:30</updated><title type='text'>This Blog is Officially in Hibernation</title><content type='html'>Over the past few days (months?? year?) I&amp;#39;ve become just too busy to blog about anything of interest to anyone. That has left me with a number of tricks, tips, ideas and unfinished blog posts. It is high time that I officially post on my blog my inability to service it with content. For those of you looking to find me or to take my advice, please mail me at my email id that is there somewhere on the sidebar of this page. FB and LinkedIn are good ways to connect. That&amp;#39;s it for now. Ciao!&lt;br&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-3792827919688305549?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/3792827919688305549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=3792827919688305549' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3792827919688305549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3792827919688305549'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/07/this-blog-is-officially-in-hibernation.html' title='This Blog is Officially in Hibernation'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-921029659165248716</id><published>2010-03-31T23:41:00.001+05:30</published><updated>2010-03-31T23:41:39.061+05:30</updated><title type='text'>Zigndog 3rd Session - Django</title><content type='html'>Hey guys and girls, &lt;br&gt;   I have the screencast nearly ready, but it is hugely boring and very very long. Not only that, it&amp;#39;s very impossible to download because of the large file size. So, if you&amp;#39;re interested, what is the max file size that you can download? Ping in the comments, I&amp;#39;ll try and make it smaller.&lt;br&gt;  &lt;br&gt;Divye&lt;br clear="all"&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-921029659165248716?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/921029659165248716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=921029659165248716' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/921029659165248716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/921029659165248716'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/03/zigndog-3rd-session-django.html' title='Zigndog 3rd Session - Django'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-4353734337658033425</id><published>2010-03-17T14:29:00.001+05:30</published><updated>2010-03-17T14:29:55.849+05:30</updated><title type='text'>The super duper not-so-secret recipe for a great Pasta</title><content type='html'>&lt;u&gt;&lt;font size="4"&gt;Pasta in White Sauce&lt;/font&gt;&lt;/u&gt;&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;Okay, here goes the super duper ultra not-so-secret recipe to awesome indianized pasta created by the resident geek who writes on these hallowed pages.&lt;br&gt;  &lt;br&gt;&lt;u&gt;&lt;span style="font-family: arial black,sans-serif;"&gt;Part 1: Preparing the pasta&lt;/span&gt;&lt;/u&gt;&lt;br&gt;1. Take a huge kadhai and fill it with sufficient water (sufficient = enough to cover all the pasta you will put into it later completely).&lt;br&gt;   2. Add enough salt to make the water quite salty. Exact quantity doesn&amp;#39;t matter too much here..&lt;br&gt;3. Start heating the water, put in the pasta (penne version preferably as it doesn&amp;#39;t break easily) and bring to boil. The water will start frothing. &lt;br&gt;   4. Keep the pasta boiling in the water till it grows in size and changes colour from hard, deep yellow to a lighter, softer, larger size (closer to off-white)&lt;br&gt;    Acid test for this step: you are able to break the pasta easily with a tablespoon&amp;#39;s edge.&lt;br&gt;   5. Remove from boil and drain away all the water with a sieve. (you can taste the pasta to judge its saltiness if you like, it won&amp;#39;t be much)&lt;br&gt;6. Typically, you should be in a position to directly add the pasta to the white sauce that you should have prepared in the meanwhile. If you keep the pasta out for too long, it might start to stick. You can avoid that by coating it with a little oil (similar to noodles).&lt;br&gt;   &lt;br&gt;But I guess you know all that... here&amp;#39;s the recipe for the sauce:&lt;br&gt;&lt;br&gt;&lt;u&gt;&lt;span style="font-family: arial black,sans-serif;"&gt;Part 2: Preparing the white sauce&lt;/span&gt;&lt;/u&gt;&lt;br&gt;0. Cut carrots and beans into 2&amp;quot; long, thin strips. Using about a 1-2 teaspoon of oil and about 1/2 tsp salt, cook the vegetables in an open pan at high heat till they are ready to eat but slightly crunchy. These vegetables will be used in step 6 (can be done in parallel with the remaining steps).&lt;br&gt;   1. Take a kadhai and put in 1.5 - 2 tablespoons of butter and start heating till the butter melts&lt;br&gt;2. If you want an indianized version of the pasta, now is a good time to put in all the spices - Ajwain for the flavour, some jeera as per taste (any other spices of your choosing). Fry them till they change colour slightly. Add about 1 tablespoon (about 3 teaspoons) of garlic paste freshly prepared from garlic cloves (critical) (erring and adding more is good, adding less is not). Fry till slightly brown and aromatic. Add salt to taste (make sure to account for the salt in the butter and the vegetables and the slight salt in the boiled pasta).  &lt;br&gt;Reduce the heat and add milk as per the next step.&lt;br&gt;3. Add 1/2-1 litre of milk (do a bit of judgement here).&lt;br&gt;    The quantity should be just enough to cover the pasta after accounting for the reduction.&lt;br&gt;   4. Bring the mixture to near-boil at high flame and then add 1-2 teaspoons of dissolved cornflower (dissolved smoothly in 1/2-3/4 cup of water) to the sauce.  This will cause the milk sauce to thicken slightly. Keep stirring the mixture to ensure no lumps form and cook for a minute or two.&lt;br&gt;   5. Add 1-2 tablespoons of tinned cream (optional) and turn the heat down slightly for thickening. Simultaneously, add 3 cubes of grated cheese (where 1 cube is as per Amul&amp;#39;s processed cheese pack), lots of oregano (to taste - about 3 to 5 heaped teaspoons), 3-5 cloves for flavour and about 1-2 teaspoons of freshly ground black pepper. Keep heating at slightly reduced flame, thicken for a short while (2-3 minutes (estimated) - the sauce will thicken further on cooling)&lt;br clear="all"&gt;   6. When the sauce is of the desired consistency but slightly more flu, add the vegetables prepared in step 0 and mix well.&lt;br&gt;7. Add the boiled pasta prepared separately. Mix well and cook a little so that the flavours seep into the pasta.&lt;br&gt;   8. Pour into a separate container for serving, dust with oregano, grated cheese and black pepper powder (freshly prepared)&lt;br&gt;9. Garnish with a sprig of freshly plucked Tulsi leaves. Serve hot.&lt;br&gt;&lt;br&gt;&lt;u&gt;&lt;span style="font-family: arial black,sans-serif;"&gt;List of ingredients:&lt;/span&gt;&lt;/u&gt;&lt;br&gt;   1. Carrots, Beans - as per quantity desired in the final dish (example values - 2 long carrots, about 10 beans) - cut into 2&amp;quot; long thin strips (french fries type but much thinner)&lt;br&gt;2. Penne pasta - I don&amp;#39;t know the grammage exactly, but 1 big packet (use only 1/2 or 3/4 of it)&lt;br&gt;   3. Butter - upto 2 tablespoon&lt;br&gt;4. Ajwain, Jeera - to taste (optional)&lt;br&gt;5. Garlic paste prepared fresh from garlic cloves - roughly 1 heaped tablespoon or slightly more&lt;br&gt;6. Milk (boiled preferably) - 1 litre&lt;br&gt;7. Cornflower - 2 teaspoons&lt;br&gt;   8. Black Pepper (freshly ground) - min 2 teaspoons + more for garnishing&lt;br&gt;9. Tinned Cream - about 2 tablespoons (optional, but highly recommended)&lt;br&gt;10. Oregano - lots of it. 3 to 5 heaped teaspoons + more for garnishing.&lt;br&gt;   11. Cloves - 3 to 5 (optional)&lt;br&gt;12. Cheese cubes (grated) - 2-3 cubes for sauce + more for garnishing&lt;br&gt;13. Tulsi leaves - for garnishing&lt;br&gt;&lt;font color="#888888"&gt;&lt;br&gt;Serves: 4&lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;u&gt;&lt;span style="font-family: arial black,sans-serif;"&gt;The standard disclaimers apply:&lt;/span&gt;&lt;/u&gt;&lt;br&gt;   1. I don&amp;#39;t take any responsibility should you try this recipe and it blows up in your face, leaving you much the poorer on an empty stomach.&lt;br&gt; 2. All the measurements are approximate as I&amp;#39;m an experimental cook and not a theoretical one.&lt;br&gt; 3. Should you so decide to go ahead, feel free to tell me of the results. I would love to know.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;u&gt;&lt;span style="font-family: arial black,sans-serif;"&gt;A few closing comments&lt;/span&gt;&lt;/u&gt;&lt;br&gt;To the Dieters: What are you doing here? &lt;br&gt;  To the masochist dieters: What&amp;#39;s the calorie count of this dish?&lt;br&gt;&lt;/div&gt;To the Geeks: Please learn to cook. It is an important survival skill that will serve you well in life.&lt;br&gt;To the CS Geeks: No, that fancy robot you&amp;#39;ve just programmed cannot cook this for you. Get up and do it yourself.&lt;br&gt;  To those in Google/Facebook: Just get your fix from your in-house cook, will ya? Cooking this could prevent you from saving the world! :P&lt;br&gt;&lt;br&gt;&lt;br&gt;Take care guys! Until next time, Chef DK signing off!&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-4353734337658033425?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/4353734337658033425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=4353734337658033425' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4353734337658033425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4353734337658033425'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/03/super-duper-not-so-secret-recipe-for.html' title='The super duper not-so-secret recipe for a great Pasta'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-4677688340857592976</id><published>2010-03-12T20:34:00.003+05:30</published><updated>2010-03-13T00:31:38.459+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>How to enable Compile and Run for C/C++ files in gedit</title><content type='html'>I never liked using gedit for programming because it needed extensive customization before it even came close to becoming a programming editor. However, those that are just starting out with linux will feel most at home in gedit. So here is how to enable "Compile and Run" functionality in gedit.&lt;br /&gt;&lt;br /&gt;1. Enable the External Tools plugin by going to Edit -&amp;gt; Preferences -&amp;gt; Plugins as shown in the screenshot below&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_c0e2zFuzsT0/S5pY7yWNOTI/AAAAAAAACRs/Qekjs1tRcjk/s1600-h/externaltools.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/_c0e2zFuzsT0/S5pY7yWNOTI/AAAAAAAACRs/Qekjs1tRcjk/s640/externaltools.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;2. Go to Tools -&amp;gt; Manage External Tools and create a new Tool by clicking on the "new" icon near the Help button.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_c0e2zFuzsT0/S5pZGddSwEI/AAAAAAAACRw/6n-eA_EtmsE/s1600-h/create-script.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/_c0e2zFuzsT0/S5pZGddSwEI/AAAAAAAACRw/6n-eA_EtmsE/s640/create-script.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3. Name the new tool "Compile and Run" and press enter&lt;br /&gt;4. In the coding area, paste the following script:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new,monospace;"&gt;#!/bin/sh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,monospace;"&gt;cd $GEDIT_CURRENT_DOCUMENT_DIR&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new,monospace;"&gt;g++ -Wall -g $GEDIT_CURRENT_DOCUMENT_NAME &amp;amp;&amp;amp; xterm -e "sh -c './a.out; echo Press enter to quit... &amp;amp;&amp;amp; read KEY'"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5. Put in a shortcut key (eg. &lt;i&gt;Ctrl + F5&lt;/i&gt;) in the shortcut key area&lt;br /&gt;6. Set the save setting to &lt;i&gt;Current Document&lt;/i&gt;&lt;br /&gt;7. In the applicability setting, select C and C++&lt;br /&gt;&lt;br /&gt;That's it. You're done! Press Ctrl + F5 to start off with compile and run. Happy coding!&lt;br /&gt;&lt;br /&gt;PS: All the tools to make gedit programming worthy can be found in the blog posts here: &lt;br /&gt;&lt;a href="http://www.makeuseof.com/tag/top-plugins-to-extend-and-make-gedit-a-more-useful-text-editor-linux/"&gt;http://www.makeuseof.com/tag/top-plugins-to-extend-and-make-gedit-a-more-useful-text-editor-linux/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.micahcarrick.com/09-29-2007/gedit-html-editor.html"&gt;http://www.micahcarrick.com/09-29-2007/gedit-html-editor.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-4677688340857592976?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/4677688340857592976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=4677688340857592976' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4677688340857592976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4677688340857592976'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/03/how-to-enable-compile-and-run-for-cc.html' title='How to enable Compile and Run for C/C++ files in gedit'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_c0e2zFuzsT0/S5pY7yWNOTI/AAAAAAAACRs/Qekjs1tRcjk/s72-c/externaltools.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-2632074990551426781</id><published>2010-03-12T20:15:00.001+05:30</published><updated>2010-03-12T20:15:48.132+05:30</updated><title type='text'>Compile and Run For C/C++ programmers on vim</title><content type='html'>If the file is named file.cpp or file.c, in the vim command mode just type in:&lt;br&gt;&lt;br style="font-family: courier new,monospace;"&gt;&lt;span style="font-family: courier new,monospace;"&gt;:!make abc&lt;br style="font-family: courier new,monospace;"&gt;  &lt;/span&gt;&lt;span style="font-family: courier new,monospace;"&gt;:!./abc&lt;/span&gt;&lt;br&gt;&lt;br&gt;The first command compiles file abc.cpp to the executable file abc in the current directory. You can then execute it using the second command.&lt;br&gt;  &lt;br&gt;Alternatively, you could use something like &lt;span style="font-family: courier new,monospace;"&gt;:!g++ -g -Wall file.cpp -o file&lt;/span&gt; if you want to specify your own compilation options. (Anything more complex and you should be using a Makefile anyway).&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/34173777-2632074990551426781?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/2632074990551426781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=2632074990551426781' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2632074990551426781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2632074990551426781'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/03/compile-and-run-for-cc-programmers-on.html' title='Compile and Run For C/C++ programmers on vim'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-1375010914759523773</id><published>2010-03-10T00:59:00.000+05:30</published><updated>2010-03-10T01:00:04.817+05:30</updated><title type='text'>Reprint of Zigndog Certificate</title><content type='html'>This post should probably belong to the Zigndog site, but seeing that I have no time to update it, let me just post it here. I trust that most of you who are interested will be mailing me soon (common self-interest reasons) :)&lt;div&gt;  &lt;br&gt;&lt;/div&gt;&lt;div&gt;To get your rewritten certificates, you need to perform the following tasks:&lt;/div&gt;&lt;div&gt;1. Get in touch with me on my Zigndog id (divye kapoor (at the rate of) zigndog (dot) com&lt;br clear="all"&gt;2. Send in a scanned copy of your old certificate along with your correct spelling and the address to which you want the certificates dispatched.&lt;/div&gt;  &lt;div&gt;3. I&amp;#39;ll acknowledge the receipt of your email and dispatch the revised certificate soon.&lt;/div&gt;&lt;div&gt;4. On receipt of the revised certificate, please mail back the original certificate via speed post.&lt;/div&gt;&lt;div&gt;&lt;br&gt;  &lt;/div&gt;&lt;div&gt;That&amp;#39;s all folks!&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Looking forward to your mails...&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-1375010914759523773?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/1375010914759523773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=1375010914759523773' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1375010914759523773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1375010914759523773'/><link rel='alternate' type='text/html' href='http://www.divye.in/2010/03/reprint-of-zigndog-certificate.html' title='Reprint of Zigndog Certificate'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-958653796906983399</id><published>2009-10-22T11:28:00.000+05:30</published><updated>2009-10-22T11:28:45.724+05:30</updated><title type='text'>Chinese Intervention?</title><content type='html'>Just on a light note, have a look at this screenshot of Firefox in an "embarrassing" situation. I wonder if it was because of the ever present Chinese... :)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_c0e2zFuzsT0/St_0aQO5knI/AAAAAAAABcc/oSqgwPM6gPw/s1600-h/CHINESE_INTERVENTION.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_c0e2zFuzsT0/St_0aQO5knI/AAAAAAAABcc/oSqgwPM6gPw/s640/CHINESE_INTERVENTION.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-958653796906983399?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/958653796906983399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=958653796906983399' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/958653796906983399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/958653796906983399'/><link rel='alternate' type='text/html' href='http://www.divye.in/2009/10/chinese-intervention.html' title='Chinese Intervention?'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_c0e2zFuzsT0/St_0aQO5knI/AAAAAAAABcc/oSqgwPM6gPw/s72-c/CHINESE_INTERVENTION.jpg' height='72' width='72'/><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-7284616556106787697</id><published>2009-08-27T23:17:00.002+05:30</published><updated>2009-08-28T00:18:31.443+05:30</updated><title type='text'>Automatic Django Template Directory adjustment</title><content type='html'>&lt;a href="http://www.djangoproject.org/"&gt;Django&lt;/a&gt; is that hot new &lt;a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller"&gt;MVC&lt;/a&gt; framework on the block that's kept me sleeping at night, quite unlike &lt;a href="http://www.php.net/"&gt;PHP&lt;/a&gt;. Yup, its that good! :) It's got wonderful features that make me feel - &lt;i&gt;Yeah! Development for the web is still worth the grind!&lt;/i&gt; By the way, if you're not into Web Development and don't care two hoots about the difference between a framework and a library, this post is not for you - Mosey along now! Nothing to see here. ;)&lt;br /&gt;&lt;br /&gt;Anyway, one of my few n00b questions to which I've never actually got a satisfactory answer is - How do you specify the template directory so that you can send your code to others and have it execute by &lt;i&gt;manage.py runserver&lt;/i&gt; without any changes? The primary problem is the hardcoding of directories that is done in the &lt;i&gt;settings.py&lt;/i&gt; file at the root of the project. After a bit of searching, I've come to a satisfactory solution and lest I forget it, I've decided to post it to my blog. Here's the code snippet.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;TEMPLATE_DIRS = (&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;    # Always use forward slashes, even on Windows.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;    # Don't forget to use absolute paths, not relative paths.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;    # os.path.realpath(os.path.curdir).replace("\\", "/") + "/templates",&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;    os.path.abspath(os.path.dirname(__file__)).replace("\\", "/") + "/templates"&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This seems to work most of the time, just let me know how it works out for you!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-7284616556106787697?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/7284616556106787697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=7284616556106787697' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7284616556106787697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7284616556106787697'/><link rel='alternate' type='text/html' href='http://www.divye.in/2009/08/automatic-django-template-directory.html' title='Automatic Django Template Directory adjustment'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-1916808911082725429</id><published>2009-08-27T23:02:00.002+05:30</published><updated>2009-08-27T23:53:03.228+05:30</updated><title type='text'>Geeky Stuff - The Linux Kernel Implementation of Pipes, FIFOs and  other Filesystems</title><content type='html'>I had to create a presentation on the implementation of Pipes and FIFOs on GNU/Linux for my Network Programming class (we're doing some background on IPC). Since I couldn't find any decent documentation online, I decided to dive deep into the Linux kernel code and see what devils were lurking beneath the pipe() and the mkfifo() system calls. The end result? A rather organized documentation of how pipes and FIFOs are implemented on linux (including some stuff about the pipefs filesystem). You can use this documentation in a variety of ways (including creating your own, new filesystem, for linux), but beware, I've made this complete documentation by reading the code. It elides a lot of informative stuff and might be incorrect in places. I would love to hear about anything wrong or misleading in this documentation. I undertake no responsibility if something happens to you, your computer or someone else's computer if you use/misuse the information provided. Please feel free to use the information as you see fit, but keep your eyes open and your mind working. I release this presentation into the public domain. However, I would love to hear if you liked it and used it somewhere. &lt;div&gt; &lt;br /&gt;&lt;/div&gt;&lt;div&gt;The presentation is located &lt;a href="http://www.drkapoorsclinic.com/files/blog/Linux_Kernel_Implementation_of_Pipes_FIFOs.pptx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-1916808911082725429?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.drkapoorsclinic.com/files/blog/Linux_Kernel_Implementation_of_Pipes_FIFOs.pptx' title='Geeky Stuff - The Linux Kernel Implementation of Pipes, FIFOs and  other Filesystems'/><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/1916808911082725429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=1916808911082725429' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1916808911082725429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1916808911082725429'/><link rel='alternate' type='text/html' href='http://www.divye.in/2009/08/geeky-stuff-linux-kernel-implementation.html' title='Geeky Stuff - The Linux Kernel Implementation of Pipes, FIFOs and  other Filesystems'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-6416107496875830101</id><published>2009-08-27T22:47:00.004+05:30</published><updated>2009-08-28T01:03:27.741+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='tourism'/><category scheme='http://www.blogger.com/atom/ns#' term='internship'/><category scheme='http://www.blogger.com/atom/ns#' term='pilgrimage'/><category scheme='http://www.blogger.com/atom/ns#' term='microsoft'/><title type='text'>Life Updates after the internship</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Hello Web Surfer,&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Firstly - Apologies! Its been a really long time since my last (reasonable) post and I've been neglecting my blog a lot. Mostly, this can be attributed to my internship at Microsoft which sapped me for over 2 months and&amp;nbsp;then the brilliant work I've been doing at &lt;a href="http://www.zigndog.com/"&gt;Zigndog&lt;/a&gt;. Forgive me for all the neglect and thank you for your brilliant patience. Given the long absence of updates, it is only fair that I give you a peek into the inner workings of my life (If you're not really interested, just skip on to the next post, you just might like spicy letters to the Dean :D ).&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&lt;div&gt;I've been tweeting a lot about &lt;a href="http://www.designchef.com/"&gt;DesignChef&lt;/a&gt; and &lt;a href="http://www.zigndog.com/"&gt;Zigndog&lt;/a&gt;. If you don't already know of it, Zigndog is Puneet Jaggi's brainchild startup that working in the Web Development and Print Design space. Its working out well - Zigndog got 2 special mentions at the first &lt;a href="http://www.designchef.com/"&gt;DesignChef Logo Challenge&lt;/a&gt; and Second Place at the &lt;a href="http://www.designchef.com/"&gt;DesignChef UX Challenge&lt;/a&gt;. That's bagged us a cool Rs. 10,000 as a cash prize, not to mention a lot of positive publicity. (Hey! DirectI got so impressed by our work, we got contacted by them to do some work on rush basis). Of course, needless to mention that I was involved in the creation of the UX. But, collars up comments apart, serious kudos should go the entire team - Sampath, Rishabh, Sanat, Vikesh, Puneet and Priyanka Mdm. This was the outcome of our team effort and nothing significant could have been achieved without each one playing his part. Besides this, we've been working hard at ensuring that all our clients get satisfied. Something that's rather tough to achieve. (Trust me... Specially if you're planning to go for a startup someday)&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Ok, here's the deal - I need to post some meaningful stuff that will document my internship and not leave you bored to death... First, some tech stuff:&amp;nbsp;&lt;span style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Verdana; font-size: 13px; font-weight: bold;"&gt;&lt;a href="http://tinyurl.com/luc2zo"&gt;http://tinyurl.com/luc2zo&lt;/a&gt;&lt;/span&gt; - That's my internship presentation on Coalescing. Don't even bother reading about it if you're not interested (I don't have a transcript of my speech, so the slides are rather empty). It suffices to say that people liked it and I met my personal goal of getting across 60% of my work. Most people failed in their early twenties... :)&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;/div&gt;&lt;div&gt;On the non tech front, here are a few images that document the really fun time I had in Hyderabad while sampling restaurants and enjoying the weekends. Thanks a lot everyone! It was great fun. Oh, and as a parting note - &lt;a href="http://www.orkut.co.in/Main#Profile.aspx?uid=13173923916281342748"&gt;Happy Birthday Umesh&lt;/a&gt;!&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5374707102628714850" src="http://3.bp.blogspot.com/_c0e2zFuzsT0/SpbLoif0GWI/AAAAAAAABbg/ebpwRigMFsc/s320/IMG_0670.JPG" style="cursor: hand; cursor: pointer; display: block; height: 320px; margin: 0px auto 10px; text-align: center; width: 240px;" /&gt;&lt;/div&gt;&lt;div&gt;This photo was taken at the Ramoji Film City. Its located about 2 hours away from Hyderabad but its a "must visit" for any tourist.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5374705506210152738" src="http://1.bp.blogspot.com/_c0e2zFuzsT0/SpbKLnX-ASI/AAAAAAAABbY/J2XIat1MB-A/s320/IMG_0726.JPG" style="cursor: hand; cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Taken at Tirupati. The golden cupola at the center is the sanctum sanctorum of Lord Balaji at the Tirupati temple. Many many thanks to &lt;a href="http://www.linkedin.com/pub/abhyuday-polineni/14/718/332"&gt;P. Abhyuday&lt;/a&gt; and his family for making our trip such a memorable experience.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-6416107496875830101?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/6416107496875830101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=6416107496875830101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6416107496875830101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6416107496875830101'/><link rel='alternate' type='text/html' href='http://www.divye.in/2009/08/life-updates-after-internship.html' title='Life Updates after the internship'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_c0e2zFuzsT0/SpbLoif0GWI/AAAAAAAABbg/ebpwRigMFsc/s72-c/IMG_0670.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-7446979071465134810</id><published>2009-08-20T20:05:00.001+05:30</published><updated>2009-08-20T20:05:31.676+05:30</updated><title type='text'>[Cinema Club] Appeal</title><content type='html'>Dear Sir,&lt;div&gt;   I would like to inform you about a number of irregularities that have taken place in the selection and subsequent notification of the secretary of the Cinema Club. The professors in charge have refused to consider my case and hence I am resorting to this final recourse of appeal to you.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;To give you a little background, I would like to state my version of events. You may wish to verify this with any you deem suitable:-&lt;/div&gt;&lt;div&gt;1. A notice was issued wherein applications were requested for application to the post of Secretary, Cinema club on Monday/Tuesday - 17th/18th August.&lt;/div&gt;  &lt;div&gt;2. The notice clearly stated that applications must be deposited in the office of the undersigned &lt;b&gt;Prof. R. Prasad&lt;/b&gt; (of Electrical Department) by&lt;b&gt; 20th August 2009&lt;/b&gt;. I complied with the same, having slipped in my application to his room at about &lt;b&gt;4:45 PM&lt;/b&gt; on 20th August 2009 (today). He was not present in his room and the timetable in his office showed that he was in a Lab. I visited some Labs in the department but was unable to locate him.&lt;/div&gt;  &lt;div&gt;3. Just before 6 PM, I am informed, in casual conversation, by one of my batchmates that interviews for the post of Secretary Cinema Club have already taken place at 5 PM in the office of Professor R. C. Mittal (of Mathematics Department) and that he has already notified the selected candidate by issuing a letter to &lt;b&gt;Mr. Somya Mohan&lt;/b&gt;.&lt;/div&gt;  &lt;div&gt;4. I immediately rush to the office of Prof. R. Prasad where I meet him and ask him whether he has received my application for the post. I am informed by him that he has received the application but that it is too late as he has already conducted the interviews, the result of which has already been  declared.&lt;/div&gt;  &lt;div&gt;5. I appeal to him by stating that I have complied with all directions of the notices and all  the information that was available with me. He refuses to consider my case. &lt;/div&gt;&lt;div&gt;7. At 6:30 PM at his behest, I have a telephonic conversation with Prof. R C Mittal wherein he states that he was made aware of my application by Prof. Prasad but was not willing to consider it.&lt;/div&gt;  &lt;div&gt;8. On further conversation with Prof. Prasad, I come to know that information about the interviews was passed on to the applicants through a single person - Mr. Somya Mohan via the phone during the afternoon.&lt;/div&gt;&lt;div&gt;  &lt;br&gt;&lt;/div&gt;&lt;div&gt;I would like to make the following representation:&lt;/div&gt;&lt;div&gt;1. I was not given a chance to represent myself at the interview for the post.&lt;/div&gt;&lt;div&gt;2. My application, though within time and present at the requested place was not accepted by the concerned Professor.&lt;/div&gt;  &lt;div&gt;3. The interviews were scheduled before the deadline for applications had elapsed.&lt;/div&gt;&lt;div&gt;4. Only oral notification of the interviews was made and that too via a single student, who was also an applicant for the post and thus had significant self interest in the matter.&lt;/div&gt;  &lt;div&gt;5. The results were declared before the deadline for applications had elapsed.&lt;/div&gt;&lt;div&gt;6. I was given no valid reason for the rejection of my application and my request for revoking/modifying/holding the earlier order in abeyance were summarily dismissed.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I feel that I have been unfairly discriminated against in this process.&lt;/div&gt;&lt;div&gt;Due process was not followed for the notification of interviews which were conducted without considering all applicants and before the expiry of the application deadline. Further, I wish to state that the interview procedure followed was arbitrary, unfair and opaque.&lt;/div&gt;  &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I request you to hear me out and take corrective measures as necessary so that my grievances are redressed. I shall be depositing a hardcopy of this application in your office tomorrow.&lt;/div&gt;&lt;div&gt;&lt;br&gt; &lt;/div&gt; &lt;div&gt;Thanking you,&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Yours sincerely,&lt;/div&gt;&lt;div&gt;Divye Kapoor&lt;/div&gt;&lt;div&gt;4th Year&lt;/div&gt;&lt;div&gt;B.Tech (IDD) CSI&lt;/div&gt;&lt;div&gt;IIT Roorkee&lt;/div&gt;&lt;div&gt;&lt;br&gt;-- &lt;br&gt;At bottom, every man knows perfectly well that he is a unique being, only once on this earth; and by no extraordinary chance will such a marvelously picturesque piece of diversity in unity as he is, ever be put together a second time. -Friedrich Nietzsche, philosopher (1844-1900) &lt;br&gt;  &lt;br&gt; &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-7446979071465134810?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/7446979071465134810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=7446979071465134810' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7446979071465134810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7446979071465134810'/><link rel='alternate' type='text/html' href='http://www.divye.in/2009/08/cinema-club-appeal.html' title='[Cinema Club] Appeal'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-8556269972983368648</id><published>2009-04-27T02:52:00.002+05:30</published><updated>2009-04-27T03:46:17.588+05:30</updated><title type='text'>The Complete Story - The NSS Valedictory Fiasco</title><content type='html'>&lt;div&gt;Not everything went according to plan at the NSS Valedictory Function on the 25th of April. This is a chronicle of all the events that took place. This is the mail that I sent to the NSS group to explain the effect of their individual choices on the collective whole.&lt;br /&gt;&lt;br /&gt;Hello everyone,&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;For those of you who don't know what has taken place, let me give you a quick summary. For those of you who do, you might have missed some of the following points. Please go through this carefully.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;1. The Chief Guest for the Val function was Dr. Harsh Sinhval, Dean (Alumini Affairs)&lt;/div&gt;&lt;div&gt;2. The Guest of Honour was Dr. Gaurav Raheja - Institute Architect&lt;/div&gt;&lt;div&gt;Both of them had agreed to be present at the Val function at the last moment. They had been invited at around 5 pm the previous day.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;The fiascos that took place:&lt;/div&gt;&lt;div&gt;1. Almost no one was present at the venue at the allotted time of 3:15 pm&lt;/div&gt;&lt;div&gt;2. Dr. Sinhval arrived punctually at 3:28 as the time given to him was 3:30 pm&lt;/div&gt;&lt;div&gt;3. 3:28 pm onwards - we push the panic button and start calling up everyone to be present at the Val function&lt;/div&gt;&lt;div&gt;4. 3:43 pm - Dr. Sinhval expresses his anger at the state of events and threatens to leave the function if the event doesn't proceed by 3:45&lt;/div&gt;&lt;div&gt;5. 3:44 pm - We start the event. Dr. Sinhval requests that all the doors to the auditorium be closed to prevent the entry of latecomers&lt;/div&gt;&lt;div&gt;6. We disregard his request. We keep on calling up people. We even request the Dramatics section to fill up the auditorium. They refuse. I call upon personal friends to help me out at this point of time. The NSS activity list is being read out by Shruti.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;7. Close to 4:00 pm: Dr. Sinhval is asked to say a few words to the audience. He is furious. Total audience strength: close to 40 people.&lt;/div&gt;&lt;div&gt;A quote from his speech: "Normally, it isn't considered good manners to criticize your hosts but I am compelled to do this today. All the activities that you have read out to me hold no value. Anyone can write anything on a piece of paper and say that we've done this and done that. From an organization of 345 students, is this what is expected? Had I been the head of NSS, I would have clearly stated - those who don't attend this function will have their grades held back."&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Just then, someone enters. Dr. Sinhval responds - "Aayiye, Aayiye. Mushaiyare mein tashreef rakhiye. Aakhir yeh mushaira hi hai na, koi function nahin." The entire executive team is looking shamefaced.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;At the time of inviting him, Dr. Sinhval had expressed happiness at the work we were doing to teach students. He had asked us about the problems we were facing and had even offered to get a room for Prerna students to be taught at the ABN School on Saturdays. This is what he said then:&lt;/div&gt;&lt;div&gt;"Naga had told me about the problems you were facing in teaching students on weekends. I had thought of helping you in this regard but after what I have seen here today, I shall most certainly not be doing that. This is all that I had to say." He proceeds to his seat.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Can you imagine the plight of all those present there? Katiyar sir on the dias, sitting right next to him. Me and Naga sir down below - looking at the dismal empty chairs of the Civil Audi, desperately hoping that something can still be done, our hearts sinking with a feeling of deep loss. What should we do next?&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;8. Dr Raheja states a short story on the work that NSS has done. He maintains a calm disposition, but it is clearly seen that he's disappointed with the state of events. Meanwhile, Katiyar sir is desperately trying to calm Dr. Sinhval. Water arrives for the guests. There was no bouquet for any of them as the flower shops in Roorkee were closed.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;9. Dr. Sinhval realizes our plight and requests the mic to say another story, this time a humourous one to diffuse the tension, but it is obvious that he is still simmering under the surface.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;10. Naga sir was asked to announce the new team - Katiyar sir interrupts him and asks him not to do so.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;11. The prize distribution for all the active volunteers takes place. Dr. Sinhval's comment: "I hope atleast they are present here". First two names called out are not present. Just to save face, we start sending other people up in case those that were being awarded were not present. Katiyar sir is given a memento for being the NSS Program Coordinator. There are no mementos for the Chief Guest and the Guest of Honour.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;12. Prize Distribution over. I come up on stage and try salvaging the situation. I highlight the fact that the NSS Volunteer Awardees have worked close to 100 hours over the course of 2 semesters for a 2 credit course and that the people sitting in the audience aren't the "masses" working for grades, but those that realize the importance of their work and the service they are rendering to the nation, not out of pity, charity or kindness, but out of a feeling that every person in the country deserves as much as his country can give him.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;14. I escort the guests down from the stage towards the refreshments. Dr. Sinhval refuses to leave the stage before me (as is his right, being the Chief Guest of the Event). This is an indirect slap to my face.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;15. Katiyar Sir and the other Guests chitchat over refreshments but Dr. Sinhval refuses to give an assurance that he will continue to help us in the future.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;16. The guests leave.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Let me make a few points here:&lt;/div&gt;&lt;div&gt;1. Why do I make such a big fuss about punctuality?&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; a) I realize the value of time. So do others.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; b) This is what happens when you're not punctual. I know this. That's why I care.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;2. Who is responsible for this mess?&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; a) I am - for leaving the management of critical aspects of such an important event to my juniors.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; b) Naga Sir - for doing the same.&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; c) The new executive team - for not taking their responsibilities seriously.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;3. Who is not responsible for this mess?&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; a) The first yearites - You have done exactly what I had expected you to do. You will prioritize 1 hour of sleeping or lazing around in the name of studying over coming for the val function.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Don't you think that your seniors might have spent many more hours getting the permission for the Civil audi, tallying the attendance, getting the certificates printed, writing the names of the people, getting the mementos, arranging for refreshments etc? Aren't their examinations on the same days as all of you?&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; All you guys had to do was to get up and come over for one hour - one single hour away from your studies too finally see and understand what you have achieved as part of NSS, what other cells had done and why you should be proud of your work and give a farewell to the current team. Of course, most of you weren't interested.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;4. Who should bear the brunt of the consequences?&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;The NSS Team. They are now entrusted with the task of jumping through administrative hoops and loads of red tape to get permission for the simplest of things. By serving your self interests, you have inadvertently denied NSS a golden opportunity to have better relationships with the administration.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;In any case, there is no use crying over spilt milk. You have done what you had to and we did what we could to save face. That's all there is to it. Thanks everyone for a very "memorable" farewell. It affected me to the depths of my heart... really. Thanks a lot...&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Divye Kapoor&lt;/div&gt;&lt;div&gt;Ex-Joint Secretary&lt;/div&gt;&lt;div&gt;NSS&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-8556269972983368648?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/8556269972983368648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=8556269972983368648' title='20 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8556269972983368648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8556269972983368648'/><link rel='alternate' type='text/html' href='http://www.divye.in/2009/04/complete-story.html' title='The Complete Story - The NSS Valedictory Fiasco'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>20</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-6521944354165802022</id><published>2009-04-23T22:17:00.001+05:30</published><updated>2009-04-23T22:17:57.597+05:30</updated><title type='text'>BUGS in DK's soul</title><content type='html'>Recently received via &lt;a href="http://fakemail.info"&gt;fakemail.info&lt;/a&gt;:&lt;div class="gmail_quote"&gt;DK&amp;#39;s soul has bugs too!!!! Thats why its in Beta...&lt;/div&gt;&lt;div class="gmail_quote"&gt;&lt;br&gt;&lt;/div&gt;&lt;div class="gmail_quote"&gt;Thanks for the obvious creativity guys, you really cracked me up. :-)&lt;/div&gt;  &lt;div class="gmail_quote"&gt;The other mails were also fun, but some were unpublishable.&lt;/div&gt;&lt;div class="gmail_quote"&gt;&lt;br&gt;&lt;/div&gt;&lt;div class="gmail_quote"&gt;Keep mailing... Love to see your quote of the day in my inbox.&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-6521944354165802022?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/6521944354165802022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=6521944354165802022' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6521944354165802022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6521944354165802022'/><link rel='alternate' type='text/html' href='http://www.divye.in/2009/04/bugs-in-dks-soul.html' title='BUGS in DK&apos;s soul'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-3596711288860607231</id><published>2009-03-11T15:28:00.003+05:30</published><updated>2009-03-11T15:55:34.615+05:30</updated><title type='text'>Google moving towards the "Google OS"</title><content type='html'>&lt;a href="http://google-code-updates.blogspot.com/2009/02/announcing-native-client-security.html"&gt;Google Code Blog: Announcing the Native Client Security Contest&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Google is moving slowly but surely towards its much hyped (but never confirmed) "Google OS". Google has just announced the &lt;a href="http://google-code-updates.blogspot.com/2009/02/announcing-native-client-security.html"&gt;Google Native Client Security Contest&lt;/a&gt; which challenges students and professionals from around the globe to have a look at the Google Native Client (or &lt;a href="http://code.google.com/p/nativeclient/"&gt;NaCl&lt;/a&gt; as it is better known in the &lt;a href="http://nativeclient.googlecode.com/svn/trunk/nacl/googleclient/native_client/documentation/examples.html#eg-hello"&gt;docs&lt;/a&gt;) to find bugs and vulnerabilities. The person who identifies the maximum number of bugs  can receive (in typical Google fashion) upto $ 2^13 . Great chance for all you hackers out there to earn some real m00lah.&lt;br /&gt;&lt;br /&gt;However, its not the money that has caught my eye in this contest. The most eye popping thing about this piece of software are the screenshots that show how a full fledged 3D game - Quake, is running right inside of a browser. Its no wonder that Google claims that it will revolutionize the degree of interactivity available inside of a browser. Have a look at the screenshot below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_c0e2zFuzsT0/SbeQnmP5e6I/AAAAAAAAAIg/f6R9sbQUouA/s1600-h/quake-200.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 201px; height: 218px;" src="http://1.bp.blogspot.com/_c0e2zFuzsT0/SbeQnmP5e6I/AAAAAAAAAIg/f6R9sbQUouA/s320/quake-200.png" alt="" id="BLOGGER_PHOTO_ID_5311873295463316386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Another thing that you should consider doing is reading the &lt;a href="http://nativeclient.googlecode.com/svn/trunk/nacl/googleclient/native_client/documentation/nacl_paper.pdf"&gt;research paper &lt;/a&gt;of the people who built this sandbox. The've gone to great lengths to ensure security of their sandbox by using static code analysis, code flow control and syscall interception. Its really worth your time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-3596711288860607231?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://google-code-updates.blogspot.com/2009/02/announcing-native-client-security.html' title='Google moving towards the &quot;Google OS&quot;'/><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/3596711288860607231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=3596711288860607231' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3596711288860607231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3596711288860607231'/><link rel='alternate' type='text/html' href='http://www.divye.in/2009/03/google-moving-towards-google-os.html' title='Google moving towards the &quot;Google OS&quot;'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_c0e2zFuzsT0/SbeQnmP5e6I/AAAAAAAAAIg/f6R9sbQUouA/s72-c/quake-200.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-3012487002308447938</id><published>2009-02-24T01:16:00.002+05:30</published><updated>2009-02-24T01:40:03.348+05:30</updated><title type='text'>GMail has bugs too! That's why it's in Beta.</title><content type='html'>Check out the image below. A rare bug in the GMail interface.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_c0e2zFuzsT0/SaMCekeX1iI/AAAAAAAAAIY/p8XUvBBHoPg/s1600-h/GMail+Bug.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_c0e2zFuzsT0/SaMCekeX1iI/AAAAAAAAAIY/p8XUvBBHoPg/s400/GMail+Bug.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-3012487002308447938?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/3012487002308447938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=3012487002308447938' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3012487002308447938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3012487002308447938'/><link rel='alternate' type='text/html' href='http://www.divye.in/2009/02/gmail-has-bugs-too-thats-why-its-in.html' title='GMail has bugs too! That&apos;s why it&apos;s in Beta.'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_c0e2zFuzsT0/SaMCekeX1iI/AAAAAAAAAIY/p8XUvBBHoPg/s72-c/GMail+Bug.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-1018542520588181163</id><published>2008-12-21T00:42:00.002+05:30</published><updated>2008-12-21T00:53:03.520+05:30</updated><title type='text'>My match with Vishwanathan Anand</title><content type='html'>&lt;style&gt; &amp;lt;!--  /* Font Definitions */  @font-face  {font-family:&amp;quot;Cambria Math&amp;quot;;  panose-1:2 4 5 3 5 4 6 3 2 4;  mso-font-charset:1;  mso-generic-font-family:roman;  mso-font-format:other;  mso-font-pitch:variable;  mso-font-signature:0 0 0 0 0 0;} @font-face  {font-family:Calibri;  panose-1:2 15 5 2 2 2 4 3 2 4;  mso-font-charset:0;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face  {font-family:&amp;quot;Arial Black&amp;quot;;  panose-1:2 11 10 4 2 1 2 2 2 4;  mso-font-charset:0;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:647 0 0 0 159 0;} @font-face  {font-family:Garamond;  panose-1:2 2 4 4 3 3 1 1 8 3;  mso-font-charset:0;  mso-generic-font-family:roman;  mso-font-pitch:variable;  mso-font-signature:647 0 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-unhide:no;  mso-style-qformat:yes;  mso-style-parent:&amp;quot;&amp;quot;;  margin-top:0in;  margin-right:0in;  margin-bottom:10.0pt;  margin-left:0in;  line-height:115%;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:&amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;;  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;  mso-bidi-theme-font:minor-bidi;} .MsoChpDefault  {mso-style-type:export-only;  mso-default-props:yes;  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:Calibri;  mso-fareast-theme-font:minor-latin;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;  mso-bidi-theme-font:minor-bidi;} .MsoPapDefault  {mso-style-type:export-only;  margin-bottom:10.0pt;  line-height:115%;} @page Section1  {size:8.5in 11.0in;  margin:1.0in 1.0in 1.0in 1.0in;  mso-header-margin:.5in;  mso-footer-margin:.5in;  mso-paper-source:0;} div.Section1  {page:Section1;} --&amp;gt; &lt;/style&gt;  &lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial Black&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;span style="font-family: &amp;quot;Helvetica Neue&amp;quot;,Arial,Helvetica,sans-serif;"&gt;On the sidelines of the &lt;a href="http://www.paniit2008.org/"&gt;PanIIT Alumini meet&lt;/a&gt; being held at &lt;a href="http://www.iitm.ac.in/"&gt;IIT Madras&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Viswanathan_Anand"&gt;Vishwanathan Anand&lt;/a&gt; - World Champion of Chess put in an appearance and played 14 boards of chess in a rapid mode of play. This was the sequence of moves played at table 4 by Narendranath (a 2000ish rated player and captain of the IITM chess team whom I met while playing chess at the InterIIT sports meet held earlier). It was real fun. Have a look.&lt;/span&gt; &lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: &amp;quot;Arial Black&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;White:&lt;/span&gt;&lt;span style="font-family: &amp;quot;Garamond&amp;quot;,&amp;quot;serif&amp;quot;;"&gt; Vishwanathan Anand&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Arial Black&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Black: &lt;/span&gt;&lt;span style="font-family: &amp;quot;Garamond&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;Narendranath (IITM)/Divye Kapoor(IITR)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;1. e4 c5&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;; Sicilian Defense&lt;br /&gt;2. Nf3 Nc6&lt;br /&gt;3. Bb5 a6&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;; push the bishop&lt;br /&gt;4. Bxc6 bxc6 &amp;nbsp;; have a doubled pawn&lt;br /&gt;5. O-O d5&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;; try opening the doubled pawn&lt;br /&gt;6. d3 Bg4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; try pinning the Knight&lt;br /&gt;7. h3 Bh5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; push back the bishop&lt;br /&gt;8. Nc3 d4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; push the Knight and block the center&lt;br /&gt;9. Na4 b3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Knight threatens entry&lt;br /&gt;10. Bg5 h6&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Push the Bishop&lt;br /&gt;11. Bxf6 Qxf6 ; Bishop v/s Knight exchange&lt;br /&gt;12. g4 Bg6&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Break the pin on the Knight&lt;br /&gt;13. Kg2 h5&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Support the white pawns&lt;br /&gt;14. g5 Qf4&amp;nbsp;&amp;nbsp;&amp;nbsp; ; &lt;br /&gt;15. Qd2 Qc7&amp;nbsp;&amp;nbsp; ; Push back the Black Queen&lt;br /&gt;16. Nh4 Bh7&amp;nbsp;&amp;nbsp; ; Push back the Black Bishop&lt;br /&gt;17. f4 Bd6&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Develop the Black Bishop&lt;br /&gt;18. Nb2 Kd7&amp;nbsp;&amp;nbsp; ; Break Black's Castling&lt;br /&gt;19. Nc4 Raf8&amp;nbsp; ; Bring rooks into play&lt;br /&gt;20. a4 Qb8&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Start supporting the White Knight at the hole at b6&lt;br /&gt;21. a5&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Match abandoned due to lack of time.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-1018542520588181163?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/1018542520588181163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=1018542520588181163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1018542520588181163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1018542520588181163'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/12/my-match-with-vishwanathan-anand.html' title='My match with Vishwanathan Anand'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-2258429582565516993</id><published>2008-11-11T21:26:00.007+05:30</published><updated>2008-11-12T02:52:10.347+05:30</updated><title type='text'>Is Heysan.com a clickjacking attack, virus dropper or something else?</title><content type='html'>For those of you who have been regularly using &lt;a href="http://mail.google.com/mail"&gt;GMail&lt;/a&gt;, the recent arrival of unexplained chats from your friends might have piqued your curiosity. A chat lands up in your GMail Inbox claiming to have been sent to you by one of your friends bearing some sort of cheesy one liners and that you should click on the link to view them. Something like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_c0e2zFuzsT0/SRmwOubakEI/AAAAAAAAAFw/JZnmUuiR5RA/s1600-h/heysan_chat.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://4.bp.blogspot.com/_c0e2zFuzsT0/SRmwOubakEI/AAAAAAAAAFw/JZnmUuiR5RA/s320/heysan_chat.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Though usually I'm highly suspicious of these sorts of clicks, I went ahead and clicked it. (After all, Firefox, my favourite web browser has quite a decent track record as far as security is concerned).The site that opened up looked like:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_c0e2zFuzsT0/SRmxcWgeOsI/AAAAAAAAAF4/F8n9E-fJWhA/s1600-h/heysan.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://3.bp.blogspot.com/_c0e2zFuzsT0/SRmxcWgeOsI/AAAAAAAAAF4/F8n9E-fJWhA/s320/heysan.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;Now, I'm not going to be giving up my Google Account password to any site that just asks for it. No Way! Not a Chance! Not even if it boasts of the &lt;a href="http://talk.google.com/"&gt;Google Talk&lt;/a&gt; logo. But then, there are all kinds of people in the world and some are likely to enter their Google ids and passwords due to ignorance. In my opinion, this site is a fraud that is directly and obviously obtaining access to userids and passwords of GMail accounts and using them to perpetuate a mass mailing campaign from within the comfortable confines of your GMail inbox. The fact that there exists a hidden link to &lt;a href="http://admob.com/" target="_blank"&gt;admob.com&lt;/a&gt; (a highly &lt;a href="http://en.wikipedia.org/wiki/SEO"&gt;SEO&lt;/a&gt;ed advert site - see image) by means of a 1px x 1px image, bolsters my gut feeling about this site. Beware all of you who get a link to &lt;a href="http://heysan.com/" target="_blank"&gt;heysan.com&lt;/a&gt; - I think that its just the tip of a very large iceberg. Recent reports of a &lt;a href="http://www.webmonkey.com/blog/Hackers_are_Watching_You:_Flash_Clickjacking_Vulnerability_Exposes_Webcams_and_Mics"&gt;click based vulnerability in all browsers&lt;/a&gt; is a further cause for tension. Be on your toes everyone! More information on &lt;a href="http://www.webmonkey.com/blog/A_Look_at_the__Clickjacking__Web_Attack_and_Why_You_Should_Worry"&gt;clickjacking is available here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The hidden links on the GTalk page is:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_c0e2zFuzsT0/SRmx3x4pTZI/AAAAAAAAAGA/Z6WIOinoTBU/s1600-h/hidden_links_heysan.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://4.bp.blogspot.com/_c0e2zFuzsT0/SRmx3x4pTZI/AAAAAAAAAGA/Z6WIOinoTBU/s320/hidden_links_heysan.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;And the heysan.com home page looks like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_c0e2zFuzsT0/SRmyAj4fqvI/AAAAAAAAAGI/sRCpcyV4wEQ/s1600-h/heysan_home.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img src="http://1.bp.blogspot.com/_c0e2zFuzsT0/SRmyAj4fqvI/AAAAAAAAAGI/sRCpcyV4wEQ/s320/heysan_home.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;All links on this page lead to login areas of different popular e-mail and IM sites. So beware the casual web surfer: this does not augur well for the web. Currently, the best known safety solution is to install the &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/722"&gt;NoScript addon for Firefox &lt;/a&gt;and use it to disable iframes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-2258429582565516993?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://hackademix.net/2008/09/27/clickjacking-and-noscript/' title='Is Heysan.com a clickjacking attack, virus dropper or something else?'/><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/2258429582565516993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=2258429582565516993' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2258429582565516993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2258429582565516993'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/11/is-heysancom-clickjacking-attack-or.html' title='Is Heysan.com a clickjacking attack, virus dropper or something else?'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_c0e2zFuzsT0/SRmwOubakEI/AAAAAAAAAFw/JZnmUuiR5RA/s72-c/heysan_chat.jpg' height='72' width='72'/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-8751419824940679612</id><published>2008-10-10T00:34:00.003+05:30</published><updated>2011-06-12T21:19:44.733+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithms'/><category scheme='http://www.blogger.com/atom/ns#' term='interviews'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Permutations of a string containing duplicates (C++ Version)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Update&lt;/b&gt;: This is part 1 of a 2 part series of posts that discuss generating all possible permutations/anagrams of a given string. This post discusses how to use the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;next_permutation&lt;/span&gt; function provided by the standard C++ library to generate the anagrams iteratively. The &lt;a href="http://www.divye.in/2011/06/printing-all-permutations-of-string.html"&gt;next post&lt;/a&gt; discusses a custom recursive implementation of how to achieve the same thing. See:&amp;nbsp;&lt;a href="http://www.divye.in/2011/06/printing-all-permutations-of-string.html"&gt;Recursively printing all permutations of a string containing duplicate characters.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Have you ever thought of how to generate and display/print all possible permutations of a string (containing duplicate characters) such that every legal permutation appears atmost once in the final output, without taking a humungous amount of memory to keep track of all the permutations you have generated? This particular function utilizes a cool STL algorithm and generates all possible permutations of a string only once (whether the original string contained duplicates or not). &lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;int dup_permute(char *str, size_t length) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int count = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::sort(str, str+length);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ++count;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cout &amp;lt;&amp;lt;&amp;nbsp; str &amp;lt;&amp;lt; '\n';&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(std::next_permutation(str, str+length));&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return count;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'courier new', monospace;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Of course, since the major work of this function is being done in the C++ standard library, an explanation of the standard library functions is in order. &lt;br /&gt;First up is the &lt;b&gt;std::sort &lt;/b&gt;function. Located in the &amp;lt;algorithm&amp;gt; header, true to its name, it sorts the given range of elements (in this case the string, specified by pointers to its first and last elements). &lt;b&gt;std::next_permutation&lt;/b&gt; is a tough one to deal with. The working of this function is too convoluted to explain in a couple of sentences, so, I would recommend you look up &lt;a href="http://www.cplusplus.com/reference/algorithm/next_permutation.html"&gt;this reference&lt;/a&gt; and this &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc163513.aspx"&gt;MSDN article&lt;/a&gt;. In short, next_permutation generates the next lexicographically ordered permutation of the given elements using no more than a constant amount of extra space. All that work is done using comparison, swapping and reversing a subset of elements in the array itself. Also, since there is no copying involved, this function is blazing fast. So, the next time someone asks for all permutations of a string, forget about recursion and look at this iterative version. Not only is it correct for the distinct elements case, it works even when the string does contain duplicates. If you liked it, don't forget to leave a comment.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-8751419824940679612?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/8751419824940679612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=8751419824940679612' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8751419824940679612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8751419824940679612'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/10/permutations-of-string-containing.html' title='Permutations of a string containing duplicates (C++ Version)'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-6519481052405289775</id><published>2008-09-17T23:23:00.003+05:30</published><updated>2008-09-17T23:40:25.343+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='internship'/><category scheme='http://www.blogger.com/atom/ns#' term='computers'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='microsoft'/><title type='text'>Selected!!!</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ximep2008.org/newpage/microsoft-logo.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px;" src="http://www.ximep2008.org/newpage/microsoft-logo.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;After 5 hours of mind wrenching tension and reams of code later, I've finally been selected for the internship programme at the Microsoft India Development Center (better known as &lt;a href="http://www.microsoft.com/India/MSIDC/default.aspx"&gt;Microsoft IDC&lt;/a&gt;). The internship is going to last for atleast 8 weeks and I'll be getting accomodation for 15 days and travelling expenses in addition to my internship stipend. Looking forward to going to Hyderabad, anybody going to meet me there?&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 26, 139); text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: rgb(85, 26, 139); text-decoration: underline;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.liquidmatrix.org/blog/wp-content/uploads/2008/05/microsoft_logo.jpg"&gt;&lt;img src="http://www.liquidmatrix.org/blog/wp-content/uploads/2008/05/microsoft_logo.jpg" border="0" alt="" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 200px; " /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-6519481052405289775?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.microsoft.com' title='Selected!!!'/><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/6519481052405289775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=6519481052405289775' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6519481052405289775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6519481052405289775'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/09/selected.html' title='Selected!!!'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-2097181814823349151</id><published>2008-09-17T23:18:00.001+05:30</published><updated>2008-09-18T23:18:39.185+05:30</updated><title type='text'>The 'Said' Problem</title><content type='html'>I came across this cool piece of text on a patents website.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;"The computer-readable medium of claim 23 wherein &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; workspace is used by a database system to create a &lt;i&gt;plurality&lt;/i&gt; of run files, each of which contains a &lt;i&gt;plurality&lt;/i&gt; of variable length records from &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; set of variable length records, as sorted by &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; database system using &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; workspace, &lt;b&gt;said &lt;/b&gt;step of selectively removing comprises writing a next of the &lt;i&gt;plurality&lt;/i&gt; of variable length records that are stored in &lt;i&gt;&lt;b&gt;said &lt;/b&gt;&lt;/i&gt;workspace out to a run file in a predetermined order, &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; method further having computer-executable instructions for performing steps comprising:&lt;/blockquote&gt;&lt;blockquote&gt;determining that &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; set of variable length records is greater in size than &lt;i&gt;&lt;b&gt;said &lt;/b&gt;&lt;/i&gt;predetermined fixed extent of &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; workspace;&lt;/blockquote&gt;&lt;blockquote&gt;creating one or more run files on a data storage medium; and writing out to &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; run file only those variable length record selected by &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; step of selectively removing subsequent to determining that &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; set of variable length records is greater in size than &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; predetermined fixed extent of &lt;i&gt;&lt;b&gt;said&lt;/b&gt;&lt;/i&gt; workspace. "&lt;/blockquote&gt;&lt;br /&gt;Now we know why we need lawyers for legalese, don't we? ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-2097181814823349151?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/2097181814823349151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=2097181814823349151' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2097181814823349151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2097181814823349151'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/09/said-problem.html' title='The &apos;Said&apos; Problem'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-6420223953146706217</id><published>2008-09-08T23:33:00.002+05:30</published><updated>2008-09-08T23:41:51.650+05:30</updated><title type='text'>Easter Egg in Google Chrome</title><content type='html'>&lt;div class="mobile-photo"&gt;&lt;a href="http://1.bp.blogspot.com/_c0e2zFuzsT0/SMVo-8aqCLI/AAAAAAAAAEc/NzjwwC7zxuw/s1600-h/chrome_crash-719886.jpg"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5243712771721922738" src="http://1.bp.blogspot.com/_c0e2zFuzsT0/SMVo-8aqCLI/AAAAAAAAAEc/NzjwwC7zxuw/s320/chrome_crash-719886.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div dir="ltr"&gt;Try typing about:crash in the title bar of &lt;a href="http://www.google.com/chrome"&gt;Google Chrome&lt;/a&gt; and see this cute cross eyed robot! :-)&lt;br /&gt;Of course, you do know by now that Chrome is hottest new entrant on the browser block, don't you? Well, now you do. :-D&lt;br /&gt;&lt;br /&gt;Have a look at &lt;a href="http://blogs.zdnet.com/carroll/?p=1874"&gt;this review &lt;/a&gt;of Chrome on ZDNet.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-6420223953146706217?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/6420223953146706217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=6420223953146706217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6420223953146706217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6420223953146706217'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/09/easter-egg-in-google-chrome.html' title='Easter Egg in Google Chrome'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_c0e2zFuzsT0/SMVo-8aqCLI/AAAAAAAAAEc/NzjwwC7zxuw/s72-c/chrome_crash-719886.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-7093217308529159611</id><published>2008-08-02T12:03:00.002+05:30</published><updated>2008-12-10T07:57:39.144+05:30</updated><title type='text'>in.com - India on the world stage</title><content type='html'>&lt;div dir="ltr"&gt;Its rather rare that you come across a site with content really geared towards Indians with a look and feel matching any world class website. Take a quick look at the layout and source code of sites such as &lt;a href="http://www.ibnlive.com/"&gt;CNN-IBN&lt;/a&gt; and &lt;a href="http://www.aajtak.com/"&gt;Aaj Tak&lt;/a&gt; and you will realize that we are really retards as far as decent site layouts and navigation is concerned. However, &lt;a href="http://www.in.com/"&gt;in.com&lt;/a&gt; was a really refreshing change. The interface is quick and snazzy and the site runs on blazing fast servers - in fact, I would go as far as to state that I had a better experience with their quick registration and speedy interface than I had with GMail on Google servers. Oh and just not to forget, they've gone onto internet overdrive and I'm constantly receiving targeted ads that lead me to their site. Well, what can I say - you have me hooked!  :-)&lt;br /&gt;&lt;br /&gt;The first thing that I tried out was their radio service - its awesome! Have a look at the screenshot below:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_c0e2zFuzsT0/SJQAb3gWoRI/AAAAAAAAADo/MVGrQItNs1A/s1600-h/radio+-+in_com.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_c0e2zFuzsT0/SJQAb3gWoRI/AAAAAAAAADo/MVGrQItNs1A/s400/radio+-+in_com.jpg" alt="" id="BLOGGER_PHOTO_ID_5229805546040107282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Despite it being an obvious ripoff from &lt;a href="http://last.fm/"&gt;last.fm&lt;/a&gt;, I really don't mind. They've got more Indian songs in such an accessible format that it took me less than 10 seconds to start listening to &lt;i&gt;Kabhi Kabhi Aditi&lt;/i&gt;. The best part of it is that its free and delivers songs on demand and their Bollywood song collection beats the living daylights out of any other service on the internet. Thats not to say that they are lagging in the english songs department - there's plenty of fare for all metal and rock addicts. A point to note is that I did not receive any lag while switching songs and there were no annoying "&lt;i&gt;buffering...&lt;/i&gt;" issues. A quick traceroute showed me that its because they are hosting the site on dedicated servers on the VSNL backbone. That gives a really stellar experience for Indians. All that money that's gone into making the site is really being spent intelligently.&lt;br /&gt;&lt;br /&gt;The mail was not bad at all - a complete GMail ripoff - right down to the drop down contacts list. Have a look:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_c0e2zFuzsT0/SJQAr41d2hI/AAAAAAAAADw/_YFdB2S2vq0/s1600-h/mail-in_com.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_c0e2zFuzsT0/SJQAr41d2hI/AAAAAAAAADw/_YFdB2S2vq0/s400/mail-in_com.jpg" alt="" id="BLOGGER_PHOTO_ID_5229805821275003410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The cool colour combination, the smooth fonts and especially the news and radio services makes me feel that I'll be visiting it much more often. Also, the short and sweet id I registered for - divye at in dot com is the icing on the cake. I loved their service and if you are an Indian (or even otherwise), you will too. So, what are you waiting for? Rush!!! Go &lt;span style="font-size:78%;"&gt;(listen to)&lt;/span&gt; &lt;i&gt;Talli&lt;/i&gt; on this site ;-)&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-7093217308529159611?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.in.com' title='in.com - India on the world stage'/><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/7093217308529159611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=7093217308529159611' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7093217308529159611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7093217308529159611'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/08/incom-india-on-world-stage.html' title='in.com - India on the world stage'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_c0e2zFuzsT0/SJQAb3gWoRI/AAAAAAAAADo/MVGrQItNs1A/s72-c/radio+-+in_com.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-3334360916010521709</id><published>2008-07-31T14:10:00.002+05:30</published><updated>2008-07-31T14:25:29.647+05:30</updated><title type='text'>Enjoy Everything You Do</title><content type='html'>&lt;div dir="ltr"&gt;Live the life of a dolphin,&lt;br /&gt;Travel the world without fear,&lt;br /&gt;Whether to the top of a mountain,&lt;br /&gt;Or where the water ain't clear.&lt;br /&gt;&lt;br /&gt;Fear not to push the ceiling,&lt;br /&gt;Try to reach for the sky,&lt;br /&gt;Go with the flow if you want to,&lt;br /&gt;Or be left high and dry.&lt;br /&gt;&lt;br /&gt;Speak your words with feeling,&lt;br /&gt;Enjoy everything you do. &lt;br /&gt;Play from dawn to the evening,&lt;br /&gt;Is that not everything you do?&lt;br /&gt;&lt;br /&gt;Follow the world in its footsteps,&lt;br /&gt;Or make the world follow you.&lt;br /&gt;Do everything with feeling.&lt;br /&gt;Enjoy everything you do.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-3334360916010521709?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/3334360916010521709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=3334360916010521709' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3334360916010521709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3334360916010521709'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/07/enjoy-everything-you-do.html' title='Enjoy Everything You Do'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-8166625081176103730</id><published>2008-07-31T14:04:00.001+05:30</published><updated>2008-07-31T14:04:12.337+05:30</updated><title type='text'>Bird of Fire</title><content type='html'>&lt;div dir="ltr"&gt;Fly, Fly, Fly little bird in the sky.&lt;br&gt;You own the heavens - the Earth and the Sky.&lt;br&gt;Lie, Lie, Lie, asleep in the clouds,&lt;br&gt;Free from cares, from worldly bounds.&lt;br&gt;You creature of mirth, of joy abound.&lt;br&gt; &lt;br&gt;Live, Live, Live, a life full of dreams,&lt;br&gt;Unchecked by dearth of form or means.&lt;br&gt;Pray, Pray, Pray for a life full of song,&lt;br&gt;For finding a rhythm to play along.&lt;br&gt;You creature of milk, to heavens belong.&lt;br&gt;&lt;br&gt; Say, Say, Say, the words in your heart,&lt;br&gt;Bring a smile with a kind remark.&lt;br&gt;Day, day, day a day in your life,&lt;br&gt;Opens a door from formless night.&lt;br&gt;You warrior of words, of shape and light.&lt;br&gt;&lt;br&gt;Inspired by - &lt;i&gt;To a Skylark&lt;/i&gt; by P. B. Shelly&lt;br&gt;  &lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-8166625081176103730?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/8166625081176103730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=8166625081176103730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8166625081176103730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8166625081176103730'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/07/bird-of-fire.html' title='Bird of Fire'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-7539982090694294982</id><published>2008-07-21T16:02:00.002+05:30</published><updated>2008-12-10T07:57:39.402+05:30</updated><title type='text'>Wordle and SEO</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_c0e2zFuzsT0/SIRpRYasBNI/AAAAAAAAADI/_ik90unk7zA/s1600-h/wordle+-+Dr+Kapoors+Clinic.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_c0e2zFuzsT0/SIRpRYasBNI/AAAAAAAAADI/_ik90unk7zA/s400/wordle+-+Dr+Kapoors+Clinic.jpg" alt="" id="BLOGGER_PHOTO_ID_5225417214989698258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;An image is worth a thousand words. This image is a tag cloud&lt;br /&gt;generated by &lt;a href="http://wordle.net/"&gt;Wordle&lt;/a&gt; from the text at&lt;br /&gt;&lt;a href="http://www.drkapoorsclinic.com/"&gt;http://www.drkapoorsclinic.com&lt;/a&gt; . I don't need to tell you&lt;br /&gt;how such a map is helpful for &lt;a href="http://en.wikipedia.org/wiki/SEO" title="Search Engine Optimization"&gt;SEO&lt;/a&gt; - do I?&lt;br /&gt;&lt;br /&gt;And yes: despite my earlier post on &lt;a href="http://divyekapoor.blogspot.com/2007/08/mac-vs-vista.html"&gt;Mac v/s Vista&lt;/a&gt; - that *is* a screenshot taken from my laptop running Vista. You might call me a hypocrite, I just call myself a pragmatist - if you can't beat 'em, join 'em.  ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-7539982090694294982?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/7539982090694294982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=7539982090694294982' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7539982090694294982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7539982090694294982'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/07/wordle-and-seo.html' title='Wordle and SEO'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_c0e2zFuzsT0/SIRpRYasBNI/AAAAAAAAADI/_ik90unk7zA/s72-c/wordle+-+Dr+Kapoors+Clinic.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-1701090198348169697</id><published>2008-07-18T15:40:00.006+05:30</published><updated>2008-07-18T19:16:31.142+05:30</updated><title type='text'>Walking through your first template metaprogram in C++</title><content type='html'>From the Wikipedia article on Metaprogramming:&lt;br /&gt;&lt;blockquote&gt;Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that is otherwise done at run time. In many cases, this allows programmers to get more done in the same amount of time as they would take to write all the code manually.&lt;/blockquote&gt;Unfortunately, metaprogramming is not directly supported by C++ and resources on template metaprogramming are few and far between. I'll try to document my knowledge of metaprogramming as I learn it and hope that it proves useful for one such as myself hunting the web for information.&lt;br /&gt;&lt;br /&gt;First, lets get the preliminaries out of the way:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Templates are used to create generic code (but you already know that, don't you?)&lt;br /&gt;Code like:&lt;br /&gt;&lt;span style=";font-family:&amp;quot;;" &gt;template&lt;/span&gt;&lt;typename style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" t=""&gt;&lt;/typename&gt;&lt;span style=";font-family:&amp;quot;;" &gt;&amp;lt;typename T&amp;gt;&lt;/span&gt; &lt;span style=";font-family:&amp;quot;;" &gt;std::string to_string(T const &amp;amp; object) {&lt;br /&gt;    return object.to_string();&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt; is used to allow the to_string function to be called on all objects that have a to_string() member function. &lt;/li&gt;&lt;li&gt;Template specializations are created to handle certain datatypes in a special manner (or in technospeak - to provide a custom instantiation of generic code)&lt;br /&gt;So, code like:&lt;br /&gt;&lt;span style=";font-family:&amp;quot;;" &gt;template&amp;lt;&amp;gt;&lt;/span&gt; &lt;span style=";font-family:&amp;quot;;" &gt;std::string to_string&amp;lt;int&amp;gt;(int I) {&lt;/span&gt; &lt;span style=";font-family:&amp;quot;;" &gt;    std::ostringstream o;&lt;/span&gt; &lt;span style=";font-family:&amp;quot;;" &gt;    o &amp;lt;&amp;lt; I;&lt;/span&gt; &lt;span style=";font-family:&amp;quot;;" &gt;    return o.str();&lt;/span&gt; &lt;span style=";font-family:&amp;quot;;" &gt;}&lt;/span&gt; ensures that calls to &lt;span style=";font-family:&amp;quot;;" &gt;to_string&lt;/span&gt; that take an int for a parameter will use the second definition of &lt;span style=";font-family:&amp;quot;;" &gt;to_string&lt;/span&gt; and not the more generic first definition. This allows us to provide a string representation of an int even though it does not have a member function named to_string. Thus, the body of a templated piece of code can be changed completely from its generic counterpart in a template specialization.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The compiler always chooses the most specialized definition of a function. This is somewhat akin to function overloading. So, given a choice between &lt;span style=";font-family:&amp;quot;;" &gt;to_string&amp;lt;t&amp;gt;&lt;/span&gt; and &lt;span style=";font-family:&amp;quot;;" &gt;to_string&amp;lt;int&amp;gt;&lt;/span&gt;, it will always choose &lt;span style=";font-family:&amp;quot;;" &gt;to_string&amp;lt;int&amp;gt;&lt;/span&gt; for an integer parameter.&lt;/li&gt;&lt;/ol&gt;Well, how does all this help?&lt;br /&gt;It allows us to do a compile time recursion and that's what I'm going to show you.&lt;br /&gt;&lt;br /&gt;Look at this piece of code:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;template&amp;lt;int N&amp;gt;&lt;br /&gt;struct factorial {&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;   static const long value = N*factorial&amp;lt;N-1&amp;gt;::value;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;};&lt;/div&gt;&lt;br /&gt;Doesn't that look dandy! Its that same old factorial function again! So, what's new? Firstly, notice that instead of templating the structure via a typename, we have chosen to template it over a compile time constant. So, creating an object of this structure will require code such as:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;factorial&amp;lt;5&amp;gt; five_factorial;&lt;/div&gt;But why would you want an empty object? Remember: static structure and class variables do not occupy any space in objects and &lt;span style=";font-family:&amp;quot;;" &gt;factorial&amp;lt;N&amp;gt;&lt;/span&gt; has only static members. So, what's the use of the static member?&lt;br /&gt;The static member allows us to directly access values that are calculated at compile time. In essence, you can think of it as the return value of the computation. Before we move further into the analysis, let me answer a couple of questions that can arise:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Where's the computation taking place? &lt;/li&gt;&lt;ul&gt;&lt;li&gt;It is taking place at compile time when the template is initialized/instantiated and its being done by the compiler while the templated code is being compiled. Effectively, the compiling process is the runtime for template metaprogramming.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Where's the recursion in the code? &lt;/li&gt;&lt;ul&gt;&lt;li&gt;The instantiation of factorial&amp;lt;N&amp;gt; requires the value of factorial&amp;lt;n-1&amp;gt;::value which is of-course a static member in factorial&amp;lt;N-1&amp;gt;. So, this template is also instatiated and the recursion takes place.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;Sharp programmers might have noticed that there is no base case in this piece of code: You're right!&lt;br /&gt;So, here's the base case:&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;template&amp;lt;&amp;gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;struct factorial&amp;lt;0&amp;gt; {&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;    static const long value = 1; &lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;};&lt;/div&gt;&lt;br /&gt;So, when the compiler tries to instantiate &lt;span style=";font-family:&amp;quot;;" &gt;factorial&amp;lt;1&amp;gt;&lt;/span&gt; and comes across &lt;span style=";font-family:&amp;quot;;" &gt;factorial&amp;lt;0&amp;gt;::value&lt;/span&gt;, it will choose this base case and terminate the recursion. Once all the constants have been determined, they are multiplied by the compiler and the result is stored in the resulting executable. So, the value of 5! can be used at runtime without any computation of any sort, all it requires of you is to substitute &lt;span style=";font-family:&amp;quot;;" &gt;factorial&amp;lt;5&amp;gt;::value&lt;/span&gt; wherever you need it.&lt;br /&gt;&lt;br /&gt;A side-effect of this evaluation is that all lower factorial structures are also instantiated. Thus, when you instantiate &lt;span style=";font-family:&amp;quot;;" &gt;factorial&amp;lt;5&amp;gt;&lt;/span&gt;, you get for free the values of &lt;span style=";font-family:&amp;quot;;" &gt;factorial&amp;lt;4&amp;gt;&lt;/span&gt;, &lt;span style=";font-family:&amp;quot;;" &gt;factorial&amp;lt;3&amp;gt;&lt;/span&gt; etc. Also, use of &lt;span style=";font-family:&amp;quot;;" &gt;factorial&amp;lt;4&amp;gt; &lt;/span&gt;later in the program will not cause additional template instantiations because C++ compilers follow a single template instantiation rule: viz. no template will be instantiated more than once. This allows for a very important optimization: memoization that's right memoization and not memorization (though the two are pretty similar). You can have a look at the Wikipedia entry on memoization for info, but for the impatient, it allows you to code a fibonacci number generator like this:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;template&amp;lt;int N&amp;gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;struct fibonacci_term {&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;    static const int value = fibonacci_term&amp;lt;n-1&amp;gt;::value + fibonacci_term&amp;lt;n-2&amp;gt;::value;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;};&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;template&amp;lt;&amp;gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;struct fibonacci_term&amp;lt;1&amp;gt; {&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;   static const int value = 1;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;};&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;template&amp;lt;&amp;gt;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;struct fibonacci_term&amp;lt;0&amp;gt; {&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;    static const int value = 0;&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;};&lt;/div&gt;&lt;br /&gt;If you had coded an analogous recursive function for evaluation at runtime, you should have been spanked by your computer science/engineering professors because that's the worst way to evaluate the fibonacci series as it has a time complexity of O(2^n) which is exponential in the size of the problem. However, because of the one template instantiation rule, its perfectly alright to do this at compile time. While evaluating &lt;span style=";font-family:&amp;quot;;" &gt;fibonacci_term&lt;n-1&gt;::value&lt;/n-1&gt;&lt;/span&gt; , the compiler has already instantiated &lt;span style=";font-family:&amp;quot;;" &gt;fibonacci_term&lt;n-2&gt;&lt;/n-2&gt;&lt;/span&gt; and that instantiation is simply looked up from a table, thus saving computation time and making the compile time program linear in time and space complexity. &lt;br /&gt;&lt;br /&gt;Meta-programming is not just about compile time computations and tricks like this. Its far greater application lies in the capability of manipulation of the C++ type system. Most metaprogramming techniques are applied to make libraries hide their implementations better and allow you to write simpler, cleaner code without reams of types in angle brackets.&lt;br /&gt;&lt;br /&gt;Type manipulation tricks are best left to another blog entry. For now, you can check out:&lt;br /&gt;[1] C++ Template Metaprogramming - Concepts, Tools and Techniques from Boost and beyond&lt;br /&gt;    This is a book by the authors of the &lt;a href="http://www.boost.org/doc/libs/1_35_0/libs/mpl/doc/index.html"&gt;Boost.MPL&lt;/a&gt; (the Boost Meta-Programming Library). The MPL has loads of tools to make metaprogramming easier as well as hacks to work around the deficiencies in various C++ compilers.&lt;br /&gt;[2] &lt;a href="http://www.boost.org/doc/libs/1_35_0/libs/type_traits/doc/html/index.html"&gt;The Boost TypeTraits library&lt;/a&gt; - This library makes type manipulation a breeze, thanks to the consistent interface and excellent documentation.&lt;br /&gt;&lt;br /&gt;Hope you liked it. Comments always welcome.&lt;br /&gt;&lt;br /&gt;The files for the examples are listed below. All of them have been compiled and tested using the Visual C++ 2005 compiler and should work with most other compilers. In case you have troubles, let me know.&lt;br /&gt;[1] &lt;a href="http://divye-kapoor.drkapoorsclinic.com/files/metaprogramming/factorial.cpp"&gt;factorial.cpp&lt;/a&gt;&lt;br /&gt;[2] &lt;a href="http://divye-kapoor.drkapoorsclinic.com/files/metaprogramming/fibonacci.cpp"&gt;fibonacci.cpp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The commplete source code including makefiles can be found &lt;a href="http://divye-kapoor.drkapoorsclinic.com/files/metaprogramming/metaprogramming.zip"&gt;here&lt;/a&gt;. A Jamfile is included for those who use Bjam.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-1701090198348169697?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/1701090198348169697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=1701090198348169697' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1701090198348169697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1701090198348169697'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/07/walking-through-your-first-template.html' title='Walking through your first template metaprogram in C++'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-2576123677399393418</id><published>2008-07-14T02:15:00.002+05:30</published><updated>2008-07-14T02:20:52.099+05:30</updated><title type='text'>I'm Back</title><content type='html'>Hey all,&lt;br /&gt;  Its been ages since I last posted on this blog and its been rather sometime since this blog had been taken off the internet. However, I'm back on the internet after being *really* busy at college and the blog is back online.&lt;br /&gt;   Well, in the time my blog was offline, I was completing my second year at college and in the summer vacations was developing a website for my &lt;a href="http://www.drkapoorsclinic.com/drakapoor.html"&gt;dad&lt;/a&gt; and &lt;a href="http://www.drkapoorsclinic.com/drjkapoor.html"&gt;mom's&lt;/a&gt; &lt;a href="http://www.drkapoorsclinic.com"&gt;Ultrasound clinic&lt;/a&gt;. You can see the final result at their home page: &lt;a href="http://www.drkapoorsclinic.com"&gt;http://www.drkapoorsclinic.com&lt;/a&gt; .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-2576123677399393418?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.drkapoorsclinic.com' title='I&apos;m Back'/><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/2576123677399393418/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=2576123677399393418' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2576123677399393418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2576123677399393418'/><link rel='alternate' type='text/html' href='http://www.divye.in/2008/07/im-back.html' title='I&apos;m Back'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-8648150927368463684</id><published>2007-08-25T20:55:00.000+05:30</published><updated>2007-08-25T23:20:53.046+05:30</updated><title type='text'>Mac v/s Vista</title><content type='html'>With Apple now shifting to the Intel platform - the Mac has become another shark hungry for the market share being doled out by the beleaguered Microsoft Vista.&lt;br /&gt;To quote from the Apple web site:&lt;blockquote&gt;Why upgrade to Vista when you can upgrade to Mac? Especially when you can move all your stuff from an old PC to a shiny new Mac in less time than it takes to add the memory, hard disk space, and graphics card you’ll probably need to install Vista. Here are three easy ways to make your move.&lt;/blockquote&gt;That's a pretty strong statement coming from the Apple stable and yet another indication of the poor feedback offered by Vista users. Personally, I feel Vista is still just as secure as Windows XP from the user's point of view but more secure from the programmers viewpoint. The whole crux of the matter being that Microsoft forgot its end users while trying to implement new revolutionary (read: proprietary) technology for its programmers. With the .NET platform still stuck onto Windows due to the poor help offered by M$ in porting it to linux (for obvious reasons), Microsoft's credibility with the Open Source guys is going to the dogs - so much so that they have started an online campaign at &lt;a href="http://badvista.fsf.org/blog"&gt;http://badvista.fsf.org/blog&lt;/a&gt;. This is hot on the heels of Microsoft signing pacts with LG and Xandros that state that M$ will not prosecute them for any (perceived) patent violations for a period of 5 years,  a deal that is similar to the one signed with Novell last year. IMHO, this is yet another tactic to prevent linux adoption by implicitly spreading false and misleading information (also called &lt;a href="http://en.wikipedia.org/wiki/Fear%2C_uncertainty_and_doubt"&gt;FUD&lt;/a&gt;) about linux. Have a look at &lt;a href="http://www.eweek.com/article2/0,1759,2140955,00.asp"&gt;http://www.eweek.com/article2/0,1759,2140955,00.asp&lt;/a&gt; for more info.&lt;br /&gt;&lt;br /&gt;On a side note, its quite likely that Google is funding a hush-hush compilation of a linux distro to gain a foothold in the desktop space so more fireworks are likely soon. As it is, Google's new Google Desktop provides a sidebar for Win XP users, a combination with a good theming engine will give users lesser and lesser reason to upgrade to Windows Vista.&lt;br /&gt;&lt;br /&gt;For people interested in more technologies (muck?) coming from the Microsoft stables, have a look at the Visual Studio 2008 (Orcas) beta 2 and Windows Server 2008 beta available for free download from &lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx"&gt;here&lt;/a&gt; and &lt;a href="http://www.microsoft.com/windowsserver2008/audsel.mspx"&gt;here&lt;/a&gt; respectively and decide for yourself. However, don't forget to check the minimum system requirements, most likely, your PC is obsolete for these "revolutionary" technologies. (And I thought the most basic function of an OS was interfacing between the user and the hardware at minimum resource cost. Guess I was wrong... ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-8648150927368463684?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.apple.com' title='Mac v/s Vista'/><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/8648150927368463684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=8648150927368463684' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8648150927368463684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8648150927368463684'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/08/mac-vs-vista.html' title='Mac v/s Vista'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-8901255547036769169</id><published>2007-08-25T19:50:00.000+05:30</published><updated>2007-08-25T20:11:43.486+05:30</updated><title type='text'>ऑनलाइन video editing</title><content type='html'>Planning to make those college videos into cherished masterpieces? Have a look at the great online tools for editing video. Check out &lt;a href="http://www.readwriteweb.com/archives/video_editing_20_8_ways_to_remix_videos.php"&gt;this site&lt;/a&gt;. Give me a feedback on how you liked these tools.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-8901255547036769169?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.readwriteweb.com/archives/video_editing_20_8_ways_to_remix_videos.php' title='ऑनलाइन video editing'/><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/8901255547036769169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=8901255547036769169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8901255547036769169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8901255547036769169'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/08/video-editing.html' title='ऑनलाइन video editing'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-225951114975338594</id><published>2007-07-13T23:13:00.000+05:30</published><updated>2007-07-13T23:59:33.092+05:30</updated><title type='text'>AJAX और हिंदी</title><content type='html'>हाँ! अब आप हिंदी में भी भी ब्लोग कर सकते हैं। गूगल में तो कुछ अलग ही बात है। इतनी आसानी से मैंने कभी हिंदी नही लिक्खी थी। चलो, इसी बहाने मेरी हिंदी कुछ और शुद्ध हो जायेगी।&lt;br /&gt;इस लेख का मुख्य उद्देश्य है आपको AJAX नामक टेक्नोलॉजी (इसे हिंदी में क्या कहते हैं?) के एक अंग से  परिचित करवाना। AJAX का पूर्ण नाम है Asynchronous Javascript and XML और इसी के मध्यम से मैं अभी इन्टरनेट के द्वारा ब्लॉगर के इस सुन्दर यन्त्र का फूलपूर्वक इस्तमाल कर रह हूँ।&lt;br /&gt;दरसल  AJAX द्वारा हम  Desktop जैसी look aur feel web applications को दे सकते हैं। पर आज के लिए बस इतना ही। अगले लेख में मैं इस &lt;span&gt;टेक्नोलॉजी&lt;/span&gt; पर ज्यादा विस्तार से बात करूंगा। तब तक के लिए शुभ रात्री, शब्बा खैर, और अपना ख़याल जरूर रखियेगा। तब तक के लिए नमस्कार। ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-225951114975338594?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/225951114975338594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=225951114975338594' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/225951114975338594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/225951114975338594'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/07/blog-post.html' title='AJAX और हिंदी'/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-6648494254563608146</id><published>2007-07-12T14:00:00.001+05:30</published><updated>2007-07-12T14:34:52.596+05:30</updated><title type='text'></title><content type='html'>&lt;span style="font-size:130%;"&gt;Firefox in Firefox!&lt;/span&gt;&lt;br /&gt;Here's something of a "Do you know?" variety.&lt;br /&gt;One of the great things about Firefox is that its interface is highly modular and creating an extension or a plugin is as simple as editing xml files and writing Javascript code (things most web designers do on a daily basis).  Firefox renders its interface with the appropriate theme by evaluating an xml file. So effectively, Firefox renders itself by evaluating its own interface file and placing widgets as defined in it in a blank application window. Well, I just &lt;a href="http://developer.mozilla.org/en/docs/Building_an_Extension"&gt;came to know&lt;/a&gt; that it's possible to load Firefox within itself by asking it to evaluate its own interface using a&lt;span class="" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;/span&gt; chrome:// uri. Don't be surprised - just try typing &lt;a href="chrome://browser/content/browser.xul"&gt;chrome://browser/content/browser.xul&lt;/a&gt; in the address bar and see the results. The new interface is a fully functional Firefox!&lt;br /&gt;Now, for the more curious among you - the reason why this works is because the chrome:// uri is interpreted by the firefox engine as a reference to its chrome directory and the subsequent paths provided are used to navigate the inner tree structure. The xul file is interpreted as an interface and rendered as such, complete with all event handlers - giving you a complete browser within a browser. To see the innards of Firefox, open up the browser.jar in the chrome directory of your Firefox installation using any standard unzipping utility and look at content/browser/browser.js and content/browser/browser.xul to have a feel of how flexible my favourite browser actually is!&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-6648494254563608146?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/6648494254563608146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=6648494254563608146' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6648494254563608146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6648494254563608146'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/07/firefox-in-firefox-heres-something-of.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-4967230475402394956</id><published>2007-03-21T21:59:00.000+05:30</published><updated>2007-03-21T22:34:22.683+05:30</updated><title type='text'></title><content type='html'>Looking at my blog, it just occurred to me that I have become very tardy in posting here. Its been over a month since my last post! Anyways, this is just to post the fact that my Bhawan Day concluded on 20th March and my room got trashed. Apparently, there is an age old custom of ensuring that the inmates atleast bother to clean their rooms once every year.&lt;br /&gt;In a nutshell (for those of you who don't know), every hostel on campus organizes an evening of cultural events and a DJ. All inmates are allowed to invite 1 other person to the Bhawan Day (held at night, of course ;). Oh, I almost forgot - girls are also allowed to enter the Boys hostel on this day.&lt;br /&gt;Coming back to the point, most people give their passes to their "Room Baaps" (seniors who have stayed at the room last year) and they end up coming with a few friends to their ex-room and trashing it. It only helps if you are a member of any student group like IMG or Watch Out. They come and finish off whatever is left of your room. Of course, the authorities have a field day after all this and they end up making a pretty penny from the fines imposed in the aftermath. I hope I escape a fine (The warden did read a quote written on the wall in fluorescent marker by one of the IMGians, so its all upto him now). I'll be putting up "beautiful" pics of my room here soon. It will make an interesting study - the Apocalypse and subsequent clean up. Suprisingly (or not, depending on how you look at it), my room looked cleaner after I ended up removing all the mess than it did before it got trashed.&lt;br /&gt;Before I cleaned it up, it had quotes written on the walls with unconventional materials - red Close Up toothpaste, green Lifebuoy soap, white shaving cream, fluorescent marker (to name a few); the floor was littered with torn newspapers and water was on the matresses and quilts. Needless to say, I have to buy a lot of toiletries quite soon. After things quietened down around 10 PM, news came rushing over the airwaves - The Chief Warden is conducting a surprise check of all the rooms. All inmates are requested to be in their rooms or face automatic fines. Out came the dusters, the pail of water and off I went scrubbing... After the inspection, the day wasn't done - time and tutorials don't wait for trifles like Bhawan Days and finally, I went off to sleep, exhausted, at 2 PM...&lt;br /&gt;This is my story, but let my faithful friend - the reader be a part of another one. IITJEE, the world's toughest engineering entrance examination, is going to be held once again to select another batch of students for the premier institutions of India. I give all those students giving this examination my best wishes and I wish them luck. Just spare 2 minutes and mentally send your blessings to all of these hardworking students, and don't forget to send a special small "best of luck" for students from my school - Loyola. Go Loyola!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-4967230475402394956?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/4967230475402394956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=4967230475402394956' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4967230475402394956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4967230475402394956'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/03/looking-at-my-blog-it-just-occurred-to.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-5237056640572909369</id><published>2007-02-20T20:39:00.000+05:30</published><updated>2007-03-11T13:02:12.105+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='applications'/><title type='text'></title><content type='html'>The Big Brother of the Internet: Google.&lt;br /&gt;So you really like &lt;a href="http://www.google.com/"&gt;Google&lt;/a&gt;, use it for searching, check your &lt;a href="http://mail.google.com/"&gt;mails&lt;/a&gt; on it, link to your friends on &lt;a href="http://www.orkut.com/"&gt;Orkut&lt;/a&gt;, blog away on &lt;a href="http://www.blogger.com/"&gt;Blogger&lt;/a&gt;, create web pages on &lt;a href="http://pages.google.com/"&gt;Google Page Creator&lt;/a&gt;, organize images using &lt;a href="http://picasa.google.com/"&gt;Picasa&lt;/a&gt;, shop using &lt;a href="http://froogle.google.com/"&gt;Froogle&lt;/a&gt;, read news using &lt;a href="http://www.google.com/reader"&gt;Google Reader&lt;/a&gt;, publish scraps of info using &lt;a href="http://www.google.com/notebook"&gt;Google Notebooks,&lt;/a&gt; edit documents using &lt;a href="http://docs.google.com/"&gt;Google Spreadsheets&lt;/a&gt;, find maps using &lt;a href="http://maps.google.com/"&gt;Google Maps&lt;/a&gt;, view your home using Google Earth, soon you will be operating on Google OS....&lt;br /&gt;&lt;br /&gt;Doesn't this sound like a monopoly of sorts? Not that you are forced into opting for Google products, its just that there are no good alternatives. So, what does all this mean for an average guy? It means that everything about your online "personal" life has a record on some Google server and you and I can't do anything about it. (I mean, I doubt that sending a mail to Google, asking them to delete all your private data would even elicit a response.) It all depends on how much you value your privacy. For me, I value it a lot but because of Google's sterling track record, I'm comfortable in entrusting private information to it. But that doesn't stop people from worrying about what "computer analysis" can be done to your private data in order to "catalog" you in the pecking order of the internet. Anunay was bothered with the same thought and came to more or less the same conclusion.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://anunay.blogspot.com/"&gt;Anunay&lt;/a&gt; has posted a very nice reflective article &lt;a href="http://anunay.blogspot.com/2007/02/paranoia-or-is-it.html"&gt;here&lt;/a&gt; and if you bother to "Google" - "&lt;a href="http://www.google.com/search?q=Google+as+big+brother"&gt;Google as Big Brother&lt;/a&gt;" , there will be plenty of good articles that will tell you why you should be wary of Google. Check out &lt;a href="http://www.google-watch.org/bigbro.html"&gt;this&lt;/a&gt; article on &lt;a href="http://www.google-watch.org/"&gt;google-watch.org&lt;/a&gt;(there it is again, the 17th time in this article) that I liked because of its objectivity, though I don't agree completely with all its points. In the end, you have to decide about the level of trust you are willing to put into a "monopolistic" data warehousing company. For the more privacy inclined, have a look at &lt;a href="http://www.scroogle.org/"&gt;Scroogle&lt;/a&gt;. Oh, and don't forget to educate yourself &lt;a href="http://educate-yourself.org/cn/googleandbigbrother07sep05.shtml"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-5237056640572909369?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/5237056640572909369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=5237056640572909369' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5237056640572909369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5237056640572909369'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/02/big-brother-of-internet-google.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-8831897539514088913</id><published>2007-01-30T21:49:00.000+05:30</published><updated>2007-01-30T21:51:16.303+05:30</updated><title type='text'></title><content type='html'>Ekta Kapoor had a reason when she named her serials with a K. K has a universal appeal. Have a look at Gopal's Blog on this topic: &lt;a href="http://k-gopal.blogspot.com/2007/01/k.html"&gt;http://k-gopal.blogspot.com/2007/01/k.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-8831897539514088913?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/8831897539514088913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=8831897539514088913' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8831897539514088913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8831897539514088913'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/01/ekta-kapoor-had-reason-when-she-named.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-4146419507506746627</id><published>2007-01-30T21:31:00.001+05:30</published><updated>2007-01-30T21:40:43.816+05:30</updated><title type='text'></title><content type='html'>As far as I have been able to discern, there is no law that states that momentum must be quantized. It is defined to be a continuously varying function dependant on the velocity of the particle according to the relativistic equations derived from the &lt;a href="http://en.wikipedia.org/wiki/Lorentz_transformations"&gt;Lorentz Transformations&lt;/a&gt;. However, this article:  &lt;a href="http://www.nemitz.net/vernon/MOMEQUAT.htm"&gt;http://www.nemitz.net/vernon/MOMEQUAT.htm&lt;/a&gt; on the web puts forth on first glance a convincing argument for the quantization of momentum. I haven't analyzed the mathematics in detail but can anybody spot some flaws?  &lt;a href="http://www.iitr.ernet.in/studenthomepages/homepages/061305"&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-4146419507506746627?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/4146419507506746627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=4146419507506746627' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4146419507506746627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4146419507506746627'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/01/quantization-of-momentum.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-1419150565050720833</id><published>2007-01-30T18:21:00.001+05:30</published><updated>2007-01-30T18:45:50.783+05:30</updated><title type='text'></title><content type='html'>&lt;div&gt;I recently received a forward mail from Utsav that has generated some debate. I am posting it below.&lt;/div&gt; &lt;div&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;Forwarded Conversation&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Subject: &lt;b&gt;Fabolous Article abt India!!!Are we dreaming the correct future for ourselves!!!!!! DO read&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;------------------------&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128);font-size:85%;" &gt;&lt;b&gt;From: utsav kumar&lt;/b&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-size:85%;" &gt;&lt;/span&gt;&lt;/div&gt; &lt;div&gt;Date: Mon, Jan 22, 2007 at 5:41 PM&lt;/div&gt;&lt;br /&gt;&lt;div&gt; &lt;table border="0" cellpadding="12" cellspacing="0" width="100%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt; &lt;span style="font-size:100%;"&gt;I&lt;/span&gt;&lt;span style="font-size:100%;"&gt; belong to life's batch of 1979 and as I grew up through the 1980s and early 1990s I was deeply embarrassed about India. About everything, our movies, our cricket team, our athletes, our products, our infrastructure, our poverty, our politicians and the whole damn system.  &lt;/span&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;No matter what we did, we fell painfully short of potential. Time and again! It hurt because I wanted to belong to a big, strong nation that could kick some a** and not to some laggard.&lt;br /&gt;&lt;br /&gt;But the story has changed, and how! Here I am in a brand new 2007, miles away from sweet home India, yet still closely following her story. Now they all say that it is not so much 'whether or not' as much as 'when' will India become a superpower, a world beater.  &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;India is shining, India is poised and India is everywhere, so I hear. Now the embarrassment and the heartaches have been buried with the 1990s.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Instead now there is a swelling pride and a sweet anxiety as we roar back into being a nation in fashion. And I am very happy for India and for all of us Indians. I am 27 now and I pray that I can see India fly highest before I kick the bucket.&lt;br /&gt;&lt;br /&gt;But here comes the twist in my tale. I no longer want India to be a superpower in the manner I wanted it to be when I was naive and without a broader perspective. I no longer want it to be another big and brawny US. I don't want it to be a superpower that is just made up of brain and brawn, that is GDP performance and military might.  &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Rather and more pressingly, I want India to have a heart. The heart of a superpower, a civilised country. Now what is the heart of a country? Let me try, humbly:&lt;br /&gt;&lt;br /&gt;Having a heart, unlike GDP growth and a military beef-up, does not just relate to the macro-economic and political issues. Having a heart of a real superpower essentially has micro implications, for each of us. Each of us can soon belong to a mighty nation and all that but then what is the point of belonging to one if we indulge in or turn a blind eye to child labour?  &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Are we ready yet to ask for the age of our servants or avoid and report restaurants where the cleaners are boys who should be in school? I ask again, what is the big thing about belonging to a superpower if we continue to pelt stones at speechless stray dogs and cows? What is the big deal?&lt;br /&gt;&lt;br /&gt;We can spit on the roads and throw the banana peel from a travelling car and still India can turn into what the world calls a superpower. The two are not corelated but then do we just want to be a mighty country and not care about our manners? We can buy a multitude of cars, bikes and look down on public transportation and still become a superpower. All our trees can make way for ultra modern townships. But then do we just want to belong to a superpower and pollute without caring about our environmental legacy for our children?&lt;br /&gt;&lt;br /&gt;Are we ready yet to smile freely at random countrymen on the streets? Or if someone's car rams into ours are we ready to get out and ask, 'Are you ok?' instead of fisting the aggressor?&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Are we poised to replace brutal ragging at our educational institutions with warmer welcoming gestures? Are we there yet, when we care to build local infrastructure that can also be used by handicapped people? Will we ever care enough for our country that we pick up our dog's poop when we walk it on the streets?&lt;br /&gt;&lt;br /&gt;And will we dance on the streets again if India successfully tests another nuclear weapon? Are we ready yet to have a heart?&lt;br /&gt;&lt;br /&gt;The time has come for us to become an economic powerhouse of the world. There is no stopping us now. But the time is certainly not here as yet for us to claim that we have a collective heart, the heart that makes a real superpower beat soundly. That's going to take a while.  &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;Till then let us not kid ourselves at the prospect of becoming a superpower.&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;The task at hand is a lot bigger than the mere achievement of becoming an economic powerhouse and having destructive weapons. Let us be aware, lest we stop and rejoice as soon as we become the world's largest economy and stagnate.  &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:85%;"&gt;Let's keep moving onto bigger things. Let's become a real superpower. A superpower that beats to a super heart.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;Ravi Bhaskar is a software consultant based in Calgary, Canada.&lt;/b&gt;&lt;/p&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;--------&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128);font-size:85%;" &gt;&lt;b&gt;From: Indrasen Bhattacharya&lt;/b&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-size:85%;" &gt; &lt;div&gt;Date: Thu, Jan 25, 2007 at 5:43 PM&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt; &lt;table border="0" cellpadding="12" cellspacing="0" width="100%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span style="font-size:85%;"&gt;Hi&lt;br /&gt;&lt;removed&gt;&lt;br /&gt;That article has been written by a typical example of what the&lt;br /&gt;BIGGEST problem with our nation is today. The guy who wrote this is&lt;br /&gt;based in Canada. Why doesnt he come back to India like and do his job&lt;br /&gt;for the country if he really cares instead of sending out emails like&lt;br /&gt;that? He is one of those disgusting people like Arundhati Roy who said&lt;br /&gt;- "If India becomes a nuclear power , I will give up my citizenship."&lt;br /&gt;Would you rather have it, as this person seems to, that India&lt;br /&gt;should have remained nuclearly handicapped and in a position to be&lt;br /&gt;blackmailed by just about any rogue country like  Pakistan or North&lt;br /&gt;Korea ? AND this guy doesnt care even about the smaller problems like&lt;br /&gt;poverty, illiteracy or child labour else he wouldnt be in Calgary. Its&lt;br /&gt;very easy to send emails like that. Its hard to come here and do&lt;br /&gt;something.&lt;br /&gt;So, next time please exclude me from your prestigious list. Oh, by&lt;br /&gt;the way "fabulous" is spelled in this way.&lt;br /&gt;-Yours indignantly,&lt;br /&gt;&lt;span style="color: rgb(136, 136, 136);"&gt;Indrasen&lt;br /&gt;&lt;/span&gt;&lt;/removed&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;br /&gt;--------&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128);font-size:85%;" &gt;&lt;b&gt;From: Divye Kapoor&lt;/b&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-size:85%;" &gt; &lt;div&gt;To: Indrasen Bhattacharya &lt;/div&gt; &lt;div&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);font-size:85%;" &gt;Date: Sat, Jan 27, 2007 at 5:27 PM&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-size:85%;"&gt;Hi indi,&lt;br /&gt;It looks like you feel really strongly about this subject. So do I. But my viewpoint on this message differs from yours.&lt;br /&gt;To quote you: &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;"That article has been written by a typical example of what the&lt;br /&gt;BIGGEST problem with our nation is today. The guy who wrote this is&lt;br /&gt;based in Canada. Why doesn't he come back to India like and do his job&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;for the country if he really cares instead of sending out emails like&lt;br /&gt;that?"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;My opinion on this point is that you need not be in your country in order to participate in its upliftment. Take the case of the massive PIO and Indian diaspora present in the US that is flexing its muscles in order to ensure that some pressure is brought on the US Senate to ensure that Indian interests are preserved while passing the Hyde Bill. Their contribution is behind the scenes but it plays a part nonetheless.&lt;br /&gt;Another case in point is the flourishing Indian culture in the UK. Not only has it helped remove the stereotype about India as a land of nakid fakirs and snake charmers, but it has also proved to be an enormous source of Repatriation of foreign  currency to India, thus contributing to its booming economy.  &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;"Would you rather have it, as this person seems to, that India&lt;br /&gt;should have remained nuclearly handicapped and in a position to be&lt;br /&gt;blackmailed by just about any rogue country like  Pakistan or North&lt;br /&gt;Korea ?"&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;Firstly, nowhere in this mail has he opposed India's testing of a nuclear weapon. He has used the fact that the testing of a nuke brought people out on the streets, rejoicing in our technological development. He has asked people in general whether they would rejoice with the same fervour if India tested another nuke. The real question being whether testing another nuke brings us any closer to the emancipation of the large mass of human society that lives below the poverty line in our country. The first nuke test served the purpose of a deterrent to nations that intend to use their military might to suppress us but any subsequent tests serve no purpose at all except as signals of our increasing proficiency in nuke tech.&lt;br /&gt;"AND this guy doesn't care even about the smaller problems like&lt;br /&gt;poverty, illiteracy or child labour else he wouldn't be in Calgary."&lt;br /&gt;Note that he has mentioned child labour and our careless attitude towards our country in his mail. That would definitely not support your assessment that has does not care for the smaller diseases ailing our country. Also note that he categorically states that he has been following the "Indian story" ever since the 80's, so you can't brand him as an unfeeling expatriate.  &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;"Its&lt;br /&gt;very easy to send emails like that. Its hard to come here and do&lt;br /&gt;something."&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;Again, I don't agree with your viewpoint. You don't need to do things on a massive scale in order to do something to help your nation. All you need to do to make a difference is to pay some conscious attention to the finer details in your day to day life and coach others to do the same. After all, you are the future of this nation. The bad guys will not be at the helm of this nation forever you know. You too can enter politics but I don't think you will. Why's that? Its because you don't want to fight the system. Sitting here in this country too, you can only crib about politics but might not even go and cast your vote (not now but when you are eligible) simply because you don't care about which bad guy heads the government. To phrase it in your words, its really easy to send such a mail expressing anger at an Indian settled abroad for not caring but it does pay a little to have a look at what you can do for your country, irrespective of your location. This mail is his way of stirring up discussion and its doing its job fairly well.&lt;br /&gt;That's my humble opinion,&lt;br /&gt;Please comment,&lt;br /&gt;Divye&lt;/span&gt;&lt;br /&gt;&lt;/div&gt; &lt;p&gt;&lt;span&gt;&lt;/span&gt; &lt;/p&gt; &lt;p&gt;&lt;span&gt;Huff!!! That is a really long post....Which side of the debate do you lie on? Do post your opinion. &lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-1419150565050720833?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/1419150565050720833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=1419150565050720833' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1419150565050720833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1419150565050720833'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/01/fwd-interesting-discussion.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-1637178028054674701</id><published>2007-01-23T18:07:00.000+05:30</published><updated>2008-12-10T07:57:39.682+05:30</updated><title type='text'></title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_c0e2zFuzsT0/RbYNIYtKfOI/AAAAAAAAAAk/1xdY3XFERCw/s1600-h/cogni.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_c0e2zFuzsT0/RbYNIYtKfOI/AAAAAAAAAAk/1xdY3XFERCw/s320/cogni.JPG" alt="" id="BLOGGER_PHOTO_ID_5023216872100363490" border="0" /&gt;&lt;/a&gt;I recently posted a very intriguing and irritating problem with a C++ program on the GCC help group. A certain piece of (incorrect) code was returning a defined answer when compiled with DevC++ and g++ on linux. Have a look at the problem and the solution &lt;a href="http://groups.google.com/group/gnu.gcc.help/browse_thread/thread/7b0b78b8e1214122/8dbf34a85b8f9367#8dbf34a85b8f9367"&gt;here&lt;/a&gt;.&lt;br /&gt;If you are really interested in competing with the best at the highest level, come for &lt;a href="http://www.iitr.ernet.in/cognizance"&gt;Cognizance&lt;/a&gt;, IITR's tech fest. Plenty of programming opportunities (multiple programming events and great cash prizes). Make sure you check out the &lt;a href="http://www.iitr.ernet.in/cognizance/Electronics_and_Computer.html"&gt;E&amp;amp;C department's&lt;/a&gt; and &lt;a href="http://www.iitr.ernet.in/cognizance/Mathematics.html"&gt;Maths Department's&lt;/a&gt; list of events.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-1637178028054674701?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/1637178028054674701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=1637178028054674701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1637178028054674701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1637178028054674701'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/01/i-recently-posted-very-intriguing-and.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_c0e2zFuzsT0/RbYNIYtKfOI/AAAAAAAAAAk/1xdY3XFERCw/s72-c/cogni.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-4548387168667705649</id><published>2007-01-19T17:18:00.001+05:30</published><updated>2007-01-19T17:18:48.290+05:30</updated><title type='text'></title><content type='html'>Yippee. A new template for my blog. I seriously got bored of the previous one. How do you like it?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-4548387168667705649?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/4548387168667705649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=4548387168667705649' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4548387168667705649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4548387168667705649'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/01/yippee.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-1756412602800540157</id><published>2007-01-19T16:17:00.000+05:30</published><updated>2007-01-23T17:56:51.465+05:30</updated><title type='text'></title><content type='html'>How many times have you wasted hours in finding good website templates? Google searches for "&lt;a href="http://www.google.co.in/search?q=web+templates"&gt;web templates&lt;/a&gt;", "&lt;a href="http://www.google.co.in/search?q=free+html+templates"&gt;free html templates&lt;/a&gt;" and the like give terrible results. I found a really good &lt;a href="http://www.oswd.org/"&gt;site&lt;/a&gt; that hosts a lot of Open Source Web Templates. Its really terrific and I'm not kidding. Kudos to &lt;a href="http://www.answers.com/open-source&amp;amp;r=67"&gt;Open Source&lt;/a&gt; and all the people who actively support it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-1756412602800540157?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/1756412602800540157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=1756412602800540157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1756412602800540157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1756412602800540157'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/01/lot-of-people-including-me-have-always.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-7302826984066947324</id><published>2007-01-09T17:22:00.001+05:30</published><updated>2007-01-09T18:19:09.002+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='RSS'/><category scheme='http://www.blogger.com/atom/ns#' term='studies'/><title type='text'></title><content type='html'>A lot of people have been asking me about what they should make for the ISC Physics project. Well, all I can tell them and those who are here looking for more info is that I made a &lt;a href="http://en.wikipedia.org/wiki/Rectifier"&gt;full wave rectifier&lt;/a&gt;. Its really easy and fun to make and the concepts of a &lt;a href="http://en.wikipedia.org/wiki/Diode"&gt;diode&lt;/a&gt; are really cleared up. For more info, consult &lt;a href="http://en.wikipedia.org/"&gt;Wikipedia&lt;/a&gt; or &lt;a href="http://www.google.co.in/"&gt;Google&lt;/a&gt;: &lt;a href="http://www.google.co.in/search?q=full+wave+rectifier"&gt;full wave rectifier&lt;/a&gt;.&lt;br /&gt;While on this topic, I came across some good explanations about the internal working structure of a &lt;a href="http://en.wikipedia.org/wiki/Transistor"&gt;transistor&lt;/a&gt;. Its by an amateur electronics hobbyist but he does a good job on the whole. Check out his &lt;a href="http://amasci.com/amateur/transis.html"&gt;site&lt;/a&gt;.&lt;br /&gt;Also, if you want to keep up with posts on this blog, you can add an RSS feed to your browser. The instructions to do this vary from browser to browser but in the case of Firefox, look for an orange icon in the title bar. In case you find any broken links, don't hesitate to send me a comment stating the problem.&lt;span class="" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-7302826984066947324?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/7302826984066947324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=7302826984066947324' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7302826984066947324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7302826984066947324'/><link rel='alternate' type='text/html' href='http://www.divye.in/2007/01/lot-of-people-have-been-asking-me-about_09.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-7304646883254556993</id><published>2006-12-31T23:08:00.000+05:30</published><updated>2008-12-10T07:57:39.998+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='wikipedia'/><category scheme='http://www.blogger.com/atom/ns#' term='death'/><category scheme='http://www.blogger.com/atom/ns#' term='loyola'/><category scheme='http://www.blogger.com/atom/ns#' term='christmas'/><category scheme='http://www.blogger.com/atom/ns#' term='christ'/><category scheme='http://www.blogger.com/atom/ns#' term='mesra'/><title type='text'></title><content type='html'>Firstly,  with great regret, I have to say that my beloved phupharji, &lt;a href="http://www.google.com/search?q=sudhir+kharbanda"&gt;Sudhir Kharbanda&lt;/a&gt;, (my father's brother-in-law) left for his heavenly abode on the 28th of December, leaving behind fond memories with his entire family, the Kharbandas and Kapoors. His Chautha was held on the 30th at Mata Ka Mandir, Near New Friends Colony, New Delhi; the 30th also marked the completion of 2 months of life without my grandmother. It was a really sad day for me.&lt;br /&gt;Moving on, it is holiday season and I wish you a Merry &lt;a href="http://en.wikipedia.org/wiki/Christmas"&gt;Christmas&lt;/a&gt; and a Happy &lt;a href="http://en.wikipedia.org/wiki/New_year"&gt;New Year&lt;/a&gt;. I sincerely hope and wish that life in 2007 will be happier and more enjoyable than 2006 has been and may you reach (or atleast try to reach) the pinnacles of success that you have been aiming for. By the way, do have a look at those &lt;a href="http://en.wikipedia.org/"&gt;Wikipedia&lt;/a&gt; ariticles. Its amazing that Christmas and New Year have a different meaning for different cultures.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.medha-bit.com/"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 271px; height: 202px;" src="http://1.bp.blogspot.com/_c0e2zFuzsT0/RZf8nYXq6SI/AAAAAAAAAAM/6IaKPqMkwVM/s320/poster.jpg" alt="" id="BLOGGER_PHOTO_ID_5014754463587166498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.orkut.com/Profile.aspx?uid=6304573995581422554"&gt;Pratik Dhaboo&lt;/a&gt;, a brilliant ex student of &lt;a href="http://www.loyola.edu.in/"&gt;Loyola&lt;/a&gt;, is the webmaster for &lt;a href="http://www.medha-bit.com/"&gt;Medha 2007&lt;/a&gt;, a mechanical tech fest being held at &lt;a href="http://www.bitmesra.ac.in/"&gt;BIT Mesra&lt;/a&gt;. Do visit the official web site and by all means participate if you like the contests and the prize money. ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-7304646883254556993?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/7304646883254556993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=7304646883254556993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7304646883254556993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7304646883254556993'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/12/firstly-with-great-regret-i-have-to-say.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_c0e2zFuzsT0/RZf8nYXq6SI/AAAAAAAAAAM/6IaKPqMkwVM/s72-c/poster.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-5608969823799056766</id><published>2006-12-21T23:56:00.000+05:30</published><updated>2006-12-22T00:10:47.608+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='computers'/><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><category scheme='http://www.blogger.com/atom/ns#' term='christ'/><category scheme='http://www.blogger.com/atom/ns#' term='microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='hacking'/><title type='text'></title><content type='html'>A discussion on the &lt;a href="http://nowscape.com/atheism/Russell_Why_I_am_not_a_Christian.htm"&gt;divinity of Christ&lt;/a&gt;, a chronicle of the rough and tumble &lt;a href="http://www.cryptonomicon.com/beginning.html"&gt;history of computers&lt;/a&gt;, the &lt;a href="http://www.swaroopch.info/archives/2005/12/22/code4bill-or-code2share/"&gt;continuing fight&lt;/a&gt; between the raw talent in open source and the hype of Microsoft and a very informative &lt;a href="http://weblogs.mozillazine.org/gerv/"&gt;blog &lt;/a&gt;of an open source developer (&lt;a href="http://weblogs.mozillazine.org/gerv/"&gt;Hacking for Christ&lt;/a&gt;) are some of the things that I have been reading. Have a look.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-5608969823799056766?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/5608969823799056766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=5608969823799056766' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5608969823799056766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5608969823799056766'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/12/discussion-on-divinity-of-christ.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-8968866319017982743</id><published>2006-11-30T15:56:00.000+05:30</published><updated>2006-11-30T16:06:15.267+05:30</updated><title type='text'></title><content type='html'>&lt;div style="text-align: left;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger2/4945/4171/1600/229275/ms%20and%20google.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 540px; height: 107px;" src="http://photos1.blogger.com/x/blogger2/4945/4171/400/820113/ms%20and%20google.jpg" alt="" border="0" /&gt;&lt;/a&gt;What do you get when Microsoft sends you an e-mail on your gmail id?&lt;br /&gt;&lt;/div&gt;Ans: Google's offer to invite Microsoft to Gmail!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-8968866319017982743?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/8968866319017982743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=8968866319017982743' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8968866319017982743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/8968866319017982743'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/11/what-do-you-get-when-microsoft-sends.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-3536008643154783504</id><published>2006-11-26T20:59:00.000+05:30</published><updated>2006-11-26T21:02:37.879+05:30</updated><title type='text'></title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i145.photobucket.com/albums/r224/divye/edit1.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px;" src="http://i145.photobucket.com/albums/r224/divye/edit1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Which photo looks better, the coloured one or the black and white? I haven't found time to do proper photo editing in photoshop. Comments solicited!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-3536008643154783504?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/3536008643154783504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=3536008643154783504' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3536008643154783504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/3536008643154783504'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/11/which-photo-looks-better-coloured-one.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-5760788126681956745</id><published>2006-11-23T01:26:00.000+05:30</published><updated>2006-11-23T01:42:32.089+05:30</updated><title type='text'></title><content type='html'>Yippee! I just managed to finish my Maths tutorial work. Except for some sums that were swallowed or unsolved in between, one headache is over! Now on to studying for Chemistry. Forgive this blantant self congratulation but I needed to blog my happiness. Chem on the 25th....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-5760788126681956745?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/5760788126681956745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=5760788126681956745' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5760788126681956745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5760788126681956745'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/11/yippee-i-just-managed-to-finish-my.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-2173602856338569896</id><published>2006-11-20T12:19:00.000+05:30</published><updated>2006-11-20T12:22:09.067+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='maths'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='movies'/><category scheme='http://www.blogger.com/atom/ns#' term='studies'/><title type='text'></title><content type='html'>I got so irritated by the maths tut that I didn't study all of yesterday. Instead, I watched "Sound of Music" - the hit movie of the 70s -80s (Have you heard of the song - Doe a deer, a female deer, Ray, a drop of golden sun....., its from this movie). It was a senti one and slightly old fashioned, but i enjoyed it. I'm planning to study today.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-2173602856338569896?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/2173602856338569896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=2173602856338569896' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2173602856338569896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/2173602856338569896'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/11/i-got-so-irritated-by-maths-tut-that-i.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-5493885958057476362</id><published>2006-11-17T17:14:00.000+05:30</published><updated>2006-11-17T17:32:10.526+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='practicals'/><category scheme='http://www.blogger.com/atom/ns#' term='biotechnology'/><category scheme='http://www.blogger.com/atom/ns#' term='syllabus'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='cognizance'/><category scheme='http://www.blogger.com/atom/ns#' term='chemistry'/><category scheme='http://www.blogger.com/atom/ns#' term='physics'/><title type='text'></title><content type='html'>Well, this is an update on the revision in syllabus. It has now been confirmed of sorts that the entire syllabus for the first year will be revamped for the incoming batch and all the rubbish courses like engineering graphics and thermal/material sciences  will be made electives. The course load will be reduced and the new batch will have 2 computer programming courses - &lt;span style="font-style: italic;"&gt;basic programming&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;data structures&lt;/span&gt; in the first year itself. There will now exist only about 6 core courses and the remaining will have to be chosen from about 19 electives. However, these changes in syllabus and content will not be propagated to our batch. Well, the juniors always have all the fun! &lt;span style="font-weight: bold;"&gt;Not fair!&lt;/span&gt;&lt;br /&gt;End semester exams are from the 25th but the good news is that (assuming i clear the end sems), I will never have to sit in another chemistry and biotechnology lecture. :D I still have another semester of physics and 2 sems of maths to go, but this is reason enough to smile.&lt;br /&gt;The bad news is that my physics practical exam went off very badly (300% error from the standard value and a maximum permissible error of 6%) and i have no clue about how my chem practs went so I really can't comment on it. I'll be back in Jamshedpur by the 10th of December and leave again on the 29th. New years day has to be celebrated in the Institute itself as we have classes from the 1st :( Those who are planning to be around in JSR in this time interval, please do comment. (Do get away from &lt;a href="http://www.orkut.com/"&gt;orkut&lt;/a&gt;, all of you!)&lt;br /&gt;Another update is that the Cognizance team has been formed and has started working to make &lt;a href="http://www.iitr.ernet.in/"&gt;IIT Roorkee's&lt;/a&gt; Tech Fest a huge success. For those of you interested in engineering - you are invited to take part. Cogni should be held in Feb or March. Sponsors invited!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-5493885958057476362?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/5493885958057476362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=5493885958057476362' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5493885958057476362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5493885958057476362'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/11/well-this-is-update-on-revision-in.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-1780230024289006271</id><published>2006-11-13T15:55:00.000+05:30</published><updated>2006-11-13T16:16:46.548+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='salsa'/><category scheme='http://www.blogger.com/atom/ns#' term='death'/><category scheme='http://www.blogger.com/atom/ns#' term='feedback'/><category scheme='http://www.blogger.com/atom/ns#' term='dadima'/><category scheme='http://www.blogger.com/atom/ns#' term='Self improvement'/><category scheme='http://www.blogger.com/atom/ns#' term='thomso'/><category scheme='http://www.blogger.com/atom/ns#' term='physics'/><title type='text'></title><content type='html'>Well, a lot has happened over the last month in my personal life. My grandmother, &lt;span style="font-weight: bold; font-style: italic;"&gt;Shrimati Uma Kapoor&lt;/span&gt;, expired on 30th October and I went to Delhi for mourning. Also, we had Thomso, our cultural fest, featuring &lt;span style="font-weight: bold;"&gt;Shibani Kashyap, Zero,&lt;/span&gt; a &lt;span style="font-weight: bold;"&gt;Hasya Kavi Sammelan (Thahake)&lt;/span&gt; and a &lt;span style="font-weight: bold;"&gt;fashion show (Vogue)&lt;/span&gt; October and my mom's birthday was on the 29 with professional models from NIFT, Delhi, from 26th to 29th too.&lt;br /&gt;I enjoyed all of these events in Thomso and participated in a salsa workshop too (with a fourth year student of a college in Kaithal - Geeta Mittal, who is now placed in IBM) but I made a mess of it as I really have 2 left feet. However, Dadima's death has left me with a feeling of loss...&lt;br /&gt;Having rather mixed feelings on the happenings of this last month, and also due to shortage of time, I would rather not blog about my feelings. As for the present, I am loaded with tutorials as usual but a really nice thing that is happening at the institute is that we are being asked to fill up &lt;span style="font-style: italic;"&gt;response forms&lt;/span&gt; for the course content and the effectiveness of the teacher. Needless to say, we are enjoying our chance to punch back anonymously at our teachers.&lt;br /&gt;The inside news is that the content of the Physics course will change and the teachers are lobbying for reduction of the course load, specially for the first year students. I completely agree with them. Making us stay up till three in the mornings on account of finishing the course load is too much. We deserve some time on our own.&lt;br /&gt;There, I'm rambling again. KV told me that I speak well but explain my points too much. Engineers should be precise. Well, that's my target for self improvement. That's all for now.&lt;br /&gt;PS: All of you who visit my blog, please leave a comment so that I can know my regular readers ) (Not that there are many that is ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-1780230024289006271?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/1780230024289006271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=1780230024289006271' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1780230024289006271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1780230024289006271'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/11/well-lot-has-happened-over-last-month.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-7745079321705153402</id><published>2006-10-03T18:55:00.000+05:30</published><updated>2006-10-03T18:59:32.126+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='Mishra'/><category scheme='http://www.blogger.com/atom/ns#' term='dosa'/><category scheme='http://www.blogger.com/atom/ns#' term='Prerna Classes'/><category scheme='http://www.blogger.com/atom/ns#' term='Tank'/><category scheme='http://www.blogger.com/atom/ns#' term='relaxation'/><category scheme='http://www.blogger.com/atom/ns#' term='faculty'/><category scheme='http://www.blogger.com/atom/ns#' term='UC'/><title type='text'></title><content type='html'>Today was a day of rest and relaxation. I'll be going to UC to have its trademark Wednesday Dosas. I didn't do much today except waking up late and lazing around watching TV. I met Mishra sir in the evening and he was late for his class (a rarity I must say) so I couldn't talk to him for too long. Tank sir is out of town and he will be back on Thursday so I will meet him on Friday. I received a warm welcome from the faculty of Prerna Classes when I went over there just before classes. I met most of my ex-teachers. I'll meet my school teachers tomorrow. That's a short post detailing my activities of the day.&lt;br /&gt;Ah, life is bliss at home - no tension, no fikr.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-7745079321705153402?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/7745079321705153402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=7745079321705153402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7745079321705153402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7745079321705153402'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/10/today-was-day-of-rest-and-relaxation.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-4766653952748938668</id><published>2006-10-02T21:47:00.000+05:30</published><updated>2006-10-02T22:51:37.235+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='soumyadip'/><category scheme='http://www.blogger.com/atom/ns#' term='neelanchal'/><category scheme='http://www.blogger.com/atom/ns#' term='anunay'/><category scheme='http://www.blogger.com/atom/ns#' term='gopal'/><category scheme='http://www.blogger.com/atom/ns#' term='train'/><category scheme='http://www.blogger.com/atom/ns#' term='hostel'/><category scheme='http://www.blogger.com/atom/ns#' term='chess'/><category scheme='http://www.blogger.com/atom/ns#' term='amity'/><category scheme='http://www.blogger.com/atom/ns#' term='Tank'/><category scheme='http://www.blogger.com/atom/ns#' term='match'/><category scheme='http://www.blogger.com/atom/ns#' term='youth wing'/><category scheme='http://www.blogger.com/atom/ns#' term='mrinal'/><title type='text'></title><content type='html'>Ok, I'm back in Jamshedpur. To echo the opinions of hostelers all over the world - "There is nothing like home cooked food." I went to a party tonight on the occasion of Vijaya Dashami and I had fun there. I was dead tired after my train trip and a restless night as I wasn't sure of the time of arrival of Neelanchal at TATA. I took Tipu out for a walk after 2 months (God, was he delighted at seeing me after such a long time) and got caught in the rain and came back drenched and dirty. But does anyone really care about that.&lt;br /&gt;Don't know and don't care. I just have to write or type - however you see it. Coming back to the point, Soumya got impatient at being made to wait for so long for the next move in our chess series. Just for the record, the current status of the match is -&lt;br /&gt;1. c4  e5&lt;br /&gt;2. e4 c5&lt;br /&gt;3. d3 Nc6&lt;br /&gt;4. Nc3 ...&lt;br /&gt;But I'm too tired to think up of any suitable reply. Any help would be welcome. Just comment on this post and constructive and destructive criticism is most welcome.&lt;br /&gt;On my way back from Roorkee, I stopped by for a day in Delhi and met Anunay and Gopal (refer to last post to know more about him). Anunay is doing his B.Com(Hons) from &lt;a href="http://www.amity.edu"&gt;Amity&lt;/a&gt; as there are a few problems with his admissions in Symbiosis in B.Com(LLB). He's free more or less and absolutely disgusted with the faculty teaching him. &lt;span style="font-weight: bold; font-style: italic;"&gt;So note:&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;All those considering Amity as their future, think twice. &lt;/span&gt;That reminds me - Abhishek Ghosh was supposed to be in &lt;a href="http://www.amity.edu"&gt;Amity&lt;/a&gt;. Wonder what hapenned to him. I'll ask Arijit.&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;As for Gopal, he's founding a youth wing at the Rashtrapati Bhawan. Anybody interested in joining should keep a watch at &lt;a href="http://www.presidentofindia.nic.in/youth"&gt;www.presidentofindia.nic.in/youth&lt;/a&gt; This site is not yet up but it should be up soon according to Gopal. By going to Harvard, Gopal is depriving India of a wonderful and imaginative mind.&lt;br /&gt;I met Mrinal today. He's doing well at &lt;a href="http://www.prernaclasses.com"&gt;Tank&lt;/a&gt;. If he keeps this up, he's well on his way to clear IIT-JEE next year. Hopefully, the new pattern should be for his benefit. That reminds me that I need to meet all my teachers while I'm here for the pujas.&lt;br /&gt;Well, while on the topic of teachers, I just wanted to discuss my Mathematics sir. He is an enhanced photocopy of our most beloved NATO sir. He too insists on proper framing of solutions and showing all steps while solving the problem. He reminds me of NATO sir everytime he writes on the blackboard. Next update will include my interactions with my teachers.&lt;br /&gt;Till then, Sayonara&lt;br /&gt;Signing off... Divye&lt;br /&gt;PS: That was a line ripped off from Lage Raho Munna Bhai.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-4766653952748938668?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/4766653952748938668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=4766653952748938668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4766653952748938668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/4766653952748938668'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/10/ok-im-back-in-jamshedpur.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-1485462870007412670</id><published>2006-09-20T17:48:00.000+05:30</published><updated>2006-09-20T19:09:23.499+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='MIT'/><category scheme='http://www.blogger.com/atom/ns#' term='Indian food'/><category scheme='http://www.blogger.com/atom/ns#' term='Delhi'/><category scheme='http://www.blogger.com/atom/ns#' term='hunger'/><category scheme='http://www.blogger.com/atom/ns#' term='Tarush'/><category scheme='http://www.blogger.com/atom/ns#' term='US'/><category scheme='http://www.blogger.com/atom/ns#' term='Harvard'/><category scheme='http://www.blogger.com/atom/ns#' term='Rutwik'/><category scheme='http://www.blogger.com/atom/ns#' term='IIT'/><category scheme='http://www.blogger.com/atom/ns#' term='Karan'/><title type='text'></title><content type='html'>Ok. I'm already starting to behave like a bad blogger. I haven't come to the comp centre for nearly a week now and I seriously need to regularize this. Well, I met Gopal online today and he has reiterated that he is going to &lt;a href="http://www.harvard.edu"&gt;Harvard&lt;/a&gt; on a 125% scholarship to study "Economics and International Affairs" on an integrated doctoral programme with a non-degree granting programme in Energy at &lt;a href="http://web.mit.edu"&gt;MIT&lt;/a&gt; (I might have jumbled the terminologies a little bit but you get the idea) without finishing his boards in India as a graduation is not a criterion for admission into Harvard. Oh, and he recently had a meeting with the director of &lt;a href="http://www.iitd.ac.in"&gt;IIT Delhi &lt;/a&gt;and his book on energy independence has just been listed on &lt;a href="http://www.amazon.com"&gt;Amazon&lt;/a&gt;. I met Rutwik online too. Tarush, Rutwik and Karan are planning a day off from college. I hope they enjoy themselves and have some decent Indian food after the continental stuff they have been eating for the past month (They are only about an hour away from each other by train in the US). I don't know what's happenned to Ankur, I need to get in touch with him.&lt;br /&gt;On another note, the match with Soumya has progressed another step. Let's see what move I get in reply. I scrapped plenty of people over a course of an hour and a half on &lt;a href="http://www.orkut.com"&gt;orkut&lt;/a&gt; and I have a physics practical to get done before tomorrow and my stomach is rumbling with hunger. Time for a glass of milk and something to eat.&lt;br /&gt;Just a random thought, a lot of people fall sick in hostel because they don't drink enough water. For all those reading this, just keep in mind to force down atleast 2-4 glasses of water with every meal, even if you don't feel like it.&lt;br /&gt;That's all for now. Until next time, Ciao!&lt;br /&gt;PS: Warning: Don't join orkut, it is highly addictive and a huge time sink. Trust me, I know&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-1485462870007412670?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/1485462870007412670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=1485462870007412670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1485462870007412670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/1485462870007412670'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/09/ok_20.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-7336722594272586668</id><published>2006-09-16T21:19:00.000+05:30</published><updated>2006-09-16T21:45:20.068+05:30</updated><title type='text'></title><content type='html'>I'm sitting in Delhi right now after having an anticlimax saturday. I started out with high hopes of having a fun day but a series of bad timings robbed the day of its flavour. I woke up at 8 today and got ready after breakfast by 11 or so. I then hitched a ride with Nonika, my cousin, to Nehru Place where I did some shopping and then came back with 4 chicken rolls. I called up Aku didi, who'll be joining Google sometime next month in HR and obviously demanded a treat from her. She said she would be home in GK by 4 and she was there by 3:15! We thought that we had a good chance of watching a movie but we got delayed in our departure to Saket and we decided to wait a little longer and watch Bas Ek Pal in PVR Spice but we delayed too much and we lost our chance to get a ticket there too and we ended up playing pool at Tayaji's place. There the lights went off and we returned home by 8:30 :( Anyways, another 1/2 day is left and I feel like sleeping so that's it for today. I'll make the most of Delhi while I'm here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-7336722594272586668?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/7336722594272586668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=7336722594272586668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7336722594272586668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/7336722594272586668'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/09/im-sitting-in-delhi-right-now-after.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-6239825112009850038</id><published>2006-09-13T15:34:00.000+05:30</published><updated>2006-09-13T15:43:34.134+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='practicals'/><category scheme='http://www.blogger.com/atom/ns#' term='tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='legal'/><category scheme='http://www.blogger.com/atom/ns#' term='publicize'/><category scheme='http://www.blogger.com/atom/ns#' term='link'/><category scheme='http://www.blogger.com/atom/ns#' term='marks'/><category scheme='http://www.blogger.com/atom/ns#' term='e-biz'/><category scheme='http://www.blogger.com/atom/ns#' term='mid semester'/><title type='text'></title><content type='html'>Well, I got into an accident just after I posted my last blog entry. A scooterist, tearing down the  main thoroughfare failed to brake and banged into me. Although nothing happened by the grace of God, I did realize that my life was precious and could be snatched away from me by a small mistake. Well, enough of senti stuff... I had another chat about E-Biz with Ashutosh. This new fangled concept of network marketing does not appeal very much to me. Also, I'm worried about the legal ramifications. As of now, I don't think I will join.&lt;br /&gt;    Soumya and me are currently playing a long distance chess match over e-mail. He's playing the "English Open" to confuse me as usual, but beware Soumya, I have played with plenty of good opponents here and I just might have improved a bit...&lt;br /&gt;Tutorials and Practicals just keep on coming throughout the week. I just finished 2 tutorial sheets for today last night by 1 am and I am on my way to the 3rd. Test papers for the mid sem exams have been corrected and are being distributed. I am in the middle of my class in Maths with 21 on  35 and I have done ok in Physics with 20 on 25. Let's see how the other papers go.&lt;br /&gt;I think tonight is going to be another long night with a huge physics practical to be completed for tomorrow.... Hmmm, maybe the load might seem less as now we don't have Saturdays as working days.&lt;br /&gt;    That's a long post for today. That's all the time I have on my hands now. See you as soon as possible.... (I don't know how many people have even seen my blog since it came online, I will have to publicize the link).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-6239825112009850038?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/6239825112009850038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=6239825112009850038' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6239825112009850038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/6239825112009850038'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/09/well-i-got-into-accident-just-after-i.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-5759524276555815640</id><published>2006-09-11T16:42:00.000+05:30</published><updated>2006-09-11T16:51:56.661+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='maths'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='loyola'/><category scheme='http://www.blogger.com/atom/ns#' term='marks'/><category scheme='http://www.blogger.com/atom/ns#' term='fiction'/><category scheme='http://www.blogger.com/atom/ns#' term='mid semester'/><category scheme='http://www.blogger.com/atom/ns#' term='Sushreet'/><title type='text'></title><content type='html'>Ok. Now onto business. Sushreet is going to Sri Lanka for the international stage of a computer competition. Congrats to &lt;a href="http://www.loyola.edu.in"&gt;Loyola!&lt;/a&gt; Also, Loyola has won Abacus for the sixth year in a row. Well, there is some pride to be felt for training the juniors pretty well (although I won't take full credit ;)&lt;br /&gt;Today was an ok day in college with plenty of homework waiting for me. Results of mid semesters are coming out one by one. I got 17 + 4 = 21 in a maths test of 25 + 10 = 35 marks. See! I can add! Tutorials are left and Library books have to be returned (not that I read most of them anyways, but they were some source of help.) That reminds me - There are NO good fiction books in the library. What do these IIT R people think - engineers can't read fiction?&lt;br /&gt;Anyways, that's all for today. I'll try and update this tomorrow. Atleast I can make it a diary of my college life....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-5759524276555815640?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/5759524276555815640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=5759524276555815640' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5759524276555815640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/5759524276555815640'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/09/ok.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34173777.post-890571115949697362</id><published>2006-09-11T16:39:00.000+05:30</published><updated>2006-09-11T16:42:52.161+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='first post'/><category scheme='http://www.blogger.com/atom/ns#' term='inauguration'/><title type='text'></title><content type='html'>Ok people. I've finally chosen the template, twiddled with the font colours and uploaded the images and am ready to go! I welcome myself to the online publishing world! (I hope no one reading this blog will feel that I have lost my senses entirely, though I believe I might do so not too long in the future.) Hmmm, I think this is enough for the first post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34173777-890571115949697362?l=www.divye.in' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.divye.in/feeds/890571115949697362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34173777&amp;postID=890571115949697362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/890571115949697362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34173777/posts/default/890571115949697362'/><link rel='alternate' type='text/html' href='http://www.divye.in/2006/09/ok-people.html' title=''/><author><name>Divye Kapoor</name><uri>https://profiles.google.com/107982641425125438404</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-LjQIL_SvUas/AAAAAAAAAAI/AAAAAAAAElw/mA_osUZev_4/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
