<?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>Erich Allen Peterson &#187; Tech</title>
	<atom:link href="http://www.erichpeterson.com/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.erichpeterson.com</link>
	<description></description>
	<lastBuildDate>Wed, 01 Feb 2012 22:06:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Calculating Next Invoice Date</title>
		<link>http://www.erichpeterson.com/2007/06/calculating-next-invoice-date/</link>
		<comments>http://www.erichpeterson.com/2007/06/calculating-next-invoice-date/#comments</comments>
		<pubDate>Thu, 07 Jun 2007 19:27:59 +0000</pubDate>
		<dc:creator>Erich Peterson</dc:creator>
				<category><![CDATA[.Net General]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.erichpeterson.com/blog/tech/net-general/calculating-next-invoice-date/</guid>
		<description><![CDATA[Have you have every needed to calculate the date of the next invoice for a customer given their frequency of payment (e.g. monthly or yearly), the day of the month the first invoice was sent out (e.g. 29th, 30th, etc&#8230;), and the date of their last invoice? This can be a little complicated. For example, [...]]]></description>
			<content:encoded><![CDATA[<p>Have you have every needed to calculate the date of the next invoice for a customer given their frequency of payment (e.g. monthly or yearly), the day of the month the first invoice was sent out (e.g. 29th, 30th, etc&#8230;), and the date of their last invoice? This can be a little complicated. For example, let&#8217;s say your invoice for a customer who pays monthly, and signed up for service on the 30th of January. Well you cannot simply take their last invoice 1/30/2007 and add one month using LastInvoice.AddMonths(1) (which will give you 2/28/2007), for instance, becuase when you do the same the following month it will be 3/28/2007 instead of 3/30/2007 like it should be.</p>
<p>Other issues arise when it comes to leap years. The following code takes care of all the problems mentioned above:<br />
<br />
<strong>VB .NET</strong></p>
<pre>
Public Enum LicensePaymentType As Integer
¬† Monthly = 1
¬† Annual = 2
End Enum   

Private Function determineNextInvoice(ByVal LicType As LicensePaymentType, _
¬†         ByVal InvoiceDay As Integer, ByVal LastInvoice As DateTime) As DateTime
¬† If LicType = LicensePaymentType.Monthly Then
¬†¬†¬†¬† If LastInvoice.Day &lt; InvoiceDay Then
¬†¬†¬†¬†¬†¬†¬† Dim Temp As Integer = InvoiceDay - LastInvoice.Day
¬†¬†¬†¬†¬†¬†¬† Dim NewInvDate As DateTime = LastInvoice.AddMonths(1)
¬†¬†¬†¬†¬†¬†¬† Return NewInvDate.AddDays(Temp)
¬†¬†¬†¬† Else
¬†¬†¬†¬†¬†¬†¬† Return LastInvoice.AddMonths(1)
¬†¬†¬†¬† End If
¬† ElseIf LicType = LicensePaymentType.Annual Then
¬†¬†¬†¬† Dim NumDaysNextYearsMonth As Integer = _
           DateTime.DaysInMonth(LastInvoice.AddYears(1).Year, LastInvoice.AddYears(1).Month)
¬†¬†¬†¬† If LastInvoice.Day &lt; InvoiceDay AndAlso NumDaysNextYearsMonth &gt;= InvoiceDay Then
¬†¬†¬†¬†¬†¬†¬† Dim Temp As Integer = InvoiceDay - LastInvoice.Day
¬†¬†¬†¬†¬†¬†¬† Dim NewInvDate As DateTime = LastInvoice.AddYears(1)
¬†¬†¬†¬†¬†¬†¬† Return NewInvDate.AddDays(Temp)
¬†¬†¬†¬† Else
¬†¬†¬†¬† Return LastInvoice.AddYears(1)
¬†¬†¬†¬† End If
¬† End If
End Function</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.erichpeterson.com/2007/06/calculating-next-invoice-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Personalizing Feeds RSS with ASP .NET 2.0</title>
		<link>http://www.erichpeterson.com/2007/06/personalizing-feeds-rss-with-asp-net-20/</link>
		<comments>http://www.erichpeterson.com/2007/06/personalizing-feeds-rss-with-asp-net-20/#comments</comments>
		<pubDate>Wed, 06 Jun 2007 03:57:07 +0000</pubDate>
		<dc:creator>Erich Peterson</dc:creator>
				<category><![CDATA[ASP .Net 2.0]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.erichpeterson.com/blog/tech/asp-net-20/personalizing-feeds-rss-with-asp-net-20/</guid>
		<description><![CDATA[I just wanted to invite everyone to go over to 4GuysFromRolla and read my latest article entitled, &#8220;Personalizing RSS Feeds with ASP .NET 2.0&#8220;.]]></description>
			<content:encoded><![CDATA[<p>I just wanted to invite everyone to go over to <a target="_blank" href="http://www.4guysfromrolla.com">4GuysFromRolla </a>and read my latest article entitled, &#8220;<a target="_blank" href="http://aspnet.4guysfromrolla.com/articles/060607-1.aspx">Personalizing RSS Feeds with ASP .NET 2.0</a>&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.erichpeterson.com/2007/06/personalizing-feeds-rss-with-asp-net-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Replace Those Very Stupid MS Word Curly Quotes (aka Smart Quotes)</title>
		<link>http://www.erichpeterson.com/2007/05/how-to-replace-those-very-stupid-ms-word-curly-quotes-aka-smart-quotes/</link>
		<comments>http://www.erichpeterson.com/2007/05/how-to-replace-those-very-stupid-ms-word-curly-quotes-aka-smart-quotes/#comments</comments>
		<pubDate>Wed, 23 May 2007 21:43:09 +0000</pubDate>
		<dc:creator>Erich Peterson</dc:creator>
				<category><![CDATA[.Net General]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.erichpeterson.com/blog/tech/net-general/how-to-replace-those-very-stupid-ms-word-curly-quotes-aka-smart-quotes/</guid>
		<description><![CDATA[Want to get replace those &#8220;smart quotes&#8221; that MS Word uses in your .NET code? This will do it: VB .NET Dim newstr As String newstr = oldstr.Replace(Chr(147), "&#38; quot;") ' take out extra space b/w &#38; and quot; newstr = newstr.Replace(Chr(148), "&#38; quot;") ' take out extra space b/w &#38; and quot; C# string [...]]]></description>
			<content:encoded><![CDATA[<p>Want to get replace those &#8220;smart quotes&#8221; that MS Word uses in your .NET code? This will do it:</p>
<p><strong>VB .NET</strong></p>
<pre>
Dim newstr As String
newstr = oldstr.Replace(Chr(147), "&amp; quot;") ' take out extra space b/w &amp; and quot;
newstr = newstr.Replace(Chr(148), "&amp; quot;") ' take out extra space b/w &amp; and quot;</pre>
<p><strong>C#</strong></p>
<pre>
string newstr;
newstr = oldstr.Replace((char)147, "&amp; quot;") // take out extra space b/w &amp; and quot;
newstr = newstr.Replace((char)148, "&amp; quot;") // take out extra space b/w &amp; and quot;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.erichpeterson.com/2007/05/how-to-replace-those-very-stupid-ms-word-curly-quotes-aka-smart-quotes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An In-Depth Look at Database Encryption with SQL Server 2005 + ASP .NET v2.0</title>
		<link>http://www.erichpeterson.com/2007/02/an-in-depth-look-at-database-encryption-with-sql-server-2005-asp-net-2/</link>
		<comments>http://www.erichpeterson.com/2007/02/an-in-depth-look-at-database-encryption-with-sql-server-2005-asp-net-2/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 05:07:58 +0000</pubDate>
		<dc:creator>Erich Peterson</dc:creator>
				<category><![CDATA[ASP .Net 2.0]]></category>
		<category><![CDATA[SQL Server 2005]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.erichpeterson.com/blog/?p=51</guid>
		<description><![CDATA[It has been my honor to have another article published on 4GuysFromRolla.com. Entitled &#8220;An Overview of Cryptographic Systems and Encrypting Database Data&#8221; and is the first of a two three part series. The first part (published today) gives an overview of what exactly is encryption, what are its properties, how can it be used, and [...]]]></description>
			<content:encoded><![CDATA[<p>It has been my honor to have another article published on <a href="http://www.4guysfromrolla.com" title="4GuysFromRolla" target="_blank">4GuysFromRolla.com</a>. Entitled &#8220;<a href="http://aspnet.4guysfromrolla.com/articles/021407-1.aspx" title="An Overview of Cryptographic Systems and Encrypting Database Data" target="_blank">An Overview of Cryptographic Systems and Encrypting Database Data</a>&#8221; and is the first of a <strike>two</strike> three part series.</p>
<p>The first part (published today) gives an overview of what exactly is encryption, what are its properties, how can it be used, and what facilities SQL Server 2005 offers to help one create a cryptosystem.</p>
<p>In part two, we go over SQL Server 2005&#8242;s key hierarchy, and T-SQL functions and statements that can be used with symmetric keys to encrypt/decrypt data.</p>
<p>Part three, will introduce asymmetric encryption in SQL Server 2005, and how one can retrieve and send ecrypted data to/from an ASP .NET v2.0 web page.<br />
Hope you enjoy them!</p>
<p><u>Update 2/28/2007</u>: The final and third part of this article series has been posted entitled, &#8220;<a href="http://aspnet.4guysfromrolla.com/articles/022807-1.aspx" target="_blank">Using Asymmetric Encryption and Digital Signatures in a SQL Server 2005 Database</a>&#8220;.</p>
<p><u>Update 2/21/2007</u>: The second part of the three part series has been been posted entitled, &#8220;<a href="http://aspnet.4guysfromrolla.com/articles/022107-1.aspx" title="4GuysFromRolla" target="_blank">Using Symmetric Encryption in a SQL Server 2005 Database</a>&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.erichpeterson.com/2007/02/an-in-depth-look-at-database-encryption-with-sql-server-2005-asp-net-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meebo: Free Online IM&#8217;ing</title>
		<link>http://www.erichpeterson.com/2007/02/meebo-free-online-iming/</link>
		<comments>http://www.erichpeterson.com/2007/02/meebo-free-online-iming/#comments</comments>
		<pubDate>Mon, 05 Feb 2007 00:35:27 +0000</pubDate>
		<dc:creator>Erich Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.erichpeterson.com/blog/?p=50</guid>
		<description><![CDATA[Jiang told me about this one and thought I would share it. It&#8217;s called Meebo and with it you can IM on all the popular instant messaging services though an AJAX-ladan web page!]]></description>
			<content:encoded><![CDATA[<p>Jiang told me about this one and thought I would share it. It&#8217;s called <a href="http://wwwm.meebo.com/" title="Meebo" target="_blank">Meebo </a>and with it you can IM on all the popular instant messaging services though an AJAX-ladan web page!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.erichpeterson.com/2007/02/meebo-free-online-iming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Wii Has Arrived</title>
		<link>http://www.erichpeterson.com/2007/02/the-wii-has-arrived/</link>
		<comments>http://www.erichpeterson.com/2007/02/the-wii-has-arrived/#comments</comments>
		<pubDate>Sun, 04 Feb 2007 05:58:58 +0000</pubDate>
		<dc:creator>Erich Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.erichpeterson.com/blog/?p=49</guid>
		<description><![CDATA[Finally got a Wii after wanting one for a while, and is it worth every stinking penny. Bian, Jiang and I, went half and half on one and he purchased Zelda: The Twilight Princess (which is fantastic).¬† The last gaming console I bought was the Turbo Graphix 16/Turbo Express! So, I&#8217;ve been away from the [...]]]></description>
			<content:encoded><![CDATA[<p>Finally got a <a href="http://wii.com/" title="Nintendo Wii" target="_blank">Wii </a>after wanting one for a while, and is it worth every stinking penny. <a href="http://blog.jiangbian.info" title="Jiang Bian" target="_blank">Bian, Jiang</a> and I, went half and half on one and he purchased <a href="http://en.wikipedia.org/wiki/The_Legend_of_Zelda:_Twilight_Princess" title="Zelda: The Twilight Princess" target="_blank">Zelda: The Twilight Princess</a> (which is fantastic).¬† The last gaming console I bought was the Turbo Graphix 16/Turbo Express! So, I&#8217;ve been away from the console gaming thing for a while, and I forgot how great it can be. Wish me luck catching those virtual fish in Zelda&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.erichpeterson.com/2007/02/the-wii-has-arrived/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Firebug</title>
		<link>http://www.erichpeterson.com/2007/01/firebug/</link>
		<comments>http://www.erichpeterson.com/2007/01/firebug/#comments</comments>
		<pubDate>Tue, 30 Jan 2007 22:08:48 +0000</pubDate>
		<dc:creator>Erich Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.erichpeterson.com/blog/?p=48</guid>
		<description><![CDATA[Firebug has to be one of the best Firefox add-ons for web developer&#8217;s I&#8217;ve seen in a very long time. See HTTP headers, edit CSS on-the-fly, see network activity (i.e. see what is taking the most time to download), debug Javascript, editHTML, and on and on. Check it out for yourself by following the link [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://getfirebug.com/" title="Firebug" target="_blank">Firebug</a> has to be one of the best Firefox add-ons for web developer&#8217;s I&#8217;ve seen in a very long time. See HTTP headers, edit CSS on-the-fly, see network activity (i.e. see what is taking the most time to download), debug Javascript, editHTML, and on and on. Check it out for yourself by following the link above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.erichpeterson.com/2007/01/firebug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP .NET AJAX v1.0 Released</title>
		<link>http://www.erichpeterson.com/2007/01/asp-net-ajax-v10-released/</link>
		<comments>http://www.erichpeterson.com/2007/01/asp-net-ajax-v10-released/#comments</comments>
		<pubDate>Mon, 29 Jan 2007 18:43:54 +0000</pubDate>
		<dc:creator>Erich Peterson</dc:creator>
				<category><![CDATA[ASP .Net General]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.erichpeterson.com/blog/?p=46</guid>
		<description><![CDATA[Microsoft&#8217;s AJAX Framework, formaly code-named &#8220;Atlas&#8221; has now come out of Beta status and is now available in version 1.0. Now known as ASP .NET AJAX; it can be downloaded here, and there are some good tutorial videos on the ASP .Net site as well.]]></description>
			<content:encoded><![CDATA[<p>Microsoft&#8217;s AJAX Framework, formaly code-named &#8220;Atlas&#8221; has now come out of Beta status and is now available in version 1.0. Now known as ASP .NET AJAX; it can be <a href="http://ajax.asp.net/default.aspx" title="ASP .NET AJAX v1.0" target="_blank">downloaded here</a>, and there are some good tutorial videos on the ASP .Net site as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.erichpeterson.com/2007/01/asp-net-ajax-v10-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenID</title>
		<link>http://www.erichpeterson.com/2007/01/openid/</link>
		<comments>http://www.erichpeterson.com/2007/01/openid/#comments</comments>
		<pubDate>Mon, 29 Jan 2007 17:48:35 +0000</pubDate>
		<dc:creator>Erich Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.erichpeterson.com/blog/?p=45</guid>
		<description><![CDATA[OpenID provides a way in which you can log into multiple site, without having to create a seperate account on each one. It uses a decentralized achitectual model, and you can even setup your own OpenID server or even use your own domain name as part of your login. Pretty neat stuff. I hope this [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/OpenID" title="OpenID" target="_blank">OpenID</a> provides a way in which you can log into multiple site, without having to create a seperate account on each one. It uses a decentralized achitectual model, and you can even setup your own OpenID server or even use your own domain name as part of your login.</p>
<p>Pretty neat stuff. I hope this catches on with a lot of existing and new sites. Check out this <a href="http://simonwillison.net/2006/openid-screencast/" title="OpenID Demonstration" target="_blank">video for a preview</a> on how it works.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.erichpeterson.com/2007/01/openid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple iPhone + Nintendo Wii</title>
		<link>http://www.erichpeterson.com/2007/01/apple-iphone/</link>
		<comments>http://www.erichpeterson.com/2007/01/apple-iphone/#comments</comments>
		<pubDate>Sat, 13 Jan 2007 07:49:18 +0000</pubDate>
		<dc:creator>Erich Peterson</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.erichpeterson.com/blog/?p=42</guid>
		<description><![CDATA[Three words: &#8220;I want one!&#8221; Oh yeah, I want this too.]]></description>
			<content:encoded><![CDATA[<p>Three words: &#8220;<a target="_blank" title="Apple iPhone" href="http://www.apple.com/iphone/">I want one!</a>&#8221; Oh yeah, I want <a title="Nintendo Wii" target="_blank" href="http://wii.nintendo.com/">this</a> too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.erichpeterson.com/2007/01/apple-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

