<?xml version="1.0" encoding="UTF-8"?>
<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>SharpDeveloper now AgileChai</title>
	
	<link>http://www.agilechai.com/content</link>
	<description>C# articles and tutorials on Agile Chai (Was SharpDeveloper.NET)</description>
	<lastBuildDate>Tue, 15 May 2012 01:51:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<feedburner:info uri="sharpdeveloper" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by/3.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://www.sharpdeveloper.net/content/Rss.aspx" /><feedburner:emailServiceId>sharpdeveloper</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>New Domain Name</title>
		<link>http://feedproxy.google.com/~r/sharpdeveloper/~3/sIURYSjD8gg/new-domain-name.aspx</link>
		<comments>http://www.agilechai.com/content/archive/2012/05/14/new-domain-name.aspx#comments</comments>
		<pubDate>Tue, 15 May 2012 01:51:55 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.agilechai.com/content/?p=563</guid>
		<description><![CDATA[I have decided to buy a new domain name &#8211; agilechai.com. I think its a pretty cool name Other Interesting PostsPHP VS. ASP.NETCreating SqlParameters Best PracticesUse Enum (C#) instead of magic numbers]]></description>
			<content:encoded><![CDATA[<p>I have decided to buy a new domain name &#8211; agilechai.com.  I think its a pretty cool name</p>
<h3  class="related_post_title">Other Interesting Posts</h3><ul class="related_post"><li><a href="http://www.agilechai.com/content/archive/2008/05/08/php-vs-aspnet.aspx" title="PHP VS. ASP.NET">PHP VS. ASP.NET</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx" title="Creating SqlParameters Best Practices">Creating SqlParameters Best Practices</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/29/use-enum-instead-of-magic-numbers.aspx" title="Use Enum (C#) instead of magic numbers">Use Enum (C#) instead of magic numbers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.agilechai.com/content/archive/2012/05/14/new-domain-name.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.agilechai.com/content/archive/2012/05/14/new-domain-name.aspx</feedburner:origLink></item>
		<item>
		<title>Allow Visual Studio to use more memory in 32bit windows</title>
		<link>http://feedproxy.google.com/~r/sharpdeveloper/~3/x1ZFCjfR9AI/allow-visual-studio-to-use-more-memory-in-32bit-windows.aspx</link>
		<comments>http://www.agilechai.com/content/archive/2011/01/21/allow-visual-studio-to-use-more-memory-in-32bit-windows.aspx#comments</comments>
		<pubDate>Fri, 21 Jan 2011 17:23:36 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sharpdeveloper.net/content/?p=558</guid>
		<description><![CDATA[Read this excellent guide on increasing the total memory Visual Studio can use, even in 32bit windows Other Interesting PostsPHP VS. ASP.NETCreating SqlParameters Best PracticesUse Enum (C#) instead of magic numbers]]></description>
			<content:encoded><![CDATA[<p>Read this excellent guide on <a href="http://stevenharman.net/blog/archive/2008/04/29/hacking-visual-studio-to-use-more-than-2gigabytes-of-memory.aspx">increasing the total memory Visual Studio can use</a>, even in 32bit windows</p>
<h3  class="related_post_title">Other Interesting Posts</h3><ul class="related_post"><li><a href="http://www.agilechai.com/content/archive/2008/05/08/php-vs-aspnet.aspx" title="PHP VS. ASP.NET">PHP VS. ASP.NET</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx" title="Creating SqlParameters Best Practices">Creating SqlParameters Best Practices</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/29/use-enum-instead-of-magic-numbers.aspx" title="Use Enum (C#) instead of magic numbers">Use Enum (C#) instead of magic numbers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.agilechai.com/content/archive/2011/01/21/allow-visual-studio-to-use-more-memory-in-32bit-windows.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.agilechai.com/content/archive/2011/01/21/allow-visual-studio-to-use-more-memory-in-32bit-windows.aspx</feedburner:origLink></item>
		<item>
		<title>No source avaiable (VS2010)</title>
		<link>http://feedproxy.google.com/~r/sharpdeveloper/~3/HNvBD75ZjXo/no-source-avaiable-vs2010.aspx</link>
		<comments>http://www.agilechai.com/content/archive/2011/01/10/no-source-avaiable-vs2010.aspx#comments</comments>
		<pubDate>Mon, 10 Jan 2011 22:03:31 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[.NET articles]]></category>

		<guid isPermaLink="false">http://www.sharpdeveloper.net/content/?p=554</guid>
		<description><![CDATA[Did you ever try pausing your code in VS2010? Did you get this very annoying screen that says &#8220;no source available&#8221; ? The solution is simple, install this extension Other Interesting PostsPHP VS. ASP.NETCreating SqlParameters Best PracticesUse Enum (C#) instead of magic numbers]]></description>
			<content:encoded><![CDATA[<p>Did you ever try pausing your code in VS2010?  Did you get this very annoying screen that says &#8220;no source available&#8221; ?</p>
<p>The solution is simple, install <a href="http://visualstudiogallery.msdn.microsoft.com/en-us/fdbb2036-471e-40a7-b20e-31f8fd5578fa">this extension</a></p>
<h3  class="related_post_title">Other Interesting Posts</h3><ul class="related_post"><li><a href="http://www.agilechai.com/content/archive/2008/05/08/php-vs-aspnet.aspx" title="PHP VS. ASP.NET">PHP VS. ASP.NET</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx" title="Creating SqlParameters Best Practices">Creating SqlParameters Best Practices</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/29/use-enum-instead-of-magic-numbers.aspx" title="Use Enum (C#) instead of magic numbers">Use Enum (C#) instead of magic numbers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.agilechai.com/content/archive/2011/01/10/no-source-avaiable-vs2010.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.agilechai.com/content/archive/2011/01/10/no-source-avaiable-vs2010.aspx</feedburner:origLink></item>
		<item>
		<title>Modifying open source code to overcome inbuilt limits</title>
		<link>http://feedproxy.google.com/~r/sharpdeveloper/~3/Dr_xXCmFe10/modifying-opensource-to-overcome-limits.aspx</link>
		<comments>http://www.agilechai.com/content/archive/2011/01/06/modifying-opensource-to-overcome-limits.aspx#comments</comments>
		<pubDate>Thu, 06 Jan 2011 04:21:37 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.sharpdeveloper.net/content/?p=547</guid>
		<description><![CDATA[This article applies to not just this particular piece of code but rather any open source tool you use. It may be possible for you to simply edit the source code and use it modified. Thats the beauty of open source! I downloaded this tool SHNTool to use to try to split some lossless audio [...]]]></description>
			<content:encoded><![CDATA[<p>This article applies to not just this particular piece of code but rather any open source tool you use.  It may be possible for you to simply edit the source code and use it modified. <em>Thats the beauty of open source!</em></p>
<p>I downloaded this tool <a href="http://www.etree.org/shnutils/shntool/">SHNTool</a> to use to try to split some lossless audio files that we are publishing on <a href="http://www.flawlessquran.com">flawlessquran.com</a>.  The sad thing is, it has a file limit of 256 files, however I needed 286 files to be split at once.</p>
<p>Believe it or not, all I had to do is download the source for for SHNTool and then edit <a href="http://shntool.sourcearchive.com/documentation/3.0.7/mode__split_8c-source.html">src/mode_split.c</a> and change the definition of SPLIT_MAX_PIECES from<br />
#define SPLIT_MAX_PIECES 256<br />
to<br />
#define SPLIT_MAX_PIECES 300</p>
<p>Then obviously I rebuilt it (using ./configure followed by make followed by make install)<br />
and it worked!!</p>
<p>Splitting [002.flac] (198:33.36) &#8211;> [vbv/002248.flac] (1:20.18) : 100% OK<br />
Splitting [002.flac] (198:33.36) &#8211;> [vbv/002249.flac] (1:03.49) : 100% OK<br />
Splitting [002.flac] (198:33.36) &#8211;> [vbv/002250.flac] (2:20.72) : 100% OK<br />
Splitting [002.flac] (198:33.36) &#8211;> [vbv/002251.flac] (0:31.64) : 100% OK<br />
Splitting [002.flac] (198:33.36) &#8211;> [vbv/002252.flac] (0:53.67) : 100% OK<br />
Splitting [002.flac] (198:33.36) &#8211;> [vbv/002253.flac] (0:20.66) : 100% OK<br />
Splitting [002.flac] (198:33.36) &#8211;> [vbv/002254.flac] (1:42.21) : 100% OK<br />
Splitting [002.flac] (198:33.36) &#8211;> [vbv/002255.flac] (0:28.39) : 100% OK</p>
<p>No more &#8220;shnsplit: error: too many split files would be created &#8212; maximum is 256&#8243;</p>
<p>I posted this incase someone else is running into the same problem the solution is quite easy!</p>
<p>and this worked!<br />
It seems that the developers simply put an arbitrary limit of 256.  </p>
<h3  class="related_post_title">Other Interesting Posts</h3><ul class="related_post"><li><a href="http://www.agilechai.com/content/archive/2008/05/08/php-vs-aspnet.aspx" title="PHP VS. ASP.NET">PHP VS. ASP.NET</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx" title="Creating SqlParameters Best Practices">Creating SqlParameters Best Practices</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/29/use-enum-instead-of-magic-numbers.aspx" title="Use Enum (C#) instead of magic numbers">Use Enum (C#) instead of magic numbers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.agilechai.com/content/archive/2011/01/06/modifying-opensource-to-overcome-limits.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.agilechai.com/content/archive/2011/01/06/modifying-opensource-to-overcome-limits.aspx</feedburner:origLink></item>
		<item>
		<title>Jquery Rich Array Documentation</title>
		<link>http://feedproxy.google.com/~r/sharpdeveloper/~3/S22GWLFpdyE/jquery-rich-array-documentation.aspx</link>
		<comments>http://www.agilechai.com/content/archive/2010/04/30/jquery-rich-array-documentation.aspx#comments</comments>
		<pubDate>Fri, 30 Apr 2010 20:54:12 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[.NET articles]]></category>

		<guid isPermaLink="false">http://www.sharpdeveloper.net/content/?p=538</guid>
		<description><![CDATA[If you want to use the JQuery Rich Array and you were hoping for some documentation, well its inside the .JS file but I am posting it here for reference purposes /*************************************************************************** * Copyright (C) 2007 by Vladimir Kadalashvili * * Vladimir.Kadalashvili@gmail.com * * * * This program is free software; you can redistribute it [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to use the JQuery Rich Array and you were hoping for some documentation, well its inside the .JS file but I am posting it here for reference purposes</p>
<pre class="brush: js">
/***************************************************************************
 *   Copyright (C) 2007 by Vladimir Kadalashvili                                        *
 *   Vladimir.Kadalashvili@gmail.com                                                   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

/*
A simple jQuery plugin for varios manipulations with arrays
*/ 

jQuery.richArray = {

    /*
        Checks whether an array contains some value
	@param {Array} array - an array in which we search for a value
	@param {Mixed} value - the value we search for
	@return {boolean} true if the array contains the value, otherwise false
    */

    in: function(array, value) {
    },

    /*
        Produces the duplicate-free version of the array
	@param {Array} array
	@returns {array}  - an array without duplicates
    */
    unique: function(array) {

    },

    /*
        Finds the difference between two arrays.
	@param {Array} array1
	@param {Array} array2
	@return {Array} array of values which are present in the first array, but not in the second
    */

    diff: function(array1, array2) {

    },

    /*
        Finds the intersection of two arrays
	@param {Array} array1
	@param {Array} array2
	@return {Array} - the array of values wich are present in both arrays
    */

    intersect: function(array1, array2) {

    },

    /*
        Applies filter to the array, using callback function
	@param {Array} array - an array which we apply filter to
	@param {Function} fn - the filter function. If it returns the value that may be evaluated as TRUE, the value will be included to the returned array.
	@param {Object} scope - the scope of the callback function. Default is jQuery.richArray
	@returns {Array} - an array of values for which callback function returned true
    */

    filter: function(array, fn, scope) {

    },

    /*
        Applies callback function for each element in the input array, and returns array of values that this function returned
	@param {Array} array - an array which we should apply callback to
	@param {Function} fn - callback function
	@param scope - the scope of the callback function. Default is jQuery.richArray
    */
    map: function(array, fn, scope) {
    },

    /*
        Computes the sum of all array elements.
	@param {Array} array - an array we should compute the sum for
	@param {Mixed} init - the initial value of the sum. Default is 0.
	@returns {Mixed} the sum of all elements of the input array
    */

    sum: function(array, init) {
    },

    /*
        Calculates the production of all elements of the array
	@param array - an array we should compute production for
	@param init - the initial value. Default is 1.
	@returns {Mixed} - the production of all elements of the input array
    */

    product: function(array, init) {
    },

    /*
        Reduces the array. One-elemen arrays are turned into their unique element, others are retured untouched
	Examples:
	jQuery.richArray.reduce([3]) -&amp;gt; 3
	jQuery.richArray.reduce([3, 5]) -&amp;gt; [3, 5]
    */

    reduce: function(array) {
    },

    /*
        Creates new version of array without null/undefined values
	@param {Array} array - input array
	@returns {Array} - an array without null/undefined values
    */

    compact: function(array) {
    },

    /*
       Creates a new version of the array that doesn&#039;t contain the specified value
       @patam {Array} array - input array
       @param {Mixed} value - the value that shouldn&#039;t be included to the returned array
       @returns {Array} - a new version of the input array without specified value
    */

    without: function(array, value) {
    },

    /*
        If the passed argument is an array, returns it untouched, otherwise returns an empty array.
	For internal use.
    */

    getArray: function(array) {
    },

    /*
        if the passed argument is a function, returns it untouched, otherwise returns an empty function
   */

    getFunction: function(fn) {
        if (!(fn instanceof Function)) fn = new Function();
	return fn;
    }    

};
</pre>
<p>Homepage: <a href="http://vladimir-k.blogspot.com/2008/12/rich-array-jquery-plugin.html">Jquery Rich Array Plugin</a></p>
<h3  class="related_post_title">Other Interesting Posts</h3><ul class="related_post"><li><a href="http://www.agilechai.com/content/archive/2008/05/08/php-vs-aspnet.aspx" title="PHP VS. ASP.NET">PHP VS. ASP.NET</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx" title="Creating SqlParameters Best Practices">Creating SqlParameters Best Practices</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/29/use-enum-instead-of-magic-numbers.aspx" title="Use Enum (C#) instead of magic numbers">Use Enum (C#) instead of magic numbers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.agilechai.com/content/archive/2010/04/30/jquery-rich-array-documentation.aspx/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.agilechai.com/content/archive/2010/04/30/jquery-rich-array-documentation.aspx</feedburner:origLink></item>
		<item>
		<title>Serialize and Deserialize to JSON from ASP.NET</title>
		<link>http://feedproxy.google.com/~r/sharpdeveloper/~3/U3oklpsxJ00/serialize-and-deserialize-to-json-from-asp-net.aspx</link>
		<comments>http://www.agilechai.com/content/archive/2010/04/23/serialize-and-deserialize-to-json-from-asp-net.aspx#comments</comments>
		<pubDate>Fri, 23 Apr 2010 19:32:14 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[.NET articles]]></category>

		<guid isPermaLink="false">http://www.sharpdeveloper.net/content/?p=534</guid>
		<description><![CDATA[Its very easy to serialize an object to .NET Simply create some object, normally a custom class with some attributes. Normally you have a list of these and you want to serialize to JSON to use it from client side code. If you do the following var s = new System.Web.Script.Serialization.JavaScriptSerializer(); string resultJs = s.Serialize(result); [...]]]></description>
			<content:encoded><![CDATA[<p>Its very easy to serialize an object to .NET<br />
Simply create some object, normally a custom class with some attributes.<br />
Normally you have a list of these and you want to serialize to JSON to use it from client side code.</p>
<p>If you do the following</p>
<pre class="brush: c#">
var s = new System.Web.Script.Serialization.JavaScriptSerializer();
string resultJs = s.Serialize(result);
</pre>
<p>you will end up with a JSON array that you were looking for:</p>
<pre class="brush: javascript">
[
  { &quot;Desc&quot; : &quot;Corn 100 &quot;,
    &quot;ItemNo&quot; : &quot;123456&quot;,
    &quot;OriginalQty&quot; : 50,
    &quot;Qty&quot; : 50,
    &quot;UnitPrice&quot; : 10.21
  } ,
  { &quot;Desc&quot; : &quot;Ice 100 &quot;,
    &quot;ItemNo&quot; : &quot;323456&quot;,
    &quot;OriginalQty&quot; : 50,
    &quot;Qty&quot; : 50,
    &quot;UnitPrice&quot; : 10.50
  } ,
  { &quot;Desc&quot; : &quot;Meat 100 &quot;,
    &quot;ItemNo&quot; : &quot;423456&quot;,
    &quot;OriginalQty&quot; : 50,
    &quot;Qty&quot; : 50,
    &quot;UnitPrice&quot; : 10.11
  } 

]
</pre>
<p>However if you try to deserialize this back into an object by running </p>
<pre class="brush: c#">
var json = new System.Web.Script.Serialization.JavaScriptSerializer();
var result = json.Deserialize&lt;ShoppingCartItem[]&gt;(jsonItemArray);
    </pre>
<p>You will get a NULL type Exception.</p>
<p>The solution is to create a simple resolver as follows</p>
<pre class="brush: c#">
    using System;
    using System.Web;
    using System.Web.Compilation;
    using System.Web.Script.Serialization;

    namespace XYZ.Util
    {
        /// &lt;summary&gt;
        /// as __type is missing ,we need to add this
        /// &lt;/summary&gt;
        public class ManualResolver : SimpleTypeResolver
        {
            public ManualResolver() { }
            public override Type ResolveType(string id)
            {
                return System.Web.Compilation.BuildManager.GetType(id, false);
            }
        }
    }
    </pre>
<p>2) Use it to serialize</p>
<pre class="brush: c#">
    var s = new System.Web.Script.Serialization.JavaScriptSerializer(new XYZ.Util.ManualResolver());
    string resultJs = s.Serialize(result);
    lblJs.Text = string.Format(&quot;&lt;script&gt;var resultObj = {0};&lt;/script&gt;&quot;, resultJs);
    </pre>
<p>You will get something like the following this time (note new __type included this time)</p>
<pre class="brush: javascript">
[
  {
    &quot;__type&quot;:&quot;XYZ.Data.Entities.ShoppingCartItem, XYZ.Data, Version=1.7.1.0, Culture=neutral, PublicKeyToken=null&quot;,
    &quot;Desc&quot; : &quot;Corn 100 &quot;,
    &quot;ItemNo&quot; : &quot;123456&quot;,
    &quot;OriginalQty&quot; : 50,
    &quot;Qty&quot; : 50,
    &quot;UnitPrice&quot; : 10.21
  } ,
  {
    &quot;__type&quot;:&quot;XYZ.Data.Entities.ShoppingCartItem, XYZ.Data, Version=1.7.1.0, Culture=neutral, PublicKeyToken=null&quot;,
    &quot;Desc&quot; : &quot;Ice 100 &quot;,
    &quot;ItemNo&quot; : &quot;323456&quot;,
    &quot;OriginalQty&quot; : 50,
    &quot;Qty&quot; : 50,
    &quot;UnitPrice&quot; : 10.50
  } ,
  {
    &quot;__type&quot;:&quot;XYZ.Data.Entities.ShoppingCartItem, XYZ.Data, Version=1.7.1.0, Culture=neutral, PublicKeyToken=null&quot;,
    &quot;Desc&quot; : &quot;Meat 100 &quot;,
    &quot;ItemNo&quot; : &quot;423456&quot;,
    &quot;OriginalQty&quot; : 50,
    &quot;Qty&quot; : 50,
    &quot;UnitPrice&quot; : 10.11
  } 

]
</pre>
<p>3) Use it to deserialize</p>
<pre class="brush: c#">
    System.Web.Script.Serialization.JavaScriptSerializer(new XYZ.Util.ManualResolver());
    var result = json.Deserialize&lt;ShoppingCartItem[]&gt;(jsonItemArray);
    </pre>
<p>References: Comment by Manuel Abadia on <a href="http://www.manuelabadia.com/blog/CommentView,guid,50bc4c5a-3e40-4f81-8137-f7843d4a486d.aspx">ASP.NET AJAX Extensions Internals &#8211; Web Service Proxy Generation</a></p>
<h3  class="related_post_title">Other Interesting Posts</h3><ul class="related_post"><li><a href="http://www.agilechai.com/content/archive/2008/05/08/php-vs-aspnet.aspx" title="PHP VS. ASP.NET">PHP VS. ASP.NET</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx" title="Creating SqlParameters Best Practices">Creating SqlParameters Best Practices</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/29/use-enum-instead-of-magic-numbers.aspx" title="Use Enum (C#) instead of magic numbers">Use Enum (C#) instead of magic numbers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.agilechai.com/content/archive/2010/04/23/serialize-and-deserialize-to-json-from-asp-net.aspx/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.agilechai.com/content/archive/2010/04/23/serialize-and-deserialize-to-json-from-asp-net.aspx</feedburner:origLink></item>
		<item>
		<title>How to completely disable ViewState and ControlState</title>
		<link>http://feedproxy.google.com/~r/sharpdeveloper/~3/GxGmXuIEJSg/how-to-completely-disable-viewstate-and-controlstate.aspx</link>
		<comments>http://www.agilechai.com/content/archive/2010/04/21/how-to-completely-disable-viewstate-and-controlstate.aspx#comments</comments>
		<pubDate>Wed, 21 Apr 2010 21:25:29 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sharpdeveloper.net/content/?p=525</guid>
		<description><![CDATA[Here is a code snippet that will COMPLETELY disable ViewState and ControlState. Please note, if you want to disable viewstate, you can set &#8220;EnableViewState&#8221; to false for the page, however you will still see &#8220;VIEWSTATE&#8221; in the page. The reason for that is because the hidden ViewState HTML field also contains &#8220;Control State&#8221;, which is [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a code snippet that will COMPLETELY disable ViewState and ControlState.</p>
<p>Please note, if you want to disable viewstate, you can set &#8220;EnableViewState&#8221; to false for the page, however you will still see &#8220;VIEWSTATE&#8221; in the page.  The reason for that is because the hidden ViewState HTML field also contains &#8220;Control State&#8221;, which is used by server controls (either built in controls or custom 3rd party controls) and is not disable-able (for core functionality that their control depends on).</p>
<p>However you can still disable this, with disastrous consequences on postback.</p>
<p>USE THIS only if you have NO POSTBACKS whatsoever and you are living in a happy client side world of javascript and web service calls.</p>
<p>Put this following code inside your ASP.NET page</p>
<pre class="brush: c#">
private class DummyPageStatePersister  <img src='http://www.agilechai.com/content/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ageStatePersister
{
    public DummyPageStatePersister(Page p) : base(p) { }
    public override void Load() { }
    public override void Save() { }
}

private DummyPageStatePersister _PageStatePersister;
protected override PageStatePersister PageStatePersister
{
    get
    {
        if (_PageStatePersister == null)
            _PageStatePersister = new DummyPageStatePersister(this);
        return _PageStatePersister;
    }
}
</pre>
<p>Please note this will has disastrous consequences if you attempt to do a postback because you have essentially killed the control state.</p>
<h3  class="related_post_title">Other Interesting Posts</h3><ul class="related_post"><li><a href="http://www.agilechai.com/content/archive/2008/05/08/php-vs-aspnet.aspx" title="PHP VS. ASP.NET">PHP VS. ASP.NET</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx" title="Creating SqlParameters Best Practices">Creating SqlParameters Best Practices</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/29/use-enum-instead-of-magic-numbers.aspx" title="Use Enum (C#) instead of magic numbers">Use Enum (C#) instead of magic numbers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.agilechai.com/content/archive/2010/04/21/how-to-completely-disable-viewstate-and-controlstate.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.agilechai.com/content/archive/2010/04/21/how-to-completely-disable-viewstate-and-controlstate.aspx</feedburner:origLink></item>
		<item>
		<title>Flesk Viewstate Optimizer Documentation</title>
		<link>http://feedproxy.google.com/~r/sharpdeveloper/~3/ARmfEEJnH6o/flesk-viewstate-optimizer-documentation.aspx</link>
		<comments>http://www.agilechai.com/content/archive/2010/03/01/flesk-viewstate-optimizer-documentation.aspx#comments</comments>
		<pubDate>Mon, 01 Mar 2010 18:20:46 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[.NET articles]]></category>

		<guid isPermaLink="false">http://www.sharpdeveloper.net/content/?p=513</guid>
		<description><![CDATA[I came across this excellent looking tool Flesk ViewState Optimizer but was not able to find any details or documentation on it.  Apparently the tool used to be commercial but now its free!  I was able to dig up some history on it Flesk.ViewStateOptimizer is a unique technology that overrides sending ViewState object to your [...]]]></description>
			<content:encoded><![CDATA[<p>I came across this excellent looking tool <a href="http://www.flesk.net/components/vsoptimizer.aspx">Flesk ViewState Optimizer</a> but was not able to find any details or documentation on it.  Apparently the tool used to be commercial but now its free!  I was able to dig up some history on it</p>
<p><strong>Flesk.ViewStateOptimizer</strong> is a unique technology that overrides sending ViewState object to your client&#8217;s browser! This means that your client&#8217;s browser will no longer receive those large hidden field values, which thus reducing downloading time. Instead, Flesk.ViewStateOptimizer saves the page&#8217;s Viewstate hidden field to a file, on the server side, speeding  up processing time, downloading time and data.
											</p>
<p>Combining <strong>Flesk.ViewStateOptimizer</strong> and <strong>Flesk.Accelerator</strong>,<br />
												you can benefit from reducing downloading data and downloading time up to 30 times faster! No other components<br />
												do the same or give the same results!</p>
<p><strong>Flesk.Accelerator</strong> and <strong>Flesk.ViewStateOptimizer</strong> are now released with versions<br />
												targeted for the .NET Framework v2.0</p>
<p>&nbsp;</p>
<p><strong><font size="2">How it works?<a name="Works"></a></font></strong></p>
<p><strong>Flesk.ViewStateOptimizer</strong> has several viewstate optimization possibilities that can be set through the web.config file.<br /> From viewstate data compression to saving viewstate on server farms, anything can be possible. This means that Flesk.ViewStateOptimizer can persist values using server side Sessions or files saved on shared locaton accessible by a server farm, or by using common viewstate hidden field value on client side, with the ability to compress data.</p>
<p>There are 2 ways to setup Flesk.ViewStateOptimizer on your web application or .Net project:</p>
<ol>
<li>In all your codebehind, instead of inheriting your class with<br />
													System.Web.UI.Page, change the inheritance to Flesk.Accelerator.Page.<br />
													If you use script block codebehind, use the following lines: </p>
<pre class="brush: xml">
&amp;lt;%@ Page  Language=&amp;quot;C#&amp;quot; Inherits=&amp;quot;Flesk.Accelerator.Page&amp;quot; %&amp;gt;
</pre>
</li>
<li>
<p>Flesk.ViewStateOptimizer is designed to meet the requirements of customers that are unable to change<br />
														the base class of their pages.<br />
														As such, Flesk.ViewStateOptimizer provides static methods that allows calling the viewstate procedures<br />
														from within any page class.</p>
<p>														If you have access to the source of your base class, just add the following lines to the code:</p>
<pre class="brush: c#">
protected override void  SavePageStateToPersistenceMedium(object viewStateBag)
{
   Flesk.Accelerator.Page.SavePageStateToPersistenceMedium(this, viewStateBag);
}

protected override object LoadPageStateFromPersistenceMedium()
{
    return Flesk.Accelerator.Page.LoadPageStateFromPersistenceMedium(this);
}
</pre>
<p> If you are using precompiled code you&#8217;ll have to edit your aspx files. If at all possible, add the following<br />
														</p>
<p>														snippet to your aspx file:</p>
<pre class="brush: c#">
protected override PageStatePersister PageStatePersister
{
  get
  {
    return Flesk.Accelerator.Page.GetPageStatePersister(this);
  }
}
</pre>
</p></div>
</li>
</ol>
<div id="Features">
<p>&nbsp;</p>
<p>Flesk.ViewStateOptimizer can use different storage methods:</p>
</p></div>
<ul>
<li>
<div style=""> save to file (saves ViewState into a file, server side)</div>
</li>
<li>
<div style="">
<div style=""> Session (saves ViewState into a Session variable, server side) </div>
</p></div>
</li>
<li> Default (default ViewState saving method, sends hidden fields to client side)</li>
</ul>
<p>Other parameters are:</p>
<ul>
<li> depending on the storage method setting, Flesk.ViewStateOptimizer can be set to compress viewstate value,<br />
													so that it can be significantly smaller than the original value</li>
<li>the request behaviour of viewstate can be set to be generated on the first request to a page and then<br />
													reused in the following postbacks, or to be generated on each request to a page. <br />
													A common scenario where viewstate set to be generated on each request can be usefull is in Content Management<br />
													frameworks:<br />
													page loads up some controls on postback based on some state stored in hidden input values, handles events<br />
													and as a result of those actions purges the control collection and loads new controls.<br />
													Standard Flesk.ViewStateOptimizer configuration persists the Viewstate using the same GUID as the original<br />
													page. <br />
													If the user then hit&#8217;s refresh (F5) in the browser, the data is posted again, the framework loads up it&#8217;s<br />
													controls based on the original state but the viewstate value now matches the new controls. This also happens<br />
													with any change to the viewstate between postbacks, when users back up or use refresh in their browsers.<br />
													<br />
													The solution was to make Flesk.ViewStateOptimizer generate GUID&#8217;s each and every time the viewstate is persisted.<br />
													Only then is the viewstate truly unique for each page. </li>
</ul>
<div style="">
<p>&nbsp;</p>
<p><font size="2"><strong>Features<a name="Features"></a></strong></font></p>
<p> <strong>V1.0</strong></p>
<ul>
<li>Reduces downloading time of your website or web application, by not sending back the page&#8217;s Viewstate<br />
														hidden field.</li>
<li> This component is setup individually. It is not shared by all the webserver&#8217;s websites, but only by<br />
														your website or webapplication. This means that you can install it in your hosting account without changing<br />
														any webserver&#8217;s configuration. </li>
<li> Runs on .NET Framework v1.1 and v2.0. No configuration required. Only a few lines on your web.config<br />
														file is all you need to change. </li>
<li>Greatly reduces bandwidth traffic from your webserver, reduces Posted data from your client&#8217;s browser,<br />
														and speeds up your web application! <br />
														Supported by WebFarms 
													</li>
</ul>
<p> <strong>V1.2</strong></p>
<ul>
<li>Compresses the ViewState value. This means that ViewState is sent and returned to/from client&#8217;s browser<br />
														or saved into local file, on server, compressed, thus reducing ViewState&#8217;s value length and increasing<br />
														speed even more!</li>
<li> This release of the Viewstate Optimizer is designed to meet the requirements of<br />
														customers that are unable to change the base class of their pages. </li>
<li>The Flesk.Accelerator.Page class now provides two static methods that allow calling the viewstate
<p>														procedures from within any page class.</li>
<li>ViewState files can now be persisted on shared location accessible by all servers in a server farm.
</li>
</ul>
<p>From <a href="http://web.archive.org/web/20080501220023/http://www.flesk.net/fleskviewstate.aspx">Archive.Org</a></p>
<p>Not sure what happened to the company but glad they decided to give their product for free now! (GPL license)</p>
<p>Edit Aug 12, 2010</p>
<h1>Web.Config Requirements</h1>
<p>To use this, here is what you put in Web.Config between &lt;configuration&gt; and &lt;/configuration&gt;</p>
<pre class="brush: xml">
  &amp;lt;Flesk.NET&amp;gt;
    &amp;lt;!--
		The StorageMethod parameter sets the ViewState&#039;s storage type.
		Possible values are :

			- File (saves ViewState into a file, server side)
				- StoragePath must specify a write enabled server path ( ~ means site root path)
					If StoragePath is a web path (i.e.: \\MachineName\Dir), when used in webfarms,
					please add the following line under &amp;lt;system.web&amp;gt;
					&amp;lt;identity impersonate=&amp;quot;true&amp;quot; userName=&amp;quot;domain\username&amp;quot; password=&amp;quot;userpass&amp;quot;/&amp;gt;

			- Default (default ViewState saving method, sending hidden fields to client side)

			- Session (saves ViewState into a Session variable, server side)

			- SqlServer (saves the ViewState into a database table)
				- ConnectionString specifies the database connection.
				- TableName specifies the table in the database where the records will be stored.

		New Option :
			Compressed=&amp;quot;true&amp;quot; or Compressed=&amp;quot;false&amp;quot;
			this will compress the ViewState if StorageMethod is Default or File.
			so the ViewState&#039;s value will be significantly smaller than the original value.
			Compression method is not suported by StorageMethod=&amp;quot;Session&amp;quot;

		--&amp;gt;
    &amp;lt;ViewStateOptimizer
			PersistenceHandler=&amp;quot;Flesk.Accelerator.SessionViewstatePersister, Flesk.Accelerator&amp;quot;
			StorageMethod=&amp;quot;SqlServer&amp;quot;
			StoragePath=&amp;quot;~/Files/Logs&amp;quot;
			ConnectionString=&amp;quot;Server=...;Database=...;Uid=...;Pwd=...
			TableName=&amp;quot;app_ViewState&amp;quot;
			Compressed=&amp;quot;false&amp;quot;
			RequestBehavior=&amp;quot;EachLoad&amp;quot;
			ViewStateCleanupInterval=&amp;quot;01:00:00&amp;quot;
			/&amp;gt;
  &amp;lt;/Flesk.NET&amp;gt;
</pre>
<p>Between &lt;configSections&gt; and &lt;/configSections&gt; put the following:</p>
<pre class="brush: xml">
    &amp;lt;sectionGroup name=&amp;quot;Flesk.NET&amp;quot;&amp;gt;
      &amp;lt;section name=&amp;quot;ViewStateOptimizer&amp;quot; type=&amp;quot;Flesk.Accelerator.Viewstate.ConfigHandler, Flesk.ViewState&amp;quot; /&amp;gt;
    &amp;lt;/sectionGroup&amp;gt;
</pre>
<p>Between &lt;httpModules&gt; and &lt;/httpModules&gt; you can put</p>
<pre class="brush: xml">
			&amp;lt;!--
			This HttpModule provides automatic cleanup of viewstate files
			on the start of each session, thus requiring
			the SessionStateModule to be installed as well.
		  --&amp;gt;
			&amp;lt;add name=&amp;quot;ViewstateCleanupModule&amp;quot; type=&amp;quot;Flesk.Accelerator.Viewstate.CleanupModule, Flesk.ViewState&amp;quot;/&amp;gt;
		&amp;lt;/httpModules&amp;gt;
</pre>
<h3  class="related_post_title">Other Interesting Posts</h3><ul class="related_post"><li><a href="http://www.agilechai.com/content/archive/2008/05/08/php-vs-aspnet.aspx" title="PHP VS. ASP.NET">PHP VS. ASP.NET</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx" title="Creating SqlParameters Best Practices">Creating SqlParameters Best Practices</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/29/use-enum-instead-of-magic-numbers.aspx" title="Use Enum (C#) instead of magic numbers">Use Enum (C#) instead of magic numbers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.agilechai.com/content/archive/2010/03/01/flesk-viewstate-optimizer-documentation.aspx/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://www.agilechai.com/content/archive/2010/03/01/flesk-viewstate-optimizer-documentation.aspx</feedburner:origLink></item>
		<item>
		<title>Recursively extract files</title>
		<link>http://feedproxy.google.com/~r/sharpdeveloper/~3/4y1eqzSj1Tc/recursively-extract-files.aspx</link>
		<comments>http://www.agilechai.com/content/archive/2010/02/11/recursively-extract-files.aspx#comments</comments>
		<pubDate>Thu, 11 Feb 2010 20:21:59 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[Hosting]]></category>

		<guid isPermaLink="false">http://www.sharpdeveloper.net/content/?p=507</guid>
		<description><![CDATA[i want to recursively unzip into proper folder so i have /home/abdullah/quran1/files.zip /home/abdullah/quran2/files.zip &#8230; /home/abdullah/quranfolder/files.zip best way to search inside php files for text yoursearchtexthere find . -name &#039;*.php&#039; -exec grep --with-filename --line-number &#039;yoursearchtexthere&#039; {} \; i simply want to unzip all of them at once, here is the shell script to do it in [...]]]></description>
			<content:encoded><![CDATA[<p>i want to recursively unzip into proper folder<br />
so i have<br />
/home/abdullah/quran1/files.zip</p>
<div id=":s4">/home/abdullah/quran2/files.zip<br />
&#8230;<br />
/home/abdullah/quranfolder/files.zip</p>
<p>best way to search inside php files for text <strong>yoursearchtexthere</strong></p>
<pre class="brush: php">find . -name &#039;*.php&#039; -exec grep --with-filename --line-number &#039;yoursearchtexthere&#039; {} \;</pre>
<p>i simply want to unzip all of them at once, here is the shell script to do it in linux:</p></div>
<pre class="brush: php">find -maxdepth 1 -mindepth 1 -type d | while read line; do unzip $line/*.zip -d $line ; done</pre>
<p>This way is problematic if any of the folders have spaces in them</p>
<p>this way is better</p>
<pre class="brush: php">
for dir in */; do ( cd &amp;quot;$dir&amp;quot; &amp;amp;amp;&amp;amp;amp; unzip *.zip ); done
</pre>
<p>Ref: http://unix.derkeiler.com/Newsgroups/comp.unix.misc/2005-03/0006.html</p>
<p>Here is an application of method 1 above, delete all files with 2008 in the name</p>
<pre class="brush: php">find -name *2008* | while read line; do rm -f $line ; done</pre>
<h3  class="related_post_title">Other Interesting Posts</h3><ul class="related_post"><li><a href="http://www.agilechai.com/content/archive/2008/05/08/php-vs-aspnet.aspx" title="PHP VS. ASP.NET">PHP VS. ASP.NET</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx" title="Creating SqlParameters Best Practices">Creating SqlParameters Best Practices</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/29/use-enum-instead-of-magic-numbers.aspx" title="Use Enum (C#) instead of magic numbers">Use Enum (C#) instead of magic numbers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.agilechai.com/content/archive/2010/02/11/recursively-extract-files.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.agilechai.com/content/archive/2010/02/11/recursively-extract-files.aspx</feedburner:origLink></item>
		<item>
		<title>Improve SQL Server Plan Execution Speed With Foreign Keys and constraints</title>
		<link>http://feedproxy.google.com/~r/sharpdeveloper/~3/6-_m5bceoA0/improve-sql-server-plan-execution-speed-with-foreign-keys-and-constraints.aspx</link>
		<comments>http://www.agilechai.com/content/archive/2010/01/11/improve-sql-server-plan-execution-speed-with-foreign-keys-and-constraints.aspx#comments</comments>
		<pubDate>Mon, 11 Jan 2010 15:01:25 +0000</pubDate>
		<dc:creator>Sameer</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.sharpdeveloper.net/content/?p=503</guid>
		<description><![CDATA[Its been a while since I have posted, and I thought this was too amazing to NOT share Apparently, using Check Constraints and adding Foreign Keys not only improves the quality of your database through ensuring referential integrity and data integrity in general, apparently it also helps the Query Analyzer design better plans! Take a [...]]]></description>
			<content:encoded><![CDATA[<p>Its been a while since I have posted, and I thought this was too amazing to NOT share</p>
<p>Apparently, using Check Constraints and adding Foreign Keys not only improves the quality of your database through ensuring referential integrity and data integrity in general, apparently it also helps the Query Analyzer design better plans!</p>
<p>Take a look at this post:</p>
<ul>
<li>13 Things you should know about <a href="http://www.simple-talk.com/sql/t-sql-programming/13-things-you-should-know-about-statistics-and-the-query-optimizer/?utm_source=simpletalk&amp;utm_medium=email&amp;utm_content=13Things20100111&amp;utm_campaign=SQL">statistics and the query optimizer</a>, jump to <strong>Point 9</strong>.</li>
<li>Also, incase you are wondering what he means by &#8220;trusted constraint&#8221; and &#8220;non trusted constraints&#8221;, it would be &#8216;non trusted&#8217; if you allowed existing non-complying data in the table to stay in there. <a href="http://sqlblog.com/blogs/tibor_karaszi/archive/2008/01/12/non-trusted-constraints.aspx">More here</a> on trusted constraints.</li>
</ul>
<h3  class="related_post_title">Other Interesting Posts</h3><ul class="related_post"><li><a href="http://www.agilechai.com/content/archive/2008/05/08/php-vs-aspnet.aspx" title="PHP VS. ASP.NET">PHP VS. ASP.NET</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/25/creating-sqlparameters-best-practices.aspx" title="Creating SqlParameters Best Practices">Creating SqlParameters Best Practices</a></li><li><a href="http://www.agilechai.com/content/archive/2007/05/29/use-enum-instead-of-magic-numbers.aspx" title="Use Enum (C#) instead of magic numbers">Use Enum (C#) instead of magic numbers</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.agilechai.com/content/archive/2010/01/11/improve-sql-server-plan-execution-speed-with-foreign-keys-and-constraints.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.agilechai.com/content/archive/2010/01/11/improve-sql-server-plan-execution-speed-with-foreign-keys-and-constraints.aspx</feedburner:origLink></item>
	</channel>
</rss>

