<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Sreenath's Space</title> <link>http://sreenath.net/blog</link> <description>Of Fingers and a Keyboard</description> <lastBuildDate>Sun, 18 Mar 2012 06:54:52 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ubshreenath" /><feedburner:info uri="ubshreenath" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Ladakh</title><link>http://feedproxy.google.com/~r/ubshreenath/~3/1O-zIrS1YFQ/</link> <comments>http://sreenath.net/blog/2012/03/18/ladakh/#comments</comments> <pubDate>Sun, 18 Mar 2012 06:39:33 +0000</pubDate> <dc:creator>Sreenath</dc:creator> <category><![CDATA[Chronological]]></category><guid isPermaLink="false">http://sreenath.net/blog/2012/03/18/ladakh/</guid> <description><![CDATA[<a
style="text-decoration: none;" title="So near" href="http://www.flickr.com/photos/ubshreenath/4943559495/in/set-72157624845526872/"></a><a
style="text-decoration: none;" title="Valley Sunset" href="http://www.flickr.com/photos/ubshreenath/4944141452/in/set-72157624845526872/"></a><a
style="text-decoration: none;" title="Deserted" href="http://www.flickr.com/photos/ubshreenath/4943556329/in/set-72157624845526872/"></a><a
style="text-decoration: none;" title="Colorful Worlds" href="http://www.flickr.com/photos/ubshreenath/4944142854/in/set-72157624845526872/"></a><a
style="text-decoration: none;" title="Undersea Mountains" href="http://www.flickr.com/photos/ubshreenath/4943557673/in/set-72157624845526872/"></a><a
style="text-decoration: none;" title="Elements" href="http://www.flickr.com/photos/ubshreenath/4944143930/in/set-72157624845526872/"></a><br
clear="all" /><a
style="text-decoration: none;" title="Baralachala" href="http://www.flickr.com/photos/ubshreenath/4944144496/in/set-72157624845526872/"></a><a
style="text-decoration: none;" title="Tandi" href="http://www.flickr.com/photos/ubshreenath/6845846886/in/set-72157624845526872/"></a><a
style="text-decoration: none;" title="Upshi" href="http://www.flickr.com/photos/ubshreenath/6845848854/in/set-72157624845526872/"></a><a
style="text-decoration: none;" title="Pangyong Tso (Lake)" href="http://www.flickr.com/photos/ubshreenath/6991977995/in/set-72157624845526872/"></a><a
style="text-decoration: none;" title="Sunset in Kashmir" href="http://www.flickr.com/photos/ubshreenath/6991979281/in/set-72157624845526872/"></a><a
[...]]]></description> <content:encoded><![CDATA[<div
style="padding: 0; overflow: hidden; margin: 0; width: 500px;"><a
style="text-decoration: none;" title="So near" href="http://www.flickr.com/photos/ubshreenath/4943559495/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm5.staticflickr.com/4120/4943559495_0f3c832fe6_s.jpg" alt="So near" /></a><a
style="text-decoration: none;" title="Valley Sunset" href="http://www.flickr.com/photos/ubshreenath/4944141452/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm5.staticflickr.com/4118/4944141452_eea19839c2_s.jpg" alt="Valley Sunset" /></a><a
style="text-decoration: none;" title="Deserted" href="http://www.flickr.com/photos/ubshreenath/4943556329/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm5.staticflickr.com/4102/4943556329_6142fb336b_s.jpg" alt="Deserted" /></a><a
style="text-decoration: none;" title="Colorful Worlds" href="http://www.flickr.com/photos/ubshreenath/4944142854/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm5.staticflickr.com/4123/4944142854_4849d1fc68_s.jpg" alt="Colorful Worlds" /></a><a
style="text-decoration: none;" title="Undersea Mountains" href="http://www.flickr.com/photos/ubshreenath/4943557673/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm5.staticflickr.com/4073/4943557673_3739b5c45b_s.jpg" alt="Undersea Mountains" /></a><a
style="text-decoration: none;" title="Elements" href="http://www.flickr.com/photos/ubshreenath/4944143930/in/set-72157624845526872/"><img
style="padding: 0 0 10px 0; width: 75px; height: 75px; float: left;" src="http://farm5.staticflickr.com/4141/4944143930_ff7b3176cd_s.jpg" alt="Elements" /></a><br
clear="all" /><a
style="text-decoration: none;" title="Baralachala" href="http://www.flickr.com/photos/ubshreenath/4944144496/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm5.staticflickr.com/4077/4944144496_9817b4f593_s.jpg" alt="Baralachala" /></a><a
style="text-decoration: none;" title="Tandi" href="http://www.flickr.com/photos/ubshreenath/6845846886/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7192/6845846886_1ed43db6dc_s.jpg" alt="Tandi" /></a><a
style="text-decoration: none;" title="Upshi" href="http://www.flickr.com/photos/ubshreenath/6845848854/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7190/6845848854_63a8011021_s.jpg" alt="Upshi" /></a><a
style="text-decoration: none;" title="Pangyong Tso (Lake)" href="http://www.flickr.com/photos/ubshreenath/6991977995/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7041/6991977995_4fb0aeb6d4_s.jpg" alt="Pangyong Tso (Lake)" /></a><a
style="text-decoration: none;" title="Sunset in Kashmir" href="http://www.flickr.com/photos/ubshreenath/6991979281/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7061/6991979281_5a340f5787_s.jpg" alt="Sunset in Kashmir" /></a><a
style="text-decoration: none;" title="Khalsar, Nubra Valley" href="http://www.flickr.com/photos/ubshreenath/6991977905/in/set-72157624845526872/"><img
style="padding: 0 0 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7065/6991977905_bfa92e86ca_s.jpg" alt="Khalsar, Nubra Valley" /></a><br
clear="all" /><a
style="text-decoration: none;" title="Tandi" href="http://www.flickr.com/photos/ubshreenath/6845846756/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7054/6845846756_9bc0514455_s.jpg" alt="Tandi" /></a><a
style="text-decoration: none;" title="Kashmir" href="http://www.flickr.com/photos/ubshreenath/6991979255/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7183/6991979255_ab99aae6a2_s.jpg" alt="Kashmir" /></a><a
style="text-decoration: none;" title="Pang" href="http://www.flickr.com/photos/ubshreenath/6845848832/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7192/6845848832_45b5fd7e04_s.jpg" alt="Pang" /></a><a
style="text-decoration: none;" title="Hunder, Nubra Valley" href="http://www.flickr.com/photos/ubshreenath/6991977867/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7046/6991977867_c3f3b527c1_s.jpg" alt="Hunder, Nubra Valley" /></a><a
style="text-decoration: none;" title="Kashmir" href="http://www.flickr.com/photos/ubshreenath/6991979185/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7062/6991979185_e5b4140935_s.jpg" alt="Kashmir" /></a><a
style="text-decoration: none;" title="Khoksar" href="http://www.flickr.com/photos/ubshreenath/6845846604/in/set-72157624845526872/"><img
style="padding: 0 0 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7207/6845846604_4632fdd2dd_s.jpg" alt="Khoksar" /></a><br
clear="all" /><a
style="text-decoration: none;" title="Sarchu" href="http://www.flickr.com/photos/ubshreenath/6845848738/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7064/6845848738_76fb705c85_s.jpg" alt="Sarchu" /></a><a
style="text-decoration: none;" title="Diskit, Nubra Valley" href="http://www.flickr.com/photos/ubshreenath/6991977763/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7040/6991977763_9382d59762_s.jpg" alt="Diskit, Nubra Valley" /></a><a
style="text-decoration: none;" title="Mughal Gardens, Dal Lake" href="http://www.flickr.com/photos/ubshreenath/6845851806/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7177/6845851806_2c275596c8_s.jpg" alt="Mughal Gardens, Dal Lake" /></a><a
style="text-decoration: none;" title="Marhi" href="http://www.flickr.com/photos/ubshreenath/6845846552/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7178/6845846552_06aa8a10be_s.jpg" alt="Marhi" /></a><a
style="text-decoration: none;" title="Panamik, Nubra Valley" href="http://www.flickr.com/photos/ubshreenath/6845850472/in/set-72157624845526872/"><img
style="padding: 0 10px 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7066/6845850472_e4f5746ca9_s.jpg" alt="Panamik, Nubra Valley" /></a><a
style="text-decoration: none;" title="Jispa" href="http://www.flickr.com/photos/ubshreenath/6991975973/in/set-72157624845526872/"><img
style="padding: 0 0 10px 0; width: 75px; height: 75px; float: left;" src="http://farm8.staticflickr.com/7040/6991975973_eab0b21673_s.jpg" alt="Jispa" /></a></div><div
style="font-size: 0.8em; margin-top: 0px; margin-bottom: 5px;"><p><a
href="http://www.flickr.com/photos/ubshreenath/sets/72157624845526872/">Ladakh</a>, a set on Flickr.</p></div><p>Finally, photos from my Motor-Biking Trip to Ladakh in Jul-Aug of 2010</p> <img src="http://feeds.feedburner.com/~r/ubshreenath/~4/1O-zIrS1YFQ" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://sreenath.net/blog/2012/03/18/ladakh/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://sreenath.net/blog/2012/03/18/ladakh/</feedburner:origLink></item> <item><title>HTML5 Drag, Drop and FileReader in JavaScript</title><link>http://feedproxy.google.com/~r/ubshreenath/~3/vlObJqn3iI8/</link> <comments>http://sreenath.net/blog/2011/12/02/html5-drag-drop-filereader/#comments</comments> <pubDate>Fri, 02 Dec 2011 07:52:55 +0000</pubDate> <dc:creator>Sreenath</dc:creator> <category><![CDATA[Technomaniac]]></category><guid isPermaLink="false">http://sreenath.net/blog/?p=201</guid> <description><![CDATA[<p>&#160;</p><p>I love JavaScript. And combine that with the awesome power of HTML5 and I have an ice cream with generous serving of hot chocolate sauce on top.</p><p>Till HTML5 came about, there was no way in which JavaScript could receive a Drag &#38; Drop event from the File System. Sure you could drag and [...]]]></description> <content:encoded><![CDATA[<p>&nbsp;</p><p>I love JavaScript. And combine that with the awesome power of HTML5 and I have an ice cream with generous serving of hot chocolate sauce on top.</p><p>Till HTML5 came about, there was no way in which JavaScript could receive a Drag &amp; Drop event from the File System. Sure you could drag and drop elements inside browser window but not files from outside the window.</p><p>Plus JavaScript had no way in which it could process a file selected in an <em>input[type=file]</em> control on the client side. So if you wanted to upload a set of images to an online gallery you could only preview the image or check its properties after the upload completed. And it would be such a pain to realize that you selected the wrong set of images to start with. So re-upload!</p><p>In the new HTML5 supported browsers, one can write methods to process a file using the new File API. Although not strictly part of HTML5, it is currently supported only in Firefox 4+ and Chrome 7+ and other browsers are quickly falling in line.</p><p>So JavaScript&#8217;s events &#8220;dragover&#8221;, &#8220;dragleave&#8221; and &#8220;drop&#8221; can now respond to files dragged and dropped from the file system. And the &#8220;FileReader&#8221; object can read text files, file properties like size, name, path etc., read an image file and load a preview &#8211; all on the client side using plain JavaScript.</p><p>Check out the sample demo <a
title="HTML5 Drag &amp; Drop Demo Page" href="http://sreenath.net/blog/wp-content/uploads/2011/12/html5DragDrop.html" target="_blank">here</a>.</p><p>So here is how to get started:</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;">addEvent<span style="color: #009900;">&#40;</span>dz<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;drop&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	e.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	removeClass<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;ondrag&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> files <span style="color: #339933;">=</span> e.<span style="color: #660066;">dataTransfer</span>.<span style="color: #660066;">files</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span>files.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		processFile<span style="color: #009900;">&#40;</span>files<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>The <em>addEvent</em> method is my handy library function to attach Event Listeners to DOM elements in a cross browser fashion. The event object passed to the event listener contains a property<em> &#8220;dataTransfer&#8221;</em> which contains the reference to the selected/dropped files.</p><p><strong>TIP:</strong> Remember, during a drag and drop, it is the element that receives the drop that will contain the dropped files. It need not be an <em>input[type=file]</em> control.</p><p>To give a feedback to the user that the page is responding to the drag and drop, I have incorporated the following technique:</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;">addEvent<span style="color: #009900;">&#40;</span>dz<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;dragover&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	addClass<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;ondrag&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	e.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
addEvent<span style="color: #009900;">&#40;</span>dz<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;dragleave&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	removeClass<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;ondrag&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	e.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Now to process the uploaded files. JavaScript has got this new object called the FileReader which is what I am using here:</p><div
class="wp_syntax"><div
class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> processFile<span style="color: #009900;">&#40;</span>file<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> o <span style="color: #339933;">=</span> $id<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;output&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> t <span style="color: #339933;">=</span> $id<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;totUpSize&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	totFSize <span style="color: #339933;">+=</span> file.<span style="color: #660066;">size</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">//Process Text Files - output content into a &lt;pre&gt; tag.</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>file.<span style="color: #660066;">type</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;text&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> reader <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> FileReader<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		reader.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			o.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;p&gt;File: &lt;strong&gt;&quot;</span>
                                      <span style="color: #339933;">+</span> file.<span style="color: #000066;">name</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&lt;/strong&gt;. File size: &lt;strong&gt;&quot;</span>
                                      <span style="color: #339933;">+</span> Math.<span style="color: #660066;">round</span><span style="color: #009900;">&#40;</span>file.<span style="color: #660066;">size</span><span style="color: #339933;">*</span><span style="color: #CC0000;">100</span><span style="color: #339933;">/</span><span style="color: #CC0000;">1024</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #CC0000;">100</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; kB&lt;/strong&gt;&lt;/p&gt;&lt;pre&gt;&quot;</span>
                                      <span style="color: #339933;">+</span> e.<span style="color: #660066;">target</span>.<span style="color: #660066;">result</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/&lt;/g</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;&amp;lt;&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/&gt;/g</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;&amp;gt;&quot;</span><span style="color: #009900;">&#41;</span>
                                      <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&lt;/pre&gt;&lt;hr/&gt;&quot;</span> <span style="color: #339933;">+</span> o.<span style="color: #660066;">innerHTML</span><span style="color: #339933;">;</span>
			<span style="color: #006600; font-style: italic;">//console.log(e.target.result);</span>
		<span style="color: #009900;">&#125;</span>
		reader.<span style="color: #660066;">readAsText</span><span style="color: #009900;">&#40;</span>file<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>We create a <em>FileReader</em> object, bind an <em>onload</em> event handler to the <em>reader</em> which will process the read file and perform the necessary operations to update the UI (as required) and then we call the <em>reader.ReadAsText()</em> method to read the text data of a file. We can even use the <em>reader.ReadAsDataUrl()</em> method to read binary image data as an <a
title="Encoded Data URI on Wikipedia" href="http://en.wikipedia.org/wiki/Data_URI_scheme" target="_blank">encoded Data URI</a>.</p><p>And that&#8217;s it. We have the power to process files client side now!</p> <img src="http://feeds.feedburner.com/~r/ubshreenath/~4/vlObJqn3iI8" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://sreenath.net/blog/2011/12/02/html5-drag-drop-filereader/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://sreenath.net/blog/2011/12/02/html5-drag-drop-filereader/</feedburner:origLink></item> <item><title>US and Me</title><link>http://feedproxy.google.com/~r/ubshreenath/~3/lxILti3jemk/</link> <comments>http://sreenath.net/blog/2011/12/01/us-and-me/#comments</comments> <pubDate>Thu, 01 Dec 2011 07:51:08 +0000</pubDate> <dc:creator>Sreenath</dc:creator> <category><![CDATA[Chronological]]></category><guid isPermaLink="false">http://sreenath.net/blog/?p=179</guid> <description><![CDATA[<p>Okay so I got this offer to join a company in the US as a SharePoint Trainer for a long term basis. As this was a great opportunity, I took it. Being the typical &#8220;namma bengalooru huduga&#8221;, never been out of Bangalore (atleast not longer than a month), never stayed in a hostel, never cooked [...]]]></description> <content:encoded><![CDATA[<p>Okay so I got this offer to join a company in the US as a SharePoint Trainer for a long term basis. As this was a great opportunity, I took it. Being the typical &#8220;namma bengalooru huduga&#8221;, never been out of Bangalore (atleast not longer than a month), never stayed in a hostel, never cooked a proper meal for myself, it was a big decision to make.</p><p>So here is my experience first time in the US.</p><p><strong>Pre-Visa Interivew (H1B)</strong></p><ul><li>My company sent me the Visa related documents including a letter from the company stating why they need me and other documents as submitted to the USCIS.</li><li>I visited <a
href="https://www.vfs-usa.co.in/USIndia/Index.html">https://www.vfs-usa.co.in/USIndia/Index.html</a> and followed the instructions to fill and submit the DS-160 form.</li><li>The documents my company sent me contained one document called the I-797B Notice Of Action. I was asked to take my passport and this document to the HSBC Bank in Bangalore (Kasturba Road) to pay the Visa Interview Fee and collect the challans.</li><li>Using the I-797 and the visa fee receipt, I booked my visa interview date in the US Embassy in Chennai. At that time there were no visa interview slots so I had to wait a few days for interview slots to clear up. I don&#8217;t know if it is allowed for a person to take an appointment in a US Embassy other than the one mentioned in your consular district.</li></ul><div><strong>Visa Interview</strong></div><ul><li>I got an early morning slot for the interview. I wanted to drive down to Chennai in my car with my mom. So I left Bangalore the previous morning. Chennai was a pleasant drive. About 6 hours with stops.</li><li>We stayed in a relative&#8217;s place and went for the interview early in the morning.</li><li>The interview was a smooth process.</li><li>I am not the guy who&#8217;ll say hold a 100 people&#8217;s feet to get to the US but it is extremely demoralizing to fail in anything, especially a visa interview when I had driven all the way down there!</li><li>So here are MY tips for the interview:</li></ul><ol><ol><li> Organise your documents. Buy a couple of good high quality folders. One for all the junk documents that your company will provide you. You may never be asked to show these documents but you are required to have them. In the other folder, keep the important documents like your Passport, Degree Certificates, Resume, Offer Letter, I-797, Letter from employer etc.</li><li>It is a good idea to know exactly where each document is in your folders. The biggest bungle people do in front of the interviewer is to scramble through a single folder looking for that one important sheet.</li><li>Dress formal. Dress to impress. But don&#8217;t over dress and make yourself look too eager to get to the US.</li><li>Be natural, act natural. Answer questions as if you have got nothing to lose even if you fail.</li><li>Be confident, be cheerful. Greet the interviewer and ask how he/she is doing first.</li><li>Answer to the point. Don&#8217;t give long stories. But don&#8217;t give the impression that you have memorized your answers. Think about the question asked for a second, frame your sentence and reply. Even if you know the answer, act as if you have put some thought into the question.</li></ol></ol><div><strong>Travel to the US (Packing &amp; Pre-Flight)</strong></div><div><ul><li>My company sent me the tickets. They booked on Qatar Airways and I later learnt that they are a very good airline.</li><li>I sold my car. Had foreclosed the loan and had the hypothecation removed earlier. Maybe did not get the best price for it. But it was hassle free.</li><li>Went in for a International Driving Permit to be made. The Jayanagar RTO had just shifted to their new facility. The IDP cost me about Rs.600. Need the passport, tickets and existing DL copies along with about 4 passport size photographs.</li><li>As usual, I received a ton of advice about what to pack and what not to pack. I wanted to travel with minimal luggage but somehow I ended up having to remove stuff b&#8217;cos I was over the 46kg limit. Yes, trans-Atlantic flights are allowed 2pcs of baggage 23kg each as check-in baggage. Apart from that you are allowed a small kit bag with a 7kg limit plus one laptop bag.</li><li>I realised only at the airport that they don&#8217;t weigh the laptop bag or the cabin baggage strictly. All that matters is that you don&#8217;t pack any stuff like powders/lotions/un-processed food items/liquids/deodarants or things like swiss knives etc. in these bags.</li><li>I packed in about 3 sweaters (I was headed to Fairfax, VA where temperatures reach negative Fahrenheit), 2pairs of thermals, gloves, skull caps, inner wear, office wear, jeans &amp; casuals and my trustworthy Sapient woolen pullover. Had a couple of friends help me with some shopping as well.</li><li>Bought new shoes, slippers and a large trolley kit. Packed a pressure cooker (forgot the weight!), couple of heavy duty vessels &amp; pans, a coffee filter, plates, tumblers, spoons.</li><li>Also went in the regular MTR ready to eat foods, sambar, rasam, vangibath and puliyogare powders.</li><li>Went to my regular doctor for a prescription for common allergies and ailments. Went to the pharmacy and bought all of them for stocking. Made sure to collect a bill and carry it with me on flight.</li><li>Packed all my required electronics and associated cables. Backed up my laptop files in my portable drive and carried it. Left the laptop back at home for mom. I was gonna get a newer powerful one in office anyway.</li><li>And thanks to my friend Sharath&#8217;s advice, I did a web check-in so that I can avoid the long check-in queue. And indeed it helped. The check-in queue was windingly looooong and the quick bag drop off was just 3-4 passengers long. Qatar also had the feature to pre-select my seats. I was naive so I selected a window seat. People usually prefer the aisle seats on long flights.</li><li>I was not aware of having to make a food preference 36hrs before flight departure. By not doing so, I risked not having anything vegan to eat on the flight.</li><li>Make sure you carry all the required documents in your cabin baggage/laptop bag. Passport, I-797, Employment Offer Letters, USCIS documents, destination address etc. Its ok to carry a camera in your cabin baggage. Its worth it.</li><li>I had planned to carry my Vodafone SIM to US. So carried my phone too. Activated International Roaming 24 hours before departure.</li></ul><div><strong>Travel to the US (Flight &amp; Immigration)</strong></div><div><ul><li>The day of the flight was a painful one. The people I really wanted to come drop me off to the airport couldn&#8217;t/didn&#8217;t make it. Even after they had 6 months to prepare and plan for it. Was really depressed over it and it took me a couple of weeks to get over it.</li></ul><div
id="attachment_187" class="wp-caption aligncenter" style="width: 525px"><a
href="http://sreenath.net/blog/wp-content/uploads/2011/12/16102011219.jpg"><img
class="size-large wp-image-187 " title="Departure at Bangalore" src="http://sreenath.net/blog/wp-content/uploads/2011/12/16102011219-1024x768.jpg" alt="Departure at Bangalore" width="515" height="386" /></a><p
class="wp-caption-text">At the Bengaluru International Airport, before departure.</p></div><ul><li>No job can be done well beforehand. The last 4-6 hours before leaving the house were the most hectic and productive packing hours. Got prints of required emails, maps, phone numbers etc. Cello-taped my own name and destination address stickers to the baggage. Do not lock any of your luggage. Had to even visit the lawyer to get a power of attorney made in my mom&#8217;s name.</li><li>Booked a Tata Sumo to drop and return everyone. Made sure it has a top carrier for luggage. Rs.1500 for that. Reached the airport 3 hours prior. After all good bye&#8217;s and a coffee, I went in. That was it. A new phase of life. No turning back now.</li><li>An airline representative handed me a form to fill for emigration, directed me to the quick bag drop line as I had checked in online. This was a good move.</li><li>Then I filled up the form. This is some emigration step which no one had told me about. The person basically asked me if I planned to settle down in the US permanently etc, asked for my passport &amp; visa and verified it and let me through. I was cleared in my passport that I do not need an Emigration Check. Indian passports now carry an ECR seal if you are required to clear Emigration Checking for some major countries. Basically people who have a minimum 12th standard pass certificate or those above age 50 will not have this seal. I thought people without the seal don&#8217;t have to go through this emigration step but looked like everyone was going through it.</li><li>I boarded the flight to Doha. Qatar Airways are one of the best airlines in terms of seating comfort and hospitality I am told. I wouldn&#8217;t know for sure as this was my first international flight. But I for sure did not have any space cramps for my legs.</li><li>5 hours later I landed in Doha. I took my first step on international soil (concrete actually). For some reason while the flight was descending I got a severe headache above my eyebrows and it was uncontrollable. It subsided only when the plane landed. I was not prepared for another round of such a headache when the plane lands next in DC. So I asked for the Airport clinic, consulted the doctor who gave me a couple of tablets to swallow and told me it would be fine. It was free.</li><li>I had a 4 hour gap between flights but the BLR-DOHA flight landed about 90 mins late and that left me about 25 mins to make my way through a stringent security check and board the next flight to DC. They got everyone to even remove shoes, didn&#8217;t let me carry my water bottle. It was a special water bottle and I didn&#8217;t want to let go of it. So then he told me that I can&#8217;t carry the water in it.</li><li>The flight to DC was a long 14 hour flight. The air-hostesses will force you to pull down your window blinds as the bright sun might disturb other passengers. The plane takes a long route from the Middle East over Europe, Britain, Greenland, Canada and finally the US.</li><li>Seeing Greenland from the air was a treat to the eye.</li></ul><div
id="attachment_183" class="wp-caption aligncenter" style="width: 525px"><a
href="http://sreenath.net/blog/wp-content/uploads/2011/12/IMG_0201.jpg"><img
class="size-large wp-image-183 " title="Greenland from the air" src="http://sreenath.net/blog/wp-content/uploads/2011/12/IMG_0201-1024x768.jpg" alt="Greenland from the air" width="515" height="386" /></a><p
class="wp-caption-text">Greenland from the air</p></div><ul><li>While the plane was about 2 hours from landing we were issued a form to fill called the I-94. This form would be used in immigration and would be stapled to your passport. You will need to have this form on the passport as long as you are in the US. And will need to have it removed when you leave.</li><li>It is important that you fill this form accurately with information as-is in your passport. I made a goof-up here as my visa has my first name as FNU, I filled up this form with my first name as FNU. I later had issues with they did not give me an SSN till even after 6 weeks. I am still waiting for it. More on that later.</li><li>The plane landed in the US. The DC airport was a let down. It was too simple and barren. Something unexpected for the capital of the country.</li><li>After landing you need to go through immigration wherein you will be asked questions about the purpose of your coming to the US etc. If you answer straight and with a smile, this should not take more than 2 minutes at the counter. But the queue to the counter took me about 2 hours with a heavy backpack and a big kit bag in my hand. No trolley&#8217;s at this point. My Tip: Once you get out of the plane, rush to the immigration counter. Atleast saves 150 people in your plane from getting ahead of you. If you want to use the restrooms, do it on the plane!</li><li>Next I collected my check-in bags. They had been taken off the belt and placed on the floor. I was told that trolleys are not free like in India but I didn&#8217;t have to pay for my trolley.</li><li>I took a taxi and headed to my hotel. Cost me $40 including a 15% tip to the driver. I for one thing didn&#8217;t understand the concept of this tip. In India we fight with auto drivers to give us Re.1 change.</li><li>First thing after checking in at the hotel was to make phone calls back home and to my brother and announce that I have arrived! The hotel had free wi-fi but I left my laptop at home. My N97 had a Skype app but it was off due to low battery. I took out my charger only to realise that it is an Indian charger (the round pin was the problem, not the voltage). So I had to find a converter first up. I went to a nearby pharmacy and got a universal converter. Yes, a Pharmacy. A pharmacy here basically sells everything, including beer and wine!</li><li>Crossing the road here requires you to reach a pedestrian crossing and push a button by the traffic light to request for a crossing.  I didn&#8217;t know that. So I waited 5 mins at the signal not knowing what to do. Then finally crossed without any pedestrian green just to see a car come to a screeching stop next to me from the wrong side!! OMG I checked the wrong side of the road for traffic and crossed! Whoa that was frightening. Next 2 days I was getting over that incident and crossing a road was the biggest challenge for me in the initial few days.</li><li>I suffered hardly any jet-lag. I did nothing special so don&#8217;t ask me. My friend Sharath&#8217;s tips were:</li></ul><ol><ol><li>Take a walk in the daylight if possible. No matter how tired you are.</li><li>Do not sleep till atleast 10pm local time. Avoid all urges to take a nap before local bed time.</li></ol></ol><ul><li>Next morning I was to report to office and begin my new career!</li><li>Next items that needed to be settled were:</li></ul><ol><ol><li>A Phone Connection.</li><li>A Laptop (from office)</li><li>A Bank Account</li><li>Apply for an SSN</li><li>Find an apartment/room to share.</li><li>Get a Car!</li><li>Get a Driving Licence</li><li>Get my name rectified in my passport and have the FNU removed by the Indian Embassy.</li></ol></ol></div><div>And my story with those items is equally long so I will end this issue here and write about those in my next post!</div></div><div>People prepare a lot when travelling to the US. I had not done even 10% of that kind of preparation. I wanted to learn my way around. Not go in with my cup full. I wanted to be Jake Sully! And I have been doing OK so far. I could rent a car with Enterprise.com and go around thanks to my International Driving Permit. People complain that it is a big hand-written book. Who cares! As long as it is accepted, I am happy. Period. The Indian IDP is accepted in most US states and you can drive with it for upto 6 months after arriving in the US.</div><div><div
id="attachment_188" class="wp-caption aligncenter" style="width: 235px"><a
href="http://sreenath.net/blog/wp-content/uploads/2011/12/22102011227.jpg"><img
class="size-medium wp-image-188" title="So I am in the US" src="http://sreenath.net/blog/wp-content/uploads/2011/12/22102011227-225x300.jpg" alt="So I am in the US" width="225" height="300" /></a><p
class="wp-caption-text">So I am in the US</p></div></div> <img src="http://feeds.feedburner.com/~r/ubshreenath/~4/lxILti3jemk" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://sreenath.net/blog/2011/12/01/us-and-me/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://sreenath.net/blog/2011/12/01/us-and-me/</feedburner:origLink></item> <item><title>Our 22 Conditions to the “Democratic” Political Parties</title><link>http://feedproxy.google.com/~r/ubshreenath/~3/Qhi13V8egis/</link> <comments>http://sreenath.net/blog/2011/08/18/our-22-conditions/#comments</comments> <pubDate>Wed, 17 Aug 2011 22:56:37 +0000</pubDate> <dc:creator>Sreenath</dc:creator> <category><![CDATA[Current Affairs]]></category><guid isPermaLink="false">http://sreenath.net/blog/?p=70</guid> <description><![CDATA[<p
style="text-align: center;"><a
title="Anna Hazare by ParveenKumar, on Flickr" href="http://www.flickr.com/photos/parveenkrmehta/5814439156/"></a></p><p>The Delhi Police unconstitutionally imposed a set of 22 conditions against Anna Hazare’s call for a peaceful fast at Jayaprakash Narayan Park.</p><p>And obviously, some of these conditions were ridiculous and were against the fundamental rights of the citizen of this country.</p><p>Will the “Democratic” [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: center;"><a
title="Anna Hazare by ParveenKumar, on Flickr" href="http://www.flickr.com/photos/parveenkrmehta/5814439156/"><img
src="http://farm3.static.flickr.com/2692/5814439156_46066d4579.jpg" alt="Anna Hazare" width="387" height="500" /></a></p><p>The Delhi Police unconstitutionally imposed a set of 22 conditions against Anna Hazare’s call for a peaceful fast at Jayaprakash Narayan Park.</p><p>And obviously, some of these conditions were ridiculous and were against the fundamental rights of the citizen of this country.</p><p>Will the “Democratic” Political parties themselves fall in line if the same conditions are imposed on them when they hold their election rallies, impose unwanted Bandhs, hold protests for getting into power?</p><p>Or better yet, why don’t we draft our version of the 22 Commandments and see if they can abide by it.</p><p>So here are our 22 Conditions to the “so called” democratic political parties of our country:</p><p>Next time any political party calls for a Bandh/Protest/Rally anywhere in the country, these are the 22 conditions the party will have to abide by:</p><ol><li>Thou shall file an undertaking with the citizens before calling the Bandh or holding your rally or protest.</li><li>All party members from the whole country should sign the undertaking before starting the campaign. Irrespective of whether they are on honeymoon, giving birth, in jail, participating in the winter Olympics or looking up Marilyn Monroe&#8217;s skirt at Madame Tussauds.</li><li>The undertaking will mention the start and end time of the bandh or rally.</li><li>Only 5 netas or people directly affiliated with the netas are allowed to take part in the bandh or rally.</li><li>Only 50 bicycles are allowed.</li><li>Only 1 local, cheap, red colored bus with rusty bench seats shall be used to transport both netas and supporters. However this bus should be EURO III Emission certified.</li><li>No other means of transport shall be used by anyone participating in the rally/bandh. Not even walking.</li><li>Supporters will be seated in the bus during the entire rally/campaign or on their bicycles and are not allowed to get off.</li><li>No loudspeaker/music system/public announcement system shall be used. Neta/Supporter has to shout in his bare voice.</li><li>Campaigners shall not set foot on public roads during the campaign. However the bus and bicycles shall not be permitted to enter the rally premises. And please don&#8217;t forget condition No.8.</li><li>Supporters should not be coerced into participating in the rally/campaign. All participation should be voluntary without any form of offerings made to any supporter, esp in the form of Sarai/Neera/local beer or any other means of cheap inebriation.</li><li>No supporter shall resort to violence in any form.</li><li>The campaign/rally shall not disturb public sentiment, law and order.</li><li>Thou shall make proper arrangements for all supporters including access to water, toilets, electricity &amp; lighting, hygiene, safety, social security and proper seating. Please remember condition No.8.</li><li>The start time of the campaign should not be earlier than 11:59pm on any given day.</li><li>The end time of the campaign should be no later than 11:58pm on the same day as the start.</li><li>No tent/shamiyana/podium/stage shall be erected for the campaign purpose. If it rains, people on bicycles can take shelter inside the 1 bus provided for the campaign. However, conditions No.7 and No.10 and thus No.8 shall be abided by all even in this case.</li><li>At no point of time during the rally/bandh/campaign will the total number of supporters exceed 500. Even stray dogs, donkeys, cows and birds in the vicinity of the rally will be counted towards this number. After all, who cares for your speeches anyway?</li><li>Thou shall not bring in obese participants and call for a hunger strike. We are not falling for their diet programs.</li><li>We shall publish a Corruption Rating of each of the netas participating in the bandh/rally. Terrorists are encouraged to take out the netas in this list in descending order of rating. If you are caught, don’t worry, govt. is busy tackling internal corruption now with A.Raja, Kalmadi, Reddys, Telgi etc. Next will be Kasab and then you. You will be older than Manmohan Singh by then.</li><li>The party calling the rally/bandh shall be responsible for cleaning the area of the campaign.</li><li>All effort shall be made to Go Green in the campaign. No plastic covers/cups/plates shall be used. Thou shall pledge to reduce Greenhouse Emissions by not Farting. No animal shall be harmed in the campaign. All food served, if any, shall be vegetarian.</li></ol><p>There. Now lets get this passed and save ourselves a lot of headache and losses.</p><p>Photo Courtesy: <a
href="http://www.flickr.com/photos/parveenkrmehta/5814439156/">Praveen Kumar</a></p> <img src="http://feeds.feedburner.com/~r/ubshreenath/~4/Qhi13V8egis" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://sreenath.net/blog/2011/08/18/our-22-conditions/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://sreenath.net/blog/2011/08/18/our-22-conditions/</feedburner:origLink></item> <item><title>Pure CSS 2 Animation Effect</title><link>http://feedproxy.google.com/~r/ubshreenath/~3/64bBkiM7yS4/</link> <comments>http://sreenath.net/blog/2010/05/23/pure-css-2-animation-effect/#comments</comments> <pubDate>Sun, 23 May 2010 15:41:42 +0000</pubDate> <dc:creator>ubshreenath</dc:creator> <category><![CDATA[Technomaniac]]></category><guid isPermaLink="false">http://ubshreenath.wordpress.com/2010/05/23/pure-css-2-animation-effect</guid> <description><![CDATA[Yesterday I was looking up this interesting CSS 2 property called background-attachment.<br
/> Its no big bang. It can have a couple of values scroll and fixed. Scroll will scroll the background image with the page and is the default for all elements that have a background image specified, Fixed will make the background image [...]]]></description> <content:encoded><![CDATA[<div
id="msgcns!6447FDAF06658642!746" class="bvMsg"><hr
/>Yesterday I was looking up this interesting CSS 2 property called <span
style="font-family: 'Courier New';">background-attachment</span>.<br
/> Its no big bang. It can have a couple of values <span
style="font-family: 'Courier New';">scroll</span> and <span
style="font-family: 'Courier New';">fixed</span>. <span
style="font-family: 'Courier New';">Scroll</span> will scroll the background image with the page and is the default for all elements that have a background image specified, <span
style="font-family: 'Courier New';">Fixed</span> will make the background image stay in the same position even when the page is scrolled.</p><p>But with a few tricks combined with the <span
style="font-family: 'Courier New';">background-position</span> property, this can be leveraged to give neat little animation effects when the page is scrolled.</p><p><a
href="http://dl.dropbox.com/u/1369763/background-attachment.html" target="_blank"><img
src="http://sreenath.net/blog/wp-content/uploads/2010/10/bce2149bc76d5eb53c0943ff23db68d6.gif?w=240" border="0" alt="" /></a></p><p>I notched up a small demo with a couple of paintbrush illustrations and tried to give the effect of filling a glass with water. Those interested may fill it with Beer or whatever they like. <img
src='http://sreenath.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p><p><a
href="http://dl.dropbox.com/u/1369763/background-attachment.html" target="_blank">View Demo</a>.</p><p>It’s no rocket science I know and with the advent of CSS 3, JavaScript libraries like MooTools and jQuery that can do better animations with a single line of code, one would ask why bother? Sure. This was just an experiment. But check out how creative <a
href="http://www.romancortes.com/" target="_blank">Román Cortés</a> got with this concept using a 2D displacement map of <span
style="font-family: 'Courier New';">&lt;p&gt;</span> elements for each pixel of the scrolling image in this demo <a
href="http://www.romancortes.com/blog/pure-css-coke-can/" target="_blank">here</a>.</p><p><span
style="font-family: verda;"> </span></p></div> <img src="http://feeds.feedburner.com/~r/ubshreenath/~4/64bBkiM7yS4" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://sreenath.net/blog/2010/05/23/pure-css-2-animation-effect/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://sreenath.net/blog/2010/05/23/pure-css-2-animation-effect/</feedburner:origLink></item> <item><title>Configure WAMP (Apache) to work on a custom/non default port</title><link>http://feedproxy.google.com/~r/ubshreenath/~3/bH72XGmsns4/</link> <comments>http://sreenath.net/blog/2010/04/28/configure-wamp-apache-to-work-on-a-customnon-default-port/#comments</comments> <pubDate>Wed, 28 Apr 2010 12:53:14 +0000</pubDate> <dc:creator>ubshreenath</dc:creator> <category><![CDATA[Technomaniac]]></category><guid isPermaLink="false">http://ubshreenath.wordpress.com/2010/04/28/configure-wamp-apache-to-work-on-a-customnon-default-port</guid> <description><![CDATA[<p>While I was guiding a colleague of mine to install a WAMP server on a windows XP machine and faced this small configuration issue which I thought would have a straightforward fix.</p><p>Seems that there isn’t, at least not for the situation I had so I found the hard way to do it. And decided [...]]]></description> <content:encoded><![CDATA[<div
id="msgcns!6447FDAF06658642!733" class="bvMsg"><hr
/><p>While I was guiding a colleague of mine to install a WAMP server on a windows XP machine and faced this small configuration issue which I thought would have a straightforward fix.</p><p>Seems that there isn’t, at least not for the situation I had so I found the hard way to do it. And decided to write a post explaining it since there wasn’t a good article anywhere already for doing it.</p><p><strong><u>Situation: Install Apache to work on a non default (non port 80) port since we already have IIS on port 80.</u></strong></p><p>This post <a
href="http://www.pulse-bs.co.uk/php/installation/WAMPIISInstall1.php" target="_blank">here</a> by Matthew Phillips explains how to configure the <strong>httpd.conf</strong> file to make Apache listen on a custom port (say 8080). (He blasts IIS for follies which I don’t really agree with, that is not really the point in discussion here <img
src='http://sreenath.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p><p>But that doesn’t closely solve our problem since we just modified the Apache’s configuration file and that WAMP is still unaware of the change.</p><p>Trying to Install the Apache service from WAMP now still gives the error:</p><pre>Your port 80 is actually used by:
Server: Microsoft-IIS/x.x

Cannot install the Apache Service, please stop this application and try again.
</pre><p> </p><p>The next step after that would be to tell WAMP in its scripts to actually test the custom port (8080) and proceed to install apache. That we do in two files in the Scripts directory located in the WAMP install path.</p><p>Edit the following files in notepad:</p><ol><li><strong>testPort.php</strong><li><strong>testPortForInstall.php</strong></li></ol><p>In the above files, replace 80 with your custom port number (8080). For me, it was present in 3 places in each file. Save and close the files and restart your Wampmanager and try removing/installing the service now and it should work.</p><p>However, there still is the option “Test port 80” under the Services menu in Apache and other links that open up Localhost and phpMyAdmin in the browser that still point to port 80.</p><p
align="center"><img
border="0" src="http://sreenath.net/blog/wp-content/uploads/2010/10/ec6d41a0937622df0cd2631e03b40967.png?w=300" /></p><p> </p><p>This menu option text is populated from the file <strong>Wampmanager.ini</strong> and which in turn is refreshed from the <strong>wampmanager.tpl </strong>each time the Wampmanager.exe is started. The menu item captions are populated from the various language files in the <strong>lang</strong> folder. The actual actions that are performed are in the <strong>wampmanager.tpl</strong> file. Just update this file to open the correct URL upon clicking <u>Localhost</u> or <u>phpMyAdmin</u> links. Look for the [Menu.Left] section.</p><p>To update the captions, you will have to edit the appropriate language file – find the variable name used in the <strong>wampmanager.tpl</strong> file for the specific item and look for the caption setting for this variable in the language file and change it accordingly.</p><p>For ex.: To change the caption of the item “Test port 80”, I checked that <strong>wampmanager.tpl </strong>uses a variable called <u>w_testPort80</u> to populate this value. I opened up the <strong>lang\english.lang</strong> file and looked for this variable name and changed the string caption.</p><p>Restart Wampmanager and Voila!</p><p><strong>Disclaimer:</strong> The changes mentioned in this post are to customize the work environment for a development machine and any such changes on production servers or internet facing servers should be made with more caution. But then that’s a rare situation to run your website on a non 80 port, isn’t it?</p><p>I am using WAMP version 2.0.</p></p></div> <img src="http://feeds.feedburner.com/~r/ubshreenath/~4/bH72XGmsns4" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://sreenath.net/blog/2010/04/28/configure-wamp-apache-to-work-on-a-customnon-default-port/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://sreenath.net/blog/2010/04/28/configure-wamp-apache-to-work-on-a-customnon-default-port/</feedburner:origLink></item> <item><title>DO NOT DRINK AND DRIVER! Seriously..</title><link>http://feedproxy.google.com/~r/ubshreenath/~3/ErpY6CaMn1k/</link> <comments>http://sreenath.net/blog/2009/08/12/do-not-drink-and-driver-seriously/#comments</comments> <pubDate>Tue, 11 Aug 2009 18:55:15 +0000</pubDate> <dc:creator>ubshreenath</dc:creator> <category><![CDATA[Mental Escapes]]></category><guid isPermaLink="false">http://ubshreenath.wordpress.com/2009/08/12/do-not-drink-and-driver-seriously</guid> <description><![CDATA[<p>Found this awesome warning near the EPIP entrance in Whitefield.</p><p>I even asked an innocent Policeman sitting inside the chowki to stand out of the booth so I can take the pic. He believed I was from the Press and that I am reporting the pathetic state of the footpath to a news agency.</p> [...]]]></description> <content:encoded><![CDATA[<div
id="msgcns!6447FDAF06658642!689" class="bvMsg"><p>Found this awesome warning near the EPIP entrance in Whitefield.</p><p>I even asked an innocent Policeman sitting inside the chowki to stand out of the booth so I can take the pic. He believed I was from the Press and that I am reporting the pathetic state of the footpath to a news agency.</p><p>Only then did I realize the pathetic state of the footpath. <img
src='http://sreenath.net/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /></p><p>I could not tell him that I am a lame software engineer just out to have some fun so I carried his assumption forward and told him that im a journo for Bangalore Mirror. Ya rite!</p><p><a
href="http://sreenath.net/blog/wp-content/uploads/2010/10/a73ea4377f112d33ac5f239b0117aac8.jpg" rel="WLPP"><img
border="0" src="http://sreenath.net/blog/wp-content/uploads/2010/10/a73ea4377f112d33ac5f239b0117aac8.jpg?w=300" /></a></p></p></div> <img src="http://feeds.feedburner.com/~r/ubshreenath/~4/ErpY6CaMn1k" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://sreenath.net/blog/2009/08/12/do-not-drink-and-driver-seriously/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://sreenath.net/blog/2009/08/12/do-not-drink-and-driver-seriously/</feedburner:origLink></item> <item><title>jQuery, jQuery UI, ASP.NET Web Services and SharePoint for Feed Syndication using Argotic Framework</title><link>http://feedproxy.google.com/~r/ubshreenath/~3/D28dVffXCLI/</link> <comments>http://sreenath.net/blog/2009/08/07/jquery-jquery-ui-asp-net-web-services-and-sharepoint-for-feed-syndication-using-argotic-framework/#comments</comments> <pubDate>Thu, 06 Aug 2009 20:59:37 +0000</pubDate> <dc:creator>ubshreenath</dc:creator> <category><![CDATA[Technomaniac]]></category><guid isPermaLink="false">http://ubshreenath.wordpress.com/2009/08/07/jquery-jquery-ui-asp-net-web-services-and-sharepoint-for-feed-syndication-using-argotic-framework</guid> <description><![CDATA[<p>Okay, so I recently completed building an end to end  Feed Viewer Web Part for SharePoint 2007.</p><p>I used <a
title="jQuery" href="http://jquery.com/" target="_blank">jQuery</a> for AJAX calls and DOM manipulation.</p><p><a
title="jQuery UI Library" href="http://ui.jquery.com/" target="_blank">jQuery UI</a> for creating Tabs and a ‘custom’ Accordion control</p><p>ASP.NET Web Services</p><p><a
href="http://argotic.codeplex.com/" target="_blank">Argotic Syndication Framework</a>  to get, aggregate [...]]]></description> <content:encoded><![CDATA[<div
id="msgcns!6447FDAF06658642!686" class="bvMsg"><p>Okay, so I recently completed building an end to end  Feed Viewer Web Part for SharePoint 2007.</p><p>I used <a
title="jQuery" href="http://jquery.com/" target="_blank">jQuery</a> for AJAX calls and DOM manipulation.</p><p><a
title="jQuery UI Library" href="http://ui.jquery.com/" target="_blank">jQuery UI</a> for creating Tabs and a ‘custom’ Accordion control</p><p>ASP.NET Web Services</p><p><a
href="http://argotic.codeplex.com/" target="_blank">Argotic Syndication Framework</a>  to get, aggregate and generate feeds. (This free library is real cool stuff. Let me add a Web 2.0 style<a
title="Argotic Syndication Framework" href="http://argotic.codeplex.com/" target="_blank"><img
border="0" align="right" src="http://ubshreenath.files.wordpress.com/2009/08/37a21d102270e94879fee5f22e97bccd.png?w=139" /></a> banner in cheers to it!)  </p><p>‘No Server Code’ User Control to load the Feed Viewer entirely using JavaScript code.</p><p><a
title="WSPBuilder" href="http://www.codeplex.com/wspbuilder" target="_blank">WSPBuilder</a> to code, build and package my web part, lists and the custom Web Service into SharePoint.</p><p>While building this, I faced a lot of technical issues and built workarounds on them to finally roll it out successfully.</p><p>Let me foreach over the issues and workarounds.</p><p>1. ASP.NET Web Service does not accept an AJAX Call using a GET Request. <font
color="#404040">Also, it does</font> not honor the AJAX request if the content type is not explicitly specified as <font
color="#800000">contentType: &quot;application/json” </font><font
color="#404040">in your AJAX call.</font></p><p><font
color="#404040">So you can right away throw the jQuery AJAX methods – get(), post() and getJSON() methods out of the window when your server side is an ASP.NET Web Service. Why – How can you explicitly specify the content type using these methods?</font></p><p><font
color="#404040">So we are left with the low level $.ajax jQuery call (its actually pretty neat to be called low level.) and here is a sample code snippet:</font></p><div><pre>$.ajax(&#123;</pre><pre>            type: <span>&quot;POST&quot;</span>,</pre><pre>            url: <span>&quot;http://myserviceurl/service.asmx/WebMethodName&quot;</span>,</pre><pre>            data: <span>&quot;&#123;&#125;&quot;</span>, <span>// Pass empty parameter list - must for POST request to have content length tag</span></pre><pre>            contentType: <span>&quot;application/json; charset=utf-8&quot;</span>,</pre><pre>            dataType: <span>&quot;json&quot;</span>, <span>// Specify return type - try xml, text etc here.</span></pre><pre>            success: function(msg) &#123;</pre><pre>                alert(msg.d); <span>// returned JSON data is encapsulated in msg.d</span></pre><pre>            &#125;,</pre><pre>            error: AjaxFailed</pre><pre>        &#125;);</pre></div><p><font
color="#404040">Read about <a
title="JSON Hijacking and ASP.NET Web Services" href="http://weblogs.asp.net/scottgu/archive/2007/04/04/json-hijacking-and-how-asp-net-ajax-1-0-mitigates-these-attacks.aspx" target="_blank">this restriction</a> from <a
title="Scott Guthrie's Blog" href="http://weblogs.asp.net/scottgu/default.aspx" target="_blank">The Gu</a>. So that leaves us with another crippling limitation – We cannot make a cross site/domain (XSS) <strong>jsonp </strong>call to our web service. (Coz jsonp can be used only with GET requests and not POST.) SO this means our web service will have to be hosted within SharePoint’s domain itself and not on a separate web application even on the same server so that our jQuery web part can make a call to it. </font></p><p><font
color="#404040">Another headbanger: If you want to simply display SharePoint data on a web page (outside SharePoint) through this web service, then you will have to enable forms authentication on your SharePoint site or do a Windows Authentication Handshake before making this web service call. Not getting into that detail as its a very rare case of implementation.</font></p></p><p>Read more in detail about making jQuery calls to ASP.NET AJAX Web Services <a
title="Using jQuery to Consume ASP.NET JSON Web Services" href="http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/" target="_blank">here</a>. Thanks Dave for such a wonderful series!</p><p>Did I mention that the plain vanilla ASP.NET 2.0 Web Service is not capable of handling scripted requests (as in from JavaScript). Yes, that’s true. You either need to install the AJAX Extensions 1.0 for ASP.NET 2.0 or upgrade your .NET Framework to 3.0 or 3.5. Then you will be able to add the following tag to your web service class to make it accessible via scripted calls:</p><div><pre>    [System.Web.Script.Services.ScriptService]</pre></div><p>There is of course more to making your service and web site AJAX enabled. Discover options to AJAX enable an existing web service <a
title="AJAX Enable an existing ASP.NET Web Service" href="http://www.asp.net/learn/AJAX-videos/video-82.aspx" target="_blank">here</a>. Neat video.</p><p>Best workaround for these problems: Use WCF! Works with GET; ContentType not restricted to json; REST support using UriTemplates and more. I tried this too but since upgrading to .NET 3.5 on the production server was a little too much to ask for this, I stuck to Web Services. If you are giving WCF a trial, might I also suggest the OOB <a
title="WCF Syndication Framework" href="http://msdn.microsoft.com/en-us/library/bb412202.aspx" target="_blank">Syndication Framework support in WCF</a>. (Might help if your clients are against using open source plugins such as Argotic in their production environments.) It has support for RSS and ATOM as well as a Generic Syndication format which one can extend/override and use as you wish.</p><p>Now to the UI:</p><p>jQuery UI is a neat framework which provides OOB Javascript Tab controls complete with CSS themes (choose your theme and download the CSS). It also provides a neat ICON sheet with different colour overlays for different UI states. Check it out too.</p><p>View jQuery UI Demos <a
title="jQuery UI Demos" href="http://jqueryui.com/demos/" target="_blank">here</a>.</p><p>There are tabs and accordions available OOB for me to use. This was all I needed for my feed viewer web part. The root categories would be the tabs, sub-categories would be placed into accordion panels. Alas, I was too happy too early. jQuery UI is great, no doubt. But when it comes to nesting one control in another, it fails miserably. Maybe it wasn’t built for it but it surely made my life difficult just when I was thinking things were going smooth.</p><p>So I used the tabs from the UI. Then wrote my own jQuery code to create an accordion control which would load feed data from a SharePoint list on expanding. Of course, I made use of the library’s CSS classes for the accordion – active, inactive states etc.</p><p>My final UI looks like this:</p><p><a
href="https://jxkmnw.blu.livefilestore.com/y1mNCIq86CO8WMTpqmkqzfumU3HkeHRZut4VB3WUJmGO1QknmNNgElJQ6xFyzt4s2R6F17M4eLmXmZNIF6JF3Ge1xI4Xb7xYTiIoujdiBBLNY_w0PLHUH_lQSrjEVIg-yA_0Gt2TbxBQ_2fDYl_J7WbSg/image[23].png" rel="WLPP"><img
border="0" src="https://jxkmnw.blu.livefilestore.com/y1mEJsAmnWNmj9jBUn5oKNAwoVhg5VwpUIfLSHPCjHzpp0JiDeQVpOzosMCeyzzjYPFiPDL5hI8UVT83zAP-DsthwXlNCFiQogaKqVFnkPKXPcYEjha7_zMq6Wsp_F32b0AGwgW2jAv2KvzNTyjqTbipA/image_thumb[21].png" /></a></p><p>Of course, how can I forget my friendly jQuery Plug-ins: <a
title="jQuery RSS/ATOM Feed Parser" href="http://plugins.jquery.com/project/jFeed" target="_blank">jFeed</a> and <a
title="jQuery Paging Control" href="http://plugins.jquery.com/project/Pager" target="_blank">Pager</a></p><p>Now over to the server.</p><p>On the Server I needed a Web Service which my Web Part would call:</p><p>1. Get a category hierarchy for my tabs and accordions to render. I chose to send an xml string with sub-categories nested under categories in the xml with important data such as CategoryId which I hid into hidden fields in the accordion.</p><p>2. Get an aggregated feed data on a per category basis once user expanded a certain sub-category panel. This would require me to send information such as CategoryId, PageNo and pageSize to the web service via an Ajax call.</p><p>My Web Service method signature was like this:</p><div><pre>[WebMethod]</pre><pre>    <span>public</span> <span>string</span> getAggregateFeed(<span>int</span> categoryId, <span>int</span> pageNo, <span>int</span> pageSize)</pre></div><p> </p><p>and my AJAX call looks like this:</p><div><pre>$.ajax(&#123;</pre><pre>            type: <span>&quot;POST&quot;</span>,</pre><pre>            url: <span>&quot;~/_layouts/service.asmx/getAggregateFeed&quot;</span>,</pre><pre>            data: <span>'&#123; &quot;categoryId&quot; : &quot;'</span> + 1 + <span>'&quot;, &quot;pageNo&quot; : &quot;'</span> + 1 + <span>'&quot;, &quot;pageSize&quot; : &quot;'</span> + 2 + <span>'&quot;&#125;'</span>,</pre><pre>            contentType: <span>&quot;application/json; charset=utf-8&quot;</span>,</pre><pre>            dataType: <span>&quot;json&quot;</span>,</pre><pre>            success: function(result) &#123;</pre><pre>                renderFeed(result.d, divId, pageNo, pageSize);</pre><pre>            &#125;,</pre><pre>            error: AjaxFailed</pre><pre>        &#125;);</pre></div><p><img
border="0" align="left" src="http://sreenath.net/blog/wp-content/uploads/2010/10/02401598f07813ed6aee33140dffeaf6.png?w=16" />  TIP: To ensure that my web part is configurable, I need to allow the user/admin to configure the parameters such as List Names, Service URLs etc. Now since all my functionality is on the client, I needed to make sure that any Web Browsable Property I create gets added as a hidden input control to the Web Part controls so that my jQuery can pick it up. Remember to add a unique class name to the hidden control and not to use the ID to identify the control in jQuery, since ASP.NET adds its own additional meta characters to uniquely ID server controls but maintains class names as they are.</p><p>Next was a simple task to reference the Argotic Library in my web service and do the needful. The Argotic library is available in both .NET 2.0 assemblies as well as .NET 3.5 assemblies. It provides abstraction to fetch feeds, aggregate them and create new feeds and save them to XmlReader streams. Pretty neat stuff.</p><p>Now since I was using a jQuery plug-in that accepted either ATOM or RSS feed data and converted them to html, I only needed to aggregate multiple feeds into one Feed object on the server and then save the contents into a stream to return to my client. The plug-in would then parse the xml for available fields and generate appropriate HTML. I needed only the title and link to the item so I modified the feed a little to render only items I need.</p><p>And the majority of my functionality is done. Now remained to enhance it to make the Paging work, add a refresh button which would refresh the feed data and set an auto timer for it to refresh it automatically every 5 minutes and the likes.</p><p>I added all my JS code to a User Control. Created a WSP Builder Project and created a Web Part that would load this control and also add appropriate Web Properties. Added features to package my dependent SharePoint Lists and their instances and also a feature to deploy my custom web service to SharePoint and add my dlls to the GAC.</p><p>Read about deploying lists and list instance using features and solutions on <a
title="SharePoint Deployment using Features and Solutions" href="http://blogit.create.pt/blogs/andrevala/archive/2007/12/02/SharePoint-2007-Deployment_3A00_-Overview.aspx" target="_blank">André Vala’s blog</a>. This is the blog series I have referred the most till date. Thanks André<em>!</em></p></p></p></p></p><p>Read about hosting a Custom Web Service in SharePoint: <a
title="Creating a custom web service for sharepoint" href="http://it.toolbox.com/blogs/sharepoint-blog/creating-a-custom-web-service-for-sharepoint-13553" target="_blank">newbie tutorial</a> | <a
title="Creating a custom web service for sharepoint" href="http://msdn.microsoft.com/en-us/library/ms464040.aspx" target="_blank">msdn walkthrough</a></p><p>It was a thoroughly enlightening experience building this web part. Adios for now!</p></p></div> <img src="http://feeds.feedburner.com/~r/ubshreenath/~4/D28dVffXCLI" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://sreenath.net/blog/2009/08/07/jquery-jquery-ui-asp-net-web-services-and-sharepoint-for-feed-syndication-using-argotic-framework/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://sreenath.net/blog/2009/08/07/jquery-jquery-ui-asp-net-web-services-and-sharepoint-for-feed-syndication-using-argotic-framework/</feedburner:origLink></item> <item><title>No Entry Load on Mutual Funds from 18th June, 2009</title><link>http://feedproxy.google.com/~r/ubshreenath/~3/c7dyIG7aVDY/</link> <comments>http://sreenath.net/blog/2009/06/19/no-entry-load-on-mutual-funds-from-18th-june-2009/#comments</comments> <pubDate>Fri, 19 Jun 2009 05:07:46 +0000</pubDate> <dc:creator>ubshreenath</dc:creator> <category><![CDATA[Current Affairs]]></category><guid isPermaLink="false">http://ubshreenath.wordpress.com/2009/06/19/no-entry-load-on-mutual-funds-from-18th-june-2009</guid> <description><![CDATA[<p>SEBI has scrapped the Entry Load that is levied on investors investing in Mutual Funds. Now if an investor invests Rs.100 to purchase the units of XYZ Mutual Fund, all of that amount will go to purchasing units of the fund and no deduction will be made towards Entry Load.</p><p>Last year SEBI had passed [...]]]></description> <content:encoded><![CDATA[<div
id="msgcns!6447FDAF06658642!676" class="bvMsg"><p>SEBI has scrapped the Entry Load that is levied on investors investing in Mutual Funds. Now if an investor invests Rs.100 to purchase the units of XYZ Mutual Fund, all of that amount will go to purchasing units of the fund and no deduction will be made towards Entry Load.</p><p>Last year SEBI had passed a regulation to the effect that frees investors from the entry load on Mutual Funds if they invested directly without the help of a broker/intermediary. However, since most mutual fund schemes are confusing and the application forms are difficult to fill and submit directly to the mutual fund house, the majority of investors hardly found this move bringing them any joy. They would usually end up going through a broker and getting slapped with an entry load ranging from 2.25% to 3% of their investment, most of which is usually paid out the the broker/distributor in the form of commission. This means a loss of Rs.30 on every Rs.1000 you invest, right at the time of purchase.</p><p>From 18th June, 2009, SEBI has removed the concept of Entry Load on mutual funds, irrespective of whether you invest directly to the mutual fund house or go through a broker. This move may bring some cheer to investors but there is always a clause one has to watch out for in such rulings. And here is the catch. You have to pay a commission to the broker if you choose to invest through him. SEBI has issued in its statement that the investor will choose the amount of commission payable to the distributor. How this is supposed to work and what are the benchmarks for such a commission are unclear as yet but most brokers may choose to not accept any commission at all to keep up with competition and act as advisors to investors. All in all, a good move with respect to the investor in these troubled times. The markets are down in the dumps and are predicted to remain so for at least another year with marginal improvement. Hence investing in an Equity Mutual Fund through SIP is the best bet at present. Note that Mutual Funds only provide best returns in long term (over 3 yrs).</p><p>More: <a
title="Article on The Telegraph India" href="http://www.telegraphindia.com/1090619/jsp/business/story_11131916.jsp" target="_blank">1</a> <a
title="Article on The Economic Times" href="http://economictimes.indiatimes.com/SEBI-removes-entry-load-on-MF-schemes/articleshow/4673092.cms" target="_blank">2</a> <a
title="Article on Moneycontrol" href="http://www.moneycontrol.com/mccode/news/article/news_article.php?autono=402314" target="_blank">3</a></p></p></div> <img src="http://feeds.feedburner.com/~r/ubshreenath/~4/c7dyIG7aVDY" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://sreenath.net/blog/2009/06/19/no-entry-load-on-mutual-funds-from-18th-june-2009/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://sreenath.net/blog/2009/06/19/no-entry-load-on-mutual-funds-from-18th-june-2009/</feedburner:origLink></item> <item><title>Setting up PKS – Podcasting Kit for SharePoint Pt.1</title><link>http://feedproxy.google.com/~r/ubshreenath/~3/w2TsQjXOvNk/</link> <comments>http://sreenath.net/blog/2009/04/05/setting-up-pks-podcasting-kit-for-sharepoint-pt-1/#comments</comments> <pubDate>Sat, 04 Apr 2009 19:13:56 +0000</pubDate> <dc:creator>ubshreenath</dc:creator> <category><![CDATA[Technomaniac]]></category><guid isPermaLink="false">http://ubshreenath.wordpress.com/2009/04/05/setting-up-pks-podcasting-kit-for-sharepoint-pt-1</guid> <description><![CDATA[<p>When I first heard of <a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a>, I wondered whether this is really gonna be of so much use, especially in the world of SharePoint. I mean, who would want to setup a site like YouTube on a SharePoint server?</p><p>Even today people would raise such questions but I [...]]]></description> <content:encoded><![CDATA[<div
id="msgcns!6447FDAF06658642!663" class="bvMsg"><hr
/><p>When I first heard of <a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a>, I wondered whether this is really gonna be of so much use, especially in the world of SharePoint. I mean, who would want to setup a site like YouTube on a SharePoint server?</p><p>Even today people would raise such questions but I am actually amazed at the number of client requests that I am coming across who want a site in their SharePoint intranet/blog/public website where they can simply upload a video and others can watch it plus have some additional social networking features such as rating and commenting a video, viewing the video publishers bio, tagging videos and searching based on keywords, show a thumbnail of every video uploaded etc. Imagine if you had to built such a site on SharePoint yourself? And for those who are still unaware, <a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a> is the solution for the above requirement and it provides even more features and configuration options.</p><p>Having made a couple of installations of <a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a> recently, I do admit that its not really just double clicking an .msi and you are ready. But the effort spent configuring it is well worth it if you have the requirement. I would say you need about 2 person days to set it up from scratch by following the quick installation guide that comes with the package, leaving configuration of search which would need another day and of course customizing the UI based on your needs would take its own time. PKS comes with its own masterpage and most likely you would want to change that so the <a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a> portal look and feel is consistent with the rest of your site. And the amount of customization you need decides time needed for your UI trimming but my guess is it should not take more than a couple of days. So you can have a Podcast Publishing Site up and running in about one work week. The effort saving and the value it adds to your website is just amazing. Have you tried video marketing with the products you make? I suggest this is a good time for that since print ads and ads on the telly probably don&#8217;t reach out to the customer bracket you want to approach and also what better way to sell your product by showcasing it on your own website without additional cost &#8211; directly to the person who has come there in search of it. When you do decide for that, go for <a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a>.</p><p>So what does <a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a> have &#8211; Insider tips:</p><ul><li><a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a> installs a few pages, lists and some web parts on your SharePoint site when you run the setup.<li><a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a> stores the videos you upload to a network file share and not the SharePoint database so it wont overload your content DB.<li><a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a> offers features for Video Rating, Commenting, Viewing the Podcaster&#8217;s information, Reporting features on videos uploaded/viewed/downloaded etc, Automated thumbnail generation on video upload, integrated video conversion to <a
title="Silverlight" href="http://silverlight.net" target="_blank" rel="tag">Silverlight</a> compatible format, mobile/zune/iPod/RSS support, tag clouds, search videos using tags, progressive playback of videos using <a
title="Silverlight" href="http://silverlight.net" target="_blank" rel="tag">Silverlight</a> etc.<li>Documentation for <a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a> is exhaustive, clear and precise which makes the setup experience extremely smooth and also empowers you to extend it. There are video tutorials too! In fact its so good, I really wonder why any one would actually read this blog post.<li>It needs MOSS 2007. Won&#8217;t work on WSS 3.0.<li><a
title="Expression Encoder" href="http://www.microsoft.com/expression/products/overview.aspx?key=encoder" target="_blank" rel="tag">Microsoft Expression Encoder</a> is needed for <a
title="Podcasting Kit for SharePoint" href="http://www.codeplex.com/pks" target="_blank" rel="tag">PKS</a> to work. Thumbnail generation, duration detection and encoding to Silverlight are all done using that integrated into the PKS site.<li>There is still a bug in the thumbnail generation process for videos which are initially not in compatible format but are converted using Expression Encoder. The thumbnail wont get generated in this case as the application that queues videos for encoding tries to generate a thumbnail first and encode later. Hope this gets rectified soon.</li></ul><p>Tomorrow I will cover the basic steps in configuring a simple PKS site. But the real resource is on the <a
title="CodePlex" href="http://www.codeplex.com" target="_blank" rel="tag">CodePlex</a> site itself.</p></div> <img src="http://feeds.feedburner.com/~r/ubshreenath/~4/w2TsQjXOvNk" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://sreenath.net/blog/2009/04/05/setting-up-pks-podcasting-kit-for-sharepoint-pt-1/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://sreenath.net/blog/2009/04/05/setting-up-pks-podcasting-kit-for-sharepoint-pt-1/</feedburner:origLink></item> </channel> </rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 10/17 queries in 0.018 seconds using disk: basic
Content Delivery Network via N/A

Served from: sreenath.net @ 2012-05-14 02:13:06 -->

