<?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>PHail [dot net] Blog - Design, Programming, and other things.</title>
	<atom:link href="http://phail.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://phail.net</link>
	<description>A creative and sometimes technical blog about Design and Programming as well as other things.</description>
	<pubDate>Thu, 16 Apr 2009 17:28:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Moved! Kind of.</title>
		<link>http://phail.net/2009/04/16/moved-kind-of/</link>
		<comments>http://phail.net/2009/04/16/moved-kind-of/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 17:25:49 +0000</pubDate>
		<dc:creator>Mike Wojo</dc:creator>
		
		<category><![CDATA[Ramblings]]></category>

		<guid isPermaLink="false">http://phail.net/?p=40</guid>
		<description><![CDATA[
Recently I&#8217;ve gotten addicted to Tumblr, and it&#8217;s easier/more fun to update that, so I&#8217;ll be &#8220;moving on&#8221; to that.
Catch me there!
 http://mmmmmhm.tumblr.com
]]></description>
			<content:encoded><![CDATA[<p><a href="http://mmmmmhm.tumblr.com"><img src="http://i106.photobucket.com/albums/m256/aeronux/n584203852_672851_6889-1.png" alt="" width="159" height="156" /></a></p>
<p>Recently I&#8217;ve gotten addicted to Tumblr, and it&#8217;s easier/more fun to update that, so I&#8217;ll be &#8220;moving on&#8221; to that.</p>
<p>Catch me there!<br />
<a href="http://mmmmmhm.tumblr.com"> http://mmmmmhm.tumblr.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2009/04/16/moved-kind-of/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Soon to be in China!</title>
		<link>http://phail.net/2008/10/12/soon-to-be-in-china/</link>
		<comments>http://phail.net/2008/10/12/soon-to-be-in-china/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 05:12:27 +0000</pubDate>
		<dc:creator>Mike Wojo</dc:creator>
		
		<category><![CDATA[Ramblings]]></category>

		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://phail.net/2008/10/12/soon-to-be-in-china/</guid>
		<description><![CDATA[Since I&#8217;m leaving on Monday for China, I thought I would try out posting to my blog from my iPod touch!  
So here it is.
]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;m leaving on Monday for China, I thought I would try out posting to my blog from my iPod touch!  </p>
<p>So here it is.</p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/10/12/soon-to-be-in-china/feed/</wfw:commentRss>
		</item>
		<item>
		<title>It&#8217;s Official &#8212; I&#8217;m With MediaTemple!</title>
		<link>http://phail.net/2008/05/08/its-official-im-with-mediatemple/</link>
		<comments>http://phail.net/2008/05/08/its-official-im-with-mediatemple/#comments</comments>
		<pubDate>Fri, 09 May 2008 03:31:52 +0000</pubDate>
		<dc:creator>Mike Wojo</dc:creator>
		
		<category><![CDATA[Ramblings]]></category>

		<category><![CDATA[host]]></category>

		<category><![CDATA[MediaTemple]]></category>

		<category><![CDATA[new]]></category>

		<guid isPermaLink="false">http://phail.net/?p=25</guid>
		<description><![CDATA[Hurray, I finally purchased my very own Grid-Server with MediaTemple.  I had heard very good things, so I decided I should check out what all the buzz was about.
 

 
So far, I&#8217;m very happy, it&#8217;s fast, I love the control panel, and the move was relatively easy. Looking forward to some great hosting. 
]]></description>
			<content:encoded><![CDATA[<p>Hurray, I finally purchased my very own Grid-Server with MediaTemple.  I had heard very good things, so I decided I should check out what all the buzz was about.</p>
<p> </p>
<p><a href="http://www.mediatemple.net/go/order/?refdom=litespark.com" target="_blank"><img class="alignnone size-medium wp-image-26" title="mediatemple" src="http://phail.net/wp-content/uploads/2008/05/mediatemple-300x34.gif" alt="" width="300" height="34" /></a></p>
<p> </p>
<p>So far, I&#8217;m very happy, it&#8217;s fast, I love the control panel, and the move was relatively easy. Looking forward to some great hosting. <img src='http://phail.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/05/08/its-official-im-with-mediatemple/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dang, Nexon is Intense!</title>
		<link>http://phail.net/2008/05/05/dang-nexon-is-intense/</link>
		<comments>http://phail.net/2008/05/05/dang-nexon-is-intense/#comments</comments>
		<pubDate>Tue, 06 May 2008 00:41:04 +0000</pubDate>
		<dc:creator>Mike Wojo</dc:creator>
		
		<category><![CDATA[Ramblings]]></category>

		<category><![CDATA[2d]]></category>

		<category><![CDATA[convention]]></category>

		<category><![CDATA[games]]></category>

		<category><![CDATA[Maple]]></category>

		<category><![CDATA[MapleStory]]></category>

		<category><![CDATA[mmorpg]]></category>

		<category><![CDATA[Nexon]]></category>

		<category><![CDATA[NX]]></category>

		<category><![CDATA[Story]]></category>

		<guid isPermaLink="false">http://phail.net/2008/05/05/dang-nexon-is-intense/</guid>
		<description><![CDATA[.flickr-photo { border: solid 2px #000000; } .flickr-yourcomment { } .flickr-frame { text-align: left; padding: 3px; } .flickr-caption { font-size: 0.8em; margin-top: 0px; }
 
07-11-08 Korea 07, originally uploaded by goodalefampics.

Wow, ever since the start of their 2D Side-Scrolling MMORPG (Massively Multiplayer Online Role Playing Game) MapleStory, developed by Wizet, I&#8217;ve been interested in this company [...]]]></description>
			<content:encoded><![CDATA[<style type='text/css'>.flickr-photo { border: solid 2px #000000; } .flickr-yourcomment { } .flickr-frame { text-align: left; padding: 3px; } .flickr-caption { font-size: 0.8em; margin-top: 0px; }</style>
<div class="flickr-frame"><a title="photo sharing" href="http://www.flickr.com/photos/12556474@N03/1943633962/"><img class="flickr-photo" src="http://farm3.static.flickr.com/2146/1943633962_f9c46a96f2.jpg" alt="" /></a> </p>
<p><span class="flickr-caption"><a href="http://www.flickr.com/photos/12556474@N03/1943633962/">07-11-08 Korea 07</a>, originally uploaded by <a href="http://www.flickr.com/people/12556474@N03/">goodalefampics</a>.</span></p>
</div>
<p class="flickr-yourcomment">Wow, ever since the start of their 2D Side-Scrolling MMORPG (Massively Multiplayer Online Role Playing Game) <a href="http://maplestory.nexon.net">MapleStory</a>, developed by Wizet, I&#8217;ve been interested in this company from South Korea.  They seem to just continuously pump out great websites, great games, and the obviously top of the line setups for conventions!</p>
<p>They have a North American division, and it started as NX Games and changed later to Nexon America.  Their flagship product was MapleStory, and to my knowledge it is still their biggest and most popular game, at least in America.</p>
<p>Wouldn&#8217;t it be cool to work for this company? <img src='http://phail.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/05/05/dang-nexon-is-intense/feed/</wfw:commentRss>
		</item>
		<item>
		<title>(mostly) Painless Illustration</title>
		<link>http://phail.net/2008/05/05/mostly-painless-illustration/</link>
		<comments>http://phail.net/2008/05/05/mostly-painless-illustration/#comments</comments>
		<pubDate>Mon, 05 May 2008 18:00:08 +0000</pubDate>
		<dc:creator>Mike Wojo</dc:creator>
		
		<category><![CDATA[Design]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[adobe]]></category>

		<category><![CDATA[Apple]]></category>

		<category><![CDATA[art]]></category>

		<category><![CDATA[color]]></category>

		<category><![CDATA[draw]]></category>

		<category><![CDATA[illustration]]></category>

		<category><![CDATA[illustrator]]></category>

		<category><![CDATA[iMac]]></category>

		<category><![CDATA[mostly]]></category>

		<category><![CDATA[painless]]></category>

		<category><![CDATA[pen]]></category>

		<category><![CDATA[scan]]></category>

		<category><![CDATA[tool]]></category>

		<category><![CDATA[tutorial]]></category>

		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://phail.net/?p=16</guid>
		<description><![CDATA[&#8230;using Adobe Illustrator.
Lately I&#8217;ve gotten into making simple illustrations for sites (like this one!).  I know that to most, my art isn&#8217;t amazing, but it works and it can be used to make a creative, cleanly designed website.
This is kind of a mini-tutorial, and isn&#8217;t terribly detailed, but shows the basics of how I make my [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230;using <strong>Adobe Illustrator.</strong></p>
<p>Lately I&#8217;ve gotten into making simple illustrations for sites (like this one!).  I know that to most, my art isn&#8217;t <em>amazing</em>, but it works and it can be used to make a creative, cleanly designed website.</p>
<p>This is kind of a <strong>mini-tutorial</strong>, and isn&#8217;t terribly detailed, but shows the basics of how I make my humble art.</p>
<p> <strong>    1. Draw it on paper!</strong></p>
<p>Here&#8217;s a little sample I sketched before:</p>
<p><a href="http://phail.net/wp-content/uploads/2008/05/mr_illus_1.jpg"><img class="alignnone size-medium wp-image-17" title="mr_illus_1" src="http://phail.net/wp-content/uploads/2008/05/mr_illus_1-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>This is the easiest part for me.  I am not that great of an artist, but it&#8217;s definitely easier to draw something on paper compared to trying to draw with a tablet or mouse.  Whatever you&#8217;re drawing, whether it be a logo or a potato, paper lets you be messy.  <strong>Go ahead, scribble or sketch, it&#8217;ll be refined later!</strong></p>
<p><strong>     2. Scan it or take a picture of it with a digital camera.</strong></p>
<p>(Below is a Canon PowerShot SD1000; Just an example of a nice Digital Camera.)</p>
<p><a href="http://phail.net/wp-content/uploads/2008/05/canon_powershot_sd1000.jpg"><img class="alignnone size-medium wp-image-18" title="canon_powershot_sd1000" src="http://phail.net/wp-content/uploads/2008/05/canon_powershot_sd1000.jpg" alt="" width="177" height="150" /></a></p>
<p> Instead of a digital camera, I use the iSight camera on my Apple iMac.  It&#8217;s conveniant (built in) and simple.  Just hold up the paper and snap a pic.  However, a camera or scanner will do just fine.</p>
<p>     <strong>3. Open up Illustrator and drag your scanned/captured image onto the canvas in a new layer.</strong></p>
<p>A new layer should be used so you can adjust opacity and see what you&#8217;re going to draw over it more clearly.</p>
<p>     <strong>4. <em>Pen Tool!</em></strong></p>
<p>Using the pen tool, trace over the outlines of the things you drew on paper (make sure to keep your pen tool created lines in a new layer over the original drawing!).  Also try to connect/close your pen tool shapes so you can fill them with colors or patterns after you&#8217;re done tracing.</p>
<p>     <strong>5. Color it!</strong></p>
<p>If you&#8217;ve closed/connected the shapes you drew with the pen tool, just fill everything with color you think would look good.  Adjust the order of your shapes in the layer if needed.  Be free and creative! <img src='http://phail.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
     <strong>6.</strong> <strong>Look at your finished product.</strong></p>
<p><a href="http://phail.net/wp-content/uploads/2008/05/mr_illus_sample.png"><img class="alignnone size-medium wp-image-19" title="mr_illus_sample" src="http://phail.net/wp-content/uploads/2008/05/mr_illus_sample-300x140.png" alt="" width="300" height="140" /></a></p>
<p>Does it look good? Is it how you like it?  If not, go back and fix or add some things.  Be creative with it.  Have fun.</p>
<p>And that&#8217;s it.  Yes, I know, this tutorial isn&#8217;t much better than the quality of my art, but I hope to help others learning to do Illustration like me. Good luck!  (By the way, I can probably attach pictures of using the pen tool and Illustrator, so let me know if that would be helpful to do.)</p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/05/05/mostly-painless-illustration/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP Class Practice: Creating a Simple Pet Script</title>
		<link>http://phail.net/2008/04/21/php-class-practice-creating-a-simple-pet-script/</link>
		<comments>http://phail.net/2008/04/21/php-class-practice-creating-a-simple-pet-script/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 18:12:13 +0000</pubDate>
		<dc:creator>Mike Wojo</dc:creator>
		
		<category><![CDATA[Codes &amp; Scripts]]></category>

		<category><![CDATA[Tutorials]]></category>

		<category><![CDATA[class]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[pet]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://phail.net/?p=14</guid>
		<description><![CDATA[For the vast majority of the time I&#8217;ve been programming I haven&#8217;t used Classes in my code. They are relatively new to me. Because of this, I decided to practice writing classes since I realized how useful they are. Here&#8217;s something I made when I was learning.
What We&#8217;re Making Today:
We&#8217;re going to be making a [...]]]></description>
			<content:encoded><![CDATA[<p>For the vast majority of the time I&#8217;ve been programming I haven&#8217;t used Classes in my code. They are relatively new to me. Because of this, I decided to practice writing classes since I realized how useful they are. Here&#8217;s something I made when I was learning.</p>
<p><strong>What We&#8217;re Making Today:</strong><br />
We&#8217;re going to be making a small script comprised of a class, called <strong>Pet</strong>, with variables and functions inside of it to perform actions. Also keep in mind that this is <em>extremely</em> simple and most likely cannot be used for anything outside of practice without heavy modification.</p>
<p><strong>Let&#8217;s Begin, Shall We?</strong></p>
<ol>
<li>Create a new file. Let&#8217;s call it <strong>pet.php</strong>.</li>
<li>Open up the file and prepare for editing! (I use Dreamweaver for most code editing, but you can use plenty of other programs like the built in TextEdit (Mac) and NotePad (Windows).</li>
<li>Always remember to save it as a PHP file! Saving it accidentally as .txt or .rtf will make it not work at all.</li>
</ol>
<p><strong>Now for some code.</strong></p>
<div class="codecolorer-container php"><div class="codecolorer" style="font-family: monospace;"><span class="co1">//Some class practice.</span><br />
<span class="kw2">class</span> Pet<br />
<span class="br0">&#123;</span></div></div>
<p>We&#8217;ve now started the file and recognized it&#8217;s a PHP document. Then we initiated the class &#8220;Pet&#8221;.</p>
<div class="codecolorer-container php"><div class="codecolorer" style="font-family: monospace;"><span class="kw2">var</span> <span class="re0">$name</span> = <span class="st0">&quot;&quot;</span>;<br />
<span class="kw2">var</span> <span class="re0">$age</span> = <span class="nu0">1</span>;<br />
<span class="kw2">var</span> <span class="re0">$fullness</span> = <span class="nu0">50</span>;<br />
<span class="kw2">var</span> <span class="re0">$health</span> = <span class="nu0">70</span>;<br />
<span class="kw2">public</span> <span class="re0">$dead</span> = <span class="kw2">false</span>;</div></div>
<p>We&#8217;ve now created the variables name, age, fullness, and health for the class to use, and a public variable &#8216;dead&#8217;.</p>
<div class="codecolorer-container php"><div class="codecolorer" style="font-family: monospace;"><span class="kw2">public</span> <span class="kw2">function</span> SetName<span class="br0">&#40;</span><span class="re0">$txt</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
<span class="re0">$this</span>-&gt;<span class="me1">name</span> = <span class="re0">$txt</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;p&gt;You have named your pet &quot;</span>.<span class="re0">$txt</span>.<span class="st0">&quot;.&quot;</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;Fullness: &quot;</span>.<span class="re0">$this</span>-&gt;<span class="me1">fullness</span>.<span class="st0">&quot; Health: &quot;</span>.<span class="re0">$this</span>-&gt;<span class="me1">health</span>.<span class="st0">&quot; Age: &quot;</span>.<span class="re0">$this</span>-&gt;<span class="me1">age</span>.<span class="st0">&quot;&quot;</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&quot;</span>;<br />
<span class="br0">&#125;</span></div></div>
<p>Now we have a <strong>public function</strong> (A function that can be used outside of just inside the class code) called SetName. By calling the function with a string parameter, you assign that string to the class variable $name. It also echoes some text telling you about the pet.</p>
<div class="codecolorer-container php"><div class="codecolorer" style="font-family: monospace;"><span class="kw2">public</span> <span class="kw2">function</span> GetName<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
<span class="kw1">return</span> <span class="re0">$this</span>-&gt;<span class="me1">name</span>;<br />
<span class="br0">&#125;</span></div></div>
<p>Since the variables we set earlier in the class (like $name) are <b>not public</b>, we can only access them through the inside code.  So, using this simple function called GetName(), we can retrieve the contents of the $name variable for that object.</p>
<div class="codecolorer-container php"><div class="codecolorer" style="font-family: monospace;"><span class="kw2">public</span> <span class="kw2">function</span> Feed<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
<span class="co1">//Increase pet's fullness by a random amount between 5 and 10.</span><br />
<span class="re0">$fulladd</span> = <a href="http://www.php.net/rand"><span class="kw3">rand</span></a><span class="br0">&#40;</span><span class="nu0">5</span>,<span class="nu0">10</span><span class="br0">&#41;</span>;<br />
<span class="re0">$this</span>-&gt;<span class="me1">fullness</span> += <span class="re0">$fulladd</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;/p&gt;&lt;p&gt;You have fed &quot;</span>.<span class="re0">$this</span>-&gt;<span class="me1">name</span>.<span class="st0">&quot; some food. Fullness increased by $fulladd.&lt;/p&gt;&quot;</span>;<br />
<span class="br0">&#125;</span></div></div>
<p>Every pet needs to be fed, right?  Well, since I said this is simple, we are just picking a number between 5 and 10 to add to it&#8217;s Fullness total.</p>
<div class="codecolorer-container php"><div class="codecolorer" style="font-family: monospace;"><span class="kw2">function</span> PassTime<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
<span class="co1">//Simulate some sort of reality I suppose..</span><br />
<span class="re0">$this</span>-&gt;<span class="me1">fullness</span> -= <span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me1">fullness*</span>.<span class="nu0">10</span><span class="br0">&#41;</span><span class="nu0">+5</span>;<br />
<span class="re0">$this</span>-&gt;<span class="me1">health</span> -= <span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me1">health*</span><span class="br0">&#40;</span><a href="http://www.php.net/rand"><span class="kw3">rand</span></a><span class="br0">&#40;</span><span class="nu0">10</span>,<span class="nu0">25</span><span class="br0">&#41;</span>/<span class="nu0">100</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="nu0">+2</span>;<br />
<span class="co1">//Make sure stats are whole numbers</span><br />
<span class="re0">$this</span>-&gt;<span class="me1">fullness</span> = <a href="http://www.php.net/ceil"><span class="kw3">ceil</span></a><span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me1">fullness</span><span class="br0">&#41;</span>;<br />
<span class="re0">$this</span>-&gt;<span class="me1">health</span> = <a href="http://www.php.net/ceil"><span class="kw3">ceil</span></a><span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me1">health</span><span class="br0">&#41;</span>;<br />
<span class="co1">//Increase age by a day? (Not really logical, but oh well.)</span><br />
<span class="re0">$this</span>-&gt;<span class="me1">age</span> += <span class="nu0">1</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;p style='color:#999999;'&gt;&quot;</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;Some time has passed.&lt;br /&gt;&quot;</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;Fullness: &quot;</span>.<span class="re0">$this</span>-&gt;<span class="me1">fullness</span>.<span class="st0">&quot; Health: &quot;</span>.<span class="re0">$this</span>-&gt;<span class="me1">health</span>.<span class="st0">&quot; Age: &quot;</span>.<span class="re0">$this</span>-&gt;<span class="me1">age</span>.<span class="st0">&quot;&quot;</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;/p&gt;&quot;</span>;<br />
<span class="br0">&#125;</span></div></div>
<p>Alrighty, this is a fun one.  We&#8217;re pretty much giving a little illustion that there&#8217;s time with our little pet.  We&#8217;re decreasing it&#8217;s fullness by 10% plus 5 (so it <i>can</i> die eventually), decreasing it&#8217;s hunger by a random percentage between 10% and 25% plus 2 (same reason as fullness), and using the php function <b>ceil</b> to round the numbers up so they are whole numbers.  We&#8217;re then increasing age by one count (a day perhaps?), making the text color gray, and echo&#8217;ing out what happened to the screen.</p>
<div class="codecolorer-container php"><div class="codecolorer" style="font-family: monospace;"><span class="kw2">public</span> <span class="kw2">function</span> Killed<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
<span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me1">fullness</span> &lt; = <span class="nu0">0</span> || <span class="re0">$this</span>-&gt;<span class="me1">health</span> &lt; = <span class="nu0">0</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;p style='color:red;'&gt;Your pet, &lt;b&gt;&quot;</span>.<span class="re0">$this</span>-&gt;<span class="me1">name</span>.<span class="st0">&quot;&lt;/b&gt;, is now in pet heaven.&quot;</span>;<br />
<span class="re0">$this</span>-&gt;<span class="me1">dead</span> = <span class="kw2">true</span>;<br />
<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div></div>
<p>This function checks to see if the pet has died due to hunger and health failure.  Once it&#8217;s fullness or health reach 0 or lower, the pet &#8220;goes to a better place&#8221;. <img src='http://phail.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Notice that it&#8217;s variable $dead is set true.  This will be used for exiting the loop later on.</p>
<div class="codecolorer-container php" style="height:35px;"><div class="codecolorer" style="font-family: monospace;"><span class="br0">&#125;</span></div></div>
<p>Close up our class and we&#8217;re ready for the main part: The Loop!</p>
<p>We&#8217;re going to be using a loop to simulate a created pet&#8217;s life.  This loop will keep going as long as the pet is alive, and stop when it dies.</p>
<div class="codecolorer-container php"><div class="codecolorer" style="font-family: monospace;"><span class="co1">//Demonstrate the Pet class!</span><br />
<span class="re0">$Fluffy</span> = <span class="kw2">new</span> Pet;<br />
<span class="re0">$Fluffy</span>-&gt;<span class="me1">SetName</span><span class="br0">&#40;</span><span class="st0">&quot;Fluffy The Sheep&quot;</span><span class="br0">&#41;</span>;</div></div>
<p>We&#8217;ve created our pet and set his name to &#8220;Fluffy The Sheep&#8221;.</p>
<div class="codecolorer-container php"><div class="codecolorer" style="font-family: monospace;"><span class="kw1">while</span><span class="br0">&#40;</span><span class="re0">$Fluffy</span>-&gt;<span class="me1">dead</span> == <span class="kw2">false</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
<br />
<span class="kw1">if</span><span class="br0">&#40;</span><a href="http://www.php.net/rand"><span class="kw3">rand</span></a><span class="br0">&#40;</span><span class="nu0">1</span>,<span class="nu0">3</span><span class="br0">&#41;</span> == <span class="nu0">1</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
<span class="re0">$Fluffy</span>-&gt;<span class="me1">Feed</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="br0">&#125;</span><br />
<br />
<span class="re0">$Fluffy</span>-&gt;<span class="me1">PassTime</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="re0">$Fluffy</span>-&gt;<span class="me1">Killed</span><span class="br0">&#40;</span><span class="br0">&#41;</span>; <span class="co1">//Is our poor pet deceased?</span><br />
<span class="br0">&#125;</span></div></div>
<p>The final part is the loop.  Like I said before, the loop keeps going as long as the pet is alive.  Once it is dead (determined by the Killed() function), it&#8217;s state changes and the loop exits.</p>
<p>And there you have it! Try running the program and see your little pet in action. Feel free to also customize the experience (name it!).  I hope you were able to learn something new out of this. <img src='http://phail.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Happy coding!</p>
<p>(By the way, using these settings my pet lived to be around 12-14 age.)</p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/04/21/php-class-practice-creating-a-simple-pet-script/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My Little 1337 (leet) Speak Generator</title>
		<link>http://phail.net/2008/04/15/my-little-1337-leet-speak-generator/</link>
		<comments>http://phail.net/2008/04/15/my-little-1337-leet-speak-generator/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 18:24:06 +0000</pubDate>
		<dc:creator>Mike Wojo</dc:creator>
		
		<category><![CDATA[Codes &amp; Scripts]]></category>

		<category><![CDATA[1337]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[leet]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://phail.net/?p=9</guid>
		<description><![CDATA[For fun in class the other day, I wrote a little &#8220;1337&#8243; speak generator.  It&#8217;s written in PHP, and it consists of just one small script page.  (It has also come to my attention that there are various degrees of 1337, so I would consider my translation to be somewhat advanced.  1337 translation help from [...]]]></description>
			<content:encoded><![CDATA[<p>For fun in class the other day, I wrote a little &#8220;1337&#8243; speak generator.  It&#8217;s written in PHP, and it consists of just one small script page.  (It has also come to my attention that there are various degrees of 1337, so I would consider my translation to be somewhat advanced.  1337 translation help from Wikipedia.)</p>
<p>Try it <a title="1337!!!11" href="http://phail.net/i-s/1337.php" target="_blank">here</a>.</p>
<div class="codecolorer-container php"><div class="codecolorer" style="font-family: monospace;"><span class="coMULTI">/* Leet (1337) Speak generator! */</span><br />
<span class="coMULTI">/* Takes ordinary words and turns them to computer geek gibberish. */</span><br />
<br />
<span class="co1">//Lets be able to use all those Post variables easily.</span><br />
<a href="http://www.php.net/extract"><span class="kw3">extract</span></a><span class="br0">&#40;</span><span class="re0">$_POST</span><span class="br0">&#41;</span>;<br />
<br />
<span class="co1">//Convert the text?</span><br />
<span class="kw1">if</span><span class="br0">&#40;</span>!<a href="http://www.php.net/empty"><span class="kw3">empty</span></a><span class="br0">&#40;</span><span class="re0">$to_convert</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="re0">$old</span> = <span class="re0">$to_convert</span>; <span class="co1">//Keep old text</span><br />
&nbsp; &nbsp; <span class="re0">$find</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">'a'</span>,<span class="st0">'b'</span>,<span class="st0">'c'</span>,<span class="st0">'d'</span>,<span class="st0">'e'</span>,<span class="st0">'f'</span>,<span class="st0">'g'</span>,<span class="st0">'h'</span>,<span class="st0">'i'</span>,<span class="st0">'j'</span>,<span class="st0">'k'</span>,<span class="st0">'l'</span>,<span class="st0">'m'</span>,<span class="st0">'n'</span>,<span class="st0">'o'</span>,<span class="st0">'p'</span>, <span class="st0">'q'</span>,<span class="st0">'r'</span>,<span class="st0">'s'</span>,<span class="st0">'t'</span>,<span class="st0">'u'</span>,<span class="st0">'v'</span>,<span class="st0">'w'</span>,<span class="st0">'x'</span>,<span class="st0">'y'</span>,<span class="st0">'z'</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="re0">$repl</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">'4'</span>,<span class="st0">'8'</span>,<span class="st0">&quot;&amp;copy;&quot;</span>,<span class="st0">'[)'</span>,<span class="st0">'3'</span>,<span class="st0">'|='</span>,<span class="st0">'6'</span>,<span class="st0">'#'</span>,<span class="st0">'1'</span>,<span class="st0">'_|'</span>,<span class="st0">'|&lt; '</span>,<span class="st0">'1'</span>,<span class="st0">'|v|'</span>,<span class="st0">'N'</span>,<span class="st0">'0'</span>,<span class="st0">'|*'</span>,<span class="st0">'Q'</span>,<span class="st0">'R'</span>,<span class="st0">'5'</span>,<span class="st0">'7'</span>,<span class="st0">'(_)'</span>,<span class="st0">'V'</span>,<span class="st0">'VV'</span>,<span class="st0">'&gt;&lt; '</span>,<span class="st0">'Y'</span>,<span class="st0">'2'</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="re0">$to_convert</span> = <a href="http://www.php.net/str_replace"><span class="kw3">str_replace</span></a><span class="br0">&#40;</span><span class="re0">$find</span>,<span class="re0">$repl</span>,<a href="http://www.php.net/strtolower"><span class="kw3">strtolower</span></a><span class="br0">&#40;</span><span class="re0">$to_convert</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;p&gt;&lt;b&gt;&quot;</span>.<a href="http://www.php.net/nl2br"><span class="kw3">nl2br</span></a><span class="br0">&#40;</span><a href="http://www.php.net/stripslashes"><span class="kw3">stripslashes</span></a><span class="br0">&#40;</span><span class="re0">$to_convert</span><span class="br0">&#41;</span><span class="br0">&#41;</span>.<span class="st0">&quot;&lt;/b&gt;&lt;br /&gt;(&quot;</span>.<a href="http://www.php.net/nl2br"><span class="kw3">nl2br</span></a><span class="br0">&#40;</span><a href="http://www.php.net/stripslashes"><span class="kw3">stripslashes</span></a><span class="br0">&#40;</span><span class="re0">$old</span><span class="br0">&#41;</span><span class="br0">&#41;</span>.<span class="st0">&quot;)&quot;</span>;<br />
<span class="br0">&#125;</span><br />
<br />
<span class="co1">//No text to convert, must be the Main Page.</span><br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;form action='$PHP_SELF' method='post'&gt;&quot;</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;Text to be converted:&lt;br /&gt;&lt;textarea id='to_convert' name='to_convert' rows='20' cols='35'&gt;&lt;/textarea&gt;&quot;</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;br /&gt;&lt;input type='submit' value='1337 speak!'/&gt;&quot;</span>;<br />
<a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;&lt;/form&gt;&quot;</span>;</div></div>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/04/15/my-little-1337-leet-speak-generator/feed/</wfw:commentRss>
		</item>
		<item>
		<title>BootCamp/SP1 White Screen of Death: A Solution</title>
		<link>http://phail.net/2008/04/13/bootcampsp1-white-screen-of-death-a-solution/</link>
		<comments>http://phail.net/2008/04/13/bootcampsp1-white-screen-of-death-a-solution/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 00:46:32 +0000</pubDate>
		<dc:creator>Mike Wojo</dc:creator>
		
		<category><![CDATA[Bugs and Fixes]]></category>

		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Boot]]></category>

		<category><![CDATA[Camp]]></category>

		<category><![CDATA[Fix]]></category>

		<category><![CDATA[Solution]]></category>

		<guid isPermaLink="false">http://phail.net/?p=5</guid>
		<description><![CDATA[Like I mentioned in my previous post, I did end up fixing my iMac after the mistake of using a Service Pack 1 installation disc of Windows XP instead of a Service Pack 2 disc.  I also managed to do this without a single trip to the Apple store, and without erasing my hard drive. [...]]]></description>
			<content:encoded><![CDATA[<p>Like I mentioned in my previous post, I did end up fixing my iMac after the mistake of using a Service Pack 1 installation disc of Windows XP instead of a Service Pack 2 disc.  I also managed to do this without a single trip to the Apple store, and without erasing my hard drive. Here&#8217;s how I did it.</p>
<p><strong><em>Disclaimer:</em></strong><em> This guide is a combination of two tutorials I have read regarding the subject, each somewhat different, but taking the useful parts of each to create a better solution.  <strong>I am writing this guide to see if I can help others in a similar situation, however I cannot be responsible for anything that happens as a result of it.</strong></em><em>  All I can say is that this worked for me, and you should consider your options before trying anything.</em></p>
<p><strong>The Situation:</strong></p>
<ul>
<li>You recently used a service pack 1 disc of Windows XP with BootCamp on Leopard.</li>
<li>When your computer restarts, your screen is white/blank; nothing happens except Apple noise when turned on.</li>
<li>You have no real options to do anything; aka booting from disc, single user mode, disc selection, etc.</li>
<li>Upon restart and holding the option key, you see your mouse, but the computer freezes shortly after.</li>
</ul>
<p>If your situation sounds like this, hopefully this might be of help to you.</p>
<p><strong>Needed Supplies:</strong></p>
<ol>
<li>A FireWire (iLink) cable. (Male to Male connector; I used 6-pin version, bought at MicroCenter for about $20)</li>
<li>Another (working) Mac <strong>with Leopard</strong> and a FireWire port. (Hopefully this isn&#8217;t hard to find for you&#8230; Maybe ask some friends?  I&#8217;ve also read about people who have used an External Harddrive that connects through FireWire with Leopard installed on it)</li>
<li>A really great program called TestDisk. (Use from the working computer; You can find this program <a title="TestDisk" href="http://www.cgsecurity.org/wiki/TestDisk" target="_blank">here</a>, and don&#8217;t worry, it&#8217;s free.)</li>
</ol>
<p>That should be all you need. When you&#8217;re ready, <em>cautiously</em> being the steps below.</p>
<p><strong>What to Do:</strong></p>
<ol>
<li>Turn off both the working and non-working computers.</li>
<li>Turn the <strong>working</strong> computer on while holding the T-key.  If successful, you should see the FireWire symbol floating around the screen, indicating that you are in Target Disc Mode.</li>
<li>Now turn on the <strong>non-working</strong> computer, and hold the Option-key.  After a few seconds you should see your mouse and an icon that Idenitifies the other computer&#8217;s connection to you.  <strong>Quickly click that icon before your computer freezes!</strong> (Both the Icon <em>and</em> the arrow beneath it I&#8217;d say) (Also, don&#8217;t worry just yet if nothing shows up except the mouse when you restart holding Option-key.  The same thing happened to me, but just keep trying it over and over until you see it.)</li>
<li>Once you&#8217;ve clicked it however many times and the computer has frozen, turn off the non-working computer and restart it once more.  The computer should boot up using the hard drive of the working computer!</li>
<li>When your computer logs in, it will say that there is a &#8220;DIsk that cannot be read&#8221; and give you the options to Initialize, Ignore or Eject.  Choose Ignore. (This is your non-working harddrive FYI)</li>
<li>Navigate to Applications-&gt;Utilities-&gt;Terminal and open Terminal.</li>
<li>You should have downloaded TestDisk as mentioned in the supplies list (if not, download it now!), so you must change directories to the TestDisk directory in Terminal.<br />
<strong>Type <em>cd</em> followed by a space, and drag the downloaded TestDisk directory onto the terminal. </strong>Press Enter/Return. If that worked, you should be in the TestDisk directory.</li>
<li>Now you must begin TestDisk.<br />
<strong>Type sudo ./testdisk</strong></li>
<li>TestDisk should now be opened.  If you need to, make the terminal window bigger like it says.<br />
You&#8217;ll be given a few options&#8230;</li>
<li>Choose &#8220;Create&#8221; for the log file.</li>
<li>Select your HardDrive. (Typically /dev/disk0)</li>
<li>Choose &#8220;EFI_GPT&#8221;</li>
<li>Choose &#8220;Analyse&#8221;</li>
<li>Choose &#8220;Quick Search&#8221;</li>
<li>It&#8217;ll now be searching and will show progress and such; wait for it to complete.  When it&#8217;s done, check the listed partitions for accuracy.<br />
You should have one labeled EFI (about 200MB in size), one labeled BOOTCAMP, and one for for Mac that&#8217;s the largest.<br />
If that&#8217;s correct and you feel confident about it, press enter to continue.</li>
<li>Choose &#8220;Write&#8221; and follow any instructions.  This will write your hard drive partition map.</li>
<li>End the TestDisk program. (Quit)<br />
When I quit the program, my drives were on my Desktop. (Macintosh HD, EFI, and BOOTCAMP) If yours aren&#8217;t, I would try using TestDisk again.</li>
<li>Shut down the non-working computer, and then turn off the other one that&#8217;s connected through FireWire and remove the cable connecting them.</li>
<li>Start up the non-working machine, and it should work alright now and startup. (At least that&#8217;s how mine was)</li>
<li>When you turn on the computer and login, you&#8217;ll notice the other two disks (EFI and BOOTCAMP) are on your Desktop as well as Macintosh HD. <strong>(Optional)</strong> To fix this, I just opened up Disk Utility (Applications-&gt;Utilities), selected my hard drive, went to the Partition tab, and hit the - (Minus) button for the EFI and BOOTCAMP drives.  I then dragged my &#8220;Macintosh HD&#8221; partition&#8217;s bottom-right corner to fill the whole space.</li>
</ol>
<div>And there you have it.  If you&#8217;ve followed everything and you&#8217;ve gotten your Mac back in working condition, then congratulations!<br />
 </div>
<div><strong>Credits:</strong> Thanks to Dave (Euphoria922) from the Apple support forum for the majority of the technical steps mentioned in this article (<a title="Original post" href="http://discussions.apple.com/thread.jspa?messageID=6735677&amp;#6735677" target="_blank">original post here</a>) and to the various other people who wrote the posts that I did my research on.</div>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/04/13/bootcampsp1-white-screen-of-death-a-solution/feed/</wfw:commentRss>
		</item>
		<item>
		<title>BootCamp + Windows XP SP1 = Epic Phail</title>
		<link>http://phail.net/2008/04/10/bootcamp-windows-xp-sp1-epic-phail/</link>
		<comments>http://phail.net/2008/04/10/bootcamp-windows-xp-sp1-epic-phail/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 18:26:16 +0000</pubDate>
		<dc:creator>Mike Wojo</dc:creator>
		
		<category><![CDATA[Ramblings]]></category>

		<category><![CDATA[20"]]></category>

		<category><![CDATA[Aluminum]]></category>

		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Boot]]></category>

		<category><![CDATA[Camp]]></category>

		<category><![CDATA[Dead]]></category>

		<category><![CDATA[Duo]]></category>

		<category><![CDATA[Fix]]></category>

		<category><![CDATA[iMac]]></category>

		<category><![CDATA[Intel]]></category>

		<category><![CDATA[Leopard]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Problem]]></category>

		<category><![CDATA[Screen]]></category>

		<category><![CDATA[Solution]]></category>

		<category><![CDATA[SP1]]></category>

		<category><![CDATA[White]]></category>

		<category><![CDATA[Windows]]></category>

		<category><![CDATA[XP]]></category>

		<guid isPermaLink="false">http://phail.net/?p=3</guid>
		<description><![CDATA[Well, unfortunately for me I ran across a problem while using my gorgeous 20-inch aluminum iMac Intel Duo I purchased somewhat recently.  I decided that I would install Windows XP through BootCamp, even though I already had Parallels with XP on it. (What was I thinking?)  So I start it up, get the installation going, [...]]]></description>
			<content:encoded><![CDATA[<p>Well, unfortunately for me I ran across a problem while using my gorgeous 20-inch aluminum iMac Intel Duo I purchased somewhat recently.  I decided that I would install Windows XP through BootCamp, even though I already had Parallels with XP on it. (What was I thinking?)  So I start it up, get the installation going, but when I go to pick the partition, it was looked quite odd to me seeing that there was only one partition and it was much larger than I set BootCamp to give Windows.  So, I exited thinking I&#8217;d avoid problems.</p>
<p>Wrong.</p>
<p>Upon restarting the computer, it was rendered nearly useless. The only thing that I saw was a blank white screen along with the familiar sound of the Apple start-up noise. I pretty much panicked.  It wouldn&#8217;t load from CD, it wouldn&#8217;t recognize anything (including any operating system whether it be Windows or Mac) and to make it even worse, there seemed to be very little help available online to help fix my problem.  So there sat my Mac; a very pretty paperweight.</p>
<p>For the next day and a half I searched the Internet vigorously for some kind of solution.  I did manage to find two useful articles.  I took the two articles and sort of combined them to fix my Mac.</p>
<p>From what I can tell now, it is a problem with BootCamp and SP1 where it deletes or corrupts the partition map.  Once I can put everything together, I&#8217;ll post an in-depth guide to fixing your Mac if it is experiencing a problem like I&#8217;ve had.</p>
<p>Oh, and for the record, I still and always have loved Macs, and this doesn&#8217;t change that.  If anything it brings me closer to my machine. <img src='http://phail.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/04/10/bootcamp-windows-xp-sp1-epic-phail/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.395 seconds -->
