<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Dreams of Thought</title>
	
	<link>http://gingerjoos.com/blog</link>
	<description>Are dreams thoughts... or are thoughts dreams..</description>
	<lastBuildDate>Sun, 18 Jul 2010 13:05:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/DreamsOfThought" /><feedburner:info uri="dreamsofthought" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license><item>
		<title>Movie review : Inception</title>
		<link>http://feedproxy.google.com/~r/DreamsOfThought/~3/SahZD3SSQPY/movie-review-inception</link>
		<comments>http://gingerjoos.com/blog/films/movie-review-inception#comments</comments>
		<pubDate>Sun, 18 Jul 2010 12:00:39 +0000</pubDate>
		<dc:creator>Anirudh</dc:creator>
				<category><![CDATA[films]]></category>
		<category><![CDATA[christopher nolan]]></category>
		<category><![CDATA[inception]]></category>

		<guid isPermaLink="false">http://gingerjoos.com/blog/?p=323</guid>
		<description><![CDATA[So I watched Inception today and here&#8217;s the once sentence verdict &#8211; You have to watch this one. First, the trailer - I&#8217;ve been a fan of Christopher Nolan ever since I saw Memento. This one has only strengthened the respect I have felt for him. In Inceptionhe deals with a powerful subject &#8211; Dreams. [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>So I watched Inception today and here&#8217;s the once sentence verdict &#8211; You <strong>have</strong> to watch this one. First, the trailer -</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/mmkQ7fw-l0g&amp;hl=en_US&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/mmkQ7fw-l0g&amp;hl=en_US&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>I&#8217;ve been a fan of <a href="http://en.wikipedia.org/wiki/Christopher_Nolan">Christopher Nolan</a> ever since I saw <a href="http://en.wikipedia.org/wiki/Memento_(film)">Memento</a>. This one has only strengthened the respect I have felt for him. In <a href="http://en.wikipedia.org/wiki/Inception_%28film%29">Inception</a>he deals with a powerful subject &#8211; Dreams. Cobb (Leonardo Di Caprio) is a thief who uses dreams. He creates a world in his victim&#8217;s dreams and the victim populates it with his subconsciousness. By designating certain areas or objects as safe zones, he forces the victim to automatically store their innermost secrets in that place. He then proceeds to steal that idea. Now instead of stealing an idea, he&#8217;s asked to implant one &#8211; an Inception &#8211; in exchange for being able to go back to his kids.</p>
<p>Do not expect to sit back and enjoy the movie mindlessly. Christopher Nolan will push your brain. He&#8217;ll make you think. You have to let your mind run with the idea to enjoy the movie thoroughly. Imagine the sheer power of the concept he&#8217;s explaining here. The story is superb &#8211; I hope somebody writes a book with this theme if they haven&#8217;t already. It isn&#8217;t complicated enough for you to not understand it. But you have to sit down and watch this one with some concentration. It&#8217;s written brilliantly. It&#8217;s no mean task to make the audience comfortable with a complex concept and then run the rest of the film based on it. It&#8217;s a tribute to his skill that Nolan is able to pull this off in an entertaining manner. The film is not slow or dull even in some parts &#8211; it runs pretty tight throughout. The last few minutes particularly make for edge of the seat watching.</p>
<p>The ending in itself is a masterpiece. The last few seconds of the movie in itself is so perfect. He does not intend the audience to forget the movie after they come out of the theatre. By leaving a crucial point to his audience&#8217;s imagination he has made a master stroke. The 4th level dream introduces some twists to the story line in the last few moments &#8211; but in the hands of Nolan it doesn&#8217;t seem forced or artificial. Lesser directors would&#8217;ve fumbled there.</p>
<p>The performances by the actors leave no room for complaints. Leonardo di Caprio makes for an excellent leading man with a brilliant but troubled mind portrayed effectively. <a href="http://en.wikipedia.org/wiki/Marion_Cotillard">Marion Cotillard</a> plays Cobb&#8217;s wife Mal. The other main characters have been brilliantly played by <a href="http://en.wikipedia.org/wiki/Ellen_Page">Ellen Page</a>, <a href="http://en.wikipedia.org/wiki/Tom_Hardy">Tom Hardy</a> and <a href="http://en.wikipedia.org/wiki/Ken_Watanabe">Ken Watanabe</a>. Nolan regular <a href="http://en.wikipedia.org/wiki/Michael_Caine">Michael Caine</a> makes a short but well handled performance.</p>
<p>Music by <a href="http://en.wikipedia.org/wiki/Hans_Zimmer">Hans Zimmer</a> stands out. The theme manages to convey the tension and the disturbance of the movie.</p>
<p><div class="hreview">
  <span class="item">
    <span class="fn">Inception–</span>
  </span>
  <span class="rating">
    Rating: 
      <span class="value">9.5</span>
    out of 
      <span class="best">10</span>
  </span>
</div>
</p>


<p>No related posts.</p><img src="http://feeds.feedburner.com/~r/DreamsOfThought/~4/SahZD3SSQPY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://gingerjoos.com/blog/films/movie-review-inception/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://gingerjoos.com/blog/films/movie-review-inception</feedburner:origLink></item>
		<item>
		<title>What not to do when you are sleepy</title>
		<link>http://feedproxy.google.com/~r/DreamsOfThought/~3/CYQEQHp3HOQ/what-not-to-do-when-you-are-sleepy</link>
		<comments>http://gingerjoos.com/blog/life/what-not-to-do-when-you-are-sleepy#comments</comments>
		<pubDate>Sat, 17 Jul 2010 12:49:45 +0000</pubDate>
		<dc:creator>Anirudh</dc:creator>
				<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://gingerjoos.com/blog/?p=321</guid>
		<description><![CDATA[1. Write blog posts. Especially ones about &#8220;What not to do when you are sleepy&#8221;. 2. Write emails. Yeah, that angry one you&#8217;re sending &#8211; no, don&#8217;t do it. 3. Sleep on food. Unless of course you want to smell like pastries. 4. Speak on the phone. Yaawnn.. no I don&#8217;t want that credit card. [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>1. Write blog posts. Especially ones about &#8220;What not to do when you are sleepy&#8221;.</p>
<p>2. Write emails. Yeah, that angry one you&#8217;re sending &#8211; no, don&#8217;t do it.</p>
<p>3. Sleep on food. Unless of course you want to smell like pastries.</p>
<p>4. Speak on the phone. Yaawnn.. no I don&#8217;t want that credit card.</p>
<p>5. Write code. while($i = 0) { $total += $i; }.</p>
<p> </p>
<p>There are more. You have to tell me.</p>


<p>No related posts.</p><img src="http://feeds.feedburner.com/~r/DreamsOfThought/~4/CYQEQHp3HOQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://gingerjoos.com/blog/life/what-not-to-do-when-you-are-sleepy/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://gingerjoos.com/blog/life/what-not-to-do-when-you-are-sleepy</feedburner:origLink></item>
		<item>
		<title>IRCTC disabled right click</title>
		<link>http://feedproxy.google.com/~r/DreamsOfThought/~3/GwTyILXxD5c/irctc-disabled-right-click</link>
		<comments>http://gingerjoos.com/blog/code/irctc-disabled-right-click#comments</comments>
		<pubDate>Wed, 09 Jun 2010 02:32:50 +0000</pubDate>
		<dc:creator>Anirudh</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[misc]]></category>
		<category><![CDATA[irctc]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://gingerjoos.com/blog/?p=310</guid>
		<description><![CDATA[Many readers of my post on booking tatkal tickets with Firefox&#8217;s autofill forms extension have reported that IRCTC has now disabled right clicks. Not only does this hamper saving the form, it is also very annoying. I&#8217;ve found a workaround for this. After you fill in the form do not directly go and right click [...]


Related posts:<ol><li><a href='http://gingerjoos.com/blog/misc/booking-tatkal-tickets-on-irctc-the-supercool-way' rel='bookmark' title='Permanent Link: Booking tatkal tickets on IRCTC the supercool way'>Booking tatkal tickets on IRCTC the supercool way</a></li>
<li><a href='http://gingerjoos.com/blog/code/firebug-opens-automatically-for-all-pages' rel='bookmark' title='Permanent Link: Firebug opens automatically for all pages'>Firebug opens automatically for all pages</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Many readers of my post on <a href="http://gingerjoos.com/blog/misc/booking-tatkal-tickets-on-irctc-the-supercool-way">booking tatkal tickets with Firefox&#8217;s autofill forms extension</a> have reported that IRCTC has now disabled right clicks. Not only does this hamper saving the form, it is also very annoying. I&#8217;ve found a workaround for this. After you fill in the form do not directly go and right click to save the form as a profile. Instead paste this code into the Firefox address bar &#8211; <code lang="javascript">javascript:void(document.oncontextmenu=null) </code>. This will re-enable the disabled right click. Now proceed as before.</p>
<p>This code can be used on any site that disables right click</p>
<p>Hat tip to this post on &#8220;<a href="http://www.tech-recipes.com/rx/501/re-enable-right-click-when-web-pages-turn-it-off/">Re-Enable Right-Click When Web Pages Turn It Off</a>&#8220;</p>


<p>Related posts:<ol><li><a href='http://gingerjoos.com/blog/misc/booking-tatkal-tickets-on-irctc-the-supercool-way' rel='bookmark' title='Permanent Link: Booking tatkal tickets on IRCTC the supercool way'>Booking tatkal tickets on IRCTC the supercool way</a></li>
<li><a href='http://gingerjoos.com/blog/code/firebug-opens-automatically-for-all-pages' rel='bookmark' title='Permanent Link: Firebug opens automatically for all pages'>Firebug opens automatically for all pages</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/DreamsOfThought/~4/GwTyILXxD5c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://gingerjoos.com/blog/code/irctc-disabled-right-click/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://gingerjoos.com/blog/code/irctc-disabled-right-click</feedburner:origLink></item>
		<item>
		<title>PQWL status on Railway ticket</title>
		<link>http://feedproxy.google.com/~r/DreamsOfThought/~3/4q60VCyH7uE/pqwl-status-on-railway-ticket</link>
		<comments>http://gingerjoos.com/blog/misc/pqwl-status-on-railway-ticket#comments</comments>
		<pubDate>Wed, 19 May 2010 06:50:59 +0000</pubDate>
		<dc:creator>Anirudh</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[irctc]]></category>
		<category><![CDATA[pqwl]]></category>
		<category><![CDATA[railways]]></category>

		<guid isPermaLink="false">http://gingerjoos.com/blog/?p=303</guid>
		<description><![CDATA[PQWL is one of the many Waiting List types that appear on reservation tickets. Practically speaking this is a Waiting List. Technically, there&#8217;s a difference between PQWL, CKWL, GNWL etc. The total seats available for reservation on a train are divided among different quotas. There&#8217;s the ladies quota, tatkal quota and general quota. Some trains [...]


Related posts:<ol><li><a href='http://gingerjoos.com/blog/misc/ckwl-on-tatkal-railway-ticket' rel='bookmark' title='Permanent Link: CKWL on Tatkal railway ticket'>CKWL on Tatkal railway ticket</a></li>
<li><a href='http://gingerjoos.com/blog/misc/ckwl-status' rel='bookmark' title='Permanent Link: CKWL status'>CKWL status</a></li>
<li><a href='http://gingerjoos.com/blog/misc/booking-tatkal-tickets-on-irctc-the-supercool-way' rel='bookmark' title='Permanent Link: Booking tatkal tickets on IRCTC the supercool way'>Booking tatkal tickets on IRCTC the supercool way</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>PQWL is one of the many Waiting List types that appear on reservation tickets. Practically speaking this is a Waiting List. Technically, there&#8217;s a difference between PQWL, CKWL, GNWL etc. The total seats available for reservation on a train are divided among different quotas. There&#8217;s the ladies quota, tatkal quota and general quota. Some trains also have what is called the Pooled Quota or PQ. When you book a ticket to a station for which tickets are issued from the pooled quota, then you get a pooled quota waiting list or PQWL if all the tickets available in the PQ quota have already been booked. This is similar to CKWL (Waiting list on the tatkal quota). The pooled quota is used for a bunch of stations who share a pool of tickets. These are relatively minor stations, at least as far as that particular train is concerned. For eg. if you were to book a ticket from Bangalore(SBC) to Rajamundry(RJY) on the Guwahati Express (2509), then you would get tickets assigned from the Pooled Quota. Waiting lists from this PQ quota appear as PQWL on the ticket.</p>


<p>Related posts:<ol><li><a href='http://gingerjoos.com/blog/misc/ckwl-on-tatkal-railway-ticket' rel='bookmark' title='Permanent Link: CKWL on Tatkal railway ticket'>CKWL on Tatkal railway ticket</a></li>
<li><a href='http://gingerjoos.com/blog/misc/ckwl-status' rel='bookmark' title='Permanent Link: CKWL status'>CKWL status</a></li>
<li><a href='http://gingerjoos.com/blog/misc/booking-tatkal-tickets-on-irctc-the-supercool-way' rel='bookmark' title='Permanent Link: Booking tatkal tickets on IRCTC the supercool way'>Booking tatkal tickets on IRCTC the supercool way</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/DreamsOfThought/~4/4q60VCyH7uE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://gingerjoos.com/blog/misc/pqwl-status-on-railway-ticket/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://gingerjoos.com/blog/misc/pqwl-status-on-railway-ticket</feedburner:origLink></item>
		<item>
		<title>CKWL status</title>
		<link>http://feedproxy.google.com/~r/DreamsOfThought/~3/phkFkPzz9Yc/ckwl-status</link>
		<comments>http://gingerjoos.com/blog/misc/ckwl-status#comments</comments>
		<pubDate>Tue, 11 May 2010 07:21:19 +0000</pubDate>
		<dc:creator>Anirudh</dc:creator>
				<category><![CDATA[misc]]></category>
		<category><![CDATA[ckwl]]></category>
		<category><![CDATA[irctc]]></category>
		<category><![CDATA[tatkal]]></category>

		<guid isPermaLink="false">http://gingerjoos.com/blog/?p=301</guid>
		<description><![CDATA[An attempt to answer the question - "Will my CKWL x ticket get confirmed?"


Related posts:<ol><li><a href='http://gingerjoos.com/blog/misc/pqwl-status-on-railway-ticket' rel='bookmark' title='Permanent Link: PQWL status on Railway ticket'>PQWL status on Railway ticket</a></li>
<li><a href='http://gingerjoos.com/blog/misc/ckwl-on-tatkal-railway-ticket' rel='bookmark' title='Permanent Link: CKWL on Tatkal railway ticket'>CKWL on Tatkal railway ticket</a></li>
<li><a href='http://gingerjoos.com/blog/misc/booking-tatkal-tickets-on-irctc-the-supercool-way' rel='bookmark' title='Permanent Link: Booking tatkal tickets on IRCTC the supercool way'>Booking tatkal tickets on IRCTC the supercool way</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I get a lot of <a href="misc/ckwl-on-tatkal-railway-ticket#comments">queries regarding ckwl status</a>. These involve questions like -<br /> &#8220;I got a tatkal ticket of WL 17 in sleeper on train 2833. Today is 24th Feb 2010. and my train is on 26th Feb.?<br /> Total tatkal seats is 229. Is it likely to be confirmed?&#8221;</p>
<p>It&#8217;s tough to answer such a question. There are different factors to keep in mind.</p>
<p>1. The route in which the train runs. Some routes, like Chennai &#8211; Bangalore route, are busy. Cancellations are probably low here. You are more likely to get a CKWL status if you book a train in a busy route.</p>
<p>2. The day for which the ticket is booked. Tatkal ticket bookings are high on Fridays and Sundays. If you look at tatkal bookings in a busy route like Bangalore &lt;&#8211;&gt; Ernakulam, you will find that booking is high on Fridays for Bangalore &#8211;&gt; Ernakulam and high on Sundays for Ernakulam &#8211;&gt; Bangalore.</p>
<p>3. Which train are you travelling on? If you&#8217;ve booked tatkal tickets for a train which is at a convenient time for most people (for eg. Island express at 9:45 pm is convenient for those going from Bangalore &#8211;&gt; Ernakulam), then the likelihood of getting a CKWL status is higher compared to getting a CKWL status on a less conveniently timed train ( There&#8217;s a train at 5:15 train from Bangalore &#8211;&gt; Ernakulam. Not convenient because most people can&#8217;t get out of office that early).</p>
<p>4. Occassionally the railways add extra coaches to a train when there&#8217;s a big waiting list. Chances are high that your CKWL status becomes confirmed in that case. I assume this is more likely to happen during the rush season (summer holidays?).</p>
<p>5. Some people cancel their tickets at the very last moment.</p>
<p>6. Some people forget to cancel their tickets</p>
<p>I have faced situations where a CKWL 11 did not get converted to a confirmed ticket. But I&#8217;ve also faced situations where my CKWL 30 ticket got confirmed. My advice to you is that unless you have a very high CKWL status, say CKWL 50, you ought to wait till the last moment. You won&#8217;t get much if you cancel a tatkal ticket anyway. It&#8217;s worth a shot.</p>
<p>Mind you, this advice is free and does not come with any guarantees. I&#8217;m not responsible if you wait for a ticket and it does not get confirmed. <a href="http://en.wiktionary.org/wiki/YMMV">YMMV</a> <img src='http://gingerjoos.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://gingerjoos.com/blog/misc/pqwl-status-on-railway-ticket' rel='bookmark' title='Permanent Link: PQWL status on Railway ticket'>PQWL status on Railway ticket</a></li>
<li><a href='http://gingerjoos.com/blog/misc/ckwl-on-tatkal-railway-ticket' rel='bookmark' title='Permanent Link: CKWL on Tatkal railway ticket'>CKWL on Tatkal railway ticket</a></li>
<li><a href='http://gingerjoos.com/blog/misc/booking-tatkal-tickets-on-irctc-the-supercool-way' rel='bookmark' title='Permanent Link: Booking tatkal tickets on IRCTC the supercool way'>Booking tatkal tickets on IRCTC the supercool way</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/DreamsOfThought/~4/phkFkPzz9Yc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://gingerjoos.com/blog/misc/ckwl-status/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://gingerjoos.com/blog/misc/ckwl-status</feedburner:origLink></item>
		<item>
		<title>Identify visits from Google Real time search</title>
		<link>http://feedproxy.google.com/~r/DreamsOfThought/~3/TZa4crP0JPg/identify-visits-from-google-real-time-search</link>
		<comments>http://gingerjoos.com/blog/from-the-web/identify-visits-from-google-real-time-search#comments</comments>
		<pubDate>Thu, 06 May 2010 12:59:04 +0000</pubDate>
		<dc:creator>Anirudh</dc:creator>
				<category><![CDATA[from the web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[google real time search]]></category>

		<guid isPermaLink="false">http://gingerjoos.com/blog/?p=299</guid>
		<description><![CDATA[Recently Google released its real time search feature. If you want to figure out from your Apache access logs which results are coming from the Google real time search, then you have to look at the referrer field. The Google search referrer url will have a param tbs=rltm in it. rltm stands for real time. [...]


Related posts:<ol><li><a href='http://gingerjoos.com/blog/technology/user-agent-gtb-or-gtb5-is-the-google-toolbar' rel='bookmark' title='Permanent Link: User agent GTB or GTB5 is the Google Toolbar'>User agent GTB or GTB5 is the Google Toolbar</a></li>
<li><a href='http://gingerjoos.com/blog/technology/enabled-google-analytics' rel='bookmark' title='Permanent Link: Enabled Google Analytics'>Enabled Google Analytics</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Recently Google released its <a href="http://googleblog.blogspot.com/2009/12/relevance-meets-real-time-web.html">real time search</a> feature. If you want to figure out from your Apache access logs which results are coming from the Google real time search, then you have to look at the referrer field. The Google search referrer url will have a param tbs=rltm in it. rltm stands for real time.</p>


<p>Related posts:<ol><li><a href='http://gingerjoos.com/blog/technology/user-agent-gtb-or-gtb5-is-the-google-toolbar' rel='bookmark' title='Permanent Link: User agent GTB or GTB5 is the Google Toolbar'>User agent GTB or GTB5 is the Google Toolbar</a></li>
<li><a href='http://gingerjoos.com/blog/technology/enabled-google-analytics' rel='bookmark' title='Permanent Link: Enabled Google Analytics'>Enabled Google Analytics</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/DreamsOfThought/~4/TZa4crP0JPg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://gingerjoos.com/blog/from-the-web/identify-visits-from-google-real-time-search/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://gingerjoos.com/blog/from-the-web/identify-visits-from-google-real-time-search</feedburner:origLink></item>
		<item>
		<title>How to programmatically create and log in drupal users</title>
		<link>http://feedproxy.google.com/~r/DreamsOfThought/~3/YIZNXqIJ0Bc/how-to-programmatically-create-and-log-in-drupal-users</link>
		<comments>http://gingerjoos.com/blog/code/drupal-code/how-to-programmatically-create-and-log-in-drupal-users#comments</comments>
		<pubDate>Mon, 22 Feb 2010 15:09:35 +0000</pubDate>
		<dc:creator>Anirudh</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://gingerjoos.com/blog/?p=275</guid>
		<description><![CDATA[Creating a new user is very easy in Drupal 6. Here&#8217;s how. &#60;p&#62;&#62; &#60;p&#62;$new_user = array(&#60;/p&#62; &#60;p&#62;&#38;#8216;name&#38;#8217; =&#62; $username,&#60;br /&#62; &#38;#8216;mail&#38;#8217; =&#62; $mail,&#60;br /&#62; &#38;#8216;pass&#38;#8217; =&#62; user_password(),&#60;br /&#62; &#38;#8216;status&#38;#8217; =&#62; 1,&#60;br /&#62; &#38;#8216;auth_MODULENAME&#38;#8217; =&#62; $username&#60;br /&#62;)&#60;/p&#62; &#60;p&#62;$user = user_save(NULL,$new_user)&#60;/p&#62; &#60;p&#62;// log the user in&#60;/p&#62; &#60;p&#62;$user = user_authenticate($new_user)&#60;/p&#62; &#60;p&#62; Now for the explanation. We create a [...]


Related posts:<ol><li><a href='http://gingerjoos.com/blog/code/drupal-code/gravatar-support-in-drupal' rel='bookmark' title='Permanent Link: Gravatar support  in Drupal'>Gravatar support  in Drupal</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Creating a new user is very easy in Drupal 6. Here&#8217;s how.<br /><pre class="brush: php">
&lt;p&gt;&gt;
&lt;p&gt;$new_user = array(&lt;/p&gt;
&lt;p&gt;&amp;#8216;name&amp;#8217;                   =&gt; $username,&lt;br /&gt; &amp;#8216;mail&amp;#8217;                     =&gt; $mail,&lt;br /&gt; &amp;#8216;pass&amp;#8217;                    =&gt; user_password(),&lt;br /&gt; &amp;#8216;status&amp;#8217;                  =&gt; 1,&lt;br /&gt; &amp;#8216;auth_MODULENAME&amp;#8217; =&gt; $username&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;$user = user_save(NULL,$new_user)&lt;/p&gt;
&lt;p&gt;// log the user in&lt;/p&gt;
&lt;p&gt;$user = user_authenticate($new_user)&lt;/p&gt;
&lt;p&gt;</pre></p>
<p>Now for the explanation. We create a $new_user array with values we want the newly created user to have.  We pass this along to the <a href="http://api.drupal.org/api/function/user_save/6">user_save</a> function and set the 1st parameter as NULL. From the code comments in the user module -</p>
<blockquote><p>* @param $account<br /> *   The $user object for the user to modify or add. If $user-&gt;uid is<br /> *   omitted, a new user will be added.<br /> *<br /> * @param $array<br /> *   (optional) An array of fields and values to save. For example,<br /> *   array(&#8216;name&#8217; =&gt; &#8216;My name&#8217;); Setting a field to NULL deletes it from<br /> *   the data column.</p>
</blockquote>
<p>So setting the 1st parameter as NULL creates a new user.</p>
<p>The parameters name, mail, pass and status are all self explanatory. The <a href="http://api.drupal.org/api/function/user_password/6">user_password</a> function generates a random password (by default with a length of 10).</p>
<p>The (optional) &#8216;auth_MODULENAME&#8217; element will record the user as being created externally. This will result in an entry in the authmap table like this -</p>
<p>&#8220;aid&#8221;    &#8220;uid&#8221;    &#8220;authname&#8221;    &#8220;module&#8221;<br />&#8220;2&#8243;    &#8220;20&#8243;    &#8220;USERNAME&#8221;    &#8220;MODULENAME&#8221;</p>
<p>The <a href="http://api.drupal.org/api/function/user_authenticate/6">user_authenticate</a> function logs the user in. This function expects an array as a parameter. It first loads the user in using the <a href="http://api.drupal.org/api/function/user_load/6">user_load</a> function and in case of no errors logs the user in.</p>
<p>This approach of logging in a user is useful when we have the array with us which contains the raw values used to create the user. If all you have is the uid of the user, then logging the user in is very simple. Just use the global $user object.</p>
<p><pre class="brush: php">&lt;/p&gt;
&lt;p&gt;global $user&lt;/p&gt;
&lt;p&gt;$account = user_load( array(&amp;#8216;name&amp;#8217; =&gt; &amp;#8216;USERNAME&amp;#8217;) ); // or user_load(UID)&lt;/p&gt;
&lt;p&gt;$user = $account&lt;/p&gt;
&lt;p&gt;</pre></p>
<p>Don&#8217;t use the user_authenticate function here as it expects the raw values(form values).  This wil not work -</p>
<p><pre class="brush: php">&lt;/p&gt;
&lt;p&gt;$account = user_load( array(&amp;#8216;name&amp;#8217; =&gt; &amp;#8216;USERNAME&amp;#8217;) ); // or user_load(UID)&lt;/p&gt;
&lt;p&gt;user_authenticate((array)$account)&lt;/p&gt;
&lt;p&gt;</pre></p>
<p>It will take whatever password is stored in the user object(the raw password), md5 it and then run a query to load that user. Since the password in the query is not the raw password but the md5, the query will return nothing. This will cause an error in the user_authenticate function.</p>
<p>For a direct code example for programmatic log in, check the <a href="http://drupal.org/project/Devel">devel</a> module&#8217;s devel_switch_user function.</p>


<p>Related posts:<ol><li><a href='http://gingerjoos.com/blog/code/drupal-code/gravatar-support-in-drupal' rel='bookmark' title='Permanent Link: Gravatar support  in Drupal'>Gravatar support  in Drupal</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/DreamsOfThought/~4/YIZNXqIJ0Bc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://gingerjoos.com/blog/code/drupal-code/how-to-programmatically-create-and-log-in-drupal-users/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://gingerjoos.com/blog/code/drupal-code/how-to-programmatically-create-and-log-in-drupal-users</feedburner:origLink></item>
		<item>
		<title>Helen Fry – Dilbert strip February 16, 2010</title>
		<link>http://feedproxy.google.com/~r/DreamsOfThought/~3/m4VqaI5tCzQ/helen-fry-dilbert-strip-february-16-2010</link>
		<comments>http://gingerjoos.com/blog/from-the-web/helen-fry-dilbert-strip-february-16-2010#comments</comments>
		<pubDate>Wed, 17 Feb 2010 05:25:20 +0000</pubDate>
		<dc:creator>Anirudh</dc:creator>
				<category><![CDATA[from the web]]></category>
		<category><![CDATA[comics]]></category>
		<category><![CDATA[dilbert]]></category>

		<guid isPermaLink="false">http://gingerjoos.com/blog/?p=272</guid>
		<description><![CDATA[I didn&#8217;t really get this. Who the heck is Helen Fry? I had to read the comments in the site to realise &#8220;Go to Helen Fry&#8221; should be read as &#8220;Go to Hell and Fry&#8221;! There are other beauties in there as well &#8211; Sofa King, Helen Wait&#8230; PS : click on the image to [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a title="Dilbert.com" href="http://dilbert.com/strips/comic/2010-02-16/"><img src="http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/80000/2000/200/82272/82272.strip.gif" border="0" alt="Dilbert.com" /></a></p>
<p>I didn&#8217;t really get this. Who the heck is Helen Fry? I had to read the comments in the site to realise &#8220;Go to Helen Fry&#8221; should be read as &#8220;Go to Hell and Fry&#8221;! <img src='http://gingerjoos.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>There are other beauties in there as well &#8211; Sofa King, Helen Wait&#8230; <img src='http://gingerjoos.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>PS : click on the image to see it in full size</p>


<p>No related posts.</p><img src="http://feeds.feedburner.com/~r/DreamsOfThought/~4/m4VqaI5tCzQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://gingerjoos.com/blog/from-the-web/helen-fry-dilbert-strip-february-16-2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://gingerjoos.com/blog/from-the-web/helen-fry-dilbert-strip-february-16-2010</feedburner:origLink></item>
		<item>
		<title>How to dump or export all the table definitions in a MySQL database</title>
		<link>http://feedproxy.google.com/~r/DreamsOfThought/~3/I1TodwaBioc/how-to-dump-or-export-all-the-table-definitions-in-a-mysql-database</link>
		<comments>http://gingerjoos.com/blog/code/how-to-dump-or-export-all-the-table-definitions-in-a-mysql-database#comments</comments>
		<pubDate>Fri, 05 Feb 2010 11:11:20 +0000</pubDate>
		<dc:creator>Anirudh</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>

		<guid isPermaLink="false">http://gingerjoos.com/blog/?p=264</guid>
		<description><![CDATA[So you have  a database with loads of tables. You want the table definitions of all of them. You don&#8217;t really need the data. mysqldump to the rescue! mysqldump -u USERNAME &#38;#8211;password=PASSWORD &#38;#8211;no-data &#38;#8211;opt DB1 &#62; DUMPFILE That&#8217;s it! Easy as a pie The key here is the &#8211;no-data option. It dumps all the table [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>So you have  a database with loads of tables. You want the table definitions of all of them. You don&#8217;t really need the data. <a href="http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html">mysqldump</a> to the rescue!</p>
<p><pre class="brush: php">mysqldump -u USERNAME &amp;#8211;password=PASSWORD &amp;#8211;no-data &amp;#8211;opt DB1 &gt; DUMPFILE</pre></p>
<p>That&#8217;s it! Easy as a pie <img src='http://gingerjoos.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The key here is the &#8211;no-data option. It dumps all the table definitions, but not the table data.</p>
<p>Want to do this for multiple databases? No problem.</p>
<p><pre class="brush: php">mysqldump -u USERNAME &amp;#8211;password=PASSWORD &amp;#8211;no-data &amp;#8211;opt &amp;#8211;databases DB1 DB2 &gt; DUMPFILE</pre></p>
<p>The &#8211;databases option allows you to add multiple databases.</p>
<p><pre class="brush: php">mysqldump -u USERNAME &amp;#8211;password=PASSWORD &amp;#8211;no-data &amp;#8211;opt &amp;#8211;all-databases &gt; DUMPFILE</pre></p>
<p>The &#8211;all-databases option allows you to dump all the databases.</p>
<p><pre class="brush: php">mysqldump -u USERNAME &amp;#8211;password=PASSWORD &amp;#8211;no-data &amp;#8211;opt DB1 &amp;#8211;ignore-table DB1.TABLENAME1 &amp;#8211;ignore-table DB1.TABLENAME2 &gt; DUMPFILE</pre></p>
<p>&#8211;ignore-table option allows you to skip dumping certain tables. Do not forget to specify the databasename when using this option.</p>
<p> </p>
<p>Know any more tricks? Let us know in the comments below <img src='http://gingerjoos.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>


<p>No related posts.</p><img src="http://feeds.feedburner.com/~r/DreamsOfThought/~4/I1TodwaBioc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://gingerjoos.com/blog/code/how-to-dump-or-export-all-the-table-definitions-in-a-mysql-database/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://gingerjoos.com/blog/code/how-to-dump-or-export-all-the-table-definitions-in-a-mysql-database</feedburner:origLink></item>
		<item>
		<title>How I recovered my Thunderbird mail from backup</title>
		<link>http://feedproxy.google.com/~r/DreamsOfThought/~3/208tn7ACgW8/how-i-recovered-my-thunderbird-mail-from-backup</link>
		<comments>http://gingerjoos.com/blog/technology/how-i-recovered-my-thunderbird-mail-from-backup#comments</comments>
		<pubDate>Tue, 02 Feb 2010 11:34:13 +0000</pubDate>
		<dc:creator>Anirudh</dc:creator>
				<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://gingerjoos.com/blog/?p=258</guid>
		<description><![CDATA[So the best way to backup your mails from Thunderbird is to copy your complete profile directory. Follow these steps for restoring your mail. The fool that I am, instead of copying the full profile directory I ended up backing up just the Mail subdirectory in the profile directory. It took me a while to [...]


Related posts:<ol><li><a href='http://gingerjoos.com/blog/linux/copy-files-preserving-the-permissions' rel='bookmark' title='Permanent Link: Copy files preserving the permissions'>Copy files preserving the permissions</a></li>
<li><a href='http://gingerjoos.com/blog/computer-security/hoax-mail-from-microsoft' rel='bookmark' title='Permanent Link: Hoax mail from &#8220;Microsoft&#8221;'>Hoax mail from &#8220;Microsoft&#8221;</a></li>
<li><a href='http://gingerjoos.com/blog/linux/copying-files-from-one-unix-box-to-another-with-scp' rel='bookmark' title='Permanent Link: Copying files from one unix box to another with scp'>Copying files from one unix box to another with scp</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>So the best way to backup your mails from Thunderbird is to <a href="http://www.mozilla.org/support/thunderbird/profile#backup">copy your complete profile directory</a>. Follow these steps for <a href="http://www.mozilla.org/support/thunderbird/profile#move">restoring your mail</a>.</p>
<p>The fool that I am, instead of copying the full profile directory I ended up backing up just the Mail subdirectory in the profile directory. It took me a while to figure out how to restore the backup, so I thought I would share it with you.</p>
<p>The first thing you do is install Thunderbird (if you haven&#8217;t already). Now Run( Windows : Start-&gt;Run or press Win key+r ; Mac/Linux &#8211; you&#8217;re smart enough to know <img src='http://gingerjoos.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ) this command &#8220;thunderbird.exe -profilemanager&#8221;. Create a dummy profile &#8211; just have some dummy email address in there. Now exit Thunderbird.</p>
<p>Next step is to <a href="http://www.mozilla.org/support/thunderbird/profile#locate">find your newly created profile directory</a>. Locate the Mail directory in there. Now you have to copy 2 files from your backup &#8211; both have the same name. One has a .msf extension and the other has no extension. I had created a separate thunderbird mail folder with a filter and I needed to backup just that one alone. So I just copied those 2 files (from the Inbox.sbd directory) and put them in the Local Folders subdirectory in the Mail directory (which already had empty files like Trash and Trash.msf).</p>
<p>The file without extension &#8211; this is the actual mail file. It&#8217;s in the <a href="http://en.wikipedia.org/wiki/Mbox">mbox</a> format. The other is an index file.</p>
<p><strong>Acknowledgements :</strong></p>
<p>I posted a <a href="http://vark.com/t/eee11d">question on Aardvark</a> &#8211; <a href="http://vark.com/t/eee11d">http://vark.com/t/eee11d</a>. I got replies from Shel and Moez. I would like to thank both of them for helping me out.</p>


<p>Related posts:<ol><li><a href='http://gingerjoos.com/blog/linux/copy-files-preserving-the-permissions' rel='bookmark' title='Permanent Link: Copy files preserving the permissions'>Copy files preserving the permissions</a></li>
<li><a href='http://gingerjoos.com/blog/computer-security/hoax-mail-from-microsoft' rel='bookmark' title='Permanent Link: Hoax mail from &#8220;Microsoft&#8221;'>Hoax mail from &#8220;Microsoft&#8221;</a></li>
<li><a href='http://gingerjoos.com/blog/linux/copying-files-from-one-unix-box-to-another-with-scp' rel='bookmark' title='Permanent Link: Copying files from one unix box to another with scp'>Copying files from one unix box to another with scp</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/DreamsOfThought/~4/208tn7ACgW8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://gingerjoos.com/blog/technology/how-i-recovered-my-thunderbird-mail-from-backup/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://gingerjoos.com/blog/technology/how-i-recovered-my-thunderbird-mail-from-backup</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.752 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-07-22 11:59:12 -->
