<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0UGQXg9eSp7ImA9WhVTEEw.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756</id><updated>2012-02-23T21:03:40.661+05:30</updated><category term="LINQ" /><category term="ORA-0100" /><category term="jQuery" /><category term="XSL" /><category term="Web Services" /><category term="Oracle errors" /><category term="SQL Server" /><category term="videos" /><category term="UI" /><category term="XMPP" /><category term="XML" /><category term="Build" /><category term=".NET Errors" /><category term="SOA" /><category term="android" /><category term="Creational Patterns" /><category term="TFS 2010" /><category term="Functional Programming" /><category term="Hyderabad" /><category term="coding" /><category term="intermittent" /><category term="invalid cursor" /><category term="Marshalling" /><category term="JavaScript" /><category term="Design Patterns" /><category term="Tips and Tricks" /><category term="XSD Schema" /><category term=".NET" /><category term="Silverlight" /><title>a Programmer's journal</title><subtitle type="html">Blogs on .NET, XML technologies, Design Patterns, SOA and other Internet technologies.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.lavgupta.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>39</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/axml" /><feedburner:info uri="blogspot/axml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUcDR3k4fip7ImA9WhRXEko.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-2375931010401397065</id><published>2011-12-19T11:59:00.000+05:30</published><updated>2011-12-19T12:14:36.736+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-19T12:14:36.736+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="UI" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title>A simple jQuery slideshow</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;div class="MsoNormal"&gt;
&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: 'Segoe UI', sans-serif; font-size: 10pt; line-height: 115%;"&gt;I have used jQuery &lt;/span&gt;&lt;b&gt;&lt;span style="color: #558ed5; font-family: 'Courier New'; font-size: 10pt; line-height: 115%;"&gt;&lt;a href="http://api.jquery.com/animate/"&gt;animate()&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: 'Segoe UI', sans-serif; font-size: 10pt; line-height: 115%;"&gt;
method to create a simple slideshow. I am toggling the opacity of the image
from 0 to 1 and also changing the URL of the image.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;b&gt;&lt;span style="font-family: 'Segoe UI', sans-serif; font-size: 10pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-family: 'Segoe UI', sans-serif; font-size: 10pt; line-height: 115%;"&gt;Script
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-family: 'Segoe UI', sans-serif; font-size: 10pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #D9D9D9; border-collapse: collapse; border: none; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 462.1pt;" valign="top" width="770"&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515; font-family: 'Courier New'; font-size: 9pt;"&gt;script&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/javascript"&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;function&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt; AnimateImg() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;var&lt;/span&gt;
  imgUrls = &lt;span style="color: blue;"&gt;new&lt;/span&gt; Array(&lt;span style="color: #a31515;"&gt;"picture1.png"&lt;/span&gt;,
  &lt;span style="color: #a31515;"&gt;"picture2.png"&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;" picture3.png "&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;var&lt;/span&gt;
  opacVal = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;var&lt;/span&gt;
  currentImage = imgUrls[0];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;var&lt;/span&gt; index
  = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;var&lt;/span&gt; DELAY
  = 1000;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; setInterval(&lt;span style="color: blue;"&gt;function&lt;/span&gt;()
  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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="color: #a31515;"&gt;"#animate-img"&lt;/span&gt;).animate({
  opacity: opacVal }, DELAY, &lt;span style="color: blue;"&gt;function&lt;/span&gt;() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; &lt;span style="color: blue;"&gt;if&lt;/span&gt;
  (opacVal == 0) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; opacVal = 1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; &lt;span style="color: blue;"&gt;else&lt;/span&gt;
  {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; opacVal = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; &lt;span style="color: blue;"&gt;if&lt;/span&gt;
  (index == imgUrls.length) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; index = 0;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; &lt;span style="color: blue;"&gt;if&lt;/span&gt;
  (opacVal == 0) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; currentImage =
  imgUrls[index++];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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; $(&lt;span style="color: #a31515;"&gt;"#animate-img"&lt;/span&gt;).attr(&lt;span style="color: #a31515;"&gt;"src"&lt;/span&gt;, currentImage);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, DELAY&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt;&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="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="font-family: 'Courier New'; font-size: 9pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="color: blue; font-family: 'Courier New'; font-size: 13px; text-align: left;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;span style="color: #a31515; font-family: 'Courier New'; font-size: 9pt;"&gt;script&lt;/span&gt;&lt;span style="color: blue; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-family: 'Segoe UI', sans-serif; font-size: 9pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;b&gt;&lt;span style="font-family: 'Segoe UI', sans-serif; font-size: 10pt; line-height: 115%;"&gt;HTML&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-family: 'Segoe UI', sans-serif; font-size: 10pt; line-height: 115%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #D9D9D9; border-collapse: collapse; border: none; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 462.1pt;" valign="top" width="770"&gt;&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;span style="color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515; font-family: 'Courier New'; font-size: 10pt;"&gt;image&lt;/span&gt;&lt;span style="font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="animate-img"&lt;/span&gt; &lt;span style="color: red;"&gt;src&lt;/span&gt;&lt;span style="color: blue;"&gt;=""&lt;/span&gt; &lt;span style="color: red;"&gt;style&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: red;"&gt;height&lt;/span&gt;:&lt;span style="color: blue;"&gt;200px"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0.0001pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;b&gt;&lt;span style="font-family: 'Segoe UI', sans-serif; font-size: 10pt; line-height: 115%;"&gt;Demo&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"&gt;
&lt;/script&gt;
&lt;script type="text/javascript"&gt;
          function AnimateImg() 
        {

            var imgUrls = new Array("http://lh4.googleusercontent.com/-lr-wxaFUQIU/SIyndOlDLFI/AAAAAAAAC6Y/66u_yBUmd9U/s211/5.jpg", "http://lh5.googleusercontent.com/-ZuPrb3pmC68/SItsscqckfI/AAAAAAAAC54/hJK8f2PBKE0/s211/1.jpg", "http://lh3.googleusercontent.com/-FBWF_t6Q5kQ/SI7vURlvvhI/AAAAAAAAC8I/Jd3aM-HICSc/s211/3.jpg");
            var opacVal = 0;
            var currentImage = imgUrls[0];
            var index = 0;
            var DELAY = 1000;
            setInterval(function() 
            {
            $("#animate-img").animate({ opacity: opacVal }, DELAY, function() {

                    if (opacVal == 0) {
                        opacVal = 1;
                    }
                    else {
                        opacVal = 0;
                    }

                    if (index == imgUrls.length) {
                        index = 0;
                    }

                    if (opacVal == 0) {
                        currentImage = imgUrls[index++];
                        $("#animate-img").attr("src", currentImage);
                    }
                });

            }, DELAY
            );
        }

    
&lt;/script&gt;
&lt;button id="show" onclick="AnimateImg();"&gt;Start SlideShow&lt;/button&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;img id="animate-img" src="http://lh3.googleusercontent.com/-FBWF_t6Q5kQ/SI7vURlvvhI/AAAAAAAAC8I/Jd3aM-HICSc/s211/3.jpg" style="width: 150px;" /&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style="font-family: 'Segoe UI', sans-serif; font-size: 13px; line-height: 14px;"&gt;Also check the jquery modal dialog &lt;a href="http://blog.lavgupta.com/2011/12/jquery-modal-waiting-dialog.html"&gt;here&lt;/a&gt;.&lt;/span&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-2375931010401397065?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7yezF2aDBg3QOj_I_5r-3pGGmzw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7yezF2aDBg3QOj_I_5r-3pGGmzw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7yezF2aDBg3QOj_I_5r-3pGGmzw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7yezF2aDBg3QOj_I_5r-3pGGmzw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/hPylhbXPp0E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/2375931010401397065/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2011/12/simple-jquery-slideshow.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/2375931010401397065?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/2375931010401397065?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/hPylhbXPp0E/simple-jquery-slideshow.html" title="A simple jQuery slideshow" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.googleusercontent.com/-FBWF_t6Q5kQ/SI7vURlvvhI/AAAAAAAAC8I/Jd3aM-HICSc/s72-c/3.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2011/12/simple-jquery-slideshow.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMCRH46cCp7ImA9WhRUGUQ.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-2613561972113329244</id><published>2011-12-12T18:16:00.003+05:30</published><updated>2012-01-31T13:41:05.018+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-31T13:41:05.018+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title>A jQuery modal wait dialog</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="MsoNormal"&gt;
&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;The jQuery
UI modal dialogs are great add-ons but they don’t necessary fit well when you just
have to show a wait message &amp;nbsp;while a page
loads. There are issues with removing the title bar and styling the dialog.
BlockUI is another alternative but I find it little hard to style using css.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;This is how
I come up with a waiting dialog. Just to make it look little neat I am using two div tags here. One will cover the page content whereas the next on will
display an animated image.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;I need a transparent
background (opacity of 0.8) div which covers the entire page, this way
page content will still be visible but users can’t perform any action.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: rgb(217, 217, 217); border-collapse: collapse; border: currentColor; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 462.1pt;" valign="top" width="770"&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="color: maroon;"&gt;#loading-div-background&lt;/span&gt;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;display&lt;/span&gt;:&lt;span style="color: blue;"&gt;none&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;fixed&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;top&lt;/span&gt;:&lt;span style="color: blue;"&gt;0&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;left&lt;/span&gt;:&lt;span style="color: blue;"&gt;0&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;background&lt;/span&gt;:&lt;span style="color: blue;"&gt;black&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;width&lt;/span&gt;:&lt;span style="color: blue;"&gt;100%&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;height&lt;/span&gt;:&lt;span style="color: blue;"&gt;100%&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&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="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;Another will contain the animated image. This div should be positioned
centrally in the page. Here is great &lt;a href="http://anvilstudios.co.za/blog/css/div-position-center-of-screen/"&gt;article &lt;/a&gt;about positioning a div.&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: rgb(217, 217, 217); border-collapse: collapse; border: currentColor; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 462.1pt;" valign="top" width="770"&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&lt;span style="color: maroon;"&gt;#loading-div&lt;/span&gt;
  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style="color: red;"&gt;width&lt;/span&gt;: &lt;span style="color: blue;"&gt;300px&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;height&lt;/span&gt;: &lt;span style="color: blue;"&gt;200px&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;background-color&lt;/span&gt;: &lt;span style="color: blue;"&gt;#0c0b0b&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;text-align&lt;/span&gt;:&lt;span style="color: blue;"&gt;center&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;position&lt;/span&gt;:&lt;span style="color: blue;"&gt;absolute&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;left&lt;/span&gt;: &lt;span style="color: blue;"&gt;50%&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;top&lt;/span&gt;: &lt;span style="color: blue;"&gt;50%&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;margin-left&lt;/span&gt;:&lt;span style="color: blue;"&gt;-150px&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: red;"&gt;margin-top&lt;/span&gt;: &lt;span style="color: blue;"&gt;-100px&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&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="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;&lt;b&gt;Script&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: rgb(217, 217, 217); border-collapse: collapse; border: currentColor; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 462.1pt;" valign="top" width="770"&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;script&lt;/span&gt;&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt; &lt;span style="color: red;"&gt;type&lt;/span&gt;&lt;span style="color: blue;"&gt;="text/javascript"&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
  $(document).ready(&lt;span style="color: blue;"&gt;function&lt;/span&gt; () {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&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="color: maroon;"&gt;"#loading-div-background"&lt;/span&gt;).css({
  opacity: 0.8 });&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&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="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;function&lt;/span&gt; ShowProgressAnimation() {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&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="color: maroon;"&gt;"#loading-div-background"&lt;/span&gt;).show();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&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="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;script&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;I am
assigning the opacity property through jQuery css method as it will take care
of all browser compatibility problems.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;Also I
have written a method which will set the visibility of the background div to
visible. This can be invoked during form submit or however you like. In this
demo I am triggering through a button click event.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;&lt;b&gt;HTML&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: rgb(217, 217, 217); border-collapse: collapse; border: currentColor; mso-background-themecolor: background1; mso-background-themeshade: 217; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 462.1pt;" valign="top" width="770"&gt;&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;button&lt;/span&gt;&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="show"&lt;/span&gt; &lt;span style="color: red;"&gt;onclick&lt;/span&gt;&lt;span style="color: blue;"&gt;="ShowProgressAnimation();"&lt;/span&gt; &lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;Show dialog&lt;/span&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;button&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;div&lt;/span&gt;&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="loading-div-background"&amp;gt;&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;div&lt;/span&gt; &lt;span style="color: red;"&gt;id&lt;/span&gt;&lt;span style="color: blue;"&gt;="loading-div"&lt;/span&gt;
  &lt;span style="color: red;"&gt;class&lt;/span&gt;&lt;span style="color: blue;"&gt;="ui-corner-all"&lt;/span&gt;
  &lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;img&lt;/span&gt; &lt;span style="color: red;"&gt;style&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: red;"&gt;height&lt;/span&gt;&lt;span style="color: blue;"&gt;:80px;&lt;/span&gt;&lt;span style="color: red;"&gt;margin&lt;/span&gt;&lt;span style="color: blue;"&gt;:30px;"&lt;/span&gt; &lt;span style="color: red;"&gt;src&lt;/span&gt;&lt;span style="color: blue;"&gt;="images/loading.gif"&lt;/span&gt;
  &lt;span style="color: red;"&gt;alt&lt;/span&gt;&lt;span style="color: blue;"&gt;="Loading.."/&amp;gt;&lt;/span&gt;
  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: maroon;"&gt;h2&lt;/span&gt; &lt;span style="color: red;"&gt;style&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: red;"&gt;color&lt;/span&gt;&lt;span style="color: blue;"&gt;:gray;&lt;/span&gt;&lt;span style="color: red;"&gt;font-weight&lt;/span&gt;&lt;span style="color: blue;"&gt;:normal;"&amp;gt;&lt;/span&gt;Please
  wait....&lt;/span&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;h2&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span style="font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: maroon; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;div&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;span class="Apple-style-span" style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 12px;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&lt;span style="color: maroon; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;div&lt;/span&gt;&lt;span style="color: blue; font-family: &amp;quot;Lucida Sans Typewriter&amp;quot;; font-size: 9pt;"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="margin-bottom: 0pt;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class="MsoNormal"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;I have a
button which will bring up the background div.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;Also the
animated loading image will be contained in another div tag along with “Please
wait…” text.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;b&gt;&lt;span style="font-family: &amp;quot;Segoe UI&amp;quot;, sans-serif;"&gt;Demo&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"&gt;
&lt;/script&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"&gt;
&lt;/script&gt;
    &lt;link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" rel="Stylesheet"&gt;&lt;/link&gt;
    &lt;style type="text/css"&gt;
    #someDiv
    {
     width:200px;
     height:250px;   
     background:rgb(33,177,60);
     margin:5px;
     margin-left:0px;
     display:none;
    }
    
    .visiblediv
    {
        visibility:visible;
    }
    .hidden
    {
        display:none;
    }
    #loading-div-background  
    {
        display:none;
        position:fixed;
        top:0;
        left:0;
        background:black;
        width:100%;
        height:100%;
        z-index:1000;
     } 
     
     #loading-div
     {
         width: 300px;
         height: 200px;
         background-color: white;
         text-align:center;
         position:absolute;
         left: 50%;
         top: 50%;
         margin-left:-150px;
         margin-top: -100px;
         z-index:1001;
     }
 #loading-div h2
{
font-family:Segoe UI,Calibri,Tahoma;
text-decoration:none;
}
    
&lt;/style&gt;
&lt;script type="text/javascript"&gt;
        $(document).ready(function () {
          
            $("#loading-div-background").css({ opacity: 0.8 });
          
        });
        function ShowProgressAnimation() {
                     $("#loading-div-background").show();

        } 
 function HideProgressAnimation() {
            
            $("#loading-div-background").hide();

        } 
    
&lt;/script&gt;
&lt;button id="show" onclick="ShowProgressAnimation();"&gt;Show dialog&lt;/button&gt;

&lt;br /&gt;
&lt;div id="loading-div-background"&gt;
&lt;div class="ui-corner-all" id="loading-div"&gt;
&lt;img alt="Loading.." src="http://loadinggif.com/images/image-selection/3.gif" style="height: 30px; margin: 30px;" /&gt; 
      &lt;br /&gt;
&lt;h2 style="color: black; font-weight: normal;"&gt;


Please wait....&lt;/h2&gt;
&lt;button id="Button1" onclick="HideProgressAnimation();"&gt;close demo&lt;/button&gt;
     &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style="font-family: 'Segoe UI', sans-serif; font-size: 13px; line-height: 14px;"&gt;Also check the jQuery image slide show &lt;a href="http://blog.lavgupta.com/2011/12/simple-jquery-slideshow.html"&gt;here&lt;/a&gt;.&lt;/span&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-2613561972113329244?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UcTXLd0c_yoaS_tDaJKNa3NwPVo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UcTXLd0c_yoaS_tDaJKNa3NwPVo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UcTXLd0c_yoaS_tDaJKNa3NwPVo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UcTXLd0c_yoaS_tDaJKNa3NwPVo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/vBWo6KiPaKY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/2613561972113329244/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2011/12/jquery-modal-waiting-dialog.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/2613561972113329244?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/2613561972113329244?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/vBWo6KiPaKY/jquery-modal-waiting-dialog.html" title="A jQuery modal wait dialog" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2011/12/jquery-modal-waiting-dialog.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYNQXg8eSp7ImA9WhRREUk.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-2099886698144878079</id><published>2011-11-24T14:28:00.001+05:30</published><updated>2011-11-24T19:29:50.671+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-24T19:29:50.671+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="videos" /><category scheme="http://www.blogger.com/atom/ns#" term="android" /><title>Android PC ??</title><content type="html">Looks like you will be carrying your PC in your pocket. A &lt;a href="http://www.fxitech.com/" style="text-align: left;"&gt;company&lt;/a&gt; has built a USB which connects your andriod phone to a display panel through HDMI interface. You can also connect it to your PC and android will appear as your virtualized desktop.
&lt;div class="separator" style="clear: both; text-align: center;margin-top: 20px;"&gt;
&lt;object width="320" height="266" class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://1.gvt0.com/vi/0PiJeiaMq3E/0.jpg"&gt;&lt;param name="movie" value="http://www.youtube.com/v/0PiJeiaMq3E&amp;fs=1&amp;source=uds" /&gt;
&lt;param name="bgcolor" value="#FFFFFF" /&gt;
&lt;embed width="320" height="266"  src="http://www.youtube.com/v/0PiJeiaMq3E&amp;fs=1&amp;source=uds" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-2099886698144878079?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZvkrqXLZ5a_U44wJmbVZWZCZRuA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZvkrqXLZ5a_U44wJmbVZWZCZRuA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZvkrqXLZ5a_U44wJmbVZWZCZRuA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZvkrqXLZ5a_U44wJmbVZWZCZRuA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/3gGv7GX2r28" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/2099886698144878079/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2011/11/android-pc.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/2099886698144878079?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/2099886698144878079?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/3gGv7GX2r28/android-pc.html" title="Android PC ??" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2011/11/android-pc.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4ASHYyeyp7ImA9WhdSFUQ.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-8325011277182083326</id><published>2011-07-22T09:21:00.003+05:30</published><updated>2011-07-25T18:32:29.893+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-25T18:32:29.893+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="TFS 2010" /><category scheme="http://www.blogger.com/atom/ns#" term=".NET Errors" /><title>TFS Build Error Copying Silverlight XAP file</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span xmlns=""&gt;&lt;span style="font-family: 'Segoe UI';"&gt;I was trying to automate build for Silverlight project using Team Foundation Server and build was failing with the following error.&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=""&gt;&lt;span style="font-family: 'Segoe UI';"&gt;&lt;em&gt;Copying my.xap file failed. Access to path '..' denied.&lt;br /&gt;
&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span xmlns=""&gt;&lt;span style="font-family: 'Segoe UI';"&gt;Digging deep in the build log I found that this is happening while copying the source files from TFS to the build folder for compilation. Since xap is an output file it is not required during the compilation. I avoided the download/copy of the xap file by denying access to the build agent. The steps are mentioned &lt;a href="http://weblogs.asp.net/jdanforth/archive/2010/04/30/tfs-automatic-build-reporting-access-to-xap-denied.aspx"&gt;here&lt;/a&gt;. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-8325011277182083326?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ob3QaMxs9Gh2paUFeLJhXCWfkNk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ob3QaMxs9Gh2paUFeLJhXCWfkNk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ob3QaMxs9Gh2paUFeLJhXCWfkNk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ob3QaMxs9Gh2paUFeLJhXCWfkNk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/E69D3cFDD9I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/8325011277182083326/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2011/07/tfs-build-error-copying-silverlight-xap.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/8325011277182083326?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/8325011277182083326?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/E69D3cFDD9I/tfs-build-error-copying-silverlight-xap.html" title="TFS Build Error Copying Silverlight XAP file" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2011/07/tfs-build-error-copying-silverlight-xap.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUCR3g8eyp7ImA9WhZXFko.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-2946792738581674718</id><published>2011-05-06T15:11:00.001+05:30</published><updated>2011-05-06T15:34:26.673+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-06T15:34:26.673+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Build" /><category scheme="http://www.blogger.com/atom/ns#" term="TFS 2010" /><title>Specifying Reference Paths in TFS 2010 build definition</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;While creating build definition using TFS 2008, we could specify the path(s) where the build server could look for the references.&amp;nbsp;This was of great help as it avoided installing dependent assemblies in the GAC in the build server.&lt;br /&gt;
It was easily done by editing the project file and adding &lt;span class="Apple-style-span" style="color: #a64d79;"&gt;&amp;lt;AdditionalReferencePath&amp;gt;&lt;/span&gt; element.&lt;br /&gt;
&lt;br /&gt;
In &lt;a href="http://www.amazon.com/Professional-Team-Foundation-Server-Programmer/dp/0470943327?ie=UTF8&amp;amp;tag=lavboxblog-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969" target="_blank"&gt;Team Foundation Server 2010&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=lavboxblog-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0470943327" style="border: none !important; margin: 0px !important; padding: 0px !important;" width="1" /&gt;, the build definition are workflow based and if you are creating any build definition using default template, there is no option to specify the additional reference paths.&lt;br /&gt;
&lt;br /&gt;
Since, new template also supports the msbuild arguments, we have to specify the reference path as a build argument. For this we have to add "ReferencePath" as property to the msbuild arguments.&lt;br /&gt;
&lt;br /&gt;
Go to&amp;nbsp;Team Explorer &amp;gt;&amp;gt; Build Defintion &amp;gt;&amp;gt; Edit Build Definition &amp;gt;&amp;gt; Process &amp;gt;&amp;gt; Advanced Section &amp;gt;&amp;gt; MSBuild Arguments and&amp;nbsp;Add the following: /p:ReferencePath=”{File path}”&lt;br /&gt;
&lt;br /&gt;
We can specify multiple reference paths separated by ';'&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-2946792738581674718?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LIYVn4CxKfqF7uqvsR9L5HKsgbA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LIYVn4CxKfqF7uqvsR9L5HKsgbA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LIYVn4CxKfqF7uqvsR9L5HKsgbA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LIYVn4CxKfqF7uqvsR9L5HKsgbA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/0OigJfD3WCI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/2946792738581674718/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2011/05/specifying-reference-paths-in-tfs-2010.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/2946792738581674718?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/2946792738581674718?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/0OigJfD3WCI/specifying-reference-paths-in-tfs-2010.html" title="Specifying Reference Paths in TFS 2010 build definition" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2011/05/specifying-reference-paths-in-tfs-2010.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MDQHo7fip7ImA9WhdSFUU.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-7313873219014794448</id><published>2011-03-04T22:49:00.003+05:30</published><updated>2011-07-25T14:47:51.406+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-25T14:47:51.406+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET Errors" /><category scheme="http://www.blogger.com/atom/ns#" term="XML" /><title>The type 'System.Xml.IXmlLineInfo' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I have been getting this weird exception out of nowhere while compiling my solution. Turns out I had two projects in my solution using different System.Xml assembly. One using straight from .NET Framework 2.0 and other using assembly 2.0.5.0. ( from Silverlight runtime).&lt;br /&gt;
&lt;br /&gt;
Referenced path were&lt;br /&gt;
&lt;span style="background-color: #eaeaea; font-family: courier;"&gt;C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll&lt;/span&gt; &lt;br /&gt;
&amp;amp;&lt;br /&gt;
&lt;span style="background-color: #eaeaea; font-family: courier;"&gt;C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Xml.dll&lt;/span&gt;  respectively.&lt;br /&gt;
&lt;br /&gt;
If a project file does not specify the exact reference assembly, compiler tries to use any matching assembly present in its cache. I could see the following reference in my csproj file.&lt;span style="background-color: #fbd2d2; font-family: courier;"&gt;&lt;br /&gt;
&amp;lt;Reference Include="System.Xml"/&amp;gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
I updated this reference with the correct version (along with the PublicKeyToken and Culture info) and made the SpecificVersion=True, enforcing compiler to use the specified assembly&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #fbd2d2; font-family: courier;"&gt;&amp;lt;Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"&amp;gt;&lt;br /&gt;
&amp;lt;SpecificVersion&amp;gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial;"&gt;True&lt;/span&gt;&amp;lt;/SpecificVersion&amp;gt;&lt;br /&gt;
&amp;lt;HintPath/&amp;gt;&lt;br /&gt;
&amp;lt;/Reference&amp;gt;&lt;/div&gt;&lt;br /&gt;
This resolved my problem. Specifying strong references in project files will eliminate issues caused by same name assemblies.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-7313873219014794448?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/IDErKjMzYLUS4MjqrfMTno2D-ac/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IDErKjMzYLUS4MjqrfMTno2D-ac/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/IDErKjMzYLUS4MjqrfMTno2D-ac/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IDErKjMzYLUS4MjqrfMTno2D-ac/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/iAAR5alcupU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/7313873219014794448/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2011/03/type-systemxmlixmllineinfo-is-defined.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/7313873219014794448?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/7313873219014794448?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/iAAR5alcupU/type-systemxmlixmllineinfo-is-defined.html" title="The type 'System.Xml.IXmlLineInfo' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2011/03/type-systemxmlixmllineinfo-is-defined.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EMSHczfCp7ImA9WhRTEkQ.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-3660743973176948958</id><published>2010-12-13T11:29:00.002+05:30</published><updated>2011-11-03T11:24:49.984+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-03T11:24:49.984+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight" /><title>Silverlight Developer runtime not installed</title><content type="html">I have been getting "Silverlight Developer runtime not installed" message while trying to debug &lt;a target="_blank"  href="http://www.amazon.com/Pro-Silverlight-4-Matthew-MacDonald/dp/1430229799?ie=UTF8&amp;tag=lavboxblog-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;Silverlight 4&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=lavboxblog-20&amp;l=btl&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=1430229799" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt; applications in VS2010 though I have installed the SDK. Seems&amp;nbsp;this runtime is different installation altogether. You can install it from &lt;a href="http://go.microsoft.com/fwlink/?LinkID=188039" s_oid="http://go.microsoft.com/fwlink/?LinkID=188039" s_oidt="0"&gt;http://go.microsoft.com/fwlink/?LinkID=188039&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-3660743973176948958?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/k0V15GXFX5YMy1ufmjOyrJRx9yw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/k0V15GXFX5YMy1ufmjOyrJRx9yw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/k0V15GXFX5YMy1ufmjOyrJRx9yw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/k0V15GXFX5YMy1ufmjOyrJRx9yw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/VsX4cfAvyiI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/3660743973176948958/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2010/12/silverlight-developer-runtime-not.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/3660743973176948958?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/3660743973176948958?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/VsX4cfAvyiI/silverlight-developer-runtime-not.html" title="Silverlight Developer runtime not installed" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2010/12/silverlight-developer-runtime-not.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MBRH49fSp7ImA9Wx9RGUw.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-7824731482923450351</id><published>2010-12-10T11:38:00.004+05:30</published><updated>2010-12-21T12:40:55.065+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-21T12:40:55.065+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ORA-0100" /><category scheme="http://www.blogger.com/atom/ns#" term="Oracle errors" /><category scheme="http://www.blogger.com/atom/ns#" term="invalid cursor" /><category scheme="http://www.blogger.com/atom/ns#" term="intermittent" /><title>Sporadic 'ORA-01001 Invalid cursor' error in Oracle 11g</title><content type="html">According to the Oracle documentation,&lt;br /&gt;&lt;br /&gt;" The ORA-01001 error occurs when:&lt;br /&gt;A host language program call gave an  invalid cursor for use&lt;br /&gt;The value of the MAXOPENCURSORS option in the  precompiler command was too small&lt;br /&gt;&lt;br /&gt;You can fix the ORA-01001 error  by:&lt;br /&gt;1.Check your problematic call statement for any issues&lt;br /&gt;2Specify a  correct LDA area or open the cursor as required&lt;br /&gt;3.As a last resort, increase  the MAXOPENCURSORS option value before precompiling&lt;br /&gt;&lt;br /&gt;As a note, the ORA-01001  error does not exist in Oracle 10g"&lt;br /&gt;&lt;br /&gt;After  debugging for almost a day following the above hints, I came to realise  there is nothing wrong with my PL/SQL or with the configuration  settings.&lt;br /&gt;&lt;br /&gt;Sporadic "ORA-01001: invalid cursor" error occurs in Oracle 11g if there are RAM memory issues on the server.&lt;br /&gt;&lt;br /&gt;If   the same client call works once and fails the other minute with this   error, you can check the server for memory issues before debugging   further.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-7824731482923450351?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/a45wY6V1JrjinwxpNJK8FeY5qco/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a45wY6V1JrjinwxpNJK8FeY5qco/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/a45wY6V1JrjinwxpNJK8FeY5qco/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a45wY6V1JrjinwxpNJK8FeY5qco/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/m4tca4GRsqo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/7824731482923450351/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2010/12/sporadic-ora-01001-invalid-cursor-error.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/7824731482923450351?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/7824731482923450351?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/m4tca4GRsqo/sporadic-ora-01001-invalid-cursor-error.html" title="Sporadic 'ORA-01001 Invalid cursor' error in Oracle 11g" /><author><name>StrongHead</name><uri>http://www.blogger.com/profile/06502975459520404052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2010/12/sporadic-ora-01001-invalid-cursor-error.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cAQ3s5fyp7ImA9Wx9TEEU.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-2961756372442541054</id><published>2010-11-18T18:27:00.000+05:30</published><updated>2010-11-18T18:27:22.527+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-18T18:27:22.527+05:30</app:edited><title>Windows Sleep command</title><content type="html">I have a really long bat file where I need to introduce delay between subsequent commands. But there is no sleep command in DOS. There is an workaround for this, we can use ping command to emulate sleep.&lt;br /&gt;
&lt;br /&gt;
Usage ping 1.1.1.1 -n 1 -w 10000&lt;br /&gt;
&lt;br /&gt;
switch -n specifies number of echo request to be sent.&lt;br /&gt;
switch -w specifies number of milliseconds to wait for each reply.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-2961756372442541054?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CJOA6CtsTZrDqqqTuBpK3p-g6G0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CJOA6CtsTZrDqqqTuBpK3p-g6G0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CJOA6CtsTZrDqqqTuBpK3p-g6G0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CJOA6CtsTZrDqqqTuBpK3p-g6G0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/N4dFSYyk5tE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/2961756372442541054/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2010/11/windows-sleep-command.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/2961756372442541054?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/2961756372442541054?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/N4dFSYyk5tE/windows-sleep-command.html" title="Windows Sleep command" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2010/11/windows-sleep-command.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUMR3Y-fip7ImA9WxFQGUQ.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-80265170006181309</id><published>2010-02-04T20:16:00.006+05:30</published><updated>2010-05-16T12:14:46.856+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-05-16T12:14:46.856+05:30</app:edited><title>An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode</title><content type="html">If you get this wierd error message while hosting your application in &lt;span&gt;&lt;a href="http://www.amazon.com/Professional-IIS-7-Kenneth-Schaefer/dp/0470097825?ie=UTF8&amp;amp;tag=lavboxblog-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969" target="_blank"&gt;IIS 7&lt;/a&gt;&lt;img alt="" border="0" height="1" src="http://www.assoc-amazon.com/e/ir?t=lavboxblog-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=0470097825" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; margin: 0px; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important;" width="1" /&gt;&lt;/span&gt;.&lt;br /&gt;
Do not freak out, nothing is wrong with your settings. It's just that your code is an old timer. Changing the Managed pipeline mode to classic will solve your problem.&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5434401359243218882" src="http://2.bp.blogspot.com/_G5xK88LC8vY/S2rfPliXj8I/AAAAAAAAErc/AvgU3PTRle8/s400/IIS.png" style="cursor: hand; display: block; height: 277px; margin: 0px auto 10px; text-align: center; width: 307px;" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-80265170006181309?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LKSFk_YW4Y5nBOBDYpyEtfyBojE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LKSFk_YW4Y5nBOBDYpyEtfyBojE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LKSFk_YW4Y5nBOBDYpyEtfyBojE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LKSFk_YW4Y5nBOBDYpyEtfyBojE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/q_j2QrgCdus" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/80265170006181309/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2010/02/aspnet-setting-has-been-detected-that.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/80265170006181309?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/80265170006181309?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/q_j2QrgCdus/aspnet-setting-has-been-detected-that.html" title="An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_G5xK88LC8vY/S2rfPliXj8I/AAAAAAAAErc/AvgU3PTRle8/s72-c/IIS.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2010/02/aspnet-setting-has-been-detected-that.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUABSHk6eCp7ImA9WxNbEk8.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-3126198464882720407</id><published>2009-11-12T00:54:00.003+05:30</published><updated>2009-11-15T01:12:39.710+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-15T01:12:39.710+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="Tips and Tricks" /><title>Public Key Token of an assembly</title><content type="html">&lt;p&gt;There are times when you need to get the public key token of an assembly. Okay the only time is when you need to put in config files. The answers is same old &lt;strong&gt;sn.exe&lt;/strong&gt;. That's right the same .NET strong name tool we use to generate snk files.&lt;/p&gt;&lt;p&gt;Usage:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;strong&gt;sn -T helloWorld.dll&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;This gives you the public key token of the strong named assembly.&lt;/p&gt;&lt;p&gt;Just wanted to share.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-3126198464882720407?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qkk_D0PMMOSBBJ-Apuh89Z6sr1w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qkk_D0PMMOSBBJ-Apuh89Z6sr1w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qkk_D0PMMOSBBJ-Apuh89Z6sr1w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qkk_D0PMMOSBBJ-Apuh89Z6sr1w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/zqn5gHDNB1k" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/3126198464882720407/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2009/11/public-key-token-of-assembly.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/3126198464882720407?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/3126198464882720407?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/zqn5gHDNB1k/public-key-token-of-assembly.html" title="Public Key Token of an assembly" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2009/11/public-key-token-of-assembly.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYGQXc5eip7ImA9WxJTFkk.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-6125940329886289372</id><published>2009-04-25T11:51:00.005+05:30</published><updated>2009-04-25T12:18:40.922+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-25T12:18:40.922+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><title>Passing parameters to a function in setTimeout()</title><content type="html">While working on some 'animation' effect on one of my pages, I came across a problem when using &lt;em&gt;setTimeout()&lt;/em&gt;. I am using it to call a function repeatedly in certain interval. I am not much into javascript so had quite a trouble figuring it out. If the function which is being called does not have any input parameters,&lt;br /&gt;&lt;div style="MARGIN-TOP: 10px; MARGIN-BOTTOM: 10px"&gt;&lt;span style="font-family:courier;"&gt;setTimeout(MyFunc(),10); &lt;span style="color:#008000;"&gt;// calls 'MyFunc' function every 10 ms.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;But my 'Animate' function takes a parameter ( divId ),so I tried&lt;br /&gt;&lt;div style="MARGIN-TOP: 10px; MARGIN-BOTTOM: 10px"&gt;&lt;span style="font-family:courier;"&gt;setTimeout(Animate(divId),10); &lt;span style="color:#008000;"&gt;// wrong !!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;This did not work.&lt;br /&gt;The correct way to call a function with parameters in setTimeout function is.&lt;br /&gt;&lt;div style="MARGIN-TOP: 10px; MARGIN-BOTTOM: 10px"&gt;&lt;span style="font-family:courier;"&gt;setTimeout(&lt;span style="color:#3333ff;"&gt;function&lt;/span&gt;(){Animate(divId);}, 10);&lt;/span&gt;&lt;/div&gt;This concept is called 'Closure' in javascript.&lt;br /&gt;Just wanted to share...&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-6125940329886289372?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XGNMOOtcbjHSY-r5yUscPhcjx-k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XGNMOOtcbjHSY-r5yUscPhcjx-k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XGNMOOtcbjHSY-r5yUscPhcjx-k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XGNMOOtcbjHSY-r5yUscPhcjx-k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/MtLaJR6JOHE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/6125940329886289372/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2009/04/passing-parameters-to-function-in.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/6125940329886289372?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/6125940329886289372?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/MtLaJR6JOHE/passing-parameters-to-function-in.html" title="Passing parameters to a function in setTimeout()" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://blog.lavgupta.com/2009/04/passing-parameters-to-function-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUFQn44fip7ImA9WxVbFEw.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-5983587540287352298</id><published>2009-03-30T15:37:00.007+05:30</published><updated>2009-03-30T17:10:13.036+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-30T17:10:13.036+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><title>Database Indexes</title><content type="html">I went through a lot of articles to find out the exact differences between clustered and non-clustered indexes.&lt;br /&gt;I have "simplified" the findings, especially for the people (like me) who like to learn things in brief.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Non-Clustered Index&lt;/strong&gt;&lt;br /&gt;The index in the back of any book is good example of a non-clustered index. Any topic may be easily found in the book by first finding it in the book index and the index will give the page number of the topic.&lt;br /&gt;So, it requires two "look ups" to find a topic. Now in database context we need to first find the position of the index entry and the go to the data page where the rows are present. The leaf node of the B-Tree (data structure index are built on) are the data pages where the rows are stored physically.&lt;br /&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5318924899122340274" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 305px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_G5xK88LC8vY/SdCeA88q4bI/AAAAAAAAD20/epAD51ugTKU/s400/nonC.png" border="0" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Clustered Index&lt;/strong&gt;&lt;br /&gt;A Phonebook is good example of a clustered index i.e. data and index both are merged together. It requires just one look up to find the data row. Since the data are stored as per the order of the index, there can be only one Clustered Index on a database table.&lt;br /&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5318924910439125970" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 314px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_G5xK88LC8vY/SdCeBnGzU9I/AAAAAAAAD28/6BAZ9yeJ2gE/s400/C.png" border="0" /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-5983587540287352298?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/qODTqHQaTWhytXigfk0k3Yq3mV0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qODTqHQaTWhytXigfk0k3Yq3mV0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/qODTqHQaTWhytXigfk0k3Yq3mV0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/qODTqHQaTWhytXigfk0k3Yq3mV0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/2ziHwZMDUT8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/5983587540287352298/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2009/03/database-indexes.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/5983587540287352298?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/5983587540287352298?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/2ziHwZMDUT8/database-indexes.html" title="Database Indexes" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_G5xK88LC8vY/SdCeA88q4bI/AAAAAAAAD20/epAD51ugTKU/s72-c/nonC.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://blog.lavgupta.com/2009/03/database-indexes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUAQH86eyp7ImA9WxRVFks.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-163360402835897696</id><published>2008-10-31T17:15:00.006+05:30</published><updated>2008-11-14T17:00:41.113+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-14T17:00:41.113+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="coding" /><title>Code Metrics for a developer</title><content type="html">Here are some code metrics each developer should be tracking all along.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Cyclomatic complexity:&lt;/b&gt;&lt;br /&gt;Cyclomatic complexity of a program is the count of the number of linearly independent paths of execution. If the source code contained no decision points ( such as 'if' 'switch' 'while' ), the complexity would be 1, FLAT CODE, since there is only a single path through the code. If the code has a single ‘if’ statement there would be two paths through the code, one path where the ‘if’ statement is evaluated as true and one path where the ‘if’ statement is evaluated as false. So the complexity increasing with number of decision points in your code. If you have not written your decision statements properly, it will lead you into unnecessary conditions and hence complexity of the program increases.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5263293856503677282" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 400px; CURSOR: hand; HEIGHT: 210px; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_G5xK88LC8vY/SQr54FllwWI/AAAAAAAADRk/_kGiTbmAJRo/s400/CC.PNG" border="0" /&gt;Measuring CC tells you 2 important things.&lt;br /&gt;&lt;img style="BORDER-RIGHT: white 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: white 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; BORDER-LEFT: white 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: white 1px solid" src="http://gupta.lav.googlepages.com/bullet.GIF" align="left center" /&gt; How many ways your execution may end up. If you have higher CC, then maybe you can re-write your logic to make fewer conditions.&lt;br /&gt;&lt;img style="BORDER-RIGHT: white 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: white 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; BORDER-LEFT: white 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: white 1px solid" src="http://gupta.lav.googlepages.com/bullet.GIF" align="left center" /&gt; It tells you how many test cases will be required to achieve full code coverage.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Depth of Inheritance:&lt;/b&gt;&lt;br /&gt;It is the measure of the level of inheritance a given solution. The deeper a class is in the hierarchy, the greater the number of methods it is likely to inherit, making it more complex to predict its behavior. As we go down inheritance graph, refined classes constitute greater design complexity, since more methods and classes are involved. Deep Inherited types are by-products of an over engineered hierarchy and one should avoid this. It causes major performance hit.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Class Coupling:&lt;/b&gt;&lt;br /&gt;Coupling is the measurement of code independence and re-usability. A module is considered highly coupled when resident classes relies on each one of the other classes. In highly coupled cases, change in one class forces a cascading changes in other classes, classes are hard to reuse or test because of their dependence on other modules.Usage of proper Creational pattern reduces the coupling between the classes. A Class should interact with another class through a stable interface and does not need to be concerned with its internal implementation.&lt;br /&gt;&lt;br /&gt;I think every development environment has the feature of analyzing code metrics these days. Visual Studio team suite/ system has this feature of calculating code metrics from a solution.&lt;img id="BLOGGER_PHOTO_ID_5263294935158958930" style="DISPLAY: block; MARGIN: 0px 10px 10px 0px; WIDTH: 228px; CURSOR: hand; HEIGHT: 235px;TEXT-ALIGN:center;" alt="" src="http://3.bp.blogspot.com/_G5xK88LC8vY/SQr6235DK1I/AAAAAAAADRs/EuQxd7m5Tc0/s400/VS.PNG" border="0" /&gt;&lt;br /&gt;If you track and address these issues at the earliest, it will save you from a lot of code re-factoring.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-163360402835897696?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wqam38N1pUcLiUHpDxV1K8ZFifo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wqam38N1pUcLiUHpDxV1K8ZFifo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wqam38N1pUcLiUHpDxV1K8ZFifo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wqam38N1pUcLiUHpDxV1K8ZFifo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/oKdnX9aymTk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/163360402835897696/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/10/code-metrics.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/163360402835897696?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/163360402835897696?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/oKdnX9aymTk/code-metrics.html" title="Code Metrics for a developer" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_G5xK88LC8vY/SQr54FllwWI/AAAAAAAADRk/_kGiTbmAJRo/s72-c/CC.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/10/code-metrics.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUDSXo6fyp7ImA9WxRXFUQ.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-8128373245181673413</id><published>2008-10-20T20:30:00.005+05:30</published><updated>2008-10-21T18:01:18.417+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-21T18:01:18.417+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><title>Extension Methods</title><content type="html">&lt;div class="Section1"&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;It's been a while working on Visual Studio 2008 but there are new features I still didn't use. Extension method is one of them.Extension methods, are a way to call static method by an instance using instance method syntax. There are occasions when you call static methods where you pass an instance as first parameter.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;for e.g:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;We often copy arrays as&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:#00b050;"&gt;Array&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt;.Copy(source,destination....);&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;would not it be more readable if we can invoke it like&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt;source.Copy (Destination);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;Extension methods make it possible.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;But example above has hardly anything to do with the word 'Extension'. So, the main idea of a extension method is to enable &lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;developers to write a method outside its class definition (of course on requirement basis) and use it just like any instance method.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;Let's say I want to extend functionality of an existing type &lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt;string&lt;/span&gt;.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;I want to add a new method &lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt;IsValidPinCode&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;, just like &lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt;IsNullOrEmpty&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt; or any other pre-defined methods.&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;I can do it easily by "EXTENDING" the type string.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;For this I have to write a static method outside definition of the type.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt;public&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt;static bool&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt; IsValidPinCode(&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt;this&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt; &lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt; s)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt; bool&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt; isValid = &lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt;false&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt;;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:#5be349;"&gt; // your logic to check whether an address is valid&lt;br /&gt; // and assign ‘isValid’ accordingly&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt; return&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt; isValid;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;This method must be a defined inside a static class. Note that keyword &lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt;this &lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;is being used in a static method.&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;This would be signature of an extension method. Type for which it has been extended should be preceded in parameter &lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;list with &lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt;this&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt; keyword. Once I define it, I can use it all across my code. (of course within the visibility of class where this method was defined)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt;string&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt; str = "500082";&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:blue;"&gt;bool&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10;color:black;"&gt; isValid = str.IsValidPinCode();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:10;color:#666666;"&gt;I think it could be handy sometimes but it is not something I would go about as a language feature.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-8128373245181673413?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2E8HBIAGehl18zI-yFNTojEOd90/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2E8HBIAGehl18zI-yFNTojEOd90/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2E8HBIAGehl18zI-yFNTojEOd90/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2E8HBIAGehl18zI-yFNTojEOd90/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/-_GrYuI4A2o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/8128373245181673413/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/10/extension-methods.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/8128373245181673413?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/8128373245181673413?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/-_GrYuI4A2o/extension-methods.html" title="Extension Methods" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/10/extension-methods.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcGSHg8cSp7ImA9WxRXE04.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-3329274227094327693</id><published>2008-10-18T17:59:00.004+05:30</published><updated>2008-10-18T18:17:09.679+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-18T18:17:09.679+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Functional Programming" /><title>Functional Programming</title><content type="html">You must have seen the amount of interest that is being generated for LINQ, Lamba Expressions with the release of C# 3.0.The entire Data Access Architecture has been focused on to LINQ to SQL, LINQ to XML and LINQ to Objects and more. So what exactly is Functional programming ?&lt;br /&gt;&lt;br /&gt;FP is a programming model that treates computation as the evaluation of mathematical function.&lt;br/&gt;&lt;br /&gt;For e.g, if we define two functions like given below&lt;br /&gt;f(x) = x^2 + x + 1&lt;br /&gt;g(x,y) = x * y &lt;br/&gt;&lt;br /&gt;A problem f (g (2, 2) ) will be evaluated by compiler as&lt;br /&gt;g(2*2)^2 + g(2*2) + 1&lt;br /&gt;(4)^2 + (4) + 1&lt;br /&gt;16+ 4 + 1&lt;br /&gt;21&lt;br/&gt;&lt;br /&gt;It is a declarative way of programming, where we leave the compiler to do the evaluation as late as possible. The user is only bothered about the result and not on how it is being evaluated.The focus is never on in the state transition of the variables, so one need not bother about the side effects.&lt;br/&gt;&lt;br /&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;br /&gt;&lt;img src="http://gupta.lav.googlepages.com/bullet.GIF" align="left center" style="border:solid 1px white; padding:0px;"/&gt;&amp;nbsp;As the functional units do not have side effects, so their orders could be reversed.&lt;br /&gt;&lt;img src="http://gupta.lav.googlepages.com/bullet.GIF" align="left center" style="border:solid 1px white; padding:0px;"/&gt;&amp;nbsp;They can be performed in parallel. (suited for parallel computing)&lt;br /&gt;&lt;img src="http://gupta.lav.googlepages.com/bullet.GIF" align="left center" style="border:solid 1px white; padding:0px;"/&gt;&amp;nbsp;They are thread safe as one does not interfere other. (Thread safety)&lt;br /&gt;&lt;img src="http://gupta.lav.googlepages.com/bullet.GIF" align="left center" style="border:solid 1px white; padding:0px;"/&gt;&amp;nbsp;Function can be evaluated as late as possible, providing composability. (late evalutation)&lt;br /&gt;This gives the compiler as edge to reorder or combine the evaluation of expressions in a program.&lt;br/&gt;&lt;br /&gt;I believe it is a very strong feature for a programming language to possess.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-3329274227094327693?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/T4YdEFcY7hYF69vkFOj_uQ6ghY8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/T4YdEFcY7hYF69vkFOj_uQ6ghY8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/T4YdEFcY7hYF69vkFOj_uQ6ghY8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/T4YdEFcY7hYF69vkFOj_uQ6ghY8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/VLXI48BfOus" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/3329274227094327693/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/10/functional-programming.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/3329274227094327693?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/3329274227094327693?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/VLXI48BfOus/functional-programming.html" title="Functional Programming" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/10/functional-programming.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYAQX8-eip7ImA9WxdWFUU.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-595911839373001487</id><published>2008-07-05T00:27:00.030+05:30</published><updated>2008-07-09T12:35:40.152+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-09T12:35:40.152+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="XMPP" /><title>XMPP</title><content type="html">eXtensible Messaging and Presence Protocol (XMPP) is a protocol to stream XML elements for messaging, presence and request-response services. It is mainly used in building IM and presence based applications.&lt;br /&gt;The protocol is not coupled to any network architecture, but it’s generally used in client-server architecture. An XMPP server can communicate with its clients (recommended port: 5222) or with other XMPP servers (recommended port: 5269) over a TCP connection.&lt;br /&gt;&lt;br /&gt;An example network architecture could be like&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_iI_37vFzQA8/SG7bingl_CI/AAAAAAAAAzc/NOg3tTp22J0/s1600-h/Untitled.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5219350405936708642" style="CURSOR: hand" alt="" src="http://bp3.blogger.com/_iI_37vFzQA8/SG7bingl_CI/AAAAAAAAAzc/NOg3tTp22J0/s400/Untitled.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:80%;"&gt;The gateway is necessary to translate the messages between a non-XMPP server and an XMPP server.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All XMPP messaging happens in the form of Streams and Stanzas. Stream is the container for all messages sent from one entity to the other. A stream is initiated with a &lt;&lt;span&gt;stream&lt;/span&gt;&gt; tag and is destroyed with a &lt;&lt;span&gt;/&lt;/span&gt;&lt;span&gt;stream&lt;/span&gt;&gt; tag. Multiple XML elements can be sent over the connection before the stream is closed.&lt;br /&gt;These streams are unidirectional i.e. if a client initiates a stream with the server to send a request; the server initiates a new response stream on the same TCP connection. Unlike the client-server communication, the server-server communication requires two separate TCP connections for exchange of XML elements over streams. &lt;/span&gt;&lt;br /&gt;Stanza is one atomic unit of information that can be sent from one entity to another over a stream. It is a structured XML element. Three types of stanzas are defined in the XMPP standards:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://gupta.lav.googlepages.com/bullet.GIF" align="left center" style="border:solid 1px white; padding:0px;"/&gt;&amp;nbsp; message: used for instant messaging&lt;br /&gt;&lt;img src="http://gupta.lav.googlepages.com/bullet.GIF" align="left center" style="border:solid 1px white; padding:0px;"/&gt;&amp;nbsp; presence: used for presence related messaging&lt;br /&gt;&lt;img src="http://gupta.lav.googlepages.com/bullet.GIF" align="left center" style="border:solid 1px white; padding:0px;"/&gt;&amp;nbsp; iq: used in request-response services for querying information from entities.&lt;br /&gt;&lt;br /&gt;The client-server (or server-server) communication can be thought of as two open-ended XML documents. The stream just wraps all the stanzas sent in a session from one entity to the other.&lt;br /&gt;&lt;div&gt;A stream with different stanzas: &lt;/div&gt;&lt;div&gt;&lt;a href="http://bp0.blogger.com/_iI_37vFzQA8/SG7ajdWnbtI/AAAAAAAAAzM/vcsRFrbzTpU/s1600-h/Untitled1.jpg"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5219349320878747346" style="CURSOR: hand" alt="" src="http://bp0.blogger.com/_iI_37vFzQA8/SG7ajdWnbtI/AAAAAAAAAzM/vcsRFrbzTpU/s400/Untitled1.jpg" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Watch out for more on XMPP..&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-595911839373001487?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gHxizkMtYQsVFmjuKyzKxSgbq6U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gHxizkMtYQsVFmjuKyzKxSgbq6U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gHxizkMtYQsVFmjuKyzKxSgbq6U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gHxizkMtYQsVFmjuKyzKxSgbq6U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/Ec4Fq_mHvYk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/595911839373001487/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/07/xmpp.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/595911839373001487?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/595911839373001487?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/Ec4Fq_mHvYk/xmpp.html" title="XMPP" /><author><name>StrongHead</name><uri>http://www.blogger.com/profile/06502975459520404052</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://bp3.blogger.com/_iI_37vFzQA8/SG7bingl_CI/AAAAAAAAAzc/NOg3tTp22J0/s72-c/Untitled.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/07/xmpp.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYAQX0-cCp7ImA9WxRXE04.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-3426633027353625025</id><published>2008-07-03T20:47:00.015+05:30</published><updated>2008-10-18T18:19:00.358+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-18T18:19:00.358+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Functional Programming" /><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="LINQ" /><title>LINQ - Introduction</title><content type="html">LINQ (Language Integrated Query) introduces a generic and standard pattern for querying and updating data store of any kind. Basically a query is an expression that retrieves data from a data source. Queries are usually expressed in a specialized query language. I assume LINQ is intoduced to decouple the query language from the datasource. This avoids a lot of "unnecessary" learnings, because literally there is query language for each type of data source be it SQL databases, ADO.NET datasets, Collections types and XML documents.&lt;br /&gt;A LINQ query operations has there distinct phases:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;img src="http://gupta.lav.googlepages.com/bullets_post.GIF" align="left center" style="border:solid 1px white; padding:0px;"/&gt;&amp;nbsp; Recognizing the Data Source&lt;/strong&gt;&lt;br /&gt;With LINQ, there is another concept that has been introduced called Queryable, implementing interface IQueryable. Any Enumerable type is a queryable type and it requires no modification as a LINQ data source. If the source data is not already in memory as a queryable type, the LINQ provider must represent it as such. For example, LINQ to XML loads an XML document into a queryable XElement type.Types such as ArrayList that support the non-generic IEnumerable interface can also be used as a LINQ data source.&lt;br /&gt;Here we will take an example of array int.&lt;br /&gt;&lt;span style="font-family:courier new;font-size:11;color:black;"&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;int&lt;/span&gt;[]&amp;nbsp;array&amp;nbsp;=&amp;nbsp;&lt;span style="color:blue;"&gt;new&amp;nbsp;int&lt;/span&gt;[]&amp;nbsp;{0,1,2,3,4};&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;img src="http://gupta.lav.googlepages.com/bullets_post.GIF" align="left center" style="border:solid 1px white; padding:0px;"/&gt;&amp;nbsp; Defining the Query&lt;/strong&gt;&lt;br /&gt;A query specifies what data to be retrieved from a data source and how that information should be sorted and grouped. A query is stored in a query variable and initialized with a query expression. To make it easier to write queries, C# has introduced new query syntax.&lt;br /&gt;&lt;span style="font-family:courier new;font-size:11;color:black;"&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;//&amp;nbsp;myQuery&amp;nbsp;is&amp;nbsp;an&amp;nbsp;IEnumerable&amp;nbsp;of&amp;nbsp;type&amp;nbsp;int&lt;/span&gt;&lt;br /&gt;var&amp;nbsp;myQuery&amp;nbsp;=&lt;br /&gt;from&amp;nbsp;n&amp;nbsp;&lt;span style="color:blue;"&gt;in&lt;/span&gt;&amp;nbsp;array&lt;br /&gt;where&amp;nbsp;(n&amp;nbsp;%&amp;nbsp;2)&amp;nbsp;==&amp;nbsp;0&lt;br /&gt;select&amp;nbsp;n;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Here the query expression contains three clauses: from, where and select just like any SQL query. The "from" clause specifies the data source, the "where" clause applies the filter, and the "select" clause specifies the type of the returned elements.&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;The important point is that in LINQ, the query variable itself takes no action and returns no data. It just stores the information that is required to produce the results when the query is executed at some later point.&lt;br /&gt;&lt;br /&gt;Queries can also be expressed by using method syntax.( Something I am not aware right now )&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;img src="http://gupta.lav.googlepages.com/bullets_post.GIF" align="left center" style="border:solid 1px white; padding:0px;"/&gt;&amp;nbsp; Query Execution&lt;/strong&gt;&lt;br /&gt;The query variable itself only stores the query commands. The actual execution of the query is deferred until we iterate over the query variable in a foreach statement. This concept is regarded as "deferred execution" and is demonstrated in the following example:&lt;br /&gt;&lt;span style="font-family:courier new;font-size:11;color:black;"&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;foreach&lt;/span&gt;&amp;nbsp;(&lt;span style="color:blue;"&gt;int&lt;/span&gt;&amp;nbsp;num&amp;nbsp;&lt;span style="color:blue;"&gt;in&lt;/span&gt;&amp;nbsp;myQuery)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(&amp;nbsp;&lt;span style="color:#a31515;"&gt;"{0}"&lt;/span&gt;,&amp;nbsp;num&amp;nbsp;);&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Because the query variable itself never holds the query results, we can execute it as often as we like. For example, we may have a database that is being updated continually by a separate application, we could create one query that retrieves the latest data, and we could execute it repeatedly at some interval to retrieve different results every time.&lt;br /&gt;Whenever the query variable is accessed or any of it's method is called, the query gets executed and the result sets are cached in the respective objects. This term is regarded as "Forced execution".&lt;br /&gt;You can refer &lt;a href="http://msdn.microsoft.com/en-us/library/bb397897.aspx"&gt;msdn&lt;/a&gt; for further details.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-3426633027353625025?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oEQoTMFcVqNRSxVmJO-qAd4GJQY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oEQoTMFcVqNRSxVmJO-qAd4GJQY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oEQoTMFcVqNRSxVmJO-qAd4GJQY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oEQoTMFcVqNRSxVmJO-qAd4GJQY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/tAodUs_qIpM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/3426633027353625025/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/07/linq-language-integrated-query.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/3426633027353625025?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/3426633027353625025?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/tAodUs_qIpM/linq-language-integrated-query.html" title="LINQ - Introduction" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/07/linq-language-integrated-query.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcFQnw_fSp7ImA9WxdWEEw.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-4281284385832508769</id><published>2008-07-01T18:37:00.003+05:30</published><updated>2008-07-02T21:56:53.245+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-02T21:56:53.245+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="Marshalling" /><title>Marshalling Array of Structures</title><content type="html">It is fairly easy to Marshal simple structures in .NET but when it comes to sending a whole bunch of structures as parameter it’s little head scratching task if you have not done it already. The worst part is you won’t find any articles on how one should go about it. When I had to marshal an array of structures, every time I ran into same state of confusion. I decided to blog it this time (for future reference of course :) ) &lt;br /&gt;So let’s assume there is a structure called &lt;span style="font-size:11;font-family:courier new;color:darkgreen;"&gt;StructType&lt;/span&gt; and structArray be an array of &lt;span style="font-size:11;font-family:courier new;color:darkgreen;"&gt;StructType&lt;/span&gt;.&lt;br /&gt;&lt;span style="font-size:11;font-family:courier new;color:black;"&gt;&lt;!-- SIZE --&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;//Lets not bother about how the array was populated&lt;/span&gt;&lt;br /&gt;&lt;span style="color:darkgreen;"&gt;StructType&lt;/span&gt;[] structArray = &lt;span style="color:#3333ff;"&gt;new&lt;/span&gt; GetStructArray();&lt;br /&gt;&lt;span style="color:green;"&gt;   // Get the size of each element&lt;/span&gt;&lt;br /&gt;   &lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; structSize = &lt;span style="color:darkgreen;"&gt;Marshal&lt;/span&gt;.SizeOf(structArray [0]);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Here int can be replaced with long (depends on 32 bit or 64 bit addressing)&lt;br /&gt;&lt;span style="font-size:11;font-family:courier new;color:black;"&gt;&lt;!-- SIZE --&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;// Total size of the memory block&lt;/span&gt;&lt;br /&gt;   &lt;span style="color:darkgreen;"&gt;IntPtr&lt;/span&gt; ptr = &lt;span style="color:darkgreen;"&gt;Marshal&lt;/span&gt;.AllocHGlobal(structSize * structArray.Length);&lt;br /&gt;   &lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; addr = (&lt;span style="color:#3333ff;"&gt;int&lt;/span&gt;)ptr;&lt;br /&gt;   for (&lt;span style="color:#3333ff;"&gt;int&lt;/span&gt; index = 0; index &lt; structArray.Length; index++)&lt;br /&gt;   {&lt;br /&gt;     &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:darkgreen;"&gt;Marshal&lt;/span&gt;.StructureToPtr(structArray [index],&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(&lt;span style="color:darkgreen;"&gt;IntPtr&lt;/span&gt;)(addr + structSize * index),false);&lt;br /&gt;   }                                     &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The IntPtr type ptr will hold the address of the memory block containing StructType array.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-4281284385832508769?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/aJV-A9zLhq1MBbNV4nDz66UixTs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aJV-A9zLhq1MBbNV4nDz66UixTs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/aJV-A9zLhq1MBbNV4nDz66UixTs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aJV-A9zLhq1MBbNV4nDz66UixTs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/mvR4oMK23eE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/4281284385832508769/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/07/marshalling-array-of-structures_1430.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/4281284385832508769?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/4281284385832508769?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/mvR4oMK23eE/marshalling-array-of-structures_1430.html" title="Marshalling Array of Structures" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/07/marshalling-array-of-structures_1430.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEcARXg5cCp7ImA9WxdWEE0.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-7192753178962811823</id><published>2008-06-29T09:46:00.002+05:30</published><updated>2008-07-02T18:04:04.628+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-02T18:04:04.628+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips and Tricks" /><title>One for new bloggers</title><content type="html">A nice &lt;a href="http://googlerzone.blogspot.com/"&gt;blog&lt;/a&gt; for all new googlers. Gives useful informations and hacks on how to create effective blogs and to monetize your existing ones.&lt;br /&gt;I liked it.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-7192753178962811823?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OyD7nS57YEE0cksFHIiY_kjzBwM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OyD7nS57YEE0cksFHIiY_kjzBwM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OyD7nS57YEE0cksFHIiY_kjzBwM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OyD7nS57YEE0cksFHIiY_kjzBwM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/0ENWbEN241c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/7192753178962811823/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/06/one-for-new-bloggers.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/7192753178962811823?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/7192753178962811823?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/0ENWbEN241c/one-for-new-bloggers.html" title="One for new bloggers" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/06/one-for-new-bloggers.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIARX4zcCp7ImA9WxdQGEU.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-5283445591884197401</id><published>2008-06-19T17:22:00.004+05:30</published><updated>2008-06-19T19:05:44.088+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-19T19:05:44.088+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Creational Patterns" /><category scheme="http://www.blogger.com/atom/ns#" term="Design Patterns" /><title>Factory Method</title><content type="html">In this design pattern, a contract is defined for creating an object. All derieved classes who implements this policy(via virtual method or implementing an interface ) decide which object in a class heirarchy to instantiate.&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:11px;"&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;class&lt;/span&gt; &lt;span style="color:green;"&gt;Creator&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="color:#3333ff;"&gt;virtual&lt;/span&gt; &lt;span style="color:green;"&gt;MyObject&lt;/span&gt; CreateObject();&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Creator defines a contract that all its derieved classes expose a method "CreateObject" which should return an object which "IS" a MyObject.&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-size:11px;"&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;class&lt;/span&gt; &lt;span style="color:green;"&gt;MyObject&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;  ..&lt;br /&gt;  ..&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;class&lt;/span&gt; &lt;span style="color:green;"&gt;MyConcreteObject : MyObject&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;  ..&lt;br /&gt;  ..&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;class&lt;/span&gt; &lt;span style="color:green;"&gt;MyOtherConcreteObject : MyObject&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;  ..&lt;br /&gt;  ..&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;MyConcreteObject and MyOtherConcreObject are different flavour of MyObject.Each of the class share IS relationship with MyObject.&lt;br /&gt;Let's implement few "Creators".&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-size:11px;"&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;br /&gt;class&lt;/span&gt; &lt;span style="color:green;"&gt;MyConcereteObjectCreater : Creator&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="color:#3333ff;"&gt;virtual&lt;/span&gt; &lt;span style="color:green;"&gt;MyObject&lt;/span&gt; CreateObject()&lt;br /&gt;  &amp;nbsp;&amp;nbsp;{&lt;br /&gt;   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color:#3333ff;"&gt;return new &lt;/span&gt;&lt;span style="color:green;"&gt;MyConcreteObject();&lt;/span&gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;br /&gt;class&lt;/span&gt; &lt;span style="color:green;"&gt;MyOtherConcereteObjectCreater : Creator&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;  &amp;nbsp;&amp;nbsp;&lt;span style="color:#3333ff;"&gt;virtual&lt;/span&gt; &lt;span style="color:green;"&gt;MyObject&lt;/span&gt; CreateObject()&lt;br /&gt;  &amp;nbsp;&amp;nbsp;{&lt;br /&gt;    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color:#3333ff;"&gt;return new &lt;/span&gt;&lt;span style="color:green;"&gt;MyOtherConcreteObject();&lt;/span&gt;&lt;br /&gt;  &amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Now the module which requires different flavours of MyObject need not worry about the instantiation of MyObject. It delegates the responsibility to "Creator" classes and they decide which type of MyObject is created.&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-size:11px;"&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;br /&gt;void&lt;/span&gt; &lt;span style="color:green;"&gt;SomeMethod&lt;/span&gt;(&lt;span style="color:green;"&gt;Creator&lt;/span&gt; bClass)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color:green;"&gt;MyObject&lt;/span&gt; myObject = bClass.CreateObject();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span style="color:lightgreen;"&gt;// MyObject is specific to a particular Concrete Class&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Advantages of Abstract Method:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;Factory methods gives a hook for providing an extended version of an object.&lt;br /&gt; &lt;li&gt;Connects parallel hierarchies (MyObject --&gt; Creator)&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-5283445591884197401?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Q2YgoSolxjBqdkuzlbjkHRky2to/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q2YgoSolxjBqdkuzlbjkHRky2to/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Q2YgoSolxjBqdkuzlbjkHRky2to/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q2YgoSolxjBqdkuzlbjkHRky2to/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/NXxFGiN4g4U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/5283445591884197401/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/06/factory-method.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/5283445591884197401?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/5283445591884197401?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/NXxFGiN4g4U/factory-method.html" title="Factory Method" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/06/factory-method.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IFRX47cCp7ImA9WxdXE0U.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-1918682015220314761</id><published>2008-06-17T07:56:00.015+05:30</published><updated>2008-06-25T14:48:34.008+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-25T14:48:34.008+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Creational Patterns" /><category scheme="http://www.blogger.com/atom/ns#" term="Design Patterns" /><title>Creational Patterns</title><content type="html">Creational design patterns abstract the instantiation process. Introducing this design patterns makes a system independent of how its objects are created and composed.&lt;br /&gt;Two major responsibilities of Creational patterns are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To encapsulate the concrete classes that system uses.&lt;/li&gt;&lt;li&gt;To encapsulate how instances of these classes are created.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="color:#ff5706;"&gt;&lt;strong&gt;Factory Method:&lt;/strong&gt;&lt;/span&gt; Creates an Instance from a several derieved classes&lt;br /&gt;&lt;p&gt;&lt;span style="color:#ff5706;"&gt;&lt;strong&gt;Abstract Factory:&lt;/strong&gt;&lt;/span&gt; Creates Instance from several family of related classes.&lt;br /&gt;&lt;p&gt;&lt;span style="color:#ff5706;"&gt;&lt;strong&gt;Builder:&lt;/strong&gt;&lt;/span&gt; Separates object instantiation from object representation.&lt;br /&gt;&lt;p&gt;&lt;span style="color:#ff5706;"&gt;&lt;strong&gt;Prototype:&lt;/strong&gt;&lt;/span&gt; A single object is copied and cloned.&lt;br /&gt;&lt;br /&gt;(.. to be continued in detail )&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-1918682015220314761?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jONF0HVLUn2fgEpDKS_dG68dWPs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jONF0HVLUn2fgEpDKS_dG68dWPs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jONF0HVLUn2fgEpDKS_dG68dWPs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jONF0HVLUn2fgEpDKS_dG68dWPs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/yEfHvIK_UKI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/1918682015220314761/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/06/creation-patterns.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/1918682015220314761?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/1918682015220314761?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/yEfHvIK_UKI/creation-patterns.html" title="Creational Patterns" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/06/creation-patterns.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08ASHc9cSp7ImA9WxdRGUU.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-286114771798631561</id><published>2008-06-07T12:27:00.006+05:30</published><updated>2008-06-09T11:07:29.969+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-09T11:07:29.969+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Design Patterns" /><title>Common Software Design Blunders</title><content type="html">I have been reviewing some of the codes at work (mostly my own ;) ).We make lots of " mind numbingly stupid" mistakes when designing a software, only to regret later.Here are my favourite ones. &lt;div&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff9900;"&gt;Explicit object Instantiation:&lt;/span&gt;&lt;/strong&gt; If your design involves instantiating objects from concrete classes, then there's a flaw already.This commits an application to a particular implementation instead of a particular interface , it complicates future (unavoidable) changes.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#990000;"&gt;&lt;strong&gt;&lt;span style="color:#ff9900;"&gt;Visibility to (Server) Object Implementation:&lt;/span&gt; &lt;/strong&gt;&lt;/span&gt;If a client module knows how an object is represented or Implemented, it tends (rather unknowningly) to a design which is more specific to object's implementation.Hiding this information from client is better design because even if implementation of the object used is changed or altered, there are no cascading changes on the client.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#990000;"&gt;&lt;span style="color:#ff9900;"&gt;Algorithmic Dependencies:&lt;/span&gt; &lt;/span&gt;&lt;/strong&gt;Algorithms are prone to changes in the name of optimization and often are replaced with better ones. Objects that depend on an algorithm will have to change whenever algorithm changes. Therefore algorithms that are likely to change should be isolated from rest of the lot.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#ff9900;"&gt;Too much SubClassing:&lt;/span&gt; &lt;/strong&gt;Subclassing requires an in-depth understanding of the parent class. Overriding one method might require overriding another and so on.Different ways of object composition would be a better approach than extending functionality by subclassing.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-286114771798631561?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_hrFuS5YlPicPKE6Ecr22VRcV40/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_hrFuS5YlPicPKE6Ecr22VRcV40/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_hrFuS5YlPicPKE6Ecr22VRcV40/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_hrFuS5YlPicPKE6Ecr22VRcV40/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/XgiwJgmh7qs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/286114771798631561/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/06/common-software-design-blunders.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/286114771798631561?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/286114771798631561?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/XgiwJgmh7qs/common-software-design-blunders.html" title="Common Software Design Blunders" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/06/common-software-design-blunders.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EFR3s9eSp7ImA9WhRTE04.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-8677618460010388254</id><published>2008-05-25T12:00:00.005+05:30</published><updated>2011-11-03T20:16:56.561+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-03T20:16:56.561+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips and Tricks" /><title>C# Source Analysis tool</title><content type="html">&lt;div class="Section1"&gt;&lt;p&gt;&lt;span&gt;Microsoft has announced release of a new developer tool, Source Analysis for C#. This tool will help teams enforce a common set of best practices for layout, readability, maintainability, and documentation of C# source code. Source Analysis is similar in many ways to Microsoft Code Analysis tool FxCop, but there are some clear distinctions. FxCop performs its analysis on compiled binaries, while Source Analysis analyzes the source code directly. For this reason, Code Analysis focuses more on the design of the code, while Source Analysis focuses on layout, readability and documentation.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span &gt;&lt;a href="http://code.msdn.microsoft.com/sourceanalysis/Release/ProjectReleases.aspx?ReleaseId=1047"&gt;download tool &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-8677618460010388254?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4rPi7R0ITMVlGLq8K1tsXQimkcQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4rPi7R0ITMVlGLq8K1tsXQimkcQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4rPi7R0ITMVlGLq8K1tsXQimkcQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4rPi7R0ITMVlGLq8K1tsXQimkcQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/5DvnpahL5GE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/8677618460010388254/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/05/c-source-analysis-tool.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/8677618460010388254?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/8677618460010388254?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/5DvnpahL5GE/c-source-analysis-tool.html" title="C# Source Analysis tool" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/05/c-source-analysis-tool.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4GSXo-eyp7ImA9WxdRGUQ.&quot;"><id>tag:blogger.com,1999:blog-6114933944393517756.post-587068374753928619</id><published>2008-05-18T11:22:00.004+05:30</published><updated>2008-06-09T11:25:28.453+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-09T11:25:28.453+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hyderabad" /><title>Hyderabad Traffic</title><content type="html">&lt;div class="Section1"&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-family:verdana;"&gt;I just had a near death experience today riding my bike to office. And tell you what, it is not something new in Hyderabad.Whether you see a BMW or some tin can with wheels, you have a maverick driver behind the wheel. Where on earth do you find traffic rules that are applicable only from 8 am to 8 pm? And if you try to follow these "nonexistent" rules, others make you look like a chump. There is total disregard for others' safety. &lt;/span&gt;&lt;span style="font-family:verdana;"&gt;Traffic signals do not mean anything more than blipping lights around the corner. It’s quite frustrating to see even so called educated people practicing these sort of “senseless” driving. I don't figure whether it's just a mad rush or men trying to get their pregnant wives to a hospital, everyone seems to be in crisis to reach "somewhere" in a jiffy.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;span style="font-family:verdana;"&gt;We are witnessing Hyderabad developing into a Cosmopolitan (at least people say so..), it’s about time we have matching traffic etiquettes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8032507301927080";
/* 468x60, created 3/29/08 */
google_ad_slot = "0309506949";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = ""; // on file
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6114933944393517756-587068374753928619?l=blog.lavgupta.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WRnyzEMW6of1U89GiefPM85Y-OY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WRnyzEMW6of1U89GiefPM85Y-OY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WRnyzEMW6of1U89GiefPM85Y-OY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WRnyzEMW6of1U89GiefPM85Y-OY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/axml/~4/-k91sLri9qQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.lavgupta.com/feeds/587068374753928619/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.lavgupta.com/2008/05/hyderabad-traffic-sucks.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/587068374753928619?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6114933944393517756/posts/default/587068374753928619?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/axml/~3/-k91sLri9qQ/hyderabad-traffic-sucks.html" title="Hyderabad Traffic" /><author><name>Lav G</name><uri>http://www.blogger.com/profile/05690260846805465249</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="http://1.bp.blogspot.com/_G5xK88LC8vY/SUUFJ24OldI/AAAAAAAADVg/WhQcsGSRCeQ/s1600-R/display.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://blog.lavgupta.com/2008/05/hyderabad-traffic-sucks.html</feedburner:origLink></entry></feed>

