<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Anay Kamat's Weblog &#187; Tips</title>
	<atom:link href="http://anaykamat.com/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://anaykamat.com</link>
	<description>Technology, Programming, Career, Fun, Friends And Thoughts</description>
	<lastBuildDate>Fri, 26 Nov 2010 08:02:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>RSpec Matchers: Be careful while testing boolean values</title>
		<link>http://anaykamat.com/2010/05/30/rspec-matchers-be-careful-while-testing-boolean-values/</link>
		<comments>http://anaykamat.com/2010/05/30/rspec-matchers-be-careful-while-testing-boolean-values/#comments</comments>
		<pubDate>Sun, 30 May 2010 14:19:55 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[unit tests]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=105</guid>
		<description><![CDATA[While testing methods that return boolean values in ruby (the ones that end in &#8216;?&#8217;), try to avoid following matchers: method_returning_true?.should be_true or method_returning_false?should be_false This is because, &#8216;be_true&#8217; and &#8216;be_false&#8217; matchers considers &#8216;nil&#8217; to be false and anything other than &#8216;nil&#8217; to be true. When we write methods in ruby which end with question [...]]]></description>
			<content:encoded><![CDATA[<p>While testing methods that return boolean values in ruby (the ones that end in &#8216;?&#8217;), try to avoid following matchers:</p>
<pre class="brush: ruby;">
method_returning_true?.should be_true
</pre>
<p>or</p>
<pre class="brush: ruby;">
method_returning_false?should be_false
</pre>
<p>This is because, &#8216;be_true&#8217; and &#8216;be_false&#8217; matchers considers &#8216;nil&#8217; to be false and anything other than &#8216;nil&#8217; to be true. When we write methods in ruby which end with question mark (&#8216;?&#8217;), intent is that the method will return boolean value. To ensure that our tests will always reflect the intent of code, use following to assert boolean values instead of using &#8216;be_true&#8217; or &#8216;be_false&#8217; matchers:</p>
<pre class="brush: ruby;">
method_returning_true?.should == true
</pre>
<p>or</p>
<pre class="brush: ruby;">
method_returning_false?.should == false
</pre>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2010/05/30/rspec-matchers-be-careful-while-testing-boolean-values/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Search Google Visually</title>
		<link>http://anaykamat.com/2009/08/24/search-google-visually/</link>
		<comments>http://anaykamat.com/2009/08/24/search-google-visually/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 05:40:21 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[My Thoughts]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[search engine]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=90</guid>
		<description><![CDATA[Today I came across an online tool that allows you to see the screenshot of pages in the google search result. You can give it a try at &#8220;Veesual.com&#8221; While I found the concept to be interesting, I was wondering what could be the use of looking at screenshots of pages in search result. What [...]]]></description>
			<content:encoded><![CDATA[<p>Today I came across an online tool that allows you to see the screenshot of pages in the google search result. You can give it a try at &#8220;<a href="http://veesual.com" target="_blank">Veesual.com</a>&#8221;</p>
<p><a rel="attachment wp-att-91" href="http://anaykamat.com/2009/08/24/search-google-visually/veesual/"><img class="aligncenter size-medium wp-image-91" title="Veesual" src="http://anaykamat.com/wp-content/uploads/2009/08/Veesual-300x162.png" alt="Veesual" width="300" height="162" /></a></p>
<p><a rel="attachment wp-att-92" href="http://anaykamat.com/2009/08/24/search-google-visually/veesualresult/"><img class="aligncenter size-medium wp-image-92" title="Veesual Result" src="http://anaykamat.com/wp-content/uploads/2009/08/VeesualResult-300x131.png" alt="Veesual Result" width="300" height="131" /></a></p>
<p>While I found the concept to be interesting, I was wondering what could be the use of looking at screenshots of pages in search result. What matters to me is getting a list of relevant search results. A thumbnail of a particular page in search result won&#8217;t help me in determining how relevant that page is to my search.</p>
<p>However, I do see one use for getting search results along with thumbnails. It can be used to come up with ideas for designing web-sites for a particular theme. You can search on Veesual using a keyword that describes the theme of your site and then take a quick look at the design of pages in the result. This can help you to come up with your own web-page design.</p>
<p>Do let me know if you can think of some more applications of <a href="http://veesual.com" target="_blank">Veesual.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2009/08/24/search-google-visually/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple equivalent of &#8220;With&#8221; statement in C#</title>
		<link>http://anaykamat.com/2009/08/09/simple-equivalent-of-with-statement-in-c-sharp/</link>
		<comments>http://anaykamat.com/2009/08/09/simple-equivalent-of-with-statement-in-c-sharp/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 16:06:29 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[lambdas]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=84</guid>
		<description><![CDATA[Consider the following class in C# public class Person { private string name; private int age; public string Name{ get {return name;} set { name = value; } } public int Age{ get {return age;} set { age = value; } } } If I want to set the value of Name and Age property [...]]]></description>
			<content:encoded><![CDATA[<p>Consider the following class in C#</p>
<pre class="brush: csharp;">
	public class Person
	{
		private string name;
		private int age;

		public string Name{
			get {return name;}
			set { name = value; }
		}

		public int Age{
			get {return age;}
			set { age = value; }
		}
	}
</pre>
<p>If I want to set the value of Name and Age property on the instance of Person class, I&#8217;ll need to refer to that instance for every property I need to set in the code. For example:</p>
<pre class="brush: csharp;">
var person = new Person();
person.Name = &quot;Super Man&quot;;
person.Age = 30;
</pre>
<p>It would have been great if C# had an equivalent of VB&#8217;s &#8220;With..End&#8221; statement, where we could refer to the instance of Person class only once and then refer to properties only.</p>
<p>Today, I came across this post &#8220;<a href="http://blog.bittercoder.com/PermaLink,guid,d1831805-dbf7-4b74-a6fd-2e9ed437c3d9.aspx" target="_blank">mucking about with hashes&#8230;</a>&#8220;, which shows how C# lambdas could be used as hashes. Using this concept, I implemented a simple extension method that simulates the behavior of VB&#8217;s &#8220;With..End&#8221; statement to some extent.</p>
<p>Here is the code for extension method:</p>
<pre class="brush: csharp;">
	public static class MetaExtensions
	{
		public static void Set(this object obj,params Func&lt;string,object&gt;[] hash){
				foreach(Func&lt;string,object&gt; member in hash){
					var propertyName = member.Method.GetParameters()[0].Name;
					var propertyValue = member(string.Empty);
					obj.GetType()
						.GetProperty(propertyName)
							.SetValue(obj,propertyValue,null);
				};
		}
	}
</pre>
<p>Using this extension method, we can set the value of properties on instance of Person class as follows:</p>
<pre class="brush: csharp;">
var person = new Person();
person.Set(
	Name =&gt; &quot;Super Man&quot;,
	Age =&gt; 30
);
</pre>
<p>Isn&#8217;t that cool?</p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2009/08/09/simple-equivalent-of-with-statement-in-c-sharp/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Fixing SyntaxHighligher plugin in WordPress Blass2 theme</title>
		<link>http://anaykamat.com/2009/08/06/fixing-syntaxhighligher-plugin-in-wordpress-blass2-theme/</link>
		<comments>http://anaykamat.com/2009/08/06/fixing-syntaxhighligher-plugin-in-wordpress-blass2-theme/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 15:47:15 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=76</guid>
		<description><![CDATA[Yesterday I installed and activated Blass2 theme for this blog. I liked this theme as it was very simple and free from any extra graphics. After installing the theme, I discovered that &#8220;SyntaxHighlighter Evolved&#8221; plugin which I use to display code segments, was not working. I searched for other themes which are similar to blass2 [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I installed and activated Blass2 theme for this blog. I liked this theme as it was very simple and free from any extra graphics. After installing the theme, I discovered that &#8220;<a href="http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/" target="_blank">SyntaxHighlighter Evolved</a>&#8221; plugin which I use to display code segments, was not working. I searched for other themes which are similar to blass2 and can run syntaxhighlighter plugin, but couldn&#8217;t find anything better. Finally, this is how I fixed it.</p>
<p>To fix it, I had to edit &#8216;footer.php&#8217; of Blass2 theme using inbuilt theme editor of WordPress (Appearance &gt; Editor). The original &#8216;footer.php&#8217; looked like this:</p>
<pre class="brush: php;">
&lt;div id=&quot;footer&quot;&gt;

 &lt;p&gt;&amp;copy; &lt;?php echo date(&quot;Y&quot;)?&gt; &lt;!-- Please leave this line intact --&gt;&lt;?php if (is_home()) : ?&gt;&lt;?php bloginfo('name'); ?&gt; | Theme &lt;a href=&quot;http://1000ff.de/wordpress-theme-blass-english-version/&quot;&gt;Blass&lt;/a&gt; by &lt;a href=&quot;http://1000ff.de/&quot;&gt;1000ff&lt;/a&gt;&lt;?php else : ?&gt;Theme Blass by 1000ff&lt;?php endif; ?&gt; | Powered by &lt;a href=&quot;http://wordpress.org/&quot;&gt;WordPress&lt;/a&gt;&lt;/p&gt;

&lt;/div&gt;</pre>
<p>To fix the plugin, you need to add a call to &#8216;wp_footer&#8217; function in &#8216;footer.php&#8217;.</p>
<pre class="brush: php;">
&lt;div id=&quot;footer&quot;&gt;

 &lt;p&gt;&amp;copy; &lt;?php echo date(&quot;Y&quot;)?&gt; &lt;!-- Please leave this line intact --&gt;&lt;?php if (is_home()) : ?&gt;&lt;?php bloginfo('name'); ?&gt; | Theme &lt;a href=&quot;http://1000ff.de/wordpress-theme-blass-english-version/&quot;&gt;Blass&lt;/a&gt; by &lt;a href=&quot;http://1000ff.de/&quot;&gt;1000ff&lt;/a&gt;&lt;?php else : ?&gt;Theme Blass by 1000ff&lt;?php endif; ?&gt; | Powered by &lt;a href=&quot;http://wordpress.org/&quot;&gt;WordPress&lt;/a&gt;&lt;/p&gt;
&lt;?php wp_footer() ?&gt;
&lt;/div&gt;</pre>
<p>After making this change, syntaxhighlighter plugin started working again.</p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2009/08/06/fixing-syntaxhighligher-plugin-in-wordpress-blass2-theme/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>After file and photo sharing, it&#8217;s time for &#8220;code sharing&#8221;</title>
		<link>http://anaykamat.com/2009/08/05/after-file-photo-sharing-its-time-for-code-sharing/</link>
		<comments>http://anaykamat.com/2009/08/05/after-file-photo-sharing-its-time-for-code-sharing/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 11:19:15 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[My Thoughts]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[sharing]]></category>
		<category><![CDATA[software developer]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=65</guid>
		<description><![CDATA[If we want to share a file or photos while chatting with our friends on internet using IM tools like GTalk, we use file sharing services available online. These services allow us to upload a file to their servers and give us a link which we can share with our friends. But what if you [...]]]></description>
			<content:encoded><![CDATA[<p>If we want to share a file or photos while chatting with our friends on internet using IM tools like GTalk, we use file sharing services available online. These services allow us to upload a file to their servers and give us a link which we can share with our friends. But what if you are a developer and want to share a small piece of code with your friend? You are left with following choices:</p>
<ul>
<li><strong>Paste it in your chat:</strong> I know most of us do this when we quickly want to share the code. However, its annoying as it becomes unreadable and makes your code look as if its obfuscated <img src='http://anaykamat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<ul>
<li><strong>Email:</strong> This approach is better compared to previous approach, however the recipient wil need to manually compile the code and run it if he wants to know the output.</li>
</ul>
<p>I won&#8217;t say these approaches are useless. But I would like to have a place, where I can put my code fragment and then share it using a link. I can use this link in my gtalk status, chat or even in twitter posts.</p>
<p>Luckily, there is a site called &#8220;<a href="http://codepad.org/">codepad</a>&#8221; that allows us to do exactly the same thing. It allows us to share a piece of code using a small url.</p>
<p>You can try it now at &#8220;<a href="http://codepad.org/" target="_blank">http://codepad.org/</a>&#8221; or take a look at this example code posted by me at &#8220;<a href="http://codepad.org/XZpSNngW" target="_blank">http://codepad.org/XZpSNngW</a>&#8221;</p>
<p>Finally, one thing I would like to see is support for C# code.</p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2009/08/05/after-file-photo-sharing-its-time-for-code-sharing/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Missing attachment detector in Gmail</title>
		<link>http://anaykamat.com/2009/02/11/missing-attachment-detector-in-gmail/</link>
		<comments>http://anaykamat.com/2009/02/11/missing-attachment-detector-in-gmail/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 10:14:56 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[My Thoughts]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[gmail labs]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=57</guid>
		<description><![CDATA[It is really embarrassing to send an email with an attachment and actually forgetting to attach the file you were supposed to mail along, isn’t it? In my case, I often forget to attach files to emails if I’m typing it in hurry. Sometimes, I even end up receiving replies from recipients of those emails [...]]]></description>
			<content:encoded><![CDATA[<p>It is really embarrassing to send an email with an attachment and actually forgetting to attach the file you were supposed to mail along, isn’t it? In my case, I often forget to attach files to emails if I’m typing it in hurry. Sometimes, I even end up receiving replies from recipients of those emails requesting me to eat food instead of attachments. It&#8217;s really embarrassing when you are working as a professional or interacting with your teaching assistant while studying through <a href="http://www.elearners.com" target="_blank">online universities</a>.</p>
<p>Luckily, today I came across a feature in Gmail Labs, which helps you to identify missing attachments as soon as you press send button. This small functionality in Gmail warns you if you have written something like “I’m attaching” or “I am attaching” or “I have attached” in your message body and you haven’t actually attached any file. I’m not sure if it is capable of identifying any other patterns in email text which suggests that you wanted to attach something. However, I tested for above 3 patterns and I’m good with it.</p>
<p>To enable this feature, you will need to login to your Gmail account. Then go to Settings -&gt; Labs, and enable ‘Forgotten Attachment Detector’. Don’t forget to click on ‘Save changes’ after that.</p>
<p>I would like to thank Mr. Jonathan K, for creating this useful feature in Gmail lab. It is definitely an important feature for me, and for many other people who like to eat attachments instead of food.</p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2009/02/11/missing-attachment-detector-in-gmail/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixing NTLM authentication in Windows 2003</title>
		<link>http://anaykamat.com/2008/10/28/fixing-ntlm-authentication-in-windows-2003/</link>
		<comments>http://anaykamat.com/2008/10/28/fixing-ntlm-authentication-in-windows-2003/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 05:20:46 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[alfresco]]></category>
		<category><![CDATA[NTLM]]></category>
		<category><![CDATA[windows 2003]]></category>
		<category><![CDATA[windows xp]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=55</guid>
		<description><![CDATA[We had an application written in C# .Net, which used to communicate with Alfresco Enterprise Document/Content Management System. The application was using Alfresco’s NTLM component for authenticating users against their AD (Active Directory) user account. The application worked perfectly while we were testing it on Windows XP system. However, on Windows 2003 64 Bit system, [...]]]></description>
			<content:encoded><![CDATA[<p>We had an application written in C# .Net, which used to communicate with Alfresco Enterprise Document/Content Management System. The application was using Alfresco’s NTLM component for authenticating users against their AD (Active Directory) user account.</p>
<p>The application worked perfectly while we were testing it on Windows XP system. However, on Windows 2003 64 Bit system, the application started failing as it could not authenticate users on alfresco server using NTLM.</p>
<p>So we had a situation where NTLM authentication used to fail only when our application was running on Windows 2003 Operating System. We tried disabling “Internet Explorer Enhanced Security Configuration”, but it didn’t help. Finally, after spending a lot of time on Google, we came across following article on Microsoft Knowledge Base:</p>
<blockquote><p><strong>&#8220;<a title="Microsoft Knowledge Base Article Link" href="http://support.microsoft.com/kb/954387" target="_blank">You may experience authentication issues when you access a network-attached storage device after you upgrade to Windows Server 2008, to Windows Vista, to Windows Server 2003, or to Windows XP</a>&#8220;</strong></p></blockquote>
<p>This article talks about configuring the system to use appropriate NTLM version. In our Windows 2003 system, the value of <strong>“lmcompatibilitylevel” </strong>(Under <strong>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA</strong> subkey) was set to <strong>2</strong>. We just changed this value to <strong>1</strong>, and the client application started working properly in Windows 2003 system as well.</p>
<p>If you are also facing a similar issue on Windows 2003, then you can try the solution mentioned here. If setting the value of “lmcompatibilitylevel” to 1 makes no difference, then change this value to 0, which is the default value of “lmcompatibilitylevel” in Windows XP.</p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2008/10/28/fixing-ntlm-authentication-in-windows-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Be careful while using ‘replaceAll’ and ‘replaceFirst’ methods of String class in Java</title>
		<link>http://anaykamat.com/2008/10/27/be-careful-while-using-%e2%80%98replaceall%e2%80%99-and-%e2%80%98replacefirst%e2%80%99-methods-of-string-class-in-java/</link>
		<comments>http://anaykamat.com/2008/10/27/be-careful-while-using-%e2%80%98replaceall%e2%80%99-and-%e2%80%98replacefirst%e2%80%99-methods-of-string-class-in-java/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 07:55:50 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[regular expression]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[replaceAll]]></category>
		<category><![CDATA[replaceFirst]]></category>
		<category><![CDATA[String]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=54</guid>
		<description><![CDATA[Most of the time, while trying to replace a substring in a given string, either all its occurrences or just the first one, java programmers tend to use ‘replaceAll’ and ‘replaceFirst’ methods provided by String class in Java. Java programmers like to use these methods to replace substrings as compared to ‘replace’ method of String [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the time, while trying to replace a substring in a given string, either all its occurrences or just the first one, java programmers tend to use ‘replaceAll’ and ‘replaceFirst’ methods provided by String class in Java. Java programmers like to use these methods to replace substrings as compared to ‘replace’ method of String class because of different reasons like:</p>
<ol>
<li>‘replaceAll’ and ‘replaceFirst’ methods use regular expressions instead of character sequence. It is pre-assumed most of the time that using these methods will allow us to replace a given pattern in future, instead of just replacing a substring.</li>
<li>‘replaceAll’ and ‘replaceFirst’ methods are named such that they clarify the intent of their execution.</li>
</ol>
<p>However, while using these methods, we need to be very careful while providing the string value which would replace a given substring or a pattern. Let’s understand why with the following example:</p>
<p>Run the following java code:</p>
<pre class="brush: java;">public class StringReplace {

public static void main(String[] args){
String stringValue = &quot;test1 test2 test1 test3&quot;;
String replaceValue = &quot;test&quot;;
stringValue = stringValue.replaceAll(&quot;test1&quot;, replaceValue);
System.out.print(stringValue);
}

}</pre>
<p>This code works properly. But now try running the same code by changing the value of variable ‘replaceValue’ as:</p>
<pre class="brush: java;">String replaceValue = &quot;$100&quot;;</pre>
<p>This would result in an exception of type ‘IndexOutOfBoundException’. This is because the ‘$’ symbol is used to identify a group from the regular expression which is the first parameter of ‘replaceAll’ or ‘replaceFirst’ method. We can solve this problem by:</p>
<ol>
<li>Using ‘replace’ method: This would be the good choice if you want to replace a string literal and not a pattern.</li>
<li>Escaping ‘$’ symbol: If you need to a use regular expression, and your pattern has no groups identified, then you can escape any group identification symbols from your replace string as shown below:</li>
</ol>
<p style="text-align: center;">
<pre class="brush: java;">String replaceValue = java.util.regex.Matcher.quoteReplacement(&quot;$100&quot;);</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2008/10/27/be-careful-while-using-%e2%80%98replaceall%e2%80%99-and-%e2%80%98replacefirst%e2%80%99-methods-of-string-class-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Something useful: A WYSIWYG WordPress theme editor</title>
		<link>http://anaykamat.com/2008/06/29/something-useful-a-wysiwyg-wordpress-theme-editor/</link>
		<comments>http://anaykamat.com/2008/06/29/something-useful-a-wysiwyg-wordpress-theme-editor/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 09:03:49 +0000</pubDate>
		<dc:creator>shareapost</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://anaykamat.com/2008/06/29/something-useful-a-wysiwyg-wordpress-theme-editor/</guid>
		<description><![CDATA[Here&#8217;s an oldie but a goodie. Confounded by trying to track down fancy-looking WordPress themes? Check out this Web- based theme editor that lets you tweak every nook and cranny of a theme then spit it back to your server to go live. You can add columns, change fonts and backgrounds, even throw in a [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://andreglegg.com/wp-content/uploads/2008/06/wordpress-theme-generator_540x460.png"><img class="alignnone size-medium wp-image-29 alignleft" style="left;" src="http://andreglegg.com/wp-content/uploads/2008/06/wordpress-theme-generator_540x460-300x255.png" alt="" width="300" height="255" /></a></p>
<p>Here&#8217;s an <a class="external-link" href="http://digg.com/software/Wordpress_Theme_Generator">oldie</a> but a goodie. Confounded by trying to track down fancy-looking <a class="external-link" href="http://www.wordpress.org/">WordPress</a> themes? Check out <strong><a class="external-link" href="http://www.yvoschaap.com/wpthemegen/">this Web-</a></strong></p>
<p><strong><a class="external-link" href="http://www.yvoschaap.com/wpthemegen/">based theme editor</a></strong> that lets you tweak every nook and cranny of a theme then spit it back to your server to go live. You can add columns, change fonts and backgrounds, even throw in a customizable tag cloud&#8211;all with no coding experience required. All you need is a little creativity and some working knowledge of drop-down menus.</p>
<p>While some WordPress themes have excellent built-in support for doing this right from the WordPress dashboard,</p>
<p>many more don&#8217;t, and trying to figure out all the little things like text color is made far easier with a WYSIWYG editor than with WordPress&#8217; built-in editing tools.</p>
<p>Advanced users can throw in graphics or design elements they&#8217;ve hosted elsewhere on their server (as long</p>
<p>as it&#8217;s got a URL to link up to), and when all is said and done each bit of the theme can be grabbed as an individual file to whatever theme you&#8217;re currently using. This is an easy way to try out new fonts and colors without making a mess out of your existing style.css file.</p>
<p><!-- Social Bookmarks BEGIN --></p>
<div class="social_bookmark">
<a title="Click me to see the sites." href="http://andreglegg.com/#"><strong><em>Bookmark this!</em></strong></a><br />
</p>
<div class="d28" style="hidden">
<br />
<a href="http://del.icio.us/post?url=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/&amp;title=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/delicious.png" alt="Add to&nbsp;Del.icio.us" /></a><br />
<a href="http://digg.com/submit?phase=2&amp;url=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/&amp;title=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor" title="Add to&nbsp;digg"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/digg.png" alt="Add to&nbsp;digg" /></a><br />
<a href="http://www.facebook.com/sharer.php?u=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/" title="Add to&nbsp;Facebook"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/facebook.png" alt="Add to&nbsp;Facebook" /></a><br />
<a href="http://cgi.fark.com/cgi/fark/edit.pl?new_url=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/&amp;new_comment=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor&amp;new_comment=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor&amp;linktype=Misc" title="Add to&nbsp;Fark"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/fark.png" alt="Add to&nbsp;Fark" /></a><br />
<a href="http://furl.net/storeIt.jsp?t=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor&amp;u=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/" title="Add to&nbsp;FURL"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/furl.png" alt="Add to&nbsp;FURL" /></a><br />
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/&amp;title=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/google.png" alt="Add to&nbsp;Google Bookmarks" /></a><br />
<a href="http://www.netscape.com/submit/?U=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/&amp;T=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor" title="Add to&nbsp;Netscape"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/netscape.png" alt="Add to&nbsp;Netscape" /></a><br />
<a href="http://reddit.com/submit?url=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/&amp;title=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor" title="Add to&nbsp;reddit"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/reddit.png" alt="Add to&nbsp;reddit" /></a><br />
<a href="http://slashdot.org/bookmark.pl?url=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/&amp;title=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/slashdot.png" alt="Add to&nbsp;Slashdot" /></a><br />
<a href="http://www.stumbleupon.com/submit.php?url=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/&amp;title=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/stumbleupon.png" alt="Add to&nbsp;Stumble Upon" /></a><br />
<a href="http://www.spurl.net/spurl.php?url=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/&amp;title=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor" title="Add to&nbsp;Spurl"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/spurl.png" alt="Add to&nbsp;Spurl" /></a><br />
<a href="http://www.technorati.com/faves?add=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/" title="Add to&nbsp;Technorati"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/technorati.png" alt="Add to&nbsp;Technorati" /></a><br />
<a href="http://www.thisnext.com/pick/new/submit/sociable/?url=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/&amp;name=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor" title="Add to&nbsp;ThisNext"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/thisnext.png" alt="Add to&nbsp;ThisNext" /></a><br />
<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/&amp;t=Something+useful%3A+A+WYSIWYG+WordPress+theme+editor" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://andreglegg.com/wp-content/plugins/social_bookmarks/images/yahoo.png" alt="Add to&nbsp;Yahoo My Web" /></a><br />
<br />
<a title="Click me to hide the sites." href="http://andreglegg.com/#">Hide Sites</a>
</div>
</div>
<p><!-- Social Bookmarks END --><br />
<img src="http://feeds.feedburner.com/~r/AndreGlegg/~4/321409924" height="1">
<p><b>Source:</b> <a href="http://andreglegg.com/2008/06/27/something-useful-a-wysiwyg-wordpress-theme-editor/"> Web Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2008/06/29/something-useful-a-wysiwyg-wordpress-theme-editor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Active mind and software development</title>
		<link>http://anaykamat.com/2008/01/08/active-mind-and-software-development/</link>
		<comments>http://anaykamat.com/2008/01/08/active-mind-and-software-development/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 07:20:06 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[My Thoughts]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://anaykamat.com/2008/01/08/active-mind-and-software-development/</guid>
		<description><![CDATA[Every software developer knows the importance of his or her own mind. Well, I feel that software development itself is an excellent mind game where an active mind can help you to drive the design and development of your software effectively. If you are involved in the development of software for a domain where requirements [...]]]></description>
			<content:encoded><![CDATA[<p>Every software developer knows the importance of his or her own mind. Well, I feel that software development itself is an excellent mind game where an active mind can help you to drive the design and development of your software effectively.</p>
<p>If you are involved in the development of software for a domain where requirements keep changing every second, a developer needs to come up with new and new ideas to prevent the development process from stalling. To think of new ideas, you need to keep your mind focused on the problem which is difficult if your mind is not active.</p>
<p>To keep your mind active all the time, you basically need to keep it engaged in some activities so that your mind won’t have to stay idle. Let’s look at some activities that can keep your mind active and engaged for most of the time.</p>
<p><strong>1. Reading:</strong> Everybody knows the importance of reading. Apart from keeping your mind engaged, it also helps you to learn new concepts, and to come up with some new ideas. You could read literature on almost any topic. Normally, whenever I get tired after long hours of software development, I like to read some story books or newspaper. It distracts my mind for a short time from the puzzles I was trying to solve while coding and thus, making it fresh again after some time.</p>
<p><strong>2. Writing:</strong> Some people think that writing is generally a physical exercise. Just try to write some original articles or essays and you will come to know how much you need to think. But what to write? You can keep your personal diary where you can write your daily experience or a weblog where you can post your thoughts or ideas which could help others. If can even try to write your own poems or songs even if you haven’t written one before.</p>
<p><strong>3. Playing mind games:</strong> Games like chess or sudoku are quite challenging by nature. You can even play these games without moving away from your computer (lol). Don’t worry if you are not expert in chess or sudoku as we are trying to play just for the sake of keeping our mind engaged.</p>
<p><strong>4. Observing mother nature:</strong> If you are really bored of reading, writing or even playing then you can just hang out in some nice garden and appreciate the beautify of our mother nature. Trust me, it works!!!!! Once when I was struggling to come up with an algorithm to write one game, Alan had advised me to go out and look at birds and trees. I listened to his advice and soon after that, my problem was solved.</p>
<p>Here I’ve mentioned the activities that I follow to keep my mind active. Sometimes, I even do meditation for around 10 minutes. Don’t just limit yourself to these activities for keeping your mind engaged. Do whatever you like but make sure that your mind won’t stay idle.</p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2008/01/08/active-mind-and-software-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

