<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cale Dunlap &#187; c#</title>
	<atom:link href="http://www.caledunlap.com/tag/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.caledunlap.com</link>
	<description>Programmer and Hobbyist Game Developer</description>
	<lastBuildDate>Wed, 10 Mar 2010 21:30:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>LINQ Audit Trail v2 &#8211; DoddleAudit</title>
		<link>http://www.caledunlap.com/2009/12/linq-audit-trail-v2-doddleaudit/</link>
		<comments>http://www.caledunlap.com/2009/12/linq-audit-trail-v2-doddleaudit/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 04:29:17 +0000</pubDate>
		<dc:creator>Cale</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.caledunlap.com/?p=562</guid>
		<description><![CDATA[This looked like a link that was fairly re-post worthy. This is practically a must for any .NET + LINQ + MSSQL developer out there. Very neat way of doing audit trails in MSSQL with LINQ and C#.
A couple months ago I wrote a basic set of extension methods to handle automatic auditing in LINQ <a href="http://www.caledunlap.com/2009/12/linq-audit-trail-v2-doddleaudit/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>This looked like a link that was fairly re-post worthy. This is practically a must for any .NET + LINQ + MSSQL developer out there. Very neat way of doing audit trails in MSSQL with LINQ and C#.</p>
<blockquote><p>A couple months ago I wrote a basic set of extension methods to handle automatic auditing in LINQ to SQL. Well I have received a large number of emails regarding this particular project so I have decided to focus on cleaning up my v2 API and releasing it on CodePlex. There was a lot of room for improvement from version 1 and today I am going to post the all new LINQ Audit Trail code. This new version is significantly enhanced in the previous version.</p>
</blockquote>
<p>via <a href="http://www.matthidinger.com/archive/2009/01/12/linq-audit-trail-v2.aspx">LINQ Audit Trail v2 &#8211; DoddleAudit</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.caledunlap.com/2009/12/linq-audit-trail-v2-doddleaudit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Helpful Extension Methods to the System.String Class in C#</title>
		<link>http://www.caledunlap.com/2009/10/helpful-extension-methods-to-the-system-string-class-in-c/</link>
		<comments>http://www.caledunlap.com/2009/10/helpful-extension-methods-to-the-system-string-class-in-c/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 10:20:03 +0000</pubDate>
		<dc:creator>Cale</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[extension methods]]></category>

		<guid isPermaLink="false">http://caledunlap.com/blog/2009/10/helpful-extension-methods-to-the-system-string-class-in-c/</guid>
		<description><![CDATA[I&#8217;ve been doing a decent amount of string manipulation lately and decided to combine that with my newfound knowledge about .NET extension methods. If you don&#8217;t know what extension methods are, they&#8217;re basically a way to extend a class without needing the source code to that particular class&#8211;hence why I can extend the System.String type <a href="http://www.caledunlap.com/2009/10/helpful-extension-methods-to-the-system-string-class-in-c/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a decent amount of string manipulation lately and decided to combine that with my newfound knowledge about .NET extension methods. If you don&#8217;t know what extension methods are, they&#8217;re basically a way to extend a class without needing the source code to that particular class&#8211;hence why I can extend the System.String type by simply writing another class. The key is with the parameters of your methods. Here&#8217;s the basic gist of it:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:050e6608-4d1a-4fda-8b59-b3cc677f09bd" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> {Your Return Type} {Your Method Name} ( <span style="color:#0000ff">this</span> {Type/Class you want to extend} {Parameter Name} )<br /> {<br /> &#160;&#160;&#160;&#160;&#160;<span style="color:#008000">/* Your method body */</span><br /> }</div>
</p></div>
</p></div>
<pre class="code">&nbsp;</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>So the key here is the &#8220;this&#8221; keyword before the type identifier in the parameter list of the method.</p>
<p>I&#8217;ve wrapped all of my extension methods into a single class simply called &#8220;ExtensionMethods&#8221; and added it to my project. The namespace doesn&#8217;t matter, so I haven&#8217;t included it in this example. You can either use the global namespace (though I don&#8217;t recommend it) or just create your own namespace called whatever you want.</p>
<p>Without further adue, here&#8217;s the code:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0271f875-eb62-41fe-a74b-7958d98dab65" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#0000ff">class</span> <span style="color:#2b91af">ExtensionMethods</span><br />
{<br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;summary&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> Includes the trailing path delimiter.</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;/summary&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;param name=&quot;InputPath&quot;&gt;</span><span style="color:#008000">The input path.</span><span style="color:#808080">&lt;/param&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;returns&gt;</span><span style="color:#008000">The input path including a trailing path delimiter if it doesn&#39;t have one</span><span style="color:#808080">&lt;/returns&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#0000ff">string</span> IncludeTrailingPathDelimiter(<span style="color:#0000ff">this</span> <span style="color:#0000ff">string</span> InputPath)<br />
&#160;&#160;&#160;&#160;{<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">if</span> (!InputPath.EndsWith(Path.DirectorySeparatorChar.ToString()) &amp;&amp;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;!InputPath.EndsWith(Path.AltDirectorySeparatorChar.ToString()))<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">return</span> InputPath + Path.DirectorySeparatorChar;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">return</span> InputPath;<br />
&#160;&#160;&#160;&#160;}</p>
<p>&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;summary&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> Asserts the trailing path delimiter.</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;/summary&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;param name=&quot;InputPath&quot;&gt;</span><span style="color:#008000">The input path.</span><span style="color:#808080">&lt;/param&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#0000ff">void</span> AssertTrailingPathDelimiter(<span style="color:#0000ff">this</span> <span style="color:#0000ff">string</span> InputPath)<br />
&#160;&#160;&#160;&#160;{<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;InputPath = InputPath.IncludeTrailingPathDelimiter();<br />
&#160;&#160;&#160;&#160;}</p>
<p>&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;summary&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> Trims the extension from a file name.</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;/summary&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;param name=&quot;InputFile&quot;&gt;</span><span style="color:#008000">The input file.</span><span style="color:#808080">&lt;/param&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#0000ff">void</span> TrimExtension(<span style="color:#0000ff">this</span> <span style="color:#0000ff">string</span> InputFile)<br />
&#160;&#160;&#160;&#160;{<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">int</span> start, count;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">if</span> ((start = InputFile.LastIndexOf(<span style="color:#a31515">&quot;.&quot;</span>)) &gt; 0)<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;count = InputFile.Length &#8211; start;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;InputFile = InputFile.Remove(start, count);<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br />
&#160;&#160;&#160;&#160;}</p>
<p>&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;summary&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> Gets a file extension of a filename.</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;/summary&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;param name=&quot;InputFile&quot;&gt;</span><span style="color:#008000">The input file.</span><span style="color:#808080">&lt;/param&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#808080">///</span><span style="color:#008000"> </span><span style="color:#808080">&lt;returns&gt;</span><span style="color:#008000">The file extension</span><span style="color:#808080">&lt;/returns&gt;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#0000ff">public</span> <span style="color:#0000ff">static</span> <span style="color:#0000ff">string</span> FileExtension(<span style="color:#0000ff">this</span> <span style="color:#0000ff">string</span> InputFile)<br />
&#160;&#160;&#160;&#160;{<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">int</span> start, count;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">if</span> ((start = InputFile.LastIndexOf(<span style="color:#a31515">&quot;.&quot;</span>)) &gt; 0)<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;{<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;count = InputFile.Length &#8211; start;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">return</span> InputFile.Substring(start, count);<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;}<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">return</span> <span style="color:#0000ff">string</span>.Empty;<br />
&#160;&#160;&#160;&#160;}</p>
<p>}</p></div>
</div>
</div>
<pre class="code">&nbsp;</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Now whenever you use a System.String object, you&#8217;ll be able to simply call these methods as if they were part of the System.String class. IE: string MyFileExtension = MyFilePath.FileExtension();</p>
<p>I&#8217;m sure I&#8217;ll add on to this as I go along.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.caledunlap.com/2009/10/helpful-extension-methods-to-the-system-string-class-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Templatize Tool</title>
		<link>http://www.caledunlap.com/2009/07/templatize-tool/</link>
		<comments>http://www.caledunlap.com/2009/07/templatize-tool/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 06:52:31 +0000</pubDate>
		<dc:creator>Cale</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development Journal]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[templatizer]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://caledunlap.com/blog/?p=345</guid>
		<description><![CDATA[I recently wrote up a template engine tool called Templatize. It started as a tool for my girlfriend so she could quickly generate HTML pages from CSV rows for use on eBay, but then quickly grew into a more robust template tool.
Basically it takes a set of input data, containing multiple entities (rows), each with <a href="http://www.caledunlap.com/2009/07/templatize-tool/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I recently wrote up a template engine tool called Templatize. It started as a tool for my girlfriend so she could quickly generate HTML pages from CSV rows for use on eBay, but then quickly grew into a more robust template tool.</p>
<p>Basically it takes a set of input data, containing multiple entities (rows), each with multiple properties (columns), formatted from some type of delimited text file. Then it takes in a master template file and spits out multiple &#8220;data-injected&#8221; versions of that template.</p>
<p>View the full page <a href="http://caledunlap.com/blog/c/templatize/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.caledunlap.com/2009/07/templatize-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KnowIT RC2.1 Released</title>
		<link>http://www.caledunlap.com/2009/05/knowit-rc21-released/</link>
		<comments>http://www.caledunlap.com/2009/05/knowit-rc21-released/#comments</comments>
		<pubDate>Mon, 18 May 2009 14:02:37 +0000</pubDate>
		<dc:creator>Cale</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development Journal]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[knowit]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://caledunlap.com/blog/?p=265</guid>
		<description><![CDATA[I&#8217;ve completed the modifications and package builds for KnowIT releast candidate 2.1. They are available from the KnowIT Google Code site. Dare I say, this is one of the best peices of software I have written in a long time. And the best part is, its open source!
Check out the Screenshots.
KnowIT works with Windows ONLY. <a href="http://www.caledunlap.com/2009/05/knowit-rc21-released/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve completed the modifications and package builds for KnowIT releast candidate 2.1. They are available from the <a href="http://knowitaig.googlecode.com/" target="_blank">KnowIT Google Code site</a>. Dare I say, this is one of the best peices of software I have written in a long time. And the best part is, its open source!</p>
<p>Check out the <a href="http://code.google.com/p/knowitaig/wiki/Screenshots" target="_blank">Screenshots</a>.</p>
<p>KnowIT works with Windows ONLY. There is currently not a Linux/UNIX scanner available for KnowIT, and the database back-end is a Microsoft product (MSSQL 2005). However, I did add ODBC support this time around, so it may work on other database types as well. If anybody gets it to work on MySQL or Oracle, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.caledunlap.com/2009/05/knowit-rc21-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VGL Math &#8211; 2D/3D Video Game Math Library</title>
		<link>http://www.caledunlap.com/2009/03/vgl-math-2d3d-video-game-math-library/</link>
		<comments>http://www.caledunlap.com/2009/03/vgl-math-2d3d-video-game-math-library/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 10:05:25 +0000</pubDate>
		<dc:creator>Cale</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development Journal]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[vgl]]></category>

		<guid isPermaLink="false">http://caledunlap.com/blog/?p=231</guid>
		<description><![CDATA[I decided to get bold and start another open source project. This time it is related to the math involved in developing 2D and 3D video games. The project is hosted at http://code.google.com/p/vglmath. I decided to deem it a &#8220;VGL community project&#8221;; VGL being the company I founded a few months ago.
I&#8217;m looking for any <a href="http://www.caledunlap.com/2009/03/vgl-math-2d3d-video-game-math-library/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I decided to get bold and start another open source project. This time it is related to the math involved in developing 2D and 3D video games. The project is hosted at <a href="http://code.google.com/p/vglmath" target="_blank">http://code.google.com/p/vglmath</a>. I decided to deem it a &#8220;VGL community project&#8221;; VGL being the company I founded a few months ago.</p>
<p>I&#8217;m looking for any pointers, contributors, or experts to make improvements or recommendations to the code. So please check it out. If you&#8217;re interested in contributing, please send me an email at cale@caledunlap.com so I can add your Google account to the members list.</p>
<p>And if you haven&#8217;t already, check out <a href="http://www.venomgamelabs.com" target="_blank">http://www.venomgamelabs.com</a>!</p>
<p>Now for your entertainment for the evening:<br />
<a href="http://www.youtube.com/watch?v=FRgYtp3HfvY"><!-- Smart Youtube --><span class="youtube"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/FRgYtp3HfvY&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/FRgYtp3HfvY&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=&amp;fs=1&amp;hl=en&amp;autoplay=&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355" ></embed><param name="wmode" value="transparent" /></object></span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.caledunlap.com/2009/03/vgl-math-2d3d-video-game-math-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Angel Progress!!!!</title>
		<link>http://www.caledunlap.com/2008/12/angel-progress/</link>
		<comments>http://www.caledunlap.com/2008/12/angel-progress/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 12:35:13 +0000</pubDate>
		<dc:creator>Cale</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development Journal]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://caledunlap.com/blog/?p=117</guid>
		<description><![CDATA[
So, I spent all day yesterday and already a little bit this morning working on Angel. Angel went from a service-only proof-of-concept to a server and client proof of concept in just under 12 hours. I&#8217;ve been stress-testing it a little bit this morning and it ran 10,000 &#8220;AddUser&#8221; commands in just under 3 minutes. <a href="http://www.caledunlap.com/2008/12/angel-progress/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<div>
<p>So, I spent all day yesterday and already a little bit this morning working on Angel. Angel went from a service-only proof-of-concept to a server and client proof of concept in just under 12 hours. I&#8217;ve been stress-testing it a little bit this morning and it ran 10,000 &#8220;AddUser&#8221; commands in just under 3 minutes. Sounds slow? Well, let me explain everything that goes on in a single &#8220;AddUser&#8221; command (subject to change):</p>
<p> </p>
<ol>
<li>Build the SOAP request (translate Angel data objects to SOAP-compatible objects). Request contains user information (Name, Alias, etc.)</li>
<li>Connect to the Angel web service</li>
<li>Send the command parameters to the web service</li>
<li>Service writes a log entry to a text file (very verbosely)</li>
<li>Service executes a database statement, storing the data</li>
<li>Service checks for errors, if none, grab the user ID back out of the database (room for optimization here). If errors occured, put error description into the response object.</li>
<li>Service builds a response object and sends it over the wire back to the client</li>
<li>Client converts the SOAP-compatible object back to Angel data object types</li>
<li>Client checks  the response object for success/failure from the server</li>
<li>Client tears down SOAP connection</li>
</ol>
<p> </p>
<p>Now do that 10,000 times. </p>
<p>This is my first time building a C++ SOAP client and I must say, with the help of gSOAP, it works great. It is the first time I&#8217;ve gotten a C# web service and a C++ client to play nicely together. We initially tried this with raw sockets, but it proved to be WAY too much of a hassle and there&#8217;s too much that could go wrong. This has worked 1000% more reliably than anything else I&#8217;ve tried. I&#8217;ve sort of been having that &#8220;mad scientist&#8221; feel about me the last few days since I&#8217;ve gotten this work&#8211;talking to myself, mumbling, swearing at my code, and then screaming &#8220;IT&#8217;S ALIVE!!!!!&#8221; when it finally worked.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.caledunlap.com/2008/12/angel-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KnowIT Releases First Version</title>
		<link>http://www.caledunlap.com/2008/12/knowit-releases-first-version/</link>
		<comments>http://www.caledunlap.com/2008/12/knowit-releases-first-version/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 08:01:46 +0000</pubDate>
		<dc:creator>Cale</dc:creator>
				<category><![CDATA[Development Journal]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://caledunlap.com/blog/?p=114</guid>
		<description><![CDATA[Ok, so even though I didn&#8217;t get ALL of the bugs hammered out in KnowIT, I released a preliminary version of it over at Google Code. It hasn&#8217;t been reviewed yet by anybody, and I even have yet to install it from the installers I built, so I&#8217;m honestly not even sure if it will <a href="http://www.caledunlap.com/2008/12/knowit-releases-first-version/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Ok, so even though I didn&#8217;t get ALL of the bugs hammered out in KnowIT, I released a preliminary version of it over at <a href="http://code.google.com/p/knowitaig" target="_blank">Google Code</a>. It hasn&#8217;t been reviewed yet by anybody, and I even have yet to install it from the installers I built, so I&#8217;m honestly not even sure if it will work. But regardless, I&#8217;ve tagged it as a release in SVN and I&#8217;ll probably be continuing to make improvements and modifications to it here and there. I just wanted it to get out the door so I could stop having that monkey on my back. Monkeys get heavy after a while.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.caledunlap.com/2008/12/knowit-releases-first-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CHALLENGE: Find my heap corruption</title>
		<link>http://www.caledunlap.com/2008/10/challenge-find-my-heap-corruption/</link>
		<comments>http://www.caledunlap.com/2008/10/challenge-find-my-heap-corruption/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 04:20:07 +0000</pubDate>
		<dc:creator>Cale</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://caledunlap.com/blog/?p=69</guid>
		<description><![CDATA[Alright, I&#8217;ve been fighting with some heap corruption for the last month or so with the Angel re-write I&#8217;ve started. The heap corruption is occurring in the client library test program, meaning the source is probably in the client library itself.
Here&#8217;s the source for the test program:


#include &#34;AngelClient.h&#34;
 void main() {
 &#160;&#160;&#160;&#160;AngelKV *kv = new <a href="http://www.caledunlap.com/2008/10/challenge-find-my-heap-corruption/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Alright, I&#8217;ve been fighting with some heap corruption for the last month or so with the Angel re-write I&#8217;ve started. The heap corruption is occurring in the client library test program, meaning the source is probably in the client library itself.</p>
<p>Here&#8217;s the source for the test program:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:3d7ad562-97f3-4de7-9fbb-fe64edd3faec" class="wlWriterEditableSmartContent">
<div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt">
<div style="background-color: #ffffff; max-height: 500px; overflow: auto; padding: 2px 5px; white-space: nowrap"><span style="color:#0000ff">#include</span> <span style="color:#a31515">&quot;AngelClient.h&quot;</span></p>
<p> <span style="color:#0000ff">void</span> main()<br /> {</p>
<p> &#160;&#160;&#160;&#160;AngelKV *kv = <span style="color:#0000ff">new</span> AngelKV(L<span style="color:#a31515">&quot;data&quot;</span>);<br /> &#160;&#160;&#160;&#160;kv-&gt;AddKV(L<span style="color:#a31515">&quot;Name&quot;</span>,L<span style="color:#a31515">&quot;Cale Dunlap&quot;</span>);<br /> &#160;&#160;&#160;&#160;kv-&gt;AddKV(L<span style="color:#a31515">&quot;Age&quot;</span>,L<span style="color:#a31515">&quot;24&quot;</span>);<br /> &#160;&#160;&#160;&#160;kv-&gt;AddKV(L<span style="color:#a31515">&quot;Alias&quot;</span>,L<span style="color:#a31515">&quot;Mazor&quot;</span>);</p>
<p> &#160;&#160;&#160;&#160;AngelClient pClient = AngelClient(<span style="color:#a31515">&quot;pantera&quot;</span>,<span style="color:#a31515">&quot;angeltest&quot;</span>,<span style="color:#a31515">&quot;angeltest&quot;</span>);<br /> &#160;&#160;&#160;&#160;AngelResponse *pResponse = pClient.RunCommand( L<span style="color:#a31515">&quot;AddUser&quot;</span>, kv );</p>
<p> &#160;&#160;&#160;&#160;<span style="color:#0000ff">if</span>( pResponse != NULL )<br /> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#0000ff">delete</span> pResponse;</p>
<p> &#160;&#160;&#160;&#160;pClient.Disconnect();<br /> }</div>
</p></div>
</p></div>
<p><span>The heap corruption is occurring in the default destructor of the AngelClient class. Here is the full source to the <a href="http://caledunlap.com/blog/wp-content/uploads/2008/10/angelsrc.zip">Angel Solution</a>. The visual studio project/solution is for Visual Studio 2008. There&#8217;s a server and client written in C#, but right now I&#8217;m focusing on the client written in C++. I&#8217;m tempted to pay a reward to the person who finds it. If you happen to come across this post and find where my heap corruption is coming from, drop me a line at cale@caledunlap.com.</span></p>
<p>The error messages:</p>
<p><a href="http://caledunlap.com/blog/wp-content/uploads/2008/10/corruption1.jpg"><img class="alignnone size-medium wp-image-73" title="corruption1" alt="" src="http://caledunlap.com/blog/wp-content/uploads/2008/10/corruption1-300x133.jpg" width="300" height="133" /></a></p>
<p><a href="http://caledunlap.com/blog/wp-content/uploads/2008/10/corruption2.jpg"><img class="alignnone size-medium wp-image-74" title="corruption2" alt="" src="http://caledunlap.com/blog/wp-content/uploads/2008/10/corruption2-300x136.jpg" width="300" height="136" /></a></p>
<p>Things I&#8217;ve tried so far:</p>
<ul>
<li>Replaced the socket library 3 times thinking it was something within the socket library </li>
<li>Rewrote the client class twice </li>
<li>Used STL for the linked lists and strings to remove any errors I may have put in doing the linked listing and string handling myself </li>
<li>Undid the STL stuff for the string handling because that obviously didn&#8217;t fix it, plus I was getting even more weirdness with using STL anyway, so it was a step in the wrong direction to begin with. There&#8217;s still a little bit of STL string stuff in there, but only for splitting key/value pairs. </li>
</ul>
<p>I&#8217;m at wits end with this, and I need some help. Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.caledunlap.com/2008/10/challenge-find-my-heap-corruption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
