<?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>danielpmacdonald.com</title>
	<atom:link href="http://danielpmacdonald.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://danielpmacdonald.com</link>
	<description>Web Developer 2.0</description>
	<lastBuildDate>Tue, 10 Jan 2012 04:15:17 +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>The Darth Vader burger is for real, internet news is not</title>
		<link>http://danielpmacdonald.com/2012/01/the-darth-vader-burger-is-for-real-internet-news-is-not/</link>
		<comments>http://danielpmacdonald.com/2012/01/the-darth-vader-burger-is-for-real-internet-news-is-not/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 04:10:40 +0000</pubDate>
		<dc:creator>Daniel MacDonald</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://danielpmacdonald.com/?p=407</guid>
		<description><![CDATA[The black-bunned Darth Vader burger, being offered by French fast food chain Quick, is for real, but you wouldn't know it from reading the story on internet news outlets. When examining the story on several major sites (CNN, ABC News, Fox News, Huffington Post, CNET, to name a few), I noticed that almost all of <a href='http://danielpmacdonald.com/2012/01/the-darth-vader-burger-is-for-real-internet-news-is-not/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_416" class="wp-caption aligncenter" style="width: 457px"><a href="http://danielpmacdonald.com/wp-content/uploads/2012/01/dv_burger.jpg"><img src="http://danielpmacdonald.com/wp-content/uploads/2012/01/dv_burger.jpg" alt="Darth Vader burger - from Quick press release" title="Darth Vader burger - from Quick press release" width="447" height="432" class="size-full wp-image-416" /></a><p class="wp-caption-text">Darth Vader burger - from Quick press release - look, no mintinbox.net watermark</p></div><p>The black-bunned Darth Vader burger, being offered by French fast food chain Quick, is for real, but you wouldn't know it from reading the story on <a href="https://news.google.com/news/story?gl=us&pz=1&cf=all&ned=us&hl=en&q=darth+vader+burger&ncl=dWIVO7a5o56xfrMIoMYrxoUxDrkAM" target="_blank">internet news outlets</a>. When examining the story on several major sites (CNN, ABC News, Fox News, Huffington Post, CNET, to name a few), I noticed that almost all of them are using an image with a mintinbox.net watermark. Mintinbox.net is in French, but appears to be a Star Wars fan site. I'm not a reporter, but I don't think I would rely on a fan site for news without proper fact checking.</p> 
<p>Yet, all of these major news outlets apparently based their story on the <a href="http://www.mintinbox.net/Actus/11-12/2312SW_Quick" target="_blank">mininbox.net post</a>. Amazingly, this thing is for real, I think a more accurate story could be obtained from Quick's own <a href="http://group.quick.fr/sites/default/files/press/pdf/cp_star_wars.pdf" target="_blank">press release</a> (in French, but I've added a very rough <a href="/pub/cp_star_wars.en.txt">English translation</a>, via Google translate). I don't read French, but it is pretty clear from the release, and the image above, that the promotion for the Darth Vader burger lasts from March 2nd until March 5th, even though most of the news stories cite March 1st as the end date. <a href="http://eatocracy.cnn.com/2012/01/05/may-the-force-beef-with-you/?hpt=hp_bn8" target="_blank">CNN</a>, at least quotes a French news site as its <a href="http://www.lexpress.fr/styles/minute-saveurs/quick-sort-un-dark-vador-burger-tout-noir_1067986.html" target="_blank">source</a>, but looking at that page also reveals that site culled the image from mintinbox.net, and the story from a French <a href="http://www.journaldugeek.com/2012/01/04/burgers-star-wars-quick/" target="_blank">geek blog</a>.</p>
<p>It appears this story originated with the mininbox.net post, but didn't the reporters covering this "story" think to dig a little deeper than a fan site - it really wasn't very hard to find the official press release, and I don't even speak French - you would think that CNN employs at least 1 person that could read French. None of the articles/posts I've read seem to go deeper than this mininbox.net post. Let's just regurgitate something we found on the interwebs and call it sourced. Welcome to news in the 21st century.</p>]]></content:encoded>
			<wfw:commentRss>http://danielpmacdonald.com/2012/01/the-darth-vader-burger-is-for-real-internet-news-is-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Not to Steal a Website</title>
		<link>http://danielpmacdonald.com/2011/08/how-not-to-steal-a-website/</link>
		<comments>http://danielpmacdonald.com/2011/08/how-not-to-steal-a-website/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 23:41:21 +0000</pubDate>
		<dc:creator>Daniel MacDonald</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://danielpmacdonald.com/?p=394</guid>
		<description><![CDATA[First, let's take a look at the website for a VCA Animal Hospital. http://www.vcahospitals.com/alameda-east Next, we'll take a look at a veterinary website in the UK. http://petany.co.uk/east/home.html As you may have noticed, these two websites look remarkably similar. I developed the VCA website while working at the Designory. This website from the UK has no <a href='http://danielpmacdonald.com/2011/08/how-not-to-steal-a-website/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>First, let's take a look at the website for a VCA Animal Hospital. <br />
<a href="http://www.vcahospitals.com/alameda-east">http://www.vcahospitals.com/alameda-east</a></p>

<p><a href="http://danielpmacdonald.com/wp-content/uploads/2011/08/screenshot.116.png"><img src="http://danielpmacdonald.com/wp-content/uploads/2011/08/screenshot.116.png" alt="" title="screenshot.116" width="978" height="775" class="aligncenter size-full wp-image-397" /></a></p>

<p>Next, we'll take a look at a veterinary website in the UK.<br />
<a href="http://petany.co.uk/east/home.html">http://petany.co.uk/east/home.html</a></p>

<p><a href="http://danielpmacdonald.com/wp-content/uploads/2011/08/screenshot.115.png"><img src="http://danielpmacdonald.com/wp-content/uploads/2011/08/screenshot.115.png" alt="" title="screenshot.115" width="979" height="777" class="aligncenter size-full wp-image-398" /></a></p>

<p>As you may have noticed, these two websites look remarkably similar. I developed the VCA website while working at the Designory. This website from the UK has no association with VCA Animal Hospitals. Let's take a look at the source code for PETANY.</p>

<p><a href="http://danielpmacdonald.com/wp-content/uploads/2011/08/screenshot.117.png"><img src="http://danielpmacdonald.com/wp-content/uploads/2011/08/screenshot.117.png" alt="" title="screenshot.117" width="536" height="417" class="aligncenter size-full wp-image-396" /></a></p>

<p>After reviewing the source code, I have created a short, non-exhaustive list of things to do when stealing someone else's work.</p>
<ul>
<li>Change the meta author tag - this one is a dead giveaway, it still says "Designory.com"</li>
<li>Change analytics ids - a little bit trickier, because they aren't as obvious. Look, attention to detail is important to a programmer, especially important to a programmer who steals.</li>
<li>Change API keys - Google Maps provides a free API for developers, all one has to do is apply for a key at no cost. On the Map &amp; Directions page, PETANY is using the api key for vcahospitals.com, tsk, tsk.</li>
<li>Change site verification keys - duh</li>
<li>Ensure that forms do not post back to the site you stole the code from. PETANY is going to have a hard time accepting appointments online because the form is posting back to vcahospitals.com</li>
<li>I did not do the creative for VCA, but when stealing a logo, if your client is in the UK, you probably should not include an outline of the United States (as is found in the original) in the logo.</li>
</ul>

<p>One last thing to consider when stealing someone else's work, you should make every effort to disassociate yourself (developer) from your client's website. I searched Google for <a href="http://www.google.com/#hl=en&q=%22petany.co.uk%22&fp=d31248080af7dd23">"petany.co.uk"</a> (in quotes) and came up with one Facebook profile (Hi Alain).</p>]]></content:encoded>
			<wfw:commentRss>http://danielpmacdonald.com/2011/08/how-not-to-steal-a-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Plasma Plug-in now released (beta)</title>
		<link>http://danielpmacdonald.com/2011/04/jquery-plasma-plug-in-now-released-beta/</link>
		<comments>http://danielpmacdonald.com/2011/04/jquery-plasma-plug-in-now-released-beta/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 03:01:30 +0000</pubDate>
		<dc:creator>Daniel MacDonald</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://danielpmacdonald.com/?p=312</guid>
		<description><![CDATA[I posted my plug-in to the official jQuery Plug-in repository and the source is hosted on Google Project Hosting. The latest releases can be found in either location, this blog may or may not contain the latest version. The jQuery Plasma Plug-in now has an official project page, which will always contain the latest releases <a href='http://danielpmacdonald.com/2011/04/jquery-plasma-plug-in-now-released-beta/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I posted my plug-in to the official <a href="http://plugins.jquery.com/project/jquery-plasma">jQuery Plug-in repository</a> and the source is hosted on <a href="http://code.google.com/p/jquery-plasma/">Google Project Hosting</a>. The latest releases can be found in either location, this blog may or may not contain the latest version.</p>
<p class="announcement" style="clear:both;">The jQuery Plasma Plug-in now has an official <a href="http://danielpmacdonald.com/jquery-plasma/">project page</a>, which will always contain the latest releases and sample code.</p>

<p>Well, let's see it in action...</p>
<br />

<div id="matrix"></div>
    <p>
    <button id="stop">Stop</button>
    <button id="start">Start</button>
    <button id="faster">Faster</button>
    <button id="slower">Slower</button>
    <button id="sharpen">Sharpen</button>
    <button id="blur">Blur</button>
    <button id="destroy">Destroy</button>
    <br />It may take a few clicks on some buttons to see results.</p>
<style type="text/css">
  #matrix table {background-color:black;}
  #matrix td {font-size:0; line-height:0;}
  #matrix td img {max-width:100%;}
</style>

<script src="http://danielpmacdonald.com/wp-content/uploads/2011/04/jquery.plasma-0.3.min_.js" type="text/javascript"></script>

		<script type="text/javascript">
      (function( $ ){
  			$(document).ready(function(){
  				var options = {
  				  rows: 10,
  				  cols: 10,
  				  spacing: 4,
  				  padding: 0,
  				  border: 0,
  				  height: '40px',
  				  width: '40px',
  					html: '',
            shift: 0,
            limit: 1000,
  				  type: 0,
  				  blur: 2,
  				  r: 1,
  				  g: 1,
  				  b: 1,
            h: [0, 359],
  				  s: 1,
  				  v: 1,
  				  delay: 100
  				};
  				$('#matrix').plasma(options);
          $('#stop').click(function(){
            $('#matrix').plasma('stop');
            return false;
          });
          $('#start').click(function(){
            $('#matrix').plasma('start');
            return false;
          });
          $('#faster').click(function(){
            data = $('#matrix').data('plasma');
            if (data) {
              $.extend(data, {delay: data.delay * 0.8});
            }
            return false;
          });
          $('#slower').click(function(){
            data = $('#matrix').data('plasma');
            if (data) {
              $.extend(data, {delay: data.delay*1.2})
            }
           return false;
          });
          $('#sharpen').click(function(){
            data = $('#matrix').data('plasma');
            if (data) {
              $.extend(data, {blur: data.blur*0.8})
            }
            return false;
          });
          $('#blur').click(function(){
            data = $('#matrix').data('plasma');
            if (data) {
              $.extend(data, {blur: data.blur*1.2})
            }
            return false;
          });
          $('#destroy').click(function(){
            if ($(this).text() == 'Destroy') {
              $('#matrix').plasma('destroy');
              $(this).text('Create');
            } else {
              $('#matrix').plasma(options);
              $(this).text('Destroy');
            }
            return false;
          });
  			});
      })( jQuery );
		</script>
]]></content:encoded>
			<wfw:commentRss>http://danielpmacdonald.com/2011/04/jquery-plasma-plug-in-now-released-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript HSV Plasma jQuery Plug-in</title>
		<link>http://danielpmacdonald.com/2011/04/javascript-hsv-plasma/</link>
		<comments>http://danielpmacdonald.com/2011/04/javascript-hsv-plasma/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 02:55:39 +0000</pubDate>
		<dc:creator>Daniel MacDonald</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://danielpmacdonald.com/?p=276</guid>
		<description><![CDATA[While playing around with an 8x8 LED matrix connected to an Arduino through a Color Shield, I wanted to gain a better understanding of the plasma function in the demo. Since I'm a bit more comfortable with JavaScript than C/C++, I figured I would translate the plasma code into JavaScript and play with some settings. <a href='http://danielpmacdonald.com/2011/04/javascript-hsv-plasma/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>While playing around with an 8x8 LED matrix connected to an Arduino through a Color Shield, I wanted to gain a better understanding of the plasma function in the demo. Since I'm a bit more comfortable with JavaScript than C/C++, I figured I would translate the plasma code into JavaScript and play with some settings.</p>
<p class="announcement" style="clear:both;">The jQuery Plasma Plug-in now has an official <a href="http://danielpmacdonald.com/jquery-plasma/">project page</a>, which will always contain the latest releases and sample code.</p>
<p>After my efforts, I still really don't grasp what is going on with the math involved, but hell, I got it to work in JavaScript.</p>
<div id="matrix"></div>
    <button id="stop">Stop</button>
    <button id="start">Start</button>
    <button id="faster">Faster</button>
    <button id="slower">Slower</button>
    <button id="sharpen">Sharpen</button>
    <button id="blur">Blur</button>
    <button id="destroy">Destroy</button>
<br />
<p>EDIT: Did some tweeking, bug fixing, and packaged up everything. This is definitely alpha software, use at your own risk.</p>
<p>EDIT 2: Updated to Version 0.2. Added start, stop, and destroy methods. Improved delay timer performance. Exposed all settings in jQuery data object, allowing for on the fly changes to settings (see example.html).</p>

<style type="text/css">
  #matrix table {background-color:black;}
  #matrix td {font-size:0; line-height:0;}
  #matrix td img {max-width:100%;}
</style>

<script src="http://danielpmacdonald.com/wp-content/uploads/2011/04/jquery.plasma-0.2-min.js" type="text/javascript"></script>

		<script type="text/javascript">
      (function( $ ){
  			$(document).ready(function(){
  				var options = {
  				  rows: 10,
  				  cols: 10,
  				  spacing: 4,
  				  padding: 0,
  				  border: 0,
  				  height: '40px',
  				  width: '40px',
  				html: '<img src="http://danielpmacdonald.com/wp-content/uploads/2011/04/circle-black.png" height="40" width="40" />',
  				  shift: 128000,
  				  blur: 1,
  				  r: 1,
  				  g: 1,
  				  b: 1,
  				  s: 1,
  				  v: 1,
  				  delay: 300
  				};
  				$('#matrix').plasma(options);
          $('#stop').click(function(){
            $('#matrix').plasma('stop');
            return false;
          });
          $('#start').click(function(){
            $('#matrix').plasma('start');
            return false;
          });
          $('#faster').click(function(){
            data = $('#matrix').data('plasma');
            if (data) {
              $.extend(data, {delay: data.delay * 0.8});
            }
            return false;
          });
          $('#slower').click(function(){
            data = $('#matrix').data('plasma');
            if (data) {
              $.extend(data, {delay: data.delay*1.2})
            }
           return false;
          });
          $('#sharpen').click(function(){
            data = $('#matrix').data('plasma');
            if (data) {
              $.extend(data, {blur: data.blur*0.8})
            }
            return false;
          });
          $('#blur').click(function(){
            data = $('#matrix').data('plasma');
            if (data) {
              $.extend(data, {blur: data.blur*1.2})
            }
            return false;
          });
          $('#destroy').click(function(){
            if ($(this).text() == 'Destroy') {
              $('#matrix').plasma('destroy');
              $(this).text('Create');
            } else {
              $('#matrix').plasma(options);
              $(this).text('Destroy');
            }
            return false;
          });
  			});
      })( jQuery );
</script>]]></content:encoded>
			<wfw:commentRss>http://danielpmacdonald.com/2011/04/javascript-hsv-plasma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Security Information notice</title>
		<link>http://danielpmacdonald.com/2011/03/facebook-security-information-notice/</link>
		<comments>http://danielpmacdonald.com/2011/03/facebook-security-information-notice/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 00:51:52 +0000</pubDate>
		<dc:creator>Daniel MacDonald</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://danielpmacdonald.com/?p=269</guid>
		<description><![CDATA[Facebook has a new security feature that makes me feel so secure.]]></description>
			<content:encoded><![CDATA[Facebook has a new security feature that makes me feel so secure.<br /><a href="http://danielpmacdonald.com/wp-content/uploads/2011/03/fb.png"><img src="http://danielpmacdonald.com/wp-content/uploads/2011/03/fb.png" alt="" title="fb" width="600" height="800" class="aligncenter size-full wp-image-270" /></a>]]></content:encoded>
			<wfw:commentRss>http://danielpmacdonald.com/2011/03/facebook-security-information-notice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Background Video</title>
		<link>http://danielpmacdonald.com/2011/02/background-video/</link>
		<comments>http://danielpmacdonald.com/2011/02/background-video/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 03:54:34 +0000</pubDate>
		<dc:creator>Daniel MacDonald</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://danielpmacdonald.com/?p=258</guid>
		<description><![CDATA[This is a test of placing a YouTube video as the background of a web page.

A friend was asking me about this, because he had seen it on a couple or websites recently. So, I started investigating, and found <a href="http://www.seanmccambridge.com/tubular">jQuery Tubular</a> which seemed to do the trick. Now, a word about methodology, I have nothing against jQuery plug-ins, but as a former plug-in author, I know a simple, neat plug-in will bloat out of control with feature requests. So, I generally look at the code, and pull out the functionality that I need, and then rewrite the code for my purposes.]]></description>
			<content:encoded><![CDATA[<p>This is a test of placing a YouTube video as the background of a web page.</p>
<p>A friend was asking me about this, because he had seen it on a couple or websites recently. So, I started investigating, and found <a href="http://www.seanmccambridge.com/tubular">jQuery Tubular</a> which seemed to do the trick. Now, a word about methodology, I have nothing against jQuery plug-ins, but as a former plug-in author, I know a simple, neat plug-in will bloat out of control with feature requests. So, I generally look at the code, and pull out the functionality that I need, and then rewrite the code for my purposes.</p>
<p>So, here is a blog post with a pretty YouTube background video and not much else.</p>

<script type="text/javascript" src="http://danielpmacdonald.com/wp-content/uploads/2011/02/swfobject.js"></script>

	<script type="text/javascript">
		var ratio = 16/9;
		jQuery(document).ready(function($){
			$('html,body').css('height','100%');
			var container = $('<div id="yt-container"></div>').css({position:'absolute'});
      var wrapper = $('<div id="yt-wrapper"></div>').css({position: 'fixed',overflow:'hidden'}).append(container);
			$('body').prepend(wrapper);
			var params = {allowScriptAccess: 'always', wmode: 'transparent'};
			var atts = {id: 'yt-player'};
			swfobject.embedSWF("http://www.youtube.com/apiplayer?&enablejsapi=1&playerapiid=player1", 
      	"yt-container", "480", "295", "8", null, null, params, atts);
			$(window).resize(function(){
				playerResize();
			});
		});
		function onYouTubePlayerReady(id) {
			var player = jQuery('#yt-player').get(0);
			player.cueVideoById('o7SRAeGyaM8');
			player.mute();
			player.playVideo();
			playerResize();
			player.addEventListener("onStateChange", "playerStateChange");
		}
		function playerStateChange(state){
			if (state === 0) {
				var player = jQuery('#yt-player').get(0);
				player.playVideo();
			}
		}
		function playerResize() {
		  var width = jQuery(window).width(); // original page width
		  var height = jQuery(window).height(); // original page height
		  jQuery('#yt-container').width(width).height(height);
		  if (height > width / ratio) { // if window ratio becomes taller than video
		    width = height * ratio; // overflow video to sides instead of bottom
		  }
		  jQuery('#yt-player').width(width).height(width/ratio);
		}
	</script>
]]></content:encoded>
			<wfw:commentRss>http://danielpmacdonald.com/2011/02/background-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HDPC</title>
		<link>http://danielpmacdonald.com/2011/02/hdpc/</link>
		<comments>http://danielpmacdonald.com/2011/02/hdpc/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 04:42:23 +0000</pubDate>
		<dc:creator>Daniel MacDonald</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://danielpmacdonald.com/?p=190</guid>
		<description><![CDATA[Thank you, Intel, Universal Studios and the FCC for HDPC. HDPC is a content protection scheme developed after the Blu-Ray spec that will render your Blu-Ray player useless for HDPC discs (such as those from Universal). Movie studios and recording companies have known that content can be perfectly pirated from a digital source since the <a href='http://danielpmacdonald.com/2011/02/hdpc/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Thank you, Intel, Universal Studios and the FCC for HDPC. HDPC is a content protection scheme developed after the Blu-Ray spec that will render your Blu-Ray player useless for HDPC discs (such as those from Universal). Movie studios and recording companies have known that content can be  perfectly pirated from a digital source since the CD (early '80s). So, years later, DVD comes out with no built in DRM (whose fault is that?).</p>
 <p>Now, we have Blu-Ray (don't get me started - looks awesome, software nightmare). Was DRM built into the spec before companies started making Blu-Ray players (even though the companies that created Blu-Ray knew that a few people on the internet may want to pirate content)? No. If your Blu-Ray player was built before HDPC, tough luck - I haven't found a firmware update for HDPC. And speaking of firmware updates, who the fuck decided it would be a good idea to start manufacturing Blu-Ray players before the spec was even finalized. I have never had to update the firmware on any of my DVD players, but it seems that each new release on Blu-Ray has some new tech that requires a firmware update (if the manufacturer provides these updates in a timely fashion).</p>
<p>So the end result is that I turned off my Netflix Blu-Ray subscription. Too unreliable. Check craigslist in the coming days for a slightly used Blu-Ray player. Oh, and that Blu-Ray disc that would not play? Found it on BitTorrent.</p>]]></content:encoded>
			<wfw:commentRss>http://danielpmacdonald.com/2011/02/hdpc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Color Converter</title>
		<link>http://danielpmacdonald.com/2011/02/color-converter/</link>
		<comments>http://danielpmacdonald.com/2011/02/color-converter/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 18:35:02 +0000</pubDate>
		<dc:creator>Daniel MacDonald</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://danielpmacdonald.com/?p=166</guid>
		<description><![CDATA[This JavaScript tool converts RGB colors (values of 0-255 for each red, green, blue) into hexadecimal notation (#1a2b3c).]]></description>
			<content:encoded><![CDATA[<div>
<p>This JavaScripot tool converts RGB colors (values of 0-255 for each red, green, blue) into hexadecimal notation (#1a2b3c).</p>
<script type="text/javascript">// <![CDATA[
function hexToDecimal(hex) {
  return parseInt(hex, 16);
}
function decimalToHex(dec) {
	var returnval = Number(dec).toString(16);
  while (returnval.length < 2) {
  	returnval = "0" + returnval;
  }
	return returnval;
}
jQuery(document).ready(function($){
	$('#convert_rgb').click(function(){
		$('#to_red').val(hexToDecimal($('#from_hex').val().substring(0,2)));
		$('#to_green').val(hexToDecimal($('#from_hex').val().substring(2,4)));
		$('#to_blue').val(hexToDecimal($('#from_hex').val().substring(4)));
	});
	$('#convert_hex').click(function(){
		var val = '#';
		val += decimalToHex($('#from_red').val());
		val += decimalToHex($('#from_green').val());
		val += decimalToHex($('#from_blue').val());
		$('#to_hex').val(val);
	});
});
// ]]&gt;</script>
<form id="color-form" style="clear:both;">
<p>Hex to RGB<br /> Hex (#) <input id="from_hex" style="display: inline;" size="10" type="text" /> <input id="convert_rgb" style="display: inline;" type="button" value="Convert" /> Red <input id="to_red" style="display: inline;" size="4" type="text" /> Green <input id="to_green" style="display: inline;" size="4" type="text" /> Blue <input id="to_blue" style="display: inline;" size="4" type="text" /></p>
<p>RGB to Hex<br /> Red <input id="from_red" style="display: inline;" size="4" type="text" /> Green <input id="from_green" style="display: inline;" size="4" type="text" /> Blue <input id="from_blue" style="display: inline;" size="4" type="text" /> <input id="convert_hex" style="display: inline;" type="button" value="Convert" /> Hex <input id="to_hex" style="display: inline;" size="10" type="text" /></p>
</form> </div>]]></content:encoded>
			<wfw:commentRss>http://danielpmacdonald.com/2011/02/color-converter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Update in Progess</title>
		<link>http://danielpmacdonald.com/2011/02/site-update-in-progess/</link>
		<comments>http://danielpmacdonald.com/2011/02/site-update-in-progess/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 04:42:01 +0000</pubDate>
		<dc:creator>Daniel MacDonald</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://danielpmacdonald.com/?p=79</guid>
		<description><![CDATA[danielpmacdonald.com has just moved to WordPress in an effort to better present the goals (if any) of this site. Please stand by as content from the old danielpmacdonald.com and projectatomic.com sites are migrated into the new content management system. Feel free to comment (they are moderated), and comment spammers can bite my shiny metal ass.]]></description>
			<content:encoded><![CDATA[<p>danielpmacdonald.com has just moved to WordPress in an effort to better present the goals (if any) of this site. Please stand by as content from the old danielpmacdonald.com and projectatomic.com sites are migrated into the new content management system.</p>
<p>Feel free to comment (they are moderated), and comment spammers can bite my shiny metal ass.</p>
]]></content:encoded>
			<wfw:commentRss>http://danielpmacdonald.com/2011/02/site-update-in-progess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>URL Encoder/Decoder</title>
		<link>http://danielpmacdonald.com/2011/01/url-encoderdecoder/</link>
		<comments>http://danielpmacdonald.com/2011/01/url-encoderdecoder/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 00:37:13 +0000</pubDate>
		<dc:creator>Daniel MacDonald</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://danielpmacdonald.com/?p=153</guid>
		<description><![CDATA[The URL Encoder/Decoder is a handy little tool for converting plain text into a format that can be placed in a URL, most likely, the query string.]]></description>
			<content:encoded><![CDATA[<p>The URL Encoder/Decoder is a handy little tool for converting plain text into a format that can be placed in a URL, most likely, the query string.</p>
<p>	<script type="text/javascript">
		jQuery(document).ready(function($){
			$('#encoder-encode').click(function(){
				$('#encoder-result').val(encodeURIComponent($('#encoder-source').val()));
			});
			$('#encoder-decode').click(function(){
				$('#encoder-result').val(decodeURIComponent($('#encoder-source').val()));
			});
			$('#encoder-switch').click(function(){
				var source = $('#encoder-source').val();
				$('#encoder-source').val($('#encoder-result').val());
				$('#encoder-result').val(source);
			});
			$('#encoder-form').submit(function(){
				return false;
			})
		});
	</script></p>
<form id="encoder-form">
Source<br />
<textarea cols="80" rows="10" id="encoder-source"></textarea></p>
<div class="fix">
<input id="encoder-decode" type="button" value="Decode">
<input id="encoder-encode"  type="button" value="Encode">
<input id="encoder-switch"  type="button" value="Switch">
</div>
<p>
Encoded/Decoded<br />
<textarea cols="80" rows="10" id="encoder-result"></textarea><br />
</form>
]]></content:encoded>
			<wfw:commentRss>http://danielpmacdonald.com/2011/01/url-encoderdecoder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

