<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
    <title>varun pant</title>
    <subtitle>Rambling on web</subtitle>
    <link href="http://varunpant.com/" />
    
    <id>http://varunpant.com/</id>
    <rights>Copyright (c) 2011 varun pant. The content on this feed is licensed under Creative Commons Attribution 3.0 License.</rights>
    <icon>http://varunpant.com/static/img/favicon.ico</icon>
    <updated>2012-01-09T21:58:14z</updated>
    <author><name>varun pant</name><email>varun@varunpant.com</email>
    </author>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/VarunPant" /><feedburner:info uri="varunpant" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
        <title>Installing Ubuntu Linux in VMware and VMwareTools</title>
        <link href="http://feedproxy.google.com/~r/VarunPant/~3/obzyyH8fz4E/installing-ubuntu-linux-in-vmware-and-vmwaretools" rel="alternate" />
        <id>http://varunpant.com/posts/installing-ubuntu-linux-in-vmware-and-vmwaretools</id>
        <published>2012-01-09T21:58:14z</published>
        <updated>2012-01-09T21:58:14z</updated>
        <author><name>varun pant</name>
        </author><content type="html">&lt;p&gt;I have been using Ubuntu for last two years as a deployment environment for my pet projects, however recently, after&amp;#160; having installed “Natty Narwhal” on one of my old ‘HP’ laptop I moved into using Ubuntu as a full time development environment.&lt;/p&gt;  &lt;p&gt;There are times when I need more than one deployment units and since I use &lt;a href="http://www.linode.com/"&gt;Linode&lt;/a&gt; as my primary deployment VPS host, I sometime need to test the perf of my software locally thus there came a need of replicating an exact or close to exact “Deployment Environment”&lt;/p&gt;  &lt;p&gt;Enter &lt;a href="http://www.vmware.com/"&gt;VmWare&lt;/a&gt;, as most of you folks know, there is nothing like a quick and dirty VM Image boot, and &lt;a href="http://www.vmware.com/"&gt;VmWare&lt;/a&gt; is one of the best in the market although “&lt;a href="https://www.virtualbox.org/"&gt;Oracle’s Virtual box&lt;/a&gt;” and &lt;a href="http://www.parallels.com/uk/products/desktop/"&gt;“Parallels for mac&lt;/a&gt;” are pretty awesome too, there also&amp;#160; is a repository for pre-installed&amp;#160; vanilla images for most of the popular flavours of Linux &lt;a href="http://www.thoughtpolice.co.uk/vmware/#ubuntu11.04"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The cheapest version of Linode is 512MB RAM and 20GB HD and this is exactly what you get when you download the image from above link, although you can tweak and configure it to you likings at all times.&lt;/p&gt;  &lt;p&gt;Another important step to remember is&amp;#160; installing VMware Tools . &lt;/p&gt;  &lt;p&gt;&lt;a name="wp1103338"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;With the VMware Tools SVGA driver installed, Workstation supports significantly faster graphics performance. The VMware Tools package provides support required for shared folders and for drag and drop operations. Other tools in the package support synchronization of time in the guest operating system with time on the host, automatic grabbing and releasing of the mouse cursor, copying and pasting between guest and host, and improved mouse performance in some guest operating systems. To install choose &lt;b&gt;VM &lt;/b&gt;&amp;gt;&lt;b&gt; Install VMware Tools&lt;/b&gt; from the VMware Workstation menu, although you will be automatically prompted when you boot you Image for the first time.&lt;/p&gt;  &lt;p&gt;If this is your first time dealing with this stuff then you may need a little help installing the script written in pearl, If GNOME has been your baby for a while, then the installed location and booting your image is not so obvious for the command line server interface.&lt;/p&gt; &lt;figure&gt;&lt;figcaption&gt;&lt;strong&gt;This is what you do&lt;/strong&gt;&lt;/figcaption&gt;   &lt;pre&gt;  
 &lt;code class="brush: javascript language-javascript"&gt; 
	#install kernel headers so modules will work
        #needed this on a 10.04 guest running in a Fusion 3 host
        apt-get install linux-headers-virtual

        # install kernel modules
        apt-get install --no-install-recommends open-vm-dkms

        # EITHER: install tools for an xorg install
        apt-get install open-vm-tools
        # OR: a headless install
        apt-get install --no-install-recommends open-vm-tools     
&lt;/code&gt;  
    &lt;/pre&gt;
&lt;/figure&gt;

&lt;blockquote&gt;Start up a terminal window and do the following to ensure that you have the required packages for building VMware Tools or your kernel. &lt;/blockquote&gt;
&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;

&lt;pre&gt;   &lt;code class="brush: javascript language-javascript"&gt; 
	sudo apt-get install build-essential linux-headers-`uname -r` psmisc   
&lt;/code&gt;
    &lt;/pre&gt;
&lt;/figure&gt;

&lt;p&gt;If the cdrom was not automatically mounted, mount the cdrom (in your guest OS) by doing&lt;/p&gt;
&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;

&lt;pre&gt;   &lt;code class="brush: javascript language-javascript"&gt; 
	# make a mount point if needed :
	sudo mkdir /media/cdrom

	# Mount the CD
	sudo mount /dev/cdrom /media/cdrom

	# Copy and extract VMWareTools

	sudo cp /media/cdrom/VMwareTools*.tar.gz /tmp

	# You can extract with archive manager, right click on the archive and extract ... or

	cd tmp

	tar xvf VMwareTools*.tar.gz  
	
	cd vmware-tools-distrib
	sudo ./vmware-install.pl 
	
	#You can configure the tools as root
	sudo vmware-toolbox
&lt;/code&gt;
    &lt;/pre&gt;
&lt;/strong&gt;&lt;/figure&gt;

