<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">]>
<rss version="2.0" xml:base="http://www.ajaypal.com">
<channel>
 <title>ajaypal.com - Software Development</title>
 <link>http://www.ajaypal.com/taxonomy/term/3/0</link>
 <description></description>
 <language>en</language>
<item>
 <title>The World is Your Canvas</title>
 <link>http://www.ajaypal.com/canvas_tag.html</link>
 <description>Here is a new feature of Firefox 1.5.x, Apple Safari and Opera 9. I can draw using pure Javascript using the &lt;a href=&#039;http://developer.mozilla.org/en/docs/HTML:Canvas&#039;&gt;&amp;lt;Canvas&amp;gt; HTML Tag&lt;/a&gt;. In case you are using one of the browsers mentioned above, welcome to the brave new world of JavaScript Power. First it was Ajax now Canvas. Nice.
&lt;br /&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;th&gt;Actual Raw Data from System Logs&lt;/th&gt;
&lt;th&gt;Canvas Graph of the Same Data&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;
&lt;table&gt;
 &lt;tr&gt;&lt;th class=&quot;active&quot;&gt;&lt;a href=&quot;taxonomy/term/3/0/feed?sort=desc&amp;amp;order=Message+Type&quot; title=&quot;sort descending&quot; class=&quot;active&quot;&gt;Message Type&amp;nbsp;&lt;img src=&quot;misc/arrow-desc.png&quot;  alt=&quot;sort icon&quot; title=&quot;sort descending&quot; /&gt;&lt;/a&gt;&lt;/th&gt;&lt;th&gt;&lt;a href=&quot;taxonomy/term/3/0/feed?sort=asc&amp;amp;order=Count&quot; title=&quot;sort by Count&quot; class=&quot;active&quot;&gt;Count&lt;/a&gt;&lt;/th&gt; &lt;/tr&gt;
 &lt;tr class=&quot;dark&quot;&gt;&lt;td class=&quot;active&quot;&gt;access denied&lt;/td&gt;&lt;td&gt;5&lt;/td&gt; &lt;/tr&gt;
 &lt;tr class=&quot;light&quot;&gt;&lt;td class=&quot;active&quot;&gt;content&lt;/td&gt;&lt;td&gt;173&lt;/td&gt; &lt;/tr&gt;
 &lt;tr class=&quot;dark&quot;&gt;&lt;td class=&quot;active&quot;&gt;cron&lt;/td&gt;&lt;td&gt;778&lt;/td&gt; &lt;/tr&gt;
 &lt;tr class=&quot;light&quot;&gt;&lt;td class=&quot;active&quot;&gt;page not found&lt;/td&gt;&lt;td&gt;1929&lt;/td&gt; &lt;/tr&gt;
 &lt;tr class=&quot;dark&quot;&gt;&lt;td class=&quot;active&quot;&gt;php&lt;/td&gt;&lt;td&gt;503&lt;/td&gt; &lt;/tr&gt;
 &lt;tr class=&quot;light&quot;&gt;&lt;td class=&quot;active&quot;&gt;search&lt;/td&gt;&lt;td&gt;21&lt;/td&gt; &lt;/tr&gt;
 &lt;tr class=&quot;dark&quot;&gt;&lt;td class=&quot;active&quot;&gt;user&lt;/td&gt;&lt;td&gt;8&lt;/td&gt; &lt;/tr&gt;
&lt;/table&gt;
  &lt;/td&gt;
  &lt;td&gt;&lt;small&gt;This is not an image.&lt;/small&gt;
    &lt;canvas id=&quot;canvas&quot; width=&quot;320&quot; height=&quot;300&quot;&gt;Cant see the graph, download &lt;a href=&#039;http://www.spreadfirefox.com/?q=affiliates&amp;id=150090&amp;t=64&#039;&gt;Firefox&lt;/a&gt;.&lt;/canvas&gt;
  &lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;script type=&quot;application/x-javascript&quot;&gt;

