<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3568113376453421716</id><updated>2011-07-31T12:58:23.421+05:30</updated><category term='memcached'/><category term='windows'/><category term='windows7'/><category term='about blog'/><category term='javascript'/><category term='XSL IE'/><category term='windows 7'/><category term='memcache'/><title type='text'>Digging opensource deeper</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sahil-saggar.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sahil-saggar.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sahil</name><uri>http://www.blogger.com/profile/15987419038173901856</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3568113376453421716.post-8667978572509387946</id><published>2010-04-09T02:39:00.004+05:30</published><updated>2010-04-09T02:51:46.498+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Javascript: Always define variable with 'var'</title><content type='html'>So today, I found one more unseen behavior of Javascript (at least for me).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I wrote a very simple function in Javascript and forgot to add 'var' in front of variable definition. This function worked first time but for second time I got JS error saying the function does not exist. I was like what the hell, where did my function go? It just worked as expected for first time and suddenly browser is not able to find it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It took me 20 minutes to find out the reason of my biggest mistake of tonight. Such a waste of precious 20 minutes at 3:00 AM :(&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Lesson learned, always define variables in Javascript with 'var' keyword or else stay up till late night ;) &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568113376453421716-8667978572509387946?l=sahil-saggar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sahil-saggar.blogspot.com/feeds/8667978572509387946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sahil-saggar.blogspot.com/2010/04/javascript-always-define-variable-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/8667978572509387946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/8667978572509387946'/><link rel='alternate' type='text/html' href='http://sahil-saggar.blogspot.com/2010/04/javascript-always-define-variable-with.html' title='Javascript: Always define variable with &apos;var&apos;'/><author><name>Sahil</name><uri>http://www.blogger.com/profile/15987419038173901856</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568113376453421716.post-6151657321105378195</id><published>2010-04-06T16:53:00.004+05:30</published><updated>2010-04-06T17:10:04.228+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='windows7'/><category scheme='http://www.blogger.com/atom/ns#' term='memcached'/><category scheme='http://www.blogger.com/atom/ns#' term='memcache'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Install Memcached on Windows 7</title><content type='html'>To install Memcached on Windows 7 you need administrative rights. Grab your copy of Memcached for Windows (I got it from &lt;a href="http://code.jellycan.com/memcached/"&gt;here&lt;/a&gt;, so I will explain this one). Now follow the steps below:&lt;div&gt;&lt;ol&gt;&lt;li&gt;Download and unzip Memcached binaries.&lt;/li&gt;&lt;li&gt;Press the Win key, type cmd, press Ctrl+Shift+Enter.&lt;/li&gt;&lt;li&gt;Select yes from elevation prompt.&lt;/li&gt;&lt;li&gt;A command window will open with administrative rights.&lt;/li&gt;&lt;li&gt;Go to Memcached folder (mine is c:\memcached\)&lt;/li&gt;&lt;li&gt;Type and run [ c:\&gt;memcached -d install ], this will install Memcached as service.&lt;/li&gt;&lt;li&gt;Now start the service with [ c:\&gt;memcached -d start ]&lt;/li&gt;&lt;li&gt;FIN&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Now Memcached is installed and running.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy!!&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568113376453421716-6151657321105378195?l=sahil-saggar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sahil-saggar.blogspot.com/feeds/6151657321105378195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sahil-saggar.blogspot.com/2010/04/install-memcached-on-windows-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/6151657321105378195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/6151657321105378195'/><link rel='alternate' type='text/html' href='http://sahil-saggar.blogspot.com/2010/04/install-memcached-on-windows-7.html' title='Install Memcached on Windows 7'/><author><name>Sahil</name><uri>http://www.blogger.com/profile/15987419038173901856</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568113376453421716.post-6480816333946759873</id><published>2009-11-21T14:48:00.005+05:30</published><updated>2009-11-21T15:02:06.424+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>Less know JavaScript operator 'Delete'</title><content type='html'>One of the lesser known operators in JavaScript is the 'delete' operator. I came to know about while reading &lt;a href="http://ejohn.org/blog/"&gt;John Resig's blog&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;What does it do?&lt;br /&gt;The delete operator deletes an object, an object's property, or an element at a specified index in an array.&lt;br /&gt;&lt;br /&gt;More about it at &lt;a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Operators/Special_Operators/delete_Operator"&gt;Mozilla Reference Docs&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Small Example:&lt;pre&gt;&lt;code class="javascript" id="delete_test"&gt;&lt;/code&gt;&lt;blockquote&gt;var array = {&lt;br /&gt; "int": 42,&lt;br /&gt; "float": 12.5,&lt;br /&gt; "string": "hello world",&lt;br /&gt; "foo" : "bar"&lt;br /&gt;}&lt;br /&gt;for(var arr in array) {&lt;br /&gt; alert(arr + " : " + array[arr]);&lt;br /&gt;}&lt;br /&gt;delete array['string']; //Removes the 'string' key of the array&lt;br /&gt;&lt;br /&gt;for(var arr in array) {&lt;br /&gt; alert(arr + " : " + array[arr]); //The 'string' key &amp;amp; its value will be removed&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568113376453421716-6480816333946759873?l=sahil-saggar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sahil-saggar.blogspot.com/feeds/6480816333946759873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sahil-saggar.blogspot.com/2009/11/less-know-javascript-operator-delete.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/6480816333946759873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/6480816333946759873'/><link rel='alternate' type='text/html' href='http://sahil-saggar.blogspot.com/2009/11/less-know-javascript-operator-delete.html' title='Less know JavaScript operator &apos;Delete&apos;'/><author><name>Sahil</name><uri>http://www.blogger.com/profile/15987419038173901856</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568113376453421716.post-2582960590036160864</id><published>2009-09-02T17:21:00.007+05:30</published><updated>2009-11-21T13:23:55.259+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='XSL IE'/><title type='text'>IE Conditional Tag with XSLT</title><content type='html'>&lt;span style="font-family: arial;"&gt;Another hack in the life of UI developer, dont know for how long we have to take this burden.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Well, you are here because you are using XSLT and have noticed that IE conditional tag or comment is not showing up in output of XSLT transformation. What could be the reason?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Reason is that XSLT transformation does not output comments given in XSL sheets to HTML stream. So how to use IE conditional tags when you really need them.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;The answer is &lt;/span&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;xsl:comment&amp;gt;&lt;/span&gt;&lt;xsl:comment&gt;&lt;!--[CDATA[  ]]--&gt;&lt;span style="font-family: arial;"&gt; tag + &lt;a href="http://www.w3schools.com/xmL/xml_cdata.asp"&gt;CDATA&lt;/a&gt; (Unparsed Character Data) tag. Following is the example showing correct way of doing it:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;before (not working):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;!--[if IE]&amp;gt; something special for Internet Explorer &amp;lt;![endif]--&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;after (working perfectly):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;&amp;lt;xsl:comment&amp;gt;&amp;lt;![CDATA[[if IE]&amp;gt; something speical for Internet Explorer &amp;lt;![endif]]]&amp;gt;&amp;lt;/xsl:comment&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;In the example above we are using &amp;lt;xsl:comment&amp;gt; tag to output &amp;lt;!-- --&amp;gt; to HTML stream and using CDATA type to outupt rest of the code inside the comment tags. So one little hack and desired output presented.&lt;/span&gt;&lt;br /&gt;&lt;/xsl:comment&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568113376453421716-2582960590036160864?l=sahil-saggar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sahil-saggar.blogspot.com/feeds/2582960590036160864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sahil-saggar.blogspot.com/2009/09/ie-conditional-tag-with-xslt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/2582960590036160864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/2582960590036160864'/><link rel='alternate' type='text/html' href='http://sahil-saggar.blogspot.com/2009/09/ie-conditional-tag-with-xslt.html' title='IE Conditional Tag with XSLT'/><author><name>Sahil</name><uri>http://www.blogger.com/profile/15987419038173901856</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568113376453421716.post-172714834843207447</id><published>2009-09-02T11:18:00.007+05:30</published><updated>2009-11-18T16:14:51.310+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>JavaScript Error: Expected Identifier in IE</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;If you are getting 'Expected Identifier' JavaScript error on IE this means you have some conflict with Mr. Gates :)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Okay to the point, this can happen due to two reasons (as per my knowledge, let me know if you know something else):&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;1. Some typing mistake in your code&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;var myVar = {&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family:arial;"&gt;function1:   function()&lt;/span&gt; &lt;span style="font-family:arial;"&gt;        {&lt;/span&gt; &lt;span style="font-family:arial;"&gt;        //  some code&lt;/span&gt; &lt;span style="font-family:arial;"&gt;        },&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family:arial;"&gt;variable1:    'Some value',&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family:arial;"&gt;variable2:    'Another value',&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family:arial;"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Notice the extra comma after the last variable defined just before } braces, Firefox will ignore this but IE will not. Lets move to second reason.&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;2. You have used reserved keyword in your code mostly as variable name&lt;/span&gt;  &lt;span style="font-family:arial;"&gt;Just yesterday, I got this error on IE due to some old written JS code. First I tried to find the code mistake but after looking at the code with a sharp eye I found that some reserved words were used. Following is the code I corrected&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;obj.class = 'up';  ///this works in Firefox&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;obj.className = 'up';  ///this is the correct implementation&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;var onloadstat = 0;  //works in FF but in IE its a reserved keyword same as 'class'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;At the end, if you get the 'Expected Identifier' JS error in IE first look for these mistakes. You will be able to fix the error quickly.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568113376453421716-172714834843207447?l=sahil-saggar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sahil-saggar.blogspot.com/feeds/172714834843207447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sahil-saggar.blogspot.com/2009/09/getting-expected-identifier-in-ie.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/172714834843207447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/172714834843207447'/><link rel='alternate' type='text/html' href='http://sahil-saggar.blogspot.com/2009/09/getting-expected-identifier-in-ie.html' title='JavaScript Error: Expected Identifier in IE'/><author><name>Sahil</name><uri>http://www.blogger.com/profile/15987419038173901856</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3568113376453421716.post-81813798249711812</id><published>2009-09-02T10:52:00.002+05:30</published><updated>2009-09-02T11:17:15.267+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='about blog'/><title type='text'>About my blog</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: arial;"&gt;This blog will be having contents for my own reference so that I don't have to go to Google again to search for the stuff.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;I will also be happy if someone is taking benefits from my knowledge. If you like the blog, don't&lt;/span&gt; forget to leave a comment :)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3568113376453421716-81813798249711812?l=sahil-saggar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sahil-saggar.blogspot.com/feeds/81813798249711812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sahil-saggar.blogspot.com/2009/09/about-my-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/81813798249711812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3568113376453421716/posts/default/81813798249711812'/><link rel='alternate' type='text/html' href='http://sahil-saggar.blogspot.com/2009/09/about-my-blog.html' title='About my blog'/><author><name>Sahil</name><uri>http://www.blogger.com/profile/15987419038173901856</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