&lt;p&gt;Once you are done installing you can simply issue sudo shutdown –P or sudo init 0 and shutdown the VM safely. Have fun Vm-innnng :)&lt;/p&gt;&lt;/strong&gt;&lt;img src="http://feeds.feedburner.com/~r/VarunPant/~4/obzyyH8fz4E" height="1" width="1"/&gt;</content>
    <feedburner:origLink>http://varunpant.com/posts/installing-ubuntu-linux-in-vmware-and-vmwaretools</feedburner:origLink></entry>
    <entry>
        <title>First Android application</title>
        <link href="http://feedproxy.google.com/~r/VarunPant/~3/94m4PvvwNRA/first-android-application" rel="alternate" />
        <id>http://varunpant.com/posts/first-android-application</id>
        <published>2011-10-31T21:21:00z</published>
        <updated>2011-10-31T21:21:00z</updated>
        <author><name>varun pant</name>
        </author><content type="html">&lt;p&gt;&lt;img alt="droid" src="http://varunpant.com/static/resources/droid_thumb_3.png" width="620" height="269"&gt;&lt;/p&gt;  &lt;p&gt;Well since I now posses a &lt;a href="http://www.samsung.com/global/microsite/galaxys2/html/"&gt;Samsung Galaxy S2 phone&lt;/a&gt;, its only fair that I expand my horizon and come up with some nice little fun app to begin with.&lt;/p&gt;  &lt;p&gt;One of my favourite places to surf and learn computer animation is a nice site called &lt;em&gt;&lt;a href="http://www.dhteumeuleu.com/"&gt;dhteumeuleu&lt;/a&gt;&lt;/em&gt;, which is authored by &lt;a href="http://www.dhteumeuleu.com/about/"&gt;ge1doot&lt;/a&gt;. This place has amazing JavaScript examples and various demos and here I shamelessly copy or rather port one of his creations into android. Its called &lt;a href="http://www.dhteumeuleu.com/no-click/"&gt;No Click !&lt;/a&gt; and hence I shall call it the same &lt;em&gt;although I personally wanted to call it as “chaser”&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;The principles of animation in a droid app basically remains the same, there is a input step, then an update state step and finally a render step, i.e We handle input (touch events), update the state (update the sprite position) of our internal objects and render the current state.&lt;/p&gt;  &lt;p&gt;There is a concept of activity in a droid app and every thing happens inside it, an activity creates a view, touch events are passed into a view and then rest of the magic happens.&lt;/p&gt;  &lt;p&gt;I have four classes three of them form a support infra and then finally a Sprite model where all the cool stuff goes and you will notice that this is a prevalent pattern in the droid world.&lt;/p&gt;  &lt;p&gt;I have a class called &lt;strong&gt;MainPanel&lt;/strong&gt; which extends the &lt;strong&gt;&lt;em&gt;SurfaceView&lt;/em&gt;&lt;/strong&gt;, this is where I initialise my app and start the main animation thread which is the instance of a class called &lt;strong&gt;MainThread&lt;/strong&gt; that in turn inherits form the &lt;strong&gt;&lt;em&gt;Thread&lt;/em&gt;&lt;/strong&gt; class, all of this so far is simply support abstractions to build code structure, after this there is a third class called &lt;strong&gt;ScrollActivity&lt;/strong&gt; which extends &lt;strong&gt;&lt;em&gt;Activity&lt;/em&gt;&lt;/strong&gt; and its here where the Sprite class called &lt;strong&gt;Chaser&lt;/strong&gt; is initialised ., a bitmap is set from the resource and then an animation loop simply does some hacky positioning of the sprite based on touch events.&lt;/p&gt;  &lt;p&gt;One of the different things (coming from a mouse driven environment ) is how a mouse drag equivalent is captured in touch screen devices here, an ACTION_DOWN event is equivalent to mouse down, an ACTION_UP is equivalent of mouse up and ACTION_MOVE is equivalent of mouse move, since I was interested in capturing a "Mouse Drag" equivalent I kinda do something like given below &lt;/p&gt; &lt;figure&gt;&lt;figcaption&gt;Snippet&lt;/figcaption&gt;   &lt;pre&gt;           
	    &lt;code class="brush: csharp language-csharp"&gt; 
        public boolean onTouchEvent(MotionEvent event) {
        	super.onTouchEvent(event);
       		 switch (event.getAction()) {
            		 case MotionEvent.ACTION_DOWN: {
               		 down = true;
                	 chaser.setXm(event.getX());
                	 chaser.setYm(event.getY());
                	 break;
            		 }
           		 case MotionEvent.ACTION_UP: {
                	 down = false;
               		 break;
            		 }
            		case MotionEvent.ACTION_MOVE: {
               		 if (down) {
                   	 chaser.setXm(event.getX());
                   	 chaser.setYm(event.getY());
                    	chaser.setStart(true);
                	 }
                	break;
                     }
        	}
        	return true;
    	   } 
&lt;/code&gt;
        &lt;/pre&gt;
&lt;/figure&gt;One of the turn down is a bug in the framework, which on exiting i.e on &lt;code&gt;&lt;strong&gt;surfaceDestroyed&lt;/strong&gt; &lt;/code&gt;sometimes throws an exception so for now I simply use&amp;nbsp; hack I found somewhere &lt;figure&gt;&lt;figcaption&gt;Snippet&lt;/figcaption&gt; 

&lt;pre&gt;           
&lt;code class="brush: csharp language-csharp"&gt; 
 public void surfaceDestroyed(SurfaceHolder holder) {
	// tell the thread to shut down and wait for it to finish
	// this is a clean shutdown
	boolean retry = true;
	while (retry) {
		try {
			thread.join();
			retry = false;
		} catch (InterruptedException e) {
			// try again shutting down the thread
		}
	}
}

     
&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;

and that's it folks.&lt;br /&gt;
&lt;iframe src="http://player.vimeo.com/video/31441884?title=0&amp;amp;byline=0&amp;amp;portrait=0" width="620" height="325" frameborder="0" webkitAllowFullScreen allowFullScreen&gt;&lt;/iframe&gt;
&lt;div&gt;&amp;nbsp;

