<?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"
	>

<channel>
	<title>The Junk In My Trunk</title>
	<atom:link href="http://www.anthonypetty.com/personal/wp/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.anthonypetty.com/personal/wp</link>
	<description>Interesting... but what does it do?</description>
	<pubDate>Fri, 27 Feb 2009 02:54:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>LEGOs have always been my fav&#8230;</title>
		<link>http://www.anthonypetty.com/personal/wp/?p=68</link>
		<comments>http://www.anthonypetty.com/personal/wp/?p=68#comments</comments>
		<pubDate>Fri, 27 Feb 2009 02:54:33 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.anthonypetty.com/personal/wp/?p=68</guid>
		<description><![CDATA[I wish I had a business card like this.
]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="lego business card" src="http://blog.wired.com/geekdad/images/2009/02/25/lego_card.jpg" alt="" width="300" height="200" />I wish I had a business card like <a href="http://blog.wired.com/geekdad/2009/02/lego-business-c.html">this</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonypetty.com/personal/wp/?feed=rss2&amp;p=68</wfw:commentRss>
		</item>
		<item>
		<title>Need a Zen-Cart Customization, PHP, or Flex Programmer?</title>
		<link>http://www.anthonypetty.com/personal/wp/?p=47</link>
		<comments>http://www.anthonypetty.com/personal/wp/?p=47#comments</comments>
		<pubDate>Mon, 19 Jan 2009 14:01:47 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.anthonypetty.com/personal/wp/?p=47</guid>
		<description><![CDATA[Update 20090225: I am no longer offering these services.  Yeah!
]]></description>
			<content:encoded><![CDATA[<p>Update 20090225: I am no longer offering these services. <img src='http://www.anthonypetty.com/personal/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> Yeah!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonypetty.com/personal/wp/?feed=rss2&amp;p=47</wfw:commentRss>
		</item>
		<item>
		<title>Debian Etch on ThinkPad T20 T21 T22 with cs46xx sound card and custom kernel</title>
		<link>http://www.anthonypetty.com/personal/wp/?p=43</link>
		<comments>http://www.anthonypetty.com/personal/wp/?p=43#comments</comments>
		<pubDate>Mon, 19 Jan 2009 01:33:34 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.anthonypetty.com/personal/wp/?p=43</guid>
		<description><![CDATA[So I&#8217;ve been trying to put Debian Etch on my Thinkpad T20 that I have. It doesn&#8217;t have an LCD screen, so I am going to use it as an mp3 &#8220;server&#8221; type of computer - possibly for my car. It&#8217;s been quite a process. My first problem was that my particular Thinkpad didn&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been trying to put Debian Etch on my Thinkpad T20 that I have. It doesn&#8217;t have an LCD screen, so I am going to use it as an mp3 &#8220;server&#8221; type of computer - possibly for my car. It&#8217;s been quite a process. My first problem was that my particular Thinkpad didn&#8217;t have on board lan, so the net install cd that I was using couldn&#8217;t get an Internet connection. I thought this was going to be a problem, but after some experimentation it turned out to be a good thing (Debian has some issues with PCMCIA wireless card drivers getting an IP address correctly from a DHCP server I guess).</p>
<p>I had some network card issues with a PCMCIA wireless network card that I have, but I figure those issues aren&#8217;t related to the ThinkPad, so I&#8217;ll leave them off of this post.</p>
<p>Instead, I&#8217;ll talk about the sound card that the T20 has. (This also applies to the T21 and T22 I believe.) The Thinkpad T20 has a Cirrus Logic sound card that uses the cs46xx module. This module is built into all new linux kernels - except one tiny catch: Debian&#8217;s kernels don&#8217;t have it enabled (I believe for license reasons). This also means that even if you try to compile an ALSA module for it, it wont work - it will say that your kernel has ALSA support built in already. So - you have to recompile the kernel and enable this specific module to get it working. That really sucks - I know. But, I&#8217;ve already done the work for you - and here are the debian packages:</p>
<p><a href="../linux/linux-image-2.6.24.1-etchnhalfwithcs46xx_2.6.24.1-etchnhalfwithcs46xx-10.00.Custom_i386.deb">Linux Kernel Image File - 2.6.24.1-etchnhalfwithcs46xx (deb)</a><br />
<a href="../linux/linux-headers-2.6.24.1-etchnhalfwithcs46xx_2.6.24.1-etchnhalfwithcs46xx-10.00.Custom_i386.deb">Linux Kernel Header File - 2.6.24.1-etchnhalfwithcs46xx (deb)</a></p>
<p>To install these files, simply copy them to your /usr/src/linux directory and then run the following commands as root:</p>
<p>dpkg -i (image file name)<br />
dpkg -i (header file name)</p>
<p>Then simply reboot and your new kernel will be installed and selected as default in Grub - and you&#8217;ll have sound (you&#8217;ll also need ALSA installed of course).</p>
<p>Please don&#8217;t post linux questions in the comments, as I am fairly new to linux my self and I wont be able to help you. But this is my solution for getting sound to work on a ThinkPad T20 with Debian Etch - results that took me many hours of work to figure out. I hope it helps someone out - even though the T20 is SUPER old!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonypetty.com/personal/wp/?feed=rss2&amp;p=43</wfw:commentRss>
		</item>
		<item>
		<title>Flex Browser Manager, URLUtils, and modules.</title>
		<link>http://www.anthonypetty.com/personal/wp/?p=41</link>
		<comments>http://www.anthonypetty.com/personal/wp/?p=41#comments</comments>
		<pubDate>Sat, 10 Jan 2009 00:08:46 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.anthonypetty.com/personal/wp/?p=41</guid>
		<description><![CDATA[My recent experience with the Flex Browser Manager and the URLUtils class and modules has been a long and anoying one&#8230; but I think I almost have it!
I know now that part of my troubles is the way my application is written - not poorly, but it makes passing url variables to modules complex as [...]]]></description>
			<content:encoded><![CDATA[<p>My recent experience with the Flex Browser Manager and the URLUtils class and modules has been a long and anoying one&#8230; but I think I almost have it!</p>
<p>I know now that part of my troubles is the way my application is written - not poorly, but it makes passing url variables to modules complex as they load at different times.</p>
<p>Here is what happens:<br />
The main application loads and parses the url from the browser. It then deals with any passed variables. At the same time, it gets a list of modules to load from the back end, and then loads them. Unfortunately, this process takes about 500ms to 1000ms longer - so I have all of this data, and no modules loaded to pass it to.</p>
<p>That in it self, is not a problem. I can just cache the data. But my data cache waits for the modules to load, then then sends the data. Well - after the modules load, then they load their own data from each other. So, by the time they are actually ready for the url variables, it&#8217;s already been sent and failed because they were not ready when it was sent.</p>
<p>I don&#8217;t have an easy solution for this - I could rewrite lots of code to make it work differently, but I think that this is a poor reason to rewrite the code. I can&#8217;t think of many other reasons to rewrite the code this way, so I think that it might be easier to find a hack for the url variables instead of rewritting hundreds of lines of code to work with them.</p>
<p>So, my solution has been to not parse the url when the main application starts. Instead, I wait for the modules to load, and then I parse the url. This way, I only have to cache the data for a few seconds at most, and all is well.</p>
<p>Also, since I have many modules that might or might not be loaded, each with their own information that needs to be in the url, I needed a uniform way to put these variables in the url. So I came up with the following standard:</p>
<p>http://www.site.com/application.html#ModuleName1=(data.data.data);ModuleName2=(data.data.data);</p>
<p>I use the ModuleName=(); part to seperate out each modules data. The URLUtils class has a String to Object function (strToObject I think) that can easily parse a string into an object. It uses the ; character by default, so that seemed good enough to me to use. So it would parse the url above into the following object:</p>
<p>{&#8221;ModuleName1&#8243;:&#8221;(data.data.data)&#8221;, &#8220;ModuleName2&#8243;:&#8221;(data.data.data)&#8221;}</p>
<p>So, then I wrote a simple function to parse that object into an array that I pass to each module. It parses the string &#8220;(data.data.data)&#8221; and puts each data chunk into an array element. So this array is what gets passed to each module:</p>
<p>["data", "data", "data"]</p>
<p>The functions in my main application take it no further then thata. Each data chunk can be ANY url encoded characters. (Although I haven&#8217;t written the code to url encode and decode them yet, I still have to do that.) So it is up to the modules to specify a data format that they can handle for their data chunks. Since I am the only developer, I decided to make all of my modules parse the following data chunk standard:</p>
<p>[adata, adata, bdata, bdata, bdata, cdata]</p>
<p>What that means is each data chunk starts with a single letter. This is to so that I can simply write a switch block to look for the first letter and deal with the data that way. As I said above, this isn&#8217;t needed, and each module can do whatever it wants - but this is the way I do it just to make it easier for my self.</p>
<p>So, here is an real example of a url that my application uses:</p>
<p>http://www.site.com/mainapplication.html#SearchTools=(a16.a17.o17);MediaPlayer=(s16.t3);</p>
<p>Here is what that url means:</p>
<p>The SearchTools module gets three data chunks - a16, a17, and 017. This tells it to set three search categories - two add categories and one only category. I&#8217;ll explain that is a later post.</p>
<p>The MediaPlayer module gets two data chunks - s16 and t3. This tells it to load song 16 and track 3.</p>
<p>I could also pass the MainApplication data in this same format.</p>
<p>So there you have it - a somewhat simple url format that an application can use to send data to it&#8217;s modules.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonypetty.com/personal/wp/?feed=rss2&amp;p=41</wfw:commentRss>
		</item>
		<item>
		<title>Arkansas or bust.</title>
		<link>http://www.anthonypetty.com/personal/wp/?p=39</link>
		<comments>http://www.anthonypetty.com/personal/wp/?p=39#comments</comments>
		<pubDate>Thu, 11 Dec 2008 16:08:09 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.anthonypetty.com/personal/wp/?p=39</guid>
		<description><![CDATA[On Friday of last week my dad came over. He got to our house at around 8:30pm. We left for Arkansas around 7am the next morning. His van didn&#8217;t have any heat, and it was freezing in Michigan. Over the night, we got some serious snow. It was a stressful start to our week.
We finnally [...]]]></description>
			<content:encoded><![CDATA[<p>On Friday of last week my dad came over. He got to our house at around 8:30pm. We left for Arkansas around 7am the next morning. His van didn&#8217;t have any heat, and it was freezing in Michigan. Over the night, we got some serious snow. It was a stressful start to our week.</p>
<p>We finnally got to my grandparents house 18 hours later. A trip that was supposed to take no more then 14 hours, took 4 hours longer then that because of snow, snow, snow, and more snow. I hate snow.</p>
<p>And right away it was obvious that this was going to be a long week. I never realized this before, but my grandparents are hard to get a long with! It&#8217;s not that they are bad people - they are great people. It&#8217;s just that they come from a totally different generation then we do. And it isn&#8217;t even just that, it&#8217;s that they come from a totally differet part of the country then we do - which makes everything from our political views, to our religious views, to our eating habbits different.</p>
<p>It is Thursday now, and most of the week is over. I THINK we are going to leave tomorrow to head back to Michigan. We are going to make it a two day trip this time and spend the night somewhere along the way.</p>
<p>But as the week goes on, things have gotten better. we are all getting along, and possibily even having a little fun. Lets hope the rest of the week continues to get better!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonypetty.com/personal/wp/?feed=rss2&amp;p=39</wfw:commentRss>
		</item>
		<item>
		<title>Installing Flex Builder Linux on OpenSUSE 11</title>
		<link>http://www.anthonypetty.com/personal/wp/?p=35</link>
		<comments>http://www.anthonypetty.com/personal/wp/?p=35#comments</comments>
		<pubDate>Thu, 04 Dec 2008 15:06:10 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.anthonypetty.com/personal/wp/?p=35</guid>
		<description><![CDATA[For all five of us Flex developers out there running OpenSUSE 11, here is how I figured out how to install the new Flex Builder Linux alpha 4:

Install Eclipse (if that link doesn&#8217;t work, just search &#8220;eclipse&#8221; here)
Download Flex Builder Linux alpha 4 (if that link doesn&#8217;t work, just go here to find it)
Open a [...]]]></description>
			<content:encoded><![CDATA[<p>For all five of us Flex developers out there running OpenSUSE 11, here is how I figured out how to install the new Flex Builder Linux alpha 4:</p>
<ul>
<li><a href="http://api.opensuse-community.org/searchservice//YMPs/openSUSE_110/6910b7db2df89cb0698498296e364ce0e3b55ee6">Install Eclipse</a> (if that link doesn&#8217;t work, just search &#8220;eclipse&#8221; <a href="http://packages.opensuse-community.org/">here</a>)</li>
<li><a href="http://labs.adobe.com/downloads/flexbuilder_linux.html">Download Flex Builder Linux alpha 4</a> (if that link doesn&#8217;t work, just go <a href="http://labs.adobe.com/technologies/flex/flexbuilder_linux/">here</a> to find it)</li>
<li>Open a terminal window and su to root</li>
<li>Run this command (replacing the file path with the right one):
<pre language="sh">sh flexbuilder_linux_install_a4_081408.bin</pre>
</li>
<li>When prompted, specify /home/username/Adobe_flex_builder as the install location.</li>
<li>When prompted, specify /usr/share/eclipse as the eclipse folder.</li>
<li>When prompted, Install debug version of flash, not other option.</li>
<li>When done installing, exit root, and close the terminal window.</li>
<li>Open Eclipse and go to help &gt; software updates &gt; manage configuration.</li>
<li>Right click in the left pane and click Add &gt; Extension Location</li>
<li>Specify the /home/username/Adobe_flex_builder directory and restart eclipse.</li>
<li>Switch your workspace (it can be the same one).</li>
<li>(optional?) Go to Window &gt; Open Perspective and select Flex Development.</li>
</ul>
<p>This is what I had to do to get it working. (Adobe&#8217;s install instructions were less then helpful.) I hope it helps you too! And obviously, these directions might change as new versions of Flex Builder Linux are released.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonypetty.com/personal/wp/?feed=rss2&amp;p=35</wfw:commentRss>
		</item>
		<item>
		<title>Deep Linking</title>
		<link>http://www.anthonypetty.com/personal/wp/?p=29</link>
		<comments>http://www.anthonypetty.com/personal/wp/?p=29#comments</comments>
		<pubDate>Tue, 25 Nov 2008 04:11:38 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.anthonypetty.com/personal/wp/?p=29</guid>
		<description><![CDATA[I think the Adobe Flex developers invented the term &#8220;deep linking&#8221; just so they could sound a little dirty when talking about it. Unfortunately what it really is, is far less interesteing then what it sounds like.
Deep linking is what Flex 3 uses to replace the History Manager used in Flex 2. I&#8217;m sure this [...]]]></description>
			<content:encoded><![CDATA[<p>I think the Adobe Flex developers invented the term &#8220;deep linking&#8221; just so they could sound a little dirty when talking about it. Unfortunately what it really is, is far less interesteing then what it sounds like.</p>
<p>Deep linking is what Flex 3 uses to replace the History Manager used in Flex 2. I&#8217;m sure this isn&#8217;t your first time hearing about it, as it&#8217;s not a new concept. But I needed to use it for the new Stock20 site, so I had to figure out how it works, when it does work, and how to use it.</p>
<p>I first started developing with it on a computer using Firefox, and it worked great. Then I switched to my other computer which uses Opera and it suddenly stopped working. This took me diving into the documentation to find out why. I knew that the documentation said it only worked with IE, Firefox, and Safari, but I figured that was a general assumption and that most modern browsers would work. I had to do some searching on ther internet, and then I found an article on Adobe labs that states that it does not work with Opera. I was surprised, but none the less, I found the answer to my problem.</p>
<p>So, not only did I have to setup deep linking, but I also had (have) to set up a browser detection script to warn any potential Opera users that their browser isn&#8217;t going to work with our site - at least no the way it&#8217;s supposed to. Maybe some day in the future Adobe will fix this anoying bug (or Opera will), but for now I guess we&#8217;ll only support the major three browsers.</p>
<p>If I was designing a site for a larger company I think I would be a little more worried, but since absolutly zero percent of Stock20&#8217;s customers use Opera, I&#8217;m not worried at all.</p>
<p>Anyway&#8230;. to use deep linking, you have to use Flex&#8217;s BrowserManager and IBrowserManager.<br />
You&#8217;ll need the following:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3 actionscript3" style="font-family:monospace;">	        <span style="color: #0033ff; font-weight: bold;">import</span> mx.events.BrowserChangeEvent;
	        <span style="color: #0033ff; font-weight: bold;">import</span> mx.managers.IBrowserManager;
	        <span style="color: #0033ff; font-weight: bold;">import</span> mx.managers.BrowserManager;
	        <span style="color: #0033ff; font-weight: bold;">import</span> mx.utils.URLUtil;
	        <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> browserManager<span style="color: #000000; font-weight: bold;">:</span>IBrowserManager;</pre></div></div>

<p>And then, in your applicationComplete event handler function:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3 actionscript3" style="font-family:monospace;">				browserManager = BrowserManager.getInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
				browserManager.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>BrowserChangeEvent.BROWSER_URL_CHANGE, parseURL<span style="color: #000000;">&#41;</span>;
				browserManager.<span style="color: #004993;">init</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;&quot;</span>, <span style="color: #990000;">&quot;www.Stock20.com&quot;</span><span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>And here is my custom parseUrl function:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3 actionscript3" style="font-family:monospace;">            <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> parseURL<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span> = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><span style="color: #000000;">&#123;</span>
            	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>browserManager.fragment <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #990000;">&quot;&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
	            	<span style="color: #6699cc; font-weight: bold;">var</span> urlObject<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Object</span> = URLUtil.stringToObject<span style="color: #000000;">&#40;</span>browserManager.fragment<span style="color: #000000;">&#41;</span>;
	            	<span style="color: #6699cc; font-weight: bold;">var</span> tmpString<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span>;
	            	<span style="color: #6699cc; font-weight: bold;">var</span> tmpArray<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span>;
	            	<span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">int</span>;
	            	<span style="color: #6699cc; font-weight: bold;">var</span> tmpModuleName<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span>;
	            	<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> key<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> <span style="color: #0033ff; font-weight: bold;">in</span> urlObject<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
	            		tmpString = urlObject<span style="color: #000000;">&#91;</span>key<span style="color: #000000;">&#93;</span>.<span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	            		<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>tmpString.<span style="color: #004993;">substr</span><span style="color: #000000;">&#40;</span>0, <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> == <span style="color: #990000;">&quot;(&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> tmpString.<span style="color: #004993;">substr</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span>, <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> == <span style="color: #990000;">&quot;)&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
	            			tmpString = tmpString.<span style="color: #004993;">slice</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1</span>, <span style="color: #000000; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span>;
	            			tmpArray = tmpString.<span style="color: #004993;">split</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;.&quot;</span><span style="color: #000000;">&#41;</span>;
	            			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span>i = 0; i <span style="color: #000000; font-weight: bold;">&lt;</span> tmpArray.<span style="color: #004993;">length</span>; i<span style="color: #000000; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
	            				<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>key.<span style="color: #004993;">toLowerCase</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> == <span style="color: #990000;">&quot;mainapplication&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
	            					handleUrlVariables<span style="color: #000000;">&#40;</span>tmpArray<span style="color: #000000;">&#41;</span>;
	            				<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
		            				tmpModuleName = findModuleNameFromString<span style="color: #000000;">&#40;</span>key<span style="color: #000000;">&#41;</span>;
		            				<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>tmpModuleName <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #990000;">&quot;&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
		            					sendModuleData<span style="color: #000000;">&#40;</span>tmpModuleName, <span style="color: #990000;">&quot;urlVariables&quot;</span>, <span style="color: #000000;">&#123;</span><span style="color: #990000;">&quot;urlVariables&quot;</span><span style="color: #000000; font-weight: bold;">:</span>tmpArray<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span>;
		            				<span style="color: #000000;">&#125;</span>
	            				<span style="color: #000000;">&#125;</span>
	            			<span style="color: #000000;">&#125;</span>
	            		<span style="color: #000000;">&#125;</span>
	            	<span style="color: #000000;">&#125;</span>
            	<span style="color: #000000;">&#125;</span>
            <span style="color: #000000;">&#125;</span></pre></div></div>

<p>Everything is fairly straight forward here (especially if you read the documentation), but I&#8217;ll explain how my custom parseUrl function works&#8230;</p>
<p>It first uses the URLUtil class to convert the url fragment into an object. Then it loops through that object and looks for an opening and closing () in the value of each key. If it finds one, it then splits the returned string into an array and then sends that array of values to one of the modules.</p>
<p>Obviously you probably wouldn&#8217;t want this type of url parsing in your application, but since my application uses modules, I had to devise a way to specify which module was to get which parts of the url. So I came up with this syntax:<br />
modulename=(data.data.data);modulename=(data.data.data)<br />
The modulename is obviously the name of the module. The data.data.data is any number of urlencoded text, each seperated with a period. You can seperate multiple module&#8217;s data with a semi-colon. </p>
<p>It may sound complex, but in reality, it&#8217;s very simple. If I need to pass data on the url to a specific module, I just write the module name, followed by it&#8217;s data, and since I can support upto 2000 characters in a url, I can store a fairly good amount of information.</p>
<p>What I plan to do with this is allow a user to bookmark a page, or copy a url and give it to a friend. This will allow for saved search results, and to come back to a specific song and track in our application.</p>
<p>Here is an example url fragment and what it would do in my application:<br />
#searchtools=(a16.a17.o18.o20);mediaplayer=(s16.t411)<br />
This url fragment sends data to both the SearchTools and the MediaPlayer. The SearchTools get the 4 selected categories, and the MediaPlayer gets the current song id and track id.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonypetty.com/personal/wp/?feed=rss2&amp;p=29</wfw:commentRss>
		</item>
		<item>
		<title>Punched Out!</title>
		<link>http://www.anthonypetty.com/personal/wp/?p=27</link>
		<comments>http://www.anthonypetty.com/personal/wp/?p=27#comments</comments>
		<pubDate>Mon, 17 Nov 2008 20:45:26 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.anthonypetty.com/personal/wp/?p=27</guid>
		<description><![CDATA[Well, today I had a punch biopsy. I thought that the actual procedure was going to the scary part, but it turns out that my pregnant wife passing out and landing on the floor right as they cut me was the really scary part!
I thought the procedure was going to hurt, but they numbed it [...]]]></description>
			<content:encoded><![CDATA[<p>Well, today I had a punch biopsy. I thought that the actual procedure was going to the scary part, but it turns out that my pregnant wife passing out and landing on the floor right as they cut me was the really scary part!</p>
<p>I thought the procedure was going to hurt, but they numbed it completly and I didn&#8217;t feel a thing. It was almost fun actually. But Tara passed our right as they started cutting me, so I was on the table bleeding and my poor wife was on the floor and there wasn&#8217;t much I could do to help her. I tried to catch her as she fell, but I wasn&#8217;t in a position where I could. But she woke up right away, and the doctor wasn&#8217;t worried. We also called her mid-wife and she wasn&#8217;t concerned either. So I guess we are in the clear - but it was an experience we will probably remember for a long time!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonypetty.com/personal/wp/?feed=rss2&amp;p=27</wfw:commentRss>
		</item>
		<item>
		<title>New Wallpaper - openSUSE 11 with 3d desktop effects</title>
		<link>http://www.anthonypetty.com/personal/wp/?p=21</link>
		<comments>http://www.anthonypetty.com/personal/wp/?p=21#comments</comments>
		<pubDate>Mon, 17 Nov 2008 15:16:53 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.anthonypetty.com/personal/wp/?p=21</guid>
		<description><![CDATA[
I am the kind of person who is minimalistic. For the majority of the past 11 years, I&#8217;ve had nothing but a black desktop, with no wall paper, no desktop effects, and everything functional. I had two reasons for this: 1) It was fast and didn&#8217;t slow my computer down. 2) It was easy on [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_20" class="wp-caption alignleft" style="width: 306px"><a href="http://www.anthonypetty.com/personal/wp/wp-content/uploads/2008/11/screenshot.jpg"><img class="size-thumbnail wp-image-20" title="screenshot" src="http://www.anthonypetty.com/personal/wp/wp-content/uploads/2008/11/screenshot-150x150.jpg" alt="screen shot of opensuse 11 with 3d desktop effects, linux terminal in desktop, and 3d wallpaper" width="296" height="150" /></a><p class="wp-caption-text">screen shot of opensuse 11 with 3d desktop effects, linux terminal in desktop, and 3d wallpaper</p></div>
<p>I am the kind of person who is minimalistic. For the majority of the past 11 years, I&#8217;ve had nothing but a black desktop, with no wall paper, no desktop effects, and everything functional. I had two reasons for this: 1) It was fast and didn&#8217;t slow my computer down. 2) It was easy on the eyes - easy to find a white mouse on a black desktop. (I&#8217;m visually impaired.)</p>
<p>But since I&#8217;ve installed OpenSUSE 11 on my computer and enabled 3d Desktop Effects, my computer has actually been MORE functional, not less. And it still runs even processor intensive applications very easily without slowing down. So I thought it was high time for me to break the black and take the plunge into a graphical desktop wallpaper. But I&#8217;ve never liked anything I&#8217;ve ever found on the internet, and finding a premade wallpaper that fits my dual monitor setup without stretching is slim pickings.</p>
<p>So, I made my own. This is a simple black background with a dark gray gradient and the OpenSUSE logo with a drop shadown. It doesn&#8217;t look like much in the picture becuase you are probably viewing it on a single monitor, but if viewed on a dual monitor setup like I have, it looks great because the logo is on the bottom left corner of the right monitor.</p>
<p>Also, I have 3d desktop effects enabled. You can&#8217;t see them here, but I have 3d cube with 6 virtual desktops, a zoomed out mirrored image of all 6 virtual desktops if you move your mouse to the top left corner of the screen, and a card deck view of all open windows accecable with a keyboard shortcut.</p>
<p>What you can see here is my terminal window that is &#8220;embedded&#8221; in my desktop on my right monitor. Again, it looks silly in this screenshot, but on a dual monitor setup, it looks great and makes a lot of sense. Also, it appears on all 6 of my virtual desktops. I put embedded in quotes because technically it&#8217;s not embedded, it just appears to be. I&#8217;m using compiz to make the window appear that way.</p>
<p>Over all this setup is extreamly functional, and also visually pleasing. Thus my reason for sharing it.</p>
<p>I also have to use <a href="http://www.getharvest.com" target="_blank">Harvest</a> for work, so I&#8217;m in the process of setting up a script to use conky and some icons to keep my harvest timesheet right on my desktop. I&#8217;ll update that if I get it working. (Right now, harvet&#8217;s api isn&#8217;t working right.)</p>
<p>Oh, and I&#8217;ve also written a custom cron script to check my gmail account every 5 minutes and display a little popup notification on my screen if I get new email. I think gmail has a notifier for linux now, but I wanted to write my own so I could customize how it works. It stays on the screen until I click it so that I notice it. (I have limited periferal vision, so I don&#8217;t always notice it right away.)</p>
<p>UPDATE:<br />
I just found out that harvest doesn&#8217;t allow api access with their free accounts (I have a free account because that is all I need). So, the harvest thing wont be happening I guess. Too bad. <img src='http://www.anthonypetty.com/personal/wp/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonypetty.com/personal/wp/?feed=rss2&amp;p=21</wfw:commentRss>
		</item>
		<item>
		<title>Building a Flex web application with a PHP backend</title>
		<link>http://www.anthonypetty.com/personal/wp/?p=18</link>
		<comments>http://www.anthonypetty.com/personal/wp/?p=18#comments</comments>
		<pubDate>Sat, 15 Nov 2008 03:16:01 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
		
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.anthonypetty.com/personal/wp/?p=18</guid>
		<description><![CDATA[I&#8217;ve been wanting to explain how I&#8217;m building the new Stock20 site. So this post is about that.
My idea for the new stock20 site is a very fast, user friendly site that not only looks good, but is incredibly easy to use and extremely good at what it does: find music.
I built the current Stock20.com [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wanting to explain how I&#8217;m building the new Stock20 site. So this post is about that.</p>
<p>My idea for the new stock20 site is a very fast, user friendly site that not only looks good, but is incredibly easy to use and extremely good at what it does: find music.</p>
<p>I built the current Stock20.com from zen-cart and customized it with flex components and php modules to work as a music store. And it does. Customers love it. The owner loves it. It works. But it has it&#8217;s problems. I wont go into most of them here, but one of it&#8217;s major problems is how hard it is to manage. It requires a full time web developer to keep it urning, and that is not a feasible solution for the future. So, in comes the new stock20 site.</p>
<p>It has been designed to fix most, if not all, of Stock20&#8217;s current problems. Most of them are dull and boring, but the few major ones are worth a few paragraphs.</p>
<p>My basic idea for the new site is a flex front end. The site should never have to &#8220;change states&#8221;, and it should be a stateless application. Taking that concept further, and using my extensive knowledge of PHP, it only made sense to use PHP for our back end operations. The site as a whole uses a MVC architecture. The model being the database back end. The view being the flex front end. The controller being the php back end.</p>
<p>The php back end is built using WebORB so that it can communicate to flex. It also uses the PEAR MDB2 database abstraction layer. Because php is not tied to any one server (like asp or coldfusion), and coupled with the MDB2 database abstraction layer, this allows the site to run on any server, with any operating system (that php runs on, of course). So other then a few os specific shell scripts, the whole site can run on any server and is therefore, very portable. The MDB2 database abstraction layer supports several databases, including MySQL and MSSQL, and I don&#8217;t have to rewrite any code - it just works. Very cool. The php back end is built using a module system that allows most pieces to be changed (or even totally removed) without affecting any other piece. Obviously you can&#8217;t remove the MDB2 class and expect the site to still function, but most pieces can be removed without affecting the site as a whole. The Flex front end is built the same way, using modules. When you first access index.php, a MainApplication flex file loads which contains the basic code base to run all of the other flex modules. By it self, it doesn&#8217;t provide much visually - just a preloader and then a blank screen. But it then connects to the php back end and figures out which flex modules to load for the specific &#8220;page&#8221; that was requested. It then loads these, and they appear on the screen. Each having specialized functionality: the MediaPlayer loads and handles all media requests. The SearchTools handle the display of the search tools. The SongDisplayer lists songs found with the search tools. You get my drift. The beauty of using a modualized flex front end is that components can be made to cache on the users computer so that future site visits load very quickly. Also, this caching behavior can be controlled, so that if you edit one of the modules, it loads the newest version from the server automatically.</p>
<p>I&#8217;ve been in the process of developing this site for over a year now. I think it would have gone quicker if I wasn&#8217;t working by my self, and if I had a full 40 hour week to work on it. But as I said above, our current zen-cart based solution requires extensive maintenance, and that eats up a large chunk of my weekly time. But the site is now starting to come together, and I fully expect to have it at least partially ready for bug testing by the end of the year, if not sooner.</p>
<p>The longest part was building the back end. It was almost as if I was writing my own operating system. And in a sense, I was. The MainApplication has to be able to handle several functions that you normally do not need to even think about when building a flex application. For example, if I want to move or resize one of the loaded flex modules, I have to have a function on the MainApplication to handle it, as the module can not move it self. (It actually can, but this causes a lot of extra code and pointless downloading for users.) Anything that is going to be shared between multiple modules should be loaded with the MainApplication so that the user only has to download it once, and not multiple times. So this required a significant amount of planning and organization on a scale of which I&#8217;m not used to. Especially on a one person development team!</p>
<p>So all in all, this project is very massive. If you just need a simple flex site, this is NOT the way to go. But if you need the ability to customize components of your site without affecting the site as a whole, want it to be very portable, want it to be multilingual, secure, fast, and very flexible&#8230; a modualized system is the way to go!</p>
<p>I am very excited about the new site. I really can&#8217;t wait to get people beta testing it - finding all the bugs I&#8217;ve overlooked. I plan to keep posting code snipits of things that I am working on. I think that you can expect within a few days to see some code snipit from our SearchTools module - which will probably be built with several accordions.</p>
<p>So stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonypetty.com/personal/wp/?feed=rss2&amp;p=18</wfw:commentRss>
		</item>
	</channel>
</rss>

