<?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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>techtamasha.com</title>
	
	<link>http://www.techtamasha.com</link>
	<description>a new play everyday</description>
	<lastBuildDate>Fri, 13 Jan 2012 09:21:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Techtamasha" /><feedburner:info uri="techtamasha" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Techtamasha</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Reset your last commit in git</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/I6RWpSXElqc/248</link>
		<comments>http://www.techtamasha.com/reset-your-last-commit-in-git/248#comments</comments>
		<pubDate>Fri, 13 Jan 2012 09:19:57 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[git commit mistake]]></category>
		<category><![CDATA[git reset commit]]></category>
		<category><![CDATA[git reset last commit]]></category>
		<category><![CDATA[git soft reset]]></category>
		<category><![CDATA[git wrong commit]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=248</guid>
		<description><![CDATA[So, you committed a change in your local repo and then realized you had the wrong branch? This happens to me a lot and the command I found the most useful for this purpose is: git reset --soft HEAD^ git reset Run the above 2 commands and you will have your uncommitted files back. After [...]]]></description>
			<content:encoded><![CDATA[<p>So, you committed a change in your local repo and then realized you had the wrong branch? This happens to me a lot and the command I found the most useful for this purpose is:</p>
<pre>git reset --soft HEAD^

git reset</pre>
<p>Run the above 2 commands and you will have your uncommitted files back. After that you can switch to the right branch and commit them again.</p>
<p>&nbsp;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/xoGbImHPj5WBhpSAphONWdqTa4Y/0/da"><img src="http://feedads.g.doubleclick.net/~a/xoGbImHPj5WBhpSAphONWdqTa4Y/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/xoGbImHPj5WBhpSAphONWdqTa4Y/1/da"><img src="http://feedads.g.doubleclick.net/~a/xoGbImHPj5WBhpSAphONWdqTa4Y/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=I6RWpSXElqc:Q6S3qcQGPgw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=I6RWpSXElqc:Q6S3qcQGPgw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=I6RWpSXElqc:Q6S3qcQGPgw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=I6RWpSXElqc:Q6S3qcQGPgw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=I6RWpSXElqc:Q6S3qcQGPgw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=I6RWpSXElqc:Q6S3qcQGPgw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=I6RWpSXElqc:Q6S3qcQGPgw:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/I6RWpSXElqc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/reset-your-last-commit-in-git/248/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/reset-your-last-commit-in-git/248</feedburner:origLink></item>
		<item>
		<title>Git branching model followed by us</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/8jmLg5oEomE/230</link>
		<comments>http://www.techtamasha.com/git-branching-model-followed-by-us/230#comments</comments>
		<pubDate>Thu, 29 Dec 2011 13:08:26 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=230</guid>
		<description><![CDATA[We use the below branching model for our products JustUnfollow and GrabInbox . This is the article that made me use this branching model. We have 2 parallel branches &#8211; &#8216;master&#8217; and &#8216;develop&#8217;. All development occurs on the &#8216;develop&#8217; branch. You can create new branches from the &#8216;develop&#8217; branch and then merge them back to &#8216;develop&#8217; once a feature [...]]]></description>
			<content:encoded><![CDATA[<p>We use the below branching model for our products <a title="I find and unfollow users who unfollowed me on twitter" href="http://www.justunfollow.com">JustUnfollow</a> and <a title="Manage multiple twitter, facebook, fan pages and linkedin accounts" href="http://www.grabinbox.com">GrabInbox</a> . <a href="http://nvie.com/posts/a-successful-git-branching-model/">This is the article</a> that made me use this branching model.</p>
<p>We have 2 parallel branches &#8211; &#8216;master&#8217; and &#8216;develop&#8217;. All development occurs on the &#8216;develop&#8217; branch. You can create new branches from the &#8216;develop&#8217; branch and then merge them back to &#8216;develop&#8217; once a feature is ready.</p>
<p>When it&#8217;s time to deploy a feature, we create a new &#8216;release-x.x&#8217; (x.x = version) branch from the &#8216;develop&#8217; branch. We can test this release branch, fix bugs and other small changes to make it ready for release. Once we are certain this branch is ready for release, we merge it with &#8216;develop&#8217; and also &#8216;master&#8217;. We then tag this commit in master and deploy the &#8216;master&#8217; to production.</p>
<p><span style="text-decoration: underline;">Example git commands:</span></p>
<p>git checkout develop<br />
git checkout -b release-0.1 develop<br />
git checkout develop<br />
git merge &#8211;no-ff release-0.1 develop<br />
git checkout master<br />
git merge &#8211;no-ff release-0.1 master<br />
git tag &#8220;0.1&#8243;<br />
git branch -d release-0.1</p>
<p>Now, if there are bug fixes that need to go into production quickly, we create a new &#8216;hotfix-x.x&#8217; branch from &#8216;master&#8217;. After fixing the bug, we merge &#8216;hotfix-x.x&#8217; to &#8216;master&#8217; and also &#8216;develop&#8217;. We then tag this release in &#8216;master&#8217; and deploy the &#8216;master&#8217; to production.</p>
<p><span style="text-decoration: underline;">Example git commands:</span></p>
<p>git checkout master<br />
git checkout -b hotfix-0.1.1 master<br />
git checkout develop<br />
git merge &#8211;no-ff hotfix-0.1.1 develop<br />
git checkout master<br />
git merge &#8211;no-ff hotfix-0.1.1 master<br />
git tag &#8220;0.1.1&#8243;<br />
git branch -d hotfix-0.1.1</p>

<p><a href="http://feedads.g.doubleclick.net/~a/23s-97ebQx9KYHhIt9qrcy4XMlE/0/da"><img src="http://feedads.g.doubleclick.net/~a/23s-97ebQx9KYHhIt9qrcy4XMlE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/23s-97ebQx9KYHhIt9qrcy4XMlE/1/da"><img src="http://feedads.g.doubleclick.net/~a/23s-97ebQx9KYHhIt9qrcy4XMlE/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=8jmLg5oEomE:FeOw-7jJeV8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=8jmLg5oEomE:FeOw-7jJeV8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=8jmLg5oEomE:FeOw-7jJeV8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=8jmLg5oEomE:FeOw-7jJeV8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=8jmLg5oEomE:FeOw-7jJeV8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=8jmLg5oEomE:FeOw-7jJeV8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=8jmLg5oEomE:FeOw-7jJeV8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/8jmLg5oEomE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/git-branching-model-followed-by-us/230/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/git-branching-model-followed-by-us/230</feedburner:origLink></item>
		<item>
		<title>Reducing the size of List in Java</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/1cqlL1SIIqs/218</link>
		<comments>http://www.techtamasha.com/reducing-the-size-of-list-in-java/218#comments</comments>
		<pubDate>Sun, 26 Jun 2011 16:16:03 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[arraylist reduce size]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[list size reduce]]></category>
		<category><![CDATA[sublist]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=218</guid>
		<description><![CDATA[I had a List that had around 70000 objects in it and I needed only the first 15000. I was about to create a new empty array list and iterate 15000 times over the current one in order to get a smaller list. That would have been a mess. I searched a bit and realized [...]]]></description>
			<content:encoded><![CDATA[<p>I had a List that had around 70000 objects in it and I needed only the first 15000. I was about to create a new empty array list and iterate 15000 times over the current one in order to get a smaller list. That would have been a mess.</p>
<p>I searched a bit and realized there was an easier (and I&#8217;m hoping it&#8217;s more efficient) way to reduce the size of a list.</p>
<blockquote><p>//templist has 70000 objects in it</p>
<p>tempList.subList(15000 &#8211; 1, tempList.size()-1).clear();</p>
<p>//templist now has the first 15000 objects in it</p>
<p>//15000 &#8211; 1 because the positions start from 0</p>
<p>&nbsp;</p></blockquote>

<p><a href="http://feedads.g.doubleclick.net/~a/zHCjrbXeApKq9R5XcisoXzc0P5c/0/da"><img src="http://feedads.g.doubleclick.net/~a/zHCjrbXeApKq9R5XcisoXzc0P5c/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/zHCjrbXeApKq9R5XcisoXzc0P5c/1/da"><img src="http://feedads.g.doubleclick.net/~a/zHCjrbXeApKq9R5XcisoXzc0P5c/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=1cqlL1SIIqs:0XE3Ya6xH5U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=1cqlL1SIIqs:0XE3Ya6xH5U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=1cqlL1SIIqs:0XE3Ya6xH5U:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=1cqlL1SIIqs:0XE3Ya6xH5U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=1cqlL1SIIqs:0XE3Ya6xH5U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=1cqlL1SIIqs:0XE3Ya6xH5U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=1cqlL1SIIqs:0XE3Ya6xH5U:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/1cqlL1SIIqs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/reducing-the-size-of-list-in-java/218/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/reducing-the-size-of-list-in-java/218</feedburner:origLink></item>
		<item>
		<title>Fetch Multiple Objects by key in JDO using getObjectsById</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/cAZys8l2xAs/209</link>
		<comments>http://www.techtamasha.com/fetch-multiple-objects-by-key-in-jdo/209#comments</comments>
		<pubDate>Wed, 22 Jun 2011 04:18:52 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Google Appengine]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JDO]]></category>
		<category><![CDATA[appengine getObjectsById error]]></category>
		<category><![CDATA[getObjectsById]]></category>
		<category><![CDATA[getObjectsById error]]></category>
		<category><![CDATA[google appengine]]></category>
		<category><![CDATA[jdo getObjectsById]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=209</guid>
		<description><![CDATA[On Google Appengine I needed to fetch multiple objects, the key to which is present with me. I tried using PersistenceManager#getObjectsById(Collection) method and passed a list of keys to it. But that threw an exception. On further probing I realized this is not how #getObjectsById works. There might be other ways of doing it but [...]]]></description>
			<content:encoded><![CDATA[<p>On Google Appengine I needed to fetch multiple objects, the key to which is present with me. I tried using <strong>PersistenceManager#getObjectsById(Collection)</strong> method and passed a list of keys to it. But that threw an exception. On further probing I realized this is not how <strong>#getObjectsById</strong> works.</p>
<p>There might be other ways of doing it but this is how I&#8217;ve done it :</p>
<blockquote><p>List list = new ArrayList();</p>
<p>for(Key key : &lt;iterate-over-list-of-keys&gt;){</p>
<p>list.add(persistenceManager.newObjectIdInstance(&lt;class-name-here&gt;, key));</p>
<p>}</p>
<p>Collection objects = persistenceManager.getObjectsById(list);</p>
<p>Hopefully this helps you use the <strong>getObjectsById</strong> method in JDO on google appengine.</p></blockquote>

<p><a href="http://feedads.g.doubleclick.net/~a/8wJlWrXC1awU2VXGD0oDunpjoRI/0/da"><img src="http://feedads.g.doubleclick.net/~a/8wJlWrXC1awU2VXGD0oDunpjoRI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/8wJlWrXC1awU2VXGD0oDunpjoRI/1/da"><img src="http://feedads.g.doubleclick.net/~a/8wJlWrXC1awU2VXGD0oDunpjoRI/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=cAZys8l2xAs:xF1lf60swqg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=cAZys8l2xAs:xF1lf60swqg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=cAZys8l2xAs:xF1lf60swqg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=cAZys8l2xAs:xF1lf60swqg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=cAZys8l2xAs:xF1lf60swqg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=cAZys8l2xAs:xF1lf60swqg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=cAZys8l2xAs:xF1lf60swqg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/cAZys8l2xAs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/fetch-multiple-objects-by-key-in-jdo/209/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/fetch-multiple-objects-by-key-in-jdo/209</feedburner:origLink></item>
		<item>
		<title>Change Google Chrome Google Search Country</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/ScfaQm8zK0M/201</link>
		<comments>http://www.techtamasha.com/change-google-chrome-google-search-country/201#comments</comments>
		<pubDate>Wed, 22 Jun 2011 02:49:07 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chrome-country]]></category>
		<category><![CDATA[chrome-language]]></category>
		<category><![CDATA[google-chrome-country]]></category>
		<category><![CDATA[google-chrome-language]]></category>
		<category><![CDATA[google-chrome-search-country]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=201</guid>
		<description><![CDATA[I recently moved to Chile to work on our new startup buffr.com which is an easy way to manage multiple social networks. We call it the social media dashboard. The first time I used the internet on my laptop in Chile, Google Chrome prompted me if I had changed to a different location. Unaware that [...]]]></description>
			<content:encoded><![CDATA[<p>I recently moved to Chile to work on our new startup <a href="http://www.buffr.com">buffr.com</a> which is an easy way to manage multiple social networks. We call it the <a href="http://www.buffr.com">social media dashboard</a>.</p>
<p>The first time I used the internet on my laptop in Chile, Google Chrome prompted me if I had changed to a different location. Unaware that clicking yes would make the default search bar use Google Chile, I clicked yes!</p>
<p>After a few searches I realized it was easy changing the chrome google search country back to my own country.</p>
<p>Here&#8217;s how you change the country specific google search to the one you want :</p>
<p>1. Close Google Chrome<br />
2. Navigate to \Users\\AppData\Local\Google\Chrome\User Data<br />
3. There will be a file named &#8220;Local State&#8221;<br />
4. Search for &#8220;last_known_google_url&#8221; and/or &#8220;last_prompted_google_url&#8221; and change the extension of the value here to the one you want.<br />
5. Start Google Chrome</p>
<p>You should now have the Google search engine in Chrome belonging to the country that you want. Chrome will prompt you again to use Google specific to your location, just select No!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/cXm-7QYJ9xxvAge9VFlhz3P1zQ8/0/da"><img src="http://feedads.g.doubleclick.net/~a/cXm-7QYJ9xxvAge9VFlhz3P1zQ8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/cXm-7QYJ9xxvAge9VFlhz3P1zQ8/1/da"><img src="http://feedads.g.doubleclick.net/~a/cXm-7QYJ9xxvAge9VFlhz3P1zQ8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=ScfaQm8zK0M:rAKw4z589_k:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=ScfaQm8zK0M:rAKw4z589_k:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=ScfaQm8zK0M:rAKw4z589_k:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=ScfaQm8zK0M:rAKw4z589_k:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=ScfaQm8zK0M:rAKw4z589_k:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=ScfaQm8zK0M:rAKw4z589_k:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=ScfaQm8zK0M:rAKw4z589_k:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/ScfaQm8zK0M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/change-google-chrome-google-search-country/201/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/change-google-chrome-google-search-country/201</feedburner:origLink></item>
		<item>
		<title>Convert json string to Map in Java using Gson</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/ClmVI9aTNP4/168</link>
		<comments>http://www.techtamasha.com/convert-json-to-map-in-java/168#comments</comments>
		<pubDate>Sun, 03 Apr 2011 09:53:19 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[gson]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[json map java]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=168</guid>
		<description><![CDATA[I&#8217;ve been using Gson from quite some time now. It&#8217;s a Java library developed by Google that is used to convert JSON to Java objects and vice versa. You can read more about Gson here. I came across this json string which I had to convert into a Map. Here&#8217;s how you do it: Type [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Gson from quite some time now. It&#8217;s a Java library developed by Google that is used to convert JSON to Java objects and vice versa. You can <a href="http://sites.google.com/site/gson/Home">read more about Gson here</a>.</p>
<p>I came across this json string which I had to convert into a Map. Here&#8217;s how you do it:</p>
<pre>Type type =</pre>
<pre> new TypeToken&lt;Map&lt;String, String&gt;&gt;(){}.getType();</pre>
<pre>Map&lt;String, String&gt; map =</pre>
<pre> gson.fromJson("{'key1':'123','key2':'456'}", type);</pre>
<p>Hope that helps you convert a json string into a java Map.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/FbI8f5uHXL5gbAqWBffOPG5YrBg/0/da"><img src="http://feedads.g.doubleclick.net/~a/FbI8f5uHXL5gbAqWBffOPG5YrBg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/FbI8f5uHXL5gbAqWBffOPG5YrBg/1/da"><img src="http://feedads.g.doubleclick.net/~a/FbI8f5uHXL5gbAqWBffOPG5YrBg/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=ClmVI9aTNP4:JzoGLX9lcso:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=ClmVI9aTNP4:JzoGLX9lcso:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=ClmVI9aTNP4:JzoGLX9lcso:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=ClmVI9aTNP4:JzoGLX9lcso:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=ClmVI9aTNP4:JzoGLX9lcso:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=ClmVI9aTNP4:JzoGLX9lcso:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=ClmVI9aTNP4:JzoGLX9lcso:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/ClmVI9aTNP4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/convert-json-to-map-in-java/168/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/convert-json-to-map-in-java/168</feedburner:origLink></item>
		<item>
		<title>How to get cookie value in Java</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/Rz936paM5zU/161</link>
		<comments>http://www.techtamasha.com/how-to-get-cookie-value-in-java/161#comments</comments>
		<pubDate>Sat, 26 Mar 2011 07:05:20 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[servlet cookie]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=161</guid>
		<description><![CDATA[Cookies come as part of the HttpServletRequest object.  The below code should help you retrieve cookie values that you have set on a client&#8217;s browser. &#160; Cookie[] cookies = servletRequest.getCookies(); if (cookies != null) { for (Cookie cookie : cookies) { if (cookie.getName().equals("cookieName")) { //do something //value can be retrieved using #cookie.getValue() } } }]]></description>
			<content:encoded><![CDATA[<p>Cookies come as part of the HttpServletRequest object.  The below code should help you retrieve cookie values that you have set on a client&#8217;s browser.</p>
<p>&nbsp;</p>
<pre>Cookie[] cookies = servletRequest.getCookies();

if (cookies != null) {
 for (Cookie cookie : cookies) {
   if (cookie.getName().equals("cookieName")) {
     //do something</pre>
<pre>     //value can be retrieved using #cookie.getValue()</pre>
<pre>    }</pre>
<pre>  }</pre>
<pre>}</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/oUcepmiMqn6BCoTh_JZg1F75edQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/oUcepmiMqn6BCoTh_JZg1F75edQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/oUcepmiMqn6BCoTh_JZg1F75edQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/oUcepmiMqn6BCoTh_JZg1F75edQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=Rz936paM5zU:IwyjZlDLzos:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=Rz936paM5zU:IwyjZlDLzos:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=Rz936paM5zU:IwyjZlDLzos:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=Rz936paM5zU:IwyjZlDLzos:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=Rz936paM5zU:IwyjZlDLzos:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=Rz936paM5zU:IwyjZlDLzos:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=Rz936paM5zU:IwyjZlDLzos:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/Rz936paM5zU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/how-to-get-cookie-value-in-java/161/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/how-to-get-cookie-value-in-java/161</feedburner:origLink></item>
		<item>
		<title>Deleting a remote git branch</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/JSylwiZS87U/150</link>
		<comments>http://www.techtamasha.com/deleting-a-remote-git-branch/150#comments</comments>
		<pubDate>Wed, 09 Mar 2011 13:58:12 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[delete git remote branch]]></category>
		<category><![CDATA[delete remote branch]]></category>
		<category><![CDATA[git remote branch delete]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[how delete remote branch git]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=150</guid>
		<description><![CDATA[Yeah, so I&#8217;ve been using git from a few months now and I must say, compared to the other version controls, this has given me the most pain. But, that doesn&#8217;t mean I don&#8217;t like git or won&#8217;t use it. In fact I now prefer git over the other version controls out there. I recently [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah, so I&#8217;ve been using git from a few months now and I must say, compared to the other version controls, this has given me the most pain. But, that doesn&#8217;t mean I don&#8217;t like git or won&#8217;t use it. In fact I now prefer git over the other version controls out there.</p>
<p>I recently had to delete a remote git branch. After some search found that the command to do this is :</p>
<pre>git push origin :branch-name</pre>
<p>Of course, you would still need to delete your local git branch using</p>
<pre>git branch -d branch-name</pre>
<p><strong>Update April, 2011:</strong> You can also delete a remote branch in Git using the command below:</p>
<pre>git branch -d -r origin/branch-name</pre>
<pre>
</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/ZXJdc9nUYgPSvSI64dNWaF-dS0E/0/da"><img src="http://feedads.g.doubleclick.net/~a/ZXJdc9nUYgPSvSI64dNWaF-dS0E/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ZXJdc9nUYgPSvSI64dNWaF-dS0E/1/da"><img src="http://feedads.g.doubleclick.net/~a/ZXJdc9nUYgPSvSI64dNWaF-dS0E/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=JSylwiZS87U:ZGcBBQTXGas:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=JSylwiZS87U:ZGcBBQTXGas:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=JSylwiZS87U:ZGcBBQTXGas:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=JSylwiZS87U:ZGcBBQTXGas:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=JSylwiZS87U:ZGcBBQTXGas:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=JSylwiZS87U:ZGcBBQTXGas:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=JSylwiZS87U:ZGcBBQTXGas:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/JSylwiZS87U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/deleting-a-remote-git-branch/150/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/deleting-a-remote-git-branch/150</feedburner:origLink></item>
		<item>
		<title>Struts 2 enum form value</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/5aCeapJAsMM/138</link>
		<comments>http://www.techtamasha.com/struts-2-enum-form-value/138#comments</comments>
		<pubDate>Sun, 01 Aug 2010 19:26:36 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[enum form bean]]></category>
		<category><![CDATA[struts]]></category>
		<category><![CDATA[struts 2 enum action]]></category>
		<category><![CDATA[struts enum]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=138</guid>
		<description><![CDATA[If you want to use enums in jsps while employing the struts 2 framework, add the following in your xwork-conversion.properties file: java.lang.Enum = com.opensymphony.xwork2.util.EnumTypeConverter]]></description>
			<content:encoded><![CDATA[<p>If you want to use enums in jsps while employing the struts 2 framework, add the following in your <strong>xwork-conversion.properties</strong> file:</p>
<p><span style="color: #ff0000;">java.lang.Enum = com.opensymphony.xwork2.util.EnumTypeConverter</span></p>

<p><a href="http://feedads.g.doubleclick.net/~a/qlQ238EAKMH8avWq8HAXM6WugTg/0/da"><img src="http://feedads.g.doubleclick.net/~a/qlQ238EAKMH8avWq8HAXM6WugTg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/qlQ238EAKMH8avWq8HAXM6WugTg/1/da"><img src="http://feedads.g.doubleclick.net/~a/qlQ238EAKMH8avWq8HAXM6WugTg/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=5aCeapJAsMM:Vss7d_D0_E0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=5aCeapJAsMM:Vss7d_D0_E0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=5aCeapJAsMM:Vss7d_D0_E0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=5aCeapJAsMM:Vss7d_D0_E0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=5aCeapJAsMM:Vss7d_D0_E0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=5aCeapJAsMM:Vss7d_D0_E0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=5aCeapJAsMM:Vss7d_D0_E0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/5aCeapJAsMM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/struts-2-enum-form-value/138/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/struts-2-enum-form-value/138</feedburner:origLink></item>
		<item>
		<title>Struts 2 test enum</title>
		<link>http://feedproxy.google.com/~r/Techtamasha/~3/MNNTNq8OtKk/133</link>
		<comments>http://www.techtamasha.com/struts-2-test-enum/133#comments</comments>
		<pubDate>Sun, 01 Aug 2010 19:15:32 +0000</pubDate>
		<dc:creator>Nischal Shetty</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[enum compare struts]]></category>
		<category><![CDATA[struts]]></category>
		<category><![CDATA[struts 2 enum]]></category>
		<category><![CDATA[struts enum]]></category>

		<guid isPermaLink="false">http://www.techtamasha.com/?p=133</guid>
		<description><![CDATA[In my Struts 2 app I needed to check for an enum value in the jsp. Using the struts &#60;s:if test=&#8221;"&#62; tag this can be done : &#60;s:if test=&#8217;#role.toString()!=&#8221;PAID&#8221;&#8216;&#62;&#60;/s:if&#62; Hope this helps out someone. What I&#8217;m doing is getting the string representation of the enum and comparing the same. I did not know we could [...]]]></description>
			<content:encoded><![CDATA[<p>In my Struts 2 app I needed to check for an enum value in the jsp. Using the struts &lt;s:if test=&#8221;"&gt; tag this can be done :</p>
<p><span style="color: #ff0000;">&lt;s:if test=&#8217;#role.toString()!=&#8221;PAID&#8221;&#8216;&gt;&lt;/s:if&gt; </span></p>
<p>Hope this helps out someone. What I&#8217;m doing is getting the string representation of the enum and comparing the same. I did not know we could do a <strong>toString()</strong> here, hence thought of blogging about it!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/d6LUfEcSP3Rac8D-AuX1wiIRN3s/0/da"><img src="http://feedads.g.doubleclick.net/~a/d6LUfEcSP3Rac8D-AuX1wiIRN3s/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/d6LUfEcSP3Rac8D-AuX1wiIRN3s/1/da"><img src="http://feedads.g.doubleclick.net/~a/d6LUfEcSP3Rac8D-AuX1wiIRN3s/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Techtamasha?a=MNNTNq8OtKk:s3KjYajpMus:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Techtamasha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=MNNTNq8OtKk:s3KjYajpMus:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=MNNTNq8OtKk:s3KjYajpMus:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=MNNTNq8OtKk:s3KjYajpMus:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=MNNTNq8OtKk:s3KjYajpMus:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Techtamasha?a=MNNTNq8OtKk:s3KjYajpMus:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Techtamasha?i=MNNTNq8OtKk:s3KjYajpMus:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Techtamasha/~4/MNNTNq8OtKk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.techtamasha.com/struts-2-test-enum/133/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.techtamasha.com/struts-2-test-enum/133</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.432 seconds. --><!-- Cached page generated by WP-Super-Cache on 2012-01-30 17:05:12 -->