&lt;a href="http://www.varunpant.com/demo/Chaser.zip" class="download"&gt;Click here to download code &lt;br&gt;&lt;span&gt;Written using Idea IDE&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VarunPant/~4/94m4PvvwNRA" height="1" width="1"/&gt;</content>
              <category label="programming" scheme="http://varunpant.com/topics/programming/1" term="programming" />
              <category label="animation,simulation,android" scheme="http://varunpant.com/topics/animation,simulation,android/1" term="animation,simulation,android" />
    <feedburner:origLink>http://varunpant.com/posts/first-android-application</feedburner:origLink></entry>
    <entry>
        <title>LIMBO Game Review</title>
        <link href="http://feedproxy.google.com/~r/VarunPant/~3/RyuKUcM4bWE/limbo-game-review" rel="alternate" />
        <id>http://varunpant.com/posts/limbo-game-review</id>
        <published>2011-10-19T17:09:00z</published>
        <updated>2011-10-19T17:09:00z</updated>
        <author><name>varun pant</name>
        </author><content type="html">&lt;p&gt;&lt;a href="http://varunpant.com/static/resources/limbo_psn_4.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="limbo_psn" border="0" alt="limbo_psn" src="http://varunpant.com/static/resources/limbo_psn_thumb_1.jpg" width="609" height="317"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;LIMBO is a horrifically beautiful, monochrome or rather a gray-scale purgatory painted perhaps while watching Tim burton movie on the side. It was published initially in Jul 2010&amp;nbsp; by &lt;a href="http://en.wikipedia.org/wiki/Microsoft_Game_Studios"&gt;Microsoft Game Studios&lt;/a&gt;(XBLA) and &lt;a href="http://en.wikipedia.org/wiki/Playdead"&gt;Playdead&lt;/a&gt; (PSN, Windows), and then later released for Windows platform by &lt;a href="http://en.wikipedia.org/wiki/Steam_(software)"&gt;Steam&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The primary character of the game is a boy, who wakes up right at the beginning of the game i.e while you are trying to figure out WTF is happening or wonder if you graphics driver (windows platform) screwed up or something, but there as you are fiddling with the movement buttons in keyboard you will see pair of bright white eyes flickering, and that’s when you start falling in love with the game and the care of detail added in a game which is totally unlike other in its league.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;LIMBO game essentially is a 2D puzzle game, the boy with a twee outline and messy hair ideally is in search of her sister, the games puzzle are master minded by Dino Patti and lead designer of &lt;a href="http://limbogame.org/company/"&gt;PlayDead&lt;/a&gt;&amp;nbsp; Jeppe Carlsen,according to Wikipedia, Dino Patti had conceived this idea around 2004, and had even tried coding it in visual basic,he later made a video trailer to recruit a developer. They had grants from Nordic game program and Danish Government.&lt;/p&gt;  &lt;p&gt;Although Patti helped in the first few months with programming, he realised that the project was much larger than what the two of them could handle, and Patti developed the business around the game's expanded development &lt;/p&gt;  &lt;p&gt;&lt;i&gt;Limbo&lt;/i&gt; was awarded both the "Technical Excellence" and "Excellence in Visual Art" titles at the &lt;a href="http://en.wikipedia.org/wiki/Independent_Games_Festival"&gt;Independent Games Festival&lt;/a&gt; during the 2010 &lt;a href="http://en.wikipedia.org/wiki/Game_Developers_Conference"&gt;Game Developers Conference&lt;/a&gt;, at the 2010 &lt;a href="http://en.wikipedia.org/wiki/Electronic_Entertainment_Expo"&gt;Electronic Entertainment Expo&lt;/a&gt;—about a month before its release—&lt;i&gt;Limbo&lt;/i&gt; won &lt;a href="http://en.wikipedia.org/wiki/GameSpot"&gt;GameSpot&lt;/a&gt;'s "Best Downloadable Game",and was nominated for several other "Best of Show" awards, including "Best Platformer" by &lt;a href="http://en.wikipedia.org/wiki/IGN"&gt;IGN&lt;/a&gt;, “Most Original Game" by &lt;a href="http://en.wikipedia.org/wiki/G4_TV"&gt;G4 TV&lt;/a&gt; and "Best Puzzle Game" by GameSpot&amp;nbsp; The game was nominated as one of 32 finalists at the 2010 &lt;a href="http://en.wikipedia.org/wiki/IndieCade"&gt;IndieCade&lt;/a&gt; festival for independent developers, ultimately winning the "Sound" award.&lt;/p&gt;  &lt;p&gt;&lt;sup&gt;&amp;nbsp;&lt;/sup&gt;&lt;/p&gt;  &lt;p&gt;&lt;iframe src="http://player.vimeo.com/video/31446564?title=0&amp;amp;byline=0&amp;amp;portrait=0" width="620" height="300" frameborder="0" webkitallowfullscreen="" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://vimeo.com/31446564"&gt;Limbo Game Play&lt;/a&gt; from &lt;a href="http://vimeo.com/varunpant"&gt;varun pant&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/VarunPant/~4/RyuKUcM4bWE" height="1" width="1"/&gt;</content>
              <category label="animation" scheme="http://varunpant.com/topics/animation/1" term="animation" />
              <category label="simulation,fun" scheme="http://varunpant.com/topics/simulation,fun/1" term="simulation,fun" />
    <feedburner:origLink>http://varunpant.com/posts/limbo-game-review</feedburner:origLink></entry>
    <entry>
        <title>VPS Hosting Past and Present</title>
        <link href="http://feedproxy.google.com/~r/VarunPant/~3/H8FJqkSvVAY/vps-hosting-past-and-present" rel="alternate" />
        <id>http://varunpant.com/posts/vps-hosting-past-and-present</id>
        <published>2011-09-27T07:26:00z</published>
        <updated>2011-09-27T07:26:00z</updated>
        <author><name>varun pant</name>
        </author><content type="html">&lt;p&gt;I had been hosting this blog in the past&amp;nbsp; for an extremely competitive (read cheap) price &lt;a href="http://www.arvixe.com/asp_net_web_hosting"&gt;here&lt;/a&gt; at &lt;a href="http://www.arvixe.com/"&gt;Arvixe&lt;/a&gt; . I was using ASP.net based blogging software called &lt;a href="http://www.dotnetblogengine.net/"&gt;BlogEngine&lt;/a&gt;. over and all I will describe my experience as pleasant. Arvixe is a great Hosting Provider, has good up time and has plans which are easy on the pocket, and does almost all the common stuff like emails and cpanel ,blah blah that other hosting provider do, but kinda does it on a low price. I was a happy blogger for an year although I could only manage close to 8 post and and few &lt;a href="http://varunpant.com/lab"&gt;demos&lt;/a&gt; in that time.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Enter &lt;a href="http://www.linode.com/"&gt;Linode&lt;/a&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Linode is a different beast than Arvixe, this baby gives you way more control than any conventional  hosting provider(shared) or a VPS provider generally gives you , and this is done by a custom made dash board panel which has a plethora of features, now Arvixe also has other plans which will end up giving you a dedicated hosting (VPS) and I bet they would be better than most others in the similar category, but Linode (a different league) is like Amazon Elastic,but only for Linux operating system like Ubuntu (debian), Fedora(centos) etc or rather dedicated for them, Linode means Linux Node anyways ;) &lt;/p&gt;  &lt;p&gt;If I quote them verbatim:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;We're a VPS hosting company built upon one simple premise: provide the best possible tools and services to those that know what they need — better hosting.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;and this is pretty true , they have many features which can be found &lt;a href="http://www.linode.com/features.cfm"&gt;here&lt;/a&gt;. They also do a Getting Started video &lt;a href="http://www.linode.com/features.cfm"&gt;here&lt;/a&gt;, if you still have questions look &lt;a href="http://www.linode.com/why.cfm"&gt;here&lt;/a&gt; and &lt;a href="http://www.linode.com/faq.cfm"&gt;here&lt;/a&gt;, they also have an Irc channel and other discussions and bulletin boards which can be reached through &lt;a href="http://www.linode.com/community/"&gt;this&lt;/a&gt; page.&lt;/p&gt;  &lt;p&gt;Linode has six data &lt;a href="http://www.linode.com/avail/"&gt;centers&lt;/a&gt; around the world , so one can switch between them either while setting up an account or even migrate like a hot swap later on, depending on what &lt;a href="http://www.linode.com/speedtest/"&gt;speed&lt;/a&gt; they would like to get for dedicated regional customers, they do a &lt;a href="http://blog.linode.com/"&gt;blog&lt;/a&gt; as well.&lt;/p&gt;  &lt;p&gt;Linode does a lotta stuff and does is good, but the bang on the buck is that they have a kinda “&lt;a href="http://library.linode.com/"&gt;do it yourself library&lt;/a&gt;”, which is pretty vast, quality and covers every thing you need to know, or at least the important bits. I have lately spend hours just browsing through it, this library will have “getting started” information and stuff which you need to do to get cracking!!.&lt;/p&gt;  &lt;p&gt;By the way did I mention that since I had purchased a good(slightly expensive than earlier )&lt;a href="https://manager.linode.com/signup/#plans"&gt;plan&lt;/a&gt; from them I also decided to write my own blog,I have used python and SQLite so that it stays light weight and have used WSGI . I will soon be open sourcing it at &lt;a href="https://github.com/varunpant/Message"&gt;git hub&lt;/a&gt;. I used &lt;a href="http://bottlepy.org/docs/dev/"&gt;Bottle.py&lt;/a&gt;, micro web-framework to build it so I will be calling the software Message, “Message in the bottle…..”, rings any silly bell anywhere ?? &lt;/p&gt;  &lt;p&gt;I wish my very best to Linode team and hope some of you linux ninjas would like to give it a try someday.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/VarunPant/~4/H8FJqkSvVAY" height="1" width="1"/&gt;</content>
              <category label=".net" scheme="http://varunpant.com/topics/.net/1" term=".net" />
              <category label="general,web,linode" scheme="http://varunpant.com/topics/general,web,linode/1" term="general,web,linode" />
    <feedburner:origLink>http://varunpant.com/posts/vps-hosting-past-and-present</feedburner:origLink></entry>
    <entry>
        <title>Web Sockets in HTML 5</title>
        <link href="http://feedproxy.google.com/~r/VarunPant/~3/9EIaCITR5X8/web-sockets-in-html-5" rel="alternate" />
        <id>http://varunpant.com/posts/web-sockets-in-html-5</id>
        <published>2011-01-10T23:07:00z</published>
        <updated>2011-01-10T23:07:00z</updated>
        <author><name>varun pant</name>
        </author><content type="html">&lt;p&gt;HTML5 &lt;a href="http://en.wikipedia.org/wiki/WebSockets" target="_blank"&gt;WebSockets&lt;/a&gt;, defines a full-duplex communication channel that operates through a single socket over the web. &lt;strong&gt;WebSocket&lt;/strong&gt; is not just another incremental enhancement to conventional HTTP communications, it represents a large advance, especially for real-time, &lt;a href="http://en.wikipedia.org/wiki/Event-driven_programming" target="_blank"&gt;event driven&lt;/a&gt; web applications.&lt;/p&gt;
