<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7838929879052806968</atom:id><lastBuildDate>Fri, 08 Nov 2024 15:04:04 +0000</lastBuildDate><category>.Net</category><category>c#</category><category>MVC3</category><category>ASP.NET MVC Tweaks</category><category>MVC</category><category>Ramadan</category><category>Ramzaan</category><category>Windows8</category><category>installer class</category><category>nopcommerce</category><category>Assembly</category><category>Borderless form</category><category>Debugger.break</category><category>EncoderParameter</category><category>Exchange Service URL</category><category>ExternalAuth</category><category>Install</category><category>Installstate</category><category>Manners</category><category>Mouse Event Capture</category><category>Move a form</category><category>Open Source Zip</category><category>Outlook</category><category>Outlook VBA</category><category>Page Inspector</category><category>Quran</category><category>Role Provider</category><category>SharpZip</category><category>Tag</category><category>Tag Property</category><category>Visual Studio 2012</category><category>browser automation</category><category>debug installer class</category><category>emoticons</category><category>image conversion</category><category>telerik grid</category><category>win8</category><category>winforms</category><title>Musings And Shouts</title><description></description><link>http://musingsandshouts.blogspot.com/</link><managingEditor>noreply@blogger.com (Aslam Shareef )</managingEditor><generator>Blogger</generator><openSearch:totalResults>46</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-5524705664301104232</guid><pubDate>Tue, 21 Oct 2014 12:20:00 +0000</pubDate><atom:updated>2014-10-21T18:04:14.229+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">.Net</category><category domain="http://www.blogger.com/atom/ns#">browser automation</category><category domain="http://www.blogger.com/atom/ns#">winforms</category><title>Executing Scripts when using AxSHDocVw.AxWebBrowser</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;I recently ran into a situation where I had to change the value of a drop down in an automated web browser. I was able to change the value but a different   value was being passed. On further investigation I found that the web page attaches a javascript handler for the onchange event of the drop-down and this does not get automatically executed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;So I did this :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: navy;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt;&quot;&gt;Code Snippet&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;dynamic&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt; htmlDocument = axWebBrowser.Document;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #F3F3F3; margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;dynamic&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt; htmlWindow = htmlDocument.parentWindow;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;htmlWindow.BrowserChanged();&lt;/span&gt;&lt;span style=&quot;background: white; color: green; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;// Where BrowserChanged is the javascript method&lt;/span&gt;&lt;span style=&quot;background: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;This too did not work. Apparently because BrowserChanged handler was written in an external JS file!!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;Then I did this :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: navy;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt;&quot;&gt;Code Snippet&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;dynamic&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt; doc = axWebBrowser1.Document;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #F3F3F3; margin-left: .5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;dynamic&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt; htmlWindow = doc.parentWindow;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-indent: .5in;&quot;&gt;
&lt;span style=&quot;background: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;htmlWindow.eval(&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;&quot;(function() { return BrowserChanged();   })()&quot;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 9.0pt; mso-margin-top-alt: auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 9.0pt; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;And it worked &amp;nbsp;:)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://musingsandshouts.blogspot.com/2014/10/executing-scripts-when-using.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-3840945333667712198</guid><pubDate>Fri, 21 Mar 2014 09:54:00 +0000</pubDate><atom:updated>2014-03-21T15:27:46.166+05:30</atom:updated><title>&quot;Insufficient storage available&quot; - Android </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
When WhatsApp updated I had to install it. When i clicked UPDATE button in google playstore for WhatsApp, it downloaded the app and started installing it. Then I got this very very weird error :&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&quot;Insufficient storage available.&quot;&lt;/blockquote&gt;
What made this weird was that I had 7GB of free space on my internal memory and 17GB free on my SDCard ! After jumping through all the hoops that I could find on XDA-Developers and other forums I finally found a post which helped me get rid of that problem :&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://forum.xda-developers.com/showpost.php?p=49697066&amp;amp;postcount=68&quot;&gt;http://forum.xda-developers.com/showpost.php?p=49697066&amp;amp;postcount=68 &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In case this link is dead I will reproduce the text here :&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&quot;Ok, found the problem, 100% guaranteed to work. The problem is solved by
 this, delete the app files which is found here, data/app-asec. Here you
 will find the file with .asec, delete those files. Bobs your uncle, 
Fanny&#39;s your Aunt.&lt;br /&gt;
&lt;br /&gt;
Also, if they can&#39;t be found here, and it&#39;s an update issue, check 
data/app-lib, you&#39;ll find 2 folders with the file, -1 and -2, delete 
both folders. That should take care of it.
  &quot;&lt;/blockquote&gt;
