<?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>BLOGS@DiGiTSS &#187; Programming</title>
	<atom:link href="http://blogs.digitss.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.digitss.com</link>
	<description>DiGiTSS Team&#039;s Programming experience with PHP, MySQL, Ajax, Javascript, jQuery, C# and Microsoft technologies</description>
	<lastBuildDate>Sat, 13 Aug 2011 06:26:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Printing data table vertically..! Why? and How?</title>
		<link>http://blogs.digitss.com/programming/printing-data-table-vertically-why-and-how/</link>
		<comments>http://blogs.digitss.com/programming/printing-data-table-vertically-why-and-how/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 18:20:44 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[challange]]></category>
		<category><![CDATA[Puzzle]]></category>
		<category><![CDATA[table]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=484</guid>
		<description><![CDATA[Last week one of my friend called me up as he got stuck when he has to print data table vertically. Yes vertical table, it means that you want your data to print from top to bottom and not left to write, which is standard conventional way to generate html table.]]></description>
			<content:encoded><![CDATA[<p>Last week one of my friend called me up as he got stuck when he has to print data table vertically. Yes <strong>vertical table</strong>, it means that you want your data to print from top to bottom and not left to write, which is standard conventional way to generate <strong>html table</strong>.</p>
<div id="attachment_485" class="wp-caption alignleft" style="width: 155px"><a href="http://blogs.digitss.com/wp-content/uploads/2011/01/vertical_table.png"><img class="size-full wp-image-485" title="Vertical Table (Printing array data from top to bottom)" src="http://blogs.digitss.com/wp-content/uploads/2011/01/vertical_table.png" alt="Vertical Table (Printing array data from top to bottom)" width="145" height="218" /></a><p class="wp-caption-text">Vertical Table (Printing array data from top to bottom)</p></div>
<p>I took it as a challenge and wrapped that up in few minutes. But at that time I was so close to the problem that I could not see that <strong>PHP</strong> has some <em>inbuilt functions</em> which can help me do that and I did it other way around without using <em>inbuilt PHP function</em>. Here is the sample code for the same, which prints table vertically with the help of <em>inbuilt PHP function</em> <a title="array_chunk (PHP function)" href="http://php.net/manual/en/function.array-chunk.php" target="_blank">array_chunk</a>.</p>
<p><strong>Array</strong> is the most powerful feature of <strong>PHP</strong> and playing with array is always been fun.</p>
<div style="clear: both;">Sample code below uses array_chunk but I must say it was not a great help but it makes you less logic.!</div>
<pre class="php"><span style="color: #808080; font-style: italic;">// Function to print array data vertically</span>
<span style="color: #000000; font-weight: bold;">function</span> print_vertical_table_sys<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data_list</span>, <span style="color: #0000ff;">$rows</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0000ff;">$columns</span> = <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/count"><span style="color: #000066;">count</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data_list</span><span style="color: #66cc66;">&#41;</span>/<span style="color: #0000ff;">$rows</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #0000ff;">$data_list</span> = <a href="http://www.php.net/array_chunk"><span style="color: #000066;">array_chunk</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data_list</span>, <span style="color: #0000ff;">$rows</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'
&lt;table border=&quot;1&quot; style=&quot;border-collapse:collapse&quot;&gt;'</span>;
	<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$row_index</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$row_index</span> &lt; <span style="color: #0000ff;">$rows</span>; <span style="color: #0000ff;">$row_index</span>++<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'
&lt;tr&gt;'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
		<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$column_index</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$column_index</span> &lt; <span style="color: #0000ff;">$columns</span>; <span style="color: #0000ff;">$column_index</span>++<span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'
&lt;td&gt;'</span> . <span style="color: #0000ff;">$data_list</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$column_index</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #0000ff;">$row_index</span><span style="color: #66cc66;">&#93;</span> . <span style="color: #ff0000;">'&lt;/td&gt;
&nbsp;
'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #0000ff;">$column_index</span> = <span style="color: #cc66cc;">0</span>;
		<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'&lt;/tr&gt;
&nbsp;
'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'&lt;/table&gt;
&nbsp;
'</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// Function Usage</span>
<span style="color: #0000ff;">$list</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$i</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$i</span> &amp;lt;= <span style="color: #cc66cc;">59</span>; <span style="color: #0000ff;">$i</span>++<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0000ff;">$list</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$i</span><span style="color: #cc66cc;">+1</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">//print_vertical_table_sys ($list, 10);</span></pre>
<p>Now my question to you is how would you do that if you come across such requirement? Assume that you have list of array items starting from 1, 2, 3, ..... N and you want to print it with fixed length rows which starts like 1 and next cell will have 11 or something similar (similar to what you see in above image).</p>
<p>It's not that difficult but I would suggest give it a try and you will enjoy. Doesn't matter what technology you work with as the example which I will show you not will not use any functionality specific to <strong>PHP</strong>. Basically above code snippet is very close to that but I would suggest that before reading further more you give it a try. Come out of your regular work and make this fun exercise.<span id="more-484"></span></p>
<p><strong><span style="text-decoration: underline;">Plain code snippet</span></strong> (which is in PHP but it will work with any language of your choice with little syntax change)</p>
<pre class="php"><span style="color: #808080; font-style: italic;">// This function do not use any inbuilt function, just loops through array</span>
<span style="color: #000000; font-weight: bold;">function</span> print_vertical_table<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data_list</span>, <span style="color: #0000ff;">$rows</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0000ff;">$columns</span> = <a href="http://www.php.net/ceil"><span style="color: #000066;">ceil</span></a><span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/count"><span style="color: #000066;">count</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data_list</span><span style="color: #66cc66;">&#41;</span>/<span style="color: #0000ff;">$rows</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #0000ff;">$data_count</span> = <a href="http://www.php.net/count"><span style="color: #000066;">count</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data_list</span><span style="color: #66cc66;">&#41;</span>;
	<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'
&lt;table border=&quot;1&quot; style=&quot;border-collapse:collapse&quot;&gt;'</span>;
	<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$row_index</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$row_index</span>  &lt; <span style="color: #0000ff;">$rows</span>; <span style="color: #0000ff;">$row_index</span>++<span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'
&lt;tr&gt;'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
		<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$column_index</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$column_index</span> &lt; <span style="color: #0000ff;">$columns</span>; <span style="color: #0000ff;">$column_index</span>++<span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'
&lt;td&gt;'</span> . <span style="color: #0000ff;">$data_list</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$column_index</span>*<span style="color: #0000ff;">$rows</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #0000ff;">$row_index</span><span style="color: #66cc66;">&#93;</span> . <span style="color: #ff0000;">'&lt;/td&gt;
&nbsp;
'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'&lt;/tr&gt;
&nbsp;
'</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
	<span style="color: #66cc66;">&#125;</span>
	<a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'&lt;/table&gt;
&nbsp;
'</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">// Can be used same as another one</span>
<span style="color: #0000ff;">$list</span> = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$i</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$i</span> &amp;lt;= <span style="color: #cc66cc;">59</span>; <span style="color: #0000ff;">$i</span>++<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0000ff;">$list</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #0000ff;">$i</span><span style="color: #cc66cc;">+1</span>; <span style="color: #808080; font-style: italic;">// To prepare sample data</span>
<span style="color: #66cc66;">&#125;</span>
print_vertical_table <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$list</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>I hope it was fun, so if you tried that what was your score?</p>
<p>Here is <a title="vertical table - source as text" href="http://blogs.digitss.com/archives/vertical-table.txt" target="_blank">source as text-file</a>.</p>
<p>Please do comment and share with us.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/php/truncate-last-n-lines-of-a-file-using-php/" rel="bookmark" title="April 23, 2011">Truncate last N lines of a file using PHP</a></li>
<li><a href="http://blogs.digitss.com/database/alternate-to-find_in_set-for-non-mysql-databases/" rel="bookmark" title="March 6, 2011">Alternate to FIND_IN_SET for non-MySQL databases</a></li>
<li><a href="http://blogs.digitss.com/php/php-performance-improvement-tips/" rel="bookmark" title="August 9, 2008">PHP: Performance Improvement Tips</a></li>
<li><a href="http://blogs.digitss.com/javascript/jquery-javascript/implementing-quick-table-search-using-jquery-filter/" rel="bookmark" title="August 13, 2011">Implementing Quick Table Search using jQuery filter</a></li>
<li><a href="http://blogs.digitss.com/database/mysql/heidisql-40-rc1-released/" rel="bookmark" title="January 10, 2009">HeidiSQL 4.0 RC1 released</a></li>
</ul>
<p><!-- Similar Posts took 71.940 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/programming/printing-data-table-vertically-why-and-how/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The perfect regular expression for email validation</title>
		<link>http://blogs.digitss.com/programming/the-perfect-regular-expression-for-email-validation/</link>
		<comments>http://blogs.digitss.com/programming/the-perfect-regular-expression-for-email-validation/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 18:17:35 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[regular-expression]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=401</guid>
		<description><![CDATA[Okey..! You are looking for "The perfect regular expression for email validation......" aaah..! That's great. I have come across an article as author has done lot of analysis to find out the perfect regular-expression and benchmark it against hundreds of test-cases.]]></description>
			<content:encoded><![CDATA[<p>Okey..! You are looking for "<strong>The perfect regular expression for email validation......</strong>" aaah..! That's great. I have come across an article as author has done lot of analysis to find out the perfect regular-expression and benchmark it against hundreds of <strong>test-cases</strong>.</p>
<p>My favorite is <em>James Watts</em> and <em>Francisco Jose Martin Moreno</em>'s following one which uses <em><strong>preg_match</strong></em>:</p>
<pre>/^([\w\!\#$\%\&amp;\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&amp;\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i</pre>
<div id="attachment_449" class="wp-caption alignleft" style="width: 303px"><a href="http://blogs.digitss.com/wp-content/uploads/2010/10/regex.jpg"><img class="size-full wp-image-449" title="Email Regular-Expression - Test-Case Run" src="http://blogs.digitss.com/wp-content/uploads/2010/10/regex.jpg" alt="Email Regular-Expression - Test-Case Run" width="293" height="243" /></a><p class="wp-caption-text">Email Regular-Expression - Test-Case Run</p></div>
<p><a title="Compare Email Regular Expressions" href="http://blogs.digitss.com/archives/compare-email-regex.php" target="_blank">Checkout this archived article here</a> and let us know hat's your favorite <em><strong>regular-expression</strong></em> for <em><strong>email-validation</strong></em>?<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/javascript/jquery-javascript/implementing-quick-table-search-using-jquery-filter/" rel="bookmark" title="August 13, 2011">Implementing Quick Table Search using jQuery filter</a></li>
<li><a href="http://blogs.digitss.com/javascript/jquery-javascript/jquery-case-insensitive-contains-expression/" rel="bookmark" title="April 20, 2011">jQuery case-insensitive Contains Expression..!</a></li>
<li><a href="http://blogs.digitss.com/microsoft/silverlight-microsoft/cannot-load-html-template-no-launch-page-defined-in-template-at-cprogram-files-x86microsoft-expressionencoder-4templatesen/" rel="bookmark" title="July 7, 2010">Cannot load HTML template: No launch page defined in template at c:\Program Files (x86)\Microsoft Expression\Encoder 4\Templates\en\&#8230;</a></li>
<li><a href="http://blogs.digitss.com/news/netbeans-7-0-rc1-released/" rel="bookmark" title="April 4, 2011">Netbeans 7.0 RC1 Released</a></li>
<li><a href="http://blogs.digitss.com/news/whats-new-with-iphone-os-4-0/" rel="bookmark" title="April 11, 2010">What&#8217;s new with iPhone OS 4.0</a></li>
</ul>
<p><!-- Similar Posts took 240.904 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/programming/the-perfect-regular-expression-for-email-validation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found.</title>
		<link>http://blogs.digitss.com/programming/internet-explorer-was-not-able-to-open-this-internet-site-the-requested-site-is-either-unavailable-or-cannot-be-found/</link>
		<comments>http://blogs.digitss.com/programming/internet-explorer-was-not-able-to-open-this-internet-site-the-requested-site-is-either-unavailable-or-cannot-be-found/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 18:30:30 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Experience]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=443</guid>
		<description><![CDATA[I looked at the error, users were unable to download files from Portal over secure-HTTP (HTTPS). I tried it couple of times and found that it's not working really. Error was consistent from IE6 to IE8.]]></description>
			<content:encoded><![CDATA[<p>Couple of days back I got a complaint from one of the client who recently changed their deployment for one of the Portal we have been developing and the complaint was "<strong>Portal does not work in Internet Explorer.</strong>" The same old great song.</p>
<p>I looked at the error, users were unable to download files from Portal over <strong>secure-HTTP</strong> (HTTPS). I tried it couple of times and found that it's not working really. Error was consistent from <strong>IE6</strong> to <strong>IE8</strong>.</p>
<p>We have to fix this and to begin with I just googled-up with the error message I was getting. <em>"Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."</em> Thankfully I got decent amount of Google search results and in first 2 or 3 I found a post from <strong>Mark Kolich</strong> sharing his similar experience with Internet Explorer and digging in more about that bug.</p>
<p>You can read more about this on <a title="Internet Explorer Can't Open Files Via HTTPS: Try Removing The Pragma Header" href="http://mark.koli.ch/2009/10/internet-explorer-cant-open-file-via-https-try-removing-the-pragma-header.html" target="_blank">Mark's post here</a> on his website. But simple enough it was just a one line fix for <strong>the PHP guys</strong>. Yes, we have to add following line to get rid of the error message.</p>
<pre class="php"><a href="http://www.php.net/header"><span style="color: #000066;">header</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Pragma: &quot;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Simply just remove the <strong>Pragma headers</strong> from your force-download code and you're done.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/browsers/this-download-has-been-blocked-by-your-security-zone-policy/" rel="bookmark" title="October 25, 2008">This download has been blocked by your security zone policy</a></li>
<li><a href="http://blogs.digitss.com/php/curl-php/posting-or-uploading-files-using-curl-with-php/" rel="bookmark" title="March 6, 2011">Posting or Uploading Files using cURL with PHP</a></li>
<li><a href="http://blogs.digitss.com/virtualization/vmware-workstation-this-virtual-machine-appears-to-be-in-use/" rel="bookmark" title="October 10, 2009">VMWare Workstation: This virtual machine appears to be in use.</a></li>
<li><a href="http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/" rel="bookmark" title="June 13, 2009">RSA server certificate CommonName (CN) does NOT match server name!?</a></li>
<li><a href="http://blogs.digitss.com/news/microsoft-internet-explorer-9-preview-available-for-download/" rel="bookmark" title="April 11, 2010">Microsoft Internet Explorer 9 Preview available for Download</a></li>
</ul>
<p><!-- Similar Posts took 300.241 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/programming/internet-explorer-was-not-able-to-open-this-internet-site-the-requested-site-is-either-unavailable-or-cannot-be-found/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AG_E_PARSER_BAD_PROPERTY_VALUE</title>
		<link>http://blogs.digitss.com/programming/ag_e_parser_bad_property_value/</link>
		<comments>http://blogs.digitss.com/programming/ag_e_parser_bad_property_value/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 07:37:58 +0000</pubDate>
		<dc:creator>Gajjar Gaurav</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=317</guid>
		<description><![CDATA[Error Reporting in Silverlight is really bad. One of the most common error you see whiled developing a Silverlight application is AG_E_PARSER_BAD_PROPERTY_VALUE. This error mostly occurs due to following, Version Change in assemly while you are working in the same code (i.e. you used version x initially and later on you changed it to version [...]]]></description>
			<content:encoded><![CDATA[<p>Error Reporting in Silverlight is really bad. One of the most common error you see whiled developing a Silverlight application<br />
is AG_E_PARSER_BAD_PROPERTY_VALUE.<br />
This error mostly occurs due to following,</p>
<p>Version Change in assemly while you are working in the same code (i.e. you used version x initially and later on you changed it to version x + y ). Some Assemblies in 3rd party control when upgraded do not support few older properties or methods.</p>
<p>Your XAML code is referring to some event which is not present in the code behind file. Make sure that all XAML code has relevant code in code behind file. (Remove any unnecessary Events from XAML and CS files)</p>
<p>Your XAML code has repeated the same code again, causing a clash.</p>
<p>Hope this helps<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/microsoft/silverlight-microsoft/initializeerror-error-2104-in-control-silverlightcontrohost-could-not-download-the-silverlight-application/" rel="bookmark" title="April 21, 2009">InitializeError error #2104 in Control &#8216;silverlightControHost&#8217;. Could not download the Silverlight Application</a></li>
<li><a href="http://blogs.digitss.com/microsoft/silverlight-microsoft/not-able-to-debug-silverlight-20-application-in-visual-studio-2008/" rel="bookmark" title="April 21, 2009">Not able to Debug Silverlight 2.0 application in Visual Studio 2008</a></li>
<li><a href="http://blogs.digitss.com/microsoft/silverlight-microsoft/cannot-load-html-template-no-launch-page-defined-in-template-at-cprogram-files-x86microsoft-expressionencoder-4templatesen/" rel="bookmark" title="July 7, 2010">Cannot load HTML template: No launch page defined in template at c:\Program Files (x86)\Microsoft Expression\Encoder 4\Templates\en\&#8230;</a></li>
<li><a href="http://blogs.digitss.com/php/curl-php/posting-or-uploading-files-using-curl-with-php/" rel="bookmark" title="March 6, 2011">Posting or Uploading Files using cURL with PHP</a></li>
<li><a href="http://blogs.digitss.com/apache/openssl/rsa-server-certificate-commonname-cn-does-not-match-server-name/" rel="bookmark" title="June 13, 2009">RSA server certificate CommonName (CN) does NOT match server name!?</a></li>
</ul>
<p><!-- Similar Posts took 3.575 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/programming/ag_e_parser_bad_property_value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Mind Teaser &#8211; good one..!</title>
		<link>http://blogs.digitss.com/programming/a-mind-teaser-good-one/</link>
		<comments>http://blogs.digitss.com/programming/a-mind-teaser-good-one/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 16:46:04 +0000</pubDate>
		<dc:creator>Dharmavirsinh Jhala</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Puzzle]]></category>

		<guid isPermaLink="false">http://blogs.digitss.com/?p=200</guid>
		<description><![CDATA[Last fortnight my team has put their mind on test with one puzzle (passed on to us by other programming department) and it went quite well for everyone. 
It was more about basic math rather than programming and it was good to see everyone refreshing their mind with roots of math/programming. I am sharing this puzzle/question on my blog and want my reader to put their mind and some of their time to crack this and put down their results as comments on this post.]]></description>
			<content:encoded><![CDATA[<p>To improve our programming skills and as a part of self-improvement exercise we are supposed to spend sometime every week as a part of Company Policy. Last fortnight my team has put their mind on test with one puzzle (passed on to us by other programming department) and it went quite well for everyone.</p>
<p>It was more about basic math rather than programming and it was good to see everyone refreshing their mind with roots of math/programming. I am sharing this puzzle/question on my blog and want my reader to put their mind and some of their time to crack this and put down their results as comments on this post.</p>
<p>Here we go:<span id="more-200"></span><br />
<!--adsense--></p>
<blockquote><p>Assume that you have a abstract computer, so forget everything you know about computers, this one only does what I am about to tell you it does.</p>
<ul>
<li>You can use as many variables as you need,</li>
<li>There are no negative numbers,</li>
<li>All numbers are integers.</li>
<li>You do not know the size of the integers, they could be infinitely large, so you cannot count on truncating at any point.</li>
<li>There are NO comparisons allowed, no if statements or anything like that.</li>
<li><strong>There are only four operations you can do on a variable.</strong></li>
</ul>
<ol>
<li>You can set a variable to 0.</li>
<li>You can set a variable = another variable.</li>
<li>You can increment a variable (only by 1), and it is a post increment.</li>
<li>You can loop. So, if you were to say loop(v1) and v1 = 10, your loop would execute 10 times, but the value in v1 would not change so the first line in the loop can change value of v1 without hanging the number of times you loop.</li>
</ol>
<p><strong>You need to perform 3 operations:</strong></p>
<ol>
<li>Write a function that decrements by 1.</li>
<li>Write a function that subtracts one variable from another.</li>
<li>Write a function that divides one variable by another.<br />
(See if you can implement all 3 using at most 4 variables.)</li>
</ol>
<p>Meaning, you are not making function calls now, you are making macros. And at most you can have 4 variables.</p>
<p>The restriction really only applies to divide, the other 2 are easy to do with 4 variables or less. Division on the other hand is dependent on the other 2 functions, so, if subtract requires 3 variables, then divide only has 1 variable left unchanged after a call to subtract.</p>
<p>Basically, just make your function calls to decrement and subtract so you pass your variables in by reference, and you can not declare any new variables in a function, what you pass in is all it gets.</p></blockquote>
<p>Although one can search through Internet to get the answer to this Question but it would be fun to see how long it takes one to crack it and how much of 3 operations.</p>
<p>Readers if you try this, please write down your scores (Time and no of Operations) as a comment.  I am sure I don't need to put on the answer here.<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://blogs.digitss.com/php/truncate-last-n-lines-of-a-file-using-php/" rel="bookmark" title="April 23, 2011">Truncate last N lines of a file using PHP</a></li>
<li><a href="http://blogs.digitss.com/programming/printing-data-table-vertically-why-and-how/" rel="bookmark" title="January 3, 2011">Printing data table vertically..! Why? and How?</a></li>
<li><a href="http://blogs.digitss.com/php/php-performance-improvement-tips/" rel="bookmark" title="August 9, 2008">PHP: Performance Improvement Tips</a></li>
<li><a href="http://blogs.digitss.com/javascript/simple-plain-ajax-without-any-javascript-library/" rel="bookmark" title="April 22, 2011">Simple / Plain Ajax &#8211; without any JavaScript library</a></li>
<li><a href="http://blogs.digitss.com/php/smarty-3-0-is-almost-here/" rel="bookmark" title="October 3, 2010">Smarty 3.0 is almost here..!</a></li>
</ul>
<p><!-- Similar Posts took 11.798 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.digitss.com/programming/a-mind-teaser-good-one/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.066 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2011-08-13 12:33:46 -->

