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

<channel>
	<title>Anay Kamat's Weblog &#187; Technologies</title>
	<atom:link href="http://anaykamat.com/category/technologies/feed/" rel="self" type="application/rss+xml" />
	<link>http://anaykamat.com</link>
	<description>Technology, Programming, Career, Fun, Friends And Thoughts</description>
	<lastBuildDate>Wed, 25 Aug 2010 12:20:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Just Released: Maya Programming Language</title>
		<link>http://anaykamat.com/2010/08/25/just-released-maya-programming-language/</link>
		<comments>http://anaykamat.com/2010/08/25/just-released-maya-programming-language/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 12:14:15 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[language translators]]></category>
		<category><![CDATA[mono]]></category>
		<category><![CDATA[programming languages]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=123</guid>
		<description><![CDATA[Around one year ago, I had started experimenting with concepts of creating programming languages. I first started with building few DSLs (Domain Specific Languages) using Ruby and Boo. It was quite interesting to work on development of DSLs. While doing this, I learnt a lot about how the programming languages are developed. Eventually, I thought [...]]]></description>
			<content:encoded><![CDATA[<p>Around one year ago, I had started experimenting with concepts of creating programming languages. I first started with building few DSLs (Domain Specific Languages) using Ruby and Boo. It was quite interesting to work on development of DSLs. While doing this, I learnt a lot about how the programming languages are developed.</p>
<p>Eventually, I thought of writing my own programming language. While I was in engineering college as a student, we had a subject on language translators. This subject taught us lot of theory on how languages are compiled or interpreted. However, we never got a chance to write even a simple programming language during our practicals. According to few, it was not possible to write one in one semester&#8217;s time.</p>
<p>That turned out to be my main motivation. I decided to write this programming language without using any compiler tools like LEX and YACC. I ended up writing my own lexical analyzer, the grammar parser and the language using the concepts taught to us in engineering college only. I worked on it daily for around an hour and within two weeks, I had the basic language ready.</p>
<p>Today, the code is released under GPL license. It&#8217;s available on GitHub at <a href="http://github.com/kamatanay/MayaLanguage" target="_blank">http://github.com/kamatanay/MayaLanguage</a></p>
<p>I hope it would be useful for students learning language translators.</p>
<p>Why did I name it Maya? Well, that&#8217;s the name of my sweetheart wife. Isn&#8217;t that a sweet name?</p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2010/08/25/just-released-maya-programming-language/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Error in ruby on rails documentation for ActionController::UrlWriter</title>
		<link>http://anaykamat.com/2010/05/30/error-in-ruby-on-rails-documentation-for-actioncontroller-urlwriter/</link>
		<comments>http://anaykamat.com/2010/05/30/error-in-ruby-on-rails-documentation-for-actioncontroller-urlwriter/#comments</comments>
		<pubDate>Sun, 30 May 2010 18:25:02 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[My Thoughts]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=110</guid>
		<description><![CDATA[In Ruby on rails, methods that generate urls from named routes are not globally accessible. For example, you can&#8217;t access them from console (script/console). If you want to use these methods from such places, then the rails documentation for ActionController::UrlWriter suggests two ways of doing it. According to this documentation, you can: Include ActionController::UrlWriter in [...]]]></description>
			<content:encoded><![CDATA[<p>In Ruby on rails, methods that generate urls from named routes are not globally accessible. For example, you can&#8217;t access them from console (script/console). If you want to use these methods from such places, then the <a href="http://api.rubyonrails.org/classes/ActionController/UrlWriter.html" target="_blank">rails documentation for ActionController::UrlWriter</a> suggests two ways of doing it. According to this documentation, you can:</p>
<ol>
<li>Include ActionController::UrlWriter in your class</li>
<li>Call the method directly on ActionController::UrlWriter</li>
</ol>
<p>When I tried it out, only the first method worked. I was able to use methods generated from named routes in console after including ActionController::UrlWriter. However, it was not possible to call those methods on ActionController::UrlWriter. This looks like an issue with documentation to me.</p>
<p>It might be the case that the second method used to work in earlier version of rails. As rails is constantly being developed, some refactoring might have made the second method obsolete. I hope rails community will fix such issues in documentation soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2010/05/30/error-in-ruby-on-rails-documentation-for-actioncontroller-urlwriter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RSpec Matchers: Be careful while testing boolean values</title>
		<link>http://anaykamat.com/2010/05/30/rspec-matchers-be-careful-while-testing-boolean-values/</link>
		<comments>http://anaykamat.com/2010/05/30/rspec-matchers-be-careful-while-testing-boolean-values/#comments</comments>
		<pubDate>Sun, 30 May 2010 14:19:55 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[unit tests]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=105</guid>
		<description><![CDATA[While testing methods that return boolean values in ruby (the ones that end in &#8216;?&#8217;), try to avoid following matchers: method_returning_true?.should be_true or method_returning_false?should be_false This is because, &#8216;be_true&#8217; and &#8216;be_false&#8217; matchers considers &#8216;nil&#8217; to be false and anything other than &#8216;nil&#8217; to be true. When we write methods in ruby which end with question [...]]]></description>
			<content:encoded><![CDATA[<p>While testing methods that return boolean values in ruby (the ones that end in &#8216;?&#8217;), try to avoid following matchers:</p>
<pre class="brush: ruby;">
method_returning_true?.should be_true
</pre>
<p>or</p>
<pre class="brush: ruby;">
method_returning_false?should be_false
</pre>
<p>This is because, &#8216;be_true&#8217; and &#8216;be_false&#8217; matchers considers &#8216;nil&#8217; to be false and anything other than &#8216;nil&#8217; to be true. When we write methods in ruby which end with question mark (&#8216;?&#8217;), intent is that the method will return boolean value. To ensure that our tests will always reflect the intent of code, use following to assert boolean values instead of using &#8216;be_true&#8217; or &#8216;be_false&#8217; matchers:</p>
<pre class="brush: ruby;">
method_returning_true?.should == true
</pre>
<p>or</p>
<pre class="brush: ruby;">
method_returning_false?.should == false
</pre>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2010/05/30/rspec-matchers-be-careful-while-testing-boolean-values/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simplicity is the best policy</title>
		<link>http://anaykamat.com/2010/03/30/simplicity-is-the-best-policy/</link>
		<comments>http://anaykamat.com/2010/03/30/simplicity-is-the-best-policy/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 15:12:42 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Creativity]]></category>
		<category><![CDATA[My Thoughts]]></category>
		<category><![CDATA[Technologies]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=102</guid>
		<description><![CDATA[Few days ago I came across a story here. In this story, an assembly line worker suggests a simple, low-cost but highly effective solution to the problem for which engineers had developed a complex and expensive solution. Why am I referring to this story today? Because, I notice lot of people having a misconception that [...]]]></description>
			<content:encoded><![CDATA[<p>Few days ago I came across a story <a href="http://www.tqmschool.com/communication/newsletter_22/use_your_creativity.htm" target="_blank">here</a>. In this story, an assembly line worker suggests a simple, low-cost but highly effective solution to the problem for which engineers had developed a complex and expensive solution. Why am I referring to this story today? Because, I notice lot of people having a misconception that you need to have a complex system to solve a complex problem.</p>
<p>People innovate and develop solutions or machines to reduce human efforts. In other words, machines or solutions are developed to simply our day-to-day activities. By developing complex systems, most of us don&#8217;t realize that:</p>
<ul>
<li>Instead of simplifying something, we have actually transferred the problem to another new system: Complex solutions give us an impression that it solves the problem completely. But in reality, it might end up creating new problems for you. This new problem could be in the form of maintenance or in the form of some hidden cost.</li>
<li>Complex solutions are often too costly: This means that only few rich people will be able to use the solution.</li>
</ul>
<p>I am sure that most of us would have heard about interactive whiteboards (also known as smart boards). These boards are quite costly as they would cost you at least few hundred thousand rupees. Due to this high cost, lot of schools and colleges cannot enjoy the benefits of such iterative systems. Now, is there a cheaper and simpler solution to this problem?</p>
<p>Of course there is!!! <a href="http://johnnylee.net/" target="_blank">Johnny Chung Lee</a>, who works as a researcher at Microsoft &#8211; Applied sciences, has developed a simple systems that achieves most of the functionality provided by commercial smart boards at fraction of their cost. His project makes use of an IR pen, Nintendo Wii remote and a small software application. You can watch the following video to know how this system works:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/5s5EvhHy7eQ&amp;hl=en_GB&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/5s5EvhHy7eQ&amp;hl=en_GB&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Next time, before developing any solutions or systems, try to ask yourself a question: &#8220;Is this the only way of doing this? Can there be simple way to do it?&#8221;</p>
<p>I am sure you will definitely find an answer <img src='http://anaykamat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2010/03/30/simplicity-is-the-best-policy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>After file and photo sharing, it&#8217;s time for &#8220;code sharing&#8221;</title>
		<link>http://anaykamat.com/2009/08/05/after-file-photo-sharing-its-time-for-code-sharing/</link>
		<comments>http://anaykamat.com/2009/08/05/after-file-photo-sharing-its-time-for-code-sharing/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 11:19:15 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[My Thoughts]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[sharing]]></category>
		<category><![CDATA[software developer]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=65</guid>
		<description><![CDATA[If we want to share a file or photos while chatting with our friends on internet using IM tools like GTalk, we use file sharing services available online. These services allow us to upload a file to their servers and give us a link which we can share with our friends. But what if you [...]]]></description>
			<content:encoded><![CDATA[<p>If we want to share a file or photos while chatting with our friends on internet using IM tools like GTalk, we use file sharing services available online. These services allow us to upload a file to their servers and give us a link which we can share with our friends. But what if you are a developer and want to share a small piece of code with your friend? You are left with following choices:</p>
<ul>
<li><strong>Paste it in your chat:</strong> I know most of us do this when we quickly want to share the code. However, its annoying as it becomes unreadable and makes your code look as if its obfuscated <img src='http://anaykamat.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<ul>
<li><strong>Email:</strong> This approach is better compared to previous approach, however the recipient wil need to manually compile the code and run it if he wants to know the output.</li>
</ul>
<p>I won&#8217;t say these approaches are useless. But I would like to have a place, where I can put my code fragment and then share it using a link. I can use this link in my gtalk status, chat or even in twitter posts.</p>
<p>Luckily, there is a site called &#8220;<a href="http://codepad.org/">codepad</a>&#8221; that allows us to do exactly the same thing. It allows us to share a piece of code using a small url.</p>
<p>You can try it now at &#8220;<a href="http://codepad.org/" target="_blank">http://codepad.org/</a>&#8221; or take a look at this example code posted by me at &#8220;<a href="http://codepad.org/XZpSNngW" target="_blank">http://codepad.org/XZpSNngW</a>&#8221;</p>
<p>Finally, one thing I would like to see is support for C# code.</p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2009/08/05/after-file-photo-sharing-its-time-for-code-sharing/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>C# 3.5 in Ubuntu</title>
		<link>http://anaykamat.com/2009/07/31/c-sharp-3-5-in-ubuntu/</link>
		<comments>http://anaykamat.com/2009/07/31/c-sharp-3-5-in-ubuntu/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 10:28:57 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mono]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=59</guid>
		<description><![CDATA[Today, I managed to install Mono 2.4 in Ubuntu 9.04 without affecting Ubuntu&#8217;s default mono installation. Thanks to the instructions here (Building Mono 2.4 from source on Ubuntu 8.10), I was able to install latest mono/monodevelop in a parallel environment. Now I can work on C# 3.5 code in Linux as well. Here is the [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I managed to install Mono 2.4 in Ubuntu 9.04 without affecting Ubuntu&#8217;s default mono installation. Thanks to the instructions <a href="http://www.centriment.com/2009/04/01/building-mono-24-from-source-on-ubuntu-810/" target="_blank">here (Building Mono 2.4 from source on Ubuntu 8.10)</a>, I was able to install latest mono/monodevelop in a parallel environment. Now I can work on C# 3.5 code in Linux as well.</p>
<p>Here is the screen shot of MonoDevelop instance with the code given in <a href="http://anaykamat.com/2009/04/08/y-combinator-in-csharp/" target="_blank">this post</a>.</p>
<p><a rel="attachment wp-att-60" href="http://anaykamat.com/2009/07/31/c-sharp-3-5-in-ubuntu/screenshot-functionaltest-monodevelop/"><img class="aligncenter size-medium wp-image-60" title="MonoDevelop running C# 3.5 code" src="http://anaykamat.com/wp-content/uploads/2009/07/Screenshot-FunctionalTest-MonoDevelop-300x163.png" alt="MonoDevelop running C# 3.5 code" width="300" height="163" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2009/07/31/c-sharp-3-5-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Y-Combinator in C#</title>
		<link>http://anaykamat.com/2009/04/08/y-combinator-in-csharp/</link>
		<comments>http://anaykamat.com/2009/04/08/y-combinator-in-csharp/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 14:19:26 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[functional programming]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=58</guid>
		<description><![CDATA[For last few days, I was trying to use lambda feature of C# to implement Y-Combinator. After few trial and errors, I was able to implement it in C# 3.5. I&#8217;m currently posting the code here and in my next blog, I&#8217;ll explain how I derived it. In this code, Y-Combinator function, is used to [...]]]></description>
			<content:encoded><![CDATA[<p>For last few days, I was trying to use lambda feature of C# to implement Y-Combinator. After few trial and errors, I was able to implement it in C# 3.5. I&#8217;m currently posting the code here and in my next blog, I&#8217;ll explain how I derived it.</p>
<p>In this code, Y-Combinator function, is used to implement anonymous recursive-factorial function called &#8216;factorial&#8217;.</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YCombinator
{
    class Program
    {
        delegate Func RecursiveFunction(RecursiveFunction f);

        static void Main(string[] args)
        {

            Func, Func&gt;, Func&gt; Y = (f) =&gt;
            {
                RecursiveFunction function = (h) =&gt;
                {
                    return (x) =&gt;
                    {
                        return f(h(h))(x);
                    };
                };
                return function(function);
            };

            Func factorial = Y(function=&gt;
            {
                return x =&gt;
                {
                    return x == 0 ? 1 : x * function(x - 1);
                };
            });
            Console.WriteLine(factorial(5));
            Console.ReadLine();
        }
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2009/04/08/y-combinator-in-csharp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Missing attachment detector in Gmail</title>
		<link>http://anaykamat.com/2009/02/11/missing-attachment-detector-in-gmail/</link>
		<comments>http://anaykamat.com/2009/02/11/missing-attachment-detector-in-gmail/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 10:14:56 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[My Thoughts]]></category>
		<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[gmail labs]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=57</guid>
		<description><![CDATA[It is really embarrassing to send an email with an attachment and actually forgetting to attach the file you were supposed to mail along, isn’t it? In my case, I often forget to attach files to emails if I’m typing it in hurry. Sometimes, I even end up receiving replies from recipients of those emails [...]]]></description>
			<content:encoded><![CDATA[<p>It is really embarrassing to send an email with an attachment and actually forgetting to attach the file you were supposed to mail along, isn’t it? In my case, I often forget to attach files to emails if I’m typing it in hurry. Sometimes, I even end up receiving replies from recipients of those emails requesting me to eat food instead of attachments. It&#8217;s really embarrassing when you are working as a professional or interacting with your teaching assistant while studying through <a href="http://www.elearners.com" target="_blank">online universities</a>.</p>
<p>Luckily, today I came across a feature in Gmail Labs, which helps you to identify missing attachments as soon as you press send button. This small functionality in Gmail warns you if you have written something like “I’m attaching” or “I am attaching” or “I have attached” in your message body and you haven’t actually attached any file. I’m not sure if it is capable of identifying any other patterns in email text which suggests that you wanted to attach something. However, I tested for above 3 patterns and I’m good with it.</p>
<p>To enable this feature, you will need to login to your Gmail account. Then go to Settings -&gt; Labs, and enable ‘Forgotten Attachment Detector’. Don’t forget to click on ‘Save changes’ after that.</p>
<p>I would like to thank Mr. Jonathan K, for creating this useful feature in Gmail lab. It is definitely an important feature for me, and for many other people who like to eat attachments instead of food.</p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2009/02/11/missing-attachment-detector-in-gmail/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixing NTLM authentication in Windows 2003</title>
		<link>http://anaykamat.com/2008/10/28/fixing-ntlm-authentication-in-windows-2003/</link>
		<comments>http://anaykamat.com/2008/10/28/fixing-ntlm-authentication-in-windows-2003/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 05:20:46 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Technologies]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[alfresco]]></category>
		<category><![CDATA[NTLM]]></category>
		<category><![CDATA[windows 2003]]></category>
		<category><![CDATA[windows xp]]></category>

		<guid isPermaLink="false">http://anaykamat.com/?p=55</guid>
		<description><![CDATA[We had an application written in C# .Net, which used to communicate with Alfresco Enterprise Document/Content Management System. The application was using Alfresco’s NTLM component for authenticating users against their AD (Active Directory) user account. The application worked perfectly while we were testing it on Windows XP system. However, on Windows 2003 64 Bit system, [...]]]></description>
			<content:encoded><![CDATA[<p>We had an application written in C# .Net, which used to communicate with Alfresco Enterprise Document/Content Management System. The application was using Alfresco’s NTLM component for authenticating users against their AD (Active Directory) user account.</p>
<p>The application worked perfectly while we were testing it on Windows XP system. However, on Windows 2003 64 Bit system, the application started failing as it could not authenticate users on alfresco server using NTLM.</p>
<p>So we had a situation where NTLM authentication used to fail only when our application was running on Windows 2003 Operating System. We tried disabling “Internet Explorer Enhanced Security Configuration”, but it didn’t help. Finally, after spending a lot of time on Google, we came across following article on Microsoft Knowledge Base:</p>
<blockquote><p><strong>&#8220;<a title="Microsoft Knowledge Base Article Link" href="http://support.microsoft.com/kb/954387" target="_blank">You may experience authentication issues when you access a network-attached storage device after you upgrade to Windows Server 2008, to Windows Vista, to Windows Server 2003, or to Windows XP</a>&#8220;</strong></p></blockquote>
<p>This article talks about configuring the system to use appropriate NTLM version. In our Windows 2003 system, the value of <strong>“lmcompatibilitylevel” </strong>(Under <strong>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA</strong> subkey) was set to <strong>2</strong>. We just changed this value to <strong>1</strong>, and the client application started working properly in Windows 2003 system as well.</p>
<p>If you are also facing a similar issue on Windows 2003, then you can try the solution mentioned here. If setting the value of “lmcompatibilitylevel” to 1 makes no difference, then change this value to 0, which is the default value of “lmcompatibilitylevel” in Windows XP.</p>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2008/10/28/fixing-ntlm-authentication-in-windows-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using JSON in Alfresco WebScripts</title>
		<link>http://anaykamat.com/2008/05/08/using-json-in-alfresco-webscripts/</link>
		<comments>http://anaykamat.com/2008/05/08/using-json-in-alfresco-webscripts/#comments</comments>
		<pubDate>Thu, 08 May 2008 14:44:37 +0000</pubDate>
		<dc:creator>Anay</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technologies]]></category>

		<guid isPermaLink="false">http://anaykamat.com/2008/05/08/using-json-in-alfresco-webscripts/</guid>
		<description><![CDATA[In my current project, we are using Alfresco for the content repository and all the extra functionalities required are developed using Webscripts. While working on one functionality, I had to serialize javascript objects to JSON and also deserialize it. For doing this, there is a nice javascript code on Alfresco Wiki for converting the object [...]]]></description>
			<content:encoded><![CDATA[<p>In my current project, we are using <a href="http://www.alfresco.com/" title="Alfresco" target="_blank">Alfresco</a> for the content repository and all the extra functionalities required are developed using <a href="http://http://wiki.alfresco.com/wiki/Web_Scripts" title="Web scripts" target="_blank">Webscripts</a>. While working on one functionality, I had to serialize javascript objects to JSON and also deserialize it. For doing this, there is a nice <a href="http://wiki.alfresco.com/wiki/Web_Scripts_Examples#JSON_example" title="Javascript code" target="_blank">javascript code</a> on Alfresco Wiki for converting the object to JSON and vice versa. But to use it, you need to make some slight modifications to the code.  The original code doesn&#8217;t generate proper JSON code and also has a syntax error in method to obtain the javascript object back from the JSON string. So here is the proper code for handling JSON:</p>
<pre lang="javascript">
/*
   json.js
(modified 2006-09-07): added support for RHINO
(modified 2006-05-02): json.parse, json,stringify added
  USAGE:
  var jsObj = JSON.parse(jsonStr);
  var jsonStr = JSON.stringify(jsObj);
*/
if (!this.json) {
  var json = (function () {
      var m = {
              'b': 'b',
              't': 't',
              'n': 'n',
              'f': 'f',
              'r': 'r',
              '"' : '\"',
              '': ''
          },
          s = {
              array: function (x) {
                  var a = [], b, f, i, l = x.length, v;
                  for (i = 0; i &lt; l; i += 1) {
                      v = x[i];
                      f = s[typeof v];
                      if (f) {
                          v = f(v);
                          if (typeof v == 'string') {
                              a[a.length] = v;
                              b = true;
                          }
                      }
                  }
                  return '['+a.join()+']';
              },
              'boolean': function (x) {
                  return String(x);
              },
              'null': function (x) {
                  return "null";
              },
              number: function (x) {
                  return isFinite(x) ? String(x) : 'null';
              },
              object: function (x) {
                  if (x) {

                      if (x instanceof Array) {
                          return s.array(x);
                      }
                      if (x.hashCode) return s.string(+x.toString());

                      var a = [], b, f, i, v;
                      for (i in x) {
                          v = x[i];
                          f = s[typeof v];
                          if (f) {

                              v = f(v);

                              if (typeof v == 'string') {
                                  a.push(""+s.string(i)+':'+ v+"");
                                  b = true;
                              }
                          }
                      }
                      return '{'+a.join()+'}';
                  }
                  return 'null';
              },
              string: function (x) {
                  if (/["x00-x1f]/.test(x)) {
                      x = x.replace(/([x00-x1f\"])/g, function(a, b) {
                          var c = m[b];
                          if (c) {
                              return c;
                          }
                          c = b.charCodeAt();
                          return 'u00' +
                              Math.floor(c / 16).toString(16) +
                              (c % 16).toString(16);
                      });
                  }
                  return '"' + x + '"';
              }
          };

     return {
        parse: function(s) {
           try {
              return !(/[^,:{}[]0-9.-+Eaeflnr-u nrt]/.test(s.replace(/"(.|[^"])*"/g,""))) &#038;&#038; eval('(' + s + ')');
           } catch (e) {
              return false;
           }
        },
        stringify: s.object
     };
  })();
}</pre>
<p>Here is how to use this code to serialize a javascript object:</p>
<pre lang="javascript">
	o={};
	o.name = "Name";
	o.id = 1;
	j = json.stringify(o);</pre>
<p>Also, to obtain the object back from JSON string, you can use following method:</p>
<pre lang="javascript">
	x = json.parse(j);</pre>
]]></content:encoded>
			<wfw:commentRss>http://anaykamat.com/2008/05/08/using-json-in-alfresco-webscripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
