<?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>HackDevDotCom &#187; General</title>
	<atom:link href="http://hackdev.com/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://hackdev.com</link>
	<description>Hacked Development</description>
	<lastBuildDate>Wed, 25 Jan 2012 23:58:14 +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>I&#8217;ve been slacking off&#8230;</title>
		<link>http://hackdev.com/2012/01/slacking-off/</link>
		<comments>http://hackdev.com/2012/01/slacking-off/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 23:58:14 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[College]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[beer]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[brewing]]></category>
		<category><![CDATA[college]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[slacking]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=289</guid>
		<description><![CDATA[I really should get into the habit of updating this site more often, but a few things have been conspiring against me; mostly laziness and lack of motivation to be fair, but there have been some other real-life instances distracting &#8230; <a href="http://hackdev.com/2012/01/slacking-off/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I really should get into the habit of updating this site more often, but a few things have been conspiring against me; mostly laziness and lack of motivation to be fair, but there have been some other real-life instances distracting me from my goal of world domination, err, I meant regular blogging.</p>
<p>I have been working on renovating my house to some extent, adding additional insulation to the rooms that need it whilst giving it a good clearing out&#8230; one skip rental and two trips to the dump have done quite a bit to help me along in this challenge, but there is still more to do&#8230; much, much more.</p>
<p>I got accepted into college and have completed my first semester of study! That is a fairly big time vampire alright, but it is very enjoyable. I&#8217;m currently studying computing, but will select a more specific area after my second semester&#8230; I&#8217;ll definitely be going for software development as the primary role in this.</p>
<p>I&#8217;ve been working on building up my brewery and brewing skills so that I can make lots and lots of delicious beers of all types and strengths, in fact my one and only new years (beers) resolution is to do at lease one brew a month, which at the end of the year if followed through will see me producing 60 gallons of beer. Good thing I&#8217;ve been buying in bulk and picked up a few more kegs!</p>
<p>Being ready for many eventualities is now also higher on my list of objectives as last year alone we had heavy snow that practically stopped the country, and quite serious flooding. Since I live alone I have become more aware that I will require food stores and basic necessities on hand should I be unable to move around too easily.</p>
<p>With a new year bringing along new challenges and opportunities, I intend to be ready for all of it and to take it on with a deep, hearty evil laugh!</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2012/01/slacking-off/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A few changes&#8230;</title>
		<link>http://hackdev.com/2011/01/changes/</link>
		<comments>http://hackdev.com/2011/01/changes/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 18:44:46 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Fixes / Patches]]></category>
		<category><![CDATA[Game Server]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Roll your own:]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=269</guid>
		<description><![CDATA[Howdy folks, firstly, there has been a lot of 3rd party development going on in relation to the black ops RCON tool, but none of it was by me. In fact, I found the game so infuriatingly laggy that I &#8230; <a href="http://hackdev.com/2011/01/changes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Howdy folks, firstly, there has been a lot of 3rd party development going on in relation to the black ops RCON tool, but none of it was by me. In fact, I found the game so infuriatingly laggy that I canceled my server so I no longer have anything to test on, as a result I have lost interest in the project and have closed the github repo; however, I will post the code here so anyone who wants it can take it and use it, do what ever you like with it under the MIT license.</p>
<p>RCON Source Code available <a title="http://hackdev.com/2011/01/changes/cod-bo_rcon/" href="http://hackdev.com/2011/01/changes/cod-bo_rcon/">here</a>.</p>
<p>I am also unemployed now <img src='http://hackdev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  IMHO it was a great move, as it will allow me to have a break from doing anything really for the first time since I started school when I was 4 or 5&#8230; it has also given me the push I needed to go back to college and train myself up .</p>
<p>I have been working on a few projects now too with my increase in available time, however I&#8217;m not going to say much about them at the moment in case I don&#8217;t finish em.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2011/01/changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RCON Repository</title>
		<link>http://hackdev.com/2010/11/rcon-repository/</link>
		<comments>http://hackdev.com/2010/11/rcon-repository/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 22:47:11 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=242</guid>
		<description><![CDATA[Hey Folks, Just a quick update. There is now a GIT Repository available at https://github.com/hackdev/CoD-BO-Tools &#8211; Still haven&#8217;t picked a license yet though&#8230;]]></description>
			<content:encoded><![CDATA[<p>Hey Folks, Just a quick update. There is now a GIT Repository available at <a title="GitHub" href="https://github.com/hackdev/CoD-BO-Tools">https://github.com/hackdev/CoD-BO-Tools</a> &#8211; Still haven&#8217;t picked a license yet though&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/11/rcon-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delays &amp; Licensing</title>
		<link>http://hackdev.com/2010/11/delays-licensing/</link>
		<comments>http://hackdev.com/2010/11/delays-licensing/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 00:03:34 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=238</guid>
		<description><![CDATA[I haven&#8217;t had too much time to work on the CoD:BO script much over the last few days as I have changed job as of Monday and am still trying to catch up, among other things, but I will definitely &#8230; <a href="http://hackdev.com/2010/11/delays-licensing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t had too much time to work on the CoD:BO script much over the last few days as I have changed job as of Monday and am still trying to catch up, among other things, but I will definitely be doing some more work on it fairly shortly. The following is what I would like to get done over the next few weeks, in no particular order&#8230;</p>
<ul>
<li>Add more functionality to it in order to provide access to kick/ban/modify rotation/etc&#8230;</li>
<li>Re-work current code into a class that can be included into custom applications (possibly as an installable extension) to make coding your own RCON solution much easier&#8230;</li>
<li>Do a full code review and implement correct error handling and status returns</li>
<li>Provide the ability for the functions to parse the returned data and have it only return the relevant stuff (makes it easier for people to accept the return values from the server)</li>
<li>Start a GitHub repository for the code base.</li>
<li>Figure out how to have a normal userland script interact with another script running as a daemon</li>
<li>Implement a script to show who&#8217;s online on the server at a given time (to be considered a demo)</li>
<li>Provide a &#8220;development area&#8221; for users to communicate easily and turn this into a real open source project (FOSS)</li>
</ul>
<p>Things for the future include, again in no particular order&#8230;</p>
<ul>
<li>Create a PHP based front end with the ability to store &#8220;pre-configurations&#8221; in mySQL and have them apply to the server at various times etc&#8230;</li>
<li>Full administration client with user level access&#8230;</li>
<li>Anything else awesome and fun that happens to take my interest.</li>
</ul>
<p>I can&#8217;t decide on what license to release the code under. At the moment, technically it&#8217;s not licensed at all, it is released for public viewing, not for use or modification or derivative works&#8230; Of course, I have no intentions of going and suing anybody over it, but it is an important issue that I believe has to be resolved. Unfortunately I don&#8217;t really know enough about the BSD vs GPL vs GPLv2 vs GPLv3 vs ASF vs [Insert continuous string of licenses here] argument to make an informed decision at the moment, but I do know I want it to be released under a license that is recognized by the OSI and the FSF &#8211; If you do have experience or a strong opinion on the license that this should be released under, please do fire me an email using the contact form (linked at the top of the page) or shoot me a message in the comment section.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/11/delays-licensing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Black Ops RCON</title>
		<link>http://hackdev.com/2010/11/updated-black-ops-rcon/</link>
		<comments>http://hackdev.com/2010/11/updated-black-ops-rcon/#comments</comments>
		<pubDate>Sun, 14 Nov 2010 16:39:50 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Fixes / Patches]]></category>
		<category><![CDATA[Game Server]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Roll your own:]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=233</guid>
		<description><![CDATA[Hey folks, this is just a quick update to let you know I have still been working on this&#8230; as it stands I have implemented two functions which work, and one which doesn&#8217;t. Slowly but surely I will be adding &#8230; <a href="http://hackdev.com/2010/11/updated-black-ops-rcon/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hey folks, this is just a quick update to let you know I have still been working on this&#8230; as it stands I have implemented two functions which work, and one which doesn&#8217;t. Slowly but surely I will be adding more and more functionality&#8230; unfortunately I don&#8217;t have RCON access to an unranked server at the moment, would anyone like to oblige me on that? <img src='http://hackdev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I would also like to mention at this point, that I have not looked into causing errors on the RCON, ie invalid logins etc&#8230; so be warned, while most of this should work, I cannot and will not guarantee it. Also, it is written for Python 2.6, not 3.whatever&#8230; I will be getting a few more people on board to help with this soon and we will be cleaning it up, adding error handling etc&#8230;</p>
<p>Anyways, here is what you have all been waiting for&#8230;.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/python</span>
&nbsp;
<span style="color: #483d8b;">''</span><span style="color: #483d8b;">'
_______               ________      .___
<span style="color: #000099; font-weight: bold;">\ </span>  _  <span style="color: #000099; font-weight: bold;">\_</span>_  _  ______ <span style="color: #000099; font-weight: bold;">\_</span>____  <span style="color: #000099; font-weight: bold;">\ </span>  __| _/
/  /_<span style="color: #000099; font-weight: bold;">\ </span> <span style="color: #000099; font-weight: bold;">\ </span><span style="color: #000099; font-weight: bold;">\/</span> <span style="color: #000099; font-weight: bold;">\/</span> /    <span style="color: #000099; font-weight: bold;">\ </span> _(__  &amp;lt;  / __ |
<span style="color: #000099; font-weight: bold;">\ </span> <span style="color: #000099; font-weight: bold;">\_</span>/   <span style="color: #000099; font-weight: bold;">\ </span>    /   |  <span style="color: #000099; font-weight: bold;">\/</span>       <span style="color: #000099; font-weight: bold;">\/</span> /_/ |
 <span style="color: #000099; font-weight: bold;">\_</span>____  /<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\_</span>/|___|  /______  /<span style="color: #000099; font-weight: bold;">\_</span>___ |
       <span style="color: #000099; font-weight: bold;">\/</span>           <span style="color: #000099; font-weight: bold;">\/</span>       <span style="color: #000099; font-weight: bold;">\/</span>      <span style="color: #000099; font-weight: bold;">\/</span>
                    http://hackdev.com
&nbsp;
Author:
    Steven from hackdev.com
&nbsp;
File History:
    09/11/10:
        [+] Initial Inception. Proof of concept written entirely inline that
            allows for a single hard coded command to be sent to the server.
&nbsp;
    10/11/10:
        [+] Creation of functions to handle the sending and receiving of commands.
        [+] Added the ability for users to change passwords in the configuration
            section of the script.
        [+] Broke commands, preambles etc... into variables for easier use &amp;amp; modification.
        [+] Added comments, previous code did not contain comments. ** Important **
    14/11/10:
        [+] Added command boGetPlayerList
        [+] Added command boSayToServer
        [+] Added command boSayToPlayer
        [+] Figured out that not everything has to be done in <span style="color: #000099; font-weight: bold;">\x</span>68<span style="color: #000099; font-weight: bold;">\x</span>65<span style="color: #000099; font-weight: bold;">\x</span>78
&nbsp;
'</span><span style="color: #483d8b;">''</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">socket</span>       <span style="color: #808080; font-style: italic;">#Used for creating the UDP sockets</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">#   User Configurable Options</span>
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
&nbsp;
boHost          = <span style="color: #483d8b;">&quot;&quot;</span>      <span style="color: #808080; font-style: italic;">#The server IP</span>
boPort          = <span style="color: #ff4500;">3074</span>                  <span style="color: #808080; font-style: italic;">#The server Port</span>
boPassword      = <span style="color: #483d8b;">&quot;&quot;</span>              <span style="color: #808080; font-style: italic;">#The RCON Password</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">#   End User Configurable Options</span>
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
&nbsp;
svrAddress = <span style="color: black;">&#40;</span>boHost, boPort<span style="color: black;">&#41;</span>           <span style="color: #808080; font-style: italic;">#Used to create a tuple of host &amp;amp; port</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">#   Command Definitions, sorry about the variables :(</span>
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #ff7700;font-weight:bold;">global</span> cmdPreamble
cmdPreamble  = <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>ff<span style="color: #000099; font-weight: bold;">\x</span>00&quot;</span>                       <span style="color: #808080; font-style: italic;">#Preamble used to prefix the packet</span>
<span style="color: #ff7700;font-weight:bold;">global</span> cmdSeporator
cmdSeporator = <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>20&quot;</span>                                       <span style="color: #808080; font-style: italic;">#Seporator used between password &amp;amp; command</span>
<span style="color: #ff7700;font-weight:bold;">global</span> cmdPostamble
cmdPostamble = <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\0</span>0&quot;</span>                                        <span style="color: #808080; font-style: italic;">#Ending of the packet, end of command</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">#   Socket Generation</span>
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
udpSock = <span style="color: #dc143c;">socket</span>.<span style="color: #dc143c;">socket</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">socket</span>.<span style="color: black;">AF_INET</span>, <span style="color: #dc143c;">socket</span>.<span style="color: black;">SOCK_DGRAM</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">#   Function used to send commands to the server, function returns the</span>
<span style="color: #808080; font-style: italic;">#   data returned from the query, unformatted...</span>
<span style="color: #808080; font-style: italic;">#-----------------------------------------------------------------------------------</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> boSendCommand<span style="color: black;">&#40;</span>boCommand, boArgument=<span style="color: #ff4500;">0</span>, recvBufferSize=<span style="color: #ff4500;">4096</span><span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> boArgument:
        commandBuffer = cmdPreamble + boPassword + cmdSeporator + boCommand + cmdPostamble
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        commandBuffer = cmdPreamble + boPassword + cmdSeporator + boCommand + cmdSeporator + boArgument + cmdPostamble
    boSentBytes = udpSock.<span style="color: black;">sendto</span><span style="color: black;">&#40;</span>commandBuffer, svrAddress<span style="color: black;">&#41;</span>     <span style="color: #808080; font-style: italic;">#Send the data to the server</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>boSentBytes <span style="color: #66cc66;">&amp;</span>lt<span style="color: #66cc66;">;</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>commandBuffer<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:                      <span style="color: #808080; font-style: italic;">#Check the num of bytes sent</span>
        <span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;An error was encountered while sending the command %s&quot;</span>, boCommand<span style="color: black;">&#41;</span>
    boRecvBuffer = udpSock.<span style="color: black;">recv</span><span style="color: black;">&#40;</span>recvBufferSize<span style="color: black;">&#41;</span>                 <span style="color: #808080; font-style: italic;">#Receive the data returned</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>boRecvBuffer<span style="color: black;">&#41;</span> <span style="color: #66cc66;">&amp;</span>gt<span style="color: #66cc66;">;</span> <span style="color: #ff4500;">0</span>:                                   <span style="color: #808080; font-style: italic;">#Check to ensure there is something</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> boRecvBuffer                                     <span style="color: #808080; font-style: italic;">#Return the buffer</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>                                                <span style="color: #808080; font-style: italic;">#If theres nothing, return 0</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> boGetPlayerList<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    playerlist = boSendCommand<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;teamstatus&quot;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> playerlist:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> playerlist
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> boSayToServer<span style="color: black;">&#40;</span>message<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> message:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        servermessage = boSendCommand<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;say&quot;</span>, <span style="color: #483d8b;">'&quot;'</span> + message + <span style="color: #483d8b;">'&quot;'</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> servermessage:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> servermessage
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> boSayToPlayer<span style="color: black;">&#40;</span>message, playerID<span style="color: black;">&#41;</span>:
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> message <span style="color: #ff7700;font-weight:bold;">or</span> <span style="color: #ff7700;font-weight:bold;">not</span> playerID:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>
    <span style="color: #ff7700;font-weight:bold;">else</span>:
        playermessage = boSendCommand<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;tell&quot;</span>, playerID + <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\x</span>20&quot;</span> + <span style="color: #483d8b;">'&quot;'</span> + message + <span style="color: #483d8b;">'&quot;'</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> playermessage:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> playermessage
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Playerlist&quot;</span><span style="color: black;">&#41;</span>
myPlayerList = boGetPlayerList<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>myPlayerList<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Server Message&quot;</span><span style="color: black;">&#41;</span>
myServerMessage = boSayToServer<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Testing!&quot;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>myServerMessage<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Player Message&quot;</span><span style="color: black;">&#41;</span>
myPlayerMessage = boSayToPlayer<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Testing 123&quot;</span>, <span style="color: #483d8b;">&quot;1&quot;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>myPlayerMessage<span style="color: black;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/11/updated-black-ops-rcon/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>New theme for a new server!</title>
		<link>http://hackdev.com/2010/10/new-theme-for-a-new-server/</link>
		<comments>http://hackdev.com/2010/10/new-theme-for-a-new-server/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 22:28:41 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Roll your own:]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=219</guid>
		<description><![CDATA[Howdy Folks, I have been working hard here in the background getting rid of all of my hosting accounts and consolidating everything into one (relatively) easy to manage VPS or Virtual Private Server which I got for cheap from the &#8230; <a href="http://hackdev.com/2010/10/new-theme-for-a-new-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Howdy Folks,</p>
<p>I have been working hard here in the background getting rid of all of my hosting accounts and consolidating everything into one (relatively) easy to manage VPS or Virtual Private Server which I got for cheap from the guys (and presumably girls) at <a title="ThrustVPS.com" href="https://clients.thrustvps.com/aff.php?aff=152">ThrustVPS</a> who seem to be running  tight ship, I don&#8217;t have any stats on uptime or that so far; but everything has gone smoothly. And when they say instant setup, they mean it.</p>
<p>Thats enough of plugging someone else&#8217;s company for now&#8230; not that I have my own to run&#8230; yet. I have managed so far to implement a custom firewall that suits my needs quite nicely, my own email system, the general webserver / mySQL server etc&#8230; and all seems to be running very smoothly for such a cheap box, I do intend however to document all of the install processes I have gone through to get this far, and if your really nice, I might even share my custom backup script with y&#8217;all.</p>
<p>Anyways, I just said I would pop on and give a quick update before I get to bed for work.</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/10/new-theme-for-a-new-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just a general update&#8230;</title>
		<link>http://hackdev.com/2010/04/just-a-general-update/</link>
		<comments>http://hackdev.com/2010/04/just-a-general-update/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 20:48:55 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[Fixes / Patches]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Mancave]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=144</guid>
		<description><![CDATA[It&#8217;s been quite a while since I&#8217;ve posted  anything, I&#8217;ve been very busy lately but since I&#8217;m out sick now for a few days, I have a bit of time to update&#8230; If you have tried to play Fallout 3 &#8230; <a href="http://hackdev.com/2010/04/just-a-general-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been quite a while since I&#8217;ve posted  anything, I&#8217;ve been very busy lately but since I&#8217;m out sick now for a few days, I have a bit of time to update&#8230;</p>
<p>If you have tried to play Fallout 3 using an Asus branded NVidia card, and it crashes stating &#8220;Fallout 3 has stopped working&#8221; every time you try to load a new game, check and see if you have Asus Gamer OSD installed, if you do, get rid of it. Something the overlay does interferes with the game  and causes this to happen&#8230;</p>
<p>I have been doing some more work on the lighting for the man cave so I have some Python code that will pull the Average color (not the most predominant, yet, wont be hard, but I am lazy) so here it is, please keep in mind its not nice, fast or clean&#8230; for high res images it takes a few seconds to do its thing&#8230;</p>
<p style="padding-left: 30px;">

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
&nbsp;
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># PIL Image Module Handbook - http://www.pythonware.com/library/pil/handbook/image.htm</span>
<span style="color: #808080; font-style: italic;">#</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">from</span> PIL <span style="color: #ff7700;font-weight:bold;">import</span> Image
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">optparse</span> <span style="color: #ff7700;font-weight:bold;">import</span> OptionParser
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> processImageAverage<span style="color: black;">&#40;</span>imageFile<span style="color: black;">&#41;</span>:
    image = Image.<span style="color: #008000;">open</span><span style="color: black;">&#40;</span>imageFile<span style="color: black;">&#41;</span>     <span style="color: #808080; font-style: italic;">#open the image for processing</span>
    pixels = <span style="color: #008000;">list</span><span style="color: black;">&#40;</span>image.<span style="color: black;">getdata</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>    <span style="color: #808080; font-style: italic;">#break the image down into a list of pixels, each pixel contains a list of red,green,blue</span>
&nbsp;
    totalpx = <span style="color: #ff4500;">0</span> <span style="color: #808080; font-style: italic;">#set some default values to start counting...</span>
    redpx = <span style="color: #ff4500;">0</span>
    greenpx = <span style="color: #ff4500;">0</span>
    bluepx = <span style="color: #ff4500;">0</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">for</span> pixel <span style="color: #ff7700;font-weight:bold;">in</span> pixels:    <span style="color: #808080; font-style: italic;">#loop through the lists and build the values.</span>
        totalpx += <span style="color: #ff4500;">1</span>
        redpx += pixel<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
        greenpx += pixel<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
        bluepx += pixel<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>
&nbsp;
    redavg = redpx / totalpx   <span style="color: #808080; font-style: italic;">#generate the averages</span>
    greenavg = greenpx / totalpx
    blueavg = bluepx / totalpx
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Total Pixels:<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>, totalpx     <span style="color: #808080; font-style: italic;">#and write them out.</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Red Average:<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>, redavg
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Green Average:<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>, greenavg
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Blue Average:<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>, blueavg
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;HEX Color:<span style="color: #000099; font-weight: bold;">\t</span>#%x%x%x&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>redavg, greenavg, blueavg<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
    <span style="color: #dc143c;">parser</span> = OptionParser<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Usage: %prog source&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: black;">&#40;</span>options, arguments<span style="color: black;">&#41;</span> = <span style="color: #dc143c;">parser</span>.<span style="color: black;">parse_args</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>arguments<span style="color: black;">&#41;</span> <span style="color: #66cc66;">!</span>= <span style="color: #ff4500;">1</span>:
        <span style="color: #dc143c;">parser</span>.<span style="color: black;">error</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Please specify a single input file.&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
    processImageAverage<span style="color: black;">&#40;</span>arguments<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">&quot;__main__&quot;</span>:
    main<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

</p>
<p>I have a new job now, I&#8217;m no longer a software validation engineer (tester), I&#8217;m now an IT Support Engineer (IT Techie&#8230;) which is kinda nice&#8230;.</p>
<p>Well&#8230; that is for now&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/04/just-a-general-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>€1366.07 down&#8230;</title>
		<link>http://hackdev.com/2010/02/e1366-07-down/</link>
		<comments>http://hackdev.com/2010/02/e1366-07-down/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 14:34:31 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Mancave]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=135</guid>
		<description><![CDATA[So I have been doing some serious work on my mancave during my two weeks off, so far I have all of the walls battened, the new door fitted, and two of the walls wired for mains sockets. I have &#8230; <a href="http://hackdev.com/2010/02/e1366-07-down/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So I have been doing some serious work on my mancave during my two weeks off, so far I have all of the walls battened, the new door fitted, and two of the walls wired for mains sockets. I have even been picking up some additional parts that we are not quite ready yet, such as a roll of CAT6 cable, CAT6 wall outlets with faceplate&#8217;s, 17 double gang switched sockets and much much more&#8230; all in all its coming along nicely. No photo&#8217;s taken as of yet though, I really should have taken some at the start and all the way through as it would have been quite a good evolution slide show, but alas its too late now&#8230; we did run into a few issues though, the garage is still crammed full of stuff and there is not much room to move around in it so that has been slowing us down a lot, however there is nowhere else to put it so it has to be this way for now I&#8217;m afraid <img src='http://hackdev.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Another issue we&#8217;ve encountered was that the cavity blocks haven&#8217;t aged all that well and are quite hard, like flint even, so masonry nails havent been working out too well on that, so as a more expensive, and time consuming work-around, we have been using nail-anchors and manually drilling for each baton&#8230; not the most fun thing in the world, but at least its progress&#8230;</p>
<p>As a side note, from working out in the cold weather all week I seem to have gotten another cold <img src='http://hackdev.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/02/e1366-07-down/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Hate Webdesign</title>
		<link>http://hackdev.com/2010/02/i-hate-webdesign/</link>
		<comments>http://hackdev.com/2010/02/i-hate-webdesign/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 17:22:29 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=132</guid>
		<description><![CDATA[Did I mention lately that I hate webdesign? no? let me explain&#8230; While I am quite proficient at writing backend systems in PHP and mySQL, or even taking an existing design and twising it around, chopping it up and changing &#8230; <a href="http://hackdev.com/2010/02/i-hate-webdesign/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Did I mention lately that I hate webdesign? no? let me explain&#8230;</p>
<p>While I am quite proficient at writing backend systems in PHP and mySQL, or even taking an existing design and twising it around, chopping it up and changing things, I have no artistic taste when it comes to actually designing things. I have taken on a job for a client, and I now feel that I am out of my depth, it doesnt help that I have absolutely no specification what so ever, none, nada, ziltch&#8230; but even still, I should be able to come up with something suitable, but I cant, its just not coming to me&#8230; It&#8217;s not a particularly complex website, its basicly an online brochure for a catering company so I have settled on using the website baker CMS for doing all of the backend management, it doesnt really need anything more complex than that to do what it needs to do, however this means that 90% of the work to be done on this site is purely design, look and feel&#8230; and I hate it.</p>
<p>So far, my design consists of a solid, light coffee color background, some red (to slightly pinkish) text, and a white box with a border&#8230; really&#8230; is this the best I can do?</p>
]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/02/i-hate-webdesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To the Man Cave!</title>
		<link>http://hackdev.com/2010/01/to-the-man-cave/</link>
		<comments>http://hackdev.com/2010/01/to-the-man-cave/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 02:30:40 +0000</pubDate>
		<dc:creator>Gues7</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://hackdev.com/?p=120</guid>
		<description><![CDATA[UPDATED: Syntax Highlighting for code blocks. Purpose: A man cave is loosely a male-only space to retreat to, watch sports matches, or play video games. According to psychiatrist and author Scott Haltzman, it is important for a man to have a &#8230; <a href="http://hackdev.com/2010/01/to-the-man-cave/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em><span style="color: #c0c0c0;">UPDATED: Syntax Highlighting for code blocks.</span></em></p>
<p>Purpose: A man cave is loosely a male-only space to retreat to, watch sports matches, or play video games. According to psychiatrist and author Scott Haltzman, it is important for a man to have a place to call his own, referring to a male area to retreat to. Some psychologists claim that a man cave can provide refuge from stressful surroundings and be beneficial to marriage.</p>
<p style="text-align: right;">Via: <a href="http://en.wikipedia.org/wiki/Man_cave">Wikipedia</a></p>
<p style="text-align: left;">So I have committed myself to building one of these, at present, I have a 15&#8242; x 15&#8242; garage space, ready for the taking. I plan on turning the space into a male friendly (read: full of beer) area with a home cinema setup, a bar and some cool and interesting technology. To date, I already have the Projector &amp; Screen, some basic fittings, some decent insulation for the roof, 2x Wireless access points with which I will be building a P-T-P link, and lots of ideas&#8230;</p>
<p style="text-align: left;">One of the things that I want to do is to install an all LED lighting system composed of high output RGB LED&#8217;s &#8211; My idea for this is to use an I2C bus linking all of the LED modules with the info and the power over CAT5; as such, I have begun development. I bought some small 3W RGB LED&#8217;s from <a href="http://www.dealextreme.com/default.dx/r.79901961">Deal Extreme</a> for developing my proof of concept modules. My PoC so far is comprised of an Seeeduino Mega as the LED controller and unfortunately as I havent made as much progress with my BifferBoard as of yet, I&#8217;m currently using a Bus Pirate (v2go) for controlling the I2C bus, the protocol Im using is quite simple, you send the write address of the unit, a # character and then the hexadecimal RGB values, as such the full pallet of colors is available and can be looked up online or from the majority of graphics programs&#8230; There are a few points to consider for what you want to use as the LED Controller, if I beef up my C skills, I do intend on moving away from the Arduino plaform and migrating to a smaller lower specced Atmel or PIC uC &#8211; resulting in lower costs&#8230; the controller so far has a few features&#8230;</p>
<ul>
<li style="text-align: left;">The Default (Startup) Color is programmable from the I2C bus so if there is a power failure etc&#8230; the lights will return automatically to a known state.</li>
<li>The controller is bus configurable to be Common Cathode OR Common Anode</li>
<li>There is more to add here as I complete them, such as disco mode or fade mode, or pre-defined sequences&#8230;</li>
</ul>
<p>I have taken a photo of the test setup I have at present and will provide the sourcode below, I have also been working on a Processing application to play with the idea of doing something similar to the Phillips Ambilight tv where depending on the image on my screen, the lights in the mancave will be a particular color, while I will also post the code for this, its not commented, or pretty, or even working at this point so your on your own with it&#8230; I will update as time goes on&#8230; anyways, enough jibber jabber, time for some actuall images and real code&#8230;</p>
<p>General (Outdated)  Flowchart for the controller:</p>
<p><a href="http://hackdev.com/wp-content/uploads/2010/01/light_controller_flowchart.png"><img class="aligncenter size-medium wp-image-125" title="light_controller_flowchart" src="http://hackdev.com/wp-content/uploads/2010/01/light_controller_flowchart-300x294.png" alt="" width="300" height="294" /></a></p>
<p>Picture of the test setup&#8230;</p>
<p><a href="http://hackdev.com/wp-content/uploads/2010/01/P240110_01.47.jpg"><img class="aligncenter size-medium wp-image-124" title="P240110_01.47" src="http://hackdev.com/wp-content/uploads/2010/01/P240110_01.47-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>And as promised, here is the source for the Arduino:</p>
<p style="padding-left: 30px;">

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* 
&nbsp;
Arduino I2C RGB LED Controller
&nbsp;
EEPROM Map:
  0x00  configuration block
  0x01  red pwm value
  0x02  green pwm value
  0x03  blue pwm value
&nbsp;
*/</span>
&nbsp;
<span style="color: #339933;">#include</span>
<span style="color: #339933;">#include </span>
&nbsp;
<span style="color: #666666; font-style: italic;">//PIN Definitions</span>
<span style="color: #339933;">#define addr0      2</span>
<span style="color: #339933;">#define addr1      3</span>
<span style="color: #339933;">#define addr2      4</span>
<span style="color: #339933;">#define addr3      5</span>
<span style="color: #339933;">#define redPin     7</span>
<span style="color: #339933;">#define greenPin   8</span>
<span style="color: #339933;">#define bluePin    9</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Global Variables</span>
byte redPWM <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
byte greenPWM <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
byte bluePWM <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
byte configBlock <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
byte i2cAddress <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
byte i2cData<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">4</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
boolean processQueue <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #993333;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//Set PIN I/O's</span>
  pinMode<span style="color: #009900;">&#40;</span>redPin<span style="color: #339933;">,</span> OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  pinMode<span style="color: #009900;">&#40;</span>greenPin<span style="color: #339933;">,</span> OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  pinMode<span style="color: #009900;">&#40;</span>bluePin<span style="color: #339933;">,</span> OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  pinMode<span style="color: #009900;">&#40;</span>addr0<span style="color: #339933;">,</span> INPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  pinMode<span style="color: #009900;">&#40;</span>addr1<span style="color: #339933;">,</span> INPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  pinMode<span style="color: #009900;">&#40;</span>addr2<span style="color: #339933;">,</span> INPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  pinMode<span style="color: #009900;">&#40;</span>addr3<span style="color: #339933;">,</span> INPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//Enable internal pullups</span>
  digitalWrite<span style="color: #009900;">&#40;</span>addr0<span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  digitalWrite<span style="color: #009900;">&#40;</span>addr1<span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  digitalWrite<span style="color: #009900;">&#40;</span>addr2<span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  digitalWrite<span style="color: #009900;">&#40;</span>addr3<span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//Set I2C Address...</span>
  <span style="color: #666666; font-style: italic;">//i2cAddress = (digitalRead(addr0) | digitalRead(addr1) | digitalRead(addr2) | digitalRead(addr3));</span>
  i2cAddress <span style="color: #339933;">=</span> <span style="color: #0000dd;">7</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//Register an event to fire when we receive I2C data then join the bus...</span>
  Wire.<span style="color: #202020;">onReceive</span><span style="color: #009900;">&#40;</span>grabData<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  Wire.<span style="color: #202020;">begin</span><span style="color: #009900;">&#40;</span>i2cAddress<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//Grab previous settings from EEPROM...</span>
  configBlock <span style="color: #339933;">=</span> EEPROM.<span style="color: #202020;">read</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  redPWM <span style="color: #339933;">=</span> EEPROM.<span style="color: #202020;">read</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  greenPWM <span style="color: #339933;">=</span> EEPROM.<span style="color: #202020;">read</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  bluePWM <span style="color: #339933;">=</span> EEPROM.<span style="color: #202020;">read</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//Set the PWM outputs for the LED(s)</span>
  setPWM<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">//I think we're ready to enter the main loop now...</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> grabData<span style="color: #009900;">&#40;</span><span style="color: #993333;">int</span> data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #993333;">int</span> i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>Wire.<span style="color: #202020;">available</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     i2cData<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> Wire.<span style="color: #202020;">receive</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     i<span style="color: #339933;">++;</span>
  <span style="color: #009900;">&#125;</span>
  processQueue <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> setPWM<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>configBlock <span style="color: #339933;">==</span> <span style="color: #ff0000;">'A'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    analogWrite<span style="color: #009900;">&#40;</span>redPin<span style="color: #339933;">,</span> <span style="color: #0000dd;">255</span> <span style="color: #339933;">-</span> redPWM<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    analogWrite<span style="color: #009900;">&#40;</span>greenPin<span style="color: #339933;">,</span> <span style="color: #0000dd;">255</span> <span style="color: #339933;">-</span> greenPWM<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    analogWrite<span style="color: #009900;">&#40;</span>bluePin<span style="color: #339933;">,</span> <span style="color: #0000dd;">255</span> <span style="color: #339933;">-</span> bluePWM<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    analogWrite<span style="color: #009900;">&#40;</span>redPin<span style="color: #339933;">,</span> redPWM<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    analogWrite<span style="color: #009900;">&#40;</span>greenPin<span style="color: #339933;">,</span> greenPWM<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    analogWrite<span style="color: #009900;">&#40;</span>bluePin<span style="color: #339933;">,</span> bluePWM<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> updateEEPROM<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  EEPROM.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> configBlock<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  EEPROM.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> redPWM<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  EEPROM.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">2</span><span style="color: #339933;">,</span> bluePWM<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  EEPROM.<span style="color: #202020;">write</span><span style="color: #009900;">&#40;</span><span style="color: #0000dd;">3</span><span style="color: #339933;">,</span> greenPWM<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #993333;">void</span> loop<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #666666; font-style: italic;">//Check to see if we have something to do...</span>
  <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>processQueue <span style="color: #339933;">==</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">//Do nothing... but do it quickly!</span>
    delay<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #b1b100;">switch</span><span style="color: #009900;">&#40;</span>i2cData<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'#'</span><span style="color: #339933;">:</span>
      <span style="color: #666666; font-style: italic;">//we have a color</span>
      redPWM <span style="color: #339933;">=</span> i2cData<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
      greenPWM <span style="color: #339933;">=</span> i2cData<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
      bluePWM <span style="color: #339933;">=</span> i2cData<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
      setPWM<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'D'</span><span style="color: #339933;">:</span>
      <span style="color: #666666; font-style: italic;">//We're setting the default startup color...</span>
      redPWM <span style="color: #339933;">=</span> i2cData<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
      greenPWM <span style="color: #339933;">=</span> i2cData<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
      bluePWM <span style="color: #339933;">=</span> i2cData<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
      updateEEPROM<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      setPWM<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">case</span> <span style="color: #ff0000;">'C'</span><span style="color: #339933;">:</span>
      <span style="color: #666666; font-style: italic;">//we're changing the LED type</span>
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>i2cData<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #ff0000;">'A'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        configBlock <span style="color: #339933;">=</span> <span style="color: #ff0000;">'A'</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
        configBlock <span style="color: #339933;">=</span> <span style="color: #ff0000;">'C'</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
      updateEEPROM<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>
      <span style="color: #666666; font-style: italic;">//do nothing...</span>
      <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  processQueue <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And here is the source for Processing:</p>
<p style="padding-left: 30px;">

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">processing.serial.*</span><span style="color: #339933;">;</span>
&nbsp;
PImage myImage<span style="color: #339933;">;</span>
Serial myPort<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> redpx<span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> greenpx<span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> bluepx<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">float</span> redtotal<span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">float</span> greentotal<span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">float</span> bluetotal<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">int</span> imgWidth<span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> imgHeight<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">void</span> setup<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">//println(Serial.list());</span>
    myPort <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Serial<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, <span style="color: #0000ff;">&quot;COM13&quot;</span>, <span style="color: #cc66cc;">115200</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    myImage <span style="color: #339933;">=</span> loadImage<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;red.jpg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    myImage.<span style="color: #006633;">loadPixels</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    redpx <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#91;</span>myImage.<span style="color: #006633;">pixels</span>.<span style="color: #006633;">length</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    greenpx <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#91;</span>myImage.<span style="color: #006633;">pixels</span>.<span style="color: #006633;">length</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    bluepx <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">float</span><span style="color: #009900;">&#91;</span>myImage.<span style="color: #006633;">pixels</span>.<span style="color: #006633;">length</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">16</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span> 0xFF<span style="color: #339933;">;</span>
        greenpx<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> myImage.<span style="color: #006633;">pixels</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">8</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span> 0xFF<span style="color: #339933;">;</span>
        bluepx<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> myImage.<span style="color: #006633;">pixels</span><span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;</span> 0xFF<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> r<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> r <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> redpx.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> r<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        redtotal <span style="color: #339933;">+=</span> redpx<span style="color: #009900;">&#91;</span>r<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    redtotal <span style="color: #339933;">=</span> redtotal <span style="color: #339933;">/</span> redpx.<span style="color: #006633;">length</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> g<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> g <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> greenpx.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> g<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        greentotal <span style="color: #339933;">+=</span> greenpx<span style="color: #009900;">&#91;</span>g<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    greentotal <span style="color: #339933;">=</span> greentotal <span style="color: #339933;">/</span> greenpx.<span style="color: #006633;">length</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> b<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> b <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> bluepx.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> b<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        bluetotal <span style="color: #339933;">+=</span> bluepx<span style="color: #009900;">&#91;</span>b<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    bluetotal <span style="color: #339933;">=</span> bluetotal <span style="color: #339933;">/</span> bluepx.<span style="color: #006633;">length</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">int</span> serialData<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> <span style="color: #cc66cc;">91</span>, <span style="color: #cc66cc;">32</span>, <span style="color: #cc66cc;">48</span>, <span style="color: #cc66cc;">120</span>, <span style="color: #cc66cc;">48</span>, <span style="color: #cc66cc;">69</span>, <span style="color: #cc66cc;">32</span>, <span style="color: #cc66cc;">48</span>, <span style="color: #cc66cc;">120</span>, <span style="color: #cc66cc;">50</span>, <span style="color: #cc66cc;">51</span>, <span style="color: #cc66cc;">32</span>, floor<span style="color: #009900;">&#40;</span>redtotal<span style="color: #009900;">&#41;</span>, <span style="color: #cc66cc;">32</span>, floor<span style="color: #009900;">&#40;</span>greentotal<span style="color: #009900;">&#41;</span>, <span style="color: #cc66cc;">32</span>, floor<span style="color: #009900;">&#40;</span>bluetotal<span style="color: #009900;">&#41;</span>, <span style="color: #cc66cc;">32</span>, <span style="color: #cc66cc;">93</span>, <span style="color: #cc66cc;">13</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>      <span style="color: #666666; font-style: italic;">//used for i2c control through a bus pirate</span>
    <span style="color: #666666; font-style: italic;">//int serialData[] = { 'R', floor(redtotal), 'G', floor(greentotal), 'B', floor(bluetotal), 'C', 'A', 'U' };      //used for serial control through rs232</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> j<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> j <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       <span style="color: #003399;">String</span> inBuffer <span style="color: #339933;">=</span> myPort.<span style="color: #006633;">readString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>inBuffer <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        println<span style="color: #009900;">&#40;</span>inBuffer<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
       <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    myImage.<span style="color: #006633;">updatePixels</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://hackdev.com/2010/01/to-the-man-cave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

