<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7677692950499400831</atom:id><lastBuildDate>Wed, 28 Aug 2024 10:00:58 +0000</lastBuildDate><category>technical</category><category>cricket</category><category>eldeco</category><category>india</category><category>eldeco group</category><category>musings</category><category>ananda</category><category>customer</category><category>england</category><category>noida</category><category>programming</category><category>housing</category><category>satisfaction</category><category>tip</category><category>info</category><category>ncr</category><category>properties</category><category>algorithms</category><category>bangladesh</category><category>delhi</category><category>electricity</category><category>freakonomics</category><category>politics</category><category>rahul dravid</category><category>sachin tendulkar</category><category>saurav ganguly</category><category>shame</category><category>utopia</category><category>woes</category><category>Cloud computing</category><category>Nube Tech</category><category>australia</category><category>c-shell</category><category>capitalism</category><category>chak de india</category><category>complaints</category><category>cup</category><category>gdb</category><category>google</category><category>group</category><category>interview</category><category>lifehack</category><category>marketing</category><category>microsoft</category><category>pathetic</category><category>power</category><category>questions</category><category>review</category><category>south africa</category><category>world</category><category>world cup</category><category>C++</category><category>IQ</category><category>KDE</category><category>STL</category><category>ace</category><category>africa.</category><category>airlines</category><category>alumni</category><category>amantran</category><category>amazing</category><category>anada</category><category>answers</category><category>authority</category><category>baisla</category><category>bajaj</category><category>billy colins</category><category>bribe</category><category>business</category><category>case study</category><category>cheating</category><category>communism</category><category>customers</category><category>dance</category><category>david geffen</category><category>debugger</category><category>dhoni</category><category>dinesh kartik</category><category>docs</category><category>donations</category><category>dreams</category><category>driving habits</category><category>fan</category><category>feedback</category><category>fitness</category><category>flat</category><category>four wheeler</category><category>freakonimics</category><category>fuel prices</category><category>gmail</category><category>government</category><category>gujjar</category><category>hbase</category><category>history</category><category>holiday</category><category>industry</category><category>infrastructure</category><category>ingenious</category><category>insight</category><category>intel</category><category>interesting</category><category>joshua bell</category><category>kesar garden</category><category>kevin peitersen</category><category>larry ellison</category><category>learning</category><category>life</category><category>local</category><category>mahatma gandhi</category><category>malaysia</category><category>meena</category><category>mellisa lafsky</category><category>monty panesar</category><category>movie review</category><category>mumbai</category><category>muralitharan</category><category>mythology</category><category>nandini</category><category>new zealand</category><category>nightmare</category><category>north west</category><category>office</category><category>offshoring</category><category>organized</category><category>outlook</category><category>pakistan</category><category>pankaj</category><category>pankaj bajaj</category><category>penang</category><category>princeton</category><category>prj auto services</category><category>real estate</category><category>reservations</category><category>retail</category><category>rural</category><category>scam</category><category>scripting</category><category>sector</category><category>sector 48</category><category>shane warne</category><category>shobhawarrier</category><category>sleep</category><category>smart</category><category>software</category><category>south</category><category>sreesanth</category><category>standford</category><category>stock market</category><category>strength</category><category>suburban</category><category>subway</category><category>support</category><category>supreme court</category><category>tata motors</category><category>telephone</category><category>the wealth report</category><category>thought</category><category>threads</category><category>three wheeler</category><category>ticketless</category><category>train</category><category>trust</category><category>usa today</category><category>vacation</category><category>village</category><category>wall street journal</category><category>washington post</category><category>wastage</category><category>weakness</category><category>west indies</category><category>window manager</category><category>work</category><category>yahoo</category><category>yamuna</category><category>yatch</category><category>zaheer khan</category><category>विचार</category><category>हिंदी</category><title>Musings on life, work and other things</title><description>Life&#39;s like a road that you travel on,&#xa;Sometimes you bend and sometimes you stand,&#xa;Sometimes you turn your head to the wind</description><link>http://ruchir75.blogspot.com/</link><managingEditor>noreply@blogger.com (Ruchir)</managingEditor><generator>Blogger</generator><openSearch:totalResults>78</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-1410402678010399250</guid><pubDate>Tue, 30 May 2017 04:34:00 +0000</pubDate><atom:updated>2017-05-30T10:04:58.709+05:30</atom:updated><title></title><description>&lt;a href=&quot;https://www.goodreads.com/book/show/31416028-bhujia-barons&quot; style=&quot;float: left; padding-right: 20px&quot;&gt;&lt;img border=&quot;0&quot; alt=&quot;Bhujia Barons: The Untold Story of How Haldiram Built a Rs 5000-crore Empire&quot; src=&quot;https://images.gr-assets.com/books/1470838686m/31416028.jpg&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://www.goodreads.com/book/show/31416028-bhujia-barons&quot;&gt;Bhujia Barons: The Untold Story of How Haldiram Built a Rs 5000-crore Empire&lt;/a&gt; by &lt;a href=&quot;https://www.goodreads.com/author/show/15596430.Pavitra_Kumar&quot;&gt;Pavitra Kumar&lt;/a&gt;&lt;br/&gt;
My rating: &lt;a href=&quot;https://www.goodreads.com/review/show/2014183226&quot;&gt;3 of 5 stars&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
Does a good job at describing the start of the Haldiram Empire. The struggle of Haldiram is insightful. But then the book looses its way and becomes a commentary on the legal fights between the various branches of Haldiram family. Dis-coherent at times, the book started of well and ended up in a heap of mess.
&lt;br/&gt;&lt;br/&gt;
&lt;a href=&quot;https://www.goodreads.com/review/list/7554289-ruchir&quot;&gt;View all my reviews&lt;/a&gt;
</description><link>http://ruchir75.blogspot.com/2017/05/bhujia-barons-untold-story-of-how.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-4053927572287516402</guid><pubDate>Mon, 09 Jul 2012 07:30:00 +0000</pubDate><atom:updated>2012-07-09T13:00:58.080+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">c-shell</category><category domain="http://www.blogger.com/atom/ns#">programming</category><category domain="http://www.blogger.com/atom/ns#">technical</category><category domain="http://www.blogger.com/atom/ns#">tip</category><title>Tip: traversing arrays in C-Shell</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Below I have described two methods to traverse arrays in C-Shell - one uses the foreach loop and other while loop.&lt;br /&gt;
In both cases, the important thing to note is that array index in C-shell starts with &#39;1&#39; instead of &#39;0&#39; as in most programming languages, like C, C++, Java, Perl.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;set a = (1 2 3 4)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;set b = (5 6 7 8)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;Method 1 - using the foreach loop, iterating on one array as the foreach index, and the accessing the other array inside the loop body using the index operator &quot;[]&quot;&lt;/b&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;set i = 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;foreach x ( `echo $a` )&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; echo &quot;x = $x b = $b[$i]&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; @ i = $i + 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;end&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Output:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;x = 1 b = 5&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;x = 2 b = 6&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;x = 3 b = 7&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;x = 4 b = 8&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;b style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Method 2 - using the while loop. Iterating on the size of array and accessing both the arrays inside the loop body using the index operator &quot;[]&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;set i = 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;while ($i &amp;lt;= 4)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; echo &quot;a = $a[$i] b = $b[$i]&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; @ i = $i + 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;end&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Output: &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;a = 1 b = 5&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;a = 2 b = 6&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;a = 3 b = 7&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;a = 4 b = 8&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</description><link>http://ruchir75.blogspot.com/2012/07/tip-traversing-arrays-in-c-shell.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-940381110017930100</guid><pubDate>Wed, 15 Feb 2012 16:11:00 +0000</pubDate><atom:updated>2012-02-15T21:42:50.760+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">gdb</category><category domain="http://www.blogger.com/atom/ns#">programming</category><category domain="http://www.blogger.com/atom/ns#">technical</category><title>gdb stops at SIGPIPE</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;background-color: #f6f6f6; color: #9e5205; font: normal normal bold 142%/normal Verdana, sans-serif; letter-spacing: -1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: -webkit-auto;&quot;&gt;

