<?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-7394798155197747859</id><updated>2012-02-16T08:41:11.973-06:00</updated><category term='C++'/><category term='araxis'/><category term='httpwatch'/><category term='State Management'/><category term='Sand Castle'/><category term='Reflecter'/><category term='STL'/><category term='MS Commerce Server 2007'/><category term='SelfSSL'/><category term='IE Developer Toolbar'/><category term='Sql Server'/><category term='Data Script'/><category term='IE Cookie Viewer'/><category term='Response.Redirect'/><category term='fxcop'/><category term='Session. Cookies'/><category term='SSL'/><category term='ThreadAbort'/><category term='ASP.Net'/><category term='Cookies'/><category term='PurchaseOrders'/><category term='fiddler'/><category term='Ndoc'/><title type='text'>Caveman's Igloo</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7394798155197747859.post-2327134226021821171</id><published>2008-03-31T12:18:00.001-05:00</published><updated>2008-03-31T12:20:53.146-05:00</updated><title type='text'>This Blog Has Moved!</title><content type='html'>This is friendly reminder that if you're looking for new and fresh content from yours truly (Caveman), you should head on over to my new blog at &lt;a href="http://cavemansblog.wordpress.com/"&gt;&lt;strong&gt;Caveman's blog&lt;/strong&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7394798155197747859-2327134226021821171?l=cavemansigloo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/2327134226021821171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7394798155197747859&amp;postID=2327134226021821171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/2327134226021821171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/2327134226021821171'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/2008/03/this-blog-has-moved.html' title='This Blog Has Moved!'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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-7394798155197747859.post-900934051342099892</id><published>2008-03-25T15:57:00.003-05:00</published><updated>2008-03-25T16:04:22.270-05:00</updated><title type='text'>Replace special characters in XML, using C#</title><content type='html'>We can use the &lt;em&gt;&lt;span style="color:#000099;"&gt;SecurityElement.Escape&lt;/span&gt;&lt;/em&gt; method to replace the invalid XML characters in a string with their valid XML equivalent [1].&lt;br /&gt;&lt;br /&gt;Namespace: System.Security&lt;br /&gt;Assembly: mscorlib (in mscorlib.dll)&lt;br /&gt;&lt;br /&gt;I have used the HttpUtility classes UrlEncode and UrlDecode methods to handle cross-site scripting attacks and this also helped me to get rid of the XmlException - "Data at the root level is invalid".&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;1. &lt;a href="http://msdn2.microsoft.com/en-us/library/system.security.securityelement.escape(VS.80).aspx"&gt;MSDN&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7394798155197747859-900934051342099892?l=cavemansigloo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/900934051342099892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7394798155197747859&amp;postID=900934051342099892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/900934051342099892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/900934051342099892'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/2008/03/replace-xml-special-characters-using-c.html' title='Replace special characters in XML, using C#'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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-7394798155197747859.post-5682374013979577244</id><published>2008-03-14T13:13:00.006-05:00</published><updated>2008-03-17T11:39:25.236-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IE Cookie Viewer'/><category scheme='http://www.blogger.com/atom/ns#' term='Cookies'/><title type='text'>Cookie Viewer</title><content type='html'>During the development of a web application that supports cookies, it is almost always a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;necessity&lt;/span&gt; to have the knowledge of what is being persisted in the cookie.&lt;br /&gt;&lt;br /&gt;Okay.... what options does one have to achieve this?&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;hmm&lt;/span&gt;&lt;/span&gt;..... lets see... well I can think of three ways of doing this:&lt;br /&gt;&lt;br /&gt;1. Write a web page application to read all the cookie key/value pairs and display them.&lt;br /&gt;2. Write a windows application to read all the cookie key/value pairs and display them.&lt;br /&gt;3. Open the cookie file manually and go through the content.&lt;br /&gt;&lt;br /&gt;I have been there and done that ... I mean during the course of my s/w development activities in the past I have myself implemented all three ways that I mentioned above and yet was not happy with the ease of use.&lt;br /&gt;&lt;br /&gt;What if I could find some freeware that does the hard part of fetching all the cookies and enumerating them on a pane that is visually appealing.&lt;br /&gt;&lt;br /&gt;Finally !!! I have stumbled on one such freeware utility called &lt;strong&gt;IE Cookies Viewer. &lt;/strong&gt;This utility that displays the details of all cookies that Internet Explorer stores on your computer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5177668369596637986" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://bp0.blogger.com/_spsU4KRpSRs/R9rF8x6VYyI/AAAAAAAAAsI/b5MVJoiCLrE/s400/iecv1.gif" border="0" /&gt;&lt;br /&gt;Following are a few things that this utility allows you to do:&lt;br /&gt;&lt;br /&gt;1. Sort the cookies list by any column you want, by clicking the column header. A second click sorts the column in descending order.&lt;br /&gt;2. Find a cookie in the list by specifying the name of the Web site.&lt;br /&gt;3. Select and delete the unwanted cookies.&lt;br /&gt;4. Save the cookies to a readable text file.&lt;br /&gt;5. Copy cookie information into the clipboard.&lt;br /&gt;6. Automatically refresh the cookies list when a Web site sends you a cookie.&lt;br /&gt;7. Display the cookies of other users and from other computers.&lt;br /&gt;8. Open the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;IECookiesView&lt;/span&gt;&lt;/span&gt; utility directly from Internet Explorer toolbar.&lt;br /&gt;9. Change the content of a cookie !&lt;br /&gt;10. Export your cookies to Netscape/Mozilla cookies file.&lt;br /&gt;11. Block specific Web sites from using cookies through the cookies blocking mechanism of Internet Explorer 6.0.&lt;br /&gt;&lt;br /&gt;It can be downloaded at &lt;a href="http://www.nirsoft.net/utils/iecookies.html"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;NirSoft&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;. This site has a lot of some cool stuff/utilities that is free for download.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ASP.Net Permanent Cookie vs Temporary Cookie &lt;/strong&gt;&lt;em&gt;&lt;span style="color:#cc0000;"&gt;(Update: 03/17/08)&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;When a cookie is assigned a value without defining the "Expires" property, that cookie would expire as soon as the browser is closed and will be called as a &lt;u&gt;temporary cookie&lt;/u&gt;.&lt;/p&gt;&lt;p&gt;A &lt;u&gt;permanent cookie&lt;/u&gt; is one where the &lt;strong&gt;"Expires"&lt;/strong&gt; property is defined for that cookie, it will be persisted on the client computer and will expire as per the definition of the "&lt;strong&gt;Expires"&lt;/strong&gt; property.&lt;/p&gt;&lt;p&gt;Internet Explorer on Windows (XP/2000/2003) writes its cookies in the &lt;em&gt;C:\Documents and Settings\[user_name]\Cookies&lt;/em&gt; folder.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;References: &lt;/strong&gt;&lt;br /&gt;1. &lt;a href="http://www.nirsoft.net/utils/iecookies.html"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;NirSoft&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7394798155197747859-5682374013979577244?l=cavemansigloo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/5682374013979577244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7394798155197747859&amp;postID=5682374013979577244' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/5682374013979577244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/5682374013979577244'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/2008/03/cookie-viewer.html' title='Cookie Viewer'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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://bp0.blogger.com/_spsU4KRpSRs/R9rF8x6VYyI/AAAAAAAAAsI/b5MVJoiCLrE/s72-c/iecv1.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7394798155197747859.post-2087600222688054673</id><published>2008-02-26T10:52:00.013-06:00</published><updated>2008-03-11T17:05:39.240-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IE Developer Toolbar'/><category scheme='http://www.blogger.com/atom/ns#' term='Reflecter'/><category scheme='http://www.blogger.com/atom/ns#' term='araxis'/><category scheme='http://www.blogger.com/atom/ns#' term='httpwatch'/><category scheme='http://www.blogger.com/atom/ns#' term='fxcop'/><category scheme='http://www.blogger.com/atom/ns#' term='fiddler'/><category scheme='http://www.blogger.com/atom/ns#' term='Sand Castle'/><category scheme='http://www.blogger.com/atom/ns#' term='Ndoc'/><title type='text'>Developer's handkit</title><content type='html'>However skilled you are as a technician, without the appropriate tools you would still be a dud. Just like a craftsman knows his/her tools, a software professional also has to know the tools that are apt for the job. Tools that are handy and that make you look professional is what I am talking about. I have found and used a few tools over the years that have helped me a lot at my work.&lt;br /&gt;&lt;br /&gt;Following are some of them and a brief description of what they do. Most of them are free to use and others are only free to try...&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Fiddler: &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Have you ever found yourself wondering how Microsoft Internet Explorer interacts with your Web application? Have you encountered a strange performance bottleneck that you can't track down? Are you curious about which cookies are being sent, or what downloaded content is marked as cacheable? [1]&lt;br /&gt;&lt;br /&gt;Microsoft Fiddler can help you answer these questions, and many more. Fiddler is an HTTP debugging proxy that logs all HTTP traffic between your computer and the Internet. Fiddler enables you to inspect all HTTP traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler is much simpler to use than NetMon or other network debuggers because it exposes only HTTP traffic and does so in a user-friendly format. [1]&lt;br /&gt;&lt;br /&gt;Fiddler includes a simple but powerful Microsoft JScript .NET event-based scripting subsystem flexible enough to support a broad array of HTTP debugging tasks. Written in C# on the Microsoft .NET Framework, Fiddler is available as an unsupported PowerToy for Internet Explorer. [1]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can learn more about fiddler from MSDN at&lt;a href="http://msdn2.microsoft.com/en-us/library/bb250446.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb250446.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;HttpWatch&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;HttpWatch is a tool that integrates with Internet Explorer and records detailed information about HTTP as you access a web site or application. If you access a site that uses secure HTTPS connections, HttpWatch automatically displays the decrypted form of the network traffic. [2]&lt;/p&gt;&lt;p&gt;I have used the free version called the &lt;em&gt;HttpWatch Basic&lt;/em&gt;. This is an awesome tool for performance measurement and analysis.&lt;/p&gt;&lt;strong&gt;IE Developer Toolbar&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;The Internet Explorer Developer Toolbar provides several features for exploring and understanding Web pages. These features enable you to:&lt;br /&gt;1. Explore and modify the document object model (DOM) of a Web page.&lt;br /&gt;2. Locate and select specific elements on a Web page through a variety of techniques.&lt;br /&gt;3. Selectively disable Internet Explorer settings.&lt;br /&gt;4. View HTML object class names, ID's, and details such as link paths, tab index values, and access keys.&lt;br /&gt;5. Outline tables, table cells, images, or selected tags.&lt;br /&gt;6. Validate HTML, CSS, WAI, and RSS web feed links.&lt;br /&gt;7. Display image dimensions, file sizes, path information, and alternate (ALT) text.&lt;br /&gt;8. Immediately resize the browser window to a new resolution.&lt;br /&gt;9. Selectively clear the browser cache and saved cookies. Choose from all objects or those associated with a given domain.&lt;br /&gt;10. Display a fully featured design ruler to help accurately align and measure objects on your pages.&lt;br /&gt;11. Find the style rules used to set specific style values on an element.&lt;br /&gt;12. View the formatted and syntax colored source of HTML and CSS. &lt;/p&gt;&lt;p&gt;The Developer Toolbar can be pinned to the Internet Explorer browser window or floated separately.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DotNet Reflecter&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Lutz Roeder's .Net Reflecter a class browser, explorer, analyzer and documentation viewer for .NET. Reflector allows to easily view, navigate, search, decompile and analyze .NET assemblies in C#, Visual Basic and IL [4] . There are several AddIns that enhance the richness of this application. The AddIns can be downloaded at from &lt;a href="http://www.codeplex.com/reflectoraddins"&gt;http://www.codeplex.com/reflectoraddins&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Ndoc - .Net 1.x&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;NDoc is a code documentation generator for .NET 1.x. NDoc generates class library documentation from .NET assemblies and the XML documentation files generated by the C# compiler. NDoc uses pluggable documenters to generate documentation in several different formats, including the MSDN-style HTML Help format (.chm), the Visual Studio .NET Help format (HTML Help 2), and &lt;a title="View the MSDN Library" href="http://msdn.microsoft.com/library/en-us/cpref/html/cpref_start.asp" target="_blank"&gt;MSDN-online&lt;/a&gt; style web pages. [5]&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;Sand Castle .Net 2.0&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;Sandcastle produces accurate, MSDN style, comprehensive documentation by reflecting over the source assemblies and optionally integrating XML Documentation Comments. Sandcastle has the following key features: [6]&lt;br /&gt;1. Works with or without authored comments&lt;br /&gt;2. Supports Generics and .NET Framework 2.0&lt;br /&gt;3. Sandcastle has 2 main components (MrefBuilder and Build Assembler)&lt;br /&gt;4. MrefBuilder generates reflection xml file for Build Assembler&lt;br /&gt;5. Build Assembler includes syntax generation, transformation..etc&lt;br /&gt;6. Sandcastle is used internally to build .Net Framework documentation&lt;br /&gt;This article was very helpful to me to get me going with learning to use this application: &lt;a href="http://www.codeplex.com/DocProject/Wiki/View.aspx?title=Creating%20a%20DocProject%20for%20a%20new%20solution&amp;amp;referringTitle=Home"&gt;http://www.codeplex.com/DocProject/Wiki/View.aspx?title=Creating%20a%20DocProject%20for%20a%20new%20solution&amp;amp;referringTitle=Home&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Araxis Merge&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;File comparison (diff), merging and folder synchronization has never been so simple before araxis. This application can be used it to compare and merge source code, web pages and other text files with native application performance. Compare images and binary files. Synchronize folders. Perform code reviews and audits. Work with source hierarchies containing thousands of files. [7] I would highly recommend to try the demo version and am pretty sure that you will be very impressed with the features offered by this application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;FxCop&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;FxCop is an application that analyzes managed code assemblies (code that targets the .NET Framework common language runtime) and reports information about the assemblies, such as possible design, localization, performance, and security improvements. Many of the issues concern violations of the programming and design rules set forth in the &lt;a id="ctl00_rs1_mainContentContainer_ctl01" onclick="javascript:Track('ctl00_rs1_mainContentContainer_ctl00ctl00_rs1_mainContentContainer_ctl01',this);" href="http://go.microsoft.com/fwlink/?LinkId=70287"&gt;Design Guidelines&lt;/a&gt; for Class Library Developers, which are the Microsoft guidelines for writing robust and easily maintainable code by using the .NET Framework. [8]&lt;/p&gt;&lt;p&gt;FxCop is intended for class library developers. However, anyone creating applications that should comply with the .NET Framework best practices will benefit. FxCop is also useful as an educational tool for people who are new to the .NET Framework or who are unfamiliar with the .NET Framework Design Guidelines. [8]&lt;/p&gt;&lt;strong&gt;Reference:&lt;br /&gt;&lt;/strong&gt;1. &lt;a href="http://www.msdn.microsoft.com/"&gt;MSDN&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://www.httpwatch.com/"&gt;HttpWatch dot com&lt;/a&gt;&lt;br /&gt;3. &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&amp;amp;displaylang=en"&gt;IE Development Toolbar&lt;/a&gt;&lt;br /&gt;4. &lt;a href="http://www.aisto.com/roeder/dotnet/"&gt;.Net Reflecter&lt;/a&gt;&lt;br /&gt;5. &lt;a href="http://ndoc.sourceforge.net/"&gt;Ndoc&lt;/a&gt;&lt;br /&gt;6. &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=E82EA71D-DA89-42EE-A715-696E3A4873B2&amp;amp;displaylang=en"&gt;Sand Castle&lt;/a&gt;&lt;br /&gt;7. &lt;a href="http://www.araxis.com/merge/"&gt;Araxis&lt;/a&gt;&lt;br /&gt;8. &lt;a href="http://msdn2.microsoft.com/en-us/library/bb429476(VS.80).aspx"&gt;Microsoft FxCop&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7394798155197747859-2087600222688054673?l=cavemansigloo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/2087600222688054673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7394798155197747859&amp;postID=2087600222688054673' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/2087600222688054673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/2087600222688054673'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/2008/02/developers-handkit.html' title='Developer&apos;s handkit'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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-7394798155197747859.post-7269898374504419002</id><published>2008-02-13T09:09:00.010-06:00</published><updated>2008-02-17T15:02:52.604-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='ThreadAbort'/><category scheme='http://www.blogger.com/atom/ns#' term='Response.Redirect'/><title type='text'>The Response.Redirect Menace</title><content type='html'>You know how we all take things for granted and never bother to think of the caveats.... yep you know what I am talking about.... exactly... I ran into one such situation with Response.Redirect.&lt;br /&gt;&lt;br /&gt;I have learnt that the Response.Redirect internally has to make a call to Response.End to force stop the execution of the current thread there by throwing a ThreadAbort exception [&lt;strong&gt;2&lt;/strong&gt;].&lt;br /&gt;&lt;br /&gt;The way this works is:&lt;br /&gt;&lt;br /&gt;A call to HttpResponse.Redirect(string url) actually calls an overload HttpResponse.Redirect(string url, bool endResponse) with endResponse set to true. If endResponse is set to true, HttpResponse.Redirect will make a call to HttpResponse.End(). [&lt;strong&gt;1&lt;/strong&gt;]&lt;br /&gt;&lt;br /&gt;Microsoft recommends that we use the overloaded Response.Redirect(String url, bool endResponse) method that passes false so that a call to Thread.Abort() can be avoided by suppressing the call to Response.End. Is there a catch? Yes, the page will execute the code that follows Response.Redirect.&lt;br /&gt;&lt;br /&gt;One solution I can think of to minimize the effort in execution of the code that follows the Response.Redirect is, actually code around the Response.Redirect&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;if&lt;/span&gt;(HaveToredirect == true)&lt;br /&gt;{&lt;br /&gt;&lt;blockquote&gt;Response.Redirect(url, &lt;strong&gt;false&lt;/strong&gt;);&lt;br /&gt;&lt;span style="color:#009900;"&gt;//as described in [1]&lt;br /&gt;HttpContext.ApplicationInstance&lt;/span&gt;.CompleteRequest();&lt;br /&gt;return; &lt;/blockquote&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Check for the &lt;strong&gt;IsRequestBeingRedirected&lt;/strong&gt; property of the Response object and return if it is true, in all the page events as the first step. This way we can mimimize the execution time of the page.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;if&lt;/span&gt; (Response.IsRequestBeingRedirected == true)&lt;br /&gt;return;&lt;br /&gt;&lt;br /&gt;This approach might be feasible in all scenarios though.&lt;br /&gt;&lt;br /&gt;Also note that Server.Transfer calls Response.End interally.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1.&lt;/strong&gt; &lt;a href="http://www.c6software.com/Articles/ThreadAbortException.aspx"&gt;Response.Redirect(url) ThreadAbortException Solution&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;2.&lt;/strong&gt; &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;%5BLN%5D;312629"&gt;Microsoft Support Article.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7394798155197747859-7269898374504419002?l=cavemansigloo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/7269898374504419002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7394798155197747859&amp;postID=7269898374504419002' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/7269898374504419002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/7269898374504419002'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/2008/02/responseredirect-menace.html' title='The Response.Redirect Menace'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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-7394798155197747859.post-5510666778882523808</id><published>2008-02-11T11:50:00.000-06:00</published><updated>2008-02-11T23:34:37.556-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MS Commerce Server 2007'/><category scheme='http://www.blogger.com/atom/ns#' term='PurchaseOrders'/><title type='text'>Commerce Server 2007 - Extending the PurchaseOrder</title><content type='html'>The purchase order table in CS 2007 comes with a limited default storage columns.&lt;br /&gt;What if you want to add new columns to this table that would be used to hmmm...&lt;br /&gt;lets say query the PO table. the answer is simple: Extend the PurchaseOrder !&lt;br /&gt;&lt;br /&gt;Here is how I have dunit.&lt;br /&gt;&lt;br /&gt;1. Extend the PurchaseOrder class (lets call it &lt;span style="color:#009900;"&gt;ExtendedPurchaseOrder&lt;/span&gt; and define the property that you would like to store in the Commerce Server PurchaseOrders table in the transactions database.&lt;br /&gt;&lt;br /&gt;2. Add the new columns to the following section of OrderObjectMappings.xml&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;lt;Table Name="PurchaseOrders"&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;3. Change the name of the class from PurchaseOrder to &lt;span style="color:#009900;"&gt;ExtendedPurchaseOrder&lt;/span&gt; in the following section&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;lt;Class Name="PurchaseOrder"&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;4. Add the new class property to table column mapping in the following section of the same xml:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;lt;ClassTableMap Class="ExtendedPurchaseOrder" Table="PurchaseOrders"&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;5. Add the following section to the web.config file in the CommerceServer/Types section&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;lt;Type Key="PurchaseOrder" UserTypeName="EtxendedPurchaseOrder" AssemblyType="Local" NameSpace="YourClassLibraryNameSpace" Assembly="YourClassLibrary"/&amp;gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;6. Create a new folder; say c:\temp and copy web.config, OrderObjectMappings.xml, YourClassLibrary.dll and the OrderMappings.exe to this folder. You should be able to find the OrderMappings.exe in the C:\Program Files\Microsoft Commerce Server 2007\Tools folder.&lt;br /&gt;&lt;br /&gt;7. Open a Command window and run the following script to generate the SQL for Commerce server Transactions database.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;OrderMappings -w web.config&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;8. You should a file OrdersStorage.sql being generate if the above command ran successfully.&lt;br /&gt;&lt;br /&gt;9. Execute the SQL script in the OrdersStorage.sql file on the Commerce server transactions database after you have made the necessary schema change to the PurchaseOrders table.&lt;br /&gt;&lt;br /&gt;10. Now you are ready to programatically insert custom data into the PurchaseOrders table.&lt;br /&gt;&lt;br /&gt;11. I have inserted the Order Confirmation Number into the PurchaseOrders using the following code&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;ExtendedPurchaseOrder&lt;/span&gt; PO = (&lt;span style="color:#009900;"&gt;ExtendedPurchaseOrder&lt;/span&gt; ) &lt;span style="color:#3333ff;"&gt;this&lt;/span&gt;.Basket.SaveToReceipt();&lt;br /&gt;PO.ConfirmationNumber = 100001;&lt;br /&gt;PO.ListenerStatus = 1;&lt;br /&gt;PO.Save("Site");&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;1. MSDN Online&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7394798155197747859-5510666778882523808?l=cavemansigloo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/5510666778882523808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7394798155197747859&amp;postID=5510666778882523808' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/5510666778882523808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/5510666778882523808'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/2008/02/commerce-server-2007-extending.html' title='Commerce Server 2007 - Extending the PurchaseOrder'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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-7394798155197747859.post-4158556235547307590</id><published>2008-02-11T10:10:00.000-06:00</published><updated>2008-02-11T23:35:17.249-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SelfSSL'/><category scheme='http://www.blogger.com/atom/ns#' term='SSL'/><title type='text'>SSL for testing in Development</title><content type='html'>I have found that &lt;strong&gt;SelfSSL&lt;/strong&gt; is one of the &lt;u&gt;best&lt;/u&gt; and &lt;u&gt;easiest&lt;/u&gt; tool that can be used for SSL testing. This tool comes from Microsoft and it is free :)&lt;br /&gt;&lt;br /&gt;How to get it?&lt;br /&gt;&lt;br /&gt;Goolge "IIS 6.0 Resource Kit". Download and install it from microsoft website.&lt;br /&gt;&lt;br /&gt;After you have installed you should be able to see SelfSSL.exe under Start &gt; Programs &gt; IIS Resources &gt; SelfSSL &gt;&lt;br /&gt;&lt;br /&gt;Clicking on SelfSSL will launch a command window. Type the command &lt;strong&gt;SelfSSL&lt;/strong&gt; and hit enter to install a self-signed certificate into IIS.&lt;br /&gt;&lt;br /&gt;This will install the certificate on the default web site. You cannot install the same certificate on more than one site.&lt;br /&gt;&lt;br /&gt;Now launch your site by typing &lt;a href="https://localhost/"&gt;https://localhost/&lt;/a&gt; in a browser on your development server and voila you have already started testing SSL.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Supported Operating Systems:&lt;/strong&gt; Windows Server 2003; Windows XP&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7394798155197747859-4158556235547307590?l=cavemansigloo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/4158556235547307590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7394798155197747859&amp;postID=4158556235547307590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/4158556235547307590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/4158556235547307590'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/2008/02/ssl-for-testing-in-development.html' title='SSL for testing in Development'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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-7394798155197747859.post-8627493061873435344</id><published>2008-01-30T18:20:00.000-06:00</published><updated>2008-01-30T21:57:25.008-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Session. Cookies'/><category scheme='http://www.blogger.com/atom/ns#' term='State Management'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>State Management in ASP.NET</title><content type='html'>Web form pages are HTTP-Based, they are stateless, which means they don’t know whether the requests are all from the same client, and pages are destroyed and recreated with each round trip to the server, therefore information will be lost, therefore state management is really an issue in developing web applications. We could easily solve these problems in ASP with cookie, query string, application, session and so on. Now in ASP.NET, we still can use these functions, but they are richer and more powerful, so let’s dive into it.&lt;br /&gt;&lt;br /&gt;Mainly there are two different ways to manage web page’s state&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Client-side &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Server-side&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;Client-side state management&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;There is no information maintained on the server between round trips. Information will be stored in the page or on the client’s &lt;a href="http://www.csharphelp.com/archives/" target="_blank"&gt;computer&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;1) Cookies&lt;br /&gt;&lt;br /&gt;A cookie is a small amount of data stored either in a text file on the client's file &lt;a href="http://www.csharphelp.com/archives/" target="_blank"&gt;system&lt;/a&gt; or in-memory in the client browser session. Cookies are mainly used for tracking data settings. Let’s take an example: say we want to customize a welcome web page, when the user request the default web page, the application first to detect if the user has logined before, we can retrieve the user information from cookies.&lt;br /&gt;&lt;br /&gt;//to create a cookie variable&lt;br /&gt;Response.Cookies["username"].Value=name;&lt;br /&gt;&lt;br /&gt;//to access a cookie variable&lt;br /&gt;Request.Cookies["username"].Value&lt;br /&gt;&lt;br /&gt;2) Hidden Field&lt;br /&gt;&lt;br /&gt;A hidden field does not render visibly in the browser, but you can set its properties just as you can with a standard control. When a page is submitted to the server, the content of a hidden field is sent in the HTTP Form collection along with the values of other controls. A hidden field acts as a repository for any page-specific information that you would like to store directly in the page. Hidden field stores a single variable in its value property and must be explicitly added it to the page. ASP.NET provides the HtmlInputHidden control that offers hidden field functionality.&lt;br /&gt;&lt;br /&gt;protected System.Web.UI.HtmlControls.HtmlInputHidden Hidden1;//to assign a value to Hidden fieldHidden1.Value=”this is a test”;//to retrieve a value string str=Hidden1.Value;&lt;br /&gt;&lt;br /&gt;Note: Keep in mind, in order to use hidden field, you have to use HTTP-Post method to post web page. Although its name is ‘Hidden’, its value is not hidden, you can see its value through ‘view source’ function.&lt;br /&gt;&lt;br /&gt;C. View State&lt;br /&gt;Each control on a Web Forms page, including the page itself, has a ViewState property, it is a built-in struture for automatic retention of page and control state, which means you don’t need to do anything about getting back the data of controls after posting page to the server. Here, which is useful to us is the ViewState property, we can use it to save information between round trips to the server.&lt;br /&gt;&lt;br /&gt;//to save informationViewState.Add(“shape”,”circle”);//to retrieve informationstring shapes=ViewState[“shape”];&lt;br /&gt;&lt;br /&gt;Note: Unlike Hidden Field, the values in ViewState are invisible when ‘view source’, they are compressed and encoded.&lt;br /&gt;D.Query Strings&lt;br /&gt;Query strings provide a simple but limited way of maintaining some state information.&lt;br /&gt;You can easily pass information from one page to another, But most browsers and client devices impose a 255-character limit on the length of the URL. In addition, the query values are exposed to the Internet via the URL so in some cases &lt;a href="http://www.csharphelp.com/archives/" target="_blank"&gt;security&lt;/a&gt; may be an issue.&lt;br /&gt;&lt;br /&gt;This is an article in its entirity has been posted on &lt;a href="http://www.csharphelp.com/"&gt;http://www.csharphelp.com/&lt;/a&gt;. I am reposting this on my blog since I feel it is very useful.&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;1. &lt;a href="http://www.csharphelp.com/archives/archive207.html"&gt;http://www.csharphelp.com/archives/archive207.html&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7394798155197747859-8627493061873435344?l=cavemansigloo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/8627493061873435344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7394798155197747859&amp;postID=8627493061873435344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/8627493061873435344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/8627493061873435344'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/2008/01/state-management-in-aspnet.html' title='State Management in ASP.NET'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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-7394798155197747859.post-5022969586451679438</id><published>2008-01-30T09:30:00.000-06:00</published><updated>2008-01-30T09:37:42.083-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='STL'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>STANDARD TEMPLATE LIBRARY (STL)</title><content type='html'>&lt;strong&gt;CONTAINERS&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;String, List, Vector , Hash, Map, Multimap, Set,&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;String &lt;/strong&gt;- #include &lt;string&gt;&lt;br /&gt;A string is a collection of ascii characters that supports both insertion and removal.&lt;br /&gt;&lt;br /&gt;List vs Vector - #include "list" vs #include "vector"&lt;br /&gt;&lt;br /&gt;Both of them can store collection of objects and work almost similarly.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Lists &lt;/strong&gt;are double-linked lists. Where as a vector is sequential in memory like an array. Insertion at either end, or in the middle (providing you know an existing element in the middle) is equally fast. Also, splicing is fast (eg. putting a list into the middle of another) - all that does is re-arrange the end pointers. All of those operations would be slower with vectors, because you would need to copy everything. However, vectors shine in random access - since they are organised sequentially in memory, whilst this is slow for insertion at anywhere other than the end, you can easily find, say, element 500, you simply index into the vector. Thus, vectors can be sorted, shuffled, and accessed randomly.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Map &lt;/strong&gt;- #include "map"&lt;br /&gt;A collection for a varying length sequence of elements of type pair&lt;const&gt;. The first element of each pair is the sort key and the second is its associated value. The sequence is represented in a way that permits lookup, insertion, and removal of an arbitrary element. The key can be a simple as a number or string or as complex a key class. The key class must support normal comparison operations so that the collection can be sorted or searched.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Set &lt;/strong&gt;- #include "set"&lt;br /&gt;A collection that controls a varying length sequence of elements of type const Key. Each element serves as both a sort key and a value. The sequence is represented in a way that permits lookup, insertion, and removal of an arbitrary element.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Multimap &lt;/strong&gt;- #include "map"&lt;br /&gt;A collection of a varying length sequence of elements of type pair&lt;const&gt;. The first element of each pair is the sort key and the second is its associated value. The sequence is represented in a way that permits lookup, insertion, and removal of an arbitrary element.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Multiset &lt;/strong&gt;- #include &lt;set&gt;&lt;br /&gt;A collection of a varying-length sequence of elements of type const Key. Each element serves as both a sort key and a value. The sequence is represented in a way that permits lookup, insertion, and removal of an arbitrary element.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ALLOCATORS&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Iterators&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Iterators support the access of elements in a collection. They are used throughout the STL to access and list elements in a container. The iterators for a particular collection are defined in the collection class definition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7394798155197747859-5022969586451679438?l=cavemansigloo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/5022969586451679438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7394798155197747859&amp;postID=5022969586451679438' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/5022969586451679438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/5022969586451679438'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/2008/01/standard-template-library-stl.html' title='STANDARD TEMPLATE LIBRARY (STL)'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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-7394798155197747859.post-2444413770993410616</id><published>2008-01-28T15:20:00.000-06:00</published><updated>2008-01-28T15:44:34.722-06:00</updated><title type='text'>C# Copy Constructor</title><content type='html'>C# &lt;strong&gt;&lt;em&gt;does not&lt;/em&gt;&lt;/strong&gt; provide a copy constructor by default. We have to write an appropriate constructor method that will create a new object and to copy the values from an existing object. This implementation is nothing like the C++ copy constructor.&lt;br /&gt;&lt;br /&gt;If we need a copy of an object we can use cloning techniques.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;strong&gt;Observation:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;This method has to be called explicitly.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; "A shallow copy creates a new instance of the same type as the originalobject, and then copies the non-static fields of the original object. If thefield is a value type, a bit-by-bit copy of the field is performed. If thefield is a reference type, the reference is copied but the referred objectis not; therefore, the reference in the original object and the reference inthe clone point to the same object. In contrast, a deep copy of an objectduplicates everything directly or indirectly referenced by the fields in theobject."&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;1. MSDN Online&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7394798155197747859-2444413770993410616?l=cavemansigloo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/2444413770993410616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7394798155197747859&amp;postID=2444413770993410616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/2444413770993410616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/2444413770993410616'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/2008/01/c-copy-constructor.html' title='C# Copy Constructor'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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-7394798155197747859.post-4922924660893980561</id><published>2008-01-28T14:14:00.000-06:00</published><updated>2008-01-30T09:38:43.469-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Script'/><title type='text'>Generic Sql Table Data Insert Script</title><content type='html'>woah!!&lt;br /&gt;&lt;br /&gt;I have my own blog and this is my first posting. hurray.... I have been shying away from doing this for a long time now... finally pulled all my energies to start blogging tech stuff that I learn ...&lt;br /&gt;&lt;br /&gt;There is so much that I learn and so much I forget all the time.... It is getting really tough to keep track of all that I have learned.... I hope I can keep up with posting useful stuff that I learn.&lt;br /&gt;&lt;br /&gt;enough of my preamble now... cutting the chase and getting to my post...&lt;br /&gt;&lt;br /&gt;How many time must I have thought " I wish I had a script that I would run with the table name as an argument and get insert statements for all the data in a Sql Server 2000/2005 table." Thanks to Narayana Vyas Kondreddi, I have got a script &lt;strong&gt;[1]&lt;/strong&gt; that does exactly what I want. This is a cool utility that is very handy.&lt;br /&gt;&lt;br /&gt;To generate INSERT statements for table 'titles':&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;EXEC &lt;/span&gt;sp_generate_inserts &lt;span style="color:#ff0000;"&gt;'titles'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;/span&gt;&lt;br /&gt;References:&lt;br /&gt;1. &lt;a href="http://vyaskn.tripod.com/code.htm#tagit"&gt;http://vyaskn.tripod.com/code.htm#tagit&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7394798155197747859-4922924660893980561?l=cavemansigloo.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cavemansigloo.blogspot.com/feeds/4922924660893980561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7394798155197747859&amp;postID=4922924660893980561' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/4922924660893980561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7394798155197747859/posts/default/4922924660893980561'/><link rel='alternate' type='text/html' href='http://cavemansigloo.blogspot.com/2008/01/generic-sql-table-data-insert-script.html' title='Generic Sql Table Data Insert Script'/><author><name>Caveman</name><uri>http://www.blogger.com/profile/17062543975024605632</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>
