<?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>Veera Sundar &#187; How To</title>
	<atom:link href="http://veerasundar.com/blog/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://veerasundar.com/blog</link>
	<description>Java / Web developer</description>
	<lastBuildDate>Tue, 07 Feb 2012 17:10:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Shortcut to console.log</title>
		<link>http://veerasundar.com/blog/2012/02/shortcut-to-console-log/</link>
		<comments>http://veerasundar.com/blog/2012/02/shortcut-to-console-log/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 17:10:46 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=2911</guid>
		<description><![CDATA[Sometimes, I&#8217;m just lazy to type &#8216;console.log&#8216; to print some data on the Firebug console. I often wanted to have a simple echo() function that spits whatever it gets to the console. So, in every single JavaScript project I work on, I used to have this utility method: function echo(obj){ console.log(obj); } ... echo('Hello World'); [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Sometimes, I&#8217;m just lazy to type &#8216;<em>console.log</em>&#8216; to print some data on the Firebug console. I often wanted to have a simple <em>echo() </em>function that spits whatever it gets to the console.</p>
<p>So, in every single JavaScript project I work on, I used to have this utility method:</p>
<pre class="brush:javascript">function echo(obj){
  console.log(obj);
}
...
echo('Hello World');</pre>
<p>It worked well. But there was a problem. The printed message on the console will always show the line number of <em>console.log  </em>as the source line number instead of showing the where exactly the <em>echo() </em>function is invoked.</p>
<p>There&#8217;s another way to solve this. Instead of creating a new <em>echo() </em>method, I just need to bind it to the existing <em>console.log() </em>to a variable and the logging works like a charm. Like this,</p>
<pre class="brush:javascript">window.echo = console.log.bind(console);
window.oops = console.error.bind(console);
...
echo('hello world');
...
oops('I did it again');</pre>
<p>The the methods became shorter and the correct line numbers printed on the console!</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2011/11/sorting-an-array-of-custom-objects-in-javascript/" title="Sorting an array of custom objects in JavaScript">Sorting an array of custom objects in JavaScript</a></li><li><a href="http://veerasundar.com/blog/2011/10/intercepting-onclick-event-in-javascript-using-jquery/" title="Intercepting onclick event in JavaScript using JQuery">Intercepting onclick event in JavaScript using JQuery</a></li><li><a href="http://veerasundar.com/blog/2010/12/javascript-getattribute-method/" title="JavaScript getAttribute method">JavaScript getAttribute method</a></li><li><a href="http://veerasundar.com/blog/2010/09/javascript-for-loops/" title="JavaScript For loops">JavaScript For loops</a></li><li><a href="http://veerasundar.com/blog/2008/08/how-to-create-a-horizontal-navigation-website-using-jquery/" title="How to create a horizontal navigation website using JQuery.">How to create a horizontal navigation website using JQuery.</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2012/02/shortcut-to-console-log/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Every single pixel counts</title>
		<link>http://veerasundar.com/blog/2012/02/every-single-pixel-counts/</link>
		<comments>http://veerasundar.com/blog/2012/02/every-single-pixel-counts/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 13:22:24 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[compiz]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[terminator]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=2888</guid>
		<description><![CDATA[At any given point of time, you can find at least 4 windows/editors opened on my screen. As a web developer, it is not unusual for me to work on several files at the same time. So, to reduce the Alt+Tabbing, I try to have most of the windows visible on the screen. Following is [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>At any given point of time, you can find at least 4 windows/editors opened on my screen. As a web developer, it is not unusual for me to work on several files at the same time. So, to reduce the <em>Alt+Tabbing, </em>I try to have most of the windows visible on the screen. Following is a list of tools that help me to do so.</p>
<h2>1. Two monitor setup</h2>
<p>Along with my laptop screen, I have setup one additional monitor. This gives me lots of screen space which I can make use of. In fact, I would like to setup one more monitor too, but the limitation of laptop graphics card holding me back.</p>
<h2>2. Grid plugin in Compiz</h2>
<p>I&#8217;m running Ubuntu on my laptop. I have installed Compiz which provides several plugins to fine tune the Ubuntu UI. <strong>Grid </strong>is one such plugin for re-sizing windows.</p>
<p>Once enabled, you can press <em>Ctrl + Alt + &lt;KeyPad 4&gt;</em> to re-size the current window and fit it on the left side of the screen. You can repeatedly press the same key combo to switch between different window sizes. There are other keyboard shortcuts too which positions the current window in different directions.</p>
<p style="text-align: center;"><a href="http://veerasundar.com/blog/wp-content/uploads/2012/02/grid.png"><img class="aligncenter  wp-image-2896" title="grid" src="http://veerasundar.com/blog/wp-content/uploads/2012/02/grid.png" alt="Compiz Grid" width="560" height="305" /></a></p>
<p>Unfortunately, after upgrading to Ubuntu 11.10, the Grid plugin does not work correctly. There&#8217;s a <a title="Compiz Grid feature under Unity stopped functioning properly" href="https://bugs.launchpad.net/ubuntu/+source/unity/+bug/879218" target="_blank">bug raised</a> for this and hopefully it&#8217;ll be fixed and the world will come to an order.</p>
<h2>3. Terminator</h2>
<p><strong>Terminator </strong>lets me to run multiple terminals inside a single window. Initially it opens with a single terminal window. Then, I could split up that window either horizontally or vertically to get additional terminals. I can go further and split them again until I get the number of terminal I want. Pretty neat!</p>
<p style="text-align: center;"><a href="http://veerasundar.com/blog/wp-content/uploads/2012/02/terminator.png"><img class="aligncenter  wp-image-2897" title="terminator" src="http://veerasundar.com/blog/wp-content/uploads/2012/02/terminator.png" alt="Terminator Ubuntu" width="560" height="243" /></a></p>
<p>You can download Terminator from the Ubuntu Software center.</p>
<h2>4. Eclipse split editors</h2>
<p>Fortunately, Eclipse comes with a built-in support for having two editors side-by-side. Just drag the editor until it sits on its own space and you&#8217;re all set.</p>
<p>Now the only things that concerns me is the default file manager in Ubuntu. I do not feel the Nautilus file manager is that effective. For instance, I couldn&#8217;t copy the current path name or split the screens to have two folders opened at the same time.</p>
<p>I&#8217;m still looking for a workaround for this. Would appreciate if you are using any better file manager than Nautilus, please leave a comment! <img src='http://veerasundar.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Edit: </strong>Nautilus already does both the things. Thanks to <a href="http://leafac.com/" rel="external nofollow">Leandro Facchinetti</a> for the awesome tip (in the comments section)!</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2012/01/fix-for-viewing-tamil-font-in-chrome-ubuntu/" title="Fix for viewing Tamil font in Chrome &#8211; Ubuntu">Fix for viewing Tamil font in Chrome &#8211; Ubuntu</a></li><li><a href="http://veerasundar.com/blog/2012/01/java-lang-verifyerror-expecting-a-stackmap-frame-at-branch-target-jdk-7/" title="Java.lang.VerifyError: Expecting a stackmap frame at branch target &#8211; JDK 7">Java.lang.VerifyError: Expecting a stackmap frame at branch target &#8211; JDK 7</a></li><li><a href="http://veerasundar.com/blog/2012/01/how-to-create-a-new-image-in-gimp-with-the-size-of-clipboard-image/" title="How to create a new image in GIMP with the size of clipboard image">How to create a new image in GIMP with the size of clipboard image</a></li><li><a href="http://veerasundar.com/blog/2011/10/easy-way-for-setting-up-the-lamp-stack-in-ubuntu-linux-command-line/" title="Easy way for setting up the LAMP stack in Ubuntu Linux command line">Easy way for setting up the LAMP stack in Ubuntu Linux command line</a></li><li><a href="http://veerasundar.com/blog/2011/08/the-problem-with-the-atm-menus/" title="The problem with the ATM Menus">The problem with the ATM Menus</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2012/02/every-single-pixel-counts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Backbone JS &#8211; Hello World tutorial</title>
		<link>http://veerasundar.com/blog/2012/01/backbone-js-hello-world-tutorial/</link>
		<comments>http://veerasundar.com/blog/2012/01/backbone-js-hello-world-tutorial/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 15:39:11 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[backbone]]></category>
		<category><![CDATA[helloworld]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=2855</guid>
		<description><![CDATA[Backbone.js is recently getting lots of traction among the web developers because of its ability to organize the JavaScript code. It provides the structure (Model-View) around which we can build our JavaScript heavy web applications. I have started learning backbone.js for my personal project and I&#8217;m going to document my learning along the way. Let&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://documentcloud.github.com/backbone/">Backbone.js</a> is recently getting lots of traction among the web developers because of its ability to organize the JavaScript code. It provides the structure (Model-View) around which we can build our JavaScript heavy web applications.</p>
<p>I have started learning backbone.js for my personal project and I&#8217;m going to document my learning along the way. Let&#8217;s start with a simplest possible example: A Hello World tutorial in Backbone.js (duh!)</p>
<p>You are welcomed to point out any anti-patterns/mistakes that I made in this tutorial so that I can update the content for better.</p>
<p><a title="Backbone JS - Hello World tutorial" href="http://veerasundar.com/app/hello-backbone/" target="_blank">Demo</a> | <a title="Fork the source code in GitHub" href="https://github.com/vraa/hello-backbone" target="_blank">Source code</a></p>
<h2>The need for Backbone.js</h2>
<p>Generally, we use JavaScript to handle UI events (<em>click</em>, <em>keypress</em>, etc), to process the UI data (<em>innerHTML,</em> etc) and to render DOM elements (<em>appendChild, </em>etc).</p>
<p>Without a framework like Backbone.js, each developer would implement the above logic in his/her own coding style. This might cause some maintenance issues if multiple developers are involved.</p>
<p>Backbone.js provides a structure to do the above operations so that it is easy to write a maintainable code with less effort.</p>
<p>With Backbone, you get the following constructs:</p>
<ol>
<li><strong>Model </strong>- used to represent your application data. For example, an <em>Employee</em> model.</li>
<li><strong>Collection </strong>- used to hold a list of your model objects. For example, an <em>Employees </em>collection which contains a list of <em>Employee </em>model.</li>
<li><strong>Views </strong>- each model &amp; collection can be associated with a Backbone view. You can also create a view for an existing DOM element so that the view can respond to events generated from that DOM element.</li>
</ol>
<p>That said, Let&#8217;s start building our application step by step.</p>
<h2>0. Requirement</h2>
<p>Our requirement is to <a href="http://veerasundar.com/app/hello-backbone/" target="_blank">create a application</a> that gets a name from the user and says &#8216;Hello {name}&#8217; and appends it to a list.</p>
<h2>1. Create the User Interface</h2>
<p>Let&#8217;s create our user interface first.</p>
<pre class="brush:html">	&lt;body&gt;
		&lt;header&gt;
			&lt;h1&gt;Backbone JS - Hello World Tutorial!&lt;/h1&gt;
			&lt;h5&gt;&amp;lt;= &lt;a href='#'&gt;back to the article&lt;/a&gt;&lt;/h5&gt;
		&lt;/header&gt;

		&lt;section id='UserInput'&gt;
			&lt;fieldset&gt;
				&lt;legend&gt;Enter a name and click say hello!&lt;/legend&gt;
				&lt;input type="text" name="hello" placeholder="your friend name" value="veera" /&gt; &amp;#160; &lt;button&gt;Say hello&lt;/button&gt;
			&lt;/fieldset&gt;
		&lt;/section&gt; 

		&lt;ol id="HelloList"&gt;

		&lt;/ol&gt;

		&lt;script type="text/javascript" src="jquery-1.7.1.min.js"&gt;&lt;/script&gt;
		&lt;script type="text/javascript" src="underscore-min.js"&gt;&lt;/script&gt;
		&lt;script type="text/javascript" src="backbone-min.js"&gt;&lt;/script&gt;
		&lt;script type="text/javascript" src="hello.js"&gt;&lt;/script&gt;
	&lt;/body&gt;</pre>
<p>As you can see, it&#8217;s a simple HTML document with a textbox, button to accept user input and a empty OL element to hold the list of hello messages.</p>
<h2>2. Create the Backbone Views to represent the UI elements</h2>
<p>We have two views in our UI: One that accepts user input and one that shows the accepted inputs as a list. So, we&#8217;ll create two Backbone views for this. Open the <em>hello.js </em>and type in the below code.</p>
<pre class="brush:javascript">(function($) {

	var UserInputView = Backbone.View.extend({

		el : '#UserInput',

		initialize : function() {
			this.helloListView = new HelloListView();
		},

		events : {
			'click button' : 'addToHelloCollection'
		},

		addToHelloCollection : function(e) {
		}
	});

	var HelloListView = Backbone.View.extend({

		el : '#HelloList',

	});

	new UserInputView();

})(jQuery);</pre>
<p>Because we are creating the Backbone views to represent the existing DOM elements, we can mention the elements in <em>el<strong> </strong></em>option. You can use the CSS3 selector syntax here and Backbone will find the element for you.</p>
<p>All Backbone objects has an <em>initialize() </em>function. Above we are initializing the <em>UserInputView </em>with a reference to the <em>HelloListView</em>.</p>
<p>Each view can accept a <em>events</em> object. Within this, you can specify what are all the events this view will trigger and method name to handle the event. In our case, we have a <em>click </em>event for the <em>button </em>element and a method <em>addToHelloCollection</em> to handle the click event. It is important to note that Backbone searches for the elements mentioned inside the <em>events </em>hash (in this case <em>button</em>) inside the <em>el</em>. So the <em>el</em> element should contain whatever element you give in the <em>events </em>object.</p>
<h2>3. Create Backbone Model, Collection and a view to represent the model</h2>
<p>It&#8217;s time to create a Backbone Model to hold our application data. We can map each hello message to a model. Since we have list of messages, we&#8217;ll create a Backbone Collection too. Lets look at the code.</p>
<pre class="brush:javascript">var Hello = Backbone.Model.extend({
		initialize : function() {
			this.name = 'name'
		}
	});

	var HelloView = Backbone.View.extend({
		tagName : 'li',
		render : function() {
			$(this.el).html('Hello ' + this.model.get('name'));
			return this;
		}
	});

	var HelloList = Backbone.Collection.extend({
		model : Hello
	});</pre>
<p><em>Hello</em> is the model object with a property <em>name </em>initialized to &#8216;name&#8217;. <em>HelloList</em> is the collection and we set this collection <em>model </em>property to our <em>Hello</em> model.</p>
<p>In Backbone, each Model and Collection can have it&#8217;s own view to render themselves. So, we created a <em>HelloView</em> for the <em>Hello</em> model with the <em>render() </em>method to generate the HTML output. Since this view is not associated with any existing DOM elements and Backbone needs a wrapper tag to surround the rendered output, we provide the <em>tagName </em>property with &#8216;li&#8217;. Because of this, when the <em>Hello</em> model generates its HTML code (in <em>render() </em>method), it will be surrounded by <em>li </em>tag.</p>
<h2>4. Combine everything: The final code for hello.js</h2>
<p>Lets update our <em>hello.js </em>file with this final JavaScript.</p>
<pre class="brush:javascript">(function($) {

	var UserInputView = Backbone.View.extend({

		el : '#UserInput',

		initialize : function() {
			this.helloListView = new HelloListView();
		},

		events : {
			'click button' : 'addToHelloCollection'
		},

		addToHelloCollection : function(e) {
			var hello = new Hello({
				name : this.$('input').val()
			});
			this.helloListView.collection.add(hello);
		}
	});

	var Hello = Backbone.Model.extend({
		initialize : function() {
			this.name = 'name'
		}
	});

	var HelloView = Backbone.View.extend({
		tagName : 'li',
		render : function() {
			$(this.el).html('Hello ' + this.model.get('name'));
			return this;
		}
	});

	var HelloList = Backbone.Collection.extend({
		model : Hello
	});

	var HelloListView = Backbone.View.extend({

		el : '#HelloList',

		initialize : function() {
			_.bindAll(this, 'render', 'appendToHelloUL');
			this.collection = new HelloList();
			this.collection.bind('add', this.appendToHelloUL);
		},

		render:function(){

			$.each(this.collection.models, function(i, helloModel){
				self.appendToHelloUL(helloModel);
			});
		},

		appendToHelloUL : function(helloModel) {
			var helloView = new HelloView({
				model : helloModel
			});
			$(this.el).append(helloView.render().el);
		}
	});

	new UserInputView();

})(jQuery);</pre>
<p>As you can see, we have two Backbone views:</p>
<ol>
<li><em>UserInputView</em> &#8211; which listens to the user interface events(<em>button click</em>) and update the model object with user input.</li>
<li><em>HelloListView</em> &#8211; which listens to the changes in our model(<em>add </em>event) and update the user interface with the model values.</li>
</ol>
<div>Everything starts when we create a <em>new UserInputView() </em>which triggers <em>initialize </em>function for each objects and sets up event listeners. When user interacts with the view, the respective event listeners are called and the model gets updated. Then the <em>HelloListView</em> which is listening to model changes gets triggered and the user interface is updated.</div>
<p>Well, that concludes this tutorial. You can see the <a title="Backbone JS - Hello World tutorial" href="http://veerasundar.com/app/hello-backbone/" target="_blank">completed application in action</a> or <a title="Github source" href="https://github.com/vraa/hello-backbone" target="_blank">fork the code in GitHub</a>.</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2012/01/the-rise-of-the-front-end-developers/" title="The Rise of the Front End Developers">The Rise of the Front End Developers</a></li><li><a href="http://veerasundar.com/blog/2012/02/shortcut-to-console-log/" title="Shortcut to console.log">Shortcut to console.log</a></li><li><a href="http://veerasundar.com/blog/2011/11/sorting-an-array-of-custom-objects-in-javascript/" title="Sorting an array of custom objects in JavaScript">Sorting an array of custom objects in JavaScript</a></li><li><a href="http://veerasundar.com/blog/2011/10/rock-paper-scissors-and-bombs/" title="Rock Paper Scissors and Bombs">Rock Paper Scissors and Bombs</a></li><li><a href="http://veerasundar.com/blog/2011/10/intercepting-onclick-event-in-javascript-using-jquery/" title="Intercepting onclick event in JavaScript using JQuery">Intercepting onclick event in JavaScript using JQuery</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2012/01/backbone-js-hello-world-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix for viewing Tamil font in Chrome &#8211; Ubuntu</title>
		<link>http://veerasundar.com/blog/2012/01/fix-for-viewing-tamil-font-in-chrome-ubuntu/</link>
		<comments>http://veerasundar.com/blog/2012/01/fix-for-viewing-tamil-font-in-chrome-ubuntu/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 10:16:00 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[indic]]></category>
		<category><![CDATA[regional]]></category>
		<category><![CDATA[sans]]></category>
		<category><![CDATA[serif]]></category>
		<category><![CDATA[tamil]]></category>
		<category><![CDATA[ttf]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=2819</guid>
		<description><![CDATA[It seems like the Chrome browser in Ubuntu has some issues in displaying Tamil fonts. I guess, other Indian languages also might be having the same issue. The weirdest thing is Firefox was displaying the Tamil content properly. So, after searching through the Chromium group for a while, found the fix for this issue. To [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>It seems like the Chrome browser in Ubuntu has some issues in displaying Tamil fonts. I guess, other Indian languages also might be having the same issue. The weirdest thing is Firefox was displaying the Tamil content properly.</p>
<p>So, after searching through the Chromium group for a while, found the fix for this issue.</p>
<h2>To fix Tamil font in Ubuntu Chrome</h2>
<ol>
<li>Open Terminal</li>
<li>Go to the folder: <strong>cd /usr/share/fonts/truetype/freefont</strong></li>
<li>Delete <em>FreeSerif.ttf: </em><strong>sudo rm FreeSerif.ttf</strong></li>
<li>Delete <em>FreeSans.ttf: </em><strong>sudo rm FreeSans.ttf</strong></li>
<li>Close and re-open the browser.</li>
</ol>
<p>The Tamil font should be displayed properly now.</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2011/06/git-tutorial-getting-started/" title="Git Tutorial &#8211; Getting Started">Git Tutorial &#8211; Getting Started</a></li><li><a href="http://veerasundar.com/blog/2011/04/app-engine-java-development-on-netbeans/" title="App Engine Java development on Netbeans">App Engine Java development on Netbeans</a></li><li><a href="http://veerasundar.com/blog/2010/11/how-to-setup-java-development-environment-in-ubuntu/" title="How to setup Java development environment in Ubuntu?">How to setup Java development environment in Ubuntu?</a></li><li><a href="http://veerasundar.com/blog/2012/02/every-single-pixel-counts/" title="Every single pixel counts">Every single pixel counts</a></li><li><a href="http://veerasundar.com/blog/2012/01/java-lang-verifyerror-expecting-a-stackmap-frame-at-branch-target-jdk-7/" title="Java.lang.VerifyError: Expecting a stackmap frame at branch target &#8211; JDK 7">Java.lang.VerifyError: Expecting a stackmap frame at branch target &#8211; JDK 7</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2012/01/fix-for-viewing-tamil-font-in-chrome-ubuntu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to create a new image in GIMP with the size of clipboard image</title>
		<link>http://veerasundar.com/blog/2012/01/how-to-create-a-new-image-in-gimp-with-the-size-of-clipboard-image/</link>
		<comments>http://veerasundar.com/blog/2012/01/how-to-create-a-new-image-in-gimp-with-the-size-of-clipboard-image/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 05:34:15 +0000</pubDate>
		<dc:creator>Veera</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[editing]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[slice]]></category>
		<category><![CDATA[slicing]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ued]]></category>
		<category><![CDATA[visual]]></category>

		<guid isPermaLink="false">http://veerasundar.com/blog/?p=2804</guid>
		<description><![CDATA[When you are designing a web page and you are given only the single visual design image file, it is vital to slice the image into multiple smaller images to get the required image parts (logo, icons etc.). In Photoshop world, slicing images is piece-of-cake. When you copy an image and choose &#8220;File-&#62;New&#8221;, Photoshop automagically [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>When you are designing a web page and you are given only the single visual design image file, it is vital to slice the image into multiple smaller images to get the required image parts (logo, icons etc.).</p>
<p>In Photoshop world, slicing images is piece-of-cake. When you copy an image and choose &#8220;File-&gt;New&#8221;, Photoshop automagically sets the new image dimension as of the clipboard image.</p>
<p>But GIMP doesn&#8217;t do this! Wait&#8230;there&#8217;s another technique to achieve the same functionality in GIMP.</p>
<ol>
<li>Open the image from which you want to cut smaller images and make them as separate files.</li>
<li>Copy/Cut your required section.</li>
<li>Now go to &#8220;<em>Edit -&gt; Paste as New Image</em>&#8221; (or just <em>Ctrl+Shift+v)</em></li>
<li>Bingo! you have a new image with the same size as of the one you just cut/copied.</li>
</ol>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://veerasundar.com/blog/2011/10/easy-way-for-setting-up-the-lamp-stack-in-ubuntu-linux-command-line/" title="Easy way for setting up the LAMP stack in Ubuntu Linux command line">Easy way for setting up the LAMP stack in Ubuntu Linux command line</a></li><li><a href="http://veerasundar.com/blog/2009/09/good-news-for-gimp-users-gimp-2-8-supports-single-window-mode/" title="Good news for GIMP users : GIMP 2.8 supports single window mode!">Good news for GIMP users : GIMP 2.8 supports single window mode!</a></li><li><a href="http://veerasundar.com/blog/2011/11/design-changes/" title="Design changes">Design changes</a></li><li><a href="http://veerasundar.com/blog/2011/06/choosing-a-date-time-picker-ui-jquery/" title="Choosing a date time picker UI &#8211; jQuery">Choosing a date time picker UI &#8211; jQuery</a></li><li><a href="http://veerasundar.com/blog/2011/02/redesigning-my-home-page-as-a-game/" title="Redesigning my home page as a game">Redesigning my home page as a game</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://veerasundar.com/blog/2012/01/how-to-create-a-new-image-in-gimp-with-the-size-of-clipboard-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

