<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Brandon Petersen</title>
	<link>http://tech.brandonpetersen.com</link>
	<description>Software Development</description>
	<pubDate>Fri, 18 Apr 2008 12:52:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
		<!-- podcast_generator="podPress/8.8" -->
		<copyright>&#xA9; </copyright>
		<managingEditor>brandon.petersen@gmail.com ()</managingEditor>
		<webMaster>brandon.petersen@gmail.com()</webMaster>
		<category></category>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>Software Development</itunes:summary>
		<itunes:author></itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name></itunes:name>
			<itunes:email>brandon.petersen@gmail.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://tech.brandonpetersen.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://tech.brandonpetersen.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>Brandon Petersen</title>
			<link>http://tech.brandonpetersen.com</link>
			<width>144</width>
			<height>144</height>
		</image>
		<item>
		<title>WPF:  Right Aligning Textblocks in a Gridview</title>
		<link>http://tech.brandonpetersen.com/2008/04/18/wpf-right-aligning-textblocks-in-a-gridview/</link>
		<comments>http://tech.brandonpetersen.com/2008/04/18/wpf-right-aligning-textblocks-in-a-gridview/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 12:52:42 +0000</pubDate>
		<dc:creator>Brandon Petersen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.brandonpetersen.com/2008/04/18/wpf-right-aligning-textblocks-in-a-gridview/</guid>
		<description><![CDATA[If you are trying to get a TextBlock to right align, in ListView inside Windows Presentation Foundation  take a look at this.  I was using a GridViewColumn.CellTemplate to define a column with some monetary values in it.
]]></description>
			<content:encoded><![CDATA[<p>If you are trying to get a TextBlock to right align, in ListView inside Windows Presentation Foundation  <a href="http://www.interact-sw.co.uk/iangblog/2007/05/30/fill-wpf-listview-columns">take a look at this</a>.  I was using a GridViewColumn.CellTemplate to define a column with some monetary values in it.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.brandonpetersen.com/2008/04/18/wpf-right-aligning-textblocks-in-a-gridview/feed/</wfw:commentRss>
		</item>
		<item>
		<title>privatePlus - WordPress Plugin</title>
		<link>http://tech.brandonpetersen.com/2008/03/10/privateplus/</link>
		<comments>http://tech.brandonpetersen.com/2008/03/10/privateplus/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 04:34:29 +0000</pubDate>
		<dc:creator>Brandon Petersen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.brandonpetersen.com/03/10/2008/privateplus-wordpress-plugin/</guid>
		<description><![CDATA[By default, WordPress only allows administrators and editors to view private posts.  This WordPress plugin will allow you to determine which groups are able to see private posts by default.  It will allow other authenticated users to view &#8216;private&#8217; posts.
View more details on the privatePlus page.
]]></description>
			<content:encoded><![CDATA[<p>By default, WordPress only allows administrators and editors to view private posts.  This <a href="http://wordpress.org" title="WordPress">WordPress</a> plugin will allow you to determine which groups are able to see private posts by default.  It will allow other authenticated users to view &#8216;private&#8217; posts.</p>
<p>View more details on the <a href="http://tech.brandonpetersen.com/privateplus/" title="privatePlus - WordPress Plugin">privatePlus page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.brandonpetersen.com/2008/03/10/privateplus/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Benefits of using the StringBuilder Class</title>
		<link>http://tech.brandonpetersen.com/2008/02/20/benefits-of-using-the-stringbuilder-class/</link>
		<comments>http://tech.brandonpetersen.com/2008/02/20/benefits-of-using-the-stringbuilder-class/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 04:20:08 +0000</pubDate>
		<dc:creator>Brandon Petersen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.brandonpetersen.com/02/20/2008/benefits-of-using-the-stringbuilder-class/</guid>
		<description><![CDATA[The old phrase, &#8216;Work Smarter, Not Harder&#8217; is a good one to live by. As software developers, we often find ourselves writing code that build strings.  We start out simple, with a few lines of code that concatenates different text together to create a new variable.  It&#8217;s easy, quick and dirty.
string myString = [...]]]></description>
			<content:encoded><![CDATA[<p>The old phrase, &#8216;Work Smarter, Not Harder&#8217; is a good one to live by. As software developers, we often find ourselves writing code that build strings.  We start out simple, with a few lines of code that concatenates different text together to create a new variable.  It&#8217;s easy, quick and dirty.</p>
<blockquote><p>string myString = &#8220;Counting to ten: &#8220;;<br />
for (int i = 1; i < = 10; i++) myString += i + " ";</p></blockquote>
<p>Later, this small string gets more complicated, becoming larger during each step of the software.  Often we create clever loops and logic that dynamically builds long complicated strings.  At the end of the day, it&#8217;s a &#8216;Bread and Butter&#8217; activity for us.</p>
<p>You may be surprised to find out that this simple activity could be a major cause of a slow web application.  Fortunately, a very simple fix can help you to gain back the performance and resources that you lost.</p>
</blockquote>
<p> <a href="http://tech.brandonpetersen.com/2008/02/20/benefits-of-using-the-stringbuilder-class/#more-28" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.brandonpetersen.com/2008/02/20/benefits-of-using-the-stringbuilder-class/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using While Statements inside MSSQL Stored Procedures</title>
		<link>http://tech.brandonpetersen.com/2007/06/13/using-while-statements-inside-mssql-stored-procedures/</link>
		<comments>http://tech.brandonpetersen.com/2007/06/13/using-while-statements-inside-mssql-stored-procedures/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 18:03:43 +0000</pubDate>
		<dc:creator>Brandon Petersen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.brandonpetersen.com/06/13/2007/using-while-statements-inside-mssql-stored-procedures/</guid>
		<description><![CDATA[This was a bit more complicated than the IF statements, but extremely useful.Â  I was able to
Procedure [dbo].[deleteParticipant]
@ParticipantID int
as
&#8211; Declare the variables to store the values returned by FETCH.
DECLARE @GroupID int
DECLARE group_cursor CURSOR FOR
SELECT GroupID FROM Participants
WHERE ParticipantID = @ParticipantID
OPEN county_cursor
&#8211; Perform the first fetch and store the values in variables.
&#8211; Note: The variables are [...]]]></description>
			<content:encoded><![CDATA[<p>This was a bit more complicated than the IF statements, but extremely useful.Â  I was able to</p>
<p>Procedure [dbo].[deleteParticipant]<br />
@ParticipantID int</p>
<p>as</p>
<p>&#8211; Declare the variables to store the values returned by FETCH.<br />
DECLARE @GroupID int<br />
DECLARE group_cursor CURSOR FOR<br />
SELECT GroupID FROM Participants<br />
WHERE ParticipantID = @ParticipantID</p>
<p>OPEN county_cursor</p>
<p>&#8211; Perform the first fetch and store the values in variables.<br />
&#8211; Note: The variables are in the same order as the columns<br />
&#8211; in the SELECT statement.<br />
&#8211;FETCH NEXT FROM group_cursor<br />
&#8211;INTO @GroupID</p>
<p>&#8211; Check @@FETCH_STATUS to see if there are any more rows to fetch.<br />
WHILE @@FETCH_STATUS = 0<br />
BEGIN</p>
<p>IF (SELECT COUNT(*) FROM Participants WHERE GroupID = @GroupID) = 1<br />
BEGIN<br />
DELETE FROM Groups WHERE GroupID = @GroupID<br />
END</p>
<p>&#8211; This is executed as long as the previous fetch succeeds.<br />
FETCH NEXT FROM group_cursor<br />
INTO @GroupID<br />
END</p>
<p>CLOSE group_cursor<br />
DEALLOCATE group_cursor</p>
<p>&#8211;delete all group affiliations<br />
Delete FromÂ  [dbo].[Groups]<br />
WHERE ParticipantID = @ParticipantID</p>
<p>&#8211;delete The Participant<br />
Delete FromÂ  [dbo].[Participant]<br />
Where ParticipantID =Â  @ParticipantID</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.brandonpetersen.com/2007/06/13/using-while-statements-inside-mssql-stored-procedures/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using If Statements inside MSSQL Stored Procedures</title>
		<link>http://tech.brandonpetersen.com/2007/06/13/using-if-statements-inside-mssql-stored-procedures/</link>
		<comments>http://tech.brandonpetersen.com/2007/06/13/using-if-statements-inside-mssql-stored-procedures/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 17:32:30 +0000</pubDate>
		<dc:creator>Brandon Petersen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.brandonpetersen.com/06/13/2007/using-if-statements-inside-mssql-stored-procedures/</guid>
		<description><![CDATA[Adding IF statements to a MSSQL Stored Procedure  can help make a query more dynamic.  For instance, if we had are deleting a participants from a group and wanted to remove a group after the last person was removed, we would do the following:
DELETE FROM Participants
WHERE ParticipantID = @ParticipantID AND GroupID = @GroupID
IF [...]]]></description>
			<content:encoded><![CDATA[<p>Adding IF statements to a MSSQL Stored Procedure  can help make a query more dynamic.  For instance, if we had are deleting a participants from a group and wanted to remove a group after the last person was removed, we would do the following:</p>
<p>DELETE FROM Participants<br />
WHERE ParticipantID = @ParticipantID AND GroupID = @GroupID</p>
<p>IF NOT EXISTS (SELECT ParticipantID FROM Participants WHERE GroupID = @GroupID)<br />
DELETE FROM Groups WHERE GroupID = @GroupID<br />
RETURN</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.brandonpetersen.com/2007/06/13/using-if-statements-inside-mssql-stored-procedures/feed/</wfw:commentRss>
		</item>
		<item>
		<title>.Net Replacement for PHP&#8217;s str_replace</title>
		<link>http://tech.brandonpetersen.com/2007/05/31/net-replacement-for-phps-str_replace/</link>
		<comments>http://tech.brandonpetersen.com/2007/05/31/net-replacement-for-phps-str_replace/#comments</comments>
		<pubDate>Thu, 31 May 2007 15:17:33 +0000</pubDate>
		<dc:creator>Brandon Petersen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.brandonpetersen.com/05/31/2007/net-replacement-for-phps-str_replace/</guid>
		<description><![CDATA[Here is a quick and dirty function that I grabbed from ( http://support.microsoft.com/kb/251354/ ).  It does a nice job of replacing PHP&#8217;s convenient str_replace.
Private Function str_replace(ByVal strSource As String, _
ByVal strSearchFor As String, ByVal strReplace As String) As String
Dim lngPointer As Long, strNew As String
lngPointer = InStr(strSource, strSearchFor)
If lngPointer = 0 Then
ReplaceEntXMLSpecChar = strSource
Else
strNew [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a quick and dirty function that I grabbed from ( <a href="http://support.microsoft.com/kb/251354/">http://support.microsoft.com/kb/251354/</a> ).  It does a nice job of replacing PHP&#8217;s convenient str_replace.</p>
<pre>Private Function str_replace(ByVal strSource As String, _
ByVal strSearchFor As String, ByVal strReplace As String) As String
Dim lngPointer As Long, strNew As String
lngPointer = InStr(strSource, strSearchFor)
If lngPointer = 0 Then
ReplaceEntXMLSpecChar = strSource
Else
strNew = Left$(strSource, lngPointer - 1) &#038; strReplace _
&#038; Mid(strSource, lngPointer + 1, Len(strSource))
ReplaceEntXMLSpecChar = strNew
End If
End Function</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.brandonpetersen.com/2007/05/31/net-replacement-for-phps-str_replace/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Time and Date Formatting in .Net</title>
		<link>http://tech.brandonpetersen.com/2007/05/18/time-and-date-formatting-in-net/</link>
		<comments>http://tech.brandonpetersen.com/2007/05/18/time-and-date-formatting-in-net/#comments</comments>
		<pubDate>Fri, 18 May 2007 17:15:27 +0000</pubDate>
		<dc:creator>Brandon Petersen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.brandonpetersen.com/05/18/2007/time-and-date-formatting-in-net/</guid>
		<description><![CDATA[I always find myself hunting for a quick reference on formatting various strings, including time and dates in .Net.Â  Here is a great reference.
.NET Format String 102: DateTime Format String
http://blogs.msdn.com/kathykam/archive/2006/09/29/773041.aspxÂ 
]]></description>
			<content:encoded><![CDATA[<p>I always find myself hunting for a quick reference on formatting various strings, including time and dates in .Net.Â  Here is a great reference.</p>
<h5 class="posthead pageTitle">.NET Format String 102: DateTime Format String</h5>
<p><a href="http://blogs.msdn.com/kathykam/archive/2006/09/29/773041.aspx ">http://blogs.msdn.com/kathykam/archive/2006/09/29/773041.aspxÂ </a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.brandonpetersen.com/2007/05/18/time-and-date-formatting-in-net/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Submitting the SiteMap Protocol to Search Engines</title>
		<link>http://tech.brandonpetersen.com/2007/04/27/submitting-the-sitemap-protocol-to-search-engines/</link>
		<comments>http://tech.brandonpetersen.com/2007/04/27/submitting-the-sitemap-protocol-to-search-engines/#comments</comments>
		<pubDate>Fri, 27 Apr 2007 20:54:53 +0000</pubDate>
		<dc:creator>Brandon Petersen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.brandonpetersen.com/04/27/2007/submitting-the-sitemap-protocol-to-search-engines/</guid>
		<description><![CDATA[The Sitemap Protocol allows us to inform search engines when a page has been changed and is ready for crawling.  The Sitemap file is a dynamically generated XML file that lists the URLs for a site.  It allows search engines to crawl the site more intelligently.
You can get a more complete description of [...]]]></description>
			<content:encoded><![CDATA[<p>The Sitemap Protocol allows us to inform search engines when a page has been changed and is ready for crawling.  The Sitemap file is a dynamically generated XML file that lists the URLs for a site.  It allows search engines to crawl the site more intelligently.</p>
<p>You can get a more complete description of Google Sitemaps here:<br />
<a href="http://www.sitemaps.org/faq.php">http://www.sitemaps.org/faq.php</a><br />
<a href="http://en.wikipedia.org/wiki/Google_Sitemaps">http://en.wikipedia.org/wiki/Google_Sitemaps</a></p>
<p><strong>Submit your SiteMap through the robots.txt file</strong></p>
<p>Search engines can automatically discover the SiteMap file by adding the following line to the robots.txt file.</p>
<p>SITEMAP: http://www.brandonpetersen.com/sitemap.xml</p>
<p><strong>Submit your SiteMap to Google </strong></p>
<p>Go to http://www.google.com/webmasters/</p>
<p><strong>Submit your SiteMap to Yahoo </strong></p>
<p>http://siteexplorer.search.yahoo.com/</p>
<p><strong>Submit Your SiteMap to MSN </strong></p>
<p>http://api.moreover.com/ping?u=http://www.brandonpetersen.com/sitemap.xml</p>
<p><strong>Submit your SiteMap to Ask.com </strong></p>
<p>http://submissions.ask.com/ping?sitemap=http%3A//www.brandonpetersen.com/sitemap.xml</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.brandonpetersen.com/2007/04/27/submitting-the-sitemap-protocol-to-search-engines/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Kerning inside Photoshop</title>
		<link>http://tech.brandonpetersen.com/2007/04/27/kerning-inside-photoshop/</link>
		<comments>http://tech.brandonpetersen.com/2007/04/27/kerning-inside-photoshop/#comments</comments>
		<pubDate>Fri, 27 Apr 2007 18:23:05 +0000</pubDate>
		<dc:creator>Brandon Petersen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.brandonpetersen.com/04/27/2007/kerning-inside-photoshop/</guid>
		<description><![CDATA[Kerning is the process of adjusting letter spacing in a proportional font.  In a well-kerned font, the two-dimensional blank spaces between each pair of letters all have similar area. Wikipedia.
To add kerning between each letter in Photoshop you place the cursor between the letters and press Option+RightArrow on a Mac (or Alt+RightArrow in Windows). [...]]]></description>
			<content:encoded><![CDATA[<p>Kerning is the process of adjusting letter spacing in a proportional font.  In a well-kerned font, the two-dimensional blank spaces between each pair of letters all have similar area. <a href="http://en.wikipedia.org/wiki/Kerning">Wikipedia</a>.</p>
<p>To add kerning between each letter in Photoshop you place the cursor between the letters and press Option+RightArrow on a Mac (or Alt+RightArrow in Windows).   To remove kerning between each letter in Photoshop you place the cursor between the letters and press Option+LeftArrow on a Mac (or Alt+LeftArrow in Windows).</p>
<p>If you need an entire word or sentence kerned the same way, just select the group of letters and repeat the process above.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.brandonpetersen.com/2007/04/27/kerning-inside-photoshop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Changing the Ownership on Database Object</title>
		<link>http://tech.brandonpetersen.com/2007/04/25/changing-the-ownership-on-database-object/</link>
		<comments>http://tech.brandonpetersen.com/2007/04/25/changing-the-ownership-on-database-object/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 20:16:55 +0000</pubDate>
		<dc:creator>Brandon Petersen</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.brandonpetersen.com/04/25/2007/changing-the-ownership-on-database-object/</guid>
		<description><![CDATA[I have to move databases between servers recently, doing a backup and restore.  I had some issues arise from improper ownership of tables and store procedures in Microsoft SQL Server (MSSQL).  I fixed the issue quickly through the following query:
sp_changeobjectowner &#8216;object&#8217;, &#8216;new_owner&#8217;
]]></description>
			<content:encoded><![CDATA[<p>I have to move databases between servers recently, doing a backup and restore.  I had some issues arise from improper ownership of tables and store procedures in Microsoft SQL Server (MSSQL).  I fixed the issue quickly through the following query:</p>
<p>sp_changeobjectowner &#8216;object&#8217;, &#8216;new_owner&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.brandonpetersen.com/2007/04/25/changing-the-ownership-on-database-object/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