&lt;p&gt;Normally when a browser visits a web page, an HTTP request is sent to the web server that hosts that page. The web server acknowledges this request and sends back the response. In many cases—for example, for stock prices, news reports, ticket sales, traffic patterns, medical device readings, and so on—the response could be stale by the time the browser renders the page.&lt;/p&gt;
&lt;p&gt;Current attempts to provide real-time web applications largely revolve around polling and other server-side push technologies, the most notable of which is "&lt;a href="http://en.wikipedia.org/wiki/Comet_(programming)" target="_blank"&gt;Comet&lt;/a&gt;", which delays the completion of an HTTP response to deliver messages to the client.&lt;/p&gt;
&lt;p&gt;There are many open source implementation of Http Push, one of my personal favorite is &lt;a href="http://www.ape-project.org/" target="_blank"&gt;APE&lt;/a&gt; i.e. Ajax Push Engine.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Update&lt;/span&gt;&lt;/strong&gt;: Microsoft has added a small demo of HTML5 support , it comes as an extension to WCF (Windows communication foundation) .The links can be found &lt;a href="http://connect.microsoft.com/VisualStudio/feedback/details/520742/use-of-html-5-web-sockets-for-wcf-duplex-services-and-silverlight" target="_blank"&gt;here&lt;/a&gt;, &lt;a href="http://html5labs.interoperabilitybridges.com/media/1165/readme.htm" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/magazine/ee309879.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is still no news of Microsoft adding this feature in IE 9, at the time of writing this post, only Firefox 4, Chrome 4, Safari 5 and Opera 11 and above have support for this feature.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Update&lt;/span&gt;&lt;/strong&gt;: Due to security flaw Firefox and Opera have disabled their support for Web Sockets, more info can be found &lt;a href="http://www.webmonkey.com/2010/12/security-flaws-force-firefox-opera-to-turn-off-websockets/" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For those interested here is the &lt;a href="http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-03" target="_blank"&gt;draft&lt;/a&gt; , official &lt;a href="http://websocket.org/" target="_blank"&gt;website&lt;/a&gt;, the &lt;a href="http://dev.w3.org/html5/websockets/" target="_blank"&gt;API&lt;/a&gt; and a nice &lt;a href="http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-today/" target="_blank"&gt;tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To establish a WebSocket connection, the client and server upgrade from the HTTP protocol to the WebSocket protocol during their initial handshake, as shown in below, note that this connection description represents draft 76 of the protocol, the connection handshake may change during future specification revisions.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;From client to server&lt;/span&gt;:         &lt;br&gt;&lt;/strong&gt;GET /demo HTTP/1.1       &lt;br&gt;Host: example.com       &lt;br&gt;Connection: Upgrade       &lt;br&gt;Sec-WebSocket-Key2: 12998 5 Y3 1 .P00       &lt;br&gt;Sec-WebSocket-Protocol: sample       &lt;br&gt;Upgrade: WebSocket       &lt;br&gt;Sec-WebSocket-Key1: 4@1 46546xW%0l 1 5       &lt;br&gt;Origin: &lt;a href="http://example.com"&gt;http://example.com&lt;/a&gt; &lt;br&gt;[8-byte security key]&lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;From server to client&lt;/span&gt;&lt;/strong&gt;:       &lt;br&gt;HTTP/1.1 101 WebSocket Protocol Handshake       &lt;br&gt;Upgrade: WebSocket       &lt;br&gt;Connection: Upgrade       &lt;br&gt;WebSocket-Origin: &lt;a href="http://example.com"&gt;http://example.com&lt;/a&gt; &lt;br&gt;WebSocket-Location: ws://example.com/demo       &lt;br&gt;WebSocket-Protocol: sample       &lt;br&gt;[16-byte hash response]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I was trying to find an alternative which is comfortable enough to be used in my pet projects in Microsoft Tech stack, at the time of writing I couldn’t any so I here it is my very own HTTP Web Socket server written in .Net via C#, this implementation does not use WCF and is basically written using HTTP Async Sockets, the client API is pretty straight forward&lt;/p&gt;
&lt;figure&gt;
    &lt;figcaption&gt;Snippet&lt;/figcaption&gt;
    &lt;pre&gt;        &lt;code class="brush: javascript language-javascript"&gt; 
            var url = "ws://localhost:999&amp;amp;rdquo"
			var sock = new WebSocket(url);
			sock.onopen = function(){
			    log("open");
			    sock.send("Message….");
			}
			sock.onmessage = function(e){
			    log(e.data);
			}
			sock.onclose = function(e){
			    log(" closed");
			}
        &lt;/code&gt;
    &lt;/pre&gt;
