<?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>Bin-Blog &#187; script</title>
	<atom:link href="http://www.bin-co.com/blog/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bin-co.com/blog</link>
	<description>Learn about the latest in Web Development - as soon as I do.</description>
	<lastBuildDate>Tue, 13 Oct 2009 18:55:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Link Code Insert: A GreaseMonkey UserScript</title>
		<link>http://www.bin-co.com/blog/2009/07/link-code-insert-a-greasemonkey-userscript/</link>
		<comments>http://www.bin-co.com/blog/2009/07/link-code-insert-a-greasemonkey-userscript/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 18:43:33 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[insert]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[userscript]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=338</guid>
		<description><![CDATA[Link Code Insert inserts the HTML code for creating a link at the active element location when the user presses Ctrl+Alt+A. I use it a lot when I am writing a comment and want to add a link. Just select the text you want to link and the userscript will add the HTML code '<code>&#60;a href=""&#62;</code>' before the selected text and a '<code>&#60;/a&#62;</code>' after it.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2009/07/greasemonkey.png" alt="GreaseMonkey" title="GreaseMonkey" width="192" height="217" class="aligncenter size-full wp-image-337 intro" align="right" /></p>
<p class="intro">Link Code Insert inserts the HTML code for creating a link at the active element location when the user presses Ctrl+Alt+A. I use it a lot when I am writing a comment and want to add a link. Just select the text you want to link and the userscript will add the HTML code &#8216;<code>&lt;a href=""&gt;</code>&#8216; before the selected text and a &#8216;<code>&lt;/a&gt;</code>&#8216; after it.</p>
<p>Technically, this is a UserScript &#8211; and not a plugin. But I prefer to think of a userscript as a plugin of a plugin. So I guess it can be included in the Plugin Week.</p>
<p>Note: You must be using Firefox and must have installed GreaseMonkey for this script to work.</p>
<h3><a href="http://www.openjs.com/scripts/greasemonkey/utilities/link_code_insert/link_code_insert.user.js">Download/Install the UserScript</a></h3>
<h2>Plugin Week 2</h2>
<p>This plugin is part of the Plugin Week 2 series. <strong class="highlight">Plugin Week is a week when I publish a new plugin each day for an entire week</strong>. I have already one this <a href="http://www.bin-co.com/blog/2008/12/wordpress-plugin-week/">one time</a> &#8211; so this is Plugin Week 2. The plugins released so far&#8230;</p>
<ul>
<li><a href="http://www.bin-co.com/blog/2009/07/plugin-week-2-wordpress-plugin-weather-man/">Weather Man</a></li>
<li><a href="http://www.bin-co.com/blog/2009/07/minicart-wordpress-plugin-shopping-cart-for-wordpress/">MiniCart WordPress Plugin</a></li>
<li><a href="http://www.bin-co.com/blog/2009/07/gallifrey-image-gallery-wordpress-plugin/">Gallifrey WordPress Plugin</a></li>
<li><a href="http://www.bin-co.com/blog/2009/07/gimp-plugin-web-2-0-shadows/">GIMP Plugin – Web 2.0 Shadows</a></li>
<li><a href="http://www.bin-co.com/blog/2009/07/drupal-plugin-page-ad/">Drupal Plugin: Page Ad</a></li>
<li><a href="http://www.bin-co.com/blog/2009/07/export-to-wordpress-joomla-plugin/">Export To WordPress: Joomla Plugin</a></li>
</ul>
<p>If you want to get news about the upcoming plugin releases(remember, 1 per day), please <strong class="highlight"><a href="http://feeds2.feedburner.com/bin-blog">subscribe to this site</a>.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2009/07/link-code-insert-a-greasemonkey-userscript/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>GIMP Plugin &#8211; Web 2.0 Shadows</title>
		<link>http://www.bin-co.com/blog/2009/07/gimp-plugin-web-2-0-shadows/</link>
		<comments>http://www.bin-co.com/blog/2009/07/gimp-plugin-web-2-0-shadows/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 18:27:02 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[script-fu]]></category>
		<category><![CDATA[shadow]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=319</guid>
		<description><![CDATA[Time to take a break from the WordPress Plugins. This time, its a Gimp Plugin. <a href="http://www.gimp.org/">Gimp, or GNU Image Manipulation Program</a>, is a software for such tasks as photo retouching, image composition and image authoring. Its what we Linux guys use instead of Photoshop. Web 2.0 Shadows is a Gimp Plugin - or as Gimpers call it, a Script-fu.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2009/07/web20_shadow.png" alt="Web 2.0 Shadow" title="Web 2.0 Shadow" width="300" height="150" class="aligncenter size-full wp-image-320 intro" align="right" /></p>
<p class="intro">Time to take a break from the WordPress Plugins. This time, its a Gimp Plugin. <a href="http://www.gimp.org/">Gimp, or GNU Image Manipulation Program</a>, is a software for such tasks as photo retouching, image composition and image authoring. Its what we Linux guys use instead of Photoshop. Web 2.0 Shadows is a Gimp Plugin &#8211; or as Gimpers call it, a Script-fu.</p>
<h3><a href='http://www.bin-co.com/blog/wp-content/uploads/2009/07/web20-shadow.scm'>Download Web 2.0 Shadows Script-fu</a></h3>
<p>This plugin will add a shadow to your image and give the full thing a background color of your choice. Why the background? for two reasons&#8230;</p>
<dl>
<dt>JPEG Images</dt>
<dd>they don&#8217;t support transparency &#8211; they need some background.</dd>
<dt>IE6</dt>
<dd>I created this plugin years ago &#8211; just never got around to realeasing it. When I created it, IE6 was still used &#8211; and it did not support Alpha Transparency in PNG images. So a background was needed.</dd>
</dl>
<h2>Samples/Screenshots</h2>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2009/07/interface.png" alt="interface" title="interface" width="459" height="489" class="aligncenter size-full wp-image-321" /></p>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2009/07/Serenityship.jpg" alt="Serenity Ship With Shadow" title="Serenity Ship With Shadow" width="430" height="276" class="aligncenter size-full wp-image-322" /></p>
<p>Almost all the pictures that appear in any of my blogs has been treated with Web 2.0 Shadow plugin. If you don&#8217;t believe me, take a <a href="http://blog.binnyva.com/2009/05/useless-skills-ability-to-spell-part-1-english/" title="Useless Skills Part 3: Ability to Spell, English">look</a> at <a href="http://blog.binnyva.com/2008/07/18-days-to-darkness/" title="18 Days to Darkness">few</a> of my <a href="http://lindesk.com/2009/06/top-4-terminal-gui-applications/" title="Top 4 Terminal GUI Applications">old</a> <a href="http://twitterkerala.com/tweetup/cochin-tweetup-5-report/" title="Cochin Tweetup #5 Report">posts</a>.</p>
<h2>Installation</h2>
<p>To install the script, download the .scm file and follow the <a href="http://docs.gimp.org/en/install-script-fu.html">installation procedures</a> specified in the Gimp documentation. This should work on both Windows and Linux.</p>
<h2>Gimp</h2>
<p>I have written a series on creating <a href="http://binnyva.blogspot.com/2007/01/creating-web-20-graphics-in-gimp.html">Web 2.0 style graphics in Gimp</a>. If you are interested in Gimp, take a look at that too.</p>
<p>One thing that might interest you &#8211; this plugin is my only program in Scheme. This is the closest I have been to doing any work in Lisp(Scheme is a dialect of Lisp). I hope to change this someday.</p>
<h2>Plugin Week 2</h2>
<p>This plugin is part of the Plugin Week 2 series. <strong class="highlight">Plugin Week is a week when I publish a new plugin each day for an entire week</strong>. I have already one this <a href="http://www.bin-co.com/blog/2008/12/wordpress-plugin-week/">one time</a> &#8211; so this is Plugin Week 2. The plugins released so far&#8230;</p>
<ul>
<li><a href="http://www.bin-co.com/blog/2009/07/plugin-week-2-wordpress-plugin-weather-man/">Weather Man</a></li>
<li><a href="http://www.bin-co.com/blog/2009/07/minicart-wordpress-plugin-shopping-cart-for-wordpress/">MiniCart WordPress Plugin</a></li>
<li><a href="http://www.bin-co.com/blog/2009/07/gallifrey-image-gallery-wordpress-plugin/">Gallifrey WordPress Plugin</a></li>
</ul>
<p>If you want to get news about the upcoming plugin releases(remember, 1 per day), please <strong class="highlight"><a href="http://feeds2.feedburner.com/bin-blog">subscribe to this site</a>.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2009/07/gimp-plugin-web-2-0-shadows/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Remote Database Backup WordPress Plugin</title>
		<link>http://www.bin-co.com/blog/2008/10/remote-database-backup-wordpress-plugin/</link>
		<comments>http://www.bin-co.com/blog/2008/10/remote-database-backup-wordpress-plugin/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 16:43:10 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=135</guid>
		<description><![CDATA[My second WordPress Plugin - <a href="http://www.bin-co.com/tools/wordpress/plugins/db_backup/">Remote Database Backup</a>. Its is based on the <a href="http://www.ilfilosofo.com/blog/wp-db-backup">WordPress Database Backup plugin</a>. If you are a regular wordpress user, you might be better off using WordPress Database Backup plugin instead of my version. But if you, like me, have a local server on your system and has a copy of your site on the local server as well as the online server, you will find great use for my plugin.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/10/wordpress_logo.png" alt="" title="Wordpress Logo" width="183" height="145" class="alignnone size-full wp-image-136 intro" align="right" /></p>
<p class="intro">I have released my second WordPress Plugin &#8211; <a href="http://www.bin-co.com/tools/wordpress/plugins/db_backup/">Remote Database Backup</a>. Its is based on the <a href="http://www.ilfilosofo.com/blog/wp-db-backup">WordPress Database Backup plugin</a>. If you are a regular wordpress user, you might be better off using WordPress Database Backup plugin instead of my version. But if you, like me, have a local server on your system and has a copy of your site on the local server as well as the online server, you will find great use for my plugin.</p>
<p>My plugin is designed to make it possible to remotely create and download wordpress database backup in form of SQL dumps. You can then use these dumps to sync the local version of your site with the online version.</p>
<p><img src="http://www.bin-co.com/tools/wordpress/plugins/db_backup/db_backup.png" alt="Remote Database Backup Screenshot" /></p>
<h2>Backuping your WordPress Database</h2>
<ul>
<li>Install Remote Database Backup Plugin in WordPress</li>
<li>Login to WordPress site</li>
<li>Go to the Backup Page(Manage &gt; DB Backup)</li>
<li>Create a backup</li>
<li>Download the backup file to your system</li>
</ul>
<h3>Sync With Local Server</h3>
<p>And if you have a local version of your site, you can sync it with the online site using the backup file. Just follow these steps&#8230;</p>
<ul>
<li>Extract the backup file(its in the tar.gz format)</li>
<li><a href="http://txt.binnyva.com/2007/03/mysql-database-backuprestore/">Import it into your mysql database</a>.</li>
<li>Make some changes to the database(like set the home url) so that wordpress works locally</li>
</ul>
<h2>Automation Script</h2>
<p>You can do all these steps manually &#8211; or you can use the <a href="http://www.bin-co.com/blog/wp-content/uploads/2008/10/backup.txt">automation script</a> I have cooked up. You need PHP installed in your system for this to work(I assume you already have PHP if you have a local version of wordpress).</p>
<p>To use the script, first install the plugin. Then download <a href="http://www.bin-co.com/blog/wp-content/uploads/2008/10/backup.txt">the script</a> and rename it to &#8216;backup.php&#8217;(the extension must be &#8216;php&#8217; instead of &#8216;txt&#8217;. Now open it in your favorite editor and change the variables to match your site. You can run it by opening a terminal/command prompt and navigating to that folder and executing the command &#8216;php backup.php&#8217;. This will automatically make a backup and sync it with your local database.</p>
<h2>Need Feedback</h2>
<p>Let me know how it works for you if you are installing the plugin &#8211; its the first release &#8211; so I need some feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/10/remote-database-backup-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>JSL &#8211; a New JavaScript Library</title>
		<link>http://www.bin-co.com/blog/2008/07/jsl-javascript-library/</link>
		<comments>http://www.bin-co.com/blog/2008/07/jsl-javascript-library/#comments</comments>
		<pubDate>Sun, 20 Jul 2008 18:17:56 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[jsl]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=119</guid>
		<description><![CDATA[Yesterday, I published a new JavaScript Library &#8211; JSL. It borrows many ideas from the famous jQuery library. Download Packed Version &#8211; 13 KB Source &#8211; 38 KB Features The Standard Stuff&#8230; CSS DOM Selectors Ajax Functions Event Handling is abstracted Ability to change style of an element. Extendable by Plugins Supports all Modern Browsers [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/05/javascript_logo.jpg" alt="Javascript Rhino Logo" title="Javascript Logo" width="230" height="194" class="wp-image-109 intro" align="right" /></p>
<p class="intro">Yesterday, I published a new <a href="http://www.openjs.com/scripts/jslibrary/">JavaScript Library &#8211; JSL</a>. It borrows many ideas from the famous  <a href="http://jquery.com/">jQuery</a> library. </p>
<h2>Download</h2>
<ul>
<li><a href="http://www.openjs.com/scripts/jslibrary/releases/jsl.js">Packed Version</a> &#8211; 13 KB</li>
<li><a href="http://www.openjs.com/scripts/jslibrary/releases/jsl-src.js">Source</a> &#8211; 38 KB</li>
</ul>
<h2>Features</h2>
<p>The Standard Stuff&#8230;</p>
<ul>
<li>CSS DOM Selectors</li>
<li>Ajax Functions</li>
<li>Event Handling is abstracted</li>
<li>Ability to change style of an element.</li>
<li>Extendable by Plugins</li>
<li>Supports all Modern Browsers</li>
<li>And more&#8230;</li>
</ul>
<p>And then some&#8230;</p>
<ul>
<li>Function Chainability</li>
<li>Entire Library is 13 KB(un-gzipped)</li>
<li>Special handlers for <a href="http://projects.binnyva.com/wiki/JSL.array">Arrays</a>, <a href="http://projects.binnyva.com/wiki/JSL.number">Numbers</a></li>
<li>Extra Plugins for Unit Testing and Debugging</li>
<li>Functional Programming Encouraged (map, reduce, filter, etc functions in <a href="http://projects.binnyva.com/wiki/JSL.array">JSL.array</a>)</li>
</ul>
<h2>Missing Features</h2>
<dl>
<dt>XPath Selectors</dt>
<dd>Does anyone use XPath to select elements in JavaScript? I use CSS selectors for this all the time.</dd>
<dt>innerHTML Alternatives</dt>
<dd>I like innerHTML &#8211; so I did not include the <a href="http://www.openjs.com/scripts/createdom/">functions to create DOM elements</a>.</dd>
<dt>Animations/UI Elements</dt>
<dd>You will not see any animation functions in this library. Also, no Drag and Drop, sliders, JS dialog boxes and the like. Of course, I may write a plugin for these elements &#8211; but right now, they are not supported.</dd>
<dt>JavaScript Monkey-patching</dt>
<dd>I don&#8217;t do any <a href="http://www.prototypejs.org/">Prototype</a> style addition to JavaScript standard objects. I hate that &#8211; and so should you.</dd>
<dt>Functions in the global namespace</dt>
<dd>Everything that I do is under the JSL namespace &#8211; except for two shortcut functions &#8211; <code>jslib()</code> and <code>$()</code>. So my library adds only three global variables to the namespace &#8211; JSL, jslib, and $.</dd>
<dt>The <a href="http://en.wikipedia.org/wiki/Kitchen_sink_syndrome">Kitchen Sink</a></dt>
<dd>JSL is a small library &#8211; if you want a library with everything, opt for <a href="http://dojotoolkit.org/">Dojo</a> or <a href="http://developer.yahoo.com/yui/">YUI</a>.</dd>
</dl>
<h2>Some Sample Code</h2>
<h4>Using Event Handler&#8230;</h4>
<pre><code class="javascript">JSL.dom("a").click(function(e) { // Adds a click event handler to all links
	alert(this.href); //Shows the link URL
	JSL.event(e).stop(); //And stops the event from propagating any further
});</code></pre>
<h4>The $() Function&#8230;</h4>
<pre><code class="javascript">$("div.content p.intro a").setStyle({
	"text-decoration":"underline",
	"color":"red"
});</code></pre>
<p>And everything you expect to work with document.getElementById() works with $() as well&#8230;</p>
<pre><code class="javascript">$("element-id").innerHTML = "Hello World";
$("element-id").getElementsByTagName("a"); // Returns all the anchors under that element.</code></pre>
<p>See More <a href="http://www.openjs.com/scripts/jslibrary/preview.php">Sample Code</a></p>
<h2>JSL Links</h2>
<ul>
<li><a href="http://projects.binnyva.com/wiki/JSL">Documentation</a></li>
<li><a href="http://www.openjs.com/scripts/jslibrary/demos/">Demos of JSL in Action</a></li>
<li><a href="http://projects.binnyva.com/forum/viewforum.php?f=2">Support Forum</a></li>
<li><a href="http://www.openjs.com/scripts/jslibrary/code/trunk/">Code Repository</a></li>
</ul>
<h2>License</h2>
<p><a href="http://www.openjs.com/license.php">BSD, as always</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/07/jsl-javascript-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello Script for Java</title>
		<link>http://www.bin-co.com/blog/2008/06/hello-script-for-java/</link>
		<comments>http://www.bin-co.com/blog/2008/06/hello-script-for-java/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 18:24:01 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[hello]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=111</guid>
		<description><![CDATA[After the Hello Script for JavaScript, here is the Hello Script for Java. &#8216;Hello Script&#8217; is a file that contains the most commonly used elements of a programming language so that it can be used as a cheat sheet when working with that language. Warning: I am NOT an expert in Java &#8211; I am [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/06/java-logo.png" alt="" title="Java Logo" width="125" height="217" class="size-full wp-image-112 intro" align="right" /></p>
<p class="intro">After the <a href="http://www.bin-co.com/blog/2008/05/hello-script-for-javascript/">Hello Script for JavaScript</a>, here is the Hello Script for Java. <strong class="highlight">&#8216;Hello Script&#8217; is a file that contains the most commonly used elements of a programming language so that it can be used as a cheat sheet</strong> when working with that language.</p>
<p>Warning: I am NOT an expert in Java &#8211; I am just a beginner. There <strikeout>may</strikeout> will be errors(bad programming methods &#8211; not compiler errors) in the following script. If you notice any such issues, please point them out in the comments.</p>
<h2>Code</h2>
<p>If you want to run the code, save it to a file named &#8216;Hello.java&#8217; and compile in using the command &#8216;javac Hello.java&#8217;. After that you can run the code using the command &#8216;java Hello&#8217;.</p>
<pre><code class="java">
import java.io.*;
import java.util.regex.*;

public class Hello {
	public static void main(String[] Args) {
		// Printing(IO)
		System.out.println("Hello World");

		// Variables, concatenation
		String name = "Binny";
		int year = 2008;

		System.out.println("Hello, " + name + " - welcome to " + year);

		if(year &gt; 2008) {
			System.out.println("Welcome to the future - yes, we have flying cars!");
		} else if(year &lt; 2008) {
			System.out.println("The past - please don't change anything. Don't step on any butterflies. And for the sake of all that's good and holy, stay away from your parents!");
		} else {
			System.out.println("Anything wrong with your time machine? You have not gone anywhere, kiddo.");
		}

		// For loop
		int i=0;
		for(i=0; i&lt;3; i++) {
			System.out.println(i + ") Hi there!");
		}

		//Numerical Array, While
		String rules[] = {"Do no harm", "Obey", "Continue Living"};
		i = 0;
		while(i&lt;rules.length) {
			System.out.println("Rule " + (i+1) + " : " + rules[i]);
			i++;
		}

		// Associated array, foreach
		// Hmm - does Java have Associated arrays? ArrayList?

		String csv_string = "hello,world,how,are,you";
		String csv_values[] = csv_string.split(",");
		// No native Join method

		// Function, argument, return, call
		System.out.println(Hello.hello("Binny")); //The function definition is at the end of this file.	

		//Class stuff...
		Movie ncfom = new Movie("New Country for Old Men"); //It's a sequel!
		ncfom.printMovieDetails();

		// File IO
		// File reading, easy method...
		try {
			File read_file = new File ("/tmp/Hello.txt");
			FileReader in_stream = new FileReader(read_file); // Create a Character Input Stream
			BufferedReader in = new BufferedReader(in_stream);// Filter the Input Stream - buffers characters for efficiency
			try {
				System.out.println(in.readLine()); // read the first line
			} catch(IOException E) {
				System.out.println("No idea what went wrong. Sorry!");
			}
		} catch(FileNotFoundException E) {
			System.out.println("File not found. Sorry!");
		}

		try {
			// Writing to a file
			File out_file = new File("/tmp/HelloJava.txt");
			FileOutputStream out_stream = new FileOutputStream(out_file); // Create an Output Stream
			PrintWriter out = new PrintWriter(out_stream); // Filter bytes to ASCII
			out.println("Hello, from Java"); // Here we actually write to file
		} catch(java.io.FileNotFoundException E) {
			System.out.println("File not found. Sorry!");
		}

		System.out.println("\nLS command results...");
		// Command Executing
		try {
			// Execute a command
			String command = "ls";
			Process child = Runtime.getRuntime().exec (command);

			// Read from an input stream
			InputStream in = child.getInputStream();
			int c;
			while ((c = in.read()) != -1) {
				System.out.print((char)c);
			}
			in.close();
		} catch (IOException e) {
			System.out.println("Error");
		}

		System.out.print("\n");
		//Regular Expression
		String str = new String("Hello World");

		//Find a pattern
		Pattern hell_check = Pattern.compile("^Hell");
		Matcher matches = hell_check.matcher(str);
		if(matches.find()) System.out.println("Yup - its evil");

		//Replace
		System.out.println(str.replaceAll("l([^l])", "$1")); //Remove an 'l' from both words. Should print 'Helo Word'

	}

	//Function declaration.
	private static String hello(String name) {
		return "Hello, " + name;
	}

	// One for the OOP fanboys - Class, members, object and stuff.
	private static class Movie {
		public String name = "";
		public int rating = 0;

		public Movie(String name) {
			this.name = name;
			this.rateMovie();
		}

		public void rateMovie() {
			this.rating = (this.name.length() % 10) + 1; //IMDBs rating algorithm. True story!
		}

		public void printMovieDetails() {
			System.out.println("Movie  : " + this.name);
			System.out.println("Rating : " + this.rating);
		}
	}
}
</code></pre>
<p>Next Hello Script &#8211; C</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/06/hello-script-for-java/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello Script For JavaScript</title>
		<link>http://www.bin-co.com/blog/2008/05/hello-script-for-javascript/</link>
		<comments>http://www.bin-co.com/blog/2008/05/hello-script-for-javascript/#comments</comments>
		<pubDate>Thu, 22 May 2008 18:26:14 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[hello]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=108</guid>
		<description><![CDATA[The next language to get the Hello Script treatment is JavaScript &#8211; my favorite language. Before we go any further, here is the definitions for Hello Script and JavaScript &#8211; just to make sure that we are on the same page&#8230; Hello Script &#8216;Hello Script&#8217; is a file that contains the most commonly used elements [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/05/javascript_logo.jpg" alt="Javascript Rhino Logo" title="Javascript Logo" width="230" height="194" class="alignnone size-full wp-image-109 intro" align="right" /></p>
<p class="intro">The next language to get the <a href="http://www.bin-co.com/blog/2008/03/learning-a-new-programming-language-the-hello-world-method/">Hello Script</a> treatment is <a href="http://www.openjs.com/">JavaScript &#8211; my favorite language</a>. Before we go any further, here is the definitions for Hello Script and JavaScript &#8211; just to make sure that we are on the same page&#8230;</p>
<dl>
<dt>Hello Script</dt>
<dd><strong class="highlight">&#8216;Hello Script&#8217; is a file that contains the most commonly used elements of a programming language so that it can be used as a cheat sheet</strong> when working with that language.</dd>
<dt><a href="http://localhost/Sites/openjs/openjs.com/about.php#about-js">JavaScript</a></dt>
<dd>JavaScript is a <strong class="highlight">client side scripting language</strong> that is used in browsers.</dd>
</dl>
<h2>Code</h2>
<p>Warning: Do not run this code &#8211; you will get a lot of alerts. If you have firebug extension, uncomment the first line &#8211; then you can run the code.</p>
<pre><code class="html">
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Hello Script for JS&lt;/title&gt;
&lt;script type="text/javascript"&gt;
//alert=console.log;
alert("Hello World");

// Variables, concatination
var name = 'Binny';
var year = 2008;
alert("Hello, " + name + " - welcome to " + year );

//If,else conditions
if (year &gt; 2008) {
	alert("Welcome to the future - yes, we have flying cars!");
}
else if(year &lt; 2008) {
	alert("The past - please don't change anything. Don't step on any butterflies. And for the sake of all thats good and holy, stay away from your parents!");
}
else {
	alert("Anything wrong with your time machine? You have not gone anywhere, kiddo.");
}

// For loop
for(var i=0; i&lt;3; i++) {
	alert(i + ") Hi there!");
}

//Numerical Array, While
var rules = [
	'Do no harm',
	'Obey',
	'Continue Living'
];
var i = 0;
while(i&lt;rules.length) {
	alert("Rule " + (i+1) + " : " + rules[i]);
	i++;
}

// Associated array, foreach
var associated = {
	'hello'	:	'world',
	'foo'	:	'bar',
	'lorem'	:	'ipsum'
}
for(key in associated) {
	alert(key + " : " + associated[key]);
}

// Using Join and Split
csv_values = "hello,world,how,are,you".split(",");
alert(csv_values.join(":"));

// Function, argument, return, call
function hello(name) {
	return "Hello " + name;
}
hello_string = hello("Binny");
alert(hello_string);

// One for the OOP fanboys - Class, members, object and stuff.
function Movie(name) { //Constuctor
	this.name = name;
}
Movie.prototype.rateMovie = function() {
	this.rating = (this.name.length % 10) + 1; //IMDBs rating algorithm. True story!
}

Movie.prototype.printMovieDetails = function() {
	alert("Movie : " + this.name + "\nRating : " + this.rating);
}

//Create the object
ncfom = new Movie("New Country for Old Men"); //It's a sequel!
ncfom.printMovieDetails();

// Regular Expressions
string = "Hello World";
if(string.match(/^Hell/)) alert("Yup - its evil\n");
alert(string.replace(/l([^l])/g, "$1")); //Remove an 'l' from both words. Should alert('Helo Word'

/**
 * Specialized code
 */
window.onload = function() {
	var ele = document.getElementById("div-element");
	alert(ele);
	ele.innerHTML = "Hello World";
	ele.onclick = function() {
		alert("You Clicked?");
	}

	document.getElementById("text").value = "Goodbye World";
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div id="div-element"&gt;&lt;/div&gt;

&lt;input type="text" value="3" id="text" /&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/05/hello-script-for-javascript/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hello Script for bash</title>
		<link>http://www.bin-co.com/blog/2008/05/hello-script-for-bash/</link>
		<comments>http://www.bin-co.com/blog/2008/05/hello-script-for-bash/#comments</comments>
		<pubDate>Mon, 12 May 2008 18:02:25 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[hello]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=107</guid>
		<description><![CDATA[Hello Script series for Bash. &#8216;Hello Script&#8217; is a file that contains the most commonly used elements of a programming language so that it can be used as a cheat sheet when working with that language. bash bash is the most commonly used shell in Linux. That makes the bash scripting language the most popular [...]]]></description>
			<content:encoded><![CDATA[<p class="intro"><a href="http://www.bin-co.com/blog/2008/03/learning-a-new-programming-language-the-hello-world-method/">Hello Script series</a> for Bash. <strong>&#8216;Hello Script&#8217; is a file that contains the most commonly used elements of a programming language so that it can be used as a cheat sheet</strong> when working with that language.</p>
<h2>bash</h2>
<p><a href="http://www.gnu.org/software/bash/">bash</a> is the most commonly used shell in Linux. That makes the bash scripting language the most popular shell scripting language. OK, maybe after batch. But then again, bash is much more powerful than batch(DOS scripting language). If want to learn bash, I will recommend this tutorial &#8211; <a href="http://tldp.org/LDP/abs/html/">Advanced Bash Scripting</a></p>
<p>Officially, <a href="http://lindesk.com/2008/05/shell-script-language-use-perl-not-bash/">I hate bash</a>. I use perl or other similar high level language to create shell script. I use bash only for the <a href="http://binnyva.blogspot.com/2007/03/using-twitter-part-1-command-line.html">simplest scripts</a>. But even I admit that bash has its uses. So, here is the hello script for bash&#8230;</p>
<h2>Hello Script</h2>
<pre><code class="bash">
#!/usr/sh

# Printing(IO)
echo "Hello World"

# Variables, concatenation
name='Binny'
year=2008
echo "Hello, " $name " - welcome to " $year

#If,else conditions
if [ $year -gt 2008 ]; then
	echo "Welcome to the future - yes, we have flying cars!"

elif [ $year -lt 2008 ]; then
	echo "The past - please don't change anything. Don't step on any butterflies. And for the sake of all that's good and holy, stay away from your parents!"

else
	echo "Anything wrong with your time machine? You have not gone anywhere, kiddo."
fi

# If you are using anything after this, consider using a high level language.
# For loop
for i in 1 2 3
do
	echo $i ") Hi there!"
done

#Numerical Array, foreach
rules[0]="Do no harm"
rules[1]="Obey"
rules[2]="Continue Living"

for ((i=0; i &lt; 3; i++))
do
	echo "Rule" `expr $i + 1` ":" ${rules[$i]}
done

#A While Demo
keys=(hello foo lorem)

i=0
while [ $i -lt 3 ]
do
	echo ${keys[$i]}
	i=`expr $i + 1`
done

# Function, argument, return, call
hello () {
	myname=$1  #First argument.
	echo "Hello" $myname
}
hello "Binny"

# File IO
# File reading
contents=`cat Hello.sh` #For some reason, I'm losing all the \n's in the file.
echo "Hello has `echo $contents|wc -m` chars" # Or wc -m Hello.sh

# Writing to a file
echo "Hello World from shell script" &gt; /tmp/hello.txt

# Command Executing
ls

# Regular Expressions
string="Hello World"
evil=`echo $string | grep '^Hell'`
if [ "$evil" != "" ]; then
	echo "Yup - its evil"
fi
echo "Hello World" | sed -e 's/l//g' #Will return Heo Word

# http://tldp.org/LDP/abs/html/
</code></pre>
<p>And, by the way, this will work only in Linux &#8211; or if you installed cygwin in your Windows system. Use <code>sh &lt;File_Name&gt;</code> to execute the above code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/05/hello-script-for-bash/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>URL Lister &#8211; My First Firefox Plugin</title>
		<link>http://www.bin-co.com/blog/2008/05/url-lister-my-first-firefox-plugin/</link>
		<comments>http://www.bin-co.com/blog/2008/05/url-lister-my-first-firefox-plugin/#comments</comments>
		<pubDate>Wed, 07 May 2008 18:03:52 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[lister]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tab]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=106</guid>
		<description><![CDATA[I just released my first firefox plugin &#8211; URL Lister. It shows the URLs of all the open tabs in a textarea so that they can be copied easily. Download/Install Install URL Lister If you have installed it, consider rating it or reviewing it at Firefox plugins sandbox. Go to the public page for URL [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/tools/firefox/extensions/urllister/url_lister_logo.png" alt="URL Lister Logo" class="intro" align="right" /></p>
<p class="intro">I just released my first firefox plugin &#8211; <a href="http://www.bin-co.com/tools/firefox/extensions/urllister/">URL Lister</a>. It <strong class="highlight">shows the URLs of all the open tabs in a textarea so that they can be copied</strong> easily.</p>
<h2>Download/Install</h2>
<p><a href="http://www.bin-co.com/tools/firefox/extensions/urllister/urllister.xpi">Install URL Lister</a></p>
<p>If you have installed it, consider <strong class="highlight">rating it or reviewing it at Firefox plugins sandbox</strong>. Go to the <a href="https://addons.mozilla.org/en-US/firefox/addon/7192">public page for URL Lister</a> and write a review for the application. <strong class="highlight">I need reviews to promote it to the main extensions page</strong> &#8211; sandbox plugins are for registered users only.</p>
<h2>Usage</h2>
<p>Lets say you have these four tabs open&#8230;</p>
<ul>
<li><a href="http://www.openjs.com/">OpenJS &#8211; JavaScript, Opened.</a></li>
<li><a href="http://www.bin-co.com/">Bin-Co</a></li>
<li><a href="http://lindesk.com/">LinDesk</a></li>
<li><a href="http://blog.binnyva.com/">BinnyVA</a></li>
</ul>
<p>Right click any tab and click on the &#8216;URL Lister&#8230;&#8217; to open up the main dialog. You can also use &#8216;Tools &gt; URL Lister&#8217;. You will find the URLs of all the open tabs there.</p>
<p><img src="http://www.bin-co.com/tools/firefox/extensions/urllister/url_lister_screenshot.png" alt="URL Lister Screenshot" /></p>
<p>There is a drop down menu at the bottom &#8211; it has these three options&#8230;</p>
<ul>
<li>Plain Text</li>
<li>HTML Anchors</li>
<li>Linked List</li>
</ul>
<h3>Open URLs</h3>
<p>If you have a list of URLs and want to open them all, all you have to do is copy those URLs into this dialog and press OK &#8211; this will open up all the given URLs.</p>
<h2>And my thanks goes to&#8230;</h2>
<p>URL Lister is sort of a response to <a href="http://www.mattcutts.com/blog/wanted-convert-firefox-tabs-to-links/">this post</a> by Matt Cutts. I want to thank him for the idea.</p>
<p>There is another plugin with a similar function &#8211; <a href="https://addons.mozilla.org/en-US/firefox/addon/2069">Tab URL Copier</a>. I lifted some code from that plugin when creating URL Lister. Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/05/url-lister-my-first-firefox-plugin/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Hello Script for Ruby</title>
		<link>http://www.bin-co.com/blog/2008/05/hello-script-for-ruby/</link>
		<comments>http://www.bin-co.com/blog/2008/05/hello-script-for-ruby/#comments</comments>
		<pubDate>Thu, 01 May 2008 18:05:39 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cheatsheet]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[hello]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=104</guid>
		<description><![CDATA[Hello Script is a file that contains the most commonly used elements of a programming language so that it can be used as a cheatsheet when working with that language. This Hello Script for Ruby is the sixth post in this series. I have some experience with Ruby. I will not call myself an expert [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.bin-co.com/blog/wp-content/uploads/2008/05/ruby_logo.gif'><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/05/ruby_logo.gif" alt="" title="Ruby Logo" width="105" height="109" align="right" class="intro size-full wp-image-105" /></a></p>
<p class="intro"><a href="http://www.bin-co.com/blog/2008/03/learning-a-new-programming-language-the-hello-world-method/">Hello Script</a> is a <strong class="highlight">file that contains the most commonly used elements of a programming language so that it can be used as a cheatsheet</strong> when working with that language. This Hello Script for Ruby is the sixth post in this series.</p>
<p>I have some experience with Ruby. I will not call myself an expert &#8211; but I am comfortable with Ruby. <a href="http://binnyva.blogspot.com/2005/09/learning-ruby.html">I like ruby.</a> I even have written a few <a href="http://www.bin-co.com/ruby/tk/locater/">applications</a> in it.</p>
<h2>Hello Code</h2>
<pre><code class="ruby">
#!/usr/bin/ruby

print "Hello World\n"

name = "Binny"
year = 2008
print "Hello, " + name + " - welcome to " + year.to_s + "\n"

if (year &gt; 2008) then
	print "Welcome to the future - yes, we have flying cars!"
elsif (year &lt; 2008) then
	print "The past - please don't change anything. Don't step on any butterflies. And for the sake of all that's good and holy, stay away from your parents!"
else
	print "Anything wrong with your time machine? You have not gone anywhere, kiddo."
end
print "\n\n"

# For loop like structure
0.upto(3) { |i|
	print i.to_s + ") Hi there!\n"
}
print "\n"

# Numerical array
rules = ['Do no harm', 'Obey', 'Continue Living']
i = 0
while i&lt;rules.length do
	print "Rule " + (i+1).to_s + ": " + rules[i] + "\n"
	i = i+1
end
print "\n"

# Associated arrays
associated = {
	'hello'	=&gt;	'world',
	'foo'	=&gt;	'bar',
	'lorem'	=&gt;	'ipsum'
}
associated.each { |key,value|
	print key + " : " + value + "\n"
}
print "\n"

# Using Join and Split
csv_values = "hello,world,how,are,you\n".split(",")
print csv_values.join(":")

# Function, argument, return, call
def hello(name)
	return "Hello " + name
end
hello_string = hello("Binny")
print "Function call returned '" + hello_string + "'\n\n"

# One for the OOP fanboys - Class, members, object and stuff.
class Movie
	public
	@name = ''
	@rating = 0

	def initialize(name)
		@name = name
		self.rateMovie()
	end

	def rateMovie()
		@rating = (@name.length % 10) + 1 #IMDBs rating algorithm. True story!
	end

	def printMovieDetails()
		print "Movie : " + @name + "\n"
		print "Rating : " + '*' * @rating + "(" + @rating.to_s + ")\n\n"
	end
end
# Create the object
ncfom = Movie.new("New Country for Old Men") #It's a sequel!
ncfom.printMovieDetails()

# File IO
# File reading, easy method...
file_in = File.new('Hello.rb', 'r')
contents = file_in.read
file_in.close
print "Hello has " + contents.length.to_s + " chars\n"

# Writing to a file
file_out = File.new('/tmp/hello.txt', 'w')
file_out.print "Hello World from Ruby."
file_out.close

# Command Executing
print `ls` #Execute the command 'ls' and print its output
print "\n"

# Regular Expressions
string = "Hello World"
print "Yup - its evil\n" if(/^Hell/.match(string))
print string.gsub(/l([^l])/, '\1') #Remove an 'l' from both words. Should print 'Helo Word' - The second arg must be in single quotes

print "\n"

# Some special/only-in-ruby stuff...
# Using a library
require "fileutils"

#Using yield/code blocks...
def doXTimes(i)
	0.upto(i) {|count|
		yield count+1
	}
end
doXTimes(5) {|count|
	print count.to_s + "th Time\n"
}

</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/05/hello-script-for-ruby/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello Script for Tcl</title>
		<link>http://www.bin-co.com/blog/2008/04/hello-script-for-tcl/</link>
		<comments>http://www.bin-co.com/blog/2008/04/hello-script-for-tcl/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 17:14:29 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[hello]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tcl]]></category>
		<category><![CDATA[tk]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=103</guid>
		<description><![CDATA[Tcl, or Tool Command Language, will not be found in the &#8216;most popular languages&#8217; hall of fame. That is partly because of its &#8216;wierd&#8217; syntax. But those who know Tcl will tell you that Tcl is a pleasure to work with. I have a special interest in Tcl &#8211; its the language that introduced me [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.bin-co.com/images/tcl.gif' alt='Tcl Logo' align="right" /></p>
<p class="intro"> <a href="http://www.tcl.tk/">Tcl, or Tool Command Language</a>, will not be found in the &#8216;most popular languages&#8217; hall of fame. That is partly because of its &#8216;wierd&#8217; syntax. But those who know Tcl will tell you that Tcl is a pleasure to work with. I have a special interest in Tcl &#8211; its the language that introduced me to GUI programming(<a href="http://www.bin-co.com/tcl/">Tcl/Tk</a>). Now, when ever I see a GUI toolkit, I <a href="http://www.bin-co.com/blog/2007/10/tk-verses-gtkand-python-verses-tcl/">compare it to Tcl</a>.</p>
<p>I have a few years experience in Tcl &#8211; I have written a very popular <a href="http://www.bin-co.com/tcl/tutorial/">Tcl/Tk Tutorial</a> and also a <a href="http://www.bin-co.com/tcl/scripts/indexer/">few</a> <a href="http://www.bin-co.com/tcl/scripts/ri/">small</a> <a href="http://www.bin-co.com/tcl/scripts/tagview/">applications</a> in Tcl. I am not using it a lot now a days because Tk apps look really bad in Linux. This problem is not present in Windows.</p>
<h3>Hello Code</h3>
<pre><code class="tcl">
#!/usr/bin/tclsh

# Printing(IO)
puts "Hello World!\n" 

# Variables, concatenation
set name 'Binny'
set year 2008
puts [concat "Hello, "  $name  " - welcome to "  $year]

#If,else conditions
if { $year &gt; 2008 } {
	 puts "Welcome to the future - yes, we have flying cars!" 

} elseif { $year &lt; 2008 }  {
	 puts "The past - please don't change anything. Don't step on any butterflies. And for the sake of all that's good and holy, stay away from your parents!" 

} else {
	 puts "Anything wrong with your time machine? You have not gone anywhere, kiddo."
}

# For loop
for { set i 0 } { $i&lt;3 } { incr i  }  {
	 puts "$i) Hi there!"
}

#Numerical Array, foreach
set rules [list "Do no harm" "Obey" "Continue Living"]

set i 0
while { $i &lt; [llength $rules] } {
	puts [concat "Rule " [expr $i+1] " : "  [lindex $rules $i]]
	incr i
}

# Associated array, while
array set associated {
	hello	"world"
	foo		"bar"
	lorem	"ipsum"
}

foreach key [array names associated] {
	 puts [concat $key " : " $associated($key)]
}

# Using Join and Split
set csv_values [split "hello,world,how,are,you\n" ","]
puts [join $csv_values ":"]

# Function, argument, return, call
proc hello { person_name } {
	return [concat "Hello, " $person_name]
}
puts [hello "Binny"]

# File IO
# File reading, easy method...
set IN [open "Hello.tcl" r]
set contents [read $IN]
close $IN
puts [concat "Hello has " [string length $contents] " chars"]

# Writing to a file
set OUT [open "/tmp/hello.txt" w]
puts $OUT "Hello World"
close $OUT

# Regular Expressions
set str "Hello World"
if { [regexp {^Hell} $str] } {
	puts "Yup, its evil"
}

puts [regsub -all {l([^l])} $str {\1}]

# Special Tcl Syntax
# Math ops
set answer [expr {3 + 2}]

# Comments
puts $answer ;# Comments in the same line as code must use ;# instead of just #

</code></pre>
<h3>Tcl/Tk Links</h3>
<ul>
<li><a href="http://www.tcl.tk/">Tcl Developer Xchange</a></li>
<li><a href="http://wiki.tcl.tk/">Tcler&#8217;s Wiki</a></li>
<li><a href="http://en.wikipedia.org/wiki/Tcl">Tcl in Wikipedia</a></li>
<li><a href="http://www.yosefk.com/blog/i-cant-believe-im-praising-tcl.html">I can’t believe I’m praising Tcl</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/04/hello-script-for-tcl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

