<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Chomper Stomping</title>
	
	<link>http://blog.chomperstomp.com</link>
	<description>AJAX/JavaScript/CSS/HTML, Flash Game Development (AS 2.0/AS 3.0), iPhone App Development, Java/PHP/Python/ActionScript and other random techie tidbits I've collected</description>
	<lastBuildDate>Wed, 08 Jul 2009 03:46:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<geo:lat>39.939102</geo:lat><geo:long>-86.138318</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ChomperStomping" type="application/rss+xml" /><feedburner:emailServiceId>ChomperStomping</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Using WinSCP and apachectl start to start your apache server</title>
		<link>http://feedproxy.google.com/~r/ChomperStomping/~3/pzTxsMTtuME/</link>
		<comments>http://blog.chomperstomp.com/using-winscp-and-apachectl-start-to-start-your-apache-server/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 03:41:47 +0000</pubDate>
		<dc:creator>Christopher McCulloh</dc:creator>
				<category><![CDATA[n342]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apachectl]]></category>
		<category><![CDATA[start apache]]></category>

		<guid isPermaLink="false">http://blog.chomperstomp.com/?p=282</guid>
		<description><![CDATA[This post explains how to use WinSCP (or SSH/PuTTY) to start your Apache server using the apachectl start command.
This post is basically a tutorial for my n342 Server Side Programming course at IUPUI.
You will need to download and install WinSCP in order to follow this tutorial exactly. Also, the first time through you will need [...]]]></description>
			<content:encoded><![CDATA[<p>This post explains how to use WinSCP (or SSH/PuTTY) to start your Apache server using the apachectl start command.</p>
<p>This post is basically a tutorial for my n342 Server Side Programming course at IUPUI.</p>
<p>You will need to download and install <a href="http://winscp.net/eng/download.php">WinSCP</a> in order to follow this tutorial exactly. Also, the first time through you will need to set up and save a new server profile, but each subsequent time you can just select the profile you saved the first time and click &#8220;login&#8221;.</p>
<p><OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="519" HEIGHT="388" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=7,0,0,0"><br />
<PARAM NAME=movie VALUE="http://www.chomperstomp.com/n342/screencasts/starting%20apache.swf"><br />
<PARAM NAME=play VALUE=true><br />
<PARAM NAME=loop VALUE=false><br />
<PARAM NAME=wmode VALUE=transparent><br />
<PARAM NAME=quality VALUE=low><br />
<EMBED SRC="http://www.chomperstomp.com/n342/screencasts/starting%20apache.swf" WIDTH=519 HEIGHT=388 quality=low loop=false wmode=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"><br />
</EMBED><br />
</OBJECT><br />
<SCRIPT src='http://www.chomperstomp.com/n342/screencasts/starting apache.js'></script></p>
<p><a href="http://www.chomperstomp.com/n342/screencasts/starting apache.htm">View the Screencast</a> (If it didn't show up above).</p>
<p>And, here's the simple text version:</p>
<p>1. Log into corsair (or whatever server you have apache install on) using WinSCP/SSH/PuTTY<br />
2. Open the console/prompt/shell<br />
3. Enter "apachectl start" (without quotes) and hit "Enter" to start the server<br />
4. Enter "apachectl stop" (without quotes) and hit "Enter" to stop the server (Obviously if your goal was to start the server, you will want to skip this step...)</p>

<p><a href="http://feedads.g.doubleclick.net/~a/jLcdt-dcw-hQi5B_eu76BrRD9ss/0/da"><img src="http://feedads.g.doubleclick.net/~a/jLcdt-dcw-hQi5B_eu76BrRD9ss/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/jLcdt-dcw-hQi5B_eu76BrRD9ss/1/da"><img src="http://feedads.g.doubleclick.net/~a/jLcdt-dcw-hQi5B_eu76BrRD9ss/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=pzTxsMTtuME:KnrCe-xF5ww:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=pzTxsMTtuME:KnrCe-xF5ww:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=pzTxsMTtuME:KnrCe-xF5ww:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=pzTxsMTtuME:KnrCe-xF5ww:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=pzTxsMTtuME:KnrCe-xF5ww:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=pzTxsMTtuME:KnrCe-xF5ww:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=pzTxsMTtuME:KnrCe-xF5ww:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=pzTxsMTtuME:KnrCe-xF5ww:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=pzTxsMTtuME:KnrCe-xF5ww:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=pzTxsMTtuME:KnrCe-xF5ww:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=pzTxsMTtuME:KnrCe-xF5ww:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=pzTxsMTtuME:KnrCe-xF5ww:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChomperStomping/~4/pzTxsMTtuME" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.chomperstomp.com/using-winscp-and-apachectl-start-to-start-your-apache-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.chomperstomp.com/using-winscp-and-apachectl-start-to-start-your-apache-server/</feedburner:origLink></item>
		<item>
		<title>Creating Dynamically Re-sizable Buttons for iPhone Apps</title>
		<link>http://feedproxy.google.com/~r/ChomperStomping/~3/JwfJZZt3SNU/</link>
		<comments>http://blog.chomperstomp.com/creating-dynamically-re-sizable-buttons-for-iphone-apps/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 17:53:19 +0000</pubDate>
		<dc:creator>Christopher McCulloh</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[iPhone App Development]]></category>
		<category><![CDATA[programming concepts]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[custom iPhone button]]></category>
		<category><![CDATA[iPhone Development]]></category>
		<category><![CDATA[re-sizeable]]></category>
		<category><![CDATA[stretch-able]]></category>

		<guid isPermaLink="false">http://blog.chomperstomp.com/?p=211</guid>
		<description><![CDATA[Creating buttons that resize/stretch themselves automatically for your iPhone Applications is pretty easy.

Buttons are created as .png files with three parts: Left end-cap, middle (the stretch-able part), Right end-cap. Basically, you create a little tiny .png file with the left and right end caps (or top and bottom) and a little bity middle part that the iPhone will automatically re-size to fit any width or height you make the button.

I'll walk you through the process step by step and show you how to assign the image to your button.]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://rcm.amazon.com/e/cm?t=chompstomp-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=1430216263&#038;md=10FE9736YVPPT7A0FBG2&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=FFFFFF&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px; margin: 15px; float: left;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
<p>Creating buttons that resize/stretch themselves automatically for your iPhone Applications is pretty easy.</p>
<p>Buttons are created as .png files with three parts: Left end-cap, middle (the stretch-able part), Right end-cap. Basically, you create a little tiny .png file with the left and right end caps (or top and bottom) and a little bity middle part that the iPhone will automatically re-size to fit any width or height you make the button.</p>
<p>I&#8217;ll walk you through the process step by step and show you how to assign the image to your button.</p>
<p>If you are wondering how to get your Round Rect Buttons to look like the ones in the official iPhone apps (like the ones apple makes), this tutorial will show you how. Instead of creating your own button image, just use the ones from <a href="http://developer.apple.com/iphone/library/samplecode/UICatalog/index.html">Apple</a>, or download <a href="http://blog.chomperstomp.com/buttonTutorial.zip">the zip file for this tutorial</a> (the ones from Apple are in there too)</p>
<h2>Creating the Stretchable iPhone App Button Image</h2>
<p>To start with, you will need to actually create the button image. I used Fireworks to do this, but you could use Photoshop, Illustrator, Inkscape or Gimp if you are so inclined. I recommend Fireworks.</p>
<p>I wanted my button to mimic normal iPhone buttons, but also illustrate the concept of a &#8220;stretchy&#8221; button. So I made a square button with rotated square corners.</p>
<ol>
<li>Create a new image 30 x 50 (or there-abouts)</li>
<p><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/step1.png" alt="step1" title="step1" width="473" height="405" class="alignnone size-full wp-image-229" /></p>
<li>Make sure to set the canvas color as &#8220;transparent&#8221;</li>
<li>Mock-up your button shape</li>
<p><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/step2.png" alt="step2" title="step2" width="120" height="50" class="alignnone size-full wp-image-230" /></p>
<li>Use the pen tool to trace it into a single shape<br /><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/step3.png" alt="step3" title="step3" width="59" height="50" class="alignnone size-full wp-image-231" />
<p><em>I take the individual components from the last step, group them together, and lock them, and then trace around them with the pen tool. There&#8217;s probably a better way, but this is the way I know. Use the guides to help you tweak it until you are satisfied</em></p>
</li>
<li>Trace a smaller version of the button inside of the outline using the pen tool</li>
<li>Fill in the inner button, and remove the line on it</li>
<li>Fill in the outer button</li>
<p><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/step4.png" alt="step4" title="step4" width="89" height="50" class="alignnone size-full wp-image-232" /></p>
<p>If the shape looks how you want it at this point, move on, otherwise, rinse and repeat&#8230;</p>
<li>Color the button the way you want it<br /><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/step5.png" alt="step5" title="step5" width="89" height="50" class="alignnone size-full wp-image-233" />
<p><em>The way I do this is to fill the outside shape with a dark grey (at the top) to light grey (at the bottom) linear gradiant with a 1px solid dark grey border (a little darker than the darkest part of the gradient). Then fill the inside shape with a custom linear gradient. This is the part that requires finesse. If you want it to look like an Apple button with the slick horizon line, start light, get progressively darker, and then in one pixel make a stark jump to the darkest shade of the color you are using, then get progressively light again.</em></p>
<p><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/step5gradient.png" alt="step5gradient" title="step5gradient" width="209" height="161" class="alignnone size-full wp-image-235" /></li>
<li>Add a drop shadow to the inner shape <br /><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/step5dropshadow.png" alt="step5dropshadow" title="step5dropshadow" width="176" height="100" class="alignnone size-full wp-image-234" />
<p><em>Click the inner shape. Click the &#8220;+&#8221; next to &#8220;Filters&#8221; in the Properties inspector. Select &#8220;Shadow and Glow > Drop Shadow&#8221;. I&#8217;ve selected a distance of 2, Opacity of 100%, Softness of 1 and Angle of 267.</em></p>
</li>
<li>Decide on the stretching points of your button
<p><em>Pick a point in the middle of the image where if that one pixel got stretched (repeated over and over again) to widen the button, it would look good (I chose 15px for the button I&#8217;ve been creating for this tutorial). Pick a point in the middle of the image where if that one pixel got stretched to lengthen the button, it would look good (I chose 27px for the button I&#8217;ve been creating for this tutorial). Make note of these two points as you will need to know them later.</em></p>
</li>
<p>At this point you have completed the &#8220;up&#8221; state for the button.
<li>Save your file <em>(I saved as &#8220;customButtonImageDefault.png&#8221;)</em></li>
<li>&#8220;Save As&#8221; and rename your file for the pressed or &#8220;down&#8221; state for the button <em>(I saved as &#8220;customButtonImageDown.png&#8221;)</em></li>
<li>Choose a color for the downstate, and change each gradient point to a shade of that color.<br /><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/step6.png" alt="step6" title="step6" width="674" height="394" class="alignnone size-full wp-image-245" />
<p><em>It makes it easier if you click the color wheel in the color chooser and use the slider on the right. Also, once you have chosen your base color after clicking the color wheel and adjusting the slider, click &#8220;Add to Custom Colors&#8221; so you don&#8217;t have to re-find your base color again and again each time. You can just select it from the custom colors list at the bottom left of the color wheel menu and then use the slider to choose another shade of that color. Make sure not to move any of gradient points or they won&#8217;t match up with the points you took note of earlier. Up states and Down states can have different stretch points if you want since you define each state&#8217;s stretch points individually in the code, but it makes it easier if you just use the same points for up and down.</em></p>
</li>
<li>Once you have edited all of the points. Open the images in fireworks and switch back and forth between them to compare how it&#8217;s going to look when the button is pressed. When satisfied, save. Now you&#8217;re ready to get to coding!</li>
<p><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/custombuttonimagedefault.png" alt="custombuttonimagedefault" title="custombuttonimagedefault" width="29" height="50" class="alignnone size-full wp-image-246" /><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/custombuttonimagedown.png" alt="custombuttonimagedown" title="custombuttonimagedown" width="29" height="50" class="alignnone size-full wp-image-247" />
</ol>
<h2>Creating a Custom Re-sizable Button in an iPhone App</h2>
<p>Ok, now that you&#8217;ve gotten your button created, it&#8217;s time to implement it.</p>
<p>I expect you to already know how to create I phone apps, but if not, here are un-annotated pictures of me building the scaffolding to hold our custom buttons. Following the images are the explanation on how to use custom buttons.</p>
<h3>Creating the Scaffolding to place the custom button in</h3>
<p><em>Again, if you already have an app you are trying to use the custom button in, skip this step&#8230;</em></p>
<p><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorial1.png" alt="buttontutorial1" title="buttontutorial1" width="600" height="442" class="alignnone size-full wp-image-252" /><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorial2.png" alt="buttontutorial2" title="buttontutorial2" width="788" height="559" class="alignnone size-full wp-image-253" /><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorial3.png" alt="buttontutorial3" title="buttontutorial3" width="728" height="476" class="alignnone size-full wp-image-254" /><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorial4.png" alt="buttontutorial4" title="buttontutorial4" width="728" height="476" class="alignnone size-full wp-image-255" /></p>
<h3>Making the Custom Button in the iPhone App</h3>
<ol>
<li>Open the interface builder and click on the button you would like to customize<br />
<img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorial5.png" alt="buttontutorial5" title="buttontutorial5" width="320" height="502" class="alignnone size-full wp-image-256" /></li>
<li>Open the &#8220;Button Attributes&#8221; pane (Apple + 1)</li>
<li>For &#8220;type&#8221; select &#8220;Custom&#8221;<br /><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorial6.png" alt="buttontutorial6" title="buttontutorial6" width="609" height="266" class="alignnone size-full wp-image-257" />
<p><em>At this point, if you didn&#8217;t give the button a title, it will disappear (which is ok). If you need to find it and can&#8217;t, in the main window (titled yourFileName.xib) there will be several objects. Expand the one that says &#8220;View&#8221; (or wherever you put your button) and you should see your button. Clicking on it there will highlight it in the layout window.</em></p>
</li>
<li>Hold down &#8220;ctrl&#8221; and drag from the &#8220;File&#8217;s Owner&#8221; object to the button.
<p><em>This can all be done from within the .xib window by switching to &#8220;list&#8221; view mode</em></p>
</li>
<li>In the little context menu that pops up, select &#8220;customButton&#8221; (or whatever you called the button in your code)<br /><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorialconnectbuttontooutlet.png" alt="buttontutorialconnectbuttontooutlet" title="buttontutorialconnectbuttontooutlet" width="354" height="198" class="alignnone size-full wp-image-263" /></li>
<li>Switch to the &#8220;size&#8221; window (Apple + 3)</li>
<li>Set the size to at least 100 x 100<br /> <img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorialbuttonsize.png" alt="buttontutorialbuttonsize" title="buttontutorialbuttonsize" width="287" height="201" class="alignnone size-full wp-image-260" />
<p><em>This is just so we can see our image stretch. When you are doing this in a non-tutorial setting, you will probably not set this at all.</em></p>
</li>
<li>Switch to the &#8220;Attributes&#8221; window (Apple + 1)</li>
<li>In the &#8220;View&#8221; section (at the bottom), click on &#8220;Background&#8221;<br /> <img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorialclickbackground.png" alt="buttontutorialclickbackground" title="buttontutorialclickbackground" width="286" height="217" class="alignnone size-full wp-image-261" /></li>
<li>In the &#8220;color&#8221; window that pops up, set &#8220;Opacity&#8221; to &#8220;0&#8243; (zero)<br /> <img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorialopacity.png" alt="buttontutorialopacity" title="buttontutorialopacity" width="218" height="375" class="alignnone size-full wp-image-251" /></li>
<li>Switch back over to Xcode</li>
<li>Locate your button files and drag and drop them into the &#8220;Resources&#8221; folder of your project<br /> <img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorial7.png" alt="buttontutorial7" title="buttontutorial7" width="400" height="374" class="alignnone size-full wp-image-258" />
<p></em>You will probably want to make sure and click the &#8220;Copy items into destination group&#8217;s folder&#8221; button</em></p>
</li>
<li>Click &#8220;Add&#8221; in the pop-up that appears</li>
<li>Switch to your view controller file
<p><em>(the one that corresponds with the view you were just editing in the Interface Builder. The one that ends with &#8220;.m&#8221;)</em></p>
</li>
<li>Add the following code to the -(void)viewDidLoad{} method:<br />
<br /><img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorial8.png" alt="buttontutorial8" title="buttontutorial8" width="1055" height="567" class="alignnone size-full wp-image-259" /><br />
<code><br />
UIImage *buttonImageNormal = [UIImage imageNamed:@"customButtonImageDefault.png"];<br />
UIImage *stretchableButtonImageNormal = [buttonImageNormal stretchableImageWithLeftCapWidth:12 topCapHeight:0];<br />
[customButton setBackgroundImage:stretchableButtonImageNormal forState:UIControlStateNormal];</p>
<p>UIImage *buttonImagePressed = [UIImage imageNamed:@"customButtonImageDown.png"];<br />
UIImage *stretchableButtonImagePressed = [buttonImagePressed stretchableImageWithLeftCapWidth:12 topCapHeight:0];<br />
[customButton setBackgroundImage:stretchableButtonImagePressed forState:UIControlStatePressed];<br />
</code></p>
<p><em>The first block of code defines the image for the normal (up) state of the button. The second block defines the image for the pressed (down) state of the button. The first line of each block loads the button image for that state into the app. The second line of each block you can set the stretch points of the button (you should have noted these earlier when you made the button). You can keep setting these to different things and viewing the result to refine until you like what you see. The third line assigns the now stretchable image to the actual button. If you have more than one button you want to assign the image to, just copy the third line and replace &#8220;customButton&#8221; at the beginning with the name of the next button you want to assign the image to:</em></p>
<p><code><br />
UIImage *buttonImagePressed = [UIImage imageNamed:@"customButtonImageDown.png"];<br />
UIImage *stretchableButtonImagePressed = [buttonImagePressed stretchableImageWithLeftCapWidth:12 topCapHeight:0];<br />
[customButton setBackgroundImage:stretchableButtonImagePressed forState:UIControlStatePressed];<br />
[anotherCustomButton setBackgroundImage:stretchableButtonImagePressed forState:UIControlStatePressed];<br />
[thirdCustomButton setBackgroundImage:stretchableButtonImagePressed forState:UIControlStatePressed];<br />
</code></p>
<p><em>In this way, you can assign the image to as many buttons as you want.</em></p>
</li>
<p>Your viewDidLoad method should now look something like this:</p>
<p><code><br />
-(void)viewDidLoad {<br />
    UIImage *buttonImageNormal = [UIImage imageNamed:@"customButtonImageDefault.png"];<br />
    UIImage *stretchableButtonImageNormal = [buttonImageNormal stretchableImageWithLeftCapWidth:12 topCapHeight:0];<br />
    [customButton setBackgroundImage:stretchableButtonImageNormal forState:UIControlStateNormal];</p>
<p>    UIImage *buttonImagePressed = [UIImage imageNamed:@"customButtonImageDown.png"];<br />
    UIImage *stretchableButtonImagePressed = [buttonImagePressed stretchableImageWithLeftCapWidth:12 topCapHeight:0];<br />
    [customButton setBackgroundImage:stretchableButtonImagePressed forState:UIControlStatePressed];</p>
<p>    [super viewDidLoad];<br />
}<br />
</code></p>
<li>Now hit Apple + R to compile, run and view the output!<br /> <img src="http://blog.chomperstomp.com/wp-content/uploads/2009/06/buttontutorialcomplete.png" alt="buttontutorialcomplete" title="buttontutorialcomplete" width="386" height="742" class="alignnone size-full wp-image-262" /></li>
</ol>
<p>A good amount of the information for this article came from<br />
<a href="http://www.amazon.com/gp/product/1430216263?ie=UTF8&#038;tag=chompstomp-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=1430216263">Beginning iPhone Development: Exploring the iPhone SDK</a><img src="http://www.assoc-amazon.com/e/ir?t=chompstomp-20&#038;l=as2&#038;o=1&#038;a=1430216263" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />. It&#8217;s an excellent book. By far the best iPhone development book out there right now. It&#8217;s really easy to read and understand. Each chapter is one or two example projects from start to finish, step by step, wonderfully explained. After buying this book I had my first iPhone App up and running within a week. The thing they don&#8217;t talk about (that I did) was actually creating the button image, and dealing with the opacity. Again, all of the files for this tutorial can be downloaded from <a href="http://blog.chomperstomp.com/buttonTutorial.zip">here</a>.  Feel free to leave any feedback/questions/whatever in the comments&#8230; Good luck!</p>
<p><script type="text/javascript" src="http://www.assoc-amazon.com/s/link-enhancer?tag=chompstomp-20&#038;o=1">
</script><br />
<noscript><br />
    <img src="http://www.assoc-amazon.com/s/noscript?tag=chompstomp-20" alt="" /><br />
</noscript></p>

<p><a href="http://feedads.g.doubleclick.net/~a/Bd6Gd0S-Jdd7g0FBebsaqiaGfVM/0/da"><img src="http://feedads.g.doubleclick.net/~a/Bd6Gd0S-Jdd7g0FBebsaqiaGfVM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Bd6Gd0S-Jdd7g0FBebsaqiaGfVM/1/da"><img src="http://feedads.g.doubleclick.net/~a/Bd6Gd0S-Jdd7g0FBebsaqiaGfVM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=JwfJZZt3SNU:eZ_XY7SFXYM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=JwfJZZt3SNU:eZ_XY7SFXYM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=JwfJZZt3SNU:eZ_XY7SFXYM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=JwfJZZt3SNU:eZ_XY7SFXYM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=JwfJZZt3SNU:eZ_XY7SFXYM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=JwfJZZt3SNU:eZ_XY7SFXYM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=JwfJZZt3SNU:eZ_XY7SFXYM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=JwfJZZt3SNU:eZ_XY7SFXYM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=JwfJZZt3SNU:eZ_XY7SFXYM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=JwfJZZt3SNU:eZ_XY7SFXYM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=JwfJZZt3SNU:eZ_XY7SFXYM:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=JwfJZZt3SNU:eZ_XY7SFXYM:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChomperStomping/~4/JwfJZZt3SNU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.chomperstomp.com/creating-dynamically-re-sizable-buttons-for-iphone-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.chomperstomp.com/creating-dynamically-re-sizable-buttons-for-iphone-apps/</feedburner:origLink></item>
		<item>
		<title>Other M</title>
		<link>http://feedproxy.google.com/~r/ChomperStomping/~3/K4r-_OVZ9AU/</link>
		<comments>http://blog.chomperstomp.com/other-m/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 18:14:40 +0000</pubDate>
		<dc:creator>Christopher McCulloh</dc:creator>
				<category><![CDATA[video games]]></category>
		<category><![CDATA[Metroid]]></category>

		<guid isPermaLink="false">http://blog.chomperstomp.com/?p=216</guid>
		<description><![CDATA[So, I know this blog has been leaning more towards serious development than flash game development recently. But if you pay any attention to www.chomperstomp.com (you shouldn&#8217;t) you will know that the last game I developed was a Metroid clone. Which might give you a hint at how I feel about Metroid. I love it. [...]]]></description>
			<content:encoded><![CDATA[<p>So, I know this blog has been leaning more towards serious development than flash game development recently. But if you pay any attention to www.chomperstomp.com (you shouldn&#8217;t) you will know that the last game I developed was a Metroid clone. Which might give you a hint at how I feel about Metroid. I love it. It was the first video game I ever bought, and I&#8217;ll be a Metroid fan till I die. It&#8217;s right there behind Zelda and in front of Mario and Mega Man, which are all embraced in the loving arms of Double Dribble&#8230;</p>
<p>So, that said, and without further ado, I present to you (as if you hadn&#8217;t already seen this from reading PA or just having an appendage flaccidly placed in the vicinity of the pulse of video game culture) <a href="http://www.gametrailers.com/video/e3-09-metroid-other/50237">Metroid:Other M</a>.</p>
<p>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHWSOME!!!!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/0YGULsgUoUhEVO7kTlg8DU5AaII/0/da"><img src="http://feedads.g.doubleclick.net/~a/0YGULsgUoUhEVO7kTlg8DU5AaII/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/0YGULsgUoUhEVO7kTlg8DU5AaII/1/da"><img src="http://feedads.g.doubleclick.net/~a/0YGULsgUoUhEVO7kTlg8DU5AaII/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=K4r-_OVZ9AU:bfZlqQRmjfc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=K4r-_OVZ9AU:bfZlqQRmjfc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=K4r-_OVZ9AU:bfZlqQRmjfc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=K4r-_OVZ9AU:bfZlqQRmjfc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=K4r-_OVZ9AU:bfZlqQRmjfc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=K4r-_OVZ9AU:bfZlqQRmjfc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=K4r-_OVZ9AU:bfZlqQRmjfc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=K4r-_OVZ9AU:bfZlqQRmjfc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=K4r-_OVZ9AU:bfZlqQRmjfc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=K4r-_OVZ9AU:bfZlqQRmjfc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=K4r-_OVZ9AU:bfZlqQRmjfc:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=K4r-_OVZ9AU:bfZlqQRmjfc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChomperStomping/~4/K4r-_OVZ9AU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.chomperstomp.com/other-m/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.chomperstomp.com/other-m/</feedburner:origLink></item>
		<item>
		<title>Print Media Alternate Style Sheet (CSS)</title>
		<link>http://feedproxy.google.com/~r/ChomperStomping/~3/yjmp1UlVACI/</link>
		<comments>http://blog.chomperstomp.com/print-media-alternate-style-sheet-css/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 15:45:48 +0000</pubDate>
		<dc:creator>Christopher McCulloh</dc:creator>
				<category><![CDATA[programming concepts]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Alternate StyleSheet]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.chomperstomp.com/?p=207</guid>
		<description><![CDATA[
If you don&#8217;t want to create an entirely new alternate style-sheet just for print media, there is an easier way to do it. 
I had a small adjustment I needed to make for printing a page on my site, and rather than creating an entirely new (duplicate) alternate style-sheet just for print media, I discovered [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://rcm.amazon.com/e/cm?t=chompstomp-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0321430840&#038;md=10FE9736YVPPT7A0FBG2&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;float: left; margin-right: 15px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe><br />
If you don&#8217;t want to create an entirely new alternate style-sheet just for print media, there is an easier way to do it. </p>
<p>I had a small adjustment I needed to make for printing a page on my site, and rather than creating an entirely new (duplicate) alternate style-sheet just for print media, I discovered a neat little CSS method you could use to put the print style right in with the main style.</p>
<p>It&#8217;s the @media print CSS method.</p>
<p>My original CSS code was as follows:</p>
<p><code>#dragLayer {<br />
  height:255px;<br />
  left:72px;<br />
  overflow:hidden;<br />
  position:absolute;<br />
  top:0px;<br />
  width:255px;<br />
  z-index:100;<br />
}</code></p>
<p>For some reason the &#8220;Drag Layer&#8221; div was appearing over-top the image contained in a sub-div. I&#8217;m using <a href="http://script.aculo.us/">scriptaculous</a> to display a blown up version of an image when you hover over a smaller version of the image. But when you print, the smaller version of the image doesn&#8217;t show up. Making the dragLayer div display equal to none didn&#8217;t work for some reason. So instead I defined a print stylesheet with the dragLayer div&#8217;s height and width equal to 0. I didn&#8217;t want to have to make an entirely new duplicate stylesheet just for this one little CSS change for printing, so after some exploring I found the @media print css directive. Here is the style I ended up with:</p>
<p><code>#dragLayer {<br />
  height:255px;<br />
  left:72px;<br />
  overflow:hidden;<br />
  position:absolute;<br />
  top:0px;<br />
  width:255px;<br />
  z-index:100;<br />
}</p>
<p>@media print{<br />
	#dragLayer{<br />
		height: 0px;<br />
		width: 0px;<br />
	}<br />
}</code></p>
<p>This little trick was mentioned in passing in page 210 of Elizabeth Castro&#8217;s<br />
<a href="http://www.amazon.com/gp/product/0321430840?ie=UTF8&#038;tag=chompstomp-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0321430840">HTML, XHTML, and CSS, Sixth Edition (Visual Quickstart Guide)</a><img src="http://www.assoc-amazon.com/e/ir?t=chompstomp-20&#038;l=as2&#038;o=1&#038;a=0321430840" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />, but Elizabeth claims it isn&#8217;t as widely supported or well known as the other standard methods of doing this. In all of my testing so far, however, it looks like it works in all of the newest versions of three of the major browsers (FF, IE &#038; Chrome).</p>
<p><script type="text/javascript" src="http://www.assoc-amazon.com/s/link-enhancer?tag=chompstomp-20&#038;o=1">
</script><br />
<noscript><br />
    <img src="http://www.assoc-amazon.com/s/noscript?tag=chompstomp-20" alt="" /><br />
</noscript></p>

<p><a href="http://feedads.g.doubleclick.net/~a/KuvPWYnyb-X36z7yNamDWLPco7E/0/da"><img src="http://feedads.g.doubleclick.net/~a/KuvPWYnyb-X36z7yNamDWLPco7E/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/KuvPWYnyb-X36z7yNamDWLPco7E/1/da"><img src="http://feedads.g.doubleclick.net/~a/KuvPWYnyb-X36z7yNamDWLPco7E/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=yjmp1UlVACI:a1X8NECf8d0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=yjmp1UlVACI:a1X8NECf8d0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=yjmp1UlVACI:a1X8NECf8d0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=yjmp1UlVACI:a1X8NECf8d0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=yjmp1UlVACI:a1X8NECf8d0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=yjmp1UlVACI:a1X8NECf8d0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=yjmp1UlVACI:a1X8NECf8d0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=yjmp1UlVACI:a1X8NECf8d0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=yjmp1UlVACI:a1X8NECf8d0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=yjmp1UlVACI:a1X8NECf8d0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=yjmp1UlVACI:a1X8NECf8d0:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=yjmp1UlVACI:a1X8NECf8d0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChomperStomping/~4/yjmp1UlVACI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.chomperstomp.com/print-media-alternate-style-sheet-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.chomperstomp.com/print-media-alternate-style-sheet-css/</feedburner:origLink></item>
		<item>
		<title>Little Game</title>
		<link>http://feedproxy.google.com/~r/ChomperStomping/~3/fAM7bzyZLEU/</link>
		<comments>http://blog.chomperstomp.com/little-game/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 22:30:13 +0000</pubDate>
		<dc:creator>Christopher McCulloh</dc:creator>
				<category><![CDATA[flash games]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[simulation]]></category>
		<category><![CDATA[tamogachi]]></category>

		<guid isPermaLink="false">http://blog.chomperstomp.com/?p=191</guid>
		<description><![CDATA[After over a year of inactivity, I&#8217;ve finally gone back to my little Chomper Stomper Game. It&#8217;s a google gadget, and actually it&#8217;s not a game. It&#8217;s kind of like a tamogachi.

 
 
There&#8217;s a guy at my work who is trying to learn how to program. Somehow or another he stumbled upon my site. [...]]]></description>
			<content:encoded><![CDATA[<p>After over a year of inactivity, I&#8217;ve finally gone back to my little <a href="http://www.chomperstomp.com/littleGame.html">Chomper Stomper Game</a>. It&#8217;s a google gadget, and actually it&#8217;s not a game. It&#8217;s kind of like a tamogachi.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="200" height="200" id="littleGame" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://www.chomperstomp.com/littleGame.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="http://www.chomperstomp.com/littleGame.swf" quality="high" bgcolor="#ffffff" width="200" height="200" name="littleGame" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /><br />
</object><br /> <br />
<a href="http://fusion.google.com/add?moduleurl=http%3A//www.chomperstomp.com/chomperStomper.xml"><img src="http://buttons.googlesyndication.com/fusion/add.gif" width="104" height="17" border="0" alt="Add to Google"></a> </p>
<p>There&#8217;s a guy at my work who is trying to learn how to program. Somehow or another he stumbled upon my site. I showed him my game and he downloaded the source code and tried to modify it. He was having some trouble, so we went through and figured it out together.</p>
<p>This rekindled my interest in the game, and today over lunch I did a little modifying myself. I refactored the clock methods to be more clean and intuitive (these are the methods that control when the timed events happen, like the rubies falling etc. These are located in the Clock.as file). I also made it so that the sky would change with the time of day. Now when I get to work in the morning the sun is just drifting in from the left side of the screen. Then when five oclock hits it&#8217;s just drifting out of the right side. It&#8217;s fun to be able to look up and know approx. what time it is by seeing the sun in the sky of my imaginary world. My next goal is to get the cloads to go away at night and have stars come out.</p>
<p>I&#8217;ve got lots of other plans as well. I forgot how much fun it was working on this thing.</p>
<p>For some reason it never showed up in the Google Gadgets directory, or in the Google Desktop directory. Maybe once I get it working to the point where someone else might want to play with it I&#8217;ll remedy that.</p>
<p>I also set up a Subversion repository for it. It&#8217;s located at <a href="http://subversion.chomperstomp.com/chomperStomp/">http://subversion.chomperstomp.com/chomperStomp/</a>. It&#8217;s open to the public to check out from it if you are interested. If anyone mods it they are welcome to send me their changes and I&#8217;ll incorporate with credit given to the modder.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/CFa8NclPN9t7meKtmeCp2iEsXk4/0/da"><img src="http://feedads.g.doubleclick.net/~a/CFa8NclPN9t7meKtmeCp2iEsXk4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/CFa8NclPN9t7meKtmeCp2iEsXk4/1/da"><img src="http://feedads.g.doubleclick.net/~a/CFa8NclPN9t7meKtmeCp2iEsXk4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=fAM7bzyZLEU:RrfEOnRNx_g:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=fAM7bzyZLEU:RrfEOnRNx_g:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=fAM7bzyZLEU:RrfEOnRNx_g:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=fAM7bzyZLEU:RrfEOnRNx_g:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=fAM7bzyZLEU:RrfEOnRNx_g:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=fAM7bzyZLEU:RrfEOnRNx_g:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=fAM7bzyZLEU:RrfEOnRNx_g:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=fAM7bzyZLEU:RrfEOnRNx_g:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=fAM7bzyZLEU:RrfEOnRNx_g:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=fAM7bzyZLEU:RrfEOnRNx_g:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=fAM7bzyZLEU:RrfEOnRNx_g:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=fAM7bzyZLEU:RrfEOnRNx_g:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChomperStomping/~4/fAM7bzyZLEU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.chomperstomp.com/little-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.chomperstomp.com/little-game/</feedburner:origLink></item>
		<item>
		<title>Fixing Dell XPS 410 Front Panel Error Codes 3 &amp; 4</title>
		<link>http://feedproxy.google.com/~r/ChomperStomping/~3/teszSYHjUtg/</link>
		<comments>http://blog.chomperstomp.com/fixing-dell-xps-410-front-panel-error-codes-3-4/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 16:15:29 +0000</pubDate>
		<dc:creator>Christopher McCulloh</dc:creator>
				<category><![CDATA[autobiographical]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[dell sucks]]></category>
		<category><![CDATA[Dell Wars]]></category>
		<category><![CDATA[Fixing]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://blog.chomperstomp.com/?p=189</guid>
		<description><![CDATA[Does your Dell XPS 410 just sit there with a solid green 3 &#038; 4 and refuse to boot up? Mine does!
Have you tried the suggested Dell method of removing RAM to find the bad stick? I Have!
Does your computer, even with no RAM in it still indicate that same error code? Mine does!
Well good! [...]]]></description>
			<content:encoded><![CDATA[<p>Does your Dell XPS 410 just sit there with a solid green 3 &#038; 4 and refuse to boot up? Mine does!<br />
Have you tried the suggested Dell method of removing RAM to find the bad stick? I Have!<br />
Does your computer, even with no RAM in it still indicate that same error code? Mine does!</p>
<p>Well good! For a limited time only, I have the solution to your problem! That&#8217;s right, turn that paper weight into a super great! (Huh?)</p>
<p>Unplug it. Wait 30 seconds. Plug it back in. Try turning it on again. It should:</p>
<p>1. Boot up fine! (this means your RAM is A-OK, and that the error codes are just indicative of the fact that your computer is a piece of crap. Duh! You got a Dell!)</p>
<p>2. Error code again. (Take out a RAM stick and put a different one in and repeat the process of unplugging etc. till it boots up)</p>
<p>3. Error code different. If you hear beeps and just have a 1 showing, it means you took them all out and unplugged it and waited 30 seconds (or two minutes or longer) and then plugged it back in. That&#8217;s what I finally did. It accomplished some sort of hard reboot or something and cleared it&#8217;s memory or whatever. Torn it off, throw in some RAM (one stick if you don&#8217;t mind), and plug her in and boot her up. Should work unless you threw in the bad RAM.</p>
<p>If all this fails it means that all your RAM went bad at once. If so, please comment so i can know there&#8217;s someone out there more hated by their ocursed Dell minion than me! <img src='http://blog.chomperstomp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>So, again, the lesson here is that Dell sucks and no one should ever buy a Dell ever and that I hate Dell, and that I will never buy one again (and have put my money where my mouth is and although I have 10 Dells in my home, my most recent purchase was an HP).</p>

<p><a href="http://feedads.g.doubleclick.net/~a/fHbceYE1oz8iDGu-Di6h2q-r9G4/0/da"><img src="http://feedads.g.doubleclick.net/~a/fHbceYE1oz8iDGu-Di6h2q-r9G4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/fHbceYE1oz8iDGu-Di6h2q-r9G4/1/da"><img src="http://feedads.g.doubleclick.net/~a/fHbceYE1oz8iDGu-Di6h2q-r9G4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=teszSYHjUtg:VQgbTqBnis4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=teszSYHjUtg:VQgbTqBnis4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=teszSYHjUtg:VQgbTqBnis4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=teszSYHjUtg:VQgbTqBnis4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=teszSYHjUtg:VQgbTqBnis4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=teszSYHjUtg:VQgbTqBnis4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=teszSYHjUtg:VQgbTqBnis4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=teszSYHjUtg:VQgbTqBnis4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=teszSYHjUtg:VQgbTqBnis4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=teszSYHjUtg:VQgbTqBnis4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=teszSYHjUtg:VQgbTqBnis4:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=teszSYHjUtg:VQgbTqBnis4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChomperStomping/~4/teszSYHjUtg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.chomperstomp.com/fixing-dell-xps-410-front-panel-error-codes-3-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.chomperstomp.com/fixing-dell-xps-410-front-panel-error-codes-3-4/</feedburner:origLink></item>
		<item>
		<title>“Dell Wars” Episode VII – Death of an Empire</title>
		<link>http://feedproxy.google.com/~r/ChomperStomping/~3/RZzd_w45y5s/</link>
		<comments>http://blog.chomperstomp.com/dell-wars-episode-vii-death-of-an-empire/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 15:37:26 +0000</pubDate>
		<dc:creator>Christopher McCulloh</dc:creator>
				<category><![CDATA[autobiographical]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[dell sucks]]></category>
		<category><![CDATA[Dell Wars]]></category>
		<category><![CDATA[HP]]></category>

		<guid isPermaLink="false">http://blog.chomperstomp.com/?p=185</guid>
		<description><![CDATA[Hey, wait, I thought I was done with Dell? Especially after the first six episodes? Yeah, and I thought Lucas was done making movies, but they keep coming, and it just keeps getting worse.
So, yesterday I decided to buy a new laptop. I&#8217;m recording an online Lecture series with IUPUI CSCI Dept. and I need [...]]]></description>
			<content:encoded><![CDATA[<p>Hey, wait, I thought I was done with Dell? Especially after the <a href="http://blog.chomperstomp.com/?p=65">first six episodes</a>? Yeah, and I thought Lucas was done making movies, but they keep coming, and it just keeps getting worse.</p>
<p>So, yesterday I decided to buy a new laptop. I&#8217;m recording an online Lecture series with IUPUI CSCI Dept. and I need a laptop to do it on. Now, I know what you&#8217;re thinking, &#8220;Surely&#8230; surely, he didn&#8217;t buy a Dell&#8230; right?&#8221; At this point, you&#8217;re probably expecting me to say &#8220;wrong&#8221;, but actually, I&#8217;m not a fracking idiot. I&#8217;ll never give Dell another red cent in my entire life. I bought an HP.</p>
<p>Modest 15.4&#8243; Screen</p>
<p>4 GB Ram</p>
<p>2.1 GHZ AMD Turion X2 Ultra 64</p>
<p>Vista Home Premium</p>
<p>ATI RADEON HD 3200 Graphics card</p>
<p>WiFi</p>
<p>LightScribe Direct Disc Labeling DVD Burner</p>
<p>SD-MS/Pro-MMC-XD media card reader</p>
<p>Removable Remote Control thingamabob (so I can use it as a TV)</p>
<p>Lots of lovely little ports some of which I don&#8217;t know the name for (USB/eSATA/HDMI/Network/phone/monitor/etc)</p>
<p>So, I get this thing home. Get my wifi network back up and running, and low an behold, aparently this pissed off my Dell.</p>
<p>She must have gotten jelous of the new girl in town, because when I walked in the room after getting my lappy all up and running, the dell was deader than a doornail.</p>
<p>She won&#8217;t even turn on. She just sits there with front panel error codes indicating she has bad memory. No bios screen, nothing. Just a number 3 and a number 4 lit up in green, as if to say, &#8220;Fine! I&#8217;m leaving!&#8221;.</p>
<p>I even ripped out all the memory and hit the power button to see if it would give me the correct error codes for &#8220;no memory found&#8221;, but nope. It still claims to have memory, but claims the memory is bad.</p>
<p>Well, guess what Dell? That&#8217;s BS! You were going to remain my primary, but now it really does look like I&#8217;m abandoning you to the cobwebs of irrelevancy! Good ridance you over priced piece of crap! You never worked right in the first place!</p>
<p>If I didn&#8217;t think there was a chance I could fix it (probably have to buy a new motherboard, this will be <a href="http://blog.chomperstomp.com/?p=8">it&#8217;s third one</a>) I&#8217;d take it out back and beat the snot out of it with a baseball bat.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/Svvc47Tr0R8&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/Svvc47Tr0R8&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>I HATE DELL COMPUTERS!!!!!!</p>
<p>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHH!!!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/SeTeAIc_ntOzf_pgardv6a50A5s/0/da"><img src="http://feedads.g.doubleclick.net/~a/SeTeAIc_ntOzf_pgardv6a50A5s/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/SeTeAIc_ntOzf_pgardv6a50A5s/1/da"><img src="http://feedads.g.doubleclick.net/~a/SeTeAIc_ntOzf_pgardv6a50A5s/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=RZzd_w45y5s:RaMN_dHNqfQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=RZzd_w45y5s:RaMN_dHNqfQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=RZzd_w45y5s:RaMN_dHNqfQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=RZzd_w45y5s:RaMN_dHNqfQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=RZzd_w45y5s:RaMN_dHNqfQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=RZzd_w45y5s:RaMN_dHNqfQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=RZzd_w45y5s:RaMN_dHNqfQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=RZzd_w45y5s:RaMN_dHNqfQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=RZzd_w45y5s:RaMN_dHNqfQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=RZzd_w45y5s:RaMN_dHNqfQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=RZzd_w45y5s:RaMN_dHNqfQ:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=RZzd_w45y5s:RaMN_dHNqfQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChomperStomping/~4/RZzd_w45y5s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.chomperstomp.com/dell-wars-episode-vii-death-of-an-empire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.chomperstomp.com/dell-wars-episode-vii-death-of-an-empire/</feedburner:origLink></item>
		<item>
		<title>HTML E-Mail with PHP: 5 Pointers to Get ‘er DONE!</title>
		<link>http://feedproxy.google.com/~r/ChomperStomping/~3/SrRWd6HSxP8/</link>
		<comments>http://blog.chomperstomp.com/html-e-mail-with-php-5-pointers-to-get-er-done/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 00:39:16 +0000</pubDate>
		<dc:creator>Christopher McCulloh</dc:creator>
				<category><![CDATA[programming concepts]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.chomperstomp.com/?p=181</guid>
		<description><![CDATA[Sending e-mail can be pretty useful with PHP. It&#8217;s also really easy&#8230; until you want to send HTML that is.
I used these two tutorials to learn how to send HTML e-mails in PHP:
sitepoint.com advanced e-mail tutorial
webcheatsheets.com sending e-mail tutorial
For something that requires very strict accurate guidelines to be followed, you would think they wouldn&#8217;t just [...]]]></description>
			<content:encoded><![CDATA[<p>Sending e-mail can be pretty useful with PHP. It&#8217;s also really easy&#8230; until you want to send HTML that is.</p>
<p>I used these two tutorials to learn how to send HTML e-mails in PHP:</p>
<p><a href="http://www.sitepoint.com/article/advanced-email-php/4/">sitepoint.com advanced e-mail tutorial</a><br />
<a href="http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php#html">webcheatsheets.com sending e-mail tutorial</a></p>
<p>For something that requires very strict accurate guidelines to be followed, you would think they wouldn&#8217;t just gloss over them or ignore them entirely. But they did.</p>
<p><b>So, here are five pointers to get you off on the right foot:</b></p>
<h3>1. Use Content-Type: multipart/alternative; with a random hash</h3>
<p>Don&#8217;t just send the e-mail as HTML. Many e-mail providers don&#8217;t allow for HTML e-mails, so you need alternative content. You will need a boundary string, but you will also want it to be random hash. Why? Well, I&#8217;m not really sure. I can easily imagine one scenario, which would be that if you are sending mail on behalf of someone, and they figure out your static boundary string, they could do some sort of injection attack and send some nasty thing through with your e-mail. Not really sure if this would work, or if this is the reason, but everyone else uses a random hash, so you should too!</p>
<pre>
&lt;?php
//create a boundary string. It must be unique
//so we use the MD5 algorithm to generate a random hash
$random_hash = md5(date('r', time()));
//define the headers we want passed. Note that they are separated with \r\n
$headers = "From: webmaster@example.com\r\nReply-To: webmaster@example.com";
//add boundary string and mime type specification
$headers .= "\r\nContent-Type: multipart/alternative; boundary=\"PHP-alt-$random_hash\"";
?&gt;
</pre>
<h3>2. Don&#8217;t use HEREDOC syntax</h3>
<p>At first I was trying to just do this:</p>
<pre>
$msg &lt;&lt;&lt;HERE
--PHP-alt-$random_hash
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Plain text stuff

--PHP-alt-$random_hash
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

&lt;html&gt;
&lt;body&gt;
&lt;p&gt;
Blah blah blah $var blah!
&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
--PHP-alt-$random_hash--
HERE;
</pre>
<p>But it just wouldn&#8217;t work! I figured out you have to do it like this:</p>
<pre>
$message = "--PHP-alt-$random_hash\n\r" .
"Content-Type: text/plain; charset=\"iso-8859-1\"" .
"Content-Transfer-Encoding: 7bit\n\r" .  

"Hello World!!! \n\r" .
"This is simple text email message. \n\r" .  

"--PHP-alt-$random_hash\n" .
"Content-Type: text/html; charset=\"iso-8859-1\"" .
"Content-Transfer-Encoding: 7bit\n\r" .  

"&lt;h2>Hello World!&lt;/h2>\n\r" .
"&lt;p>This is something with &lt;b>HTML&lt;/b> formatting.&lt;/p> \n\r" .  

"--PHP-alt-$random_hash--";
</pre>
<p>Pay special attention to where you are putting your <b>\n</b>s and <b>\r</b>s!!!</p>
<h3>3. Get the from right!</h3>
<p>When building your headers, don&#8217;t forget to include a from. This will make your e-mail more recognizable and professional. Don&#8217;t just include the from though, include a human readable value as well!</p>
<pre>
$headers = "From: An actual name &lt;email@email.com>\r\n";
</pre>
<h3>4. Don&#8217;t forget those trailing &#8220;&#8211;&#8221; after the final bondary!</h3>
<p>Don&#8217;t forget those last two dashes on your final boundary:</p>
<pre>
--==Multipart_Boundary_{$semi_rand}x<b>--</b>
</pre>
<p>See them there at the end? You don&#8217;t put those on the others, so they are easy to forget on the final one. Also, it&#8217;s boundary with an &#8220;a&#8221;, not &#8220;boundry&#8221;&#8230; Yeah, I misspelled it the first time&#8230;</p>
<h3>5. If things aren&#8217;t working, experiment</h3>
<p>It took me a good hour and a half to get this working right. It all came down to those little \r and \n things in the end. I had to carefully add and remove them from different places until I got everything just right. The webcheatsheet code conveniently uses some buffer trickery to avoid this, but my web host does not support that, so I had to figure it all out myself. Here is a version of their code that actually works on my web hose (Dreamhost):</p>
<pre>
&lt;?php
//define the receiver of the email
$to = 'email@gmail.com';
//define the subject of the email
$subject = 'Test HTML email';
//create a boundary string. It must be unique
//so we use the MD5 algorithm to generate a random hash
$random_hash = md5(date('r', time()));
//define the headers we want passed. Note that they are separated with \r\n
$headers = "From: webmaster@example.com\r\nReply-To: webmaster@example.com";
//add boundary string and mime type specification
$headers .= "\r\nContent-Type: multipart/alternative; boundary=\"PHP-alt-$random_hash\"";
//define the body of the message.
$message = "--PHP-alt-$random_hash\n\r" .
"Content-Type: text/plain; charset=\"iso-8859-1\"" .
"Content-Transfer-Encoding: 7bit\n\r" .  

"Hello World!!! \n\r" .
"This is simple text email message. \n\r" .  

"--PHP-alt-$random_hash\n" .
"Content-Type: text/html; charset=\"iso-8859-1\"" .
"Content-Transfer-Encoding: 7bit\n\r" .  

"&lt;h2>Hello World!&lt;/h2>\n\r" .
"&lt;p>This is something with &lt;b>HTML&lt;/b> formatting.&lt;/p> \n\r" .  

"--PHP-alt-$random_hash--";

//send the email
$mail_sent = mail( $to, $subject, $message, $headers );
//if the message is sent successfully print "Mail sent". Otherwise print "Mail failed"
echo $mail_sent ? "Mail sent" : "Mail failed";
echo $message;
?>
</pre>
<p>Have fun! Feel free to comment if you have any other tips/questions.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/Zcmpdf_eUTr0FZVazEqa0kMLmGc/0/da"><img src="http://feedads.g.doubleclick.net/~a/Zcmpdf_eUTr0FZVazEqa0kMLmGc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Zcmpdf_eUTr0FZVazEqa0kMLmGc/1/da"><img src="http://feedads.g.doubleclick.net/~a/Zcmpdf_eUTr0FZVazEqa0kMLmGc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=SrRWd6HSxP8:yZwft425xFc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=SrRWd6HSxP8:yZwft425xFc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=SrRWd6HSxP8:yZwft425xFc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=SrRWd6HSxP8:yZwft425xFc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=SrRWd6HSxP8:yZwft425xFc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=SrRWd6HSxP8:yZwft425xFc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=SrRWd6HSxP8:yZwft425xFc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=SrRWd6HSxP8:yZwft425xFc:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=SrRWd6HSxP8:yZwft425xFc:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=SrRWd6HSxP8:yZwft425xFc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=SrRWd6HSxP8:yZwft425xFc:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=SrRWd6HSxP8:yZwft425xFc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChomperStomping/~4/SrRWd6HSxP8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.chomperstomp.com/html-e-mail-with-php-5-pointers-to-get-er-done/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.chomperstomp.com/html-e-mail-with-php-5-pointers-to-get-er-done/</feedburner:origLink></item>
		<item>
		<title>Auto Upload File on Save in Aptana</title>
		<link>http://feedproxy.google.com/~r/ChomperStomping/~3/0YrdCr5WPac/</link>
		<comments>http://blog.chomperstomp.com/auto-upload-file-on-save-in-aptana/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 17:45:22 +0000</pubDate>
		<dc:creator>Christopher McCulloh</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Aptana]]></category>
		<category><![CDATA[Auto Upload on Save]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[Save]]></category>
		<category><![CDATA[Synchronize]]></category>
		<category><![CDATA[Upload]]></category>

		<guid isPermaLink="false">http://blog.chomperstomp.com/?p=177</guid>
		<description><![CDATA[
This is an explanation on how to automatically upload a file via FTP when you click &#8220;save&#8221; in the Aptana IDE. Let&#8217;s jump right in&#8230;
1. If you don&#8217;t have a project, create one. 
2. If you don&#8217;t have a &#8220;scripts&#8221; folder in your project, create one (I put mine in the root directory of my project. [...]]]></description>
			<content:encoded><![CDATA[<p><iframe src="http://rcm.amazon.com/e/cm?t=chompstomp-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0470186275&#038;md=10FE9736YVPPT7A0FBG2&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;margin-right:15px; float: left;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
<p>This is an explanation on how to automatically upload a file via FTP when you click &#8220;save&#8221; in the Aptana IDE. Let&#8217;s jump right in&#8230;</p>
<p>1. If you don&#8217;t have a project, create one. </p>
<p>2. If you don&#8217;t have a &#8220;scripts&#8221; folder in your project, create one (I put mine in the root directory of my project. No clue if it will work from anywhere else). </p>
<p>3. Create a new file inside your scripts folder with a .js extension (I named mine &#8220;upload_current_file_on_save.js&#8221;, not sure if it will work with any other name). </p>
<p>4. Place this code inside the file: </p>
<p> </p>
<table border="0" cellspacing="1" cellpadding="3" width="90%" align="center">
<tbody>
<tr>
<td><span class="genmed"><strong>Code:</strong></span></td>
</tr>
<tr>
<td class="code">/* <br />
 * Menu: gMan &gt; Upload On Save <br />
 * Kudos: Ingo Muschenetz <br />
 * License: EPL 1.0 <br />
 * Listener: commandService().addExecutionListener(this); <br />
 * DOM: http://localhost/com.aptana.ide.syncing <br />
 * DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript <br />
 */  </p>
<p>// Add  * Listener: commandService().addExecutionListener(this); to the top of this file to enable it </p>
<p>/** <br />
 * Returns a reference to the workspace command service <br />
 */ <br />
function commandService() <br />
{ <br />
   var commandServiceClass = Packages.org.eclipse.ui.commands.ICommandService; <br />
    <br />
   // same as doing ICommandService.class <br />
    var commandService = Packages.org.eclipse.ui.PlatformUI.getWorkbench().getAdapter(commandServiceClass); <br />
    return commandService; <br />
} </p>
<p>/** <br />
 * Called before any/every command is executed, so we must filter on command ID <br />
 */ <br />
function preExecute(commandId, event) {} </p>
<p>/* Add in all methods required by the interface, even if they are unused */ <br />
function postExecuteSuccess(commandId, returnValue) <br />
 { <br />
    <br />
   // if we see a save command <br />
   if (commandId == &#8220;org.eclipse.ui.file.save&#8221;) <br />
   { <br />
      sync.uploadCurrentEditor(); <br />
       <br />
      /* Replace above line if you&#8217;d like to limit it to just certain projects <br />
      var fileName = editors.activeEditor.uri; <br />
      if(fileName.match(/projectName/ig)) <br />
      { <br />
         sync.uploadCurrentEditor();    <br />
      } <br />
      */ <br />
    } <br />
} </p>
<p>function notHandled(commandId, exception) {} </p>
<p>function postExecuteFailure(commandId, exception) {}</td>
</tr>
</tbody>
</table>
<p> </p>
<p>5. Save the file. </p>
<p><em>A few notes on what needed changed in this file from the sample file I took this from: <br />
</em><br />
1. I added this line of code to the comment block at the top: </p>
<p> </p>
<table border="0" cellspacing="1" cellpadding="3" width="90%" align="center">
<tbody>
<tr>
<td><span class="genmed"><strong>Code:</strong></span></td>
</tr>
<tr>
<td class="code"> * Listener: commandService().addExecutionListener(this);</td>
</tr>
</tbody>
</table>
<p> </p>
<p>I know there is a comment in this file that tells you to &#8220;add this to the top of this file&#8221;, but since I&#8217;m new to the whole scripts thing I didn&#8217;t get that when it said &#8220;top of the file&#8221; it meant &#8220;the middle of the comment block at the top of this file&#8221;. I thought I was literally supposed to make that line the very first line in the file&#8230; Which didn&#8217;t work at all&#8230; </p>
<p>2. I changed the &#8220;menu&#8221; line to: </p>
<p> </p>
<table border="0" cellspacing="1" cellpadding="3" width="90%" align="center">
<tbody>
<tr>
<td><span class="genmed"><strong>Code:</strong></span></td>
</tr>
<tr>
<td class="code"> * Menu: gMan &gt; Upload On Save </td>
</tr>
</tbody>
</table>
<p><span class="postbody"><br />
from: </span></p>
<p> </p>
<table border="0" cellspacing="1" cellpadding="3" width="90%" align="center">
<tbody>
<tr>
<td><span class="genmed"><strong>Code:</strong></span></td>
</tr>
<tr>
<td class="code"> * Menu: Synchronize &gt; Upload Current File On Save Enabled</td>
</tr>
</tbody>
</table>
<p> </p>
<p>For some reason it didn&#8217;t work until I changed this line. Since my project is code named &#8220;gMan&#8221; (It&#8217;s a user management system, you&#8217;ll make the connection&#8230;) I just named the menu item &#8220;gMan&#8221; after my project. Then the command is to upload on save, so that&#8217;s what I named it. As soon as I made this change is when the whole thing started working. Could be coincidence, or could be that you have to do this for the script to work (rename the menu command something other than what the sample is named). </p>
<p>In case you haven&#8217;t figured it out, you run the script by going to the &#8220;Scripts&#8221; menu in the toolbar at the top of Apatan (and selecting the script, whatever you named it in the previous step). </p>
<p>Want to read more about website creation in Aptana from this author? Check out his book:<br />
<a href="http://www.amazon.com/gp/product/0470186275?ie=UTF8&#038;tag=chompstomp-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0470186275">HTML, XHTML, and CSS All-in-One Desk Reference For Dummies (For Dummies (Computer/Tech))</a><img src="http://www.assoc-amazon.com/e/ir?t=chompstomp-20&#038;l=as2&#038;o=1&#038;a=0470186275" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />. Support the Author of this post and buy the book from Amazon by clicking on the link on this page. Thanks for the help!</p>
<p><script type="text/javascript" src="http://www.assoc-amazon.com/s/link-enhancer?tag=chompstomp-20&#038;o=1">
</script><br />
<noscript><br />
    <img src="http://www.assoc-amazon.com/s/noscript?tag=chompstomp-20" alt="" /><br />
</noscript></p>

<p><a href="http://feedads.g.doubleclick.net/~a/Od-CBW2uF0oGZsn3EA9hyogRo_c/0/da"><img src="http://feedads.g.doubleclick.net/~a/Od-CBW2uF0oGZsn3EA9hyogRo_c/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Od-CBW2uF0oGZsn3EA9hyogRo_c/1/da"><img src="http://feedads.g.doubleclick.net/~a/Od-CBW2uF0oGZsn3EA9hyogRo_c/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=0YrdCr5WPac:9II_THQw290:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=0YrdCr5WPac:9II_THQw290:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=0YrdCr5WPac:9II_THQw290:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=0YrdCr5WPac:9II_THQw290:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=0YrdCr5WPac:9II_THQw290:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=0YrdCr5WPac:9II_THQw290:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=0YrdCr5WPac:9II_THQw290:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=0YrdCr5WPac:9II_THQw290:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=0YrdCr5WPac:9II_THQw290:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=0YrdCr5WPac:9II_THQw290:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=0YrdCr5WPac:9II_THQw290:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=0YrdCr5WPac:9II_THQw290:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChomperStomping/~4/0YrdCr5WPac" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.chomperstomp.com/auto-upload-file-on-save-in-aptana/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.chomperstomp.com/auto-upload-file-on-save-in-aptana/</feedburner:origLink></item>
		<item>
		<title>phpbb3 &amp; zen cart integration</title>
		<link>http://feedproxy.google.com/~r/ChomperStomping/~3/zOPMZG7xp-k/</link>
		<comments>http://blog.chomperstomp.com/phpbb3-zen-cart-integration/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 23:25:06 +0000</pubDate>
		<dc:creator>Christopher McCulloh</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web sites]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[error 1062]]></category>
		<category><![CDATA[phpbb]]></category>
		<category><![CDATA[phpbb3]]></category>
		<category><![CDATA[zen cart]]></category>

		<guid isPermaLink="false">http://blog.chomperstomp.com/?p=171</guid>
		<description><![CDATA[I&#8217;ve been trying to get the phpbb3 &#38; zen cart integration to work.
I&#8217;ve had some errors in the default SQl zen cart comes with. First I was getting an error about an invalid column name in the phpbb_user_groups table (specifically the group_description column not existing). Once I fixed that, I got a very cryptic &#8220;1062 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to get the phpbb3 &amp; zen cart integration to work.</p>
<p>I&#8217;ve had some errors in the default SQl zen cart comes with. First I was getting an error about an invalid column name in the phpbb_user_groups table (specifically the group_description column not existing). Once I fixed that, I got a very cryptic &#8220;1062 Duplicate entry &#8221; for key 2&#8243; error every time I tried to create a new user.</p>
<p>Here&#8217;s how to fix BOTH of these problems:</p>
<h3>Problem 1 &#8211; &#8220;column group_description does not exist&#8221;:</h3>
<p><strong>Edit line 196</strong> in store&gt;includes&gt;classes&gt;class.phpbb.php. Change &#8220;group_description&#8221; to &#8220;group_desc&#8221;</p>
<h3>Problem 2 &#8211; 1062 Duplicate entry &#8221; for key 2:</h3>
<p><strong>Edit line 187 </strong>(in the same file as in Problem 1). Change it from:</p>
<blockquote><p>(user_id, username, user_password, user_email, user_regdate)</p></blockquote>
<p>to:</p>
<blockquote><p>(user_id, username, user_password, username_clean, user_email, user_regdate)</p></blockquote>
<p><strong>Edit line 189</strong>. Change it from:</p>
<blockquote><p>(&#8217;&#8221; . (int)$user_id . &#8220;&#8216;, &#8216;&#8221; . $nick . &#8220;&#8216;, &#8216;&#8221; . md5($password) . &#8220;&#8216;, &#8216;&#8221; . $email_address . &#8220;&#8216;, &#8216;&#8221; . time() .&#8221;&#8216;)&#8221;;</p></blockquote>
<p>to:</p>
<blockquote><p>(&#8217;&#8221; . (int)$user_id . &#8220;&#8216;, &#8216;&#8221; . $nick . &#8220;&#8216;, &#8216;&#8221; . md5($password) . &#8220;&#8216;, &#8216;&#8221; . $nick . &#8220;&#8216;, &#8216;&#8221; . $email_address . &#8220;&#8216;, &#8216;&#8221; . time() .&#8221;&#8216;)&#8221;;</p></blockquote>
<p>phpbb requires that each user have a unique &#8220;username_clean&#8221;. This is the second &#8220;key&#8221; in the table requirements. The first creates an index on user_id, the second requires username_clean be UNIQUE, the third creates an INDEX on user_birthday, and so on. In fact, at NO POINT do they EVER REQUIRE THE USERNAME TO BE UNIQUE! WHAT????? yep. It&#8217;s username_clean that must be unique. zen cart doesn&#8217;t even try and insert anything into username_clean, it just tries to make the username (this makes no sense at all!!!).</p>
<p>Feel free to comment if you have any insights/questions!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/QBc5TRptkyMlLWD4UeVbEcyGAdk/0/da"><img src="http://feedads.g.doubleclick.net/~a/QBc5TRptkyMlLWD4UeVbEcyGAdk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/QBc5TRptkyMlLWD4UeVbEcyGAdk/1/da"><img src="http://feedads.g.doubleclick.net/~a/QBc5TRptkyMlLWD4UeVbEcyGAdk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=zOPMZG7xp-k:iEdAnkDuirw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=zOPMZG7xp-k:iEdAnkDuirw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=zOPMZG7xp-k:iEdAnkDuirw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=zOPMZG7xp-k:iEdAnkDuirw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=zOPMZG7xp-k:iEdAnkDuirw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=zOPMZG7xp-k:iEdAnkDuirw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=zOPMZG7xp-k:iEdAnkDuirw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=zOPMZG7xp-k:iEdAnkDuirw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?i=zOPMZG7xp-k:iEdAnkDuirw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=zOPMZG7xp-k:iEdAnkDuirw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=zOPMZG7xp-k:iEdAnkDuirw:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ChomperStomping?a=zOPMZG7xp-k:iEdAnkDuirw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/ChomperStomping?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ChomperStomping/~4/zOPMZG7xp-k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.chomperstomp.com/phpbb3-zen-cart-integration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.chomperstomp.com/phpbb3-zen-cart-integration/</feedburner:origLink></item>
	</channel>
</rss>