&lt;br /&gt;
Essentially look for a folder or folders which has/have the name like the app which is giving you a problem and has a &lt;b&gt;-1&lt;/b&gt; and/or &lt;b&gt;-2&lt;/b&gt; in the end. For example for &lt;b&gt;WhatsApp&lt;/b&gt; the folder i deleted was &lt;b&gt;com.whatsApp-1&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
After deleting that folder, when whats app installed perfectly well.&lt;br /&gt;
&lt;br /&gt;
If you are interested you may view the entire thread&amp;nbsp; here &lt;a href=&quot;http://forum.xda-developers.com/showthread.php?t=1717897&quot;&gt;http://forum.xda-developers.com/showthread.php?t=1717897&lt;/a&gt;. &lt;/div&gt;
</description><link>http://musingsandshouts.blogspot.com/2014/03/insufficient-storage-available-android.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-6170587111477692465</guid><pubDate>Fri, 31 Jan 2014 06:40:00 +0000</pubDate><atom:updated>2014-01-31T12:10:48.119+05:30</atom:updated><title>Controls collection cannot be modified because the control contains code blocks</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;Recently I encountered an error :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: red; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 14.0pt;&quot;&gt;Server Error in &#39;ASP.Net&#39; Application.  &lt;/span&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;hr align=&quot;center&quot; noshade=&quot;&quot; size=&quot;1&quot; style=&quot;color: #a0a0a0;&quot; width=&quot;100%&quot; /&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;i&gt;&lt;span style=&quot;color: maroon; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt;&quot;&gt;The Controls collection cannot be modified because the control contains code blocks (i.e. &amp;lt;% ... %&amp;gt;).&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;which had me stumped for an hour before I found the rogue code and the solution for it.  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;The stack trace did not reveal any specific line (even though I was in debug mode) which made me conclude that this had to be due to a JIT compilation error   occurring at runtime between two different files. This also had to be a server side asp.net tag where this problem was occurring since the stack trace mentioned  &lt;span style=&quot;color: #e46c0a; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #E46C0A;&quot;&gt;  Controls.Add()&lt;/span&gt; was failing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;I headed out to the Master page and sure enough, one of the devs had added a serverside code (&lt;/span&gt;&lt;span style=&quot;background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;background: white; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SomeMethod(Request);&lt;/span&gt;&lt;span style=&quot;background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;)   in the HEAD tag, and the HEAD tag was marked with runat=“server”.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;The solution can be one of the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&amp;nbsp;&amp;nbsp; 1. &amp;nbsp;&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;Move the server-side code to inside the Body tag.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-autospace: none; text-indent: -.25in;&quot;&gt;
&amp;nbsp; &lt;span style=&quot;background: white; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;Place it between &amp;lt;asp:Placeholder&amp;gt; like this  &lt;br /&gt;  &lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;PlaceHolder&lt;/span&gt;&lt;span style=&quot;background: white; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;runat&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none; text-indent: .5in;&quot;&gt;
&lt;span style=&quot;background: white; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;/span&gt;&lt;span style=&quot;background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;background: white; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SomeMethod(Request);&lt;/span&gt;&lt;span style=&quot;background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none; text-indent: .5in;&quot;&gt;
&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;asp&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background: white; color: maroon; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;PlaceHolder&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: white; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&amp;nbsp; &lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;If you’re server tag is emitting an output (&lt;/span&gt;&lt;span style=&quot;background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;&amp;lt;%=&lt;/span&gt;&lt;span style=&quot;background: white; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SomeMethod(Request)&lt;/span&gt;&lt;span style=&quot;background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;)   you should replace the &lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;lt;%= &lt;/span&gt;with &lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;lt;%#&lt;/span&gt; like this :&lt;br /&gt;  &lt;/span&gt;&lt;span style=&quot;background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;&amp;lt;%#&lt;/span&gt;&lt;span style=&quot;background: white; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;SomeMethod(Request)&lt;/span&gt;&lt;span style=&quot;background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Candara&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Hope this helps!&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://musingsandshouts.blogspot.com/2014/01/controls-collection-cannot-be-modified.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-861670999208453082</guid><pubDate>Fri, 26 Jul 2013 09:37:00 +0000</pubDate><atom:updated>2013-07-26T15:07:23.761+05:30</atom:updated><title>Ajax partial views and client side validation markup</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
If there is no html FORM tag in the output html of the parital view returned via ajax, then there wont be any validation markup generated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Adding this to the top of the partial view will render the validation markup appropriately :&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;color: windowtext; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.0pt;&quot;&gt;ViewContext.FormContext = new FormContext();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
After the returned HTML is added on the page, you would need to rebind the form for unobtrusive validations to function :&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;comment-copy&quot;&gt;There are instances where adding the line Developer has noted won&#39;t work, like the using AJAX to get a partial view. The reason this happens is that the AJAX call does not trigger the validate plugin to &quot;rebind&quot;   to the forms on the page, which it shouldn&#39;t. In these cases, it is necessary to call the $.validator.unobtrusive.parse(&#39;#myPartialViewForm&#39;); method.  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://musingsandshouts.blogspot.com/2013/07/ajax-partial-views-and-client-side.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-5086063535681726121</guid><pubDate>Wed, 05 Jun 2013 05:49:00 +0000</pubDate><atom:updated>2013-06-05T18:08:43.017+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">.Net</category><category domain="http://www.blogger.com/atom/ns#">c#</category><category domain="http://www.blogger.com/atom/ns#">EncoderParameter</category><category domain="http://www.blogger.com/atom/ns#">image conversion</category><title>C# - Image distortion/Jpg artifact while converting transparent PNG to JPG</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
While .NET exposes some very nifty APIs for image creation and manipulation, there is one part which almost invariably fails. Converting semi-transparent PNGs to JPGs.&lt;br /&gt;
&lt;br /&gt;
If you wanted to convert a non-JPG image to JPG you would typically do this :&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black; overflow: auto; width: 99.5%;&quot;&gt;
&lt;pre style=&quot;margin: 0em;&quot;&gt;  &lt;span style=&quot;color: #2b91af;&quot;&gt;Bitmap&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;  bitmap = (&lt;span style=&quot;color: #2b91af;&quot;&gt;Bitmap&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; )&lt;span style=&quot;color: #2b91af;&quot;&gt;Bitmap&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; .FromFile(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;c:\\imagepath\\shoes.png&quot;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt;&quot;&gt;// Encoder parameter for image quality&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: 9.5pt;&quot;&gt;EncoderParameter&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; qualityParam = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;EncoderParameter&lt;/span&gt;(System.Drawing.Imaging.&lt;span style=&quot;color: #2b91af;&quot;&gt;Encoder&lt;/span&gt;.Quality, 95L);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: green; font-family: Consolas; font-size: 9.5pt;&quot;&gt;// Jpeg image codec&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: 9.5pt;&quot;&gt;ImageCodecInfo&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; imgcodec = GetEncoderInfo(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;image/&quot;&lt;/span&gt;
+ ImageFormat.Jpeg.ToString().ToLower());&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: #2b91af; font-family: Consolas; font-size: 9.5pt;&quot;&gt;EncoderParameters&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; encoderParams = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;EncoderParameters&lt;/span&gt;(1);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;encoderParams.Param[0]
= qualityParam;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;bitmap.Save(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;c:\\imagepath\\shoes.jpg&quot;&lt;/span&gt;, imgcodec,
encoderParams);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;margin: 0em;&quot;&gt; &lt;/pre&gt;
&lt;/div&gt;
However, in the case when the source file is a semi-transparent PNG, things get rather murky.... literally.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Example :&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Source semi-transparent PNG&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9nkpSTTyc55GSELZjghEofRvQH8sP0nzPoX8-3ONlQQyz3U7b-IYWl4nXODvheUCSWq9y5b82QU_uf1nm1vyq8pcd2aKEDDa8kN4Ek3kzbKNvplxH0udviuI3LQCXgMWBmKZPJXSwTk5T/s1600/65-2049-Product_Primary_Image.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;253&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9nkpSTTyc55GSELZjghEofRvQH8sP0nzPoX8-3ONlQQyz3U7b-IYWl4nXODvheUCSWq9y5b82QU_uf1nm1vyq8pcd2aKEDDa8kN4Ek3kzbKNvplxH0udviuI3LQCXgMWBmKZPJXSwTk5T/s320/65-2049-Product_Primary_Image.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
And this is the resultant JPG :&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR-3NMdp0oK6KK2NwZplLl8XhPKI9g5p0HLaaSLKugyq0A6SZfiL_eKikhunJi6n4BMgWvyWNt_IAK8V41IogOggMw8t23zV3y18f6PAKz9OyqKs6FNjthvBUgi1XG5bAXsy4mWhcYB_2U/s1600/65-2049-Product_Primary_Image.Jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;253&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR-3NMdp0oK6KK2NwZplLl8XhPKI9g5p0HLaaSLKugyq0A6SZfiL_eKikhunJi6n4BMgWvyWNt_IAK8V41IogOggMw8t23zV3y18f6PAKz9OyqKs6FNjthvBUgi1XG5bAXsy4mWhcYB_2U/s320/65-2049-Product_Primary_Image.Jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
You will notice that the semitransparent pixels around the object exhibit a line-scan. The API uses the last color it found to fill that column and row with that color for semi-transparent pixels.&lt;br /&gt;
To get around this limitation, first create a new Image object of the same dimensions as the source png. Get its Graphics handle and clear it with White color. Then draw the source image onto the new, blank, white-washed Image object. Then save it as you would regularly.&lt;br /&gt;
&lt;br /&gt;
The reason for re-drawing the image on the new White-Washed image is&amp;nbsp; to convert all transparent and semitransparent pixels to white.&lt;br /&gt;
&lt;br /&gt;
Here&#39;s the code:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;WordSection1&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;Bitmap&lt;/span&gt; b = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Bitmap&lt;/span&gt;(bitmap.Width, bitmap.Height))&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;Graphics&lt;/span&gt;
g = &lt;span style=&quot;color: #2b91af;&quot;&gt;Graphics&lt;/span&gt;.FromImage(b))&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
g.Clear(&lt;span style=&quot;color: #2b91af;&quot;&gt;Color&lt;/span&gt;.White);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
g.DrawImage(bitmap, 0, 0,bitmap.Width,bitmap.Height);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;// Encoder parameter for image quality&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #2b91af;&quot;&gt;EncoderParameter&lt;/span&gt; qualityParam = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;EncoderParameter&lt;/span&gt;(System.Drawing.Imaging.&lt;span style=&quot;color: #2b91af;&quot;&gt;Encoder&lt;/span&gt;.Quality, 95L);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: green;&quot;&gt;// Jpeg image codec&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #2b91af;&quot;&gt;ImageCodecInfo&lt;/span&gt; imgcodec = GetEncoderInfo(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;image/&quot;&lt;/span&gt; + ImageFormat.Jpeg.ToString().ToLower());&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;color: #2b91af;&quot;&gt;EncoderParameters&lt;/span&gt; encoderParams = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;EncoderParameters&lt;/span&gt;(1);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
encoderParams.Param[0] = qualityParam;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
b.Save(&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;c:\\imagepath\\shoes.jpg&quot;&lt;/span&gt;&lt;/span&gt;, imgcodec, encoderParams);&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;b&gt;&lt;/b&gt;

Resultant JPG will be as clean as the original file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://musingsandshouts.blogspot.com/2013/06/c-image-distortionjpg-artifact-while.html</link><author>noreply@blogger.com (Aslam Shareef )</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9nkpSTTyc55GSELZjghEofRvQH8sP0nzPoX8-3ONlQQyz3U7b-IYWl4nXODvheUCSWq9y5b82QU_uf1nm1vyq8pcd2aKEDDa8kN4Ek3kzbKNvplxH0udviuI3LQCXgMWBmKZPJXSwTk5T/s72-c/65-2049-Product_Primary_Image.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-8808275982058925469</guid><pubDate>Wed, 24 Apr 2013 18:14:00 +0000</pubDate><atom:updated>2013-04-24T23:44:59.788+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ExternalAuth</category><category domain="http://www.blogger.com/atom/ns#">MVC</category><category domain="http://www.blogger.com/atom/ns#">nopcommerce</category><title>NopCommerce - FaceBook ExternalAuth plugin issue - &quot;Account Association: Your new user account will be linked to xyz&quot; or &quot;email already in use&quot;</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
NOPCommerce is a great open-source eCommerce platform. I have been developing online stores using NOPCommerce since version 2.6. The current version is 2.8.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
While working on Login and Registration using FaceBook OAuth plugin I found that once a user logis in for the very first time using FB credentials, and if he signs out and tries to sign back in, he gets either &quot;email is already in use&quot; or &quot;This account will be associated with (a very long FB Auth token)&quot;. Essentially it wont sign you in now. Reason being that FB has discontinued the use of &quot;offline_access&quot; permission. So it fails.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To make it work, you need to do two things :&lt;br /&gt;
&lt;br /&gt;
1. Sign in as Admin and go to CONFIGURATION &amp;gt; SETTINGS &amp;gt; CUSTOMER SETTINGS, click on &quot;&lt;b&gt;External Authentication Settings&lt;/b&gt;&quot; tab and SELECT or CHECK the &quot;&lt;b&gt;auto register enabled&lt;/b&gt;&quot; checkbox.&lt;br /&gt;
&lt;br /&gt;
2. Overwrite the GetUser() method in OpenAuthenticationService.cs file, with this :&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgDY1nL85PLmlhW5wNFb7P1CPQLK5yyvaGH456GzMZ5mo59MOHCfy8gm_OaWiuxxnPJ7JHfEw3ZRpfk-I7I4dOdCisWUNnNQw2ldY72JOkrBf9FHOLmaaN280Xu9mkI2sWTgQaIb6Z-13Q/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;  public virtual Customer GetUser(OpenAuthenticationParameters parameters)  
     {  
       string email=string.Empty;  
       if (parameters.UserClaims != null)  
         foreach (var userClaim in parameters.UserClaims  
           .Where(x =&amp;gt; x.Contact != null &amp;amp;&amp;amp; !String.IsNullOrEmpty(x.Contact.Email)))  
         {  
           //found  
           email = userClaim.Contact.Email;  
           break;  
         }  
       var record = _externalAuthenticationRecordRepository.Table  
         .Where(o =&amp;gt; o.Email == email &amp;amp;&amp;amp; o.ProviderSystemName == parameters.ProviderSystemName)  
         .FirstOrDefault();  
       if (record != null)  
         return _customerService.GetCustomerById(record.CustomerId);  
       return null;  
     }  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
And bingo.... FB login works like a charm :)&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://musingsandshouts.blogspot.com/2013/04/nopcommerce-facebook-externalauth.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-79487746720658139</guid><pubDate>Thu, 28 Mar 2013 12:10:00 +0000</pubDate><atom:updated>2013-03-28T17:49:19.038+05:30</atom:updated><title>H.A.W.X. </title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Gameloft came out with a 3D Military aircraft simulation game for android. It was Tom Clancy&#39;s H.A.W.X. Its one of the most engaging games I have played on android. While i was on Samsung SII I used to actually bring a router to the office and play in multiplayer mode during our break :)&amp;nbsp; . However, now since I bought my Samsung Note, I cant. Its unbelievable that GameLoft would support low end phones like Galaxy-Y upto Samsung S-III but not Note or Note II. Well it does support ONE version of Note - T879. Unfortunately mine is N7000. To add further woe, Chainfire 3D , a third party free graphics library (which allows one to play Tegra and other games, which normally would not be possible given the OS version and its &quot;limitations&quot;), also does not work on ICS/JellyBean. It hangs the phone at the boot screen leaving you with no option other than to restore your phone, which is by itself a royal pain in the @$$ unless you had the foresight to take a Titanium Backup.&lt;br /&gt;
&lt;br /&gt;
Wish GameLoft comes out with a working version for JB on Note - N7000. Until then... Asphalt 7 is the only playable game for me (Sigh!).&lt;br /&gt;
&lt;br /&gt;
Here are some screenshots and video of the game :&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.blogger.com/video.g?token=AD6v5dy9UKdDnbXG92mWHuocPbjhi7B2YxspoOw1XEGpsaxGu9NN1BYbvxpD7-ogAIFY_Z6owLsxJx3gUFLc4rZjkw&#39; class=&#39;b-hbp-video b-uploaded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJQr-bfTO_cVaMeVnNrh5-6kLB6CMXpWPAOE5ZakJoCLd4wWgUMHRkWafqU7rzwqxEnUs2nbnW3m03NhQMC6d_uUh_xc7euRp83tvS94W76lkEAysH3vOWceiGaH__1czcwp71PRnAr4ox/s1600/screen001.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;382&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJQr-bfTO_cVaMeVnNrh5-6kLB6CMXpWPAOE5ZakJoCLd4wWgUMHRkWafqU7rzwqxEnUs2nbnW3m03NhQMC6d_uUh_xc7euRp83tvS94W76lkEAysH3vOWceiGaH__1czcwp71PRnAr4ox/s640/screen001.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6rz4OFXvD456s-G9DmFfS5a9g1CgsuOhkZWNsj-1SarvduGuX97N1yDyGUf7KwwXS4lBU1gizW5o2dombhYAry62Zkn66vkbnSV1mOFEWghyphenhyphen1OoemiuNGZakndh-Q4G9ReHwLW3mFiiqi/s1600/screen003.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;383&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6rz4OFXvD456s-G9DmFfS5a9g1CgsuOhkZWNsj-1SarvduGuX97N1yDyGUf7KwwXS4lBU1gizW5o2dombhYAry62Zkn66vkbnSV1mOFEWghyphenhyphen1OoemiuNGZakndh-Q4G9ReHwLW3mFiiqi/s640/screen003.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA-6U490JevZMsj1wRZvcZYzIw8BNYc3pVpagZTryUlOkj-SjE98pkrV9Bxcv3Dl4BKk-TEF3VH5vydufBUVhmDazVk1HOCCtWSTq31LnFyqkqyvYS8GjBvYZB6lZsBCVqe87FLDbWZ2Tl/s1600/screen004.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;383&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA-6U490JevZMsj1wRZvcZYzIw8BNYc3pVpagZTryUlOkj-SjE98pkrV9Bxcv3Dl4BKk-TEF3VH5vydufBUVhmDazVk1HOCCtWSTq31LnFyqkqyvYS8GjBvYZB6lZsBCVqe87FLDbWZ2Tl/s640/screen004.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Add caption&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeK3LcYX-GqcOmqrYoSb4FiBeXGDC-6FsMGL2pAtqhja2DfiByQmgw0rUwYHmkfxvMMzwcaX1gSWn8RNnZSjKBiKxFcbsDeoeiwWbgcZG1apbyfmHsX-U6e0g9Wum6G1719QGIGCbNC_eY/s1600/screen002.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;\&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; height=&quot;383&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeK3LcYX-GqcOmqrYoSb4FiBeXGDC-6FsMGL2pAtqhja2DfiByQmgw0rUwYHmkfxvMMzwcaX1gSWn8RNnZSjKBiKxFcbsDeoeiwWbgcZG1apbyfmHsX-U6e0g9Wum6G1719QGIGCbNC_eY/s640/screen002.jpg&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://musingsandshouts.blogspot.com/2013/03/hawx.html</link><author>noreply@blogger.com (Aslam Shareef )</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJQr-bfTO_cVaMeVnNrh5-6kLB6CMXpWPAOE5ZakJoCLd4wWgUMHRkWafqU7rzwqxEnUs2nbnW3m03NhQMC6d_uUh_xc7euRp83tvS94W76lkEAysH3vOWceiGaH__1czcwp71PRnAr4ox/s72-c/screen001.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-8506368931305719268</guid><pubDate>Thu, 22 Nov 2012 05:58:00 +0000</pubDate><atom:updated>2012-11-22T11:32:56.543+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET MVC Tweaks</category><category domain="http://www.blogger.com/atom/ns#">c#</category><category domain="http://www.blogger.com/atom/ns#">MVC3</category><category domain="http://www.blogger.com/atom/ns#">Page Inspector</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio 2012</category><title>MVC3 and VS2012 Page Inspector</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Visual Studio 2010 has a very nice feature called as Page Inspector. It allows you to run the web application within visual studio. Then you click on &quot;Inspect&quot; button to ... well ... inspect any portion of the web page. Doing so will automatically open the relevant server side file and highlight the portion which is responsible for rendering the inspected section.&lt;br /&gt;
In my case we were trying to use the page inspector in our MVC3 web site (which is actually a very large and complex web app). We were unable to use the inspector effectively since our application URL plays a very important role in deciding what to display and the kind of UX it can offer.&lt;br /&gt;
After some thinking and a lot of not-so-nice-words being hurled at Microsoft for making simple things amazingly complex, we finally got it to work. Heres how :&lt;br /&gt;&lt;br /&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:TrackMoves/&gt;
  &lt;w:TrackFormatting/&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:DoNotPromoteQF/&gt;
  &lt;w:LidThemeOther&gt;EN-IN&lt;/w:LidThemeOther&gt;
  &lt;w:LidThemeAsian&gt;X-NONE&lt;/w:LidThemeAsian&gt;
  &lt;w:LidThemeComplexScript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
   &lt;w:SplitPgBreakAndParaMark/&gt;
   &lt;w:EnableOpenTypeKerning/&gt;
   &lt;w:DontFlipMirrorIndents/&gt;
   &lt;w:OverrideTableStyleHps/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
  &lt;m:mathPr&gt;
   &lt;m:mathFont m:val=&quot;Cambria Math&quot;/&gt;
   &lt;m:brkBin m:val=&quot;before&quot;/&gt;
   &lt;m:brkBinSub m:val=&quot;&amp;#45;-&quot;/&gt;
   &lt;m:smallFrac m:val=&quot;off&quot;/&gt;
   &lt;m:dispDef/&gt;
   &lt;m:lMargin m:val=&quot;0&quot;/&gt;
   &lt;m:rMargin m:val=&quot;0&quot;/&gt;
   &lt;m:defJc m:val=&quot;centerGroup&quot;/&gt;
   &lt;m:wrapIndent m:val=&quot;1440&quot;/&gt;
   &lt;m:intLim m:val=&quot;subSup&quot;/&gt;
   &lt;m:naryLim m:val=&quot;undOvr&quot;/&gt;
  &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; DefUnhideWhenUsed=&quot;true&quot;
  DefSemiHidden=&quot;true&quot; DefQFormat=&quot;false&quot; DefPriority=&quot;99&quot;
  LatentStyleCount=&quot;267&quot;&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;0&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Normal&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;heading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;9&quot; QFormat=&quot;true&quot; Name=&quot;heading 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 7&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 8&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; Name=&quot;toc 9&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;35&quot; QFormat=&quot;true&quot; Name=&quot;caption&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;10&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; Name=&quot;Default Paragraph Font&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;11&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtitle&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;22&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Strong&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;20&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;59&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Table Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Placeholder Text&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;1&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;No Spacing&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; UnhideWhenUsed=&quot;false&quot; Name=&quot;Revision&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;34&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;List Paragraph&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;29&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;30&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Quote&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 1&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 2&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 3&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 4&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 5&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;60&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;61&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;62&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Light Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;63&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;64&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Shading 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;65&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;66&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium List 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;67&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 1 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;68&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 2 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;69&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Medium Grid 3 Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;70&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Dark List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;71&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Shading Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;72&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful List Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;73&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; Name=&quot;Colorful Grid Accent 6&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;19&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;21&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Emphasis&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;31&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Subtle Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;32&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Intense Reference&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;33&quot; SemiHidden=&quot;false&quot;
   UnhideWhenUsed=&quot;false&quot; QFormat=&quot;true&quot; Name=&quot;Book Title&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;37&quot; Name=&quot;Bibliography&quot;/&gt;
  &lt;w:LsdException Locked=&quot;false&quot; Priority=&quot;39&quot; QFormat=&quot;true&quot; Name=&quot;TOC Heading&quot;/&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-priority:99;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-bottom: 12.0pt; mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;
