<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Guneet&#039;s Web Log &#187; How To</title>
	<atom:link href="http://guneetsahai.com/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://guneetsahai.com</link>
	<description>A Freelance Software Developer&#039;s Blog on Technology</description>
	<lastBuildDate>Mon, 12 Oct 2009 19:50:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='guneetsahai.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/8fd4eaca893f73384a573154cc687496?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Guneet&#039;s Web Log &#187; How To</title>
		<link>http://guneetsahai.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://guneetsahai.com/osd.xml" title="Guneet&#039;s Web Log" />
	<atom:link rel='hub' href='http://guneetsahai.com/?pushpress=hub'/>
		<item>
		<title>Adding a WYSIWYG Editor on a HTML Text Area</title>
		<link>http://guneetsahai.com/2008/04/05/adding-a-wysiwyg-editor-on-a-html-text-area/</link>
		<comments>http://guneetsahai.com/2008/04/05/adding-a-wysiwyg-editor-on-a-html-text-area/#comments</comments>
		<pubDate>Sat, 05 Apr 2008 07:05:00 +0000</pubDate>
		<dc:creator>guneetsahai</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://guneetsahai.wordpress.com/2008/04/05/adding-a-wysiwyg-editor-on-a-html-text-area</guid>
		<description><![CDATA[One of the applications that I’m currently working on required me to write a small Java program that allowed users to send email from a web page. [Yeah - Nothing so great about it but sending emails is not what this post is about]. The page allowed user with basic email facilities and also supported [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guneetsahai.com&#038;blog=9028347&#038;post=29&#038;subd=guneetsahai&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div style="text-align:justify;line-height:150%;">One of the applications that I’m currently working on required me to write a small Java program that allowed users to send email from a web page. [<em>Yeah - Nothing so great about it but sending emails is not what this post is about</em><span style="font-family:georgia;">]. The page allowed user with basic email facilities and also supported Email Attachments (Thanks to </span><a style="font-family:georgia;" href="http://commons.apache.org/fileupload/index.html">Apache commons File upload</a><span style="font-family:georgia;">). It allowed users to compose text emails through a regular HTML Text Area.</p>
<p></span></div>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">On Completing the application, one of the first enhancement that came my way was to enable rich text &amp; spell checker in the body of the email. This initially looked quite a challenge to me as I had no clue how to go about building this. However After spending some time with my dear friend &#8211; Google, I found a couple of Tools that could help me out. I ended up using <a href="http://www.fckeditor.net/">FCKEditor</a>, which enabled writing/editing rich text through Java Script.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;">The product was not very costly (<em>license details can be found <a href="http://www.fckeditor.net/license">here</a></em>) &amp; was fairly easy to set up. After a couple of hours, I managed to set it up properly and the HTML text area in my form got modified to that shown below (click to en-large). Notice the tool bar on top of the email body text area. One of the greatest feature of this editor was that it supported copy/paste from MS Office applications (Word, Outlook) without breaking down the formatting.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><a href="http://guneetsahai.files.wordpress.com/2008/04/with_fck.jpg"><img src="http://guneetsahai.files.wordpress.com/2008/04/with_fck.jpg?w=300" border="0" alt="" /></a></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;">The reset of this post provides brief instructions on how to set this up. For more details, please refer to their online documentation <a href="http://docs.fckeditor.net/">here</a>.</p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="margin-left:36pt;text-align:justify;text-indent:-18pt;line-height:150%;"><!--[if !supportLists]--><span>1)<span> </span></span><!--[endif]-->Download FCK Editor from <a href="http://www.fckeditor.net/download">here</a> [I used version 2.6].</p>
<p class="MsoNormal" style="margin-left:36pt;text-align:justify;text-indent:-18pt;line-height:150%;"><!--[if !supportLists]--><span>2)<span> </span></span><!--[endif]-->Unzip the downloaded compressed file into your web-app directory. With Tomcat for example, the un-compressed folder (<strong>fckeditor</strong> by default) should be placed into %TOMCAT_HOME%\webapps\%YOUR_WEBAPP_NAME% directory.</p>
<p class="MsoNormal" style="margin-left:36pt;text-align:justify;text-indent:-18pt;line-height:150%;"><!--[if !supportLists]--><span>3) </span>Point your web browser to the following linke in order to test the installation. If correctly installed you would see a text area with a tool bar similar to the one shown above.</p>
<p class="MsoNormal" style="margin-left:36pt;text-align:center;text-indent:-18pt;line-height:150%;"><a href="http://%3cip%3e/%3cwebapp-name%3e/fckeditor/_samples/default.html">http://yourip:port/your-webapp/fckeditor/_samples/default.html</a></p>
<p class="MsoNormal" style="margin-left:36pt;text-align:justify;text-indent:-18pt;line-height:150%;"><!--[if !supportLists]--><span>4)<span> </span></span><!--[endif]-->Add the following lines to your web page in the  section</p>
<p class="MsoNormal" style="margin-left:36pt;text-align:justify;text-indent:-18pt;line-height:150%;">
<p class="MsoNormal" style="margin-left:36pt;text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9px;"> </span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9px;"><span> </span></span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;"><span> </span>window.onload = function()</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;"><span> </span>{</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;">var oFCKeditor = new FCKeditor( &#8216;my_text_area&#8217;, &#8217;90%&#8217;, &#8217;400&#8242;, &#8216;Default&#8217;, &#8221; ) ;</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;">oFCKeditor.BasePath = &#8220;fckeditor/&#8221; ;</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;">oFCKeditor.ReplaceTextarea() ;</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;"><span> </span><span> </span></span></p>
<p class="MsoNormal" style="margin-left:36pt;text-align:justify;text-indent:-18pt;line-height:150%;">
<p class="MsoNormal" style="text-align:justify;line-height:150%;">
<p class="MsoNormal" style="margin-left:36pt;text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9px;"> </span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9px;"><span> </span></span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;"><span> </span>window.onload = function()</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;"><span> </span>{</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;">var oFCKeditor = new FCKeditor( &#8216;my_text_area&#8217;, &#8217;90%&#8217;, &#8217;400&#8242;, &#8216;Default&#8217;, &#8221; ) ;</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;">oFCKeditor.BasePath = &#8220;fckeditor/&#8221; ;</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;">oFCKeditor.ReplaceTextarea() ;</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;"><span> </span><span> </span>}</span></p>
<p class="MsoNormal" style="text-align:justify;line-height:150%;"><span style="line-height:150%;font-family:Courier;font-size:9pt;"><span> </span><span> </span></span></p>
<p class="MsoNormal" style="margin-left:18pt;text-align:justify;line-height:150%;">
<p class="MsoNormal" style="margin-left:54pt;text-align:justify;line-height:150%;">Note(s)</p>
<p class="MsoNormal" style="margin-left:72pt;text-align:justify;text-indent:-18pt;line-height:150%;"><!--[if !supportLists]--><span>1.<span> </span></span><!--[endif]-->This example adds rich text toolbar to a text area with the name ‘my_text_area’. You might want to replace this with the actual name that is being used in your HTML form.</p>
<p class="MsoNormal" style="margin-left:72pt;text-align:justify;text-indent:-18pt;line-height:150%;"><!--[if !supportLists]--><span>2.<span> </span></span><!--[endif]-->The Base Path refers to the directory where the editor is installed. It defaults to fckeditor which is the default directory in which fckeditor is unzipped.</p>
<p class="MsoNormal" style="margin-left:72pt;text-align:justify;text-indent:-18pt;line-height:150%;"><!--[if !supportLists]--><span>3.<span> </span></span><!--[endif]-->For more details, please refer online documentation <a href="http://docs.fckeditor.net/">here</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/guneetsahai.wordpress.com/29/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/guneetsahai.wordpress.com/29/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/guneetsahai.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/guneetsahai.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/guneetsahai.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/guneetsahai.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/guneetsahai.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/guneetsahai.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/guneetsahai.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/guneetsahai.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/guneetsahai.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/guneetsahai.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/guneetsahai.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/guneetsahai.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/guneetsahai.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/guneetsahai.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guneetsahai.com&#038;blog=9028347&#038;post=29&#038;subd=guneetsahai&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://guneetsahai.com/2008/04/05/adding-a-wysiwyg-editor-on-a-html-text-area/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/43e51783a4ea6fa61bab7bbe834e7237?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">guneetsahai</media:title>
		</media:content>

		<media:content url="http://guneetsahai.files.wordpress.com/2008/04/with_fck.jpg?w=300" medium="image" />
	</item>
		<item>
		<title>Script to change network settings</title>
		<link>http://guneetsahai.com/2008/02/19/script-to-change-network-settings/</link>
		<comments>http://guneetsahai.com/2008/02/19/script-to-change-network-settings/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 06:37:00 +0000</pubDate>
		<dc:creator>guneetsahai</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://guneetsahai.wordpress.com/2008/02/19/script-to-change-network-settings</guid>
		<description><![CDATA[These days I&#8217;m working from my client&#8217;s office for some part of the day and continue from my office for the remaining portion of the day. This requires me to change network settings on my windows XP Dell laptop (almost) every time I boot it. This was a painful activity that I wanted to somehow [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guneetsahai.com&#038;blog=9028347&#038;post=27&#038;subd=guneetsahai&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>These days I&#8217;m working from my client&#8217;s office for some part of the day and continue from my office for the remaining portion of the day. This requires me to change network settings on my windows XP Dell laptop (almost) every time I boot it. This was a painful activity that I wanted to somehow get away with. If you have encountered this pain too, then read on for details on a method that worked well for me.</p>
<p>Today I sat down to figure out how can that be simplified. 10 minutes of googling showed up a nice utility called &#8220;<span style="font-weight:bold;">netsh</span>&#8221; which was in c:\windows\system32 folder on my machine. It provided simple ways to dump/export existing network settings into a text file and re-load/import the same from it later if required. This was all that was required. I dumped my network&#8217;s settings into a text file and created a batch file through which it could be imported back. Did this for both the networks &amp; I ended up with two nice short-cuts on my desktop which allow me to change from one network to another in 5 seconds.</p>
<p>Thanks Google.</p>
<p>The steps that I followed in order to do this were</p>
<p>a) Opened a Dos Window</p>
<p>b) Exported the current settings into a text file (network1.txt) by typing the following</p>
<div style="text-align:center;"><span style="font-weight:bold;">netsh -c interface dump &gt;&gt; network1.txt</span></div>
<p>c) Created another text file called <span style="font-weight:bold;">switch-to-network1.bat</span> [Name could be anything, but  extension should be bat]</p>
<p>d) Opened this file in Notepad (or any other text editor) and type in the following</p>
<div style="text-align:center;"><span style="font-weight:bold;">netsh -f network1.txt</span></div>
<p>Make sure that the bat file &amp; text file are in the same directory</p>
<p>e) Right click on the bat file, create a short-cut (if desired change its icon) and put it on your desktop.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/guneetsahai.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/guneetsahai.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/guneetsahai.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/guneetsahai.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/guneetsahai.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/guneetsahai.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/guneetsahai.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/guneetsahai.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/guneetsahai.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/guneetsahai.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/guneetsahai.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/guneetsahai.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/guneetsahai.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/guneetsahai.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/guneetsahai.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/guneetsahai.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=guneetsahai.com&#038;blog=9028347&#038;post=27&#038;subd=guneetsahai&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://guneetsahai.com/2008/02/19/script-to-change-network-settings/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/43e51783a4ea6fa61bab7bbe834e7237?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">guneetsahai</media:title>
		</media:content>
	</item>
	</channel>
</rss>