&lt;/figure&gt;

&lt;p&gt;and that's it!!!&lt;/p&gt;
&lt;p&gt;I plan to add some more examples and perhaps come with something more concrete later, till then I hope you enjoy using this code sample and enhancing it as you desire.&lt;/p&gt;
&lt;a href="http://www.varunpant.com/demo/WebSocketServer.rar" rel="nofollow" class="download"&gt;A complete example in c# can be downloaded from here&lt;br&gt;&lt;span&gt;Requires visual studio 2010&lt;/span&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/VarunPant/~4/9EIaCITR5X8" height="1" width="1"/&gt;</content>
              <category label="programming" scheme="http://varunpant.com/topics/programming/1" term="programming" />
              <category label="websockets,httppush,.net,javascript" scheme="http://varunpant.com/topics/websockets,httppush,.net,javascript/1" term="websockets,httppush,.net,javascript" />
    <feedburner:origLink>http://varunpant.com/posts/web-sockets-in-html-5</feedburner:origLink></entry>
    <entry>
        <title>Water Simulation</title>
        <link href="http://feedproxy.google.com/~r/VarunPant/~3/F5DXC56RtTY/water-simulation" rel="alternate" />
        <id>http://varunpant.com/posts/water-simulation</id>
        <published>2010-09-25T14:55:00z</published>
        <updated>2010-09-25T14:55:00z</updated>
        <author><name>varun pant</name>
        </author><content type="html">&lt;p&gt;Its been a while since my last post, had been busy with office work…sigh!!!&lt;/p&gt;
