<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4197940785631296342</id><updated>2011-11-27T15:53:58.325-08:00</updated><category term='modify web.config asp.net C# code'/><category term='asp.net dropdownlist bind generics C#'/><category term='fedora 10 release download'/><category term='Read Write Registry C# .net code'/><category term='if statement ternary operator C#'/><category term='asp.net compile C# VB'/><category term='How to Backup MySQL Database automatically  in linux'/><category term='html label tag advantages'/><category term='force single instance of application C# .net'/><category term='design gui tip'/><category term='iis connection limit 403.9 error'/><category term='multiple submit buttons and the enter key'/><category term='play sound window form C# SoundPlayer'/><category term='validate integer C# asp.net tryparse vs convert.toint32'/><category term='virtual keyword C#'/><category term='world sleep day 2009'/><title type='text'>adeel's blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-3493347412507355103</id><published>2010-01-07T03:51:00.000-08:00</published><updated>2010-01-07T03:58:13.908-08:00</updated><title type='text'>Using Amazon S3 SDK Pre-signedURL function</title><content type='html'>Today i was just exploring the amazon sdk. While using the presignedurl function of amazon sdk(C#), i was just curious that what is the server response time , zone. The amazon s3 returns the time in UTC. so simple but i was just curious that if we input time in GMT and it automatically convert it according to requestee IP time zone. i have tried to confirm but first i checked with UTC and it works 100% correctly. The second try i did is that i sent a GMT time and it works too. The amazon convert GMT to UTC according to client location. The sample code look like:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public string GetPreSignedURL(string bucketName, string key)&lt;br /&gt;        {&lt;br /&gt;            string url = string.Empty;&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;AmazonS3 client = Amazon.AWSClientFactory.CreateAmazonS3Client("ur access key", "secret key");&lt;br /&gt;             &lt;br /&gt;                GetPreSignedUrlRequest request = new GetPreSignedUrlRequest().WithProtocol(Protocol.HTTPS).WithBucketName(bucketName).WithKey(key).WithExpires(DateTime.UtcNow.AddMinutes(1));&lt;br /&gt;                url = client.GetPreSignedURL(request);&lt;br /&gt;            }&lt;br /&gt;            catch { }&lt;br /&gt;            return url;&lt;br /&gt;        }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-3493347412507355103?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/3493347412507355103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=3493347412507355103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/3493347412507355103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/3493347412507355103'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2010/01/today-i-was-just-exploring-amazon-sdk.html' title='Using Amazon S3 SDK Pre-signedURL function'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-6096154114920928744</id><published>2009-09-29T21:26:00.000-07:00</published><updated>2009-09-29T21:39:43.288-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iis connection limit 403.9 error'/><title type='text'>Increase IIS 5 connection limit on windows</title><content type='html'>On a non server edition of window operating system, we often got the error.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;There are too many people accessing the Web site at this time.&lt;/span&gt; &lt;br/&gt; &lt;span style="font-weight:bold;"&gt;OR&lt;span style="font-style:italic;"&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;HTTP 403.9 - Access Forbidden: Too many users are connected&lt;br /&gt;Internet Information Services&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To increase the connection limit, go to :&lt;br /&gt;1 -  Go to directory &lt;span style="font-weight:bold;"&gt;c:\inetpub\AdminScripts &lt;/span&gt;&lt;br /&gt;2 -  Execute the following command.&lt;br/&gt; &lt;span style="font-weight:bold;"&gt;adsutil set w3svc/MaxConnections 40&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-6096154114920928744?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/6096154114920928744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=6096154114920928744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/6096154114920928744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/6096154114920928744'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/09/increase-iis-5-connection-limit-on.html' title='Increase IIS 5 connection limit on windows'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-8522182243626472731</id><published>2009-08-26T00:36:00.000-07:00</published><updated>2009-08-26T00:46:26.556-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Read Write Registry C# .net code'/><title type='text'>Read or Write on Registry in C#</title><content type='html'>Registry is a special place where applications stores its setting. Although Isolated storage for .net is a preferred way for storing &lt;br /&gt;application settings yet registry has its own benefit. Normally it is difficult to find application created registry entries(if created carefully).&lt;br /&gt;Below is a sample C# code.&lt;br /&gt;&lt;br /&gt;//It will create a new subkey if not already created. otherwise it opens the existing one with write access.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RegistryKey objRegistryKey = Registry.CurrentUser.CreateSubKey("App_Name");&lt;/span&gt;&lt;br /&gt;//Suppose i want to save last open time when application opened.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;objRegistryKey.SetValue("LastOpenTime", DateTime.Now.ToString());&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To get the value from registry, you use&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;string lastOpenDT = objRegistryKey.GetValue("LastOpenTime") as string;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The GetValue return the object type. you can than cast to the appropriate type. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Don't forget to add Microsoft.Win32 namespace.&lt;br /&gt;&lt;br /&gt;For further reading,you can see the following two classess at msdn.&lt;br /&gt;Registry,RegistryKey class.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-8522182243626472731?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/8522182243626472731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=8522182243626472731' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/8522182243626472731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/8522182243626472731'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/08/read-or-write-on-registry-in-c.html' title='Read or Write on Registry in C#'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-7216334055288984051</id><published>2009-05-20T20:47:00.000-07:00</published><updated>2009-05-20T21:00:53.992-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='multiple submit buttons and the enter key'/><title type='text'>multiple submit buttons and the enter key</title><content type='html'>As you know it is the limitation of asp.net that it has only one form, so if you have another section which needs enter key submission, than you can use default button as used below.&lt;br /&gt;The defaultButton property of Panel or Form is used to ensure Enter Key Submission.  Typically people used to Enter Key submission and if it is disabled, it might be annoying certain times.&lt;br /&gt;&lt;br /&gt;The defaultButton really provides a way to handle Enter Keys for respective portions of the page when the focus is there.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&amp;lt;form defaultbutton="button1" runat="server"&amp;gt;&lt;br /&gt; &amp;lt;asp:textbox id="textbox1" runat="server"/&amp;gt;&lt;br /&gt; &amp;lt;asp:textbox id="textbox2" runat="server"/&amp;gt;&lt;br /&gt; &amp;lt;asp:button id="button1" text="Button1" runat="server"/&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;asp:panel defaultbutton="button2" runat="server"&amp;gt;&lt;br /&gt;     &amp;lt;asp:textbox id="textbox3" runat="server"/&amp;gt;&lt;br /&gt;     &amp;lt;asp:button id="button2" runat="server"/&amp;gt;&lt;br /&gt; &amp;lt;/asp:panel&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-7216334055288984051?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/7216334055288984051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=7216334055288984051' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/7216334055288984051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/7216334055288984051'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/05/multiple-submit-buttons-and-enter-key.html' title='multiple submit buttons and the enter key'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-3491267328845594013</id><published>2009-04-24T03:25:00.000-07:00</published><updated>2009-04-24T03:26:14.229-07:00</updated><title type='text'>Extract links from html in C#</title><content type='html'>private List&lt;string&gt; ExtractLinks(string html)&lt;br /&gt;       {&lt;br /&gt;           List&lt;string&gt; links = new List&lt;string&gt;();&lt;br /&gt;&lt;br /&gt;           string startSquence = "&amp;lt;a";&lt;br /&gt;           string endSequence = "&amp;lt;/a&amp;gt;";&lt;br /&gt;&lt;br /&gt;           html = html.ToLower();&lt;br /&gt;&lt;br /&gt;           while (html.IndexOf("&amp;lt;a") != -1)&lt;br /&gt;           {&lt;br /&gt;               int start = html.IndexOf(startSquence) ;&lt;br /&gt;               int end = html.IndexOf(endSequence, start+startSquence.Length);&lt;br /&gt;&lt;br /&gt;               //Extract the link, and add it to the list&lt;br /&gt;               if (end &gt; start)&lt;br /&gt;               {&lt;br /&gt;                   string link = html.Substring(start, end + endSequence.Length - start);&lt;br /&gt;&lt;br /&gt;                   //Check b&lt;a&gt;&lt;br /&gt;                   if (link.Substring(1).IndexOf(startSquence) != -1)&lt;br /&gt;                   {&lt;br /&gt;                       html = html.Substring(start + startSquence.Length);&lt;br /&gt;                       continue;&lt;br /&gt;                   }&lt;br /&gt;&lt;br /&gt;                   if (link != string.Empty)&lt;br /&gt;                   {&lt;br /&gt;                       links.Add(link);&lt;br /&gt;                   }&lt;br /&gt;               }&lt;br /&gt;               else if (end &lt; start)&lt;br /&gt;               {&lt;br /&gt;                   html = html.Substring(start + startSquence.Length);&lt;br /&gt;                   continue;&lt;br /&gt;               }&lt;br /&gt;               //Trim the raw data&lt;br /&gt;               html = html.Substring(end + endSequence.Length);&lt;br /&gt;           }&lt;br /&gt;           return links;&lt;br /&gt;       }&lt;/a&gt;&lt;/string&gt;&lt;/string&gt;&lt;/string&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-3491267328845594013?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/3491267328845594013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=3491267328845594013' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/3491267328845594013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/3491267328845594013'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/04/extract-links-from-html-in-c.html' title='Extract links from html in C#'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-2997414541412020698</id><published>2009-04-22T03:28:00.000-07:00</published><updated>2009-04-22T03:32:26.345-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='modify web.config asp.net C# code'/><title type='text'>how to modify web.config in asp.net using C#</title><content type='html'>You can modify web.config at run time. For exmaple to add a property in app settings section of web.config, you can use the following c# code&lt;br /&gt;&lt;br /&gt;Configuration myConfiguration = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");&lt;br /&gt;            myConfiguration.AppSettings.Settings.Add("CommentsLimit", "10");&lt;br /&gt;            myConfiguration.Save();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To update the existing property:&lt;br /&gt;Configuration myConfiguration = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");&lt;br /&gt;            myConfiguration.AppSettings.Settings["CommentsLimit"].Value = "20";&lt;br /&gt;            myConfiguration.Save();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-2997414541412020698?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/2997414541412020698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=2997414541412020698' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/2997414541412020698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/2997414541412020698'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/04/how-to-modify-webconfig-in-aspnet-using.html' title='how to modify web.config in asp.net using C#'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-4949323200946879514</id><published>2009-04-09T21:40:00.000-07:00</published><updated>2009-04-09T21:51:22.069-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virtual keyword C#'/><title type='text'>virtual keyword in C#</title><content type='html'>If a base class method is to be overriden, it is defined using the keyword &lt;span style="font-weight:bold;"&gt;virtual &lt;/span&gt;&lt;br /&gt;The class member method may be overriden even if the virtual keyword is not used, but its usage makes the code more transparent &amp; meaningful. &lt;br /&gt;&lt;br /&gt;When the override keyword is used to override the virtual method, in a scenario where the base class method is required in a child class along with the overriden method, then the &lt;span style="font-weight:bold;"&gt;base&lt;/span&gt; keyword may be used to access the parent class member. The following example will be helpful to understand.&lt;br /&gt;&lt;br /&gt;public class Shape&lt;br /&gt;{&lt;br /&gt;    string name;&lt;br /&gt;    public virtual void SetName(string name) &lt;br /&gt;    { this.name = name; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class Circle : Shape&lt;br /&gt;{&lt;br /&gt;    //This method is being overriden&lt;br /&gt;    public override void SetName(string name) &lt;br /&gt;    {&lt;br /&gt;        base.SetName("circle");    //We are calling parent class method&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-4949323200946879514?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/4949323200946879514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=4949323200946879514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/4949323200946879514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/4949323200946879514'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/04/virtual-keyword-in-c-if-base-class.html' title='virtual keyword in C#'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-8351433000682380038</id><published>2009-04-08T21:34:00.000-07:00</published><updated>2009-04-08T21:59:26.025-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='How to Backup MySQL Database automatically  in linux'/><title type='text'>How to Backup MySQL Database automatically  in linux</title><content type='html'>The command for back up a mysql database is:&lt;br /&gt;&lt;br /&gt;15 2 * * * root mysqldump -u root -pPASSWORD --all-databases | gzip &gt; /mnt/disk2/database_`data '+%m-%d-%Y'`.sql.gz&lt;br /&gt;&lt;br /&gt;The first part is "15 2 * * *". The five fields mean "minute, hour, day of month, month, day of week" respectively. The character '*' stands for "any". &lt;br /&gt;The next, "root", means "run following command as root account". &lt;br /&gt;&lt;br /&gt;You can use cron job so that it takes backup daily.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-8351433000682380038?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/8351433000682380038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=8351433000682380038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/8351433000682380038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/8351433000682380038'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/04/how-to-backup-mysql-database.html' title='How to Backup MySQL Database automatically  in linux'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-1426270430381018281</id><published>2009-03-20T14:47:00.000-07:00</published><updated>2009-03-20T14:51:39.338-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='world sleep day 2009'/><title type='text'>World Sleep Day 2009</title><content type='html'>&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:9;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:9;"  &gt;&lt;p style="margin: 0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;World Sleep Day is an international annual event, intended to be a celebration of sleep and a call to action on important issues related to sleep, including medicine, education, social aspects and driving. It aims to lessen the burden of sleep problems on society through better prevention and management of sleep disorders. World Sleep Day 2009 is being held on March 20&lt;sup&gt;th&lt;/sup&gt;, under the slogan ‘Drive alert, arrive safe’.&lt;span&gt;   &lt;/span&gt;This year’s theme is transportation, focussing on safety, travel and driving alertness.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 10pt;" class="MsoNormal"&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;The first World Sleep Day was launched on March 14&lt;sup&gt;th&lt;/sup&gt; 2008. Events involving local groups took place in public settings around the world and online with the unveiling of a declaration, presentation of educational materials, and exhibition of videos.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 10pt;" class="MsoNormal"&gt;&lt;br /&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 0in 0in 10pt;" class="MsoNormal"&gt;&lt;br /&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;table border="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;The World Sleep Day declaration is as follows:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul style="margin-top: 0in;"&gt;&lt;li class="MsoNormal" style="margin: 0in 1.75pt 0pt 0in;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Whereas, sleepiness and sleeplessness constitute a global epidemic that threatens health and quality of life, &lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;p style="margin: 0in 1.75pt 0pt 0in;" class="MsoNormal"&gt; &lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;ul style="margin-top: 0in;"&gt;&lt;li class="MsoNormal" style="margin: 0in 1.75pt 0pt 0in;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Whereas, much can be done to prevent and treat sleepiness and sleeplessness,&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;p style="margin: 0in 1.75pt 0pt 0in;" class="MsoNormal"&gt; &lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;ul style="margin-top: 0in;"&gt;&lt;li class="MsoNormal" style="margin: 0in 1.75pt 0pt 0in;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Whereas, professional and public awareness are the firsts steps to action,&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;p style="margin: 0in 1.75pt 0pt 0in;" class="MsoNormal"&gt; &lt;/p&gt;&lt;ul style="margin-top: 0in;"&gt;&lt;li class="MsoNormal" style="margin: 0in 1.75pt 0pt 0in;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;We hereby DECLARE that the disorders of sleep are preventable and treatable medical conditions in every country of the world.&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt; &lt;img src="http://worldsleepday.wasmonline.org/images/stories/wsd%20logo.bmp" border="0" height="138" width="212" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;The World Sleep Day Committee would like you to assist in raising awareness of World Sleep Day 2009 by carrying out related activities in your country. &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(41, 41, 41); line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;World Sleep Day Committee members:&lt;br /&gt;Antonio Culebras, co-chair&lt;br /&gt;Liborio Parrino, co-chair&lt;br /&gt;Richard Allen,&lt;br /&gt;Sudhansu Chokroverty,&lt;br /&gt;Christian Guilleminault,&lt;br /&gt;Mario Terzano,&lt;br /&gt;Robert Thomas,&lt;br /&gt;Claudia Trenkwalder,&lt;br /&gt;Allan O’Bryan, WASM Executive Director.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(41, 41, 41); line-height: 115%;font-family:'Arial','sans-serif';font-size:10;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:9;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="line-height: 115%;font-family:'Arial','sans-serif';font-size:9;"  &gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Source:&lt;a href="http://worldsleepday.wasmonline.org/" rel="nofollow"&gt;http://worldsleepday.wasmonline.org/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-1426270430381018281?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/1426270430381018281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=1426270430381018281' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/1426270430381018281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/1426270430381018281'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/03/world-sleep-day-2009.html' title='World Sleep Day 2009'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-4927664381691296900</id><published>2009-03-05T03:41:00.000-08:00</published><updated>2009-04-08T23:05:30.047-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='validate integer C# asp.net tryparse vs convert.toint32'/><title type='text'>How to validate integer in c#</title><content type='html'>In C#, we often need to validate that the value is an int. So most developers use try catch block as below.&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;int t = Convert.ToInt32("wrongval");&lt;br /&gt;}&lt;br /&gt;catch&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;while the best approach to test must be:&lt;br /&gt;&lt;br /&gt;int num = 0;&lt;br /&gt;Int32.TryParse("wrongval", out num); //It will not throw any exception, In case of failure, it set the value of num to zero and also return FALSE.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if you see the performance of above two methods, you will be amazed that the TryParse method is 1000 times faster than Convert.ToInt32.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-4927664381691296900?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/4927664381691296900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=4927664381691296900' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/4927664381691296900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/4927664381691296900'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/03/how-to-validate-integer-in-c.html' title='How to validate integer in c#'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-9091474022110540143</id><published>2009-02-14T11:22:00.000-08:00</published><updated>2009-02-15T07:02:01.375-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='force single instance of application C# .net'/><title type='text'>force one instance of an application in .NET</title><content type='html'>To force a single instance of an application, either fetch all processess and check your application process name that is it already there or not. Another option is to use Mutex class.&lt;br /&gt;&lt;br /&gt;bool NoInstanceCurrently;&lt;br /&gt;System.Threading.Mutex mutex = new System.Threading.Mutex(false,  "applicationname", out NoInstanceCurrently);&lt;br /&gt;if (NoInstanceCurrently == false)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;              MessageBox.Show("Another Instance is Running", "ApplicationName", MessageBoxButtons.OK, MessageBoxIcon.Stop);&lt;br /&gt;              return;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-9091474022110540143?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/9091474022110540143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=9091474022110540143' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/9091474022110540143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/9091474022110540143'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/02/force-one-instance-of-application-in.html' title='force one instance of an application in .NET'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-1585089439055152443</id><published>2009-02-14T08:30:00.000-08:00</published><updated>2009-02-14T08:43:42.069-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='play sound window form C# SoundPlayer'/><title type='text'>Play sound from Window Form in C#</title><content type='html'>Playing a sound from window forms in C# is simple because of SoundPlayer class from System.Media namespace.&lt;br /&gt;&lt;br /&gt;SoundPlayer objSoundPlayer = new SoundPlayer("sound1.wav");&lt;br /&gt;objSoundPlayer .Play();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-1585089439055152443?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/1585089439055152443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=1585089439055152443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/1585089439055152443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/1585089439055152443'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/02/play-sound-using-c-window-form.html' title='Play sound from Window Form in C#'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-1902410220621050956</id><published>2009-01-31T11:49:00.001-08:00</published><updated>2009-01-31T11:56:07.545-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='if statement ternary operator C#'/><title type='text'>Single line If Statement.</title><content type='html'>string name = Session["UserName"];&lt;br /&gt;&lt;br /&gt;if(string.isNullOrEmpty(name))&lt;br /&gt;Response.Write("welcome guest");&lt;br /&gt;else&lt;br /&gt;Response.Write("welcome "+name);&lt;br /&gt;&lt;br /&gt;You can write it in single line as below.&lt;br /&gt;&lt;br /&gt;Response.Write((string.isNullOrEmpty(name)) ? "Welcome guest" :  "Welcome "+name);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-1902410220621050956?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/1902410220621050956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=1902410220621050956' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/1902410220621050956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/1902410220621050956'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/01/single-line-if-statement.html' title='Single line If Statement.'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-2604214916734915087</id><published>2009-01-31T11:44:00.000-08:00</published><updated>2009-01-31T11:47:41.592-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='html label tag advantages'/><title type='text'>The HTML Label Tag Benifits</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Make your forms accessible to screen readers&lt;br /&gt;Make your forms easy to click on&lt;br /&gt;Give your CSS more to hold on to&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To see more detail, check this &lt;a href="http://webdesign.about.com/od/forms/a/aa052206.htm" target="_blank"&gt;Link&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-2604214916734915087?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/2604214916734915087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=2604214916734915087' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/2604214916734915087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/2604214916734915087'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/01/html-label-tag-benifits.html' title='The HTML Label Tag Benifits'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-1907306593092743249</id><published>2009-01-31T11:40:00.000-08:00</published><updated>2009-01-31T11:43:11.804-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net dropdownlist bind generics C#'/><title type='text'>Use generics with drop down list</title><content type='html'>You can use generice to bind with drop down list. Suppose you have a class Country.&lt;br /&gt;&lt;br /&gt;public class Country&lt;br /&gt;{&lt;br /&gt;   int id;&lt;br /&gt;   string countryName;&lt;br /&gt;   &lt;br /&gt;   public int ID&lt;br /&gt;   {&lt;br /&gt;       get { return id; }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   public string CountryName&lt;br /&gt;   {&lt;br /&gt;       get { return countryName; }&lt;br /&gt;       set { countryName = value; }&lt;br /&gt;   }  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;List&lt;Country&gt; objCountry = new List&lt;Country&gt;();&lt;br /&gt;objCountry = objCountry.FetchCountries();&lt;br /&gt;ddlCountryList.DataSource = objCountry;&lt;br /&gt;ddlCountryList.DataTextField = "CountryName";&lt;br /&gt;ddlCountryList.DataValueField = "ID";&lt;br /&gt;ddlCountryList.DataBind();&lt;br /&gt;&lt;br /&gt;The ddlCountryList is an asp.net drop down list control.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-1907306593092743249?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/1907306593092743249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=1907306593092743249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/1907306593092743249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/1907306593092743249'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/01/use-generics-with-drop-down-list.html' title='Use generics with drop down list'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-2789770410360904700</id><published>2009-01-21T21:58:00.000-08:00</published><updated>2009-01-21T22:05:06.759-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design gui tip'/><title type='text'>Designing a GUI</title><content type='html'>A tip for designing a GUI(Graphical user interface) is that the items in the menu is in the range of 5 to 9. The reason is the famous rule of &lt;span style="font-style:italic;"&gt;George A. Miller&lt;/span&gt; &lt;span style="font-weight:bold;"&gt;Seven plus or minus two&lt;/span&gt;. it states that the human minds at a time remember seven plus or minus two items. so it is a good practice to not make more than seven items in a menu.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-2789770410360904700?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/2789770410360904700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=2789770410360904700' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/2789770410360904700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/2789770410360904700'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2009/01/designing-gui.html' title='Designing a GUI'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-4077882078024153829</id><published>2008-12-03T02:34:00.000-08:00</published><updated>2008-12-03T03:04:52.761-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net compile C# VB'/><title type='text'>Compiling C# and VB code together in asp.net</title><content type='html'>Yesterday i was working on a web application which uses vb classes. I have added a c# class added but asp.net compiler does not compile it as app_code folder becomes a single assembly so it allows only vb or C#.&lt;br /&gt;&lt;br /&gt;Tip:&lt;br /&gt;To compile both C# and VB, add this in web.config.&lt;br /&gt;&lt;br /&gt;&amp;lt;compilation debug="false"&amp;gt;&lt;br /&gt;&amp;lt;codesubdirectories&amp;gt;&lt;br /&gt;   &amp;lt;add directoryname="VBCode"&amp;gt;&lt;br /&gt;    &amp;lt;add directoryname="CSCode"&amp;gt;&lt;br /&gt;&amp;lt;/add&amp;gt;&lt;br /&gt;&amp;lt;/add&gt;&amp;lt;/codesubdirectories&amp;gt;&amp;lt;/compilation&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For more information, see this &lt;a href="http://msdn.microsoft.com/en-us/library/t990ks23.aspx" target="_blank"&gt;post&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-4077882078024153829?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/4077882078024153829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=4077882078024153829' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/4077882078024153829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/4077882078024153829'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2008/12/compiling-c-and-vb-code-together-in.html' title='Compiling C# and VB code together in asp.net'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-5301540978511327088</id><published>2008-12-01T09:24:00.000-08:00</published><updated>2008-12-01T09:30:06.854-08:00</updated><title type='text'>The Eight Commandments of Source Code Control</title><content type='html'>Yesterday I read source code control tips which are helpful for developers working in a team environment. Link was sent by my friend &lt;span style="font-weight:bold;"&gt;Awais&lt;/span&gt;. I am posting here to share this.&lt;br /&gt;&lt;br /&gt;       1. &lt;span style="font-weight:bold;"&gt;You&lt;/span&gt; shall check in early and check in often. You anger your coworkers when you check out a file and insist on keeping it checked out until some future point in time that is measured using variables that exist solely in your brain.&lt;br /&gt;&lt;br /&gt;       2. &lt;span style="font-weight:bold;"&gt;You&lt;/span&gt; shall never check in code that breaks the build. If you code does not compile, it does not belong in the source control repository.&lt;br /&gt;&lt;br /&gt;       3. &lt;span style="font-weight:bold;"&gt;You &lt;/span&gt;shall not go home for the day with files checked out, nor shall you depart for the weekend or for a vacation, with files checked out.&lt;br /&gt;&lt;br /&gt;       4. &lt;span style="font-weight:bold;"&gt;You&lt;/span&gt; shall leave a descriptive comment when checking in your code. You need not include your name or the date in the comment as that information is already tracked.&lt;br /&gt;&lt;br /&gt;       5. &lt;span style="font-weight:bold;"&gt;You&lt;/span&gt; shall use the 'Undo Checkout' option if you check out a file and do not make any changes. It displeases your coworkers when you check in code that has not changed at all from the original.&lt;br /&gt;&lt;br /&gt;       6. &lt;span style="font-weight:bold;"&gt;You&lt;/span&gt; shall not use comments to 'save' defunct code.  Fear not, for the code you delete still exists in the source control code history and can be retrieved if needed.&lt;br /&gt;&lt;br /&gt;       7. &lt;span style="font-weight:bold;"&gt;You&lt;/span&gt; shall use source control for more than archiving just code. The source code control repository makes an excellent storage for technical docs, SQL scripts, and other documents and files related to the project.&lt;br /&gt;&lt;br /&gt;       8. &lt;span style="font-weight:bold;"&gt;You&lt;/span&gt; shall religiously backup your source code control database on a regular basis and store a copy in an off-site location.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Source:&lt;/span&gt; http://scottonwriting.net/sowblog/posts/13581.aspx&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-5301540978511327088?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/5301540978511327088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=5301540978511327088' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/5301540978511327088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/5301540978511327088'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2008/12/eight-commandments-of-source-code.html' title='The Eight Commandments of Source Code Control'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-5050006271312294587</id><published>2008-11-25T21:09:00.000-08:00</published><updated>2008-11-25T21:15:02.352-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fedora 10 release download'/><title type='text'>fedora 10 released</title><content type='html'>Yesterday the fedora 10 released. click &lt;a href="http://fedoraproject.org/en/get-fedora"&gt;Here&lt;/a&gt; to download it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-5050006271312294587?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/5050006271312294587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=5050006271312294587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/5050006271312294587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/5050006271312294587'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2008/11/fedora-10-released.html' title='fedora 10 released'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-6762120617808707202</id><published>2008-11-25T05:56:00.000-08:00</published><updated>2008-11-25T05:57:47.182-08:00</updated><title type='text'>Generate properties from class variables</title><content type='html'>One of the nice thing about Visual studio is its macro support. You can create and use macros in visaul studio .net to increase the productivity. One feature which most developers wants a quick property generation from list of class variables but Visual Studio .NET has no shortcut for it. To achieve this, you have record or create a macro.&lt;br /&gt;&lt;br /&gt;So below is the Macro that generate the automatic properties from the member variables.&lt;br /&gt;&lt;br /&gt;Just copy the text below and then open VS.NET.Go to Tools-&gt; Macro-&gt;Macros IDE menu item.&lt;br /&gt;A new window will be open. click on mymacros and paste the below text and build it.&lt;br /&gt;&lt;br /&gt;After building, open your VS project. Go to Tools-&gt;Options. A dialog will be appeard. click on keyboard in Environment. Select your macro and assign a shortcut. For example Shift + F2. &lt;br /&gt;&lt;br /&gt;Imports System&lt;br /&gt;Imports EnvDTE&lt;br /&gt;Imports EnvDTE80&lt;br /&gt;Imports EnvDTE90&lt;br /&gt;Imports System.Diagnostics&lt;br /&gt;Imports System.Text&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Public Module Expand&lt;br /&gt;   Public Sub ExpandPrivateMembersFronSelection()&lt;br /&gt;       Dim TS As TextSelection =&lt;br /&gt;&lt;br /&gt;DTE.ActiveDocument.Selection&lt;br /&gt;       Dim strResult As String, Line As String&lt;br /&gt;       Dim Lines() As String =&lt;br /&gt;&lt;br /&gt;TS.Text.Split(vbNewLine)&lt;br /&gt;       For Each Line In Lines&lt;br /&gt;           strResult &amp;amp;= GetstrResult(Line)&lt;br /&gt;       Next&lt;br /&gt;       TS.EndOfLine()&lt;br /&gt;       TS.NewLine()&lt;br /&gt;       TS.Insert(vbCrLf &amp;amp; "#region ""Public&lt;br /&gt;&lt;br /&gt;Properties""" &amp;amp; vbCrLf &amp;amp; strResult &amp;amp;&lt;br /&gt;&lt;br /&gt;"#endregion" &amp;amp; vbCrLf)&lt;br /&gt;     &lt;br /&gt;&lt;br /&gt;DTE.ExecuteCommand("Edit.FormatDocument")&lt;br /&gt;   End Sub&lt;br /&gt;&lt;br /&gt;   Private Function GetstrResult(ByVal text As&lt;br /&gt;&lt;br /&gt;String) As String&lt;br /&gt;       Try&lt;br /&gt;           If (text.Contains("private")) Then&lt;br /&gt;               text = text.Replace("private",&lt;br /&gt;&lt;br /&gt;"")&lt;br /&gt;           End If&lt;br /&gt;           If (text.Contains(";")) Then&lt;br /&gt;               text = text.Replace(";", "")&lt;br /&gt;           End If&lt;br /&gt;           Dim words() As String =&lt;br /&gt;&lt;br /&gt;text.Trim.Split()&lt;br /&gt;         &lt;br /&gt;&lt;br /&gt;'System.Windows.Forms.MessageBox.Show(words(1))&lt;br /&gt;           If words.Length &lt; 2 Then&lt;br /&gt;               Return ""&lt;br /&gt;           Else&lt;br /&gt;               Dim strResult As New&lt;br /&gt;&lt;br /&gt;StringBuilder&lt;br /&gt;               strResult.AppendLine()&lt;br /&gt;             &lt;br /&gt;&lt;br /&gt;strResult.AppendLine(String.Format("public {0}&lt;br /&gt;&lt;br /&gt;{1}", words(0), StrConv(words(1)(0),&lt;br /&gt;&lt;br /&gt;VbStrConv.ProperCase)) &amp;amp; words(1).Substring(1))&lt;br /&gt;               strResult.AppendLine(vbTab &amp;amp; "{&lt;br /&gt;&lt;br /&gt;get { ")&lt;br /&gt;               strResult.AppendLine(vbTab &amp;amp;&lt;br /&gt;&lt;br /&gt;vbTab &amp;amp; "return " &amp;amp; words(1) &amp;amp; ";")&lt;br /&gt;               strResult.AppendLine(vbTab &amp;amp;&lt;br /&gt;&lt;br /&gt;"}")&lt;br /&gt;             &lt;br /&gt;&lt;br /&gt;strResult.AppendLine(String.Format(vbTab &amp;amp;&lt;br /&gt;&lt;br /&gt;"set"))&lt;br /&gt;               strResult.AppendLine(vbTab &amp;amp;&lt;br /&gt;&lt;br /&gt;vbTab &amp;amp; " { " &amp;amp; words(1) &amp;amp; " = value;")&lt;br /&gt;               strResult.AppendLine(vbTab &amp;amp;&lt;br /&gt;&lt;br /&gt;"}")&lt;br /&gt;               strResult.AppendLine("}")&lt;br /&gt;               Return strResult.ToString&lt;br /&gt;           End If&lt;br /&gt;       Catch ex As Exception&lt;br /&gt;         &lt;br /&gt;&lt;br /&gt;System.Windows.Forms.MessageBox.Show(ex.ToString&lt;br /&gt;&lt;br /&gt;)&lt;br /&gt;       End Try&lt;br /&gt;&lt;br /&gt;   End Function&lt;br /&gt;&lt;br /&gt;End Module&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Issues:&lt;br /&gt;Currently it will gives you incorrect result if the input is&lt;br /&gt;&lt;br /&gt;string p = string.Empty;&lt;br /&gt;&lt;br /&gt;You can customize macro according to your needs. The valid inputs are&lt;br /&gt;&lt;br /&gt;string p;&lt;br /&gt;&lt;br /&gt;private string q;&lt;br /&gt;&lt;br /&gt;Just select and press your assigned shortcut.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-6762120617808707202?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/6762120617808707202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=6762120617808707202' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/6762120617808707202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/6762120617808707202'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2008/11/generate-properties-from-class.html' title='Generate properties from class variables'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4197940785631296342.post-1694503264562346631</id><published>2007-09-05T06:05:00.000-07:00</published><updated>2007-09-05T06:11:06.293-07:00</updated><title type='text'>Microsoft flashes Silverlight for Linux</title><content type='html'>Microsoft is to make its recently unveiled Silverlight 'Flash killer' plug-in available on Linux.&lt;br /&gt;&lt;br /&gt;The commercial release of Silverlight 1.0 is a cross-browser, cross-platform plug-in for delivering richer user experiences on the web.&lt;br /&gt;&lt;br /&gt;Microsoft confirmed that it will work with Novell to deliver Silverlight support for Linux, called Moonlight, based on the project started on mono-project.com.&lt;br /&gt;&lt;br /&gt;The Redmond giant unveiled Silverlight at the 2007 National Association of Broadcasters conference in April and released the beta version to the public in May.&lt;br /&gt;&lt;br /&gt;Silverlight claims to significantly reduce development and deployment costs, and provides enhanced web audio and video streaming and playback using Windows Media.&lt;br /&gt;&lt;br /&gt;Ray Ozzie, chief software architect at Microsoft, said: "With today's release of Silverlight 1.0, we are making it possible for developers and designers to deliver to individuals the kind of high-def experiences they crave by integrating data and services in rich and unique ways."&lt;br /&gt;&lt;br /&gt;Ozzie added that Silverlight 1.0 will offer developers and designers new options for delivering content across multiple platforms including web, PC, phone and other devices.&lt;br /&gt;&lt;br /&gt;The decision to work with Novell to offer Silverlight support for the Linux platform is in direct response to customer feedback, both companies said.&lt;br /&gt;&lt;br /&gt;Microsoft is also rolling out the Silverlight Partner Initiative. More than 35 companies have already signed up to support Silverlight.&lt;br /&gt;&lt;br /&gt;Reference: vnunet.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4197940785631296342-1694503264562346631?l=adeelcap15.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://adeelcap15.blogspot.com/feeds/1694503264562346631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4197940785631296342&amp;postID=1694503264562346631' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/1694503264562346631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4197940785631296342/posts/default/1694503264562346631'/><link rel='alternate' type='text/html' href='http://adeelcap15.blogspot.com/2007/09/microsoft-flashes-silverlight-for-linux.html' title='Microsoft flashes Silverlight for Linux'/><author><name>adeel</name><uri>http://www.blogger.com/profile/12532177280156658391</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></entry></feed>
