<?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>Program &#38; Design</title>
	<atom:link href="http://programanddesign.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://programanddesign.com</link>
	<description>Tips, tricks, tutorials, and tools on programming &#38; web design</description>
	<lastBuildDate>Wed, 13 Jan 2010 23:05:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>.NET Dock Panel</title>
		<link>http://programanddesign.com/cs/net-dock-panel/</link>
		<comments>http://programanddesign.com/cs/net-dock-panel/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 22:46:45 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[winforms]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=309</guid>
		<description><![CDATA[Apparently .NET does not come with any dock widget, like the ones used for the Toolbox and Properties window in Visual Studio.  However, there is a freely available one on sourceforge called DockPanel Suite.  Unfortunately, it seems to lack any sort of documentation!
This little code snippet below should be enough to get you [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/cs/net-dock-panel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C# Blocking Queue</title>
		<link>http://programanddesign.com/cs/c-blocking-queue/</link>
		<comments>http://programanddesign.com/cs/c-blocking-queue/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 04:37:26 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[multi-threaded]]></category>
		<category><![CDATA[producer-consumer]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=306</guid>
		<description><![CDATA[If you&#8217;re writing a threaded application in C# and you need to wait until a resource becomes available, you can use this class. Very handy for producer/consumer scenarios.
public class BlockingQueue&#60;T&#62;
&#123;
&#160; &#160; Queue&#60;T&#62; que = new Queue&#60;T&#62;&#40;&#41;;
&#160; &#160; Semaphore sem = new Semaphore&#40;0, Int32.MaxValue&#41;;

&#160; &#160; public void Enqueue&#40;T item&#41;
&#160; &#160; &#123;
&#160; &#160; &#160; &#160; lock &#40;que&#41;
&#160; [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/cs/c-blocking-queue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django, Flatpages, Markdown, and Syntax Highlighting</title>
		<link>http://programanddesign.com/uncategorized/django-flatpages-markdown-and-syntax-highlighting/</link>
		<comments>http://programanddesign.com/uncategorized/django-flatpages-markdown-and-syntax-highlighting/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 23:59:22 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=291</guid>
		<description><![CDATA[For what should have been an easy task, this turned out to be extraordinarily difficult.
I assume you have Django already installed. If not, the tutorials on djangoproject.com aren&#8217;t too terrible, provided you&#8217;re not on a shared server (that&#8217;s another story!). I&#8217;m using Flatpages, but you can use whatever you want to follow along with this [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/uncategorized/django-flatpages-markdown-and-syntax-highlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qt + OpenGL Code Example</title>
		<link>http://programanddesign.com/cpp/qt-opengl-code-example/</link>
		<comments>http://programanddesign.com/cpp/qt-opengl-code-example/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 03:56:46 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=282</guid>
		<description><![CDATA[I wanted to develop a game using OpenGL but I was having trouble deciding on a windowing library. Somebody suggested I try Qt, so I decided to give it another shot. I heard it was good, but the editor it came with was so foreign and unintuitive. Unfortunately, this overshadowed what a beautiful library Qt [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/cpp/qt-opengl-code-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>array_map_recursive</title>
		<link>http://programanddesign.com/php/array_map_recursive/</link>
		<comments>http://programanddesign.com/php/array_map_recursive/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 01:28:00 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=277</guid>
		<description><![CDATA[Not much needs to be said here.
function array_map_recursive&#40;$callback, $arr&#41; &#123;
&#160; &#160; $ret = array&#40;&#41;;
&#160; &#160; foreach&#40;$arr as $key =&#62; $val&#41; &#123;
&#160; &#160; &#160; &#160; if&#40;is_array&#40;$val&#41;&#41; $ret&#91;$key&#93; = array_map_recursive&#40;$callback, $val&#41;;
&#160; &#160; &#160; &#160; else $ret&#91;$key&#93; = $callback&#40;$val&#41;;
&#160; &#160; &#125;
&#160; &#160; return $ret;
&#125;
I wrote this so that I could do this&#8230;
$filters = array&#40;'htmlspecialchars', 'nl2br'&#41;;
foreach&#40;$filters as $filter&#41; $view_vars [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/php/array_map_recursive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All I want is a drag-and-drop CD burner</title>
		<link>http://programanddesign.com/uncategorized/all-i-want-is-a-drag-and-drop-cd-burner/</link>
		<comments>http://programanddesign.com/uncategorized/all-i-want-is-a-drag-and-drop-cd-burner/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 06:52:13 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=271</guid>
		<description><![CDATA[I know I&#8217;ve mostly been posting code snippets here, but I originally started this site to post more in-depth tutorials. This isn&#8217;t going to be one of those. I&#8217;m taking a spin and would like to say a few words on the design of good software &#8212; the second half of this site that&#8217;s been [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/uncategorized/all-i-want-is-a-drag-and-drop-cd-burner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Select Table Column or Row</title>
		<link>http://programanddesign.com/js/jquery-select-table-column-or-row/</link>
		<comments>http://programanddesign.com/js/jquery-select-table-column-or-row/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 01:37:02 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=267</guid>
		<description><![CDATA[Table rows are pretty easy to work as all the td elements are contained within one tr, but how would you grab all the tds in a single column? Why, by using these selectors of course!
$.fn.row = function&#40;i&#41; &#123;
&#160; &#160; return $&#40;'tr:nth-child('+&#40;i+1&#41;+') td', this&#41;;
&#125;
$.fn.column = function&#40;i&#41; &#123;
&#160; &#160; return $&#40;'tr td:nth-child('+&#40;i+1&#41;+')', this&#41;;
&#125;

// example - this [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/js/jquery-select-table-column-or-row/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Injection Safe Queries Redux</title>
		<link>http://programanddesign.com/php/sql-injection-safe-queries-redux/</link>
		<comments>http://programanddesign.com/php/sql-injection-safe-queries-redux/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 23:42:52 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=258</guid>
		<description><![CDATA[function mysql_safe_string&#40;$value&#41; &#123;
&#160; &#160; if&#40;is_numeric&#40;$value&#41;&#41;&#160; &#160; &#160; return $value;
&#160; &#160; elseif&#40;empty&#40;$value&#41;&#41; &#160; &#160; &#160; return 'NULL';
&#160; &#160; elseif&#40;is_string&#40;$value&#41;&#41; &#160; return '\''.mysql_real_escape_string&#40;$value&#41;.'\'';
&#160; &#160; elseif&#40;is_array&#40;$value&#41;&#41;&#160; &#160; return implode&#40;',',array_map&#40;'mysql_safe_string',$value&#41;&#41;;
&#125;

function mysql_safe_query&#40;$format&#41; &#123;
&#160; &#160; $args = array_slice&#40;func_get_args&#40;&#41;,1&#41;;
&#160; &#160; $args = array_map&#40;'mysql_safe_string',$args&#41;;
&#160; &#160; $query = vsprintf&#40;$format,$args&#41;;
&#160; &#160; $result = mysql_query&#40;$query&#41;;
&#160; &#160; if&#40;$result === false&#41; echo '&#60;div class=&#34;mysql-error&#34;&#62;&#60;strong&#62;Error: &#60;/strong&#62;',mysql_error&#40;&#41;,'&#60;br/&#62;&#60;strong&#62;Query: &#60;/strong&#62;',$query,'&#60;/div&#62;';
&#160; &#160; return [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/php/sql-injection-safe-queries-redux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Facebook PHP API: Get the names of all your friends</title>
		<link>http://programanddesign.com/php/facebook-php-api-get-the-names-of-all-your-friends/</link>
		<comments>http://programanddesign.com/php/facebook-php-api-get-the-names-of-all-your-friends/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 18:07:59 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=251</guid>
		<description><![CDATA[If you didn&#8217;t already know, Facebook has an API that exposes quite a darn bit information. You can easily query this data using their API, but each request takes a fair bit of time. Typically, to get the names of all your friends, first you have to grab a list of the user ids of [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/php/facebook-php-api-get-the-names-of-all-your-friends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Domain &amp; Subdomain from URL</title>
		<link>http://programanddesign.com/php/get-domain-subdomain-from-url/</link>
		<comments>http://programanddesign.com/php/get-domain-subdomain-from-url/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 22:34:32 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=245</guid>
		<description><![CDATA[preg_match&#40;'/^(?:www\.)?(?:(.+)\.)?(.+\..+)$/i', $_SERVER&#91;'HTTP_HOST'&#93;, $matches&#41;;

define&#40;'PROTOCOL', strtolower&#40;substr&#40;$_SERVER&#91;'SERVER_PROTOCOL'&#93;,0,strpos&#40;$_SERVER&#91;'SERVER_PROTOCOL'&#93;,'/'&#41;&#41;&#41;.'://'&#41;;
define&#40;'SUBDOMAIN', $matches&#91;1&#93;&#41;;
define&#40;'DOMAIN', $matches&#91;2&#93;&#41;;
define&#40;'HERE', $_SERVER&#91;'REQUEST_URI'&#93;&#41;;
If you&#8217;re at http://www.sub.domain.com/page, then:
PROTOCOL = http://
SUBDOMAIN = sub
DOMAIN = domain.com
HERE = /page
]]></description>
		<wfw:commentRss>http://programanddesign.com/php/get-domain-subdomain-from-url/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