&lt;p&gt;Anyways, I was poking around web to come up with interesting water simulation techniques, as you could see in many games these days, so I did find a reference to an old C-based technique, after little refinement, what I have is a water simulation which uses a very old algorithm based on two &lt;a href="http://en.wikipedia.org/wiki/Heightmap" target="_blank"&gt;heightmaps&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As always it’s a&amp;nbsp; grid based animation which divides the screen into&amp;nbsp; a mesh(more slices better this simulation looks), I use a jagged array in c# to do this (load it with a texture of 640 X 480 dimension ), to animate I use another array of same dimensions, now to make every thing move I kinda do something like this&lt;/p&gt;
&lt;figure&gt;
        &lt;figcaption&gt;Snippet&lt;/figcaption&gt;
        &lt;pre&gt;            &lt;code class="brush: csharp language-csharp"&gt; 
               for (int y = 1; y &amp;lt; 479; y++) {
                    for (int x = 1; x &amp;lt; 639; x++) {
                        this.currentState[x, y] = ((this.oldState[(x - 1), y] + this.oldState[(x + 1), y] + this.oldState[x, (y + 1)] + this.oldState[x, (y - 1)] &amp;gt;&amp;gt; 1) - this.currentState[x, y]);
                        this.currentState[x, y] -= (this.currentState[x, y] &amp;gt;&amp;gt; 7);
                        int data = (short)(1024 - this.currentState[x, y]);
                        int a = (x - 640) * data / 1024 + 640;
                        int b = (y - 480) * data / 1024 + 480;
                        if (a &amp;gt;= 640) a = 639;
                        if (a &amp;lt; 0) a = 0;
                        if (b &amp;gt;= 480) b = 479;
                        if (b &amp;lt; 0) b = 0;
                        int textOffset = x + y * 640;
                        bmp.Pixels[textOffset] = texture[(a + b * 640)];
                    } 
                }
            &lt;/code&gt;
        &lt;/pre&gt;
    &lt;/figure&gt;
&lt;p&gt;The choice of display entity(acting as viewport and display canvas) is &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap.aspx" target="_blank"&gt;WritableBitmap&lt;/a&gt;,&amp;nbsp; and rest is pretty much fun to play.&lt;/p&gt;

 
&lt;a href="http://varunpant.com/demo/Silverlight/water.html" class="download"&gt;Click here to watch demo &lt;br&gt;&lt;span&gt;Requires Silverlight 3 or above&lt;/span&gt;&lt;/a&gt;

&lt;p&gt;
&lt;object width="400px" height="200px" type="application/x-silverlight-2" data="data:application/x-oleobject;base64,QfXq3+HzJEysrJnDBxUISgAJAADYEwAA2BMAAAwAAAB3AGgAaQB0AGUAAAAAAAAAAAAAAAAAAABkAAAAaAB0AHQAcAA6AC8ALwB2AGEAcgB1AG4AcABhAG4AdAAuAGMAbwBtAC8AZABlAG0AbwAvAFMAaQBsAHYAZQByAGwAaQBnAGgAdAAvAEYAbAB1AGkAZABlAGUALgB4AGEAcAAAADwAAAAAAAAAJgAAAG8AbgBTAGkAbAB2AGUAcgBsAGkAZwBoAHQARQByAHIAbwByAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAGAAAADQALgAwAC4ANQAwADgAMgA2AC4AMAAAAAoAAAB0AHIAdQBlAAAAAAAAAAAAAAAAAAAA"&gt;
&lt;param name="source" value="http://varunpant.com/demo/Silverlight/Fluidee.xap"&gt;
&lt;param name="onError" value="onSilverlightError"&gt;
&lt;param name="background" value="white"&gt;
&lt;param name="minRuntimeVersion" value="4.0.50826.0"&gt;
&lt;param name="autoUpgrade" value="true"&gt;
&lt;/object&gt;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/VarunPant/~4/F5DXC56RtTY" height="1" width="1"/&gt;</content>
              <category label="programming" scheme="http://varunpant.com/topics/programming/1" term="programming" />
              <category label="silverlight,animation,simulation,water" scheme="http://varunpant.com/topics/silverlight,animation,simulation,water/1" term="silverlight,animation,simulation,water" />
    <feedburner:origLink>http://varunpant.com/posts/water-simulation</feedburner:origLink></entry>
    <entry>
        <title>Liquid Particles</title>
        <link href="http://feedproxy.google.com/~r/VarunPant/~3/G0Z4jUn_7xk/liquid-particles" rel="alternate" />
        <id>http://varunpant.com/posts/liquid-particles</id>
        <published>2010-07-03T18:58:00z</published>
        <updated>2010-07-03T18:58:00z</updated>
        <author><name>varun pant</name>
        </author><content type="html">&lt;p&gt;After ages of constantly being one of the most used browser as well as a serious pain in Butt!!! IE is finally about to mature into something good and perhaps a useful software , with its support to &lt;a href="http://www.quirksmode.org/blog/archives/2010/06/more_ie9_goodne.html" target="_blank"&gt;most&lt;/a&gt; of the standards being used today , IE will join back the league of web 3.0 browsers, hopefully very soon&lt;/p&gt;
&lt;p&gt;So I was going through various experiments done with Canvas and came across a great example on &lt;a href="http://spielzeugz.de/html5/liquid-particles.html" target="_blank"&gt;Liquid Particle physics simulation&lt;/a&gt;, which amazingly is written in JavaScript and Canvas element, I was so mesmerized by the application that I had to port it to &lt;a href="http://msdn.microsoft.com/en-us/bb187358.aspx" target="_blank"&gt;SilverLight&lt;/a&gt;, using &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap.aspx" target="_blank"&gt;WritableBitmap&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.varunpant.com/static/resources/lqdPrticle.png"&gt;
&lt;img title="Liquid Particle" src="http://www.varunpant.com/static/resources/lqdPrticle_thumb.png" alt="Liquid Particle" width="584" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;a href="http://varunpant.com/demo/ParticlesSilverLight.html" class="download"&gt;Click Here to watch Demo. &lt;br&gt;&lt;span&gt;Needs silverlight 3 or higher&lt;/span&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/VarunPant/~4/G0Z4jUn_7xk" height="1" width="1"/&gt;</content>
              <category label="programming" scheme="http://varunpant.com/topics/programming/1" term="programming" />
              <category label="silverlight,simulation,fun,html5,particles" scheme="http://varunpant.com/topics/silverlight,simulation,fun,html5,particles/1" term="silverlight,simulation,fun,html5,particles" />
    <feedburner:origLink>http://varunpant.com/posts/liquid-particles</feedburner:origLink></entry>
    <entry>
        <title>Image Carousel</title>
        <link href="http://feedproxy.google.com/~r/VarunPant/~3/Q3DEwcbUstY/image-carousel" rel="alternate" />
        <id>http://varunpant.com/posts/image-carousel</id>
        <published>2010-06-29T00:51:00z</published>
        <updated>2010-06-29T00:51:00z</updated>
        <author><name>varun pant</name>
        </author><content type="html">&lt;p&gt;Here is another of many JavaScript based Image Carousel, I had seen many similar to these made in SilverLight and Flash, I came across a wonderful &lt;a href="http://www.shinedraw.com/animation-effect/flash-vs-silverlight-image-carousel/" target="_blank"&gt;carousel&lt;/a&gt; made in SilverLight sometimes back which was very fluid in behavior and could easily be customized and configured to take various shape and form.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.varunpant.com/static/resources/carousel.png"&gt;&lt;img title="carousel" src="http://www.varunpant.com/static/resources/carousel_thumb.png" alt="carousel" width="474" height="274"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have managed to port it to JavaScript, it works best on chrome or FF, hope this would be fun to play with.&lt;/p&gt;
