<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>ClickOffline.com</title>
	<atom:link href="http://www.clickoffline.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clickoffline.com</link>
	<description>Fast Forward, Web Development</description>
	<pubDate>Sun, 13 Jun 2010 12:54:58 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<item>
		<title>Show pictures from Picasa albums in your custom website using Zend Framework</title>
		<link>http://www.clickoffline.com/2010/06/show-pictures-from-picasa-albums-in-your-custom-website-using-zend-framework/</link>
		<comments>http://www.clickoffline.com/2010/06/show-pictures-from-picasa-albums-in-your-custom-website-using-zend-framework/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 12:47:11 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[HowTo]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[picasa]]></category>

		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.clickoffline.com/?p=136</guid>
		<description><![CDATA[Zend Framework and Zend Gdata API provide a simple and effective solution to display pictures and galleries from your picasa account in your own custom website. Lets take one of the public galleries in picasa show it in a custom php page in this website.
Zend Framework
Before we start. In order to use Zend Gdata API, [...]]]></description>
			<content:encoded><![CDATA[<p>Zend Framework and Zend Gdata API provide a simple and effective solution to display pictures and galleries from your picasa account in your own custom website. Lets take one of the public galleries in picasa show it in a custom php page in this website.</p>
<p><strong>Zend Framework</strong><br />
Before we start. In order to use Zend Gdata API, you need to have Zend framework (1.6 or higher) installed, If you have the full framework package installed , you won&#8217;t need to worry about anything, you can go ahead and start calling the APIs directly, In case if you don&#8217;t have the full framework package installed, you will have to download and configure Google Data Client Library. Details of setup and configuration are listed in the following link</p>
<p><a href="http://code.google.com/apis/gdata/articles/php_client_lib.html#gdata-installation" target="_blank">http://code.google.com/apis/gdata/articles/php_client_lib.html#gdata-installation</a></p>
<p><strong>CODE <img src='http://www.clickoffline.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong><br />
The following url refers to a public picasa gallery</p>
<p><a href="http://picasaweb.google.com/shasankar/SampleGallery#" target="_blank">http://picasaweb.google.com/shasankar/SampleGallery#</a></p>
<p>The URL has two important pointers, the picasa user id the one that follows the picasaweb.google.com domain, its usually the picasa user name, in some cases it can also be a long alphanumeric string, this is the user id, the other one is the gallery name, in this case it is  &#8216;SampleGallery&#8217;<br />
<script type="text/javascript"></script><br />
The following script allows you to load pictured directly into your website</p>
<pre name="code" class="php">

&lt;?php
error_reporting(E_ALL);
require_once &#039;Zend/Loader.php&#039;;
Zend_Loader::loadClass(&#039;Zend_Gdata_Photos&#039;);

// Album and User
$sUserID = &quot;shasankar&quot;;
$sAlbumName = &quot;SampleGallery&quot;;

$serviceName = Zend_Gdata_Photos::AUTH_SERVICE_NAME;
$gp = new Zend_Gdata_Photos();
$query = $gp-&gt;newAlbumQuery();
$query-&gt;setUser($sUserID);
$query-&gt;setAlbumName($sAlbumName);
$query-&gt;setImgMax(&quot;800&quot;);
$query-&gt;setThumbSize(&quot;160&quot;);
$albumFeed = $gp-&gt;getAlbumFeed($query);
$sPrintThumbs = &quot;&quot;;

foreach ($albumFeed as $albumEntry) {
if ($albumEntry-&gt;getMediaGroup()-&gt;getThumbnail() != null) {
// Load Thumbnail Info
$mediaThumbnailArray = $albumEntry-&gt;getMediaGroup()-&gt;getThumbnail();
$ThumbnailUrl = $mediaThumbnailArray[0]-&gt;getUrl();
$ThumbnailHeight = $mediaThumbnailArray[0]-&gt;getHeight();
$ThumbnailWidth = $mediaThumbnailArray[0]-&gt;getWidth();
// Load Picture Info
$mediaArray = $albumEntry-&gt;getMediaGroup()-&gt;getContent();
$ImageUrl = $mediaArray[0]-&gt;getUrl();
$sImageTitle = $albumEntry-&gt;getMediaGroup()-&gt;getDescription()-&gt;text;
$url = $albumEntry-&gt;getLink(&#039;alternate&#039;)-&gt;href;

$sLinkString = &lt;&lt;&lt;LTEXT
&lt;a href=&quot;$ImageUrl&quot; title=&quot;$sImageTitle&quot;&gt;&lt;img src=&quot;$ThumbnailUrl&quot; width=&quot;$ThumbnailWidth&quot; height=&quot;$ThumbnailHeight&quot; /&gt;&lt;/a&gt;
LTEXT;
$sPrintThumbs .=$sLinkString ;
}
}
?&gt;
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;
&quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt; Loading pictures from Picasa Gallery&lt;/title&gt;
&lt;/head&gt;
&lt;body &gt;
&lt;div&gt;
&lt;div&gt;
&lt;h3&gt;SampleGallery (Picasa)&lt;/h3&gt;

&lt;/div&gt;
&lt;div&gt;
&lt;?php echo $sPrintThumbs; ?&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>The Api allows lot of customization options, thumbnail size, final image size, number of results per page, etc, these setting have to passed along with the Album query that is sent to picasa.</p>
<p><a href="http://www.clickoffline.com/wp-content/uploads/2010/06/screenshot-samplegallery-shasankar-picasa-web-albums-mozilla-firefox.png"><img class="alignnone size-medium wp-image-139" title="screenshot-samplegallery-shasankar-picasa-web-albums-mozilla-firefox" src="http://www.clickoffline.com/wp-content/uploads/2010/06/screenshot-samplegallery-shasankar-picasa-web-albums-mozilla-firefox-300x283.png" alt="" width="300" height="283" /> </a><a href="http://www.clickoffline.com/wp-content/uploads/2010/06/screenshot-loading-pictures-from-picasa-gallery-mozilla-firefox.png"></a></p>
<p><strong>Picasa album in Custom Webpage</strong></p>
<p><a href="http://www.clickoffline.com/wp-content/uploads/2010/06/screenshot-loading-pictures-from-picasa-gallery-mozilla-firefox.png"><img class="alignnone size-medium wp-image-140" title="screenshot-loading-pictures-from-picasa-gallery-mozilla-firefox" src="http://www.clickoffline.com/wp-content/uploads/2010/06/screenshot-loading-pictures-from-picasa-gallery-mozilla-firefox-300x283.png" alt="" width="300" height="283" /></a></p>
<p><strong>Related Links</strong></p>
<p>If you want to display private picasa galleries in your website, you can make use of zend authentication api, you can read more about it here</p>
<p><a href="http://www.ibm.com/developerworks/library/x-picasalbum/#c5" target="_blank">http://www.ibm.com/developerworks/library/x-picasalbum/#c5</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickoffline.com/2010/06/show-pictures-from-picasa-albums-in-your-custom-website-using-zend-framework/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Hacks for IE8</title>
		<link>http://www.clickoffline.com/2009/12/css-hacks-for-ie8/</link>
		<comments>http://www.clickoffline.com/2009/12/css-hacks-for-ie8/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 02:26:49 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[HowTo]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[hacks]]></category>

		<category><![CDATA[ie]]></category>

		<guid isPermaLink="false">http://www.clickoffline.com/?p=134</guid>
		<description><![CDATA[Here it is, CSS Hacks for IE8, But, be little cautious while using them, sometimes, they may not work well with complex CSS syntaxes.
IE8 Standards-Mode Only:
.test { color /*\**/: blue\9 }
All IE versions, including IE8 Standards Mode:
.test { color: blue\9 }
]]></description>
			<content:encoded><![CDATA[<p>Here it is, CSS Hacks for IE8, But, be little cautious while using them, sometimes, they may not work well with complex CSS syntaxes.</p>
<p>IE8 Standards-Mode Only:</p>
<blockquote><p>.test { color /*\**/: blue\9 }</p></blockquote>
<p>All IE versions, including IE8 Standards Mode:</p>
<blockquote><p>.test { color: blue\9 }</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.clickoffline.com/2009/12/css-hacks-for-ie8/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Public waves in Google wave</title>
		<link>http://www.clickoffline.com/2009/11/public-waves-in-google-wave/</link>
		<comments>http://www.clickoffline.com/2009/11/public-waves-in-google-wave/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 15:16:13 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[HowTo]]></category>

		<category><![CDATA[google wave]]></category>

		<category><![CDATA[web technology]]></category>

		<guid isPermaLink="false">http://www.clickoffline.com/?p=130</guid>
		<description><![CDATA[Public waves allow wave users to publish and share their waves with other Google Wave users, and hence allowing everyone to contribute and make changes in the wave
Accessing public waves
To access public waves, you will need to enter the following keyword, in the search box
 with:public
To search public waves, you can use a with:public following [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">Public waves allow wave users to publish and share their waves with other Google Wave users, and hence allowing everyone to contribute and make changes in the wave</p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;">Accessing public waves</strong></p>
<p class="MsoNormal">To access public waves, you will need to enter the following keyword, in the search box</p>
<p class="MsoNormal"><span style="font-family: &quot;Courier New&quot;;"><span style="mso-tab-count: 1;"> </span>with:public</span></p>
<p class="MsoNormal">To search public waves, you can use a <span style="font-family: &quot;Courier New&quot;;">with:public </span>following by the search string, for eg.</p>
<p class="MsoNormal"><span style="font-family: &quot;Courier New&quot;;"><span style="mso-tab-count: 1;"> </span>with:public Chennai</span></p>
<p class="MsoNormal">Will return all public waves with the keyword <strong style="mso-bidi-font-weight: normal;"><em style="mso-bidi-font-style: normal;">Chennai</em></strong></p>
<p class="MsoNormal">
<div id="attachment_132" class="wp-caption alignnone" style="width: 310px"><a href="http://www.clickoffline.com/wp-content/uploads/2009/11/wave-search-2.png"><img class="size-medium wp-image-132" title="Accessing public waves" src="http://www.clickoffline.com/wp-content/uploads/2009/11/wave-search-2-300x188.png" alt="Accessing public waves" width="300" height="188" /></a><p class="wp-caption-text">Accessing public waves</p></div>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;">Making a wave public</strong></p>
<p class="MsoNormal">In order to make a wave public and to grant access to everyone, you will need to give access to the user called <span class="apple-style-span"><span style="font-family: &quot;Courier New&quot;; color: #000000;"><a href="mailto:public@a.gwave.com">public@a.gwave.com</a>. </span></span>In the add contact screen , fill in <a href="mailto:public@a.gwave.com"><span style="text-decoration: none; color: #000000;">public@a.gwave.com</span></a> and Press &#8220;Enter&#8221;, even if the submit button is not activated, the public user will be added to your account. This looks like a bug in the wave system, expecting Google to fix it soon.</p>
<p class="MsoNormal"><a href="http://www.clickoffline.com/wp-content/uploads/2009/11/wave-public-waves.png"><img class="alignnone size-full wp-image-131" title="wave-public-waves" src="http://www.clickoffline.com/wp-content/uploads/2009/11/wave-public-waves.png" alt="" width="479" height="294" /></a></p>
<p class="MsoNormal">Once this user is added, any waves published along with this user will be available in public domain.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickoffline.com/2009/11/public-waves-in-google-wave/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google Wave Developer Preview - First Impressions</title>
		<link>http://www.clickoffline.com/2009/10/google-wave-developer-preview-first-impressions/</link>
		<comments>http://www.clickoffline.com/2009/10/google-wave-developer-preview-first-impressions/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 06:18:56 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Tech]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[first impressions]]></category>

		<category><![CDATA[google wave]]></category>

		<category><![CDATA[screenshots]]></category>

		<guid isPermaLink="false">http://www.clickoffline.com/?p=119</guid>
		<description><![CDATA[At last I got my Google wave account activated yesterday, but it didn&#8217;t carry any additional invites that can be passed on to others. Its a bit tricky if it doesn&#8217;t carry additional invites, since you wont be able to share and evaluate this technology with others. Please take a look at some of the [...]]]></description>
			<content:encoded><![CDATA[<p>At last I got my Google wave account activated yesterday, but it didn&#8217;t carry any additional invites that can be passed on to others. Its a bit tricky if it doesn&#8217;t carry additional invites, since you wont be able to share and evaluate this technology with others. Please take a look at some of the Screenshots of Google Wave.</p>
<table border="0" width="90%">
<tbody>
<tr>
<td>
<p><div id="attachment_120" class="wp-caption alignnone" style="width: 310px"><a href="http://www.clickoffline.com/wp-content/uploads/2009/10/01-wave-homepage.png"><img class="size-medium wp-image-120" title="Google Wave Homepage" src="http://www.clickoffline.com/wp-content/uploads/2009/10/01-wave-homepage-300x245.png" alt="Google Wave Homepage" width="300" height="245" /></a><p class="wp-caption-text">Google Wave Homepage</p></div></td>
</tr>
<tr>
<td>
<p><div id="attachment_121" class="wp-caption alignnone" style="width: 310px"><a href="http://www.clickoffline.com/wp-content/uploads/2009/10/02-public-wave.png"><img class="size-medium wp-image-121" title="A Public Wave" src="http://www.clickoffline.com/wp-content/uploads/2009/10/02-public-wave-300x194.png" alt="A Public Wave" width="300" height="194" /></a><p class="wp-caption-text">A Public Wave</p></div></td>
</tr>
</tbody>
</table>
<p>The Wave API will allow plug-in developers to develop extensible plug-ins. Sudoko plug-in was quite interesting. So was the Google Maps plug-in, the live connectivity was just too good.</p>
<table border="0" width="90%">
<tbody>
<tr>
<td>
<p><div id="attachment_122" class="wp-caption alignnone" style="width: 160px"><a href="http://www.clickoffline.com/wp-content/uploads/2009/10/03-sudoko-in-wave.png"><img class="size-thumbnail wp-image-122" title="Playing Sudoko in GW" src="http://www.clickoffline.com/wp-content/uploads/2009/10/03-sudoko-in-wave-150x150.png" alt="Playing Sudoko in GW" width="150" height="150" /></a><p class="wp-caption-text">Playing Sudoko in GW</p></div></td>
<td>
<p><div id="attachment_123" class="wp-caption alignnone" style="width: 160px"><a href="http://www.clickoffline.com/wp-content/uploads/2009/10/04-beta-reminder.png"><img class="size-thumbnail wp-image-123" title="GW Error Messages" src="http://www.clickoffline.com/wp-content/uploads/2009/10/04-beta-reminder-150x150.png" alt="GW Error Messages" width="150" height="150" /></a><p class="wp-caption-text">GW Error Messages</p></div></td>
<td>
<p><div id="attachment_124" class="wp-caption alignnone" style="width: 160px"><a href="http://www.clickoffline.com/wp-content/uploads/2009/10/05-wave-extensions.png"><img class="size-thumbnail wp-image-124" title="Google Wave Extensions" src="http://www.clickoffline.com/wp-content/uploads/2009/10/05-wave-extensions-150x150.png" alt="Google Wave Extensions" width="150" height="150" /></a><p class="wp-caption-text">Google Wave Extensions</p></div></td>
</tr>
</tbody>
</table>
<p>On a overview, Google wave seems to show the light of how the next generation of communications will look like. This technology has the prospect to replace email altogether (am i hyping it too much ??). But on an overview i am not able to define Google wave properly, yes it is a collaboration platform, but its a mix of email, instant messaging, blogs and other things. I will not term Google wave as a social networking platform/tool, because this is more sort of a communications platform, more to do with interactions and collaboration, and real time information exchange  (more reason being, it could attract an access ban by employers, if termed so.. he he <img src='http://www.clickoffline.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ). I will take a look at API&#8217;s now, and will try to post if i am able to build something out of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickoffline.com/2009/10/google-wave-developer-preview-first-impressions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google Chrome on Ubuntu Linux</title>
		<link>http://www.clickoffline.com/2009/10/google-chrome-on-ubuntu-linux/</link>
		<comments>http://www.clickoffline.com/2009/10/google-chrome-on-ubuntu-linux/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 15:15:02 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[browser]]></category>

		<category><![CDATA[chrome]]></category>

		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.clickoffline.com/?p=110</guid>
		<description><![CDATA[Atlast I managed to find the link for Ubuntu version of Google chrome. Please check below. This one runs faster and takes up very very less memory when compared to firefox. Very cool download  
The minimalistic approach of Google chrome gives itself an unique edge over other browsers in terms of speed comparison ratios. Google has always pioneered in offering technology [...]]]></description>
			<content:encoded><![CDATA[<p>Atlast I managed to find the link for Ubuntu version of Google chrome. Please check below. This one runs faster and takes up very very less memory when compared to firefox. Very cool download <img src='http://www.clickoffline.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The minimalistic approach of Google chrome gives itself an unique edge over other browsers in terms of speed comparison ratios. Google has always pioneered in offering technology to meet the exact needs of people and thus attracting users by simplicity. It is so very evident in all their engineering, take Google search, Gmail, Gtalk, and now chrome. Google has been successful by offering just the basics in a perfect manner. And thats the same reason why I was attracted to install Google Chrome in Linux.</p>
<p>Also check this link for an interesting comparison of Linux based browsers, looks like Firefox is way behind when compared to Opera or Chrome..</p>
<p><a href="http://penguininside.blogspot.com/2009/08/web-browser-comparison-and-benchmarks.html" target="_blank">http://penguininside.blogspot.com/2009/08/web-browser-comparison-and-benchmarks.html</a></p>
<p>Download Link: <a onclick="javascript:pageTracker._trackPageview('/outbound/comment/www.google.com');" rel="nofollow" href="http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_i386_deb">http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_i386_deb</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickoffline.com/2009/10/google-chrome-on-ubuntu-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google wave</title>
		<link>http://www.clickoffline.com/2009/10/google-wave/</link>
		<comments>http://www.clickoffline.com/2009/10/google-wave/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 11:37:51 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[google wave]]></category>

		<category><![CDATA[web technology]]></category>

		<guid isPermaLink="false">http://www.clickoffline.com/?p=105</guid>
		<description><![CDATA[Last week, one of the developer in my office was talking about Google Wave, although I had heard about wave before, I thought it was just a social networking tool just in lines of flock , more to do with service integration (assumption is the biggest evil). but only until i saw this small(but long) [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, one of the developer in my office was talking about <strong><em>Google Wave</em></strong>, although I had heard about wave before, I thought it was just a social networking tool just in lines of flock , more to do with service integration (assumption is the biggest evil). but only until i saw this small(but long) video about Wave on Google I/O did i realize .. that this technology has the potential to bring a change in the way we communicate, interact and do things with the internet.</p>
<p>Look at this video</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/v_UyVmITiYQ&amp;rel=0&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/v_UyVmITiYQ&amp;rel=0&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>This is too cool <img src='http://www.clickoffline.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I am anxiously waiting to get my wave invite..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickoffline.com/2009/10/google-wave/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Optimized Event Delegation in jQuery</title>
		<link>http://www.clickoffline.com/2009/04/optimized-event-delegation-in-jquery/</link>
		<comments>http://www.clickoffline.com/2009/04/optimized-event-delegation-in-jquery/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 17:22:31 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[HowTo]]></category>

		<category><![CDATA[Tech]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Optimization]]></category>

		<guid isPermaLink="false">http://www.clickoffline.com/?p=100</guid>
		<description><![CDATA[Often when working with large datasets, you will come across issues related to intense event overload for objects like table cells. This could translate to poor client JavaScript performance. The root cause for the performance lag is the large number of events that are associated and handled by web page at the client. Lets consider [...]]]></description>
			<content:encoded><![CDATA[<p>Often when working with large datasets, you will come across issues related to intense event overload for objects like table cells. This could translate to poor client JavaScript performance. The root cause for the performance lag is the large number of events that are associated and handled by web page at the client. Lets consider a scenario of highlighting cells in a table as follows</p>
<p><strong>HTML</strong></p>
<pre name="code" class="js">

&lt;table id=&quot;resultSetTable&quot;&gt;
&lt;tr id=&quot;row1&quot;&gt;
&lt;td class=&quot;nameCell&quot;&gt; UPS &lt;/td&gt;
&lt;td class=&quot;priceCell&quot;&gt; 2500 &lt;/td&gt;
&lt;/tr&gt;
&lt;tr id=&quot;row2&quot;&gt;
&lt;td class=&quot;nameCell&quot;&gt; Mouse&lt;/td&gt;
&lt;td class=&quot;priceCell&quot;&gt; 300 &lt;/td&gt;
&lt;/tr&gt;
.
.
.
&lt;tr id=&quot;row859&quot;&gt;
&lt;td class=&quot;nameCell&quot;&gt; Keyboard &lt;/td&gt;
&lt;td class=&quot;priceCell&quot;&gt; 250 &lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</pre>
<p><strong>Javascript to highlight the selected cell</strong></p>
<pre name="code" class="js">

&lt;script type=&quot;text/javascript&quot;&gt;
$(function(){
$(&#039;.nameCell&#039;).click(function(){
if ($(this).css(&#039;background-color&#039;) != &#039;rgb(255, 0, 0)&#039;)
$(this).css(&#039;background-color&#039;, &#039;red&#039;);
else
$(this).css(&#039;background-color&#039;, &#039;green&#039;);
});

});
&lt;/script&gt;
</pre>
<p>Although the code above works properly, the inefficiency of the above list code can be identifeid if the code is put through large datasets, since the javascript has to assign the event handler to all cells of the class “nameCell”, the Javascript engine gets overloaded with events, in a scenario of a few thousand rows, there are equal number of events being declared and handled simultaneously. This in some cases might cause the browser to crash. I got the following error when I tested this code with a large dataset on Firefox.</p>
<blockquote><p><em>A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue. </em><br />
Script: jquery-1.3.2.min.js:18</p></blockquote>
<p>An alternate way to handle this problem will be to assign the event handler to a larger parent object, and to execute the event handler by validating the properties of the event. In this case the larger parent object is the Table. We can drill down to the class of the clicked cell of the table, see if it matches the &#8216;nameCell&#8217; class type and then run the instructions, based on the validation. This mechanism is known as event delegation.</p>
<pre name="code" class="js">

&lt;script type=&quot;text/javascript&quot;&gt;
$(function(){
$(&#039;table&#039;).click(function(event) {
var $thisCell, $tgt = $(event.target);
if ($tgt.is(&#039;td&#039;)) {
$thisCell = $tgt;
} else if ($tgt.parents(&#039;td&#039;).length) {
$thisCell = $tgt.parents(&#039;td:first&#039;);
}
// now do something with $thisCell
if ($($thisCell).attr(&quot;class&quot;)==&quot;nameCell&quot;)
{
if ($($thisCell).css(&#039;background-color&#039;) != &#039;rgb(255, 0, 0)&#039;)
$($thisCell).css(&#039;background-color&#039;, &#039;red&#039;);
else
$($thisCell).css(&#039;background-color&#039;, &#039;green&#039;);
}
});
});
&lt;/script&gt;
</pre>
<p>The web application saves lots of client computing power by avoiding the replication of thousands of events by delegating the event to a parent object. Proper use of event delegation in jQuery can help in excellent performance optimization of the web application.</p>
<p><strong>References</strong></p>
<ul>
<li><a href="http://www.learningjquery.com/2008/03/working-with-events-part-1">Working with Events</a> by Karl Swedberg -<br />
http://www.learningjquery.com/2008/03/working-with-events-part-1</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.clickoffline.com/2009/04/optimized-event-delegation-in-jquery/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Best captcha form ever</title>
		<link>http://www.clickoffline.com/2009/04/best-captcha-form-ever/</link>
		<comments>http://www.clickoffline.com/2009/04/best-captcha-form-ever/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 08:55:52 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[captcha]]></category>

		<category><![CDATA[fun]]></category>

		<category><![CDATA[maths]]></category>

		<guid isPermaLink="false">http://www.clickoffline.com/?p=95</guid>
		<description><![CDATA[This one is a really cool captcha validation that I came across in a blog. The site was probably meant for some maths wizards I guess and they wanted to auto disqualify people who didn&#8217;t have enough level of maths understanding.

]]></description>
			<content:encoded><![CDATA[<p>This one is a really cool captcha validation that I came across in a blog. The site was probably meant for some maths wizards I guess and they wanted to auto disqualify people who didn&#8217;t have enough level of maths understanding.</p>
<p><a href="http://www.clickoffline.com/wp-content/uploads/2009/04/captcha.png"><img class="alignnone size-full wp-image-96" title="Best Captcha Validation" src="http://www.clickoffline.com/wp-content/uploads/2009/04/captcha.png" alt="" width="500" height="270" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickoffline.com/2009/04/best-captcha-form-ever/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Behind the scenes - What happens when you open a page in a website</title>
		<link>http://www.clickoffline.com/2009/02/behind-the-scenes-what-happens-you-open-a-page-in-a-website/</link>
		<comments>http://www.clickoffline.com/2009/02/behind-the-scenes-what-happens-you-open-a-page-in-a-website/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 16:43:11 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[HowTo]]></category>

		<category><![CDATA[Tech]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[basics]]></category>

		<category><![CDATA[web technology]]></category>

		<guid isPermaLink="false">http://www.clickoffline.com/?p=85</guid>
		<description><![CDATA[A lot of you may very well know what happens behind the scenes when a webpage is requested or being served, this article will explain the details and internals of what goes behind when you type http://www.clickoffline.com/index.php
The Internet Architecture
What is meant by internet is a collection of networks that interconnect a large number of content [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of you may very well know what happens behind the scenes when a webpage is requested or being served, this article will explain the details and internals of what goes behind when you type <a href="http://www.clickoffline.com/index.php">http://www.clickoffline.com/index.php</a></p>
<h2>The Internet Architecture</h2>
<p>What is meant by internet is a collection of networks that interconnect a large number of content providing servers with the end users. Internet typically is a network of much smaller networks which are interconnected. Any network/machine that is connected to the internet can provide and retrieve content from the internet.</p>
<p style="text-align: center;"><a href="http://www.clickoffline.com/wp-content/uploads/2009/02/internet-arch.gif"><img class="alignnone size-full wp-image-88" title="Internet Architecture" src="http://www.clickoffline.com/wp-content/uploads/2009/02/internet-arch.gif" alt="" width="286" height="275" /></a></p>
<p>Since internet is a network, just like any other network it supports a wide range of protocols, one of the most frequently used protocols is the HTTP protocol. The <strong>HTTP (Hyper Text Transfer Protocol) </strong>is the main medium for content retrieval and delivery over the internet. Some of the other protocols that are frequently used are as follows</p>
<ul>
<li>FTP – File Transfer Protocol</li>
<li>SMTP – Simple Mail Transfer Protocol</li>
<li>POP – Post Office Protocol</li>
<li>IMAP – Internet Message Access Protocol</li>
<li>HTTPS – Secure HTTP Protocol</li>
</ul>
<p>All these protocols are dependent on the internet as the backbone for providing the infrastructure needed to communicate. However these protocols may be used in a wide range of networks, not just the internet, for example, you may run an ftp server in an intranet (local LAN), which is not exactly internet.</p>
<h3>DNS Service</h3>
<p>Internet also has services that are used by other applications. DNS or Domain Name System is the one of the most important one. DNS works like a telephone directory. DNS typically is a collection of servers, which have a list of domain names matched with their internet IP addresses. Since every machine in the internet can be assigned with a unique IP address, and remembering the IP address is not so easy. DNS helps in referencing these Domains with IP addresses</p>
<p>A sample DNS table is shown below.</p>
<table border="0">
<tbody>
<tr>
<th> Domain Name</th>
<th> IP Address</th>
</tr>
<tr>
<td>www.google.com</td>
<td>[209.85.153.104]</td>
</tr>
<tr>
<td>analytics.google.com</td>
<td>[209.85.175.147]</td>
</tr>
<tr>
<td>www.yahoo.com</td>
<td>[69.147.76.15]</td>
</tr>
<tr>
<td>www.clickoffline.com</td>
<td>[74.220.219.58]</td>
</tr>
</tbody>
</table>
<p>So when you request a page from Google.com, the browser sends a request to the DNS server to find a match for ‘www.google.com’, the DNS servers will in turn, return the IP address of the respective Domain Name by doing a looking in the DNS table. When this operation is performed in reverse, i.e identifying the default domain name from a given IP address, it is referred to as <strong>Reverse DNS Lookup</strong> or <strong>rDNS</strong>.</p>
<h2>Steps and processes involved in obtaining an html webpage</h2>
<p style="text-align: center;"><a href="http://www.clickoffline.com/wp-content/uploads/2009/02/how-page-loads.gif"><img class="alignnone size-full wp-image-89" title="how-page-loads" src="http://www.clickoffline.com/wp-content/uploads/2009/02/how-page-loads.gif" alt="" width="273" height="274" /></a><br />
Request a web page</p>
<p>Once you type the URL in your browser, which may be IE or Firefox; the steps as described above happen sequentially before we get to see the page on our browsers. Let’s look at each of these steps in detail.</p>
<h3>Components of the URL</h3>
<p>The first phase is to understand the URL or identifying the components of the URL. A typical URL consists of the following components</p>
<p>•    Protocol<br />
•    Domain Name<br />
•    Resource Name</p>
<p>However there are other components that can be plugged into a URL which include, usernames, passwords and port numbers; we can ignore them as they are not used prominently.</p>
<p style="text-align: center;"><a href="http://www.clickoffline.com/wp-content/uploads/2009/02/url-components.gif"><img class="alignnone size-full wp-image-90" title="url-components" src="http://www.clickoffline.com/wp-content/uploads/2009/02/url-components.gif" alt="" width="300" height="90" /></a></p>
<p>The figure above explains the components of the URL. Now were ready to send the HTTP Request.</p>
<h3>Construction of the HTTP Request</h3>
<p>The browser composes a request called the HTTP Request that should be sent to the server to retrieve information from the server.</p>
<p>Sample</p>
<pre name="code" class="xml">

GET /index.php HTTP/1.1
Host: www.clickoffline.com
</pre>
<p>Since HTTP is a connection-less protocol, all information related to the session are sent along the request every time, this includes, resource name, protocol version, browser name, version and OS, supported content types, cookies if any, etc.</p>
<h3>Identifying the server</h3>
<p>Before sending out a HTTP request, we will need to identify the remote server; this is done by identifying the IP address using DNS for the domain specified in the URL. The HTTP Request is sent to eth remote server by establishing a route between the local machine and the remote server.</p>
<h3>Wait For Response</h3>
<p>The client browser waits for the response for the server.</p>
<h3>Analysis/ Rendering of HTTP Response</h3>
<p>The HTTP Response consists of a HTTP Response Header and the HTTP Response Data.<br />
The Response Headers provide information related to the HTTP Response, the most important field is the Response code. Different response codes mean different statuses</p>
<table style="height: 112px;" border="0" width="179">
<tbody>
<tr>
<td><strong>200</strong></td>
<td>OK</td>
</tr>
<tr>
<td><strong>301</strong></td>
<td>Moved permanently</td>
</tr>
<tr>
<td><strong>302</strong></td>
<td>Found</td>
</tr>
<tr>
<td><strong>303</strong></td>
<td>See Other</td>
</tr>
<tr>
<td><strong>403</strong></td>
<td>Forbidden</td>
</tr>
<tr>
<td><strong>404</strong></td>
<td>Not Found</td>
</tr>
</tbody>
</table>
<p>The browser analyzes the HTTP response and renders the response one the screen, any dependencies like Images, CSS, java scripts that arise from the source html page follow the same processes to load int eh client, except that the URLs of the  resources is loaded automatically by the client browser instead of a user typing it.</p>
<pre name="code" class="xml">

HTTP/1.1 200 OK
Date: Wed, 18 Feb 2009 16:19:57 GMT
Server: Apache/2.2.11 (Unix)
X-Powered-By: PHP/5.2.8
X-Pingback: http://www.clickoffline.com/xmlrpc.php
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
</pre>
<p><strong> Advanced Resources</strong><br />
•    Specfications for URL (RFC 1738): <a href="http://www.w3.org/Addressing/URL/url-spec.txt" target="_blank">http://www.w3.org/Addressing/URL/url-spec.txt</a><br />
•    Specifications for DNS (RFC 1035): <a href="http://www.ietf.org/rfc/rfc1035.txt" target="_blank">http://www.ietf.org/rfc/rfc1035.txt</a><br />
•    HTTP Protocol Details: <a href="http://en.wikipedia.org/wiki/HTTP" target="_blank">http://en.wikipedia.org/wiki/HTTP</a></p>
<p><em><strong>Disclaimer</strong>:</em><em> The views expressed on this webpage are my personal views and do not necessarily reflect views of my employer.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickoffline.com/2009/02/behind-the-scenes-what-happens-you-open-a-page-in-a-website/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Password protect external access to WebApp - Securing Apache</title>
		<link>http://www.clickoffline.com/2009/02/password-protect-external-access-to-webapp-securing-apache/</link>
		<comments>http://www.clickoffline.com/2009/02/password-protect-external-access-to-webapp-securing-apache/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 18:13:01 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[HowTo]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.clickoffline.com/?p=76</guid>
		<description><![CDATA[I had this weird problem, where i had to secure a web server, to which access form the local network is granted by default, but if anyone who is not in the local network tires to access a web page, we had to validate him for username and password.
After some googling, i found this configuration [...]]]></description>
			<content:encoded><![CDATA[<p>I had this weird problem, where i had to secure a web server, to which access form the local network is granted by default, but if anyone who is not in the local network tires to access a web page, we had to validate him for username and password.</p>
<p>After some googling, i found this configuration that allowed me to secure the apache directory, this is the configuration</p>
<pre name="code" class="xml">

&lt;Directory /var/www/html/123/&gt;

AuthType Digest
AuthName &quot;Intranet&quot;
AuthDigestDomain /
BrowserMatch &quot;MSIE&quot; AuthDigestEnableQueryStringHack=On

AuthDigestProvider file
AuthUserFile /physical/path/to/.digest_pw
Require valid-user
Order Allow,Deny
Allow from 192.168.0.0/255.255.255.0

Satisfy any

&lt;/Directory&gt;
</pre>
<p>There are typically two kinds of authorizations here,<br />
1) Allow from Directive<br />
2) AuthUserFile Directive</p>
<p>The <strong>Allow from</strong> directive allows traffic from the specified ip range, and the <strong>AuthUserFile </strong>validates allows the validation of user credentials, if he/she has given them. The <strong>Satisfy any </strong>directive allows apache to validate any one of teh above conditions to grant access to the specified resources.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.clickoffline.com/2009/02/password-protect-external-access-to-webapp-securing-apache/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
