<?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>Ken Patrick - Code of the Week</title>
	<atom:link href="http://blog.kenpatrick.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.kenpatrick.net</link>
	<description>.Net, C#, VB.NET, T-SQL, PL-SQL Code samples</description>
	<lastBuildDate>Wed, 21 Apr 2010 15:47:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Very simple asp.net captcha control! C#</title>
		<link>http://blog.kenpatrick.net/?p=203</link>
		<comments>http://blog.kenpatrick.net/?p=203#comments</comments>
		<pubDate>Wed, 21 Apr 2010 15:43:26 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Simple Captcha]]></category>

		<guid isPermaLink="false">http://blog.kenpatrick.net/?p=203</guid>
		<description><![CDATA[There are many ways in .Net to implement a captcha element. The reason I designed this is because: 1. It&#8217;s easy. 2. Doesn&#8217;t annoy the user. 3. It&#8217;s effective! 4. User could copy and paste the captcha code. 5. User can be color blind and still read the captcha. Here&#8217;s How: add a label (lblCaptcha)and [...]]]></description>
			<content:encoded><![CDATA[<p>There are many ways in .Net to implement a captcha element.  The reason I designed this is because:</p>
<p>1.  It&#8217;s easy.<br />
2.  Doesn&#8217;t annoy the user.<br />
3.  It&#8217;s effective!<br />
4.  User could copy and paste the captcha code.<br />
5.  User can be color blind and still read the captcha.</p>
<p>Here&#8217;s How:</p>
<p>add a label (<strong>lblCaptcha)</strong>and textbox (<strong>txtCaptcha)</strong>to your asp.net page.</p>
<p>add the following code to the page_load:</p>
<p><strong>if (!IsPostBack)<br />
{<br />
</strong></p>
<p><span style="color: #339966;"><strong>//generate a random number for the captcha label</strong></span></p>
<p><strong>int MyRandom;<br />
Random random = new Random();<br />
MyRandom = random.Next(999, 999999);<br />
string New_Random = MyRandom.ToString(&#8220;000000&#8243;);<br />
<span style="color: #ff0000;">lblCaptcha.Text</span></strong> <strong> = New_Random;<br />
}</strong></p>
<p>on your btnsend event add the following code:</p>
<p><strong>protected void btnSend_Click(object sender, EventArgs e)<br />
{</strong></p>
<p><strong>if (lblCaptcha.Text == txtCaptcha.Text)<br />
{</strong></p>
<p><strong><span style="color: #339966;">//more code here to process the E-mail form.</span><br />
</strong></p>
<p><strong>}</strong></p>
<p><strong>else</strong></p>
<p><strong>{</strong></p>
<p><span style="color: #339966;"><strong>//Show error msg</strong></span></p>
<p><strong>}<br />
</strong></p>
<p>that&#8217;s it!</p>
<div id="attachment_204" class="wp-caption alignleft" style="width: 310px"><a href="http://blog.kenpatrick.net/wp-content/uploads/2010/04/Simple_Captcha.jpg"><img class="size-medium wp-image-204" title="Email form with Simple Captcha" src="http://blog.kenpatrick.net/wp-content/uploads/2010/04/Simple_Captcha-300x172.jpg" alt="Email form with Simple Captcha" width="300" height="172" /></a><p class="wp-caption-text">Email form with Simple Captcha</p></div>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D203&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=203</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Great CSS tips and tricks site!</title>
		<link>http://blog.kenpatrick.net/?p=192</link>
		<comments>http://blog.kenpatrick.net/?p=192#comments</comments>
		<pubDate>Fri, 16 Apr 2010 14:20:09 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=192</guid>
		<description><![CDATA[http://tools.dynamicdrive.com/]]></description>
			<content:encoded><![CDATA[<p><a href="http://tools.dynamicdrive.com/" target="_blank">http://tools.dynamicdrive.com/</a></p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D192&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=192</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple C# Mobile Browser Detection (Asp.Net)</title>
		<link>http://blog.kenpatrick.net/?p=184</link>
		<comments>http://blog.kenpatrick.net/?p=184#comments</comments>
		<pubDate>Tue, 06 Apr 2010 19:01:36 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Mobile Browsers]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[mobile browser detection]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=184</guid>
		<description><![CDATA[protected void Page_Load(object sender, EventArgs e) { Boolean isMobile = (Request.Browser.IsMobileDevice); //redirect to the mobile directory through .htaccess if (isMobile) Response.Redirect(&#8220;http://m.kmtargets.com&#8220;); }]]></description>
			<content:encoded><![CDATA[<p><span style="color: #0000ff;">protected void</span> Page_Load(<span style="color: #0000ff;">object</span> sender, <span style="color: #0000ff;">EventArgs</span> e)<br />
{</p>
<p><span style="color: #00ccff;">Boolean</span> isMobile = (Request.Browser.IsMobileDevice);</p>
<p><span style="color: #008000;">//redirect to the mobile directory through .htaccess</span></p>
<p><span style="color: #0000ff;">if</span> (isMobile) Response.Redirect(<span style="color: #993300;">&#8220;</span><span style="color: #800000;">http://m.kmtargets.com</span><span style="color: #993300;">&#8220;</span>);</p>
<p>}</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D184&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=184</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recent Website Work (Redesign and Search Engine Optimization)</title>
		<link>http://blog.kenpatrick.net/?p=172</link>
		<comments>http://blog.kenpatrick.net/?p=172#comments</comments>
		<pubDate>Tue, 30 Mar 2010 13:44:27 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Godaddy]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=172</guid>
		<description><![CDATA[Website Before: Website After: Live Site: http://www.glkirkbuidersinc.com]]></description>
			<content:encoded><![CDATA[<p>Website Before:</p>
<p><a href="http://www.kenpatrick.net/blog/wp-content/uploads/2010/03/Gary_Before.jpg"><img class="alignnone size-medium wp-image-173" title="Website Before" src="http://www.kenpatrick.net/blog/wp-content/uploads/2010/03/Gary_Before-300x180.jpg" alt="Website Before" width="300" height="180" /></a></p>
<p>Website After:</p>
<p><a href="http://www.kenpatrick.net/blog/wp-content/uploads/2010/03/Gary_After.jpg"><img class="alignnone size-medium wp-image-174" title="Website After" src="http://www.kenpatrick.net/blog/wp-content/uploads/2010/03/Gary_After-300x213.jpg" alt="Website After" width="300" height="213" /></a></p>
<p>Live Site: <a title="Live Site" href="http://glkirkbuildersinc.com" target="_blank">http://www.glkirkbuidersinc.com</a></p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D172&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=172</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update Table using CASE Sql-Server 2005</title>
		<link>http://blog.kenpatrick.net/?p=160</link>
		<comments>http://blog.kenpatrick.net/?p=160#comments</comments>
		<pubDate>Sat, 06 Mar 2010 16:29:34 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[SQL-Server]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Case]]></category>
		<category><![CDATA[SQL-Server 2005]]></category>
		<category><![CDATA[Update Statement]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=160</guid>
		<description><![CDATA[UPDATE UDO_LIST SET IS_VALID = CASE WHEN GETDATE() &#62; DATE_DUE THEN 0 ELSE 1 END WHERE SPAN = &#8216;S&#8217; and STATUS = &#8216;NONE&#8217; and IS_DHS = 0]]></description>
			<content:encoded><![CDATA[<p><span style="color: #0000ff;">UPDATE</span> UDO_LIST<span style="color: #0000ff;"> SET</span> IS_VALID = <span style="color: #0000ff;">CASE</span><br />
<span style="color: #0000ff;">WHEN</span> <span style="color: #ff00ff;">GETDATE()</span> &gt; DATE_DUE <span style="color: #0000ff;">THEN</span> 0<br />
<span style="color: #0000ff;">ELSE</span> 1<br />
<span style="color: #0000ff;">END</span><br />
<span style="color: #0000ff;">WHERE</span> SPAN <span style="color: #808080;">=</span><span style="color: #ff0000;"> &#8216;S&#8217;</span><br />
<span style="color: #808080;">and</span> <span style="color: #0000ff;">STATUS</span> <span style="color: #808080;">=</span> <span style="color: #ff0000;">&#8216;NONE&#8217;</span><br />
<span style="color: #808080;">and</span> IS_DHS <span style="color: #808080;">=</span> 0</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D160&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=160</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Selection with equi join (Oracle)</title>
		<link>http://blog.kenpatrick.net/?p=164</link>
		<comments>http://blog.kenpatrick.net/?p=164#comments</comments>
		<pubDate>Sun, 28 Feb 2010 13:49:12 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[Select]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=164</guid>
		<description><![CDATA[SELECT A.ACCOUNT, A.TOT_DUE_AMT, A.STATUS, A.NEXT_STAT_DATE, SUBSTR(T.PHONE_HOME,1,7) PHONEFRAG FROM RACCOUNT A, RACCTREL T WHERE A.ACCOUNT= T.ACCOUNT AND T.REL_POS = &#8217;1&#8242; AND T.P_A_ADDR_FLAG = &#8216;P&#8217; AND (A.TOT_DUE_AMT BETWEEN 26 AND 501)  AND A.LINK_STAT = 0 AND A.NO_ACCOUNTS = 1 AND A.DIVISION_ID=&#8217;PORT&#8217; AND A.STATUS=&#8217;R2C&#8217;]]></description>
			<content:encoded><![CDATA[<p>SELECT A.ACCOUNT, A.TOT_DUE_AMT, A.STATUS, A.NEXT_STAT_DATE, SUBSTR(T.PHONE_HOME,1,7) PHONEFRAG<br />
<strong>FROM RACCOUNT A, RACCTREL T WHERE A.ACCOUNT= T.ACCOUNT</strong> AND<br />
T.REL_POS = &#8217;1&#8242; AND<br />
T.P_A_ADDR_FLAG = &#8216;P&#8217; AND<br />
(A.TOT_DUE_AMT BETWEEN 26 AND 501)  AND<br />
A.LINK_STAT = 0 AND<br />
A.NO_ACCOUNTS = 1 AND<br />
A.DIVISION_ID=&#8217;PORT&#8217; AND<br />
A.STATUS=&#8217;R2C&#8217;</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D164&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=164</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excellent Web Design Book!</title>
		<link>http://blog.kenpatrick.net/?p=146</link>
		<comments>http://blog.kenpatrick.net/?p=146#comments</comments>
		<pubDate>Fri, 19 Feb 2010 21:44:15 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Design Books]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=146</guid>
		<description><![CDATA[Color Theory The Color Wheel Using Colors Texture Theory Using Textures Page elements]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 152px"><a class="alignleft" title="Site-Seeing" href="http://www.amazon.com/gp/product/0764536745?ie=UTF8&amp;tag=kenpatricknet-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0764536745" target="_self"><img title="Site-Seeing  &quot;A Visual Approach to Web Design&quot;" src="https://images-na.ssl-images-amazon.com/images/I/419VPZ4NDKL._SL160_.jpg" alt="Site-Seeing  &quot;A Visual Approach to Web Design&quot;" width="142" height="160" /></a><p class="wp-caption-text">Site-Seeing  &quot;A Visual Approach to Web Design&quot;</p></div>
<ul>
<li>Color Theory</li>
<li>The Color Wheel</li>
<li>Using Colors</li>
<li>Texture Theory</li>
<li>Using Textures</li>
<li>Page elements</li>
</ul>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D146&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=146</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Design Concepts BrainBench Results</title>
		<link>http://blog.kenpatrick.net/?p=139</link>
		<comments>http://blog.kenpatrick.net/?p=139#comments</comments>
		<pubDate>Fri, 19 Feb 2010 18:00:37 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[BrainBench]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=139</guid>
		<description><![CDATA[Name:  Web Design Concepts Score: 4.36  out of 5.00   Date: 2010-02-19 View detailed topic results Scored higher than 98% of all previous test takers. Demonstrates a clear understanding of many advanced concepts within this topic. Appears capable of mentoring others on most projects in this area. Strengths Web Analytics Design Process DOM Scripting (Javascript) [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.brainbench.com/images/certlogo/color/mastercert/webdesignconcepts.gif" alt="BrainBench Badge" /></p>
<p>Name:  Web Design Concepts<br />
Score: 4.36  out of 5.00   Date: 2010-02-19</p>
<p>View detailed topic results</p>
<p><strong>Scored higher than 98% of all previous test takers.</strong></p>
<p>Demonstrates a clear understanding of many advanced concepts within this topic. Appears capable of mentoring others on most projects in this area.<br />
Strengths<br />
Web Analytics<br />
Design Process<br />
DOM Scripting (Javascript)<br />
WWW (World Wide Web) Knowledge<br />
Accessibility<br />
Web Usability<br />
CSS Knowledge<br />
Weak Areas<br />
None Noted</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D139&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=139</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ADO.Net 2.0 BrainBench Results</title>
		<link>http://blog.kenpatrick.net/?p=129</link>
		<comments>http://blog.kenpatrick.net/?p=129#comments</comments>
		<pubDate>Mon, 15 Feb 2010 15:43:24 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[BrainBench]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=129</guid>
		<description><![CDATA[2010-02-15 Brainbench Completed Test:  Name: ADO.NET 2.0 Score: 3.40 out of 5.0 Date: 2010-02-15 View detailed topic results Scored higher than 88% of all previous test takers. Demonstrates a solid understanding of core concepts within this topic. Appears capable of working on most projects in this area with moderate assistance. May require some initial assistance [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.brainbench.com/images/certlogo/color/cert/adonet20.gif" border="0" alt="" vspace="3" /></p>
<p>2010-02-15</p>
<p>Brainbench</p>
<p>Completed Test:  Name: ADO.NET 2.0</p>
<p>Score: 3.40 out of 5.0</p>
<p>Date: 2010-02-15</p>
<p>View detailed topic results</p>
<p><strong>Scored higher than 88% of all previous test takers.</strong></p>
<p>Demonstrates a solid understanding of core concepts within this topic. Appears capable of working on most projects in this area with moderate assistance. May require some initial assistance with advanced concepts, however.<br />
Strengths<br />
Object Model<br />
Components<br />
DataBindings<br />
Implementation<br />
Weak Areas<br />
Datasources<br />
XML</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D129&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=129</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source Software I use.</title>
		<link>http://blog.kenpatrick.net/?p=123</link>
		<comments>http://blog.kenpatrick.net/?p=123#comments</comments>
		<pubDate>Sun, 14 Feb 2010 13:29:48 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[open source software]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=123</guid>
		<description><![CDATA[Just ran into this site while downloading Subversion for my home source code repository.  Yes, I use source code  control at home&#8230;pretty geeky I know. The link below is a list of the Open Source Projects I use as a part of daily computing.]]></description>
			<content:encoded><![CDATA[<p>Just ran into this site while downloading Subversion for my home source code repository. <strong> Yes, I use source code  control at home&#8230;pretty geeky</strong> <strong>I know</strong>. The link below is a list of the Open Source Projects I use as a part of daily computing.</p>
<p><script src="https://www.ohloh.net/stacks/66781/widgets/stack_normal?icon_width=24&amp;icon_height=24&amp;title=My%20opensource%20Basics&amp;width=354&amp;projects_shown=24&amp;noclear=true" type="text/javascript"></script></p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D123&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=123</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows XP BrainBench Results</title>
		<link>http://blog.kenpatrick.net/?p=116</link>
		<comments>http://blog.kenpatrick.net/?p=116#comments</comments>
		<pubDate>Tue, 09 Feb 2010 14:13:52 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[BrainBench]]></category>
		<category><![CDATA[WIN XP]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=116</guid>
		<description><![CDATA[Completed Test Name: Computer Fundamentals (Win XP) Score: 4.17  out of 5.00   Date: 2010-02-05 View detailed topic results Scored higher than 93% of all previous test takers. Demonstrates a clear understanding of many advanced concepts within this topic. Appears capable of mentoring others on most projects in this area. Strengths Basic Windows Features Hardware [...]]]></description>
			<content:encoded><![CDATA[<p><img src="file:///C:/Users/ken/AppData/Local/Temp/moz-screenshot.png" alt="" /><a href="http://www.kenpatrick.net/blog/wp-content/uploads/2010/02/computerfundamentalswinxp.gif"><img class="alignnone size-full wp-image-117" title="computerfundamentalswinxp" src="http://www.kenpatrick.net/blog/wp-content/uploads/2010/02/computerfundamentalswinxp.gif" alt="" width="171" height="52" /></a></p>
<p>Completed Test<br />
Name: Computer Fundamentals (Win XP)<br />
Score: 4.17  out of 5.00   Date: 2010-02-05</p>
<p>View detailed topic results</p>
<p><strong>Scored higher than 93% of all previous test takers.</strong></p>
<p>Demonstrates a clear understanding of many advanced concepts within this topic. Appears capable of mentoring others on most projects in this area.<br />
Strengths<br />
Basic Windows Features<br />
Hardware<br />
Networking<br />
Weak Areas<br />
Files and Folders<br />
Help and Support Center<br />
Control Panel</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D116&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=116</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL-Server 2005 Programming BrainBench Results</title>
		<link>http://blog.kenpatrick.net/?p=107</link>
		<comments>http://blog.kenpatrick.net/?p=107#comments</comments>
		<pubDate>Fri, 05 Feb 2010 15:41:31 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[SQL-Server]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[BrainBench]]></category>
		<category><![CDATA[SQL-Server 2005]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=107</guid>
		<description><![CDATA[Ken Patrick has completed testing for SQL Server 2005 Programming. Session ID: XXXXX14923386XXXXX Job ID: 2XXXXX    Job Title: SQL Server 2005 Programming Score: 3.27 out of 5.00 Proficiency Level: Proficient (2.51 &#8211; 3.50) The candidate has mastered the basic concepts of MS SQL Server 2005 Programming, including: •  Queries •  Referential Integrity •  Transact-SQL [...]]]></description>
			<content:encoded><![CDATA[<p>Ken Patrick has completed testing for SQL Server 2005 Programming.<br />
Session ID: XXXXX14923386XXXXX<br />
Job ID: 2XXXXX    Job Title: SQL Server 2005 Programming</p>
<p>Score: 3.27 out of 5.00<br />
Proficiency Level: Proficient (2.51 &#8211; 3.50)<br />
The candidate has mastered the basic concepts of MS SQL Server 2005 Programming, including:<br />
•  Queries<br />
•  Referential Integrity<br />
•  Transact-SQL<br />
The candidate demonstrates a clear understanding of intermediate MS SQL Server 2005 Programming concepts, such as:<br />
•  Indexes<br />
•  Triggers<br />
•  Stored Procedures<br />
The candidate may have some knowledge of more advanced MS SQL Server 2005 Programming concepts such as:<br />
•  Architecture<br />
•  Views<br />
•  Performance﻿</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D107&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=107</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Oracle &#8211; Select the Column Names of a Table by Column Type</title>
		<link>http://blog.kenpatrick.net/?p=100</link>
		<comments>http://blog.kenpatrick.net/?p=100#comments</comments>
		<pubDate>Tue, 02 Feb 2010 15:29:02 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Select]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=100</guid>
		<description><![CDATA[&#8211;Select Column Names By Column Type (within a Table) SELECT column_name, data_type FROM user_tab_cols WHERE table_name=&#8217;RACCOUNT&#8217; and DATA_TYPE=&#8217;DATE&#8217;;]]></description>
			<content:encoded><![CDATA[<p><span style="color: #008000;">&#8211;Select Column Names By Column Type (within a Table)</span></p>
<p>SELECT column_name, data_type</p>
<p>FROM <span style="color: #0000ff;">user_tab_cols</span></p>
<p>WHERE table_name=&#8217;RACCOUNT&#8217;</p>
<p>and DATA_TYPE=&#8217;DATE&#8217;;</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D100&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=100</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(T-SQL) Oracle to SQL Multi-Function Stored Procedure</title>
		<link>http://blog.kenpatrick.net/?p=93</link>
		<comments>http://blog.kenpatrick.net/?p=93#comments</comments>
		<pubDate>Fri, 29 Jan 2010 01:37:38 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL-Server]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[Insert Statement]]></category>
		<category><![CDATA[SQL-Server 2005]]></category>
		<category><![CDATA[Stored Procedure]]></category>
		<category><![CDATA[Update Statement]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=93</guid>
		<description><![CDATA[SET quoted_identifier ON GO SET ansi_nulls ON GO ALTER    PROCEDURE [dbo].[EMMS_HR_USER_UPDATE] AS Set ANSI_NULLS ON BEGIN declare @EMPLOYEEINFO_SYS1_COUNT  integer set @EMPLOYEEINFO_SYS1_COUNT = (select count(*) from [SYSTEM1\GPMS].EMMS.dbo.Employee_INFO) If @EMPLOYEEINFO_SYS1_COUNT &#62; 3000 BEGIN &#8211;Backup the existing Employee_info table Delete from Employee_INFO_BAK INSERT INTO Employee_INFO_BAK Select * from  [SYSTEM1\GPMS].EMMS.dbo.Employee_INFO &#8211;Backup the existing [User] table Delete from USER_BAK INSERT [...]]]></description>
			<content:encoded><![CDATA[<p>SET quoted_identifier ON<br />
GO<br />
SET ansi_nulls ON<br />
GO</p>
<p>ALTER    PROCEDURE [dbo].[EMMS_HR_USER_UPDATE]<br />
AS<br />
Set ANSI_NULLS ON</p>
<p>BEGIN<br />
declare @EMPLOYEEINFO_SYS1_COUNT  integer<br />
set @EMPLOYEEINFO_SYS1_COUNT = (select count(*) from [SYSTEM1\GPMS].EMMS.dbo.Employee_INFO)<br />
If @EMPLOYEEINFO_SYS1_COUNT &gt; 3000<br />
BEGIN<br />
&#8211;Backup the existing Employee_info table<br />
Delete from Employee_INFO_BAK<br />
INSERT INTO Employee_INFO_BAK<br />
Select * from  [SYSTEM1\GPMS].EMMS.dbo.Employee_INFO<br />
&#8211;Backup the existing [User] table<br />
Delete from USER_BAK<br />
INSERT INTO USER_BAK<br />
SELECT * from [USER]</p>
<p>&#8211;Update the EMMS_LIVE EmployeeInfo table with the SYSTEM1 feed table<br />
delete from  Employee_INFO<br />
INSERT INTO Employee_INFO<br />
Select * from  [SYSTEM1\GPMS].EMMS.dbo.Employee_INFO<br />
END</p>
<p>&#8211;Add skeleton records for new EMPLOYEES<br />
If @EMPLOYEEINFO_SYS1_COUNT &gt; 3000<br />
BEGIN<br />
Declare @USERID varchar(6)<br />
Declare @UNAME varchar(50)<br />
Declare @PW BINARY (16)<br />
SET @PW = CONVERT(binary, &#8217;0x49A93E8441D1B20C887E4887820976C4&#8242;)<br />
Declare SKEL_RECORDS CURSOR<br />
For select EMPL_ID,  dbo.DELTEK_USER_NAME(EMPL_ID) as UNAME<br />
from Employee_INFO where<br />
EMPL_ID NOT IN (SELECT UserID from [USER])<br />
Open SKEL_RECORDS<br />
Fetch NEXT From SKEL_RECORDS<br />
into @USERID,@UNAME<br />
While @@Fetch_Status = 0<br />
BEGIN<br />
EXECUTE sp_EMMS_Insrt_SKL @biPassword = @PW, @sUserID = @USERID, @sUserName = @UNAME,<br />
@iErrorCODE = &#8216; &#8216;<br />
Fetch Next from SKEL_RECORDS INTO @USERID,@UNAME<br />
END<br />
CLOSE SKEL_RECORDS<br />
DEALLOCATE SKEL_RECORDS<br />
END</p>
<p>If @EMPLOYEEINFO_SYS1_COUNT &gt; 3000<br />
BEGIN<br />
&#8211;Lock the Employee EMMS Account as they are no longer in the HR feed<br />
Declare LOCKACCT_RECORDS CURSOR<br />
For Select USERID from [USER] where USERID<br />
not in (SELECT EMPL_ID from EMPLOYEE_INFO)<br />
and USERID not in (&#8217;0&#8242;,&#8217;999999&#8242;) and locked=&#8217;0&#8242;</p>
<p>Open LOCKACCT_RECORDS<br />
Fetch NEXT From LOCKACCT_RECORDS<br />
into @USERID<br />
While @@Fetch_Status = 0<br />
BEGIN<br />
EXECUTE sp_EMMS_EMPLOYEE_LOCK_ACCT @dcID = @USERID, @iErrorCODE = &#8216; &#8216;<br />
Fetch Next from LOCKACCT_RECORDS INTO @USERID<br />
END<br />
CLOSE LOCKACCT_RECORDS<br />
DEALLOCATE LOCKACCT_RECORDS<br />
END</p>
<p>&#8211;End For the &#8220;If&#8221; statement<br />
END</p>
<p>GO<br />
SET QUOTED_IDENTIFIER OFF<br />
GO<br />
SET ANSI_NULLS ON<br />
GO</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D93&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=93</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Statute Of Limitations Oracle Function (Oracle PL/SQL)</title>
		<link>http://blog.kenpatrick.net/?p=14</link>
		<comments>http://blog.kenpatrick.net/?p=14#comments</comments>
		<pubDate>Sun, 24 Jan 2010 14:38:08 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Statute Of Limitations]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=14</guid>
		<description><![CDATA[CREATE OR REPLACE FUNCTION WITHIN4SOL(vACCOUNT VARCHAR2, STATEABBV VARCHAR2, vYEARS INTEGER) RETURN INTEGER IS &#8211;KJP 05-16-2005 &#8211;Calculate Statute Of Limitations, the result is a 1 &#8211;if the account will still be in statute in 4 months, 0 If not&#8230; SOLDAYS INTEGER := vYears * 365; &#8211;Multiply N years times days to use the days variable D_DAY [...]]]></description>
			<content:encoded><![CDATA[<p>CREATE OR REPLACE FUNCTION WITHIN4SOL(vACCOUNT VARCHAR2, STATEABBV VARCHAR2,</p>
<p>vYEARS INTEGER) RETURN INTEGER IS</p>
<p>&#8211;KJP 05-16-2005</p>
<p>&#8211;Calculate Statute Of Limitations, the result is a 1</p>
<p>&#8211;if the account will still be in statute in 4 months, 0 If not&#8230;</p>
<p>SOLDAYS INTEGER := vYears * 365;</p>
<p>&#8211;Multiply N years times days to use the days variable</p>
<p>D_DAY DATE := SYSDATE + 120;</p>
<p>&#8211;Roughly 4 months from today is the latest it TW USEFUL_DATE DATE;</p>
<p>&#8211;Running through the possible values to use for dates.</p>
<p>&#8211;This is the value that ends up being the one</p>
<p>&#8211;to compare against for SOL calculation</p>
<p>CURSOR C1_CURSOR(vACCOUNT varchar2) IS</p>
<p>SELECT NVL(R.CHGOFF_DATE, SYSDATE &#8211; 7500) AS COD,</p>
<p>NVL(R.LAST_PAY_DATE, SYSDATE &#8211; 7500) AS LPD, NVL(R.CONTRACT_DATE, SYSDATE &#8211; 7500)</p>
<p>as CD, NVL(R.DTE_LST_CR_CHG,SYSDATE &#8211; 7500) as LCC FROM</p>
<p>RACCOUNT R WHERE ACCOUNT = vACCOUNT and DIVISION_ID=&#8217;PORT&#8217;;</p>
<p>C1_RECORD C1_CURSOR%ROWTYPE;</p>
<p>BEGIN</p>
<p>OPEN C1_CURSOR(vACCOUNT);</p>
<p>FETCH C1_CURSOR INTO C1_RECORD;</p>
<p>CASE STATEABBV</p>
<p>&#8211;Texas has its own Rules</p>
<p>When &#8216;TX&#8217; THEN</p>
<p>IF (C1_RECORD.COD + SOLDAYS) &gt; D_DAY then</p>
<p>RETURN 1;</p>
<p>ELSE</p>
<p>RETURN 0;</p>
<p>END IF;</p>
<p>&#8211;Every other State but TX</p>
<p>ELSE</p>
<p>&#8211; Find the best date</p>
<p>IF C1_RECORD.LCC &gt; C1_RECORD.LPD then</p>
<p>USEFUL_DATE := (C1_RECORD.LCC + SOLDAYS);</p>
<p>END IF;</p>
<p>IF C1_RECORD.LPD &gt; (SYSDATE &#8211; 7400) then</p>
<p>USEFUL_DATE := (C1_RECORD.LPD + SOLDAYS);</p>
<p>END IF;</p>
<p>IF C1_RECORD.CD &gt; (SYSDATE &#8211; 7400) AND USEFUL_DATE IS NULL then</p>
<p>USEFUL_DATE := (C1_RECORD.CD + SOLDAYS);</p>
<p>END IF;</p>
<p>IF C1_RECORD.COD &gt; (SYSDATE &#8211; 7400) AND USEFUL_DATE IS NULL then</p>
<p>USEFUL_DATE := (C1_RECORD.COD + SOLDAYS);</p>
<p>End IF;</p>
<p>IF USEFUL_DATE &gt; D_DAY THEN</p>
<p>RETURN 1;</p>
<p>ELSE</p>
<p>RETURN 0;</p>
<p>END IF;</p>
<p>END CASE;</p>
<p>EXCEPTION</p>
<p>WHEN OTHERS THEN</p>
<p>RETURN 0;</p>
<p>END;</p>
<p>/</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D14&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=14</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ellipse function which writes an Arcview Ellipse Polyline string (VB 6)</title>
		<link>http://blog.kenpatrick.net/?p=39</link>
		<comments>http://blog.kenpatrick.net/?p=39#comments</comments>
		<pubDate>Tue, 22 Dec 2009 19:26:27 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[VB 6]]></category>
		<category><![CDATA[ArcView]]></category>
		<category><![CDATA[Ellipse]]></category>
		<category><![CDATA[Polyline]]></category>
		<category><![CDATA[VB6]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=39</guid>
		<description><![CDATA[Public Function fnctn_ELLIPSE(Lat As Single, Lon As Single, Major As Single, Minor As Single, Orient As Single) As String &#8216; &#8216;Author Kenneth Patrick UNCLASSIFIED &#8216;fnctn_ELLIPSE &#8216;Created: 16 may 1998 &#8216;Last Update 17 March 1999 &#8216;ELLIPSE ALGORITHM &#8211; Writes an ARCVIEW Ellipse Polyline Shape String, based on input On Error GoTo errorhandler Dim X As Single [...]]]></description>
			<content:encoded><![CDATA[<p>Public Function fnctn_ELLIPSE(Lat As Single, Lon As Single, Major As  		Single, Minor As Single, Orient As Single) As String<br />
&#8216;<br />
&#8216;Author Kenneth Patrick UNCLASSIFIED<br />
&#8216;fnctn_ELLIPSE<br />
&#8216;Created: 16 may 1998<br />
&#8216;Last Update 17 March 1999<br />
&#8216;ELLIPSE ALGORITHM &#8211; Writes an ARCVIEW Ellipse Polyline Shape String,  		based on input</p>
<p>On Error GoTo errorhandler</p>
<p>Dim X As Single &#8216;Variable to figure for first X (LON), X is the X offset  		from the origon of the ELLIPSE<br />
Dim Y As Single &#8216;Variable to figure for first Y (LAT), Y is the Y offset  		from the origon of the ELLIPSE<br />
Dim New_X As Single &#8216;Variable to figure for NEW X (LON), X is the X  		offset (USING the Axis Orientation) from the origon<br />
Dim New_Y As Single &#8216;Variable to figure for NEW Y (LAT), Y is the Y  		offset (USING the Axis Orientation) from the origon<br />
Dim Angle As Integer &#8216;Angle from 1 to 361 used to run in the DO LOOP<br />
Dim CSign_Orient As Single &#8216;COS of the AXIS ORIENTATION (Orient) used to  		fig NEW_X and NEW_Y<br />
Dim SSign_Orient As Single &#8216;SIN of the AXIS ORIENTATION (Orient) used to  		fig NEW_X and NEW_Y<br />
Dim Neg_X As Single &#8216; Negative of the X used to figure NEW_Y<br />
Dim New_Script_Str As String &#8216;Holds the New Script calculated with Axis  		Orientation</p>
<p><span style="font-family: Verdana; font-size: x-small;">Major = Major / 60<br />
Minor = Minor / 60</span></p>
<p>Angle = 1</p>
<p>&#8216;reverse the Orientation, positive numbers rotate the origional axis  		counterclockwise, I use<br />
&#8216;negative numbers to coincide with the clockwise direction of increasing  		bearings<br />
Orient = -(Orient)</p>
<p>&#8216;Main Do loop&#8230;overlaps past 360 degrees because ARCVIEW drops the last  		point whether or not the graphic shape is a complete unit</p>
<p>Do Until Angle &gt;= 370<br />
&#8216;Sin the major and Cos the minor<br />
&#8216;Figure initial X and Y offset (orientation axis offset) based off of  		these figured points.<br />
X = Sin(Angle * DGRS_RAD) * Major &#8216;Figure X (Longitude) based off Major  		Ellipse (.01745 = the radian to angle ratio)<br />
Y = Cos(Angle * DGRS_RAD) * Minor &#8216;Figure Y (Latitude) based off Minor  		Ellipse (.01745 = the radian to angle ratio)</p>
<p>START_LON = Lon &#8216; utilize the Lon value passed to it&#8230;must be a single<br />
START_LAT = Lat &#8216; utilize the Lat value passed to it&#8230;must be a single</p>
<p>&#8216;Prerequisite figures to perform the NEW_X and NEW_Y<br />
CSign_Orient = Cos(Orient * DGRS_RAD)<br />
SSign_Orient = Sin(Orient * DGRS_RAD)<br />
Neg_X = -(X)</p>
<p>New_X = (X * CSign_Orient) + (Y * SSign_Orient)<br />
New_Y = (Neg_X * SSign_Orient) + (Y * CSign_Orient)<br />
New_X = New_X + START_LAT &#8216;Add the offset to the origon point<br />
New_Y = New_Y + START_LON &#8216;Add the offset to the origon point<br />
Dim My_Y As Variant<br />
My_Y = New_Y<br />
My_Y = CDec(My_Y)</p>
<p>Select Case Angle<br />
Case 1<br />
&#8216;First Point for the ELLIPSE script, needs the opening &#8220;( {{&#8221;<br />
New_Script_Str = &#8220;thepolyLine = PolyLine.Make ( {{&#8221; &amp; My_Y &amp; &#8220;@&#8221; &amp; New_X  		&amp; &#8220;,&#8221;<br />
Case 361<br />
&#8216;Last Point for the ELLIPSE script, needs the &#8220;}} )&#8221;<br />
New_Script_Str = New_Script_Str &amp; My_Y &amp; &#8220;@&#8221; &amp; New_X &amp; &#8220;}} )&#8221; &#8216;Format  		the ARCVIEW SCRIPT using Axis Rotation<br />
Case Else<br />
&#8216;The remainder of points get the standard formatting &#8220;Lon@Lat,&#8221;<br />
New_Script_Str = New_Script_Str &amp; My_Y &amp; &#8220;@&#8221; &amp; New_X &amp; &#8220;,&#8221; &#8216;Format the  		ARCVIEW SCRIPT using Axis Rotation</p>
<p>End Select</p>
<p>Angle = Angle + 10 &#8216;increment the loop by 10 degrees, clockwise<br />
&#8216;Changed 11/15/99<br />
Angle = Angle + 5 &#8216;increment the loop by 5 degrees, clockwise</p>
<p>Loop</p>
<p>&#8216;Assign the script as the output of this function<br />
fnctn_ELLIPSE = New_Script_Str</p>
<p>errorhandler:</p>
<p>If Err.Number &gt; 0 Then<br />
Debug.Print &#8220;Errorhandler-MODULE1.functn_ELLIPSE Error Number: &#8221; &amp;  		Err.Description<br />
End If</p>
<p>End Function</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D39&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=39</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rhumb-Line Algorithm (VB 6)</title>
		<link>http://blog.kenpatrick.net/?p=36</link>
		<comments>http://blog.kenpatrick.net/?p=36#comments</comments>
		<pubDate>Sun, 18 Oct 2009 01:22:21 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[VB 6]]></category>
		<category><![CDATA[Rhumb Line]]></category>
		<category><![CDATA[VB6]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=36</guid>
		<description><![CDATA[&#8216;Kenneth Patrick UNCLASSIFIED 06 Jan 1999 Public Const YD_NM As Single = 0.0004937365 Public Const YD_MTRS As Single = 0.9144 Public Const KM_NM As Single = 0.54 Public Const MTRS_YD As Single = 1.094 Public Const MTRS_FT As Single = 3.281 Public Const FT_MTRS As Single = 0.3048 Public Const Pi As Single = 3.1415926535897 [...]]]></description>
			<content:encoded><![CDATA[<p><strong></strong>&#8216;Kenneth Patrick UNCLASSIFIED 06 Jan 1999</p>
<p>Public Const YD_NM As Single = 0.0004937365<br />
Public Const YD_MTRS As Single = 0.9144<br />
Public Const KM_NM As Single = 0.54<br />
Public Const MTRS_YD As Single = 1.094<br />
Public Const MTRS_FT As Single = 3.281<br />
Public Const FT_MTRS As Single = 0.3048<br />
Public Const Pi As Single = 3.1415926535897<br />
Public Const RAD_DGRS As Single = 57.2957795130823<br />
Public Const DGRS_RAD As Single = 0.0174532925199</p>
<p>&#8217;32 Bit Sleep Function<br />
Declare Sub Sleep Lib &#8220;kernel32&#8243; (ByVal dwMilliseconds As Long)</p>
<p>Public Function fnctn_RHUMB(START_LAT As Single, START_LON As Single,  		CRS As Single, DST As Single, OUTPUT_FRMT As String) As String</p>
<p>&#8216;Author Kenneth Patrick AD&amp;D Inc. UNCLASSIFIED<br />
&#8216;fnctn_RHUMB<br />
&#8216;Created: 06 Jan 1999<br />
&#8216;Last Update 16 Apr 1999<br />
&#8216;RHUMB LINE ALGORITHM Mid-Latitude sailing Formula From &#8220;Dutton&#8217;s  		Navigation and Piloting&#8221; Adapted to Code<br />
&#8216;Equation: (L = DST X cosCRS) (p = DST X sinCRS) (Dlo = p / cosLM)<br />
&#8216;Input: &#8220;Start LAT (+NORTH/-SOUTH single),Start LON (+EAST/-WEST  		single), COURSE in Degree&#8217;s, DISTANCE in Nautical Miles,OUTPUT FORMAT:  		String&#8221;<br />
&#8216;Output Formats: &#8220;Lat(+/- Single)&#8221;, &#8220;Lon(+/- Single)&#8221;, &#8220;Lon@Lat&#8221;,  		&#8220;Lon,Lat&#8221;</p>
<p>On Error GoTo errorhandler</p>
<p>Dim L As Single<br />
Dim P As Single<br />
Dim LM As Single<br />
Dim COS_LM As Single<br />
Dim DLO As Single<br />
Dim END_LAT As Single<br />
Dim END_LON As Single</p>
<p>L = (DST / 60) * Cos(CRS / RAD_DGRS) &#8216;L used in the equation to figure  		END_LAT / DLO<br />
P = (DST / 60) * Sin(CRS / RAD_DGRS) &#8216;P used in the equation to Figure  		DLO<br />
LM = ((L / 2) + START_LAT) / RAD_DGRS &#8216;DLO (step 1)<br />
COS_LM = Cos(LM) &#8216;DLO (step 2)<br />
DLO = P / COS_LM &#8216;DLO (step 3)<br />
END_LAT = Format(START_LAT + L, &#8220;###.##########&#8221;) &#8216; format the  		Destination Latitude in decimal degrees</p>
<p>Dim v_LAT As Variant<br />
v_LAT = END_LAT<br />
v_LAT = CDec(v_LAT)</p>
<p>If START_LON &lt; 0 Then &#8216;Added to resolve the positive and negative issue  		with Longitudes<br />
END_LON = Format(DLO + START_LON, &#8220;###.##########&#8221;) &#8216; format the  		Destination Longitude in decimal degrees<br />
Else<br />
END_LON = Format(START_LON + DLO, &#8220;###.##########&#8221;) &#8216; format the  		Destination Longitude in decimal degrees<br />
End If</p>
<p>Dim v_LON As Variant<br />
v_LON = END_LON<br />
v_LON = CDec(v_LON)</p>
<p>Select Case OUTPUT_FRMT &#8216;select output type based on input parameter  		passed to this function<br />
Case &#8220;AT&#8221;<br />
fnctn_RHUMB = v_LON &amp; &#8220;@&#8221; &amp; v_LAT &#8216;output 75.56005@12.22208<br />
Case &#8220;COMMA&#8221;<br />
fnctn_RHUMB = v_LON &amp; &#8220;,&#8221; &amp; v_LAT &#8216;output 75.56005,12.22208<br />
Case &#8220;LON&#8221;<br />
fnctn_RHUMB = v_LON &#8216;output 75.56005<br />
Case &#8220;LAT&#8221;<br />
fnctn_RHUMB = v_LAT &#8216;output 12.22208<br />
Case Else<br />
fnctn_RHUMB = &#8220;&#8221;</p>
<p>End Select<br />
Exit Function</p>
<p>errorhandler:</p>
<p>If Err.Number &gt; 0 Then<br />
Call LogErr(&#8220;Errorhandler-FUNCTION functn_RHUMB Error Number: &#8221; &amp;  		Err.Description)<br />
End If</p>
<p>End Function</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D36&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=36</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Append or Create a file using the System.IO.StreamWriter and System.IO.File Classes (C#)</title>
		<link>http://blog.kenpatrick.net/?p=32</link>
		<comments>http://blog.kenpatrick.net/?p=32#comments</comments>
		<pubDate>Wed, 09 Sep 2009 12:47:08 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=32</guid>
		<description><![CDATA[//using System.IO; //using System.Configuration; public Boolean Write_Log_Entry(string Log_entry) { try { string sLogPath = ConfigurationManager.AppSettings["LOG_PATH"]; string sLogname = ConfigurationManager.AppSettings["LOG_NAME"]; string full_log_namePath = sLogPath + &#8220;\\&#8221; + sLogname; // Self Explanatory StreamWriter SW; if (File.Exists(full_log_namePath)) { //Append to the log file SW = File.AppendText(full_log_namePath); SW.WriteLine(Log_entry); SW.Close(); return true; } else { // Make the file if [...]]]></description>
			<content:encoded><![CDATA[<p><strong></strong>//using System.IO;</p>
<p>//using System.Configuration;<br />
public Boolean Write_Log_Entry(string Log_entry)<br />
{<br />
try<br />
{<br />
string sLogPath = ConfigurationManager.AppSettings["LOG_PATH"];<br />
string sLogname = ConfigurationManager.AppSettings["LOG_NAME"];<br />
string full_log_namePath = sLogPath + &#8220;\\&#8221; + sLogname;</p>
<p>// Self Explanatory<br />
StreamWriter SW;<br />
if (File.Exists(full_log_namePath))<br />
{<br />
//Append to the log file<br />
SW = File.AppendText(full_log_namePath);<br />
SW.WriteLine(Log_entry);<br />
SW.Close();<br />
return true;<br />
}<br />
else<br />
{<br />
// Make the file if it doesn&#8217;t exist, then append to it<br />
File.Create(full_log_namePath);<br />
SW = File.AppendText(full_log_namePath);<br />
SW.WriteLine(Log_entry);<br />
SW.Close();</p>
<p>return false;<br />
}<br />
}<br />
catch<br />
{<br />
MessageBox.Show(&#8220;An error occurred. Can not access the application log&#8221;,  		&#8220;Application Error&#8221;);<br />
return false;<br />
}<br />
}</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D32&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=32</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Present Web Content on a specified date (in this case hyperlinks), date stored in the Web.config file  (VB.NET)</title>
		<link>http://blog.kenpatrick.net/?p=65</link>
		<comments>http://blog.kenpatrick.net/?p=65#comments</comments>
		<pubDate>Tue, 04 Aug 2009 16:53:28 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://www.kenpatrick.net/blog/?p=65</guid>
		<description><![CDATA[Private Sub ShowPlansAvailable() &#8216;From the Web.Config File &#8216;&#60;add key=&#8221;LINKMonth&#8221; value=&#8221;7&#8243; /&#62; &#8216;&#60;add key=&#8221;LINKDay&#8221; value=&#8221;1&#8243; /&#62; &#8216;&#60;add key=&#8221;LINKYear&#8221; value=&#8221;2008&#8243; /&#62; Try Dim iPlanCount As Integer = 0 Me.pnlError.Visible = False Me.pnlSearchResults.Visible = True Dim dtNow As DateTime = DateTime.Now Dim dtNewPlanDate As DateTime Try Dim intMonth As Integer = CInt(System.Configuration.ConfigurationManager.AppSettings(&#8220;LINKMonth&#8221;)) Dim intDay As Integer = CInt(System.Configuration.ConfigurationManager.AppSettings(&#8220;LINKDay&#8221;)) [...]]]></description>
			<content:encoded><![CDATA[<p><strong></strong>Private Sub ShowPlansAvailable()</p>
<p>&#8216;From the Web.Config File<br />
&#8216;&lt;add key=&#8221;LINKMonth&#8221; value=&#8221;7&#8243; /&gt;<br />
&#8216;&lt;add key=&#8221;LINKDay&#8221; value=&#8221;1&#8243; /&gt;<br />
&#8216;&lt;add key=&#8221;LINKYear&#8221; value=&#8221;2008&#8243; /&gt;</p>
<p>Try<br />
Dim iPlanCount As Integer = 0<br />
Me.pnlError.Visible = False<br />
Me.pnlSearchResults.Visible = True</p>
<p>Dim dtNow As DateTime = DateTime.Now<br />
Dim dtNewPlanDate As DateTime</p>
<p>Try<br />
Dim intMonth As Integer = CInt(System.Configuration.ConfigurationManager.AppSettings(&#8220;LINKMonth&#8221;))<br />
Dim intDay As Integer = CInt(System.Configuration.ConfigurationManager.AppSettings(&#8220;LINKDay&#8221;))<br />
Dim intYear As Integer = CInt(System.Configuration.ConfigurationManager.AppSettings(&#8220;LINKYear&#8221;))<br />
dtNewPlanDate = New DateTime(intYear, intMonth, intDay)<br />
Catch ex As Exception<br />
&#8216;Default the date in case the keys weren&#8217;t added to the Web.Config file<br />
dtNewPlanDate = New DateTime(2008, 7, 1)<br />
End Try</p>
<p>&#8216;TODO: Change the hyperlink url&#8217;s<br />
&#8216;If the date is greater than 07/01/2008 00:00 then use these new links<br />
If dtNow &gt;= dtNewPlanDate Then<br />
&#8216;it&#8217;s after 07/01/2008 00:00, New Plan date<br />
&#8216;turn off the old hyperlinks<br />
Me.hypDirectHMO.Enabled = False<br />
Me.hypSelectHMO.Enabled = False<br />
Me.hypDirectPOS.Enabled = False<br />
Me.hypSelectPOS.Enabled = False<br />
Me.hypPPO.Enabled = False<br />
Me.hypDirectHMO.Visible = False<br />
Me.hypSelectHMO.Visible = False<br />
Me.hypDirectPOS.Visible = False<br />
Me.hypSelectPOS.Visible = False<br />
Me.hypPPO.Visible = False</p>
<p>&#8216;PPO&#8217;s (All 3)<br />
If oZipSearch.PPO = True Then<br />
iPlanCount = iPlanCount + 3<br />
Me.hypNEWPPO1.Enabled = True<br />
Me.hypNEWPPO1.Visible = True<br />
Me.hypNEWPPO2.Enabled = True<br />
Me.hypNEWPPO2.Visible = True<br />
Me.hypNEWPPO3.Enabled = True<br />
Me.hypNEWPPO3.Visible = True<br />
Else<br />
Me.hypNEWPPO1.Enabled = False<br />
Me.hypNEWPPO1.Visible = False<br />
Me.hypNEWPPO2.Enabled = False<br />
Me.hypNEWPPO2.Visible = False<br />
Me.hypNEWPPO3.Enabled = False<br />
Me.hypNEWPPO3.Visible = False<br />
End If</p>
<p>&#8216;HMO<br />
If oZipSearch.HMODirect = True Then<br />
iPlanCount = iPlanCount + 1<br />
Me.hypNEWHMO.Enabled = True<br />
Me.hypNEWHMO.Visible = True<br />
Else<br />
Me.hypNEWHMO.Enabled = False<br />
Me.hypNEWHMO.Visible = False<br />
End If</p>
<p>Else<br />
&#8216;it&#8217;s before 07/01/2008 00:00<br />
&#8216;using the orig. logic<br />
&#8216;it&#8217;s before D-day turn off the new links</p>
<p>If oZipSearch.HMODirect = True Then<br />
Me.hypDirectHMO.Enabled = True<br />
Me.hypDirectHMO.Visible = True</p>
<p>Else<br />
Me.hypDirectHMO.Enabled = False<br />
Me.hypDirectHMO.Visible = False<br />
End If</p>
<p>If oZipSearch.HMOSelect = True Then<br />
Me.hypSelectHMO.Enabled = True<br />
Me.hypSelectHMO.Visible = True</p>
<p>Else<br />
Me.hypSelectHMO.Enabled = False<br />
Me.hypSelectHMO.Visible = False<br />
End If</p>
<p>If oZipSearch.POSDirect = True Then<br />
Me.hypDirectPOS.Enabled = True<br />
Me.hypDirectPOS.Visible = True<br />
Else<br />
Me.hypDirectPOS.Enabled = False<br />
Me.hypDirectPOS.Visible = False<br />
End If<br />
If oZipSearch.POSSelect = True Then<br />
Me.hypSelectPOS.Enabled = True<br />
Me.hypSelectPOS.Visible = True<br />
Else<br />
Me.hypSelectPOS.Enabled = False<br />
Me.hypSelectPOS.Visible = False<br />
End If<br />
If oZipSearch.PPO = True Then<br />
Me.hypPPO.Enabled = True<br />
Me.hypPPO.Visible = True<br />
Else<br />
Me.hypPPO.Enabled = False<br />
Me.hypPPO.Visible = False<br />
End If</p>
<p>End If</p>
<p>Catch ex As Exception</p>
<p>Finally</p>
<p>End Try</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D65&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=65</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server 2000 / 2005 Update 1 table from another table</title>
		<link>http://blog.kenpatrick.net/?p=13</link>
		<comments>http://blog.kenpatrick.net/?p=13#comments</comments>
		<pubDate>Thu, 09 Jul 2009 23:01:58 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[SQL-Server]]></category>
		<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[SQL-Server 2005]]></category>
		<category><![CDATA[Update Statement]]></category>

		<guid isPermaLink="false">http://www.kennethjpatrick.com/blog/?p=13</guid>
		<description><![CDATA[UPDATE Table1 SET Table1.Comments = Table2.Comments, Table1.Status = Table2.Status, Table1.Status_days = Table2.Status_days, Table1.Status_DHS = Table2.Status_DHS, Table1.LAST_TRANS_DATE = Table2.LAST_TRANS_DATE FROM Table1 INNER JOIN dbo.Table2 ON Table1.UDO_ID = Table2.UDO_ID AND Table1.DOC_ID = Table2.DOC_ID WHERE Table1.Status_DHS = &#8216;Action Rqd&#8217; AND Table2.Status_DHS = &#8216;Validated&#8217; AND Table1.FY = &#8217;2009&#8242; AND Table1.QTR = &#8217;3&#8242; AND Table2.FY = &#8217;2009&#8242; AND Table2.QTR = [...]]]></description>
			<content:encoded><![CDATA[<p><!--  .style1 { 	color: #0000FF; }  --><span class="style1">UPDATE</span> Table1 <span class="style1">SET</span><br />
Table1.Comments = Table2.Comments,<br />
Table1.Status = Table2.Status,<br />
Table1.Status_days = Table2.Status_days, Table1.Status_DHS = Table2.Status_DHS,<br />
Table1.LAST_TRANS_DATE = Table2.LAST_TRANS_DATE <span class="style1">FROM</span> Table1<br />
<span class="style1">INNER JOIN </span>dbo.Table2 <span class="style1">ON</span> Table1.UDO_ID = Table2.UDO_ID<br />
<span class="style1">AND</span> Table1.DOC_ID = Table2.DOC_ID <span class="style1">WHERE</span> Table1.Status_DHS = &#8216;Action Rqd&#8217;<br />
<span class="style1">AND</span> Table2.Status_DHS = &#8216;Validated&#8217;<br />
<span class="style1">AND</span> Table1.FY = &#8217;2009&#8242; AND Table1.QTR = &#8217;3&#8242;<br />
<span class="style1">AND</span> Table2.FY = &#8217;2009&#8242; AND Table2.QTR = &#8217;3&#8242;</p>
<br /><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.kenpatrick.net%2F%3Fp%3D13&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:20px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://blog.kenpatrick.net/?feed=rss2&#038;p=13</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