&lt;p&gt;Enjoy!!!&lt;/p&gt;
&lt;a href="http://varunpant.com/demo/Carousel.html" class="download"&gt;Click here to watch it in action&lt;br&gt;&lt;span&gt;Pure javascript sample&lt;/span&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/VarunPant/~4/Q3DEwcbUstY" height="1" width="1"/&gt;</content>
              <category label="programming" scheme="http://varunpant.com/topics/programming/1" term="programming" />
              <category label="javascript,fun,utility,carousel,fluid,css" scheme="http://varunpant.com/topics/javascript,fun,utility,carousel,fluid,css/1" term="javascript,fun,utility,carousel,fluid,css" />
    <feedburner:origLink>http://varunpant.com/posts/image-carousel</feedburner:origLink></entry>
    <entry>
        <title>I-Phone Scroll</title>
        <link href="http://feedproxy.google.com/~r/VarunPant/~3/xlTOJN_CQ74/i-phone-scroll" rel="alternate" />
        <id>http://varunpant.com/posts/i-phone-scroll</id>
        <published>2010-06-18T18:23:00z</published>
        <updated>2010-06-18T18:23:00z</updated>
        <author><name>varun pant</name>
        </author><content type="html">&lt;p&gt;One of the amazing features of i-phone user interface is smooth panning/scrolling animation.&lt;/p&gt;
&lt;p&gt;I-phone “List Scrolling” perhaps gives a very funky and usable List –View to its users and allows them to scroll up and down the interface without any need of a scroll bar.&lt;/p&gt;
&lt;p&gt;This interface is&amp;nbsp; sensitive to the push speed and also shows traces of resilience.&lt;/p&gt;
&lt;p&gt;I have been experimenting with various techniques to bring out similar effect using JavaScript and HTML, I am not quite sure if this would be useful in its present form but with some modifications may be this sample could prove its worthiness somewhere.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.varunpant.com/static/resources/iphone_1.png"&gt;&lt;img title="iphone" src="http://www.varunpant.com/static/resources/iphone_thumb_1.png" alt="iphone" width="164" height="244"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The code involved is also very little.&lt;/p&gt;
&lt;figure&gt;
    &lt;figcaption&gt;Snippet&lt;/figcaption&gt;
    &lt;pre&gt;        &lt;code class="brush: javascript language-javascript"&gt; 
    var scroll = {
    down: false,
    verticalOffset: -5,
    ym: 0,
    decay: .93,
    mdDecay: 0.27,
    speedOffset: 0.4,
    sprinessOffset: 0.08,
    _velocity: 0,
    _mouseDownY: 0,
    $: function (id) {
        return document.getElementById(id);
    },
    /* --- events --- */
    addEvent: function (o, e, f) {
        if (window.addEventListener) o.addEventListener(e, f, false);
        else if (window.attachEvent) r = o.attachEvent('on' + e, f);
    },
    init: function () {
        setInterval(scroll.compositiontarget_rendering, 30);

        scroll.verticalOffset = scroll.$('scrollMe').offsetTop;

        scroll.addEvent(scroll.$('scrollMe'), 'mousedown', function (e) {
            scroll.$('scrollMe').style.cursor = 'move';
            if (!scroll.down) {
                scroll.down = true;
                scroll.ym = e.clientY;
                scroll._mouseDownY = scroll.$('scrollMe').offsetTop;
            }

            if (e.preventDefault) e.preventDefault();
        });

        scroll.addEvent(scroll.$('scrollMe'), 'mouseup', function () {
            scroll.down = false;
            scroll.$('scrollMe').style.cursor = 'default';

        });


        scroll.addEvent(scroll.$('scrollMe'), 'mousemove', function (e) {
            if (scroll.down) {
                if (scroll.canScrollFurther()) scroll.$('scrollMe').style.top = (scroll._mouseDownY + (e.clientY - scroll.ym)) + 'px';
                // update the velocity
                scroll._velocity += ((e.clientY - scroll.ym) * scroll.speedOffset);
            }

        });

        document.onselectstart = function () {
            return false;
        }
    },
    compositiontarget_rendering: function () {
        // decay the velocity
        if (scroll.down) {
            scroll._velocity *= scroll.mdDecay;
        } else {
            scroll._velocity *= scroll.decay;

            var screenHeight = scroll.$('screen').offsetHeight;
            var scrolRegionHeight = scroll.$('scrollMe').offsetHeight;

            var y = scroll.$('scrollMe').offsetTop - scroll.verticalOffset;
            var spriness = 0;

            // calculate a spriness when the text moves over the canvas size
            if (y &amp;gt; 0) {
                spriness = -y * scroll.sprinessOffset;
            } else if (y + scrolRegionHeight &amp;lt; screenHeight) {
                spriness = ((screenHeight - scrolRegionHeight - y) * scroll.sprinessOffset);
            }
            if (!scroll.canScrollFurther()) {
                scroll._velocity = -(scroll._velocity / 8)
            }
            scroll.$('scrollMe').style.top = (y + scroll._velocity + spriness) + 'px';
        }


    },
    canScrollFurther: function () {
        var _top = scroll.$('scrollMe').offsetTop;
        var bottom = _top + scroll.$('scrollMe').offsetHeight;
        var center = (scroll.$('screen').offsetTop + scroll.$('screen').offsetHeight) / 2;
        return (_top &amp;lt; center &amp;amp;&amp;amp; bottom &amp;gt; center);
    }
}; 
        &lt;/code&gt;
    &lt;/pre&gt;
