<?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>Thupten&#039;s Blog</title>
	<atom:link href="http://thupten.veryusefulinfo.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://thupten.veryusefulinfo.com</link>
	<description>Seneca, OSD600, OpenOffice development, OpenSource and more...</description>
	<lastBuildDate>Mon, 26 Mar 2012 20:34:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Working on an Android Game</title>
		<link>http://thupten.veryusefulinfo.com/2012/02/26/working-on-an-android-game/</link>
		<comments>http://thupten.veryusefulinfo.com/2012/02/26/working-on-an-android-game/#comments</comments>
		<pubDate>Sun, 26 Feb 2012 20:29:09 +0000</pubDate>
		<dc:creator>thupten</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=247</guid>
		<description><![CDATA[Lately Ali and I are planning to work together on a simple free android game. We thought of working on IPhone first, considering the volume of users we could reach. But eventually, we could not resist the simpler Java language over the cryptic Objective C. We will think about porting to IPhone after the Android [...]]]></description>
			<content:encoded><![CDATA[<p>Lately Ali and I are planning to work together on a simple free android game. We thought of working on IPhone first, considering the volume of users we could reach. But eventually, we could not resist the simpler Java language over the cryptic Objective C. We will think about porting to IPhone after the Android version actually gets completed.<br />
We have found a very good game framework called Libgdx. The game will be a side scrolling, avoid the enemies style game that will use the touch and accelerometer together.</p>
]]></content:encoded>
			<wfw:commentRss>http://thupten.veryusefulinfo.com/2012/02/26/working-on-an-android-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Progress Bar to display server&#8217;s script execution: using JQuery/JQueryUI</title>
		<link>http://thupten.veryusefulinfo.com/2011/07/20/progress-bar-to-display-servers-script-execution-using-jqueryjqueryui/</link>
		<comments>http://thupten.veryusefulinfo.com/2011/07/20/progress-bar-to-display-servers-script-execution-using-jqueryjqueryui/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 01:36:35 +0000</pubDate>
		<dc:creator>thupten</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=197</guid>
		<description><![CDATA[Until now, you have been opening a shell or terminal to execute your script, but now your boss wants to be able to execute the script, but he doesn&#8217;t know anything about CLI(command line interface) commands. So, what can you do? how about having a web interface that allows him to easily activate the script. [...]]]></description>
			<content:encoded><![CDATA[<p>Until now, you have been opening a shell or terminal to execute your script, but now your boss wants to be able to execute the script, but he doesn&#8217;t know anything about CLI(command line interface) commands. So, what can you do? how about having a web interface that allows him to easily activate the script. Yes, that would work and its easy too. But if the script takes 5 min to complete, we don&#8217;t want to show a blank page during those 5 mins. It would be better if there was a progress bar that showed how much percentage of the script is completed. Today, we will learn to do just that, Create a progress bar to display server&#8217;s php script execution using JQuery and JQueryUI.<br />
<span id="more-197"></span><br />
<img src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/07/Screenshot2.png" alt="Image 1" /><br/></p>
<p><img src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/07/Screenshot-1.png" alt="Image 2" /><br />
In this tutorial, we will create a<br />
1. For server side, php script that needs to be run. For the sake of simplicity we will create a script that need to count 1 to user input number.<br />
2. For the client side or for your boss in this case, create a webpage with a form. The form will take a number till which we want the server to count. When submitted it will trigger the script in the server.<br />
3. While the server is counter, we will update the total and the current count in the json file. We will use php function json_encode.<br />
4. The client end javascript with jquery/jqueryui will collect the values from the json file and update the progress bar every few seconds.</p>
<p>Read the comments for more details.</p>
<p>serverscript/server.php</p>
<p>Server script contains the main script that does some work on the server. In this case the server script counts from 1 to user input.<br/></p>
<pre name="code" class="php">
<?php
/*set default number if user forgot to enter one. */
$num = 10000;
 if(isset($_REQUEST['num'])){
     $num = intval($_REQUEST['num']);
 } //create jason file and put default 0 values. we will update these values later $filename = 'status1.json';
 $fp = fopen($filename, "w");
 $arr = array('total'=>'0', 'current'=>'0');

fwrite($fp, json_encode($arr));

fclose($fp);

//update the total
$arr['total'] = $num;

//start our simple main logic, ie...start counting. we will start counting from 1 till the num+1. since I am using $i<$num, thats why i add +1 here.
for($i = 1; $i < $num+1; $i++){
    //here you can do some other work as well.
  $arr['current'] = "$i";

  $fp = fopen($filename, "w");

  fwrite($fp, utf8_encode(json_encode($arr)));

  fclose($fp);

  //for safety we will make a copy and let client access the copy.
  copy('status1.json', 'status.json');

}
?>
</pre>
<p>index.html</p>
<p>index.html is the client side html form that gets the input and on submit triggers the server php. We include the jquery and jqueryui library script here. It is simple. link to jquery.min.js and jquery-ui.min.js in the head section. Our main script that uses the jquery will be in a different file. ie..external javascript.<br/></p>
<pre name="code" class="html">
&lt;html&gt;
&lt;head&gt;
  <!--include the jquery and jqueryui library. also all scripts are in external file called myscript.js-->
  <script src="js/jquery/jquery.min.js" type="text/javascript"></script>
  <script type="text/javascript" src="js/jquery/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="js/jquery/jquery-ui.css"/>
  <script type="text/javascript" src="js/myscript.js"></script>
&lt;/head&gt;
&lt;body&gt;
<h1>count please</h1>
<form id="myform" action="">
    <label for="num">Count to</label>
<input id="num" type="text"/>
    <button type="button" id="submit-button">Submit</button>
  </form>

  <!--progressbar will be used by jqueryui to display the progressbar-->
<div id="progressbar" width="300px"></div>

  <!--lets use a message div to show a message when the server completes the execution of script. this will display 'complete'. check the javascript.-->
<div id="message"></div>

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>js/myscript.js</p>
<p>this file contain our function to handle the client side. It uses the jquery library. We put all our code in $(&#8216;#submit-button&#8217;).click&#8217;s callback function. That is because we want things like updating the progress bar, requesting data from server etc to happen only after user submit the form.<br/></p>
<pre name="code" class="javascript">
/*
when the submit button is clicked we will hide the message div. get the input provided by user and start processing.
*/
$(document).ready(function(){

    $("#submit-button").click(function(){

    /*hide the message div box. since we don't have anything to show at this time.*/
     $('#message').hide();
    /*grab the input by user and save in variable userinput*/
      userinput = $("#num").val();
    /*prepare a query string. We need to pass the userinput to the script. we grabbed the input from user, now we need to pass it to the */
      var dataString = "num=" + $("input#num").val();

      /*
         using ajax we will call the server.php script. dataString is the parameter we got from user.datatype is the data type we expect as return. when complete, set the progress bar to 100% and display the message 'complete'.
      */
      $.ajax(
        {

          url : "serverscript/server.php",
          type: "GET",
          data: dataString,
          datatype:"json",
          complete:function(){
               $("#progressbar").progressbar({
              value:100});
              $('#message').html('Complete');
              $('#message').show();
              }
        } );

    /*
    call the updateStatus() function every 3 second to update progress bar value.
    */
      t = setTimeout("updateStatus()", 3000);
    });

});

/*
.getJSON will get the json string being updated by the server.php in server. every 3 second, the 'total' and 'current' count will be parsed and updated to the progress bar.
*/
function updateStatus(){

          $.getJSON('serverscript/status.json', function(data){

                               var items = [];

                               pbvalue = 0;

                               if(data){

                                    var total = data['total'];

                                    var current = data['current'];

                                    var pbvalue = Math.floor((current / total) * 100);

                                    if(pbvalue>0){

                                        $("#progressbar").progressbar({

                                            value:pbvalue
                                        });

                                    }

                                }
                                if(pbvalue < 100){

                                   t = setTimeout("updateStatus()", 3000);

                                }
          });

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thupten.veryusefulinfo.com/2011/07/20/progress-bar-to-display-servers-script-execution-using-jqueryjqueryui/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Absolute beginner&#8217;s guide to Eclipse</title>
		<link>http://thupten.veryusefulinfo.com/2011/02/02/absolute-beginners-guide-to-eclipse/</link>
		<comments>http://thupten.veryusefulinfo.com/2011/02/02/absolute-beginners-guide-to-eclipse/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 04:04:38 +0000</pubDate>
		<dc:creator>thupten</dc:creator>
				<category><![CDATA[Eclipse ECL500]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[eclipse ide]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[junit with eclipse]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=177</guid>
		<description><![CDATA[Following article is a part of my Lab exercise for Eclipse course I am taking during Winter2011.

Click here for the java files used to create this tutorial
When Eclipse is run, it asks for a workspace location. I will use ./wksp/basics/labs. You can choose to use this workspace by default by ticking the checkbox. Eclipse starts [...]]]></description>
			<content:encoded><![CDATA[<p>Following article is a part of my Lab exercise for Eclipse course I am taking during Winter2011.</p>
<p><img class="alignright" title="Eclipse" src="http://upload.wikimedia.org/wikipedia/en/3/34/Eclipse-logo.png" alt="" width="250" height="136" /><br />
<a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/ecl500a24-lab1-practicefiles.jar">Click here for the java files used to create this tutorial</a></p>
<p>When Eclipse is run, it asks for a workspace location. I will use ./wksp/basics/labs. You can choose to use this workspace by default by ticking the checkbox. Eclipse starts with the Welcome tab. On this window, you can get more information about using Eclipse. Close the Welcome tab.<span id="more-177"></span><br />
<a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/001-start.JPG"><img class="style1" style="width: 595px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/001-start.JPG" alt="" /></a></p>
<h2 style="color: red">Preparing Eclipse</h2>
<p>Since we will be working with java language we need to set up the JRE for compiling java programs. Select Window-&gt;Preferences to open Preferences dialog. We can setup various options for Eclipse. Choose &#8216;Installed JREs&#8217; to display JREs installed. You can check mark the one you want to use. If none are displayed, you can add by press &#8216;Add&#8230;&#8217; button. If you need to change the size of the font, on the same dialog, Select General-&gt;Colors and Fonts and &#8216;Text Font&#8217;. Click &#8216;Edit&#8230;&#8217; to change the font size to 12.</p>
<p ><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/01-Preferences.JPG"><img class="style2" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/01-Preferences.JPG" alt="" /></a><br />
<a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/02-Preferences-font.JPG"><img class="style3" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/02-Preferences-font.JPG" alt="" /></a></p>
<h2 style="color: red">Creating your first Java project</h2>
<p>There are numerous ways to create a simple java project.</p>
<p>Click File-&gt;New-&gt;Project&#8230;Then select &#8216;Java Project&#8217;. You can also accomplish this by right-clicking on Project Explorer on the left side of Eclipse, and selecting New-&gt;Project&#8230; and select Java Project.<a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/03-New-java-project.JPG"><img class="style4" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/03-New-java-project.JPG" alt="" /></a></p>
<p>Then click Next. Next I will enter a Project Name, &#8216;Lab1&#8242;. Select your JRE environment. Click Next. Eclipse will create a folder for your project with a subfolder &#8217;src&#8217;. Then click Finish.<a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/03-New-java-project1.JPG"><img class="style5" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/03-New-java-project1.JPG" alt="" /></a></p>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/03-New-java-project2.JPG"><img class="style5" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/03-New-java-project2.JPG" alt="" /></a></p>
<h2 style="color: red">Browsing Java elements using the Package Explorer.</h2>
<p>The package explorer displays your java files organized in their packages. Eclipse will create a default package when creating a java class without a package name. You can expand the package names to display the files within by clicking on the &#8216;+&#8217; on the left side of package names. Click on &#8216;-&#8217; to collapse expanded packages.<a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/04-packagexplorer.JPG"><img class="style6" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/04-packagexplorer.JPG" alt="" /></a></p>
<h2 style="color: red">Editing java elements</h2>
<p>To edit a java element that contain text like java classes or properties files, doubleclick the filename, a new window with content of the file opens in the editor in center. You can edit the file and save to make changes.</p>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/05-editingjavaelements.JPG"><img class="style6" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/05-editingjavaelements.JPG" alt="" /></a></p>
<h2 style="color: red">Creating a Java class</h2>
<p>Now lets create a java class to make a small program. We will make a class called Calculator.java that contains a Add() method. Right click &#8217;src&#8217; folder on package explorer and click New-&gt;Class. You can achive the same result by selecting File-&gt;New-&gt;Class too. I will class this class &#8216;Calculator&#8217;. Lets give it a package name &#8216;a24.labs.lab1&#8242;. Make sure &#8216;public static void main&#8230;&#8217; is unchecked, I will create another class to create the main method which will use the Calculator class.</p>
<p ><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/06-createjavaclass.JPG"><img class="style7" style="border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/06-createjavaclass.JPG" alt="" /></a></p>
<p ><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/06-createjavaclass-newclass.JPG"><img class="style8" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/06-createjavaclass-newclass.JPG" alt="" /></a></p>
<p>Click Finish. I will put a method that adds two numbers.</p>
<p><span> </span></p>
<pre>public int add(int a, int b){
                return a + b;
}</pre>
<h2 style="color: red">Renaming Java elements</h2>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">To rename a file, in Package manager, right click &#8216;Calculator.java&#8217;, select Refactor-&gt;Rename. Rename the file to &#8216;Math&#8217;. By default Eclipse will update all the references that points to Calculator to the new Math class name. Notice in the source code, &#8216;public class Calculator&#8217; is changed to &#8216;public class Math{&#8216;. Eclipses take care of changing the class name within the java file.</p>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/07-renameclass.JPG"><img class="style9" style="width: 412px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/07-renameclass.JPG" alt="" /></a></p>
<h2 style="color: red">Moving and copying Java elements</h2>
<p>Files can be moved between packages by simply dragging them. It can also be done by right clicking the file, selecting Refactor-&gt;Move. Lets create a new package called &#8216;ecl500.a24.lab1&#8242; and move Math.java file to that package. To create a new package, right click src folder, New-&gt;Package. Then drag the &#8216;Math.java&#8217; from &#8216;a24.labs.lab1&#8242; package to &#8216;ecl500.a24.lab1&#8242;. To create a copy of the java file. Right click on the file and select Copy. Then on destination location, say a24.labs.lab1, rightclick and select paste. Delete the old &#8216;a24.labs.lab1&#8242; package along with its content by rightclick and selecting Delete.</p>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/08-newpackage.JPG"><img class="style4" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/08-newpackage.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/09-programclass.JPG"><img class="style8" style="width: 500px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/09-programclass.JPG" alt="" /></a></p>
<h2 style="color: red">Navigate to a Java element&#8217;s declaration</h2>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">Eclipse&#8217;s right click context menu has several functions that are very useful. One of the functions is &#8216;open declaration&#8217;. Open declaration opens the declaration of a type.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/10-opendeclaration.JPG"><img class="style10" style="width: 564px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/10-opendeclaration.JPG" alt="" /></a></p>
<p>To test this, lets use the Math class to perform some calculation. Create a new class called &#8216;Program.java&#8217; in ecl500.a24.lab1 package. Right click on the package name and select New-&gt;Class. Call this class &#8216;Program&#8217;. Make sure to check &#8216;public static void main..&#8217; option. Now right click on word Math and rightclick, Open declaration. Eclipse automatically opens the Math.java and highlights the class declaration. You can also accomplish this by selecting Navigate-&gt;Open Declaration</p>
<h2 style="color: red">Viewing the type Hierarchy</h2>
<p>You can right click on any java file and rightclick select Open type hierarchy to see the type hierarchy of the class file. In the image, Our Math class is a subclass of Object class.You can also accomplish this by selecting Navigate-&gt;Open Type Hierarchy.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/11-typehierarchy.JPG"><img class="style6" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/11-typehierarchy.JPG" alt="" /></a></p>
<h2 style="color: red">Searching the workbench</h2>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">Eclipse has a strong search feature. Open Search dialog by selecting Search-&gt;Search. There are 3 tabs for searching &#8216;Java Search&#8217;, &#8216;JavaScript Search&#8217; and &#8216;Plug-in Search&#8217;.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/12-search.JPG"><img class="style11" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/12-search.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/13-find.JPG"><img class="style12" style="width: 455px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/13-find.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">To do a granular seach you can use wildcards like * and ?. You can search fo &#8216;Type&#8217;, &#8216;Method&#8217;, &#8216;Package&#8217; etc. If you search for Math or M* or M???, you should be able to see Math resulted from all files. To search within a file, press Control+F in the text editor.</p>
<h2 style="color: red">Running your programs</h2>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">There are several ways to get your java program run. The easiest way is to click on the Run icon on toolbar. This can also be accomplish by selecting Run-&gt;Run or rightclick on file and Run-&gt;Run. You can also use keyboard shortcut Control+F11 to run the program. The output is displayed on Console view.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/14-runIcon.JPG"><img class="style13" style="width: 389px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/14-runIcon.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/15-runConfiguration.JPG"><img class="style14" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/15-runConfiguration.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/15-runConfigurationIcon.JPG"><img class="style15" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/15-runConfigurationIcon.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">If your java application uses GUI, the output will be on a new window as a separate application. If you want configure how your java application runs, then you can create a run configuration.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">For example if your program need to take some arguments when run, or if your program must include some other library like JDBC connector package, you can create a run configuration that sets these up every time your program is run.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">Lets create a run configuration called &#8216;Program&#8217; by clicking New icon. Let me change the JRE to my alternate JRE. Click apply to save and Run to run the program. Now to run this program with same configuration, you can quickly select the Program name on run icon.</p>
<h2 style="color: red">Debugging your programs</h2>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">To debug a program we put breakpoints in various lines of code and the program pauses the execution on that line of code. Then you can analyse values of variables or execute the rest of the program line by line. To debug in Eclipse, put a break point on a line in Math.java where the a+b is calculated. Now right click on the vertical grey bar on the left of editor and select toggle breakpoint. You can also do this by doubleclicking on the bar. Do the same process to remove a breakpoint.</p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/16-debug-breakpoint.JPG"><img class="style16" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/16-debug-breakpoint.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/16-debug-perspective.JPG"><img class="style17" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/16-debug-perspective.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;"><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/16-debug-perspective-toolbar.JPG"><img class="style18" style="width: 484px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/16-debug-perspective-toolbar.JPG" alt="" /></a></p>
<p style="font-family: 'Times New Roman'; line-height: normal; font-size: small;">Now click on the debug iocn on toolbar. Eclipse gives you option to switch to Debug perspective. Click Yes. The program executes and pauses on the line where we put the breakpoint.</p>
<p>If you hover over any variable, you can see the value of the variable. From here, you can execute the rest of the program step by step. Click on &#8216;Step into&#8217; button several times. You will see the program moves forward line by line. To execute a full method without going into the method, you can press the &#8216;Step Over&#8217; button.</p>
<p>Click stop to stop debugging and click on &#8216;Java&#8217; button on perspective view on top right corner to return to normal view. Remove the breakpoint by double clicking on it.</p>
<h2 style="color: red">Evaluating expressions</h2>
<p>Put a breakpoint on the last line of Program class and press debug. The program pauses on last last. It has not executed this line yet. Now select the method call myMath.add(100,200) then rightclick and select Display. The value of result return value of this method 300 is shown on display popup. Press control+Shift+D to move this value to Display view. Now in display view, we can see what method was executed and what result was returned with its type information as well.</p>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/17-EvaluatingExpression.jpg"><img class="style19" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/17-EvaluatingExpression.jpg" alt="" /></a></p>
</p>
<p>Evaluating expressions is useful during debugging a program. Stop the debugging and go to Java perspective view.</p>
<h2 style="color: red">Evaluating snippets</h2>
<p>Scrapbook is a file where you can test small pieces of expressions in your program. It is useful for checking values of systems value. like value of PI. Create a new Scrapbook Page, name it MyScrapbook and click Finish. A new file MyScrapbook.jpage appears in your package explorer. Open MyScrapbook.jpage</p>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/17-EvaluatingExpression-newscrapbook.jpg"><img class="style20" style="width: 527px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/17-EvaluatingExpression-newscrapbook.jpg" alt="" /></a></p>
</p>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/17-EvaluatingExpression-newscrapbook-02.jpg"><img class="style21" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/17-EvaluatingExpression-newscrapbook-02.jpg" alt="" /></a></p>
<p>Type Math.PI , select the Math.PI, rightclick and select Display. To check 100+200 in our method call really should be 300. Type 100+200 in scrapbook, select the line, rightclick and select Display. You will see the value 300 which confirms your add method is working fine.</p>
<p>You can write some snippets and quickly check the result without creating a class file.</p>
<h2 style="color: red">Using the Java browsing perspective</h2>
<p>Java browsing perspective shows a drill down browsable view of your Project, Packages, Types, and Member methods. It displays the content of the method in the bottom editor. It is a built in perspective created by Eclipse. The look and feel is like a file browser. Some people may prefer to use this perspective for coding. The choice is yours.</p>
</p>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/17-z-JavaBrowsing.jpg"><img class="style22" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/17-z-JavaBrowsing.jpg" alt="" /></a></p>
<h2 style="color: red">Writing and running JUnit tests</h2>
<p>With JUnit test, we can create programs using test driven software development approach. Test cases are conditions that testers create. The developer has to develop program that passes these test cases. When developer creates program which passes the test cases one by one, gradually the program is fully developed.</p>
<p>Lets create a subtract method to our program using JUnit test. Lets create a test for subtract method. We know (using a calculator) 300-100 = 200 for a subtract to be working good.</p>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/18-JUnit-01.JPG"><img class="style23" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/18-JUnit-01.JPG" alt="" /></a></p>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/18-JUnit-06.JPG"><img class="style24" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/18-JUnit-06.JPG" alt="" /></a></p>
</p>
<p>In Math.java, create an empty method for subtract.</p>
<p><span > </span></p>
<pre>public int subtract(int a, int b){
  //no code yet. waiting for test cases. just return 0.
  return 0;
}</pre>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/18-JUnit-07.JPG"><img class="style6" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/18-JUnit-07.JPG" alt="" /></a></p>
<p>Now lets create the Junit test. Select File-&gt;New-&gt;JUnit Test Case. Name this MathTest, click Next, select the subtract method, and click Finish. Click OK to add JUnit in build path.</p>
<p>Now select Run-&gt;Run as-&gt;JUnit Test. A new view is added to the perspective called JUnit. Since the subtract method is not implemented the test fails.</p>
<p>Lets create the test.</p>
<p><span > </span></p>
<pre>public class MathTest {
        @Test
        public void testSubtract() {
                Math math = new Math();
                assertEquals(100, math.subtract(300, 200));
        }
}</pre>
<p>Now in Math.java lets write a wrong code for subtraction to test the case. we will return a*b instead of a-b. This should fail the test we wrote. Run the test by clicking on the Rerun test button on JUnit view. As expected the test fails again.</p>
<p >Now correct the subtract method code to</p>
<p><span> </span></p>
<pre>return a-b;</pre>
<p>then rerun the test.</p>
</p>
<p>Click OK if asked to save and launch.</p>
</p>
<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/18-JUnit-08.JPG"><img class="style6" style="width: 600px; border: 2px solid #00ccff;" src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/images/18-JUnit-08.JPG" alt="" /></a></p>
<p>The test passes and the red bar changes to green. Failure is set to 0. In this way, we can use the JUnit test in Eclipse.</p>
<div><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/02/ecl500a24-lab1-practicefiles.jar">Click here for the java files used to create this tutorial</a></div>
<p>FYV8WTBXZEUG</p>
]]></content:encoded>
			<wfw:commentRss>http://thupten.veryusefulinfo.com/2011/02/02/absolute-beginners-guide-to-eclipse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adapter design pattern</title>
		<link>http://thupten.veryusefulinfo.com/2011/01/15/adapter-design-pattern/</link>
		<comments>http://thupten.veryusefulinfo.com/2011/01/15/adapter-design-pattern/#comments</comments>
		<pubDate>Sat, 15 Jan 2011 09:26:28 +0000</pubDate>
		<dc:creator>thupten</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[adapter design pattern]]></category>
		<category><![CDATA[design pattern]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=165</guid>
		<description><![CDATA[
Adapter pattern adapts a piece of code to work with another. In real world, consider a battery charger for your phone. If you went for vacation to a somewhere in Europe, your charger won&#8217;t fit into the wall outlet. You would need a piece that can wrap your  that fits into the socket in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/01/adapterexample.jpg"><img src="http://thupten.veryusefulinfo.com/wp-content/uploads/2011/01/adapterexample-300x122.jpg" alt="" title="adapter pattern" width="300" height="122" class="alignright size-medium wp-image-174" /></a><br />
Adapter pattern adapts a piece of code to work with another. In real world, consider a battery charger for your phone. If you went for vacation to a somewhere in Europe, your charger won&#8217;t fit into the wall outlet. You would need a piece that can wrap your  that fits into the socket in Europe.</p>
<p>Adapter pattern is usually helpful to create new code that is compatible with old legacy code. Using adapter pattern the old code do not need to be changed to work with new code.<br />
<span id="more-165"></span><br />
In the world of the plugs, there is US plug</p>
<pre class="java">public class USPlug {
    public USPlug(){
        System.out.println("I am a US plug");
    }

    public void plugIn(){
        System.out.println("I fit into a square socket");
    }
}</pre>
<p>And then there is Europe Plug</p>
<pre class="java">public class EuropePlug {
	public EuropePlug(){
		System.out.println("I am a Europe Plug");
	}
	public void plugIn(){
		System.out.println("I fit into circle socket");
	}
}</pre>
<p>We need to put a US plug into a Europe socket. So we need an adapter called UStoEuropeAdapter. This adapter extends the feature of US plug to be compatible with european socket.<br />
So here is the adapter</p>
<pre class="java">public class UStoEuropeAdapter implements USPluggable {

	EuropePlug eplug;

	public UStoEuropeAdapter(EuropePlug ep){
		this.eplug = ep;
		System.out.println("I am the UStoEurope Adapter");
	}

	public void plugIn() {
		this.eplug.plugIn();
	}

}</pre>
<p>The USPluggable interface mandates a class which implements this to make sure to define method to plug into us socket. ie plugIntoSquareSocket()</p>
<pre class="java">public interface USPluggable {
	public void plugIn();
}</pre>
<p>The caller program creates europe plug, wraps it into the adapter and plugs it into the square socket. But since the adapter overwrites the method plugIntoSquareSocket() by calling the plugIntoCircleSocket() instead, now this adapter plugs into circle socket.</p>
<pre class="java">public class MainProgram {
	public static void main(String[] args) {
		EuropePlug ep = new EuropePlug();
		USPluggable myAdapter = new UStoEuropeAdapter(ep);
		myAdapter.plugIn();
	}
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://thupten.veryusefulinfo.com/2011/01/15/adapter-design-pattern/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>This batch file will lessen your sqlplus login frustration at zenit server.</title>
		<link>http://thupten.veryusefulinfo.com/2010/09/23/this-batch-file-will-lessen-your-sqlplus-login-frustration-at-zenit-server/</link>
		<comments>http://thupten.veryusefulinfo.com/2010/09/23/this-batch-file-will-lessen-your-sqlplus-login-frustration-at-zenit-server/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 07:29:46 +0000</pubDate>
		<dc:creator>thupten</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=137</guid>
		<description><![CDATA[If you are in DBS501 like me, you must be frustrated with sqlplus command. Why did they remove the good old isqlplus and instead put sqlplus. The problem with the sqlplus for most of us is because of connection problem.
If you haven&#8217;t modified the ora file to include host address for neptune, you must do [...]]]></description>
			<content:encoded><![CDATA[<p>If you are in DBS501 like me, you must be frustrated with sqlplus command. Why did they remove the good old isqlplus and instead put sqlplus. The problem with the sqlplus for most of us is because of connection problem.</p>
<p>If you haven&#8217;t modified the ora file to include host address for neptune, you must do that before proceeding any further. Here is the link</p>
<p>https://cs.senecac.on.ca/~nconkic/db-oracle11g.html</p>
<p><span id="more-137"></span></p>
<p>Now lets create a batch file that will log into oracle using sqlplus</p>
<p>Here are the steps</p>
<ol>
<li>Create a file login.bat</li>
<li>Type this  cmd/k &#8220;sqlplus dbs501_xxxAxx/mypasswordhere@neptune&#8221;</li>
<li>Save the file</li>
</ol>
<p><span style="color: #ff0000;">Warning: make sure you don&#8217;t name the batch file &#8217;sqlplus.bat&#8217; otherwise it call itself, not the sqlplus program in an infinite loop. If you don&#8217;t put password, it will prompt you to enter password. I just put it there because sometimes it takes 5-10 times before you can actually log into the zenit oracle server, and I really don&#8217;t like to waste any more time on typing passwords <img src='http://thupten.veryusefulinfo.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</span></p>
<p>Now you can double click this file to open a cmd window which will log into zenit oracle server. If there is a connection problem, just close it and reopen it. You can even open multiple instances.<br />
For testing, I opened three instances and one of them worked. The other two spit some connection errors. Common errors are timeout occurred error, host not listening error etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://thupten.veryusefulinfo.com/2010/09/23/this-batch-file-will-lessen-your-sqlplus-login-frustration-at-zenit-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bench project from scrap woods</title>
		<link>http://thupten.veryusefulinfo.com/2010/09/03/bench-project-from-scrap-woods/</link>
		<comments>http://thupten.veryusefulinfo.com/2010/09/03/bench-project-from-scrap-woods/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 15:37:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hobbies]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=132</guid>
		<description><![CDATA[
Helped my cousin make this bench.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://thupten.veryusefulinfo.com/wp-content/uploads/2010/09/bench.jpg"><img src="http://thupten.veryusefulinfo.com/wp-content/uploads/2010/09/bench-300x225.jpg" alt="" title="bench" width="300" height="225" class="alignnone size-medium wp-image-133" /></a><br />
Helped my cousin make this bench.</p>
]]></content:encoded>
			<wfw:commentRss>http://thupten.veryusefulinfo.com/2010/09/03/bench-project-from-scrap-woods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Layout without the hassle of div position</title>
		<link>http://thupten.veryusefulinfo.com/2010/07/22/css-layout-without-the-hassle-of-div-position/</link>
		<comments>http://thupten.veryusefulinfo.com/2010/07/22/css-layout-without-the-hassle-of-div-position/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 04:57:06 +0000</pubDate>
		<dc:creator>thupten</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css layout]]></category>
		<category><![CDATA[web layout]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=115</guid>
		<description><![CDATA[Tables are for tabular data. Div with CSS has been the new layout trend. With div and css, the code is much cleaner and accessible. But div positioning is something I always had problem with. But now using float attribute, I can create CSS Layout in much easier way.
I just watched a very good video [...]]]></description>
			<content:encoded><![CDATA[<p>Tables are for tabular data. Div with CSS has been the new layout trend. With div and css, the code is much cleaner and accessible. But div positioning is something I always had problem with. But now using float attribute, I can create CSS Layout in much easier way.</p>
<p>I just watched a very good video on google about how to easily create CSS Layout. I hope you have enough time, its about an hour long video.<br />
<a href="http://video.google.com/videoplay?docid=-7403771606765531020#">Check it out.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thupten.veryusefulinfo.com/2010/07/22/css-layout-without-the-hassle-of-div-position/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reading about how to customize WordPress</title>
		<link>http://thupten.veryusefulinfo.com/2010/07/19/reading-about-how-to-customize-wordpress/</link>
		<comments>http://thupten.veryusefulinfo.com/2010/07/19/reading-about-how-to-customize-wordpress/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 05:14:34 +0000</pubDate>
		<dc:creator>thupten</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[website development]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=105</guid>
		<description><![CDATA[I have been reading about WordPress this weekend.

WordPress is a Web CMS that can be used to create a blog. By default, it is set to create blog. But lots of website use WordPress as the base website and customize it to create amazing websites.
I still need to hone my CSS 2 skills, specially the [...]]]></description>
			<content:encoded><![CDATA[<p>I have been reading about WordPress this weekend.<br />
<img src="http://upload.wikimedia.org/wikipedia/commons/2/20/WordPress_logo.svg" style="width:250px;float:right;"/><br />
WordPress is a Web CMS that can be used to create a blog. By default, it is set to create blog. But lots of website use WordPress as the base website and customize it to create amazing websites.<br />
I still need to hone my CSS 2 skills, specially the layout skills. With a good knowledge of CSS, PHP, Photoshop and JQuery, WordPress can be customized to create very professional quality websites. </p>
]]></content:encoded>
			<wfw:commentRss>http://thupten.veryusefulinfo.com/2010/07/19/reading-about-how-to-customize-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JQuery rocks !!!</title>
		<link>http://thupten.veryusefulinfo.com/2010/07/17/jquery-rocks/</link>
		<comments>http://thupten.veryusefulinfo.com/2010/07/17/jquery-rocks/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 18:59:24 +0000</pubDate>
		<dc:creator>thupten</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=101</guid>
		<description><![CDATA[


JQuery is a libray of javascript functions that can be used for creating a website. Once JQuery is installed and included in your document, you have access to $ function or the jQuery(). I am reading a cookbook on JQuery on my ipod touch. Also got a cool ipod app with JQuery references.
One of the [...]]]></description>
			<content:encoded><![CDATA[<div style="background-color:#000">
<img src="http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif" style="width:215px;float:right;"/>
</div>
<p>JQuery is a libray of javascript functions that can be used for creating a website. Once JQuery is installed and included in your document, you have access to $ function or the jQuery(). I am reading a cookbook on JQuery on my ipod touch. Also got a cool ipod app with JQuery references.</p>
<p>One of the syntax to use JQuery is<br />
$(element).attribute(function(){ //do something});</p>
<p>I never liked the use of function definition in a function parameter. Hopefully, I will start to get use to with it.</p>
<p>JQuery website also has a lot of tutorials, demos along with its extensive documentation.</p>
<p>Thanks to my prof Simon, I found jQuery.</p>
<p>..will post more about JQuery when I find something useful.</p>
<p>http://www.jquery.com</p>
<p>JQuery. write less do more..</p>
]]></content:encoded>
			<wfw:commentRss>http://thupten.veryusefulinfo.com/2010/07/17/jquery-rocks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Earthquake in Toronto</title>
		<link>http://thupten.veryusefulinfo.com/2010/06/23/earthquake-in-toronto/</link>
		<comments>http://thupten.veryusefulinfo.com/2010/06/23/earthquake-in-toronto/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 18:01:53 +0000</pubDate>
		<dc:creator>thupten</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[earthquake]]></category>
		<category><![CDATA[toronto earthquake]]></category>

		<guid isPermaLink="false">http://thupten.veryusefulinfo.com/?p=95</guid>
		<description><![CDATA[Wow, there was small earthquake in Toronto at about 1:40pm today. It lasted for about 10 seconds. I was not sure if the house I was in was shaking or was it really an earthquake. I was about to run out of the house but the earthquake stopped. So I turned on the tv and checked CP24. It was showing a live speech by Obama. As soon as Obama's speech was over, then CP24 talked about the earthquake. There were people calling CP24 about the earthquake and telling their experiences. It was funny. Why did these people call the news? and they had the phone number of CP24 handy too? wow..these people are resourceful, they can get you a phone number of the tv news in the middle of an earthquake.]]></description>
			<content:encoded><![CDATA[<p>Wow, there was small earthquake in Toronto at about 1:40pm today. It lasted for about 10 seconds. I was not sure if the house I was in was shaking or was it really an earthquake. I was about to run out of the house but by then earthquake had stopped. So I turned on the tv and checked CP24. It was showing a live speech by Obama. As soon as Obama&#8217;s speech was over, CP24 breaking news talked about the earthquake.<br />
There were people calling CP24 about the earthquake and telling their experiences. It was funny. Why did these people call the news amidst an earthquake? and they had the phone number of CP24 handy too? wow..these people are resourceful, they can get you a phone number of the tv news in the middle of an earthquake.</p>
]]></content:encoded>
			<wfw:commentRss>http://thupten.veryusefulinfo.com/2010/06/23/earthquake-in-toronto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