function draw()
{
     var ctx = document.getElementById(&#039;canvas&#039;).getContext(&#039;2d&#039;);
     if (ctx)
     {
          var typearr = new Array();
          var countarr = new Array();
          var fillarr = new Array();

          typearr[0] = &#039;access denied&#039;
          countarr[0] = &#039;0.259201658891&#039;
          fillarr[0] = &#039;rgb( 22,168 , 172)&#039;
          typearr[1] = &#039;content&#039;
          countarr[1] = &#039;8.96837739762&#039;
          fillarr[1] = &#039;rgb( 168,178 , 179)&#039;
          typearr[2] = &#039;cron&#039;
          countarr[2] = &#039;40.3317781234&#039;
          fillarr[2] = &#039;rgb( 132,123 , 99)&#039;
          typearr[3] = &#039;page not found&#039;
          countarr[3] = &#039;100&#039;
          fillarr[3] = &#039;rgb( 55,84 , 165)&#039;
          typearr[4] = &#039;php&#039;
          countarr[4] = &#039;26.0756868844&#039;
          fillarr[4] = &#039;rgb( 162,150 , 160)&#039;
          typearr[5] = &#039;search&#039;
          countarr[5] = &#039;1.08864696734&#039;
          fillarr[5] = &#039;rgb( 150,27 , 191)&#039;
          typearr[6] = &#039;user&#039;
          countarr[6] = &#039;0.414722654225&#039;
          fillarr[6] = &#039;rgb( 61,101 , 156)&#039;
          var maxitems = 7
        ctx.translate(250,250);
        ctx.rotate(Math.PI);
        ctx.beginPath();
        ctx.moveTo(60,50);
        ctx.lineTo(60, 300);
        ctx.stroke();

        ctx.moveTo(60,50);
        ctx.lineTo(300, 50);
        ctx.stroke();

        for (i=0; i &lt; typearr.length; i++)
        {
             ctx.fillStyle = fillarr[i];
             ctx.fillRect(i*25+60, 50, 25,countarr[i]*2);
             ctx.fillRect(30, i*(10+5)+50, 10, 10);

             ctx.moveTo(0,i*(10+5)+50);
             ctx.lineTo(30, i*(10+5)+50);
             ctx.stroke();
       }
    }
    else
   {
     alert(&quot;Oops: Canvas HTML tag not supported in your browser get Firefox&quot;);
   }
}
draw();
&lt;/script&gt;
 &lt;!-- break --&gt;
The graph you are seeing above has been drawn using JavaScript only, it takes live data from my website CMS on types of errors/ activities occuring and paints it dynamically. Currently no Ajax, so you must refresh the page to see latest trends in errors.
&lt;p&gt;
More infomration about Canvas HTML tag is &lt;a href=&#039;http://developer.mozilla.org/en/docs/Canvas_tutorial&#039;&gt;here&lt;/a&gt;. Also see these nice Javascript First Person Shooters &lt;a href=&#039;http://www.abrahamjoffe.com.au/ben/canvascape/&#039;&gt;here&lt;/a&gt; and &lt;a href=&#039;http://canvex.lazyilluminati.com.nyud.net:8080/83/play.xhtml&#039;&gt;here&lt;/a&gt; written using Canvas only.
&lt;/p&gt;
&lt;p&gt;
For code right click and view source.
&lt;/p&gt;</description>
 <category domain="http://www.ajaypal.com/taxonomy/term/3">Software Development</category>
 <pubDate>Sat, 03 Mar 2007 15:42:07 -0600</pubDate>
</item>
<item>
 <title>Interesting Links</title>
 <link>http://www.ajaypal.com/interesting_links.html</link>
 <description>&lt;p&gt;Some really interesting projects using GNU/ Linux&lt;/p&gt;
&lt;ul &gt;
&lt;li &gt;&lt;a href=&#039;http://www-128.ibm.com/developerworks/linux/library/l-knockage.html?ca=dgr-lnxw01Knock-Knock&#039;&gt;Operating your laptop computer using knocks&lt;/a&gt;&lt;/li&gt;
&lt;li &gt;&lt;a href=&#039;http://www-128.ibm.com/developerworks/opensource/library/os-linuxmusic/&#039;&gt;Make your computer generate music from system events&lt;/a&gt;&lt;/li&gt;
&lt;li &gt;&lt;a href=&#039;http://www.cs.unm.edu/~dlchao/flake/doom/&#039;&gt;Using Doom (The classic 3D game) as a user interface to control processes&lt;/a&gt;&lt;/li&gt;
</description>
 <category domain="http://www.ajaypal.com/taxonomy/term/1">Announcements</category>
 <category domain="http://www.ajaypal.com/taxonomy/term/2">GNU/ Linux</category>
 <category domain="http://www.ajaypal.com/taxonomy/term/3">Software Development</category>
 <pubDate>Thu, 16 Nov 2006 12:39:30 -0600</pubDate>
</item>
<item>
 <title>To Hell and Still There</title>
 <link>http://www.ajaypal.com/hell_and_back.html</link>
 <description>&lt;p&gt;Hell, according to many religious beliefs, is a place or a state of pain and suffering (Ref: &lt;a href=&#039;http://en.wikipedia.org/wiki/Hell&#039;&gt;Wikipedia.org&lt;/a&gt;). And it is not limited to religious text books only. In my limited universe, I can imagin the following Hells that will haunt me besides the usual we can expect in this mortal world.&lt;/p&gt;
&lt;p&gt;&lt;b &gt;The Coding Hell&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;A recent post on drupal.org on &lt;a href=&#039;http://drupal.org/node/77487&#039;&gt;The Road to Drupal Hell&lt;/a&gt; or rather the classical hack the code to death hell. I do hope most of the software developers must be familiar with this.&lt;/p&gt;
</description>
 <category domain="http://www.ajaypal.com/taxonomy/term/12">PHP</category>
 <category domain="http://www.ajaypal.com/taxonomy/term/5">Politics</category>
 <category domain="http://www.ajaypal.com/taxonomy/term/3">Software Development</category>
 <pubDate>Tue, 08 Aug 2006 01:54:41 -0500</pubDate>
</item>
</channel>
</rss>
