<?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>Vladimir Cvetic</title>
	<atom:link href="http://www.hazaah.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hazaah.com</link>
	<description>buffle the world</description>
	<lastBuildDate>Thu, 12 Nov 2009 14:30:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Movies to watch during new year vacation</title>
		<link>http://www.hazaah.com/something-else/movies-to-watch-during-new-year-vacation/</link>
		<comments>http://www.hazaah.com/something-else/movies-to-watch-during-new-year-vacation/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 14:18:20 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Something Else]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/?p=180</guid>
		<description><![CDATA[This list is mostly for personal use, but if it helped u I&#8217;m glad :).
2012 &#8211; Global cataclysm, seems nice and different.
Couples Retreat &#8211; Comedy &#8211; After watching few trailers this might be the really nice move, funny (in embarrassing way)
The Men Who Stare at Goats &#8211; This looks awesome! Been waiting for Kevin to [...]]]></description>
			<content:encoded><![CDATA[<p>This list is mostly for personal use, but if it helped u I&#8217;m glad :).</p>
<p><b><a href="http://www.imdb.com/title/tt1190080/">2012</a></b> &#8211; Global cataclysm, seems nice and different.<br />
<b><a href="http://www.imdb.com/title/tt1078940/">Couples Retreat</a></b> &#8211; Comedy &#8211; After watching few trailers this might be the really nice move, funny (in embarrassing way)<br />
<b><a href="http://www.imdb.com/title/tt1234548/">The Men Who Stare at Goats</a></b> &#8211; This looks awesome! Been waiting for Kevin to make another film for some time.<br />
<b><a href="http://www.imdb.com/title/tt0361748/">Inglorious Bastards</a></b> &#8211; Still haven&#8217;t watched this, so also another must see.<br />
(* snatched)<b><a href="http://www.imdb.com/title/tt0494238/">Inkheart</a></b> &#8211; Even tho a lot of people look down on this type of movies I always enjoyed them. Easy and fun movie to watch.<br />
(* snatched)<b><a href="http://www.imdb.com/title/tt1152836/">Public Enemies</a></b> &#8211; Johnny Depp. End of story.<br />
-<br />
<b><a href="http://www.imdb.com/title/tt1054606/">The Imaginarium of Doctor Parnassus</a></b> &#8211; Both me and my gf always loved Johnny Depp&#8217;s movies. This one goes to cinemas on 25th of dec, so if by some miracle I manage to find it on torrents it will be definite pick.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/something-else/movies-to-watch-during-new-year-vacation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tune-up (speed up) Eclipse</title>
		<link>http://www.hazaah.com/something-else/tune-up-speed-up-eclipse/</link>
		<comments>http://www.hazaah.com/something-else/tune-up-speed-up-eclipse/#comments</comments>
		<pubDate>Tue, 12 May 2009 07:59:05 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Something Else]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/something-else/tune-up-speed-up-eclipse/</guid>
		<description><![CDATA[Another note to self&#8230;
If your PC (mac or whatever crap u have there :P) has 1gb of ram use following flags when running eclipse:
-vmargs -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m
If you have any more ram on your setup replace 512 with [amount of ram]/2 and 128 with [amount of ram]/4 and you will get decent results.
PS.
Assigning more [...]]]></description>
			<content:encoded><![CDATA[<p>Another note to self&#8230;<br />
If your PC (mac or whatever crap u have there :P) has 1gb of ram use following flags when running eclipse:<br />
-vmargs -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m</p>
<p>If you have any more ram on your setup replace 512 with [amount of ram]/2 and 128 with [amount of ram]/4 and you will get decent results.</p>
<p>PS.<br />
Assigning more then 1gb of ram to eclipse will proly not give you any better performance then on 1gb.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/something-else/tune-up-speed-up-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aptana (eclipse) YUI compressor</title>
		<link>http://www.hazaah.com/programming/javascript/aptana-eclipse-yui-compressor/</link>
		<comments>http://www.hazaah.com/programming/javascript/aptana-eclipse-yui-compressor/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 10:24:01 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/?p=157</guid>
		<description><![CDATA[This post is mostly note to self&#8230; but some may find it useful.
For javascript compression, merging etc on Aptana (&#8230;eclipse&#8230;) use:
http://www.rockstarapps.com/joomla-1.5.8/products/downloads.html
]]></description>
			<content:encoded><![CDATA[<p>This post is mostly note to self&#8230; but some may find it useful.</p>
<p>For javascript compression, merging etc on Aptana (&#8230;eclipse&#8230;) use:<br />
<a href="http://www.rockstarapps.com/joomla-1.5.8/products/downloads.html">http://www.rockstarapps.com/joomla-1.5.8/products/downloads.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/programming/javascript/aptana-eclipse-yui-compressor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash job queuing: Task Spooler</title>
		<link>http://www.hazaah.com/programming/bash-job-queuing-task-spooler/</link>
		<comments>http://www.hazaah.com/programming/bash-job-queuing-task-spooler/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 15:19:02 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/?p=155</guid>
		<description><![CDATA[Today I found nifty little tool for queuing bash jobs, Task Spooler.
Imagine you hava list of jobs that are dependant on each other.
First job converts video from one format to another, second job should trigger if first job was successful and do some status updating. This is exactly a thing Task Spooler will help you [...]]]></description>
			<content:encoded><![CDATA[<p>Today I found nifty little tool for queuing bash jobs, <a href="http://vicerveza.homeunix.net/~viric/soft/ts/">Task Spooler</a>.</p>
<p>Imagine you hava list of jobs that are dependant on each other.<br />
First job converts video from one format to another, second job should trigger if first job was successful and do some status updating. This is exactly a thing Task Spooler will help you with.<br />
It will prevent simultaneous video conversions by queuing them to run one after another.</p>
<p>Downside is that it listens to port 80 and I haven&#8217;t found a way to change that port. This is a &#8220;bad&#8221; thing because most people have apache listening on port 80 too, so to restart apache you will need to kill all Task Spooler processes or you will get an error that goes something like this:<br />
<em>Address already in use: make_sock: could not bind to address 0.0.0.0:80<br />
no listening sockets available, shutting down</em>.</p>
<p>I will probably play with it some more and try to build out of the box methods for callbacks&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/programming/bash-job-queuing-task-spooler/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>toGDImage() broken: Patching ffmpeg-php 0.6.0</title>
		<link>http://www.hazaah.com/programming/togdimage-broken-patching-ffmpeg-php-060/</link>
		<comments>http://www.hazaah.com/programming/togdimage-broken-patching-ffmpeg-php-060/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 17:51:40 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/?p=152</guid>
		<description><![CDATA[As fallow-up to previous post (link).

After toying with fresh ffmpeg-php 0.6.0 I kept getting error:
Fatal error: failed to convert frame to gd image

Problem lies in broken function _php_avframe_to_gd_image in ffmpeg_frame.c, in the base ffmpeg-php package.
To fix this problem download this patch file and apply it to ffmpeg_frame.c like so:

cd /path/to/ffmpeg-php-0.6.0/
wget http://hazaah.com/download/ffmpeg_frame.c.patch
patch -p0 ffmpeg_frame.c < ffmpeg_frame.c.patch

Reinstall [...]]]></description>
			<content:encoded><![CDATA[<p>As fallow-up to previous post (<a href="http://www.hazaah.com/ubuntu/how-to-ffmpeg-ffmpeg-php-lame-libogg-libvorbis-flvtool2-mplayer-mencoder-amr/">link</a>).</p>
<p>
After toying with fresh ffmpeg-php 0.6.0 I kept getting error:<br />
<em>Fatal error: failed to convert frame to gd image</em>
</p>
<p>Problem lies in broken function _php_avframe_to_gd_image in ffmpeg_frame.c, in the base ffmpeg-php package.<br />
To fix this problem <strong><a href="http://hazaah.com/download/ffmpeg_frame.c.patch">download this patch file</a></strong> and apply it to ffmpeg_frame.c like so:</p>
<pre>
cd /path/to/ffmpeg-php-0.6.0/
wget http://hazaah.com/download/ffmpeg_frame.c.patch
patch -p0 ffmpeg_frame.c < ffmpeg_frame.c.patch
</pre>
<p>Reinstall ffmpeg-php &#038;&#038; restart apache.</p>
<p>Thats all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/programming/togdimage-broken-patching-ffmpeg-php-060/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How-to: FFmpeg, FFmpeg-PHP, Lame, Libogg, Libvorbis, FLVtool2, Mplayer, Mencoder, AMR</title>
		<link>http://www.hazaah.com/ubuntu/how-to-ffmpeg-ffmpeg-php-lame-libogg-libvorbis-flvtool2-mplayer-mencoder-amr/</link>
		<comments>http://www.hazaah.com/ubuntu/how-to-ffmpeg-ffmpeg-php-lame-libogg-libvorbis-flvtool2-mplayer-mencoder-amr/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 16:08:17 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/?p=149</guid>
		<description><![CDATA[This howto is written for Ubuntu 8.10 and is verified to work on 8.2.2009.
I found numerous tutorials on this subject out there but they all failed me, but combination of them all was successful. So fallowing is made from 10 different tutorials.
And for all those who will ask why not just apt-get php5-ffmpeg, answer is [...]]]></description>
			<content:encoded><![CDATA[<p>This howto is written for Ubuntu 8.10 and is verified to work on 8.2.2009.</p>
<p>I found numerous tutorials on this subject out there but they all failed me, but combination of them all was successful. So fallowing is made from 10 different tutorials.<br />
And for all those who will ask why not just apt-get php5-ffmpeg, answer is so we can configure ffmpeg with libs and options we need.</p>
<p><strong>Prepare</strong></p>
<pre>
apt-get update
apt-get upgrade
apt-get install libjpeg-progs libjpeg62 libjpeg62-dev libsdl1.2-dev php5-dev php5-cli php5-gd build-essential unzip
</pre>
<p><strong>Download files</strong></p>
<pre>
cd /usr/local/src
wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz
wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.6.0.tbz2
wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz
wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-7.0.0.2.tar.bz2
wget http://ftp.penguin.cz/pub/users/utx/amr/amrwb-7.0.0.3.tar.bz2
wget http://downloads.xiph.org/releases/theora/libtheora-1.0beta3.tar.gz
</pre>
<p><strong>Unpack packages</strong></p>
<pre>
tar zxvf lame-3.97.tar.gz
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.2.0.tar.gz
tar zxvf flvtool2-1.0.6.tgz
tar jxvf essential-20071007.tar.bz2
tar jxvf ffmpeg-php-0.6.0.tbz2
bzip2 -cd amrnb-7.0.0.2.tar.bz2 | tar xvf -
bzip2 -cd amrwb-7.0.0.3.tar.bz2 | tar xvf -
tar zxvf libtheora-1.0beta3.tar.gz
</pre>
<p><strong>Install Ruby on Rails, subversion &#038; ncurses</strong></p>
<pre>
apt-get install subversion ruby libcurses-ruby
</pre>
<p><strong>Fetch latest Mplayer and FFmpeg from trunk</strong></p>
<pre>
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd /usr/local/src/mplayer
svn update
</pre>
<p><strong>Copy codecs</strong></p>
<pre>
mkdir /usr/local/lib/codecs
mv /usr/local/src/essential-20071007/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
</pre>
<p><strong>Create TMP</strong></p>
<pre>
mkdir /usr/local/src/tmp
chmod 777 /usr/local/src/tmp
export TMPDIR=/usr/local/src/tmp
</pre>
<p><strong>Install lamemp3</strong></p>
<pre>
cd /usr/local/src/lame-3.97
./configure
make &#038;&#038; make install
</pre>
<p><strong>Install libogg</strong></p>
<pre>
cd /usr/local/src/libogg-1.1.3
./configure &#038;&#038; make &#038;&#038; make install
</pre>
<p><strong>Install libvorbis</strong></p>
<pre>
cd /usr/local/src/libvorbis-1.2.0
./configure &#038;&#038; make &#038;&#038; make install
</pre>
<p><strong>Install flvtool2</strong></p>
<pre>
cd /usr/local/src/flvtool2-1.0.6/
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install
</pre>
<p><strong>Install mplayer &#038; mencoder</strong></p>
<p>grab a snack</p>
<pre>cd /usr/local/src/mplayer
./configure --enable-jpeg
make &#038;&#038; make install</pre>
<p><strong>Install AMR</strong></p>
<pre>
cd /usr/local/src/amrnb-7.0.0.2
./configure
make &#038;&#038; make install

cd /usr/local/src/amrwb-7.0.0.3
./configure
make &#038;&#038; make install
</pre>
<p><strong>Install libtheora</strong></p>
<pre>
cd /usr/local/src/libtheora-1.0beta3
./configure
make &#038;&#038; make install
</pre>
<p><strong>Install ffmpeg</strong></p>
<pre>cd /usr/local/src/ffmpeg/
./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared --enable-libamr-nb --enable-libamr-wb --enable-nonfree --enable-libtheora</pre>
<pre>
make
make install
</pre>
<p><strong>Important:</strong> You will probably get errors such as: <em>ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file</em>, or some other library. To solve this problem you must create symbolic links. Universal code would go something like this:</p>
<pre>
ln -s /usr/local/lib/[YOUR LIB NAME]/usr/lib/[YOUR LIB NAME]
</pre>
<p>So, if you get error for libavdevice.so.52 [YOUR LIB NAME] would be libavdevice.so.52.<br />
Got it? Good, moving on&#8230;<br />
<strong>Install ffmpeg-php</strong></p>
<pre>
cd /usr/local/src/ffmpeg-php-0.6.0/
phpize
./configure --with-ffmpeg=/usr/local/ffmpeg
make
make install
</pre>
<pre>
echo 'extension=ffmpeg.so' >> /etc/php5/apache2/php.ini
/etc/init.d/apache2 restart
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/ubuntu/how-to-ffmpeg-ffmpeg-php-lame-libogg-libvorbis-flvtool2-mplayer-mencoder-amr/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Ferdinand.PhotoTag &#8211; Facebook like photo tagging</title>
		<link>http://www.hazaah.com/programming/php/ferdinandphototag-facebook-like-photo-tagging/</link>
		<comments>http://www.hazaah.com/programming/php/ferdinandphototag-facebook-like-photo-tagging/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 14:21:57 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/?p=147</guid>
		<description><![CDATA[I have just released very simple photo tagging solution. It works much like Facebook tagging and requires Prototype and optionally PHP5/MySQL (you can always make backend from scratch in any lang/db you wish&#8230; it requires novice skills).
Tested in Firefox, IE6+, Safari and Chrome.
Here is the link: http://ferdinand.rs/javascript/ferdinandphototag
]]></description>
			<content:encoded><![CDATA[<p>I have just released very simple photo tagging solution. It works much like Facebook tagging and requires Prototype and optionally PHP5/MySQL (you can always make backend from scratch in any lang/db you wish&#8230; it requires novice skills).</p>
<p>Tested in Firefox, IE6+, Safari and Chrome.</p>
<p>Here is the link: <a href="http://ferdinand.rs/javascript/ferdinandphototag">http://ferdinand.rs/javascript/ferdinandphototag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/programming/php/ferdinandphototag-facebook-like-photo-tagging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ferdinand.Slider &#8211; Javascript news slider</title>
		<link>http://www.hazaah.com/programming/ferdinand-slider/</link>
		<comments>http://www.hazaah.com/programming/ferdinand-slider/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 14:59:37 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/?p=121</guid>
		<description><![CDATA[Moved
Go to new addres >>

location.href="http://ferdinand.rs/javascript/ferdinandslider";

]]></description>
			<content:encoded><![CDATA[<h1>Moved</h1>
<p><a href="http://ferdinand.rs/javascript/ferdinandslider">Go to new addres >></a><br />
<script>
location.href="http://ferdinand.rs/javascript/ferdinandslider";
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/programming/ferdinand-slider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple PHP error handling</title>
		<link>http://www.hazaah.com/programming/simple-php-error-handling/</link>
		<comments>http://www.hazaah.com/programming/simple-php-error-handling/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 13:58:40 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/?p=111</guid>
		<description><![CDATA[Here is a very simple way of custom handling php errors.
To use code below, apart from including it in your functions file, you will need to call function display_debug(); at the end of every page (assuming you wish to display debug on every page).
Nifty feature is that you don&#8217;t have to worry about turning off [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a very simple way of custom handling php errors.<br />
To use code below, apart from including it in your functions file, you will need to call function display_debug(); at the end of every page (assuming you wish to display debug on every page).</p>
<p>Nifty feature is that you don&#8217;t have to worry about turning off debug on production version of your website. Simply populate $ips array with IP addresses you are using and debug will be displayed only to you.</p>
<p>To display mysql errors in this debug, use trigger_error function (example trigger_error($sql.&#8217; &#8216;.mysql_error($link) ,&#8217;DB_ERROR&#8217;);)</p>
<pre>
$ips = array('127.0.0.1','88.99.109.119');
set_error_handler("ErrorHandler");

function ErrorHandler($errno, $errstr, $errfile, $errline)
{
	global $error_handler;

	if (preg_match("/DB_ERROR/iUs", $errno))
	{
		$error_handler[] = "<strong>DB_ERROR*</strong> $errstr\n" . "Fatal error on line $errline in $errfile";
	}

    switch ($errno) {
   	case E_ERROR:
    case E_USER_ERROR:
        $error_handler[] = "<strong>E_USER_ERROR</strong> $errstr on line $errline in $errfile. $errstr\n";
        break;

    case E_WARNING:
	case E_USER_WARNING:
        $error_handler[] = "<strong>E_USER_WARNING</strong> on line $errline in $errfile. $errstr\n";
        break;

    case E_NOTICE:
	case E_USER_NOTICE:
        $error_handler[] = "<strong>NOTICE</strong> on line $errline in $errfile. $errstr\n";
        break;

	case E_PARSE:
        $error_handler[] = "<strong>E_PARSE</strong> on line $errline in $errfile. $errstr\n";
        break;

	case E_STRICT:
        $error_handler[] = "<strong>E_STRICT</strong> on line $errline in $errfile. $errstr\n";
        break;

	case E_DEPRECATED:
        $error_handler[] = "<strong>E_STRICT</strong> on line $errline in $errfile. $errstr\n";
        break;

    default:
        $error_handler[] = "<strong>UNKNOWN</strong> on line $errline in $errfile. $errstr\n";
        break;
    }
    return true;
}

function display_debug()
{
	global $error_handler, $_GET, $_POST, $_SERVER, $_SESSION, $_COOKIE, $_REQUEST, $ips;

	if (!in_array($_SERVER['REMOTE_ADDR'], $ips))
	{
		return;
	}
	?>
<style>
		#debug {
			background:#F9F7ED;
			font-family:Arial, Helvetica, sans-serif;
			font-size:12px;
			padding:10px;
			height:400px;
			width:98%;
			margin:30px auto;
			border:1px solid #333;
			overflow:auto;
		}
	</style>
<div id="debug">
		<?
		foreach($error_handler as $error)
		{
		?>
<p class="single_error">
				<?=$error?>
			

		<?
		}
		?>
<hr size="1" />
		<strong>$_GET</strong>
<pre><?print_r($_GET);?></pre>
<p>		<strong>$_POST</strong></p>
<pre><?print_r($_POST);?></pre>
<p>		<strong>$_REQUEST</strong></p>
<pre><?print_r($_REQUEST);?></pre>
<p>		<strong>$_COOKIE</strong></p>
<pre><?print_r($_REQUEST);?></pre>
<p>		<strong>$_SERVER</strong></p>
<pre><?print_r($_SERVER);?></pre>
<p>		<strong>$_SESSION</strong></p>
<pre><?print_r($_SESSION);?></pre>
</p></div>
<p>	<?<br />
}</p>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/programming/simple-php-error-handling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sort multi dimensional array</title>
		<link>http://www.hazaah.com/programming/sort-multi-dimensional-array/</link>
		<comments>http://www.hazaah.com/programming/sort-multi-dimensional-array/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 09:35:51 +0000</pubDate>
		<dc:creator>Vladimir Cvetic</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.hazaah.com/?p=109</guid>
		<description><![CDATA[
/*
 * Sort multi dimensional array
 *
 * @author Vladimir Cvetic < vladimir[ at ]ferdinand.rs >
 * @param $a array Array you wish to sort
 * @param $index mixed Value of the key by wich you wish to sort
 * @param $order string Sort direction
 * @param $natsort bool Natural sorting true or false
 * [...]]]></description>
			<content:encoded><![CDATA[<pre>
/*
 * Sort multi dimensional array
 *
 * @author Vladimir Cvetic < vladimir[ at ]ferdinand.rs >
 * @param $a array Array you wish to sort
 * @param $index mixed Value of the key by wich you wish to sort
 * @param $order string Sort direction
 * @param $natsort bool Natural sorting true or false
 * @param $case_sensitive bool Case sensitive true or false
 */
function Sort2dArray ($a, $index, $order='asc', $natsort=false, $case_sensitive=false)
{
	if(is_array($a) &#038;&#038; sizeof($a)>0)
	{
		foreach(array_keys($a) as $key)
			$temp[$key]=$a[$key][$index];
		if(!$natsort)
			($order=='asc')? asort($temp) : arsort($temp);
		else
		{
			($case_sensitive)? natsort($temp) : natcasesort($temp);
			if($order!='asc')
				$temp=array_reverse($temp,true);
		}
		foreach(array_keys($temp) as $key)
			(is_numeric($key))? $sorted[]=$a[$key] : $sorted[$key]=$a[$key];
		return $sorted;
	}
	return $a;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.hazaah.com/programming/sort-multi-dimensional-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