&lt;span style=&quot;mso-fareast-font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;1.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Open web store solution in VS2012&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-bottom: 12.0pt; mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;
&lt;span style=&quot;mso-fareast-font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;2.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Go to web.config and search (CTRL+F) for
“Compilation”. Change the value of “Debug” to “true” if it is “false”. &lt;br /&gt;
It will look something like this : &lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;compilation&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: yellow; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;debug&lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background: yellow; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;background: yellow; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;defaultLanguage&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;c#&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;batch&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;targetFramework&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;4.0&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;optimizeCompilations&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background: white; color: red; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;tempDirectory&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background: white; color: black; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvW2T-qzvA3bxHn33rKefZLroRtobfvQ5YEHJ68CL83EzNStWpCoo3kptTCfzh4HSljWVeiqk2AGl3tSU3JT0Oy4JFINMgmDOYX2Tz8HhHi-CeBukwZtms31tINLYzcmf8O3J6zkKuiJik/s1600/Image1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvW2T-qzvA3bxHn33rKefZLroRtobfvQ5YEHJ68CL83EzNStWpCoo3kptTCfzh4HSljWVeiqk2AGl3tSU3JT0Oy4JFINMgmDOYX2Tz8HhHi-CeBukwZtms31tINLYzcmf8O3J6zkKuiJik/s1600/Image1.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;
&lt;span style=&quot;mso-fareast-font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;3.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Right
click the project node in Solution Explorer and select the LAST menu item or
option called “Properties”&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;mso-fareast-language: EN-IN;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
a. Then select the “Web” tab on the left and scroll down to “Servers” portion
on the right &lt;br /&gt;
b. Select the radio button named “Use Local IIS WebServer”&lt;br /&gt;
c. In the textbox&amp;nbsp; for “Project Url” enter the path of your store as seen
below and then save it (CTRL+S)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7oZqfHeUStXd6DnWy9-KWnWAvKzrffaYcgapnm3-XuTR9UXw18uq-blSlmsVbvmGydxLjFEDi1iBsFYVs3xDkUcevZph76qN9mjrD3U9jSh6vihMm4cHNMJ7igJobmJusS5Y_vN-JhYlK/s1600/Image2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;512&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7oZqfHeUStXd6DnWy9-KWnWAvKzrffaYcgapnm3-XuTR9UXw18uq-blSlmsVbvmGydxLjFEDi1iBsFYVs3xDkUcevZph76qN9mjrD3U9jSh6vihMm4cHNMJ7igJobmJusS5Y_vN-JhYlK/s640/Image2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot;&gt;
&lt;span style=&quot;mso-fareast-language: EN-IN;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;
&lt;span style=&quot;mso-fareast-font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;4.&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Select
Page Inspector as your default web client like this :&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbQQqjWdjxDqxqZVQ7IONgZC0_1uaApngYnDj_iN6Vr7mxqrlzcltayu1EgVcUcOrgXIwfzjWQVgQniR-ZBp9qA5jPFRRC-ewKEkjLekLoBwjbT-hkR5qAzFNxR6Ii4g73890YXagvl9jI/s1600/Image3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;346&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbQQqjWdjxDqxqZVQ7IONgZC0_1uaApngYnDj_iN6Vr7mxqrlzcltayu1EgVcUcOrgXIwfzjWQVgQniR-ZBp9qA5jPFRRC-ewKEkjLekLoBwjbT-hkR5qAzFNxR6Ii4g73890YXagvl9jI/s640/Image3.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;mso-fareast-language: EN-IN;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The project should now build and you should see your
homepage in the page inspector.&amp;nbsp; It will take some time to load the site
since it has to load all the debug symbols. Patience is a virtue :) .&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://musingsandshouts.blogspot.com/2012/11/visual-studio-2010-has-very-nice.html</link><author>noreply@blogger.com (Aslam Shareef )</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvW2T-qzvA3bxHn33rKefZLroRtobfvQ5YEHJ68CL83EzNStWpCoo3kptTCfzh4HSljWVeiqk2AGl3tSU3JT0Oy4JFINMgmDOYX2Tz8HhHi-CeBukwZtms31tINLYzcmf8O3J6zkKuiJik/s72-c/Image1.jpg" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-5691402987544799854</guid><pubDate>Thu, 01 Nov 2012 12:57:00 +0000</pubDate><atom:updated>2012-11-01T18:29:15.936+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">MVC3</category><category domain="http://www.blogger.com/atom/ns#">Role Provider</category><category domain="http://www.blogger.com/atom/ns#">win8</category><category domain="http://www.blogger.com/atom/ns#">Windows8</category><title>Windows8 and MVC3 - : You must call the &quot;WebSecurity.InitializeDatabaseFile&quot; or &quot;WebSecurity.InitializeDatabaseConnection&quot; method before you call any other method of the &quot;WebSecurity&quot; class. SOURCE: WebMatrix.WebData</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Recently we deployed our MVC3 web application on a spanking new windows 8 Machine. Now this application is pretty huge. Everything seemed to be working fine until a user tried to login. He got an HTTP 500 error.&lt;br /&gt;
Looking at the log file i found this :&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #1f497d; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-ansi-language: EN-US;&quot;&gt;You must call the
&quot;WebSecurity.InitializeDatabaseFile&quot; or
&quot;WebSecurity.InitializeDatabaseConnection&quot; method before you call any
other method of the &quot;WebSecurity&quot; class. SOURCE: WebMatrix.WebData
FORM: QUERYSTRING: flowdecision=6%2c2 TARGETSITE: Void VerifyInitialized()
STACKTRACE: at WebMatrix.WebData.SimpleRoleProvider.VerifyInitialized()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #1f497d; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-ansi-language: EN-US;&quot;&gt;at
WebMatrix.WebData.SimpleRoleProvider.GetRolesForUser(String username)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span lang=&quot;EN-US&quot; style=&quot;color: #1f497d; font-family: &amp;quot;Trebuchet MS&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-ansi-language: EN-US; mso-bidi-font-family: Calibri; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-IN; mso-fareast-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;at
System.Web.Security.RolePrincipal.IsInRole(String role)&lt;/span&gt;&amp;nbsp;.....&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I was surprised to say the least! I knew we were using a custom Role provider, so what was surprising was the first line in the Stack Trace :&lt;br /&gt;
&lt;span style=&quot;color: #1f497d; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px;&quot;&gt;WebMatrix.WebData.SimpleRoleProvider.VerifyInitialized()&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Where on earth did this come from? What was making the application use SimpleRoleProvider instead of our custom role provider? I rechecked the web.config entry for the Role Provider and it was as it should be. After some research&amp;nbsp;i found that you need to add the following to your &lt;appsettings&gt; section in Web.Config :&lt;/appsettings&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;add key=&quot;enableSimpleMembership&quot; value=&quot;false&quot;&gt;&lt;/add&gt;&lt;add key=&quot;enableSimpleMembership&quot; value=&quot;false&quot;&gt;&lt;/add&gt;&amp;lt; add key=&quot;enableSimpleMembership&quot; value=&quot;false&quot; /&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
... And BAM! All was well with the world again :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info read this post by Brock Allen :&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://brockallen.com/2011/06/01/beware-bin-deployment-of-mvc-and-razor-with-formsauthentication/&quot;&gt;http://brockallen.com/2011/06/01/beware-bin-deployment-of-mvc-and-razor-with-formsauthentication/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><link>http://musingsandshouts.blogspot.com/2012/11/windows8-and-mvc3-you-must-call.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-2942396807372297467</guid><pubDate>Thu, 01 Nov 2012 07:03:00 +0000</pubDate><atom:updated>2012-11-01T12:35:56.631+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Install</category><category domain="http://www.blogger.com/atom/ns#">MVC3</category><category domain="http://www.blogger.com/atom/ns#">Windows8</category><title>Installing MVC3 on windows 8 throws an error!</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
A friend of mine approached me with a weird problem. He was installing MVC3 on Windows 8 and it was failing. He tried to run it as an administrator but to no avail.&lt;br /&gt;
After checking the installation log file i found that that it was not able to access some directory.&lt;br /&gt;
To solve the problem you need to remove the TRAILING slash from the following two registry values :&lt;br /&gt;
&lt;br /&gt;
Press WIN+R or click on START &amp;gt; Run and then type &quot;regedit&quot; (without the quotes). Then browse to the following locations&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0\&lt;b&gt;Path&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ASP.NET\4.0.30319\&lt;b&gt;Path&lt;/b&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
The value of &lt;b&gt;Path&lt;/b&gt; is the physical path of your Framework 4.0 directory so it will look something like this :&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319&lt;span style=&quot;background-color: red; color: white;&quot;&gt;\&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
remove the LAST back-slash so that it now looks like&amp;nbsp;&lt;b&gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Now you can install MVC3.&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Do remember to set the backslash again AFTER the installation.&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://musingsandshouts.blogspot.com/2012/11/installing-mvc3-on-windows-8-throws.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-5533327301881929181</guid><pubDate>Sat, 21 Apr 2012 10:59:00 +0000</pubDate><atom:updated>2013-04-24T23:45:25.110+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">MVC</category><category domain="http://www.blogger.com/atom/ns#">nopcommerce</category><category domain="http://www.blogger.com/atom/ns#">telerik grid</category><title>NopCommerce and EF Circular reference while serializing</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;font-family: inherit;&quot;&gt;
Working on NopCommerce 2.5 I came across an error : &lt;/div&gt;
&lt;h4 style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: black; font-family: Georgia, &#39;Bitstream Charter&#39;, serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;




