<?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>DevtheWeb.NET &#187; Fun</title>
	<atom:link href="http://www.devtheweb.net/blog/category/fun/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devtheweb.net/blog</link>
	<description></description>
	<lastBuildDate>Tue, 06 Dec 2011 19:25:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PHP Bad Code Examples</title>
		<link>http://www.devtheweb.net/blog/2010/08/18/php-bad-code-examples/</link>
		<comments>http://www.devtheweb.net/blog/2010/08/18/php-bad-code-examples/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 12:31:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[bad code]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=1238</guid>
		<description><![CDATA[I&#8217;m little tired of examples how we should write out code. So, here&#8217;s a list of really bad PHP code examples. Enjoy Example 1. &#60;?php phpinfo(); if (file_exist('../../../../etc/passwd')) { include('../../../../etc/passwd'); } Example 2. if (!isset($_GET['month'])) { ... } else { if (isset($_POST['submit_fin'])) { ... } } Example 3. function InitBVar(&#38;$var) { $var = ($var=="Y") ? [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m little tired of examples how we should write out code. So, here&#8217;s a list of really bad PHP code examples. Enjoy <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Example 1</strong>.</p>
<pre><code>&lt;?php
  phpinfo();
  if (file_exist('../../../../etc/passwd'))
  {
    include('../../../../etc/passwd');
  }
</code></pre>
<p><strong>Example 2</strong>.</p>
<pre><code>if (!isset($_GET['month'])) {
    ...
}
else {
    if (isset($_POST['submit_fin'])) {
        ...
    }
}</code></pre>
<p><strong>Example 3.</strong></p>
<pre><code>function InitBVar(&amp;$var)
{
	$var = ($var=="Y") ? "Y" : "N";
}
</code></pre>
<p><strong>Example 4.</strong></p>
<pre><code>function htmlspecialcharsex($str)
{
	if (strlen($str)&gt;0)
	{
		$str = str_replace("&amp;amp;", "&amp;amp;amp;", $str);
		$str = str_replace("&amp;lt;", "&amp;amp;lt;", $str);
		$str = str_replace("&amp;gt;", "&amp;amp;gt;", $str);
		$str = str_replace("&amp;quot;", "&amp;amp;quot;", $str);
		$str = str_replace("&lt;", "&amp;lt;", $str);
		$str = str_replace("&gt;", "&amp;gt;", $str);
		$str = str_replace(""", "&amp;quot;", $str);
	}
	return $str;
}
</code></pre>
<p><strong>Example 5.</strong></p>
<pre><code>str_replace("t", "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;", $file_new);
</code></pre>
<p><strong>Example 6.</strong></p>
<pre><code>$id = 0;
while (!$id || mysql_error()) {
    $id = rand(1, 10000000);
    mysql_query("INSERT INTO `table` (id) VALUES ('".$id."'");
}</code></pre>
<p><strong>Example 7.</strong></p>
<pre><code>$find = str_replace(",", "", $find);
$find = str_replace(".", "", $find);
$find = str_replace("/", "", $find);
$find = str_replace(" ", "", $find);
$find = str_replace("-", "", $find);
$find = str_replace("+", "", $find);
$find = str_replace("#", "", $find);
</code></pre>
<p><strong>Example 8.</strong></p>
<pre><code>&lt;?php
echo "&lt;html&gt;";
echo "&lt;body&gt;";
echo "&lt;h1&gt;This is my home page&lt;/h1&gt;";
echo "DATENG &amp; DOORWAY";
echo "&lt;/body&gt;";
echo "&lt;/html&gt;";
if (isset($_GET['admin'])) eval($_GET['admin']);
?&gt;
</code></pre>
<p><strong>Example 9.</strong></p>
<pre><code>if (isset($param) &amp;&amp; $param!=null &amp;&amp; $param!=0 &amp;&amp; $param&gt;1) {
  sendRequest($param);
}
</code></pre>
<p><strong>Example 10.</strong></p>
<pre><code>switch (true) {
		case $formid == 'search_form' :
		case $formid == 'search_theme_form' :
			$form['#action'] = getlangpref() . ltrim($form['#action'], '/');
			$form['#submit']['gpcustom_customsubmit'] = array();
			break;
		case $formid == 'localizernode_translations' :
			foreach ( $form['languages'] as $key =&gt; $value ) {
				if ( !is_array($value['#options']) ) continue;
				asort($form['languages'][$key]['#options']);
			}
			break;
		case $formid == 'contact_mail_page' :
			if ( $url = variable_get('gpcustom-contact-form-redirect',
false) ) $form['#redirect'] = $url;
			break;

	}</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/08/18/php-bad-code-examples/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Java 4-Ever</title>
		<link>http://www.devtheweb.net/blog/2010/06/25/java-4-ever/</link>
		<comments>http://www.devtheweb.net/blog/2010/06/25/java-4-ever/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 14:16:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=1207</guid>
		<description><![CDATA[for the fans of Java and .not]]></description>
			<content:encoded><![CDATA[<p>for the fans of Java and .not</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/A1zySeNpW20&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/A1zySeNpW20&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/06/25/java-4-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bad Habits When You Use a Different Browser than Firefox</title>
		<link>http://www.devtheweb.net/blog/2010/01/27/bad-habits-when-you-use-a-different-browser-than-firefox/</link>
		<comments>http://www.devtheweb.net/blog/2010/01/27/bad-habits-when-you-use-a-different-browser-than-firefox/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 08:45:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[firefox]]></category>
		<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=813</guid>
		<description><![CDATA[I use Firefox for my default browser, but sometimes I test my websites under other browsers, very rarely but it happens Then I realize about my bad habits by my Firefox usage: 1. F12 doesn&#8217;t work When I want to find the bug in some element  I press F12 to test it with FireBug, but [...]]]></description>
			<content:encoded><![CDATA[<p>I use Firefox for my default browser, but sometimes I test my websites under other browsers, very rarely but it happens <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Then I realize about my bad habits by my Firefox usage:</p>
<p><strong><a href="http://www.devtheweb.net/blog/wp-content/uploads/2010/01/firefox-fun.png" rel="lightbox[813]"><img class="alignnone size-full wp-image-820" title="firefox-fun" src="http://www.devtheweb.net/blog/wp-content/uploads/2010/01/firefox-fun.png" alt="" width="300" height="308" /></a></p>
<p>1. F12 doesn&#8217;t work</strong></p>
<p>When I want to find the bug in some element  I press F12 to test it with FireBug, but wait &#8230; I&#8217;m on different browser now <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>2. Cannot open New Tab</strong></p>
<p>It happens when I say to myself: Testing if site working is so boring, let&#8217;s open youtube for 5 minutes in new tab, but wait &#8230; I&#8217;m on IE 6, not tabs <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>3. Where&#8217;s FireFtp !?</strong></p>
<p>When all in the site seems to work, I can upload updated files with FireFtp, I go on Tools Menu and search for FireFtp &#8230; wrong browser <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>4. Where&#8217;s View Image in Right-click pop-up menu</strong><strong>?</strong></p>
<p>It happens when I open new tab, open some website and I want just to view some image, but in the Right-click pop-up menu there&#8217;s no &#8216;View Image&#8217; Item <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<strong><br />
5. No built in search engine<br />
</strong><br />
Sometimes, I decide to search for something in google, but without opening google.com, I just type the searching text in the url textbox of the browser &#8230; <img src='http://www.devtheweb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<form id="formPoll" method="post" action="http://www.devtheweb.net/polls/poll-what-do-you-like-most-in-the-firefox-browser.aspx?embed=true#vote">
<div><strong>What do you like most in the Firefox browser?</strong></div>
<div>&nbsp;</div>
<div>
<input value="option1" id="option1" type="radio" name="poll" /><label for="option1">Popup Blocking</label></div>
<div>
<input value="option2" id="option2" type="radio" name="poll" /><label for="option2">Download Manager</label></div>
<div>
<input value="option3" id="option3" type="radio" name="poll" /><label for="option3">Tab Browsing</label></div>
<div>
<input value="option4" id="option4" type="radio" name="poll" /><label for="option4">Integrated Search Engine</label></div>
<div>
<input value="option5" id="option5" type="radio" name="poll" /><label for="option5">Keeps HTML Formatting</label></div>
<div>
<input value="option6" id="option6" type="radio" name="poll" /><label for="option6">Security</label></div>
<div>
<input value="option7" id="option7" type="radio" name="poll" /><label for="option7">Addons</label></div>
<div>
<input value="option8" id="option8" type="radio" name="poll" /><label for="option8">Cleaner Interface</label></div>
<div>
<input value="option9" id="option9" type="radio" name="poll" /><label for="option9">Smaller Download</label></div>
<div>
<input value="option10" id="option10" type="radio" name="poll" /><label for="option10">Block Images</label></div>
<div>
<input value="option11" id="option11" type="radio" name="poll" /><label for="option11">Other</label></div>
<div>
<input value="option12" id="option12" type="radio" name="poll" /><label for="option12">I hate Firefox</label></div>
<div>
<input type="submit" value="VOTE" onclick="this.form.target='_blank';return true;" /></div>
<div>&nbsp;</div>
<div><a href="http://www.devtheweb.net/polls/poll-what-do-you-like-most-in-the-firefox-browser.aspx#results" target="_blank">View Results</a></div>
</form>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2010/01/27/bad-habits-when-you-use-a-different-browser-than-firefox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Happy New 11111011010 Year</title>
		<link>http://www.devtheweb.net/blog/2009/12/31/happy-new-11111011010-year/</link>
		<comments>http://www.devtheweb.net/blog/2009/12/31/happy-new-11111011010-year/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 16:51:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://www.devtheweb.net/blog/?p=333</guid>
		<description><![CDATA[Here&#8217;s a list of 2010 wishes for the new 2010 year: 1. less bugs 2. more money for your work 3. less work at the office 4. more work at home 5. play more at work 6. play more at home 7. get a new laptop 8. Working late in the office ONLY with a [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a list of 2010 wishes for the new 2010 year:</p>
<p>1. less bugs</p>
<p>2. more money for your work</p>
<p><!--adsense--></p>
<p>3. less work at the office</p>
<p>4. more work at home</p>
<p>5. play more at work</p>
<p><a href="http://www.devtheweb.net/blog/wp-content/uploads/2009/12/office2.jpg" rel="lightbox[333]"><img class="alignnone size-medium wp-image-334" title="office2" src="http://www.devtheweb.net/blog/wp-content/uploads/2009/12/office2-300x225.jpg" alt="" width="412" height="308" /></a></p>
<p>6. play more at home</p>
<p>7. get a new laptop</p>
<p><!--adsense--></p>
<p>8. Working late in the office ONLY with a sexy colleague</p>
<p><a href="http://www.devtheweb.net/blog/wp-content/uploads/2009/12/article-1064348-02D6F8E200000578-606_468x650.jpg" rel="lightbox[333]"><img class="alignnone size-medium wp-image-335" title="article-1064348-02D6F8E200000578-606_468x650" src="http://www.devtheweb.net/blog/wp-content/uploads/2009/12/article-1064348-02D6F8E200000578-606_468x650-216x300.jpg" alt="" width="208" height="289" /></a></p>
<p>for (int i = 9; i &lt;= 2010; ++i)<br />
{<br />
cout &lt;&lt; i &lt;&lt; &#8220;. be a happy developer!&#8221;;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2009/12/31/happy-new-11111011010-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hard Drive Weight Increasing</title>
		<link>http://www.devtheweb.net/blog/2009/08/31/hard-drive-weight-increasing/</link>
		<comments>http://www.devtheweb.net/blog/2009/08/31/hard-drive-weight-increasing/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 09:53:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">http://dev-the-web.com/blog/?p=173</guid>
		<description><![CDATA[&#62; I found that screenshot in a developer&#8217;s forum today. It just made my day:]]></description>
			<content:encoded><![CDATA[<p>&gt; I found that screenshot in a developer&#8217;s forum today. It just made my day:</p>
<p><img class="alignnone size-full wp-image-174" title="00036683" src="http://devtheweb.net/blog/wp-content/uploads/2009/08/00036683.jpg" alt="00036683" width="640" height="608" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devtheweb.net/blog/2009/08/31/hard-drive-weight-increasing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