&lt;/figure&gt;
&lt;a href="http://varunpant.com/demo/Demo.html" class="download"&gt;Click here to watch demo&lt;br&gt;&lt;span&gt;Pure JavaScript and HTML Sample&lt;/span&gt;&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/VarunPant/~4/xlTOJN_CQ74" height="1" width="1"/&gt;</content>
              <category label="programming" scheme="http://varunpant.com/topics/programming/1" term="programming" />
              <category label="javascript,animation,fun,iphone scroll" scheme="http://varunpant.com/topics/javascript,animation,fun,iphone scroll/1" term="javascript,animation,fun,iphone scroll" />
    <feedburner:origLink>http://varunpant.com/posts/i-phone-scroll</feedburner:origLink></entry>
    <entry>
        <title>Notepad++ with Python</title>
        <link href="http://feedproxy.google.com/~r/VarunPant/~3/nN1pQ4stOVE/notepad-with-python" rel="alternate" />
        <id>http://varunpant.com/posts/notepad-with-python</id>
        <published>2010-06-15T20:09:00z</published>
        <updated>2010-06-15T20:09:00z</updated>
        <author><name>varun pant</name>
        </author><content type="html">&lt;p&gt;After reading an excellent article by &lt;a href="http://weblogs.asp.net/rashid/" target="_blank"&gt;Kazi Manzur Rashid&lt;/a&gt; on setting up a development environment for Iron Ruby using &lt;a href="http://notepad-plus-plus.org/" target="_blank"&gt;Notepad++&lt;/a&gt; , I was immediately struck with an idea of using the same excellent tool with Python 2.6.&lt;/p&gt;
&lt;p&gt;Now don&amp;rsquo;t get me wrong here, theoretically there is nothing wrong with IDLE, but having a light weight IDE for those who don&amp;rsquo;t want to use &lt;a href="http://pydev.org/" target="_blank"&gt;Pydev&lt;/a&gt; plugin for &lt;a href="http://www.aptana.com/" target="_blank"&gt;Aptana&lt;/a&gt; or &lt;a href="http://www.eclipse.org/" target="_blank"&gt;Eclipse&lt;/a&gt;, I think Notepad++ is indeed a nice little dev tool.&lt;/p&gt;
&lt;p&gt;One of the amazing capabilities in Notepad++ is that one can assign shortcuts like(Cntrl + F5) and debug/interpret python script with python interpreter.&lt;/p&gt;
&lt;p&gt;In order to Run python script from Run menu in Notepad++ you must Open Run &amp;gt; Run (or simply press F5), in the window that opens&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://www.varunpant.com/static/resources/notepad_Run.png"&gt;&lt;img   title="notepad_Run" src="http://www.varunpant.com/static/resources/notepad_Run_thumb.png"  alt="notepad_Run" width="400" height="279" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;figure&gt;
    &lt;figcaption&gt;&lt;/figcaption&gt;
    &lt;pre&gt;
        &lt;code class="brush: javascript language-javascript"&gt; 
           cmd /K "$(FULL_CURRENT_PATH)"
        &lt;/code&gt;
    &lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;this command assumes that Python path i.e.&lt;/p&gt;
&lt;figure&gt;
    &lt;figcaption&gt;&lt;/figcaption&gt;
    &lt;pre&gt;
        &lt;code class="brush: javascript language-javascript"&gt; 
           c:/PythonXX/Python.exe
        &lt;/code&gt;
    &lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;figure&gt;
    &lt;figcaption&gt;&lt;/figcaption&gt;
    &lt;pre&gt;
        &lt;code class="brush: javascript language-javascript"&gt; 
          c:/PythonXX/Pythonw.exe
        &lt;/code&gt;
    &lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;(If you don&amp;rsquo;t like console) is added in your Environment variables , if not you couldeither go to:&lt;/p&gt;
&lt;figure&gt;
    &lt;figcaption&gt;&lt;/figcaption&gt;
    &lt;pre&gt;
        &lt;code class="brush: javascript language-javascript"&gt; 
          My Computer -&amp;gt; Properties -&amp;gt; Advanced -&amp;gt; Environment Variables -&amp;gt; System Variables -&amp;gt; PATH &amp;ndash;&amp;gt; Edit
        &lt;/code&gt;
    &lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;and add this path there or use&lt;/p&gt;
&lt;figure&gt;
    &lt;figcaption&gt;&lt;/figcaption&gt;
    &lt;pre&gt;
        &lt;code class="brush: javascript language-javascript"&gt; 
         cmd /k C:\Python26\python.exe 
        &lt;/code&gt;
    &lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;then press save after putting in a friendly name and assigning a key board shortcut for example CNTRL + F5.&lt;/p&gt;
&lt;p&gt;You could now see your entry in Run drop down menu at the last, incase you want to edit or remove this go to Settings&amp;gt;Shortcut mapper and press Run Commands tab and then right click to choose options from context menu and your all set.&lt;/p&gt;
&lt;p&gt;Hope this helps :)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/VarunPant/~4/nN1pQ4stOVE" height="1" width="1"/&gt;</content>
              <category label="fun" scheme="http://varunpant.com/topics/fun/1" term="fun" />
              <category label="general,python,notepad++" scheme="http://varunpant.com/topics/general,python,notepad++/1" term="general,python,notepad++" />
    <feedburner:origLink>http://varunpant.com/posts/notepad-with-python</feedburner:origLink></entry>

</feed>