&lt;i style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;A circular reference was detected while serializing an object of type ‘System.Data.Entity.DynamicProxies.....&lt;/i&gt;&lt;/h4&gt;
&lt;div style=&quot;background-color: white; border-width: 0px; clear: both; color: black; font-family: inherit; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin: 0px 0px 20px; orphans: 2; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Resolution&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;i style=&quot;background-color: transparent; border-width: 0px; font-style: italic; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;:&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;1. Create a viewmodel/model or essentially a class with the properties which your current return object/ entity object would contain. &lt;br /&gt;2. Use Linq to fire a select and transform the Entity object to an anonymous object. Like this :&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-width: 0px; clear: both; color: black; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin: 0px 0px 20px; orphans: 2; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;&quot;&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;[HttpPost, GridAction]&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public ActionResult _CountryAjax(GridCommand command)&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var allCountries = (IList&lt;country&gt;)_httpContext.Cache.Get(&quot;NOP.ALL.COUNTRIES&quot;);&lt;/country&gt;&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (allCountries == null)&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; allCountries = _countryService.GetAllCountries();&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _httpContext.Cache.Add(&quot;NOP.ALL.COUNTRIES&quot;, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; allCountries,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; null,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cache.NoAbsoluteExpiration,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TimeSpan.FromMinutes(20.0D),&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CacheItemPriority.Normal,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; null);&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var gridModel = new GridModel&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data = allCountries.Select(x =&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;i&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt; new {&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;i&gt;&lt;b&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; Name = x.Name,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;i&gt;&lt;b&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ThreeLetterIsoCode = x.ThreeLetterIsoCode,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;i&gt;&lt;b&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Id=x.Id&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;i&gt;&lt;b&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;background-color: transparent; border-width: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Total = allCountries.Count()&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new JsonResult&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data = gridModel&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/span&gt;&lt;br style=&quot;font-family: inherit;&quot; /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;i style=&quot;background-color: transparent; border-width: 0px; font-style: italic; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
</description><link>http://musingsandshouts.blogspot.com/2012/04/nopcommerce-and-ef-circular-reference.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-3787865845166427632</guid><pubDate>Sat, 03 Mar 2012 11:55:00 +0000</pubDate><atom:updated>2012-03-03T21:47:01.311+05:30</atom:updated><title>I hope nothing bad happens to me !</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Last night, while returning with my colleague from a dinner party organized by my company, I was stopped by two policemen in uniform. I was riding my Hero Honda Karizma. It was around 10:30 PM and the road was almost empty. They gestured for me to stop. One of them took out what looked like a notebook and pen while the other asked me for my driving license. While i was reaching into my wallet to retrieve the license, the policeman with the notebook took down my vehicle number and make. &quot;Standard checking procedure&quot;, I thought. Then I handed my license to the other policeman. He started dictating my address to the other policeman. &quot;Weird, they don&#39;t take down addresses even during checking&quot;, I thought. Then the first cop asked me for my telephone number. &quot;That&#39;s very very weird...&quot; but since they were in uniform and its best not to antagonize cops, i gave them my cell number. Then they let me go.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Now, i am kinda scared, because i have heard stories of innocent people being killed in fake encounters and then being branded as terrorists just to show that the Police is doing its work. Point being the &lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Ishrat_Jahan_encounter_case&quot;&gt;Ishrat Jahan&lt;/a&gt; &lt;/span&gt;&lt;/b&gt;case  and &lt;a href=&quot;http://en.wikipedia.org/wiki/Sohrabuddin_Sheikh_fake_encounter&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;b&gt;Shorabuddin Fake Encounter&lt;/b&gt;&lt;/span&gt;&lt;/a&gt; in Gujarat.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;So if you see in the news that a fake&quot;encounter&quot; involving me has occured, then you know that you have to call the TV channels and give them this link to expose the lies :).&lt;/div&gt;</description><link>http://musingsandshouts.blogspot.com/2012/03/i-hope-nothing-bad-happens-to-me.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-1885476430517058582</guid><pubDate>Tue, 03 Jan 2012 07:39:00 +0000</pubDate><atom:updated>2012-01-03T13:15:23.186+05:30</atom:updated><title>Samsung Note - Good,Weired and Bad Experiences</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Just bought my Samsung Note and I was completely bowled over by its massive screen size. That, in itself, is enough reason to buy the Note. Add to it a 1.4GHz dual core processor and awesome handwriting recognition with the S-Pen and you&#39;ll have the techies drooling all over the floor :) .&lt;br /&gt;
&lt;br /&gt;
One thing I did not understand was when I fired up my Note for the first time and after signing into my google account, the wallpaper which I had set for my (now lost) Samsung S-II automatically was downloaded and set for me on the new note ! HOW? I mean, I had never taken a backup of my wallpaper so how did google know that this was my wallpaper of choice? &amp;nbsp;Weird&amp;nbsp;and scary too.&lt;br /&gt;
&lt;br /&gt;
I have always fancied the CRT animation in custom ROMs where, when you press the power button once to put the phone on standby, the screen collapses from top and bottom to finally become a thin white line before the screen blacks out. To that effect, i found a thread on XDA developers forum where the thread originator had two files framework-res.apk which is supposed to go into the /system/framework folder. For this I had to root my phone. I did that. And replaced the said file. Then all hell broke loose. My icons changed to weird colors and my screen essentially went crappy. Not to mention that it started sort of hanging . So i rebooted the phone. The silliest mistake EVER!. My phone went into a boot-loop. It used to startup, show my home screen and then reboot in 10 seconds. And this it used to keep on doing endlessly until i yanked the battery out in frustration. I broke into cold sweat realizing that my phone is done for good since the file that needs to be replaced was in the android SYSTEM folder. How was I to replace the stock (original framework-res.apk, assuming i could find it somewhere ) file back into that folder without the phone actually working? I went into download mode. Nothing. Then i went into recovery mode but for some reason CWM recovery will only allow you to install ZIP files and not copy files from one folder to another.&lt;br /&gt;
I decided to flash a custom ROM so that atleast i could have my phone working. It turned out that the ROM zip was 500MB. So while i was waiting for it to download, i decided to search for a stock or close-to-stock version of the APK in question. Luckily I found another thread on XDA for my kernel version. I downloaded it. Now the only thing remaining to do was find a way to place the file back into the /SYSTEM/FRAMEWORK folder. Then i remembered that i had seen ADB a few days ago in Adnroid SDK while i was developing a security application for myself. ADB is a small command line application which lets you send commands to your phone. &amp;nbsp;Commands include, reboot into download mode, boot into recovery mode, etc... One command caught my eye. PUSH. it is used to copy files TO the device. My heart jumped with elation. This might just work!... I unzipped the downloaded file and extracted the framework-res.apk file on my computer, fired up cmd.exe (yes i am on Windows 7) , and ran the following commands :&lt;br /&gt;
&lt;br /&gt;
adb &lt;b&gt;reboot &lt;/b&gt;&lt;i&gt;recovery&lt;/i&gt;&lt;br /&gt;
adb &lt;b&gt;push &lt;/b&gt;&lt;i&gt;framework-res.apk&lt;/i&gt; &lt;b&gt;/system/framework&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
With blood pounding in my ears...I entered the final command :&lt;br /&gt;
&lt;br /&gt;
adb &lt;b&gt;reboot&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
and waited....&lt;br /&gt;
&lt;br /&gt;
The phone showed the boot animation, then the home screen came up, and i closed my eyes, almost afraid to hear the familiar reboot sound. 10 seconds, 15 seconds, 20 seconds, nothing... I opened my eyes and threw my hands up in the air and literally jumped for joy! My phone was back !.. How AWESOME is that ?!!&lt;br /&gt;
&lt;br /&gt;
But a lesson well learnt. Always check the kernel number before adding partial mods and more importantly install CWM and backup your entire system in the event of a failure like this one.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</description><link>http://musingsandshouts.blogspot.com/2012/01/samsung-note-goodweired-and-bad.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-7810830019956868106</guid><pubDate>Mon, 26 Dec 2011 06:08:00 +0000</pubDate><atom:updated>2012-02-09T11:58:00.289+05:30</atom:updated><title>Sorting on a dynamic field in LinQ</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;WordSection1&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;Heres a quick and small LinQ extension for sorting on a dynamic parameter.&amp;nbsp; Usually you would use something like this to sort :&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;source.OrderBy(x =&amp;gt; x.SomeFieldOrColumn);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;But if you did not know what&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt; &lt;/span&gt; &lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;“SomeFieldOrColumn” &lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;is at design time (like allowing a user to sort on any column of a grid on the UI) then the following extension will be helpful.&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt; LinqExtensions&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt; IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; OrderByDynamic&amp;lt;T&amp;gt;(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt; IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; source, &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; propertyName, &lt;span style=&quot;color: #2b91af;&quot;&gt;SortDirection&lt;/span&gt; direction = &lt;span style=&quot;color: #2b91af;&quot;&gt; SortDirection&lt;/span&gt;.Ascending)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (direction == &lt;span style=&quot;color: #2b91af;&quot;&gt;SortDirection&lt;/span&gt;.Ascending)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; source.OrderBy(x =&amp;gt; x.GetType().GetProperty(propertyName).GetValue(x, &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;else&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; source.OrderByDescending(x =&amp;gt; x.GetType().GetProperty(propertyName).GetValue(x, &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;Hope this helps !&lt;/span&gt;&lt;span style=&quot;color: #1f497d;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://musingsandshouts.blogspot.com/2011/12/sorting-on-dynamic-field-in-linq.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-786116187374883881</guid><pubDate>Sat, 30 Jul 2011 08:10:00 +0000</pubDate><atom:updated>2012-02-09T11:56:52.369+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Manners</category><category domain="http://www.blogger.com/atom/ns#">Quran</category><category domain="http://www.blogger.com/atom/ns#">Ramadan</category><category domain="http://www.blogger.com/atom/ns#">Ramzaan</category><title>60 Tips from the Holy Quran</title><description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;Section1&quot;&gt;&lt;div&gt;&lt;div style=&quot;border-top: solid #B5C4DF 1.0pt; border: none; padding: 3.0pt 0in 0in 0in;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;float: left; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitAJ027M_eUKhXcqdmFJuvFStlnAhEJoIAHXBL4Gpt1KZolXBxKj7mE8z5k6sd-0hjzWrruGQOnjBXL8mLq9mxohUXUsOJZEYuCinSsgPqSb-vQow-_IFigmmjvBU1H1HMfdVc5sXgNZY2/s1600/quran.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitAJ027M_eUKhXcqdmFJuvFStlnAhEJoIAHXBL4Gpt1KZolXBxKj7mE8z5k6sd-0hjzWrruGQOnjBXL8mLq9mxohUXUsOJZEYuCinSsgPqSb-vQow-_IFigmmjvBU1H1HMfdVc5sXgNZY2/s1600/quran.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;  &lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;1. Respect and honour all human beings irrespective of their religion, colour, race, sex, language, status,  property, birth, &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;profession/job and so on [ Chapter:17/Verse:70 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;2. Talk straight, to the point, without any ambiguity or deception [ Chapter:33/Verse:70 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;3. Choose best words to speak and say them in the best possible way [ Chapter:17/Verse:53 ,  Chapter:2/Verse:83 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;4. Do not shout. Speak politely keeping your voice low. [ Chapter:31/Verse:19 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;5. Always speak the truth. Shun (avoid/reject) words that are deceitful (deceiving/dishonest) and ostentatious (showy/flamboyant) [ Chapter:22/Verse:30 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;6. Do not confound (confuse/mix) truth with falsehood [ Chapter:2/Verse:42 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;7. Say with your mouth what is in your heart [ Chapter:3/Verse:167 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;8. Speak in a civilised manner in a language that is recognised by the society and is commonly used [ Chapter:4/Verse:5 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;9. When you voice an opinion, be just, even if it is against a relative [ Chapter:6/Verse:152 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;10. Do not be a bragging (immodest) boaster (show off)  [ Chapter:31/Verse:18 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;11. Do not talk, listen or do anything vain (useless) [ Chapter:23/Verse:3 ,  Chapter:28/Verse:55 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;12. Do not participate in any paltry (worthless). If you pass near a futile (useless) play, then pass by with dignity [ Chapter:25/Verse:72 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;13. Do not verge  upon any immodesty or lewdness (vulgarity) whether surreptitious (secret) or overt (clear/open) [ Chapter:6/Verse:151 ].&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;14. If, unintentionally, any misconduct occurs by you, then correct yourself expeditiously [ Chapter:3/Verse:134 ].&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;15. Do not be contemptuous (disapproving) or arrogant with people [ Chapter:31/Verse:18 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;16. Do not walk haughtily (proudly) or with conceit (arrogance) [ Chapter:17/Verse:37 ,  Chapter:31/Verse:18 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;17. Be moderate in thy (your) pace [ Chapter:31/Verse:19 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;18. Walk with humility (modestly) and sedateness (seriousness/thoughtfulness) [ Chapter:25/Verse:63 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;19. Keep your gazes lowered devoid of any lecherous (lewdness) leers (lustful look) and salacious (scandalous) stares [ Chapter:24/Verse:30 -31,  Chapter:40/Verse:19 ].&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;20. If you do not have complete knowledge about anything, better keep your mouth shut. You might think that speaking about something &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;without full knowledge is a trivial matter. But it might have grave consequences [ Chapter:24/Verse:15 -16]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;21. When you hear something malicious about someone, keep a favourable view about him/her until you attain full knowledge about &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;the matter. Consider others innocent until they are proven guilty with solid and truthful evidence [ Chapter:24/Verse:12 -13]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;22. Ascertain the truth of any news, lest you smite (slash) someone in ignorance and afterwards repent of what you did [ Chapter:49/Verse:6 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;23. Do not follow blindly any information of which you have no direct knowledge. (Using your faculties of perception and conception) you must verify it for yourself. In the Court of your Lord, you will be held accountable for your hearing, sight, and the faculty of reasoning [ Chapter:17/Verse:36 ].&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;24. Never think that you have reached the final stage of knowledge and nobody knows more than yourself. Remember! Above everyone &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;endowed with knowledge is another endowed with more knowledge [ Chapter:12/Verse:76 ]. Even the Prophet [p.b.u.h] was asked to keep praying, &quot;O My sustainer! Advance me in knowledge.&quot; [Chapter : 20 / Verse : 114]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;25. The believers are but a single Brotherhood. Live like members of one family, brothers and sisters unto one another [ Chapter:49/Verse:10 ].&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;26. Do not make mockery (make to look silly) of others or ridicule (laugh at) others [ Chapter:49/Verse:11 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;27. Do not defame (insult/slander) others [ Chapter:49/Verse:11 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;28. Do not insult others by nicknames [ Chapter:49/Verse:11 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;29. Avoid suspicion and guesswork. Suspicion and guesswork might deplete your communal energy [ Chapter:49/Verse:12 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;30. Spy not upon one another [ Chapter:49/Verse:12 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;31. Do not backbite one another [ Chapter:49/Verse:12 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;32. When you meet each other, offer good wishes and blessings for safety. One who conveys to you a message of safety and security and &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;also when a courteous greeting is offered to you, meet it with a greeting still more courteous or (at least) of equal courtesy [ Chapter:4/Verse:86 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;33. When you enter your own home or the home of somebody else, compliment the inmates [ Chapter:24/Verse:61 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;34. Do not enter houses other than your own until you have sought permission; and then greet the inmates and wish them a life of &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;blessing, purity and pleasure [ Chapter:24/Verse:27 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;35. Treat kindly -Your parents-Relatives-The orphans-And those who have been left alone in the society [ Chapter:4/Verse:36 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;36. Take care of -The needy,-The disabled-Those whose hard earned income is insufficient to meet their needs-And those whose &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;businesses have stalled -And those who have lost their jobs. [ Chapter:4/Verse:36 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;37. Treat kindly -Your related neighbours, and unrelated neighbours-Companions by your side in public gatherings, or public &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;transportation. [ Chapter:4/Verse:36 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;38. Be generous to the needy wayfarer, the homeless son of the street and the one who reaches you in a destitute (needy) condition [ Chapter:4/Verse:36 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;39. Be nice to people who work under your care. [ Chapter:4/Verse:36 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;40. Do not follow up what you have given to others to afflict them with reminders of your generosity [ Chapter:2/Verse:262 ].&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;41. Do not expect a return for your good behaviour, not even thanks [ Chapter:76/Verse:9 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;42. Cooperate with one another in good deeds and do not cooperate with others in evil and bad matters [ Chapter:5/Verse:2 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;43. Do no try to impress people on account of self-proclaimed virtues [ Chapter:53/Verse:32 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;44. You should enjoin right conduct on others but mend your own ways first. Actions speak louder than words. You must first practice &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;good deeds yourself, then preach [ Chapter:2/Verse:44 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;45. Correct yourself and your families first [before trying to correct others] [ Chapter:66/Verse:6 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;46. Pardon gracefully if anyone among you who commits a bad deed out of ignorance, and then repents and amends [ Chapter:6/Verse:54 ,  Chapter:3/Verse:134 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;47. Divert and sublimate (redirect) your anger and potentially virulent (dangerous/bitter) emotions to creative energy, and become &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;a source of tranquillity and comfort to people [ Chapter:3/Verse:134 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;48. Call people to the Way of your Lord with wisdom and beautiful exhortation (intended to urge). Reason with them most decently [ Chapter:16/Verse:125 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;49. Leave to themselves those who do not give any importance to the Divine code and have adopted and consider it as mere play and &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;amusement [ Chapter:6/Verse:70 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;50. Sit not in the company of those who ridicule Divine Law unless they engage in some other conversation [ Chapter:4/Verse:140 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;51. Do not be jealous of those who are blessed [ Chapter:4/Verse:54 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;52. In your collective life, make rooms for others [ Chapter:58/Verse:11 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;53. When invited to dine, go at the appointed time. Do not arrive too early to wait for the preparation of meal or linger after eating to &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;engage in bootless (useless/unimportant) babble (chat). Such things may cause inconvenience to the host [ Chapter:33/Verse:53 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;54. Eat and drink [what is lawful] in moderation [ Chapter:7/Verse:31 ].&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;55. Do not squander (misuse) your wealth senselessly [ Chapter:17/Verse:26 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;56. Fulfil your promises and commitments [ Chapter:17/Verse:34 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;57. Keep yourself clean, pure [ Chapter:9/Verse:108 ,  Chapter:4/Verse:43 ,  Chapter:5/Verse:6 ].&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;58. Dress-up in agreeable attire and adorn yourself with exquisite character from inside out [ Chapter:7/Verse:26 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;59. Seek your provision only by fair endeavour [ Chapter:29/Verse:17 ,  Chapter:2/Verse:188 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;60. Do not devour the wealth and property of others unjustly, nor bribe the officials or the judges to deprive others of their &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;color: #000;&quot;&gt;possessions [ Chapter:2/Verse:188 ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Note: The above points are some of the lessons learnt from Quran that apply to our general living. In the end, the verses of Quran from which the lesson is drawn is given.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://musingsandshouts.blogspot.com/2011/07/re-60-tips-from-holy-quran.html</link><author>noreply@blogger.com (Aslam Shareef )</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitAJ027M_eUKhXcqdmFJuvFStlnAhEJoIAHXBL4Gpt1KZolXBxKj7mE8z5k6sd-0hjzWrruGQOnjBXL8mLq9mxohUXUsOJZEYuCinSsgPqSb-vQow-_IFigmmjvBU1H1HMfdVc5sXgNZY2/s72-c/quran.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-7802457936640191662</guid><pubDate>Sun, 22 May 2011 18:03:00 +0000</pubDate><atom:updated>2011-05-22T23:36:48.089+05:30</atom:updated><title></title><description>To generate insert statements for data in a particular table use the following stored procedure. You will have to, of course, first create it in your database :)&lt;br /&gt;&lt;br /&gt;SET QUOTED_IDENTIFIER OFF&lt;br /&gt;GO&lt;br /&gt;SET ANSI_NULLS ON&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;drop   PROC InsertGenerator&lt;br /&gt;go&lt;br /&gt;&lt;br /&gt;CREATE PROC InsertGenerator&lt;br /&gt;(@tableName varchar(100)) as&lt;br /&gt;&lt;br /&gt;--Declare a cursor to retrieve column specific information for the specified table&lt;br /&gt;DECLARE cursCol CURSOR FAST_FORWARD FOR&lt;br /&gt;SELECT column_name,data_type FROM information_schema.columns WHERE table_name = @tableName&lt;br /&gt;OPEN cursCol&lt;br /&gt;DECLARE @string nvarchar(3000) --for storing the first half of INSERT statement&lt;br /&gt;DECLARE @stringData nvarchar(3000) --for storing the data (VALUES) related statement&lt;br /&gt;DECLARE @dataType nvarchar(1000) --data types returned for respective columns&lt;br /&gt;SET @string=&#39;INSERT &#39;+@tableName+&#39;(&#39;&lt;br /&gt;SET @stringData=&#39;&#39;&lt;br /&gt;&lt;br /&gt;DECLARE @colName nvarchar(50)&lt;br /&gt;&lt;br /&gt;FETCH NEXT FROM cursCol INTO @colName,@dataType&lt;br /&gt;&lt;br /&gt;IF @@fetch_status&amp;lt;&amp;gt;0&lt;br /&gt;   begin&lt;br /&gt;   print &#39;Table &#39;+@tableName+&#39; not found, processing skipped.&#39;&lt;br /&gt;   close curscol&lt;br /&gt;   deallocate curscol&lt;br /&gt;   return&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;WHILE @@FETCH_STATUS=0&lt;br /&gt;BEGIN&lt;br /&gt;IF @dataType in (&#39;varchar&#39;,&#39;char&#39;,&#39;nchar&#39;,&#39;nvarchar&#39;)&lt;br /&gt;BEGIN&lt;br /&gt;   --SET @stringData=@stringData+&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;+isnull(&#39;+@colName+&#39;,&#39;&#39;&#39;&#39;)+&#39;&#39;&#39;&#39;&#39;&#39;,&#39;&#39;+&#39;&lt;br /&gt;   SET @stringData=@stringData+&#39;&#39;&#39;&#39;+&#39;&#39;&#39;+isnull(&#39;&#39;&#39;&#39;&#39;+&#39;&#39;&#39;&#39;&#39;+&#39;+@colName+&#39;+&#39;&#39;&#39;&#39;&#39;+&#39;&#39;&#39;&#39;&#39;,&#39;&#39;NULL&#39;&#39;)+&#39;&#39;,&#39;&#39;+&#39;&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;if @dataType in (&#39;text&#39;,&#39;ntext&#39;) --if the datatype is text or something else&lt;br /&gt;BEGIN&lt;br /&gt;   SET @stringData=@stringData+&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;+isnull(cast(&#39;+@colName+&#39; as varchar(2000)),&#39;&#39;&#39;&#39;)+&#39;&#39;&#39;&#39;&#39;&#39;,&#39;&#39;+&#39;&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;IF @dataType = &#39;money&#39; --because money doesn&#39;t get converted from varchar implicitly&lt;br /&gt;BEGIN&lt;br /&gt;   SET @stringData=@stringData+&#39;&#39;&#39;convert(money,&#39;&#39;&#39;&#39;&#39;&#39;+isnull(cast(&#39;+@colName+&#39; as varchar(200)),&#39;&#39;0.0000&#39;&#39;)+&#39;&#39;&#39;&#39;&#39;&#39;),&#39;&#39;+&#39;&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;IF @dataType=&#39;datetime&#39;&lt;br /&gt;BEGIN&lt;br /&gt;   --SET @stringData=@stringData+&#39;&#39;&#39;convert(datetime,&#39;&#39;&#39;&#39;&#39;&#39;+isnull(cast(&#39;+@colName+&#39; as varchar(200)),&#39;&#39;0&#39;&#39;)+&#39;&#39;&#39;&#39;&#39;&#39;),&#39;&#39;+&#39;&lt;br /&gt;   --SELECT &#39;INSERT Authorizations(StatusDate) VALUES(&#39;+&#39;convert(datetime,&#39;+isnull(&#39;&#39;&#39;&#39;+convert(varchar(200),StatusDate,121)+&#39;&#39;&#39;&#39;,&#39;NULL&#39;)+&#39;,121),)&#39; FROM Authorizations&lt;br /&gt;   --SET @stringData=@stringData+&#39;&#39;&#39;convert(money,&#39;&#39;&#39;&#39;&#39;&#39;+isnull(cast(&#39;+@colName+&#39; as varchar(200)),&#39;&#39;0.0000&#39;&#39;)+&#39;&#39;&#39;&#39;&#39;&#39;),&#39;&#39;+&#39;&lt;br /&gt;   SET @stringData=@stringData+&#39;&#39;&#39;convert(datetime,&#39;+&#39;&#39;&#39;+isnull(&#39;&#39;&#39;&#39;&#39;+&#39;&#39;&#39;&#39;&#39;+convert(varchar(200),&#39;+@colName+&#39;,121)+&#39;&#39;&#39;&#39;&#39;+&#39;&#39;&#39;&#39;&#39;,&#39;&#39;NULL&#39;&#39;)+&#39;&#39;,121),&#39;&#39;+&#39;&lt;br /&gt; --                             &#39;convert(datetime,&#39;+isnull(&#39;&#39;&#39;&#39;+convert(varchar(200),StatusDate,121)+&#39;&#39;&#39;&#39;,&#39;NULL&#39;)+&#39;,121),)&#39; FROM Authorizations&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;IF @dataType=&#39;image&#39;&lt;br /&gt;BEGIN&lt;br /&gt;   SET @stringData=@stringData+&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;+isnull(cast(convert(varbinary,&#39;+@colName+&#39;) as varchar(6)),&#39;&#39;0&#39;&#39;)+&#39;&#39;&#39;&#39;&#39;&#39;,&#39;&#39;+&#39;&lt;br /&gt;END&lt;br /&gt;ELSE --presuming the data type is int,bit,numeric,decimal&lt;br /&gt;BEGIN&lt;br /&gt;   --SET @stringData=@stringData+&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;+isnull(cast(&#39;+@colName+&#39; as varchar(200)),&#39;&#39;0&#39;&#39;)+&#39;&#39;&#39;&#39;&#39;&#39;,&#39;&#39;+&#39;&lt;br /&gt;   --SET @stringData=@stringData+&#39;&#39;&#39;convert(datetime,&#39;+&#39;&#39;&#39;+isnull(&#39;&#39;&#39;&#39;&#39;+&#39;&#39;&#39;&#39;&#39;+convert(varchar(200),&#39;+@colName+&#39;,121)+&#39;&#39;&#39;&#39;&#39;+&#39;&#39;&#39;&#39;&#39;,&#39;&#39;NULL&#39;&#39;)+&#39;&#39;,121),&#39;&#39;+&#39;&lt;br /&gt;   SET @stringData=@stringData+&#39;&#39;&#39;&#39;+&#39;&#39;&#39;+isnull(&#39;&#39;&#39;&#39;&#39;+&#39;&#39;&#39;&#39;&#39;+convert(varchar(200),&#39;+@colName+&#39;)+&#39;&#39;&#39;&#39;&#39;+&#39;&#39;&#39;&#39;&#39;,&#39;&#39;NULL&#39;&#39;)+&#39;&#39;,&#39;&#39;+&#39;&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;SET @string=@string+@colName+&#39;,&#39;&lt;br /&gt;&lt;br /&gt;FETCH NEXT FROM cursCol INTO @colName,@dataType&lt;br /&gt;END&lt;br /&gt;DECLARE @Query nvarchar(4000)&lt;br /&gt;&lt;br /&gt;SET @query =&#39;SELECT &#39;&#39;&#39;+substring(@string,0,len(@string)) + &#39;) VALUES(&#39;&#39;+ &#39; + substring(@stringData,0,len(@stringData)-2)+&#39;&#39;&#39;+&#39;&#39;)&#39;&#39; FROM &#39;+@tableName&lt;br /&gt;exec sp_executesql @query&lt;br /&gt;--select @query&lt;br /&gt;&lt;br /&gt;CLOSE cursCol&lt;br /&gt;DEALLOCATE cursCol&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;GO&lt;br /&gt;SET QUOTED_IDENTIFIER OFF&lt;br /&gt;GO&lt;br /&gt;SET ANSI_NULLS ON&lt;br /&gt;GO&lt;br /&gt;&lt;br /&gt;The use it like this :&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SET IDENTITY_INSERT &lt;table-name&gt; ON&lt;/table-name&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;sp_exec InsertGenerator &lt;table-name&gt; &lt;/table-name&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SET IDENTITY_INSERT &lt;table-name&gt; OFF&lt;/table-name&gt;&lt;/span&gt;</description><link>http://musingsandshouts.blogspot.com/2011/05/to-generate-insert-statements-for-data.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-4434245497790838711</guid><pubDate>Fri, 25 Mar 2011 10:59:00 +0000</pubDate><atom:updated>2011-03-25T16:29:30.389+05:30</atom:updated><title>jQuery intellisense in VS2010</title><description>&lt;div class=&quot;WordSection1&quot;&gt; &lt;p class=&quot;MsoNormal&quot;&gt;Now you can have jQuery intelli-sense in external js files. &amp;nbsp;For example if you are writing a &amp;nbsp;FOO.JS and will be including it in your page/master page/ ascx control, then you can simply do the following to have all your jQuery intellisense. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;Note : This is for VS2010 out of the box. For VS2008 you might have to install some update (I am not aware of it at this point).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;Simply drag-n-drop the jQuery library from Solution Explorer to the opened external JavaScript file. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;mso-fareast-language:EN-IN&quot;&gt;&lt;img width=&quot;581&quot; height=&quot;314&quot; id=&quot;Picture_x0020_4&quot; src=&quot;cid:image001.jpg@01CBEB09.48B95690&quot; alt=&quot;Description: image&quot;&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;The Intellisense should work now. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;color:red&quot;&gt;Please note that this line added by Visual Studio should be the VERY FIRST LINE in your file. You should not have even comments before this line.&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&amp;nbsp;&lt;span style=&quot;mso-fareast-language:EN-IN&quot;&gt;&lt;img width=&quot;555&quot; height=&quot;311&quot; id=&quot;Picture_x0020_3&quot; src=&quot;cid:image002.jpg@01CBEB09.48B95690&quot; alt=&quot;Description: image&quot;&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;text-indent:-18.0pt;mso-list:l0 level1 lfo1&quot;&gt;&lt;![if !supportLists]&gt;&lt;span style=&quot;mso-list:Ignore&quot;&gt;-&lt;span style=&quot;font:7.0pt &amp;quot;Times New Roman&amp;quot;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;Aslam&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;/div&gt; </description><link>http://musingsandshouts.blogspot.com/2011/03/jquery-intellisense-in-vs2010.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-3888566963886861564</guid><pubDate>Fri, 04 Mar 2011 12:33:00 +0000</pubDate><atom:updated>2011-03-04T18:03:57.720+05:30</atom:updated><title>Google&#39;s new nemesis - Greplin</title><description>&lt;div class=&quot;WordSection1&quot;&gt; &lt;p class=&quot;MsoNormal&quot;&gt;We all know about google and how simple, easy and fast it is. But google was still &amp;#8220;not there&amp;#8221;. &amp;nbsp;Enter &lt;b&gt;GREPLIN&lt;/b&gt;. This one is the mother of all search engines and takes searching to an altogether new level. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;However, personally I would not use this due to privacy issues :) . &amp;nbsp;But it&amp;#8217;s a matter of personal taste. Come to think of it, even google knows more about you than your wife/ girlfriend / parents. You have google calendar sync which uploads  all your appointment from your email client to google calendar so google knows what you will be doing when. Then there&amp;#8217;s google chrome so google knows what you surf. Then Android OS, so google knows what you install, what sms you receive and send, and on a  GPS enabled phone google can know your location with an accuracy of upto 10 meters at any given point of time! &amp;nbsp;If you use Gmail, google knows your account usernames, passwords, and your contacts. If you use Gtalk, google knows who you talk to and what you  talk about ;) &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;That&amp;#8217;s a hell lot of information about an individual to be available to another person/entity. &amp;nbsp;You might want to think about it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;Anyways, I do respect the developers of GREPLIN for its an awesome piece of software&amp;#8230; too bad its too nosey for my taste&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;Heres the video : &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;a href=&quot;http://vimeo.com/14579806&quot;&gt;http://vimeo.com/14579806&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;And the site : &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;a href=&quot;https://www.greplin.com/&quot;&gt;https://www.greplin.com/&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;text-indent:-18.0pt;mso-list:l0 level1 lfo1&quot;&gt;&lt;![if !supportLists]&gt;&lt;span style=&quot;mso-list:Ignore&quot;&gt;-&lt;span style=&quot;font:7.0pt &amp;quot;Times New Roman&amp;quot;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;Aslam&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;/div&gt; </description><link>http://musingsandshouts.blogspot.com/2011/03/googles-new-nemesis-greplin.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-4809034968557038757</guid><pubDate>Wed, 29 Dec 2010 11:46:00 +0000</pubDate><atom:updated>2010-12-29T17:25:11.345+05:30</atom:updated><title>How to have ASP.NET MVC and webforms co-exist in a single project</title><description>&lt;div class=&quot;WordSection1&quot;&gt; &lt;p class=&quot;MsoNormal&quot;&gt;In some sites,  you might want to keep your webforms site and MVC site together in the same application. With ASP.NET 3.5 web forms also use the routing engine. This is good because now you don’t have to have a multitude  of if else clauses in global.asax to figure out if we need to register/ignore routes based on which kind of site is being accessed. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;So to allow both MVC and webforms, we should let the route registration as is except for the Default route. That’s the only place that you will put an if condition.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;In my case I check the theme of the current site. Not ideal but works &lt;span style=&quot;font-family:Wingdings;&quot;&gt;J&lt;/span&gt;.  I register the default route only if the site is MVC like so :&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:9.5pt;&quot;  &gt;   &lt;span style=&quot;color:blue;&quot;&gt;if&lt;/span&gt; (Application[&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;Theme&quot;&lt;/span&gt;].ToString().ToLower() == &lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;MVCtheme&quot;&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:9.5pt;&quot;  &gt;        {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:9.5pt;&quot;  &gt;            routes.MapRoute(&lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;Default&quot;&lt;/span&gt;, &lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;{controller}/{action}/{name}/{id}&quot;&lt;/span&gt;, &lt;span style=&quot;color:blue;&quot;&gt; new&lt;/span&gt; { controller = &lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;Home&quot;&lt;/span&gt;, action = &lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt; &quot;Index&quot;&lt;/span&gt;, name = &lt;span style=&quot;color: rgb(163, 21, 21);&quot;&gt;&quot;x&quot;&lt;/span&gt;, id = 956});&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot; style=&quot;&quot;&gt;&lt;span style=&quot;;font-family:&amp;quot;;font-size:9.5pt;&quot;  &gt;        }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;That’s it, now you can have both MVC and webforms running off the same code base.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;/div&gt;</description><link>http://musingsandshouts.blogspot.com/2010/12/how-to-have-aspnet-mvc-and-webforms-co.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-5421906376808637684</guid><pubDate>Thu, 25 Nov 2010 09:06:00 +0000</pubDate><atom:updated>2010-11-25T14:37:37.812+05:30</atom:updated><title>Bomb scare near my workplace</title><description>&lt;div class=&quot;WordSection1&quot;&gt; &lt;p class=&quot;MsoNormal&quot;&gt;Just saw a full military unit and police personnel running helter skelter. The entire main road was cordoned off.  Reason : A tip-off that there was a bomb planted in a building adjacent to my office. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;                What stumps me totally is why people do such things. What joy do they get in taking someone else’s life? Why destroy public property?? I know for a fact that NO religion, without exception, teaches violence. Why do we humans  tend to twist and break religion for petty political or social gains is beyond me ! I firmly believe in “Live And Let Live”. People should be understanding and loving. Why create prejudices? Why subjugate communities?? Why oppress fellow humans??? And the  worst part is the MEDIA. They are the culprits, in my opinion. They beat to death a story and keep coining new derogatory terms for specific religions and they thrive on creating mass hysteria, which ultimately gives power in the hands of an intelligent but  evil human who contorts peaceful teachings to ignite anger among the youth. That leads to violence and mayhem. And all this for what?? Some TRPs? So that your newspaper or your new channel is at the top? Why are these media moguls so insensitive to other human’s  suffering and the social stigma that they trigger.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;I hope the world becomes a peaceful place to live in. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoListParagraph&quot; style=&quot;text-indent: -18pt;&quot;&gt;&lt;!--[if !supportLists]--&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt; &lt;p class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt; &lt;/div&gt;</description><link>http://musingsandshouts.blogspot.com/2010/11/bomb-scare-near-my-workplace.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-1663270093542999656</guid><pubDate>Wed, 13 Oct 2010 07:00:00 +0000</pubDate><atom:updated>2010-10-13T12:27:02.696+05:30</atom:updated><title>Walking a tree or data heirarchy using SQL</title><description>&lt;div class=WordSection1&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:12.0pt;mso-fareast-language:EN-IN&#39;&gt;Recently I had a requirement to traverese through an heirarchy of data given a parent node in the heirarchy. The table could contain multiple rootnodes which means there could be multiple trees in the table. To walk the tree I used the following : &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-fareast-language:EN-IN&#39;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-fareast-language:EN-IN&#39;&gt;WITH&lt;/span&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt; categoryheirarchy &lt;span style=&#39;color:gray&#39;&gt;(&lt;/span&gt;categoryid&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt; parentcategoryid&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt; [name]&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt; &lt;span style=&#39;color:blue&#39;&gt;Level&lt;/span&gt;&lt;span style=&#39;color:gray&#39;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-fareast-language:EN-IN&#39;&gt;AS&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;color:gray;mso-fareast-language:EN-IN&#39;&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green;mso-fareast-language:EN-IN&#39;&gt;-- Anchor member definition&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&#39;color:blue&#39;&gt;SELECT&lt;/span&gt; categoryid&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt; parentcategoryid&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt; [name]&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt;&amp;nbsp; 0 &lt;span style=&#39;color:blue&#39;&gt;AS&lt;/span&gt; &lt;span style=&#39;color:blue&#39;&gt;Level&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&#39;color:blue&#39;&gt;FROM&lt;/span&gt; category &lt;span style=&#39;color:blue&#39;&gt;AS&lt;/span&gt; c&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&#39;color:blue&#39;&gt;where&lt;/span&gt; categoryid&lt;span style=&#39;color:gray&#39;&gt;=&lt;/span&gt;923 &lt;span style=&#39;color:green&#39;&gt;&amp;#8211;- 923 is my root node&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&#39;color:blue&#39;&gt;UNION ALL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green;mso-fareast-language:EN-IN&#39;&gt;-- Recursive member definition&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&#39;color:blue&#39;&gt;SELECT&lt;/span&gt; c&lt;span style=&#39;color:gray&#39;&gt;.&lt;/span&gt;categoryid&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt; c&lt;span style=&#39;color:gray&#39;&gt;.&lt;/span&gt;parentcategoryid&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt; c&lt;span style=&#39;color:gray&#39;&gt;.&lt;/span&gt;name&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt;&lt;span style=&#39;color:blue&#39;&gt;Level&lt;/span&gt; &lt;span style=&#39;color:gray&#39;&gt;+&lt;/span&gt; 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&#39;color:blue&#39;&gt;FROM&lt;/span&gt; category &lt;span style=&#39;color:blue&#39;&gt;AS&lt;/span&gt; c&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&#39;color:gray&#39;&gt;INNER&lt;/span&gt; &lt;span style=&#39;color:gray&#39;&gt;JOIN&lt;/span&gt; categoryheirarchy &lt;span style=&#39;color:blue&#39;&gt;AS&lt;/span&gt; d&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&#39;color:blue&#39;&gt;ON&lt;/span&gt; c&lt;span style=&#39;color:gray&#39;&gt;.&lt;/span&gt;parentcategoryid &lt;span style=&#39;color:gray&#39;&gt;=&lt;/span&gt; d&lt;span style=&#39;color:gray&#39;&gt;.&lt;/span&gt;categoryid&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;color:gray;mso-fareast-language:EN-IN&#39;&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;color:green;mso-fareast-language:EN-IN&#39;&gt;-- Statement that executes the CTE&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-fareast-language:EN-IN&#39;&gt;SELECT&lt;/span&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt; categoryid&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt; parentcategoryid&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt; [name]&lt;span style=&#39;color:gray&#39;&gt;,&lt;/span&gt; &lt;span style=&#39;color:blue&#39;&gt;Level&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;color:blue;mso-fareast-language:EN-IN&#39;&gt;FROM&lt;/span&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt; categoryheirarchy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt;Hope this helps&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal style=&#39;text-autospace:none&#39;&gt;&lt;span style=&#39;font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-language:EN-IN&#39;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class=MsoNormal&gt;&lt;span style=&#39;color:#1F497D&#39;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</description><link>http://musingsandshouts.blogspot.com/2010/10/walking-tree-or-data-heirarchy-using.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-663885136748877390</guid><pubDate>Thu, 29 Apr 2010 11:07:00 +0000</pubDate><atom:updated>2010-04-30T19:16:58.698+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.NET MVC Tweaks</category><category domain="http://www.blogger.com/atom/ns#">c#</category><title>ASP.NET MVC - Cancelling a call to ActionMethod</title><description>Suppose you are making a call to an action method using  :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Html.RenderAction&lt;/li&gt;&lt;li&gt;URL as in Ajax or normal browsing&lt;/li&gt;&lt;/ul&gt;And you over ride the OnActionExecuting event (which fires BEFORE any action method is executed). In this event handler, lets say you are checking which controller and which action was fired/called. Based on this you decide that for a particular Action method in a particular controller you need to perform additional checks. And based on those checks you want to either let the program flow normally or abort the execution of the action method code.&lt;br /&gt;The way you can achieve this is by setting the ActionResult property to some non-null value. What this means is :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;br /&gt;  &lt;br /&gt; &lt;span class=&quot;kwrd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; OnActionExecuting(ActionExecutingContext filterContext)&lt;br /&gt; {&lt;br /&gt;     &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (filterContext.ActionDescriptor.ActionName.Equals(&lt;span class=&quot;str&quot;&gt;&quot;SomeActionMethod&quot;&lt;/span&gt;)) &lt;br /&gt;     { &lt;br /&gt;         &lt;span class=&quot;rem&quot;&gt;/*perform your additional check here*/&lt;/span&gt;&lt;br /&gt;         &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt;(something==&lt;span class=&quot;kwrd&quot;&gt;true&lt;/span&gt;)&lt;br /&gt;         {&lt;br /&gt;             &lt;span class=&quot;rem&quot;&gt;/* Cancel /stop the execution of SomeActionMethod. */&lt;/span&gt;&lt;br /&gt;             filterContext.Result = RenderNothing();&lt;br /&gt;             &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt;;&lt;br /&gt;         }&lt;br /&gt;     }&lt;br /&gt;     &lt;span class=&quot;kwrd&quot;&gt;base&lt;/span&gt;.OnActionExecuting(filterContext);&lt;br /&gt; }&lt;br /&gt;  &lt;br /&gt; &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; ActionResult RenderNothing()&lt;br /&gt; {&lt;br /&gt;     &lt;span class=&quot;kwrd&quot;&gt;return&lt;/span&gt; View(&lt;span class=&quot;str&quot;&gt;&quot;EmptyView&quot;&lt;/span&gt;);&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thats it !</description><link>http://musingsandshouts.blogspot.com/2010/04/aspnet-mvc-cancelling-call-to.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-5103925642004713541</guid><pubDate>Mon, 24 Aug 2009 09:29:00 +0000</pubDate><atom:updated>2010-04-30T11:25:46.833+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">Ramadan</category><category domain="http://www.blogger.com/atom/ns#">Ramzaan</category><title>What is Ramzaan or Ramadaan?</title><description>&lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;Just completed my second day of fasting. 28 Days to go :)&lt;br /&gt;Ramadan&lt;/span&gt; is regarded as a Holy month by &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;Muslims&lt;/span&gt;. During this month, 1 billion Muslims around the world fast from Dawn till dusk. Fasting means abstaining from the following :&lt;br /&gt;1. food , water absolutely nothing for the duration of the fast.&lt;br /&gt;2. smoking&lt;br /&gt;3. Lies&lt;br /&gt;4. Slander                     &lt;br /&gt;5. quarrels/fights&lt;br /&gt;6. Promiscuity&lt;br /&gt;&lt;br /&gt;The purpose of &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;Ramadan&lt;/span&gt; is to inculcate a sense of self discipline. The fact that you have to&lt;br /&gt;control your self from indulging in the above &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;in spite&lt;/span&gt; of it being easier to do so, teaches you to&lt;br /&gt;not be a slave of your whims and fancies but to obey the Almighty Creator.&lt;br /&gt;&lt;br /&gt;It also makes us realise and feel what the poor go through each day.How the less fortunate suffer&lt;br /&gt;when they &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;don&#39;t&lt;/span&gt; have enough money to buy food for themselves or their family.  It makes us more thankful to God almighty for all the abundance in blessings he has bestowed upon us without us asking for it.&lt;br /&gt;&lt;br /&gt;The way we fast is we get up at around 4 AM - 5 AM (an hour before dawn) depending on what time dawn breaks in a particular season. Have our food. This is called &quot;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;Saheri&lt;/span&gt;&quot;. We usually have an hour before the first silver streak of dawn weaves across the dark sky.Let me tell you, its very difficult to eat &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;anything&lt;/span&gt; THAT early. You cannot even drink too much water because it will result in indigestion. And anyways, your kidneys will have filtered out the excess water in a couple of hours so &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;there&#39;s&lt;/span&gt; no point in gulping down lots of water. At dawn, the&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; &lt;/span&gt;&lt;a style=&quot;color: rgb(255, 0, 0);&quot; href=&quot;http://en.wikipedia.org/wiki/Muezzin&quot;&gt;&lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;muezzin&lt;/span&gt;&lt;/a&gt; give the call for prayer and we go to the Mosque to pray the day&#39;s first obligatory prayer. After returning from there we get on with our daily tasks as if its a normal day.We abstain from all the above stated elements. At 7:00 PM (or whenever the sunsets in a particular season) we break our fast. This is called &quot;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_9&quot;&gt;Iftaar&lt;/span&gt;&quot;. &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_10&quot;&gt;Iftaar&lt;/span&gt; is always a big &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_11&quot;&gt;sumptuous&lt;/span&gt; affair. Its a massive spread of all seasonal&lt;br /&gt;fruits, an assortment of fried goodies, Juices, &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_12&quot;&gt;Dahi&lt;/span&gt;-&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_13&quot;&gt;wadas&lt;/span&gt; (fried &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_14&quot;&gt;bhajiyas&lt;/span&gt; soaked in curd with a&lt;br /&gt;typical spicy &quot;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_15&quot;&gt;tadka&lt;/span&gt;&quot;) and &lt;span class=&quot;blsp-spelling-corrected&quot; id=&quot;SPELLING_ERROR_16&quot;&gt;at least&lt;/span&gt; two sweet dishes.</description><link>http://musingsandshouts.blogspot.com/2009/08/what-is-ramzaan-or-ramadaan.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-5326792777324350391</guid><pubDate>Mon, 27 Jul 2009 09:56:00 +0000</pubDate><atom:updated>2010-04-30T14:27:56.429+05:30</atom:updated><title>Runtime casting of objects and calling Methods, setting variables etc...</title><description>I was having difficulty trying to close ALL forms on a certain event. So I did this :&lt;br /&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;br /&gt;ArrayList  formContainer = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; ArrayList();&lt;br /&gt;formContainer.Add(frm1);&lt;br /&gt;formContainer.Add(frm2);&lt;br /&gt;formContainer.Add(frm3);&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt;(System.Windows.Form frm &lt;span class=&quot;kwrd&quot;&gt;in&lt;/span&gt; formContainer)&lt;br /&gt;{&lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; ( frm!=&lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt; &amp;amp;&amp;amp; frm.Visible)&lt;br /&gt;    {&lt;br /&gt;       frm.Close();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So far so good. Now however i hit a road block because on the Form_Closing event of each of these forms, I was prompting the user to SAVE the data. There were three action buttons &quot;YES&quot;, &quot;No&quot; and &quot;Cancel&quot;. Yes and No are straight forward. However, if the user opted to click CANCEL button I was not closing the form (e.Cancel=true; return; [in the form_closing event] ) . This could not be allowed in the code above. I HAD to close the forms. So i declared a public boolean variable allowCancellation. In the form_closing event i did this :&lt;br /&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;br /&gt;MessageBoxButtons optionActon = MessageBoxButtons.YesNoCancel;&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt; (allowCancellation == &lt;span class=&quot;kwrd&quot;&gt;false&lt;/span&gt;)&lt;br /&gt;optionActon = MessageBoxButtons.YesNo;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now the problem was that since i was casting the forms to the base class &quot;FORM&quot; in the foreach loop, i could not get the allowCancellation variable. So heres what i did to dynamically set the field value&lt;br /&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;br /&gt;&lt;pre class=&quot;csharpcode&quot;&gt;&lt;br /&gt;&lt;span class=&quot;kwrd&quot;&gt;foreach&lt;/span&gt;(&lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; frm &lt;span class=&quot;kwrd&quot;&gt;in&lt;/span&gt; formContainer)&lt;br /&gt;{&lt;br /&gt;    Type formType = frm.GetType();&lt;br /&gt;    &lt;br /&gt;    formType.InvokeMember(  &lt;span class=&quot;str&quot;&gt;&quot;allowCancellation&quot;&lt;/span&gt;, &lt;br /&gt;                System.Reflection.BindingFlags.SetField, &lt;br /&gt;                &lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt;, &lt;br /&gt;                frm, &lt;br /&gt;                &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt;[] {&lt;span class=&quot;kwrd&quot;&gt;false&lt;/span&gt;});&lt;br /&gt;                &lt;br /&gt;    &lt;span class=&quot;kwrd&quot;&gt;if&lt;/span&gt;(frm!=&lt;span class=&quot;kwrd&quot;&gt;null&lt;/span&gt; &amp;amp;&amp;amp; frm.Visible)&lt;br /&gt;    {&lt;br /&gt;        frm.Close();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps.</description><link>http://musingsandshouts.blogspot.com/2009/07/runtime-casting-of-objects-and-calling.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7838929879052806968.post-6681154751460508631</guid><pubDate>Tue, 05 May 2009 08:55:00 +0000</pubDate><atom:updated>2009-07-20T18:45:48.589+05:30</atom:updated><category domain="http://www.blogger.com/atom/ns#">.Net</category><category domain="http://www.blogger.com/atom/ns#">Assembly</category><category domain="http://www.blogger.com/atom/ns#">installer class</category><category domain="http://www.blogger.com/atom/ns#">Installstate</category><title>&amp;lt;Assembly name&amp;gt;.InstallState not found</title><description>If you add a custom action in the form of an installer class, and if you lets say add it to Commit stage. Then when you run your setup, you get the wierd &quot;InstallState file not found&quot; error and the setup rollsback.&lt;br /&gt;&lt;br /&gt;The fix is to add the same custom action assembly to the INSTALL stage too. And voila ! ... everything works.</description><link>http://musingsandshouts.blogspot.com/2009/05/installstate-not-found.html</link><author>noreply@blogger.com (Aslam Shareef )</author><thr:total>0</thr:total></item></channel></rss>