&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div class=&quot;post-header&quot; style=&quot;background-color: #f6f6f6; text-align: -webkit-auto;&quot;&gt;
&lt;div class=&quot;post-header-line-1&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-1010450472006788082&quot; style=&quot;background-color: #f6f6f6; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;By default, gdb captures SIGPIPE of a process and pauses it. However, some program ignores SIGPIPE. So, the default behavour of gdb is not desired when debugging those program. To avoid gdb stopping in SIGPIPE, use the folloing command in gdb:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;handle SIGPIPE nostop noprint pass&lt;/span&gt;&lt;/blockquote&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 15px;&quot;&gt;
&lt;/span&gt;&lt;div style=&quot;font-family: &#39;Trebuchet MS&#39;, Trebuchet, Verdana, sans-serif; font-size: 15px;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><link>http://ruchir75.blogspot.com/2012/02/gdb-stops-at-sigpipe.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-2146596701755318787</guid><pubDate>Wed, 02 Nov 2011 10:22:00 +0000</pubDate><atom:updated>2011-11-02T15:53:22.038+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">musings</category><title>Parenting</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, sans-serif; font-size: 13px; line-height: 16px; &quot;&gt;Interesting insight on this blog entry in Freakonimics - http://freakonomics.blogs.nytimes.com/2010/07/07/the-paradox-of-parenting/ &lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, sans-serif; font-size: 13px; line-height: 16px; &quot;&gt;The crux is that parent&#39;s don&#39;t seem to enjoy parenting is a strange conclusion made by almost all studies in this field. I am not sure I fully subscribe to this theory as I oscillate between happiness and despair when parenting. Maybe its more despair than happiness, but one thing I am sure about it is that happiness definitely has a longer lasting effect than despair.&lt;/span&gt;&lt;/div&gt;</description><link>http://ruchir75.blogspot.com/2011/11/parenting.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-7861875970732094000</guid><pubDate>Wed, 02 Nov 2011 10:22:00 +0000</pubDate><atom:updated>2011-11-02T15:52:47.962+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">musings</category><category domain="http://www.blogger.com/atom/ns#">tip</category><title>Accomplishment is important</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, sans-serif; font-size: 13px; line-height: 16px; &quot;&gt;Not losing focus is the key. It’s about switching your focus from quantity to quality, and making sure that you use your productivity for a greater good: reaching your goals. Wonderful insights at http://workawesome.com/productivity/being-productive/&lt;/span&gt;</description><link>http://ruchir75.blogspot.com/2011/11/accomplishment-is-important.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-243215541511159786</guid><pubDate>Wed, 02 Nov 2011 10:21:00 +0000</pubDate><atom:updated>2011-11-02T15:52:12.122+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">tip</category><title>Tips for remembering and organizing ideas</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, sans-serif; font-size: 13px; line-height: 16px; &quot;&gt; Use a pocket recorder and record the thoughts. Musicians do it all the time.&lt;/span&gt;</description><link>http://ruchir75.blogspot.com/2011/11/tips-for-remembering-and-organizing.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-6268232602185381195</guid><pubDate>Sat, 10 Sep 2011 16:14:00 +0000</pubDate><atom:updated>2011-09-10T21:45:58.290+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Cloud computing</category><category domain="http://www.blogger.com/atom/ns#">hbase</category><category domain="http://www.blogger.com/atom/ns#">Nube Tech</category><title>Crux for HBase</title><description>new reporting application for BigData based on HBase  - Crux&lt;div&gt;&lt;a href=&quot;http://nubetech.co/crux-hbase&quot;&gt;http://nubetech.co/crux-hbase&lt;/a&gt;&lt;/div&gt;</description><link>http://ruchir75.blogspot.com/2011/09/crux-for-hbase.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-7998112401194142094</guid><pubDate>Sat, 10 Sep 2011 15:59:00 +0000</pubDate><atom:updated>2011-09-10T21:34:09.063+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">musings</category><title>Who are you?</title><description>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 11px; line-height: 14px; background-color: rgb(255, 255, 255); &quot;&gt;someone who follows rules and also believes in the them is Ram. Some who follows rules but does not believe them is Duryodhana. &lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;lucida grande&#39;, tahoma, verdana, arial, sans-serif; font-size: 11px; line-height: 14px; background-color: rgb(255, 255, 255); &quot;&gt;one who believes in rules but breaks them is Krishna, one who neither believes in rules nor follows them is Ravan. Who are you?&lt;/span&gt;&lt;/div&gt;</description><link>http://ruchir75.blogspot.com/2011/09/who-are-you.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-7512701565235759495</guid><pubDate>Mon, 14 Feb 2011 06:25:00 +0000</pubDate><atom:updated>2011-02-14T12:05:04.148+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">debugger</category><category domain="http://www.blogger.com/atom/ns#">gdb</category><category domain="http://www.blogger.com/atom/ns#">technical</category><title>gdb: script</title><description>Recently I discovered the easy way of debugging in gdb - GDB scripting. Often while debugging I got stuck wondering what the value of an item in a complex data structure was. Till a few days ago, I used to modify the code to add debug messages and then recompile and then rerun. This wasted a lot of time.&lt;br /&gt;Then one day after having wasted a lot of time, in recompile and rerun, I decided to use GDB scripts (which I had known since long, but had never used). And it is really fun now. I save a lot of time in debugging.&lt;br /&gt;A sample script that I used to count the number of elements in a linked list (which we use a lot in our code) is below:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;define cntList&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;  set $l = $arg0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;  set $i = 0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;  if ($l == 0)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;    printf &quot;NULL list found\n&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;  else&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   set $n = $l&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   while ($n != 0)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;     set $i = $i+1&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;     set $n = $n-&gt;next&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;   end&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;  end&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;  printf &quot;list size %d\n&quot;, $i&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;end&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;document cntList&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;count the number of elements in the list&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;Usage: cntList &lt;dbslist&gt;&lt;/dbslist&gt;&lt;/span&gt;ptr&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;end&lt;/span&gt;&lt;/span&gt;</description><link>http://ruchir75.blogspot.com/2011/02/gdb-script.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-7401880230671956015</guid><pubDate>Tue, 14 Dec 2010 17:41:00 +0000</pubDate><atom:updated>2010-12-14T23:19:27.382+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Cloud computing</category><category domain="http://www.blogger.com/atom/ns#">Nube Tech</category><category domain="http://www.blogger.com/atom/ns#">technical</category><title>Nube Technologies in news</title><description>&lt;a href=&quot;http://in.linkedin.com/in/sonalgoyal&quot;&gt;Sonal&#39;s&lt;/a&gt; company &lt;a href=&quot;http://www.nubetech.co&quot;&gt;Nube Technologies&lt;/a&gt; (earlier known as Meghsoft) found mention in &lt;a href=&quot;http://www.quora.com/What-companies-other-than-Cloudera-are-betting-on-Hadoop/answer/Jeff-Hammerbacher&quot;&gt;this post&lt;/a&gt; about companies and start ups working in Cloud Computing from &lt;a href=&quot;http://www.linkedin.com/in/jhammerb&quot;&gt;Jeff Hammerbacher&lt;/a&gt;.&lt;br /&gt;Way to go Sonal!!</description><link>http://ruchir75.blogspot.com/2010/12/nube-technologies-in-news.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-5200635256594919414</guid><pubDate>Mon, 26 Jul 2010 05:17:00 +0000</pubDate><atom:updated>2010-07-26T10:49:37.991+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">KDE</category><category domain="http://www.blogger.com/atom/ns#">technical</category><category domain="http://www.blogger.com/atom/ns#">window manager</category><title>Unable to move windows in KDE</title><description>Many times I have faced a problem where I am not able to move or resize windows in a KDE session. So must have you and wondered how to fix it.&lt;br /&gt;&lt;br /&gt;Now there is help available to fix this issue:&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;    kwin -replace&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;will replace the window manager and voila you can now resize and/or move the windows in KDE</description><link>http://ruchir75.blogspot.com/2010/07/unable-to-move-windows-in-kde.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-3146141706024796429</guid><pubDate>Wed, 14 Jul 2010 05:52:00 +0000</pubDate><atom:updated>2010-07-14T11:27:14.877+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">c-shell</category><category domain="http://www.blogger.com/atom/ns#">programming</category><category domain="http://www.blogger.com/atom/ns#">scripting</category><category domain="http://www.blogger.com/atom/ns#">technical</category><title>using sed in alias in C shell</title><description>Using sed commands in your .alias file in C shell is always tricky. One example of the same is:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;;font-family:trebuchet ms;font-size:85%;&quot;  &gt;alias grf &#39;set fileNline = `echo &quot;\!*&quot; | sed -e &quot;s/\([^ ]*\):\([0-9]*\):.*/+\2 \1/&quot;`;gvim $fileNline&#39;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This alias is called as:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;;font-family:trebuchet ms;font-size:85%;&quot;  &gt;grf file:line_num:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and then it open the file &quot;file&quot; in gvim with cursor at line &quot;line_num&quot;.</description><link>http://ruchir75.blogspot.com/2010/07/using-sed-in-alias-in-c-shell.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-1030596728332137985</guid><pubDate>Fri, 09 Jul 2010 04:58:00 +0000</pubDate><atom:updated>2010-07-09T10:28:28.461+05:30</atom:updated><title>Accomplishment is important</title><description>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;&lt;p&gt;Not losing focus is the key. It’s about switching your focus from quantity to quality, and making sure that you use your productivity for a greater good: reaching your goals. Wonderful insights at &lt;a href=&#39;http://workawesome.com/productivity/being-productive/&#39;&gt;http://workawesome.com/&lt;wbr/&gt;productivity/being-productive/&lt;/a&gt;&lt;/p&gt;in reference to: &lt;a href=&#39;http://www.google.com/ig?hl=en&amp;amp;source=iglk&#39;&gt;iGoogle&lt;/a&gt; (&lt;a href=&#39;http://www.google.com/sidewiki/entry/101572090631977474386/id/rsict0xaRCIx_ulJ-Z8USg-MGuE&#39;&gt;view on Google Sidewiki&lt;/a&gt;)&lt;/div&gt;</description><link>http://ruchir75.blogspot.com/2010/07/accomplishment-is-important.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-1779259079233105018</guid><pubDate>Wed, 07 Jul 2010 18:34:00 +0000</pubDate><atom:updated>2010-07-08T00:04:23.893+05:30</atom:updated><title>Parenting</title><description>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;&lt;p&gt;Interesting insight on this blog entry in Freakonimics - &lt;a href=&#39;http://freakonomics.blogs.nytimes.com/2010/07/07/the-paradox-of-parenting/&#39;&gt;http://freakonomics.blogs.&lt;wbr/&gt;nytimes.com/2010/07/07/the-&lt;wbr/&gt;paradox-of-parenting/&lt;/a&gt;&lt;br/&gt;The crux is that parent&#39;s don&#39;t seem to enjoy parenting is a strange conclusion made by almost all studies in this field. I am not sure I fully subscribe to this theory as I oscillate between happiness and despair when parenting. Maybe its more despair than happiness, but one thing I am sure about it is that happiness definitely has a longer lasting effect than despair.&lt;/p&gt;in reference to: &lt;a href=&#39;http://www.google.com/ig?hl=en&amp;amp;source=iglk#max98&#39;&gt;iGoogle&lt;/a&gt; (&lt;a href=&#39;http://www.google.com/sidewiki/entry/101572090631977474386/id/ACGxcCBw3zTY-hUJ1tER3lZQuNM&#39;&gt;view on Google Sidewiki&lt;/a&gt;)&lt;/div&gt;</description><link>http://ruchir75.blogspot.com/2010/07/parenting.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-1905837288644486044</guid><pubDate>Tue, 18 May 2010 10:19:00 +0000</pubDate><atom:updated>2010-05-18T15:53:54.620+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">insight</category><category domain="http://www.blogger.com/atom/ns#">learning</category><category domain="http://www.blogger.com/atom/ns#">mythology</category><title>How organizations are scared of talent</title><description>Recently got the following mail which uses a story from Hindu mythology to analyze corporate behavior.&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;Rishi Ashtavakra was called Ashtavakra because his body was deformed and  twisted in eight areas. He was cursed by his own father, Kahoda. While  he  was in his mother&#39;s womb, he had overheard his father converse with his  mother on the nature of Vedic truths as expressed in various Vedic  hymns. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;Even before he was born, he had understood the secrets of Vedic  hymns so well that one day, from his mother&#39;s womb, he spoke and  corrected his father. &quot;Perhaps,&quot; he said, &quot;the same hymn can be  interpreted in this way, father.&quot; Rather than being appreciative of his  son, the father was annoyed. &quot;May this over-smart child of mine be born  deformed with eight twists in his body,&quot; said the father. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;  Kahoda went to the court of king Janaka to participate in a public  debate. The condition of the debate was that the loser had to die.  Kahoda, who thought greatly of his wisdom, participated in the  competition but he lost the debate to a sage called Bandi and was forced  to kill himself. When Ashtavakra grew up and learnt about the&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;   fate of his father, he decided to participate in the same public debate  in Janaka&#39;s court. &lt;/span&gt;&lt;br /&gt;  &lt;span style=&quot;font-family: courier new;&quot;&gt;He won the competition and Bandi was forced to bring Ashtavakra&#39;s  father back to life. Thus Ashtavakra not only avenged his father&#39;s  humiliation, he also brought his father back to life. Janaka commented  that Kahoda was lucky to have a son as brilliant as Ashtavakra. To this  Ashtavakra said, &quot;While you, Janaka, appreciate my wisdom, that very  same wisdom had made my father insecure.&quot; &lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt;  This ancient story draws attention to the envy of the father for his  son, or the envy of a teacher for his student. Kahoda is the boss, the  coach, the mentor, who nurtures talent under him. Ashtavakra represents  that unusually bright student one sometimes gets to coach or mentor. It  takes a lot of self-assurance for a mentor to admit that the student is  better than him. By the law of averages, such brilliant students are few  and far between and when they make&lt;/span&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; themselves known they usually face great hostility from those around  them and especially the mentor. Few mentors like Janak can handle a  student who is better than them.&lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style=&quot;font-family: courier new;&quot;&gt; The best minds come to his court and thrive. In a world of  corporations, when a junior can overtake his senior, coaches and mentors  are often threatened by team members. The result is an organization  which is full of many more Kahodas than Janakas, to the detriment of  Ashtavakra. Organizations have to constantly ensure that leaders are  more like Janakas and less like Kahoda because the future fate of the organization depends on the brilliance of Ashtavakras&lt;/span&gt;&lt;/div&gt;</description><link>http://ruchir75.blogspot.com/2010/05/how-organizations-are-scared-of-talent.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-4552598464662147187</guid><pubDate>Sat, 16 Jan 2010 03:41:00 +0000</pubDate><atom:updated>2010-01-16T10:22:49.613+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">fuel prices</category><category domain="http://www.blogger.com/atom/ns#">government</category><category domain="http://www.blogger.com/atom/ns#">politics</category><title>Fuel subsidy in India</title><description>Read an interesting comment from the Minister of State for Oil &amp;amp; Gas Mr. Jitin Prasada in today&#39;s Economic Times (Delhi  -&lt;br /&gt;&lt;blockquote style=&quot;font-style: italic;&quot;&gt;&quot;Those who can afford it should pay the full fuel price&quot;&lt;/blockquote&gt;Noble thought. Difficult or maybe impossible to implement across the country. But how about implementing it for just the Government (including State Govts) and its organizations. The Govt organizations raises tenders for fuel supply for its vehicles and whosoever is the lowest bidder, gets the contract for fuel supply. So the total requirement is always known. Instead of paying the bidder by the prevailing (subsidized) market rate, why not pay the bidder by the unsubsidized market rate.&lt;br /&gt;Lets see if it makes sense or not.&lt;br /&gt;&lt;a href=&quot;http://in.news.yahoo.com/32/20100115/1059/tbs-govt-picks-only-half-of-home-fuel-su.html&quot;&gt; This news article&lt;/a&gt; says that the first three quarters of FY 09-10, the petroleum ministry demanded a subsidy of  Rs 20,872 crore to take care for the losses of three Oil &amp;amp; Gas PSUs. Extrapolating the annual subsidy could be assumed to be around Rs 28,000 crore.&lt;br /&gt;Govt of India have more than 50 lakh employees assuming an average of 1 car per 10 employees, the Govt will have around 5,00,000 cars. A typical govt official&#39;s car will run for around 40,000 kms per year (including transit from office to home and tours). Assuming a mileage of a 6kms (ambassadors won&#39;t give more than that). Diesel cost would be&lt;br /&gt;500000 * 6700 * 36 = Rs 12060 Crores.&lt;br /&gt;&lt;br /&gt;Difference between actual and subsidized price of diesel varies depending on the global crude price. At the price of $75 the loss for Oil companies on Diesel was around Rs 9/litre.&lt;br /&gt;So if the Govt were to buy the fuel at market rate the loss of Oil companises will be reduced by around Rs 3000 Crores which is more than 10% of the annual loss.&lt;br /&gt;&lt;br /&gt;To me this seems a good way to reduce the subsidy bill.</description><link>http://ruchir75.blogspot.com/2010/01/fuel-subsidy-in-india.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-8762877968927148483</guid><pubDate>Tue, 15 Dec 2009 16:19:00 +0000</pubDate><atom:updated>2009-12-15T21:52:23.142+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">microsoft</category><category domain="http://www.blogger.com/atom/ns#">office</category><category domain="http://www.blogger.com/atom/ns#">outlook</category><category domain="http://www.blogger.com/atom/ns#">tip</category><title>Using Outlook&#39;s After Sending rules</title><description>&lt;span class=&quot;headline&quot;&gt;Found this interesting post to configure Outlook to complete the thread view. By default the thread does not show your mails. So in effect it has a lot of information missing.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.outlookpower.com/issues/issue200503/00001512001.html&quot;&gt;Using Outlook&#39;s After Sending rules&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;</description><link>http://ruchir75.blogspot.com/2009/12/using-outlooks-after-sending-rules.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-6930999845126548867</guid><pubDate>Fri, 08 May 2009 06:56:00 +0000</pubDate><atom:updated>2009-05-08T12:38:05.951+05:30</atom:updated><title>Improve Microsoft Outlook Performance</title><description>I have been facing a big slowdown in performing any actions in MS Outlook - be it reading mails, trying to reply. Then I found that my personal mail folder was around 3.5GB and I have only 512MB of RAM on my laptop (I know its primitive) so most of time Windows was doing paging.&lt;br /&gt;Then I found this brilliant article &lt;a href=&quot;http://www.webgrrls.com/blog/2008/03/11/improve-microsoft-outlook-performance/&quot;&gt;Improve Microsoft Outlook Performance&lt;/a&gt; on how to have more than one personal mail folders. Ever since I created a new data file, using Outlook is much less painful.</description><link>http://ruchir75.blogspot.com/2009/05/improve-microsoft-outlook-performance.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-5178539208337642429</guid><pubDate>Sat, 25 Apr 2009 07:09:00 +0000</pubDate><atom:updated>2009-04-27T13:11:50.227+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">programming</category><category domain="http://www.blogger.com/atom/ns#">technical</category><title>Ways to extract data from a space delimited string</title><description>Ways to tokenize a string if you cannot use the space character as a field delimiter in an input where the fields can have spaces:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. create the input with the delimiter as some other character as the delimiter. The delimiter character should be non-printable. This would reduce its chances of occuring in the input and thus reduce handling of special cases.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. If the input was generated with space as the delimiter then we have a problem at hand. For such cases there are two approaches and both require the knowledge of the format of the input. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If the format of the input is known then one can use regular expressions to search for the tokens in the string. (Typical scripting languages, like &lt;a href=&quot;http://www.perl.org/&quot;&gt;Perl&lt;/a&gt;, &lt;a href=&quot;http://www.tcl.tk/&quot;&gt;TCL&lt;/a&gt; support &lt;a href=&quot;http://en.wikipedia.org/wiki/Regular_expression&quot;&gt;regular expressions&lt;/a&gt;. C++ user can use the &lt;a href=&quot;http://www.blogger.com/www.boost.org&quot;&gt;Boost&lt;/a&gt; library for regular expression support). &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However using regular expressions can be expensive if the number of searches during the program execution are large. So these can be used only when the number of searches are small.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For programs that do such search more often, let us understand the other approach using an example:&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;  // input format: &lt;int&gt; &lt;string&gt; &lt;int&gt;&lt;br /&gt;&lt;/int&gt;&lt;/string&gt;&lt;/int&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;char* inputStr = &quot;12 abc def 14&quot;;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;  char* firstSpaceChar = strchr(inputStr, &#39; &#39;);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int firstInt = 0;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;int lastInt = 0;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;string midStr = &quot;&quot;;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if (firstSpaceChar != NULL) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;*firstSpaceChar = &#39;\0&#39;;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;firstInt = atoi(inputStr);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;char* lastSpaceChar = strrchr(firstSpaceChar+1, &#39; &#39;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;if (lastSpaceChar != NULL) {&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;      &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;lastInt = atoi(lastSpaceChar+1);&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;      *&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;lastSpaceChar = &#39;\0&#39;;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;midStr = firstSpaceChar+1;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;} else {&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;    midStr = inputStr;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;  }&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;courier new&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://ruchir75.blogspot.com/2009/04/ways-to-extract-data-from-space.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-7825564635424870164</guid><pubDate>Fri, 31 Oct 2008 13:43:00 +0000</pubDate><atom:updated>2008-10-31T19:21:38.444+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">programming</category><category domain="http://www.blogger.com/atom/ns#">threads</category><title>Tech: How to find the existence of a thread</title><description>&lt;span style=&quot;font-family:arial;&quot;&gt;To find if a thread created using pthread_create exists or not use phread_kill with signal number 0&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;on the thread that needs to be tested. If the return value is 0, then the thread is alive.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;If the return value is ESRCH, then the thread is not alive in the system.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Sample code may look like:&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;bool is_thread_alive(pthread_t thread_id)&lt;br /&gt;{&lt;br /&gt; int status = pthread_kill(thread_id, 0);&lt;br /&gt; if (status == ESRCH)&lt;br /&gt;     return true;&lt;br /&gt; else&lt;br /&gt;     return false;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;</description><link>http://ruchir75.blogspot.com/2008/10/tech-how-to-find-existence-of-thread.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-527498297921824177</guid><pubDate>Tue, 25 Mar 2008 10:37:00 +0000</pubDate><atom:updated>2008-03-25T16:25:55.188+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">C++</category><category domain="http://www.blogger.com/atom/ns#">programming</category><category domain="http://www.blogger.com/atom/ns#">STL</category><category domain="http://www.blogger.com/atom/ns#">technical</category><title>STL: find in a list of pointers</title><description>Most STL tutorials will not help you solve this problem:&lt;br /&gt;How to search in a list of pointers?&lt;br /&gt;&lt;span style=&quot;font-family:courier new;&quot;&gt;e.g vector&lt;&#39;obj*&#39;&gt;myList;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:georgia;&quot;&gt;The &lt;em&gt;find&lt;/em&gt; alogrithm on this will match only the pointer address and if you do not share your objects between classes then your find will always fail as &lt;em&gt;it matches only the pointer addresses and not the value to which it points&lt;/em&gt;.&lt;br /&gt;To fix this problem, the solutions that can be considered are:&lt;br /&gt;1. store objects instead of pointers in the list. (huge memory overhead!!)&lt;br /&gt;2. use &lt;em&gt;find_if&lt;/em&gt; instead of &lt;em&gt;find&lt;/em&gt; and write a &lt;em&gt;functor&lt;/em&gt; which compares value instead of pointer address&lt;br /&gt;3. Overload &lt;em&gt;find&lt;/em&gt; and implement your own comparator in it. This comparator again compares the value instead of pointer address.&lt;br /&gt;&lt;/span&gt;</description><link>http://ruchir75.blogspot.com/2008/03/stl-find-in-list-of-pointers.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-1102064378274996302</guid><pubDate>Sat, 08 Mar 2008 11:31:00 +0000</pubDate><atom:updated>2008-04-08T17:49:57.720+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">technical</category><title>The basics of Technology Mapping in Digital Circuits</title><description>1. Generate the truth table of a given boolean expression&lt;br /&gt;2. Represent the expression in terms of minterms&lt;br /&gt;3. Convert each component into one of the cells of technology map.&lt;br /&gt;&lt;br /&gt;Example 1:&lt;br /&gt;a 8x1 multiplexer using a 2x1 mux:&lt;br /&gt;8x1 --&gt; a&#39;b&#39;c&#39;I0 + a&#39;b&#39;cI1 +a&#39;bc&#39;I2 + a&#39;bcI3 + ab&#39;c&#39;I4 + ab&#39;cI5 + abc&#39;I6 + abcI7&lt;br /&gt;       ==&gt; a&#39;(b&#39;c&#39;I0 + b&#39;cI1 + bc&#39;I2 + bcI3) + a(b&#39;c&#39;I4 + b&#39;cI5 + bc&#39;I6 + bcI7)&lt;br /&gt;       ==&gt; a&#39;(b&#39;(c&#39;I0 + cI1) + b(c&#39;I2 + cI3)) + a(b&#39;(c&#39;I4 + cI5) + b(c&#39;I6 + cI7))&lt;br /&gt;       ==&gt; a&#39;(b&#39;M1 + bM2) + a(b&#39;M3 + bM4)&lt;br /&gt;       ==&gt; a&#39;M5 + aM6&lt;br /&gt;       ==&gt; M7&lt;br /&gt;&lt;br /&gt;Example 2:&lt;br /&gt;AND gate using a 2x1 mux:&lt;br /&gt;AB --&gt; AB + A&#39;0&lt;br /&gt;So the mux will have A as the select line and B on select 1 and tie 0 on select 0&lt;br /&gt;&lt;br /&gt;Example 3:&lt;br /&gt;OR gate using a 2x1 mux:&lt;br /&gt;A + B ==&gt; 1(A + B)&lt;br /&gt;           ==&gt; (A + A&#39;)(A + B)&lt;br /&gt;           ==&gt; AA + AB + A&#39;A + A&#39;B&lt;br /&gt;           ==&gt; A + AB + A&#39;B&lt;br /&gt;           ==&gt; A(1 + B) + A&#39;B&lt;br /&gt;           ==&gt; A1 + A&#39;B&lt;br /&gt;So the mux will have A as the select line and tie 1 on select 1 and B on select 0</description><link>http://ruchir75.blogspot.com/2008/03/basics-of-technology-mapping-in-digital.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-4164098643455893761</guid><pubDate>Wed, 05 Mar 2008 12:09:00 +0000</pubDate><atom:updated>2008-03-05T17:58:50.583+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">docs</category><category domain="http://www.blogger.com/atom/ns#">google</category><title>the awesome GoogleLookUp function</title><description>Got this from a &lt;a href=&quot;http://www.readwriteweb.com/archives/googlelookup_wow.php&quot;&gt;ReadWriteWeb&lt;/a&gt;:&lt;br /&gt;Try the following on a google spreadsheet&lt;br /&gt;1. Create a Google Spreadsheet&lt;br /&gt;2. Tape &quot;bmw&quot; in A2, &quot;mercedes&quot; in A3 and &quot;nissan&quot; in A4&lt;br /&gt;3. Select A2:A4 and, while holdind the Ctrl key, expand your selection until A50.&lt;br /&gt;4. Say &quot;wow&quot;&lt;br /&gt;5. Tape &quot;employees&quot; from B2 to B50.&lt;br /&gt;6. Enter &quot;=googlelookup(A2; B2)&quot; in C2 and expand the formula until C50&lt;br /&gt;7. &quot;wow&quot;, again&lt;br /&gt;8. Take a look at other Google functions in the &quot;Google&quot; tab of this page: http://documents.google.com/support/spreadsheets/bin/answer.py?answer=82712&amp;amp;ctx=&lt;br /&gt;10. &quot;wow&quot;, again and again</description><link>http://ruchir75.blogspot.com/2008/03/awesome-googlelookup-function.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-9123674202820252858</guid><pubDate>Wed, 27 Feb 2008 09:27:00 +0000</pubDate><atom:updated>2008-02-27T15:00:43.587+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">eldeco</category><category domain="http://www.blogger.com/atom/ns#">utopia</category><title>Eldeco never seizes to amaze - update</title><description>Update on my earlier blog entry &lt;a href=&quot;http://ruchir75.blogspot.com/2008/01/eldeco-never-seizes-to-amaze.html&quot;&gt;Eldeco never seizes to amaze&lt;/a&gt;&lt;br /&gt;The suffering reader says again:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;They are constantly trying to exploit the situation. I am trying to post my experience with them, in the internet which would help others to take right decisions choosing the property. Even after 4 years, they have not given me offer of possession and saying that I have to pay holding charges for 1.5 years to process the handover.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;May God bring some sanity in Eldeco.</description><link>http://ruchir75.blogspot.com/2008/02/eldeco-never-seizes-to-amaze-update.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7677692950499400831.post-8874450887273667154</guid><pubDate>Sat, 02 Feb 2008 17:06:00 +0000</pubDate><atom:updated>2008-02-02T22:40:42.691+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">driving habits</category><category domain="http://www.blogger.com/atom/ns#">musings</category><title>You know you are driving in India</title><description>Recently got a mail about driving habits in India.&lt;br /&gt;&lt;br /&gt;You know you are driving in India if ...&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;People in cars think they are conserving their battery by not using the turn signals.&lt;/li&gt;&lt;li&gt;The side-view mirrors always remain folded in, lest they come in the way of the car&#39;s aerodynamics.&lt;/li&gt;&lt;li&gt;The cellophane/plastic covers on seats and headrests remain in place even after the car is a year old.&lt;/li&gt;&lt;li&gt;The right of way belongs to the bigger vehicle.&lt;/li&gt;&lt;li&gt;Pedestrians are unnecessary objects on the roads that need to be honked out of existence, if possible.&lt;/li&gt;&lt;li&gt;The slowest moving tractor is invariably be on the fast lane.&lt;/li&gt;&lt;li&gt;The truck in front of you has both the driver and the cleaner waving their hands out of the right and left window at the same time.&lt;/li&gt;&lt;li&gt;The &quot;L&quot; sign adorns vehicles that are speeding past you.&lt;/li&gt;&lt;li&gt;The traffic light at a junction is showing red, amber and green at the same time.&lt;/li&gt;&lt;li&gt;The bus driver wanting to take a right turn at a traffic junction moves to the extreme left lane, picks up a passenger and cuts directly in front of all the right lanes to take his right turn.&lt;/li&gt;&lt;li&gt;Your first new car scratch &quot;happens&quot; within 30 minutes or 100 metres of driving out of the showroom, whichever is less; first new car dent within 10 days or 1000 km, whichever is less.&lt;/li&gt;&lt;li&gt;You have an accident while driving at less than 20 km/hour or less (you are lucky if you can get up to triple that speed these days!)&lt;/li&gt;&lt;li&gt;Every fifth car you pass has a saree pallu or dupatta peeking out the bottom of the passenger side door.&lt;/li&gt;&lt;li&gt;The number of milk cans on any given Royal Enfield motorcycle is an even number greater than 5.&lt;/li&gt;&lt;li&gt;You have an accident and ask the truck driver to produce his license and he tells you casually that it was confiscated by the police some 20 years back near Jhumri talaiya.&lt;/li&gt;&lt;li&gt;For every bull you see standing on the road right in front of you, there are five cows approaching you from either left or right. And the cow dung under your car is really bull shit!&lt;/li&gt;&lt;li&gt;The five trucks you overtake on a given road have the following five messages on their backside - &quot;HORUN PLASE&quot;, &quot;HURN PLEESE&quot;, &quot;HOUR PLISS&quot;, &quot;HARN PLECE&quot; and &quot;HORNY PLACE&quot;.&lt;/li&gt;&lt;li&gt;The bus in front of you is listing heavily to the left (the door side) and a whole family is hanging on to the door by one hand.&lt;/li&gt;&lt;li&gt;The number of passengers in a car is indirectly proportional to the size of the car - a Merc or a BMW will have a lone occupant, a Maruti 800 a family of 10 plus the neighbours.&lt;/li&gt;&lt;li&gt;The lane divider is seen as something you use to guide yourself while driving on the wrong side of the road.&lt;/li&gt;&lt;li&gt;The speed breaker height is universally one and a half times the ground clearance of your vehicle. The only exception is if you are behind the wheel of a Tata truck.&lt;/li&gt;&lt;li&gt;The road on either side of a railway crossing is fully occupied by vehicles of 17 types, with each one pointed directly at another one on the other side of the railway crossing.&lt;/li&gt;&lt;li&gt;The average distance between vehicles going one way is a safe 2.345 cm and the same statistic for vehicles going in opposite directions is a highly conservative 3.987 cm.&lt;/li&gt;&lt;li&gt;The headlights of every vehicle are defaulted to the high beam mode, since this is a clear sign of manliness and machismo. If a vehicle is not able to drive with its high beams on, it has no rights to unhindered driving on the road.&lt;/li&gt;&lt;li&gt;The road may have a length, but no fixed width. Every road is a many-shouldered thing - you drive on the road, but when you can&#39;t, you drive on the shoulder; when you can&#39;t on the shoulder, there is the shoulder&#39;s shoulder, and so on. It is only after you have scraped the wall of the house on the edge of the road that you start considering the remote possibility of slowing down and nosing your way back towards the centre. Of course, real men don&#39;t do this - they just take the wall along with them.&lt;/li&gt;&lt;/ol&gt;</description><link>http://ruchir75.blogspot.com/2008/02/you-know-you-are-driving-in-india.html</link><author>noreply@blogger.com (Ruchir)</author><thr:total>0</thr:total></item></channel></rss>