<?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>Sat, 24 Dec 2011 21:44:44 +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>To split an image into tiles using ImageMagick</title>
		<link>http://programanddesign.com/uncategorized/to-split-an-image-into-tiles-using-imagemagick/</link>
		<comments>http://programanddesign.com/uncategorized/to-split-an-image-into-tiles-using-imagemagick/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 21:44:44 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[minecraft]]></category>
		<category><![CDATA[picture]]></category>
		<category><![CDATA[texture]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=410</guid>
		<description><![CDATA[If you've got ImageMagick installed, you can split an image into squares with a command like: convert -crop 256x256 terrain.png tiles/tile%03d.png I'm using this to break up a MineCraft texture I downloaded.]]></description>
		<wfw:commentRss>http://programanddesign.com/uncategorized/to-split-an-image-into-tiles-using-imagemagick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find where executable is installed to</title>
		<link>http://programanddesign.com/ubuntu/find-where-executable-is-installed-to/</link>
		<comments>http://programanddesign.com/ubuntu/find-where-executable-is-installed-to/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 00:24:49 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[command-line]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=383</guid>
		<description><![CDATA[Often when writing a script, I want to put a hashbang (#!) at the top so that I can execute the file, but I can never remember where the binary for python or php is installed to. An easy way to find out is to use the which command: mark-ubuntu$ which python /usr/local/bin/python Another nice [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/ubuntu/find-where-executable-is-installed-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSON Prettifier</title>
		<link>http://programanddesign.com/cs/json-prettifier/</link>
		<comments>http://programanddesign.com/cs/json-prettifier/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 23:13:50 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=377</guid>
		<description><![CDATA[This is a simple class I wrote to nicely format a JSON string. Just call it with JsonFormatter.PrettyPrint(yourJsonString) public static class JsonFormatter &#123; &#160; &#160; public static string Indent = &#34; &#160; &#160;&#34;; &#160; &#160; public static void AppendIndent&#40;StringBuilder sb, int count&#41; &#160; &#160; &#123; &#160; &#160; &#160; &#160; for &#40;; count &#62; 0; --count&#41; [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/cs/json-prettifier/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Subtracting Sets</title>
		<link>http://programanddesign.com/cs/subtracting-sets/</link>
		<comments>http://programanddesign.com/cs/subtracting-sets/#comments</comments>
		<pubDate>Fri, 31 Dec 2010 05:00:02 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=369</guid>
		<description><![CDATA[A couple times now I've wanted to subtract one set (`HashSet`) from another. `HashSet` has a method ExceptWith that does just this, except that it modifies the current set in place. What if you don't want that? You need to copy it first. Or you could use Linq's Except method, except that it returns `IEnumerable` [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/cs/subtracting-sets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>String Slice</title>
		<link>http://programanddesign.com/cs/string-slice/</link>
		<comments>http://programanddesign.com/cs/string-slice/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 21:56:56 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=357</guid>
		<description><![CDATA[Here's an extension method to slice strings in C#, similar to Python's slice notation. public static string Slice&#40;this string str, int? start = null, int? end = null, int step = 1&#41; &#123; &#160; &#160; if &#40;step == 0&#41; throw new ArgumentException&#40;&#34;Step size cannot be zero.&#34;, &#34;step&#34;&#41;; &#160; &#160; if &#40;start == null&#41; start = [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/cs/string-slice/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to deep-copy/clone an object</title>
		<link>http://programanddesign.com/cs/how-to-deep-copyclone-an-object/</link>
		<comments>http://programanddesign.com/cs/how-to-deep-copyclone-an-object/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 00:24:08 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=354</guid>
		<description><![CDATA[The easiest way to deep copy an object is to serialize and deserialize it. Here's an example from a project I'm working on: &#91;Serializable&#40;&#41;&#93; public class Board :ICloneable, ISerializable &#123; &#160; &#160; // ... &#160; &#160; object ICloneable.Clone&#40;&#41; &#160; &#160; &#123; &#160; &#160; &#160; &#160; return this.Clone&#40;&#41;; &#160; &#160; &#125; &#160; &#160; public Board Clone&#40;&#41; [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/cs/how-to-deep-copyclone-an-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursive get/set/has-attr</title>
		<link>http://programanddesign.com/python-2/recursive-getsethas-attr/</link>
		<comments>http://programanddesign.com/python-2/recursive-getsethas-attr/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 21:55:16 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=350</guid>
		<description><![CDATA[def _getattr&#40;obj, attr, default=None&#41;: &#160; &#160; try: left, right = attr.split&#40;'.', 1&#41; &#160; &#160; except: return getattr&#40;obj, attr, default&#41; &#160; &#160; return _getattr&#40;getattr&#40;obj, left&#41;, right, default&#41; def _setattr&#40;obj, attr, val&#41;: &#160; &#160; try: left, right = attr.split&#40;'.', 1&#41; &#160; &#160; except: return setattr&#40;obj, attr, val&#41; &#160; &#160; return _setattr&#40;getattr&#40;obj, left&#41;, right, val&#41; def _hasattr&#40;obj, attr&#41;: [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/python-2/recursive-getsethas-attr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thread-Safe Observable List for WPF</title>
		<link>http://programanddesign.com/cs/thread-safe-observable-list-for-wpf/</link>
		<comments>http://programanddesign.com/cs/thread-safe-observable-list-for-wpf/#comments</comments>
		<pubDate>Sat, 08 May 2010 05:21:18 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=344</guid>
		<description><![CDATA[I'm probably posting this too early; I haven't had a chance to extensively test it yet but I basically just locked every function down, and made any method that actually modifies the list run on the main thread so that notifications can be sent. It ought to work class ObservableList&#60;T&#62; : IList&#60;T&#62;, INotifyCollectionChanged where T [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/cs/thread-safe-observable-list-for-wpf/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Thread-Safe Observable Priority Queue for WPF</title>
		<link>http://programanddesign.com/uncategorized/priority-queue-for-wpf/</link>
		<comments>http://programanddesign.com/uncategorized/priority-queue-for-wpf/#comments</comments>
		<pubDate>Sat, 08 May 2010 04:13:52 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[queue]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=339</guid>
		<description><![CDATA[Building on my last post, I realized that you couldn't push elements onto the queue from a worker thread, making it pretty much useless. However, if we dispatch the pushes back to the UI thread, it should work, right? Here's (what I believe to be) a thread-safe observable priority queue with notifications for use in [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/uncategorized/priority-queue-for-wpf/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Observable Priority Queue</title>
		<link>http://programanddesign.com/cs/observable-priority-queue/</link>
		<comments>http://programanddesign.com/cs/observable-priority-queue/#comments</comments>
		<pubDate>Thu, 06 May 2010 21:10:35 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[.net-4.0]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[queue]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://programanddesign.com/?p=333</guid>
		<description><![CDATA[Just started playing around with WPF in VS 2010. They have this ObservableCollection class which you can bind to your DataGrid or ListControl and then when you add or remove items from it, the control is refreshed automatically. However, I wanted to use my PriorityQueue class that I posted about earlier, so I modified it [...]]]></description>
		<wfw:commentRss>http://programanddesign.com/cs/observable-priority-queue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

