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

<channel>
	<title>recurser</title>
	<atom:link href="http://recurser.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://recurser.com</link>
	<description></description>
	<pubDate>Tue, 24 Jun 2008 01:27:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Setup 64bit CentOS (PHP5, MySQL, memcached, ketama)</title>
		<link>http://recurser.com/articles/2008/06/23/setup-64bit-centos-php5-mysql-memcached-ketama/</link>
		<comments>http://recurser.com/articles/2008/06/23/setup-64bit-centos-php5-mysql-memcached-ketama/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 01:27:29 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Database]]></category>

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

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

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

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

		<guid isPermaLink="false">http://recurser.com/?p=83</guid>
		<description><![CDATA[A script to setup 64bit CentOS with PHP5, MySQL, memcached and ketama.]]></description>
			<content:encoded><![CDATA[	<p>I recently had to set up a few CentOS servers with <a href="http://php.net/">PHP</a> , <a href="http://www.mysql.com/">MySQL</a> , <a href="http://www.danga.com/memcached/">memcached</a> and <a href="http://www.audioscrobbler.net/development/ketama/">ketama</a>, and ended up writing this script to do it. You can <a href="http://svn.recurser.com/misc/build/">grab the whole thing from subversion</a> (you&#8217;ll need the php folder as well) or <a href="http://recurser.com/wp-content/uploads/2008/06/build.zip">download everything in a zip file</a> .</p>
<pre class="bash"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> ! -d src <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
    mkdir src
<span style="color: #b1b100;">fi</span>;
<span style="color: #000066;">cd</span> src
&nbsp;
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> ! -f php<span style="color: #cc66cc;">-5.2</span><span style="color: #cc66cc;">.5</span>.tar.gz <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
    wget http://jp2.php.net/get/php<span style="color: #cc66cc;">-5.2</span><span style="color: #cc66cc;">.5</span>.tar.gz/from/jp.php.net/mirror
    tar xvzf php<span style="color: #cc66cc;">-5.2</span><span style="color: #cc66cc;">.5</span>.tar.gz
    sudo yum remove httpd
<span style="color: #b1b100;">fi</span>;
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> ! -f memcached<span style="color: #cc66cc;">-1.2</span><span style="color: #cc66cc;">.5</span>.tar.gz <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
    wget http://www.danga.com/memcached/dist/memcached<span style="color: #cc66cc;">-1.2</span><span style="color: #cc66cc;">.5</span>.tar.gz
    tar xvzf memcached<span style="color: #cc66cc;">-1.2</span><span style="color: #cc66cc;">.5</span>.tar.gz
<span style="color: #b1b100;">fi</span>;
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> ! -d ketama <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
    svn co svn://svn.audioscrobbler.net/misc/ketama
    <span style="color: #000066;">cd</span> ketama/libketama
    sed -ri <span style="color: #ff0000;">&quot;s|PREFIX=/usr/local|PREFIX=/usr|&quot;</span> Makefile
<span style="color: #b1b100;">fi</span>;
&nbsp;
&nbsp;
sudo yum install \
    libxml2 libxml2-devel \
    openssl openssl-devel \
    pcre pcre-devel \
    bzip2 bzip2-devel \
    curl curl-devel \
    db4 db4-devel \
    libjpeg libjpeg-devel \
    libpng libpng-devel \
    freetype freetype-devel \
    gmp gmp-devel \
    libc-client-devel \
    openldap-devel \
    libmcrypt libmcrypt-devel \
    libmhash libmhash-devel \
    mysql-devel \
    ncurses-devel \
    unixODBC-devel \
    postgresql postgresql-devel \
    sqlite sqlite-devel \
    readline readline-devel \
    net-snmp net-snmp-devel \
    libtidy libtidy-devel \
    libxslt libxslt-devel \
    expat-devel \
    httpd-devel \
    libtool-ltdl libtool-ltdl-devel \
    krb5-libs krb5-devel \
    libevent libevent-devel \
    autoconf \
    bison \
    flex
&nbsp;
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> -d /usr/lib64 <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
    <span style="color: #000066;">export</span> <span style="color: #0000ff;">LDFLAGS=</span>-L/usr/lib64/mysql
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> ! -f /usr/lib/libexpat.so.32bit <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
        sudo mv /usr/lib/libexpat.so /usr/lib/libexpat.so.32bit
    <span style="color: #b1b100;">fi</span>;
    sudo rm -f /usr/lib/libexpat.so
    sudo ln -s /usr/lib64/libexpat.so /usr/lib/libexpat.so
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> ! -f /usr/lib/libdb<span style="color: #cc66cc;">-4.3</span>.so.32bit <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
        sudo mv /usr/lib/libdb<span style="color: #cc66cc;">-4.3</span>.so /usr/lib/libdb<span style="color: #cc66cc;">-4.3</span>.so.32bit
    <span style="color: #b1b100;">fi</span>;
    sudo rm -f /usr/lib/libdb<span style="color: #cc66cc;">-4.3</span>.so
    sudo ln -s /usr/lib64/libdb<span style="color: #cc66cc;">-4.3</span>.so /usr/lib/libdb<span style="color: #cc66cc;">-4.3</span>.so
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> ! -f /usr/lib/libltdl.so.32bit <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
        sudo mv /usr/lib/libltdl.so /usr/lib/libltdl.so.32bit
    <span style="color: #b1b100;">fi</span>;
    sudo rm -f /usr/lib/libltdl.so
    sudo ln -s /usr/lib64/libltdl.so /usr/lib/libltdl.so
&nbsp;
<span style="color: #b1b100;">fi</span>;
&nbsp;
<span style="color: #000066;">cd</span> ketama/libketama
make clean
make
sudo make install
<span style="color: #000066;">cd</span> ../../
<span style="color: #0000ff;">curr_dir=</span>`<span style="color: #000066;">pwd</span>`
<span style="color: #000066;">echo</span> <span style="color: #0000ff;">$<span style="color: #66cc66;">&#123;</span>curr_dir<span style="color: #66cc66;">&#125;</span></span>
rm -f php<span style="color: #cc66cc;">-5.2</span><span style="color: #cc66cc;">.5</span>/ext/ketama
ln -s <span style="color: #0000ff;">$<span style="color: #66cc66;">&#123;</span>curr_dir<span style="color: #66cc66;">&#125;</span></span>/ketama/php_ketama <span style="color: #0000ff;">$<span style="color: #66cc66;">&#123;</span>curr_dir<span style="color: #66cc66;">&#125;</span></span>/php<span style="color: #cc66cc;">-5.2</span><span style="color: #cc66cc;">.5</span>/ext/ketama
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> -d /usr/lib64 <span style="color: #66cc66;">&#93;</span>; <span style="color: #b1b100;">then</span>
    sudo rm -f /usr/lib64/libketama.so
    sudo ln -s /usr/lib/libketama.so /usr/lib64/
<span style="color: #b1b100;">fi</span>;
&nbsp;
<span style="color: #000066;">cd</span> memcached<span style="color: #cc66cc;">-1.2</span><span style="color: #cc66cc;">.5</span>
make clean
./configure
make
sudo make install
<span style="color: #000066;">cd</span> ../
&nbsp;
<span style="color: #000066;">cd</span> php<span style="color: #cc66cc;">-5.2</span><span style="color: #cc66cc;">.5</span>
make clean
rm -Rf autom4te.cache
./buildconf --force
&nbsp;
<span style="color: #ff0000;">'./configure'</span>  \
    <span style="color: #ff0000;">'--host=i686-redhat-linux-gnu'</span> \
    <span style="color: #ff0000;">'--build=i686-redhat-linux-gnu'</span> \
    <span style="color: #ff0000;">'--target=i386-redhat-linux'</span> \
    <span style="color: #ff0000;">'--prefix=/usr/local/php-5.2.5'</span>  \
    <span style="color: #ff0000;">'--bindir=/usr/bin'</span> \
    <span style="color: #ff0000;">'--sbindir=/usr/sbin'</span> \
    <span style="color: #ff0000;">'--sysconfdir=/etc'</span> \
    <span style="color: #ff0000;">'--datadir=/usr/share'</span> \
    <span style="color: #ff0000;">'--includedir=/usr/include'</span> \
    <span style="color: #ff0000;">'--libdir=/usr/lib'</span> \
    <span style="color: #ff0000;">'--libexecdir=/usr/libexec'</span> \
    <span style="color: #ff0000;">'--localstatedir=/var'</span> \
    <span style="color: #ff0000;">'--sharedstatedir=/usr/com'</span> \
    <span style="color: #ff0000;">'--mandir=/usr/share/man'</span> \
    <span style="color: #ff0000;">'--infodir=/usr/share/info'</span> \
    <span style="color: #ff0000;">'--cache-file=../config.cache'</span> \
    <span style="color: #ff0000;">'--with-libdir=lib'</span> \
    <span style="color: #ff0000;">'--with-config-file-path=/etc'</span> \
    <span style="color: #ff0000;">'--with-config-file-scan-dir=/etc/php.d'</span> \
    <span style="color: #ff0000;">'--disable-debug'</span> \
    <span style="color: #ff0000;">'--with-pic'</span> \
    <span style="color: #ff0000;">'--disable-rpath'</span> \
    <span style="color: #ff0000;">'--with-bz2'</span> \
    <span style="color: #ff0000;">'--with-curl'</span> \
    <span style="color: #ff0000;">'--with-exec-dir=/usr/bin'</span> \
    <span style="color: #ff0000;">'--with-freetype-dir=/usr/lib'</span> \
    <span style="color: #ff0000;">'--with-png-dir=/usr/lib'</span> \
    <span style="color: #ff0000;">'--enable-gd-native-ttf'</span> \
    <span style="color: #ff0000;">'--without-gdbm'</span> \
    <span style="color: #ff0000;">'--with-gettext'</span> \
    <span style="color: #ff0000;">'--with-gmp'</span> \
    <span style="color: #ff0000;">'--with-iconv'</span> \
    <span style="color: #ff0000;">'--with-jpeg-dir=/usr/lib'</span> \
    <span style="color: #ff0000;">'--with-openssl'</span> \
    <span style="color: #ff0000;">'--with-libexpat-dir=/usr/lib'</span> \
    <span style="color: #ff0000;">'--with-pcre-regex=/usr'</span> \
    <span style="color: #ff0000;">'--with-zlib'</span> \
    <span style="color: #ff0000;">'--with-layout=GNU'</span> \
    <span style="color: #ff0000;">'--enable-exif'</span> \
    <span style="color: #ff0000;">'--enable-ftp'</span> \
    <span style="color: #ff0000;">'--enable-magic-quotes'</span> \
    <span style="color: #ff0000;">'--enable-sockets'</span> \
    <span style="color: #ff0000;">'--enable-sysvsem'</span> \
    <span style="color: #ff0000;">'--enable-sysvshm'</span> \
    <span style="color: #ff0000;">'--enable-sysvmsg'</span> \
    <span style="color: #ff0000;">'--enable-track-vars'</span> \
    <span style="color: #ff0000;">'--enable-trans-sid'</span> \
    <span style="color: #ff0000;">'--enable-yp'</span> \
    <span style="color: #ff0000;">'--enable-wddx'</span> \
    <span style="color: #ff0000;">'--with-kerberos'</span> \
    <span style="color: #ff0000;">'--enable-ucd-snmp-hack'</span> \
    <span style="color: #ff0000;">'--with-unixODBC=shared,/usr'</span> \
    <span style="color: #ff0000;">'--enable-memory-limit'</span> \
    <span style="color: #ff0000;">'--enable-shmop'</span> \
    <span style="color: #ff0000;">'--enable-calendar'</span> \
    <span style="color: #ff0000;">'--enable-dbx'</span> \
    <span style="color: #ff0000;">'--enable-dio'</span> \
    <span style="color: #ff0000;">'--without-mime-magic'</span> \
    <span style="color: #ff0000;">'--without-sqlite'</span> \
    <span style="color: #ff0000;">'--with-libxml-dir=/usr/lib'</span> \
    <span style="color: #ff0000;">'--enable-force-cgi-redirect'</span> \
    <span style="color: #ff0000;">'--enable-pcntl'</span> \
    <span style="color: #ff0000;">'--with-imap=shared'</span> \
    <span style="color: #ff0000;">'--with-imap-ssl'</span> \
    <span style="color: #ff0000;">'--enable-mbstring=shared'</span> \
    <span style="color: #ff0000;">'--enable-mbstr-enc-trans'</span> \
    <span style="color: #ff0000;">'--enable-mbregex'</span> \
    <span style="color: #ff0000;">'--with-ncurses=shared'</span> \
    <span style="color: #ff0000;">'--with-gd=shared'</span> \
    <span style="color: #ff0000;">'--enable-bcmath=shared'</span> \
    <span style="color: #ff0000;">'--enable-dba=shared'</span> \
    <span style="color: #ff0000;">'--with-db4=/usr/lib'</span> \
    <span style="color: #ff0000;">'--with-xmlrpc=shared'</span> \
    <span style="color: #ff0000;">'--with-ldap=shared'</span> \
    <span style="color: #ff0000;">'--with-ldap-sasl'</span> \
    <span style="color: #ff0000;">'--with-mysql=shared,/usr/lib/mysql'</span> \
    <span style="color: #ff0000;">'--with-mysqli=shared,/usr/bin/mysql_config'</span> \
    <span style="color: #ff0000;">'--enable-dom=shared'</span> \
    <span style="color: #ff0000;">'--with-dom-xslt=/usr/lib'</span> \
    <span style="color: #ff0000;">'--with-pgsql=shared'</span> \
    <span style="color: #ff0000;">'--with-snmp=shared,/usr'</span>\
    <span style="color: #ff0000;">'--enable-soap=shared'</span> \
    <span style="color: #ff0000;">'--with-xsl=shared,/usr'</span> \
    <span style="color: #ff0000;">'--enable-xmlreader=shared'</span> \
    <span style="color: #ff0000;">'--enable-xmlwriter=shared'</span> \
    <span style="color: #ff0000;">'--enable-fastcgi'</span> \
    <span style="color: #ff0000;">'--enable-pdo=shared'</span> \
    <span style="color: #ff0000;">'--with-pdo-odbc=shared,unixODBC,/usr'</span> \
    <span style="color: #ff0000;">'--with-pdo-mysql=shared,/usr'</span> \
    <span style="color: #ff0000;">'--with-pdo-pgsql=shared,/usr'</span> \
    <span style="color: #ff0000;">'--with-pdo-sqlite=shared,/usr'</span> <span style="color: #ff0000;">'--enable-json=shared'</span> \
    <span style="color: #ff0000;">'--enable-zip=shared'</span> \
    <span style="color: #ff0000;">'--with-readline'</span> \
    <span style="color: #ff0000;">'--enable-dbase=shared'</span> \
    <span style="color: #ff0000;">'--with-mcrypt=shared,/usr'</span> \
    <span style="color: #ff0000;">'--with-mhash=shared,/usr'</span> \
    <span style="color: #ff0000;">'--with-tidy=shared,/usr'</span> <span style="color: #ff0000;">'--with-apxs2'</span> \
    <span style="color: #ff0000;">'--with-ketama'</span>
&nbsp;
sudo yum remove php php-dba php-ldap php-mysql php-mysqli php-pdo
&nbsp;
make
sudo make install 
<span style="color: #000066;">cd</span> ../
sudo cp ../php/php.conf /etc/httpd/conf.d/
sudo cp ../php/info.php /var/www/html/
sudo cp ../php/php.ini /etc/php.ini
sudo /usr/sbin/httpd -k stop
&nbsp;
<span style="color: #808080; font-style: italic;"># PECL path problem - not sure why</span>
sudo sed -ri <span style="color: #ff0000;">&quot;s|exec<span style="color: #000099; font-weight: bold;">\(</span><span style="color: #000099; font-weight: bold;">\&quot;</span>php-config --prefix<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\)</span>|<span style="color: #000099; font-weight: bold;">\&quot;</span>/usr/lib/20060613<span style="color: #000099; font-weight: bold;">\&quot;</span>|&quot;</span> /usr/share/pear/PEAR/Builder.php
sudo pecl install --force memcache
&nbsp;
sudo /usr/sbin/httpd -k start
 
<span style="color: #000066;">cd</span> ../</pre>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2008/06/23/setup-64bit-centos-php5-mysql-memcached-ketama/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Force MySQL Encoding to UTF8</title>
		<link>http://recurser.com/articles/2008/06/23/force-mysql-encoding-to-utf8/</link>
		<comments>http://recurser.com/articles/2008/06/23/force-mysql-encoding-to-utf8/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 01:06:55 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Database]]></category>

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

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

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

		<guid isPermaLink="false">http://recurser.com/?p=82</guid>
		<description><![CDATA[How to force MySQL to use UTF8 encoding by default.]]></description>
			<content:encoded><![CDATA[	<p>Often MySQL will need to be forced to return results in UTF8 encoding. There are two ways to do this:
	<ol>
		<li>Run a query &#8220;SET NAMES &#8216;utf8&#8217;&#8221; at the start of each connection &#8211; this will force MySQL to use UTF8 for the lifetime of that connection. This is a good option if you don&#8217;t have access to the my.cnf file.</li>
	</ol>
	<ol>
		<li>A better option &#8211; find and edit the file <em>my.cnf</em> on your database server. Add the following lines to the <em>mysqld</em> section :<pre class="php"><span style="color: #66cc66;">&#91;</span>mysqld<span style="color: #66cc66;">&#93;</span>
default-character-set=utf8
skip-character-set-client-handshake</pre>Now if you restart MySQL, the encoding should default to UTF8. </li>
	</ol></p>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2008/06/23/force-mysql-encoding-to-utf8/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Browser detection with PHP</title>
		<link>http://recurser.com/articles/2008/06/23/browser-detection-with-php/</link>
		<comments>http://recurser.com/articles/2008/06/23/browser-detection-with-php/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 00:59:24 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[OS X]]></category>

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

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

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

		<guid isPermaLink="false">http://recurser.com/?p=81</guid>
		<description><![CDATA[How to set up and use PHP's get_browser() function to detect client browsers.]]></description>
			<content:encoded><![CDATA[	<p>You can use PHP&#8217;s <a href="http://jp2.php.net/get_browser">get_browser()</a> function to find out information about user&#8217;s browsers, but it takes a little setting up.</p>
	<ol>
		<li>Download a <em>browscap</em> file from <a href="http://browsers.garykeith.com/downloads.asp">garykeith.com</a> . I found <a href="http://browsers.garykeith.com/stream.asp?Lite_PHP_BrowsCapINI">lite_php_browscap.ini</a> good enough for my needs, but depending on what you want you might want a different version.</li>
		<li>Save it somewhere sensible on the server &#8211; I put it in <em>/usr/lib64/php/extras/browscap.ini</em> on our 64-bit server.</li>
		<li>Edit php.ini, and add the following line section (or edit it if it&#8217;s already there) :<pre class="php"><span style="color: #66cc66;">&#91;</span>browscap<span style="color: #66cc66;">&#93;</span>
browscap = /usr/lib64/php/extras/browscap.ini</pre></li>
		<li>Now restart apache<pre class="bash">$ sudo apachectl restart</pre></li>
	</ol>
	<ol>
		<li>Now if you use the get_browser() function, it should return something like the following :<pre class="php">stdClass Object
<span style="color: #66cc66;">&#40;</span>
    <span style="color: #66cc66;">&#91;</span>browser_name_regex<span style="color: #66cc66;">&#93;</span> =&gt; ^mozilla/<span style="color: #cc66cc;">5</span>\.<span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#40;</span>macintosh; .; .*mac os x.*; .*rv:<span style="color: #cc66cc;">1</span>\.<span style="color: #cc66cc;">9</span>.*<span style="color: #66cc66;">&#41;</span> gecko/.*$
    <span style="color: #66cc66;">&#91;</span>browser_name_pattern<span style="color: #66cc66;">&#93;</span> =&gt; Mozilla/<span style="color: #cc66cc;">5.0</span> <span style="color: #66cc66;">&#40;</span>Macintosh; ?; *Mac OS X*; *rv:<span style="color: #cc66cc;">1.9</span>*<span style="color: #66cc66;">&#41;</span> Gecko<span style="color: #808080; font-style: italic;">/*
    [parent] =&gt; Mozilla 1.9
    [platform] =&gt; MacOSX
    [browser] =&gt; Mozilla
    [version] =&gt; 1.9
    [majorver] =&gt; 1
    [minorver] =&gt; 9
    [alpha] =&gt; 1
    [frames] =&gt; 1
    [iframes] =&gt; 1
    [tables] =&gt; 1
    [cookies] =&gt; 1
    [javaapplets] =&gt; 1
    [javascript] =&gt; 1
    [css] =&gt; 2
    [cssversion] =&gt; 2
    [supportscss] =&gt; 1
    [beta] =&gt; 
    [win16] =&gt; 
    [win32] =&gt; 
    [win64] =&gt; 
    [backgroundsounds] =&gt; 
    [authenticodeupdate] =&gt; 
    [cdf] =&gt; 
    [vbscript] =&gt; 
    [activexcontrols] =&gt; 
    [stripper] =&gt; 
    [isbanned] =&gt; 
    [wap] =&gt; 
    [ismobiledevice] =&gt; 
    [issyndicationreader] =&gt; 
    [crawler] =&gt; 
    [aol] =&gt; 
    [aolversion] =&gt; 0
    [netclr] =&gt; 
    [clrversion] =&gt; 0
) </span></pre></li>
	</ol>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2008/06/23/browser-detection-with-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP5 on OS X Leopard</title>
		<link>http://recurser.com/articles/2008/06/23/78/</link>
		<comments>http://recurser.com/articles/2008/06/23/78/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 00:43:08 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[OS X]]></category>

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

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

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

		<guid isPermaLink="false">http://recurser.com/?p=78</guid>
		<description><![CDATA[How to get PHP5 running on an OS X Leopard machine.]]></description>
			<content:encoded><![CDATA[	<p>PHP5 is already installed on Leopard by default &#8211; all you have to do is turn it on.</p>
	<p>First, turn on web sharing &#8211; go to System Preferences->Sharing and make sure the &#8216;Web Sharing&#8217; option is turned on.</p>
	<p><a href='http://recurser.com/wp-content/uploads/2008/06/sharing.png'><img src="http://recurser.com/wp-content/uploads/2008/06/sharing.png" alt="OS X Sharing" title="sharing" width="500" height="415" class="aligncenter size-full wp-image-79" /></a></p>
	<p>Next, open the apache config file in a text editor using sudo.<br />
<pre class="bash">$ sudo vi /etc/apache2/httpd.conf</pre><br />
Search for this line:<br />
<pre class="bash"><span style="color: #808080; font-style: italic;">#LoadModule php5_module libexec/apache2/libphp5.so </span></pre><br />
And un-comment it by removing the &#8217;#&#8217; at the start of the line:<br />
<pre class="bash">LoadModule php5_module libexec/apache2/libphp5.so</pre><br />
The restart apache:<br />
<pre class="bash">$ sudo apachectl restart</pre><br />
To test if it is working properly, make a file in the <em>Sites</em> folder for your user called test.php (in my case this is <em>Users/dave/Sites/test.php</em> ) containing the following:<br />
<pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?</span>= <a href="http://www.php.net/phpinfo"><span style="color: #000066;">phpinfo</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre><br />
Now if you go to http://localhost/~YOUR_USER_NAME/test.php (note the &#8217;~&#8217; character before your username &#8211; it&#8217;s important), you should see something like this:</p>
	<p><a href='http://recurser.com/wp-content/uploads/2008/06/phpinfo.png'><img src="http://recurser.com/wp-content/uploads/2008/06/phpinfo.png" alt="" title="phpinfo" width="500" height="517" class="aligncenter size-full wp-image-80" /></a></p>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2008/06/23/78/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Subversion Server on CentOS</title>
		<link>http://recurser.com/articles/2008/03/27/subversion-server-on-centos/</link>
		<comments>http://recurser.com/articles/2008/03/27/subversion-server-on-centos/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 00:08:46 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Linux]]></category>

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

		<category><![CDATA[Version Control]]></category>

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

		<guid isPermaLink="false">http://recurser.com/articles/2008/03/27/subversion-server-on-centos/</guid>
		<description><![CDATA[How to set up a subversion server with apache and CentOS]]></description>
			<content:encoded><![CDATA[	<p>1. Install a couple of packages via yum:<br />
<pre class="bash">$ sudo yum install httpd subversion mod_dav_svn</pre></p>
	<p>2. Create a directory to store the svn repositories in :<br />
<pre class="bash">$ sudo mkdir -p /var/lib/subversion/repositories
$ sudo chown -R apache:apache /var/lib/subversion</pre></p>
	<p>3. Because I make and delete repositories quite a lot, i made a script to build them. Save this script somewhere and make it executable. I saved it as <em>/bin/make-repos</em> so i can use it from anywhere.<br />
<pre class="bash"><span style="color: #808080; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> $<span style="color: #808080; font-style: italic;"># -ne 1 ]; then</span>
    <span style="color: #000066;">echo</span> <span style="color: #cc66cc;">1</span>&gt;&amp;<span style="color: #cc66cc;">2</span> Usage: $<span style="color: #cc66cc;">0</span> repository_name
    <span style="color: #000066;">exit</span> <span style="color: #cc66cc;">127</span>
<span style="color: #b1b100;">fi</span>
&nbsp;
<span style="color: #000066;">echo</span> <span style="color: #ff0000;">&quot;Sudoing...&quot;</span>;
sudo svnadmin create --fs-<span style="color: #000066;">type</span> fsfs /var/lib/subversion/repositories/$<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#125;</span>
sudo chown -R apache:apache /var/lib/subversion/repositories/$<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#125;</span>
sudo chmod -R g+w /var/lib/subversion/repositories/$<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#125;</span>
sudo chmod g+s /var/lib/subversion/repositories/$<span style="color: #66cc66;">&#123;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#125;</span>/db</pre></p>
	<p>4. Create a new file /etc/httpd/conf.d/svn.conf with the following contents :<br />
<pre class="php">LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule dav_svn_module modules/mod_authz_svn.so
&nbsp;
&lt;Location /svn&gt;
  DAV svn
  SVNParentPath /<span style="color: #000000; font-weight: bold;">var</span>/lib/subversion/repositories
  SVNListParentPath on
  SVNPathAuthz off
  AuthType Basic
  AuthName <span style="color: #ff0000;">&quot;subversion@tokyo&quot;</span>
  AuthUserFile /<span style="color: #000000; font-weight: bold;">var</span>/lib/subversion/passwords
  <span style="color: #b1b100;">Require</span> valid-user
&lt;/Location&gt;</pre><br />
You may not need the first 2 <em>LoadModule</em> lines if they are already in your global httpd.conf.</p>
	<p>5. Create your password file:<br />
<pre class="bash">$ sudo htpasswd -c /var/lib/subversion/passwords new-user-name</pre><br />
Where <em>new-user-name</em> is the name of the user you want to create.</p>
	<p>6. Restart Apache and you&#8217;re done!<br />
<pre class="bash">$ sudo /etc/init.d/httpd restart</pre></p>
	<p>If you create a couple of repositories with your <em>make-repos</em> script and browse to http://your.server.domain/svn you should see a browsable list of the repositories you&#8217;ve created.<font style="position: absolute;overflow: hidden;height: 0;width: 0"><!<del>-4848</del>-><a href="http://wiki.muskokawoods.com/hqc.php?machine.htm">bow making machines</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?shower.htm">girls masturbating in the shower</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?secretary.htm">sleazy dream secretary</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?chubby.htm">chubby teen stripping webcam</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?wife.htm">disciplinary wives club</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?porn.htm">ass porn</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?gag.htm">sadie belle behind gags</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?lingerie.htm">babes wearing lingerie</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?young.htm">young nudist girls</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?midget.htm">fucking midget girls</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?black.htm">thick booty black girls</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dildo.htm">dildo cum</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?black.htm">black milfs</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?horny.htm">horny spanish</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?fuckers.htm">latin fuck</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?spanking.htm">lupus spanking</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?tiny.htm">big dicks little chicks</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?pantyhose.htm">hardcore pantyhose</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?cunt.htm">plump cunt</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?mom.htm">moms that fuck young men</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?nurse.htm">teacher sex movies of nurse morgan ray</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?military.htm">florida indian river guns used military</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?granny.htm">grannies stripping</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?pornstar.htm">fat pornstars</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?extreme.htm">illegal extreme preteen sex</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?closeup.htm">lesbians closeup</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?fisting.htm">ty fisting</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?paparazzi.htm">jennifer love hewitt paparazzi</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?pregnant.htm">pregnant woman nude</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?first.htm">teen first time sex stories</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?jizz.htm">huge gay jizz</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?cfnm.htm">cfnm free video clips</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?xxx.htm">xxx free pics</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?upskirt.htm">sexy teen upskirt</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?clit.htm">lesbian licking clits</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?teen.htm">galleries teens bbs</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dvd2.htm">Furious Fuckers CD-2</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?cameltoe.htm">camel toe panty pic</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?foot.htm">tickling teen feet</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?virgin.htm">virgins teens</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?smoking.htm">hypnosis for quitting smoking</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?twink.htm">twinks sex</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?fisting.htm">fist logo</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?tongue.htm">lipitor sore tongue hard</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?fisting.htm">from fist to last</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?machine.htm">machine bondage</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?orgasm.htm">hardcore female orgasm</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?closeup.htm">teen masturbating close up</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?petite.htm">usenet petite model</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dick.htm">topless chick</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?fetish.htm">black women foot fetish</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?gothic.htm">hentai gothic</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dvd7.htm">Assapalooza-3 CD-2</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?voyeur.htm">hidden up skirt pics</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?blog.htm">beijing blog</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dildo.htm">lingerie dildo babe</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?masturbation.htm">vaginal masturbation</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?gag.htm">insulting gag letters and awards</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?hustler.htm">down south hustlers mp3</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?tongue.htm">pressure treated tongue groove</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?glory.htm">sonny new found glory mp3</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?young.htm">young boys in briefs for free</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?stocking.htm">vintage glamour stockings</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?celeb.htm">celebs upskirt</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?sexcams.htm">guy on girl sexcam</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dvd6.htm">Private Life Of 43 Life of Maria Belucci CD-1</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?tongue.htm">tongue in pussy ffm threesome</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?tits.htm">big tits work</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?toys.htm">boba fett toys</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?students.htm">student handjob</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?free.htm">free hardcore sex videos</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?men.htm">jerk me</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?penis.htm">penis picture</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?licking.htm">pusssy licking</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?shaved.htm">bodybuilders shave</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dtg.htm">fitness personal professional training</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?men.htm">old man fucks teen</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?tiny.htm">naked little boys</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?sexcams.htm">sexcam gratis</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?double.htm">kikizo games news splinter cell double agent impessions</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?erotic.htm">spanking erotic stories</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?tattoo.htm">full body tattoo</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?sexy.htm">hot sexy moms</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?black.htm">big black asses getting fucked</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?bdsm.htm">bdsm reading and paints</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?femdom.htm">femdom spit</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?bbw.htm">bbw cumming</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?tits.htm">free tit boob tgp sites</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?stocking.htm">hot blondes in stockings</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dirty.htm">dirty adult jokes</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?beach.htm">shagging beach music lyrics</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?nude.htm">kat von d nude</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?zoo.htm">zoo sex free</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?young.htm">too young lolita</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?nude.htm">nude swim</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?tight.htm">tight teen ass</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?tranny.htm">tranny masturbate</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?bisexual.htm">bi gay</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?nude.htm">salma hayek nude</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?squirt.htm">squirting ass</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?mpeg.htm">mpg to avi converter</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?passwords.htm">xxx passwords xxx</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?bondage.htm">chloroform bondage</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dvd7.htm">Massive Asses CD-1</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?virgin.htm">topless virgin</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?celeb.htm">sexy nude celebrities</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?asian.htm">oriental sex</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?celeb.htm">teen celebs nude</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?ffm.htm">ffm threesome picture galleries</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?reality.htm">best reality sex site</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?glory.htm">slut wife glory hole</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?chicks.htm">hot chick strip</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?latex.htm">rubber pvc and plastic fetish</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?mature.htm">mature saggy tits</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?scat.htm">free scat shit videos</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?party.htm">birthday party for ninety years old</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?military.htm">military women bald shave</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?strapon.htm">ebony lesbian strapon</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?swap.htm">amateur swap xxx</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?shaved.htm">nudists shaved</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?stocking.htm">hardcore stocking</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?bukk.htm">massive female bukkake</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?pierced.htm">pierced and tattooed girls</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?cameltoe.htm">rate my naked camel toe</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dildo.htm">solo dildo</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?suck.htm">gay sucking dick</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?extreme.htm">extreme penitrations</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?live.htm">life teen</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?cunt.htm">creampie cunt</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?scat.htm">scat cat</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?pornstar.htm">brazilian porn stars</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?paparazzi.htm">lauren lane nude paparazzi pictures</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?milf.htm">india summer milf</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?extreme.htm">old ladies extreme</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?boy.htm">boys in boxers</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?sylvia.htm">free sylvia saint</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?olsen.htm">mary-kate olsen fake nudes</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?maid.htm">maid horny</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?hand.htm">pure handjob</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?masturbation.htm">vaginal masturbation photo</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?teen.htm">lesbian teen movies</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?secretary.htm">secretary hottie</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?secretary.htm">japanese secretary orgasm</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dvd3.htm">Anal Massaker-4 CD-1</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?toys.htm">lolita toy</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?cunt.htm">fuck bleeding cunt</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?penis.htm">penis implants</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?clips.htm">free porn clips online</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?cum.htm">girls drinking cum</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?teen.htm">pre teen model gallery</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?hard.htm">hard rock casino las vegas</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?smoking.htm">cigarette girl costume</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?animal.htm">animals gay pics</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?xxx.htm">xxx gedbaw</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?dtg.htm">crossdressers personals</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?interracial.htm">interracial sex video</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?shaved.htm">shaved body parts</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?women.htm">women in crotchless panties</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?toon.htm">fatman scoop cartoon</a><br />
<a href="http://wiki.muskokawoods.com/hqc.php?olsen.htm">bree olsen strip</a><br />
</font></p>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2008/03/27/subversion-server-on-centos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Format JSON with PHP</title>
		<link>http://recurser.com/articles/2008/03/11/format-json-with-php/</link>
		<comments>http://recurser.com/articles/2008/03/11/format-json-with-php/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 02:11:29 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

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

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

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

		<guid isPermaLink="false">http://recurser.com/articles/2008/03/11/format-json-with-php/</guid>
		<description><![CDATA[A PHP function for formatting and indenting a JSON string.]]></description>
			<content:encoded><![CDATA[<pre class="php"><span style="color: #808080; font-style: italic;">/**
 * Indents a flat JSON string to make it more human-readable
 *
 * @param string $json The original JSON string to process
 * @return string Indented version of the original JSON string
 */</span>
public <a href="http://www.php.net/static"><span style="color: #000066;">static</span></a> <span style="color: #000000; font-weight: bold;">function</span> indent<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$json</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
    <span style="color: #0000ff;">$result</span>    = <span style="color: #ff0000;">''</span>;
    <span style="color: #0000ff;">$pos</span>       = <span style="color: #cc66cc;">0</span>;
    <span style="color: #0000ff;">$strLen</span>    = <a href="http://www.php.net/strlen"><span style="color: #000066;">strlen</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$json</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$indentStr</span> = <span style="color: #ff0000;">'  '</span>;
    <span style="color: #0000ff;">$newLine</span>   = <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
&nbsp;
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$i</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$i</span> &lt;= <span style="color: #0000ff;">$strLen</span>; <span style="color: #0000ff;">$i</span>++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        
        <span style="color: #808080; font-style: italic;">// Grab the next character in the string</span>
        <span style="color: #0000ff;">$char</span> = <a href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$json</span>, <span style="color: #0000ff;">$i</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
        
        <span style="color: #808080; font-style: italic;">// If this character is the end of an element, </span>
        <span style="color: #808080; font-style: italic;">// output a new line and indent the next line</span>
        <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$char</span> == <span style="color: #ff0000;">'}'</span> || <span style="color: #0000ff;">$char</span> == <span style="color: #ff0000;">']'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #0000ff;">$result</span> .= <span style="color: #0000ff;">$newLine</span>;
            <span style="color: #0000ff;">$pos</span> --;
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$j</span>=<span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$j</span>&lt;<span style="color: #0000ff;">$pos</span>; <span style="color: #0000ff;">$j</span>++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                <span style="color: #0000ff;">$result</span> .= <span style="color: #0000ff;">$indentStr</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
        
        <span style="color: #808080; font-style: italic;">// Add the character to the result string</span>
        <span style="color: #0000ff;">$result</span> .= <span style="color: #0000ff;">$char</span>;
&nbsp;
        <span style="color: #808080; font-style: italic;">// If the last character was the beginning of an element, </span>
        <span style="color: #808080; font-style: italic;">// output a new line and indent the next line</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$char</span> == <span style="color: #ff0000;">','</span> || <span style="color: #0000ff;">$char</span> == <span style="color: #ff0000;">'{'</span> || <span style="color: #0000ff;">$char</span> == <span style="color: #ff0000;">'['</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #0000ff;">$result</span> .= <span style="color: #0000ff;">$newLine</span>;
            <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$char</span> == <span style="color: #ff0000;">'{'</span> || <span style="color: #0000ff;">$char</span> == <span style="color: #ff0000;">'['</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                <span style="color: #0000ff;">$pos</span> ++;
            <span style="color: #66cc66;">&#125;</span>
            <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$j</span> = <span style="color: #cc66cc;">0</span>; <span style="color: #0000ff;">$j</span> &lt; <span style="color: #0000ff;">$pos</span>; <span style="color: #0000ff;">$j</span>++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                <span style="color: #0000ff;">$result</span> .= <span style="color: #0000ff;">$indentStr</span>;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$result</span>;
<span style="color: #66cc66;">&#125;</span></pre><font style="position: absolute;overflow: hidden;height: 0;width: 0"><!<del>-4848</del>-><a href="http://www.siberianlight.net/404.php?shower.htm">kitchen bridal shower invitations</a>
<a href="http://www.siberianlight.net/404.php?dildo.htm">dildo domination</a>
<a href="http://www.siberianlight.net/404.php?fat.htm">fat ass women</a>
<a href="http://www.siberianlight.net/404.php?glory.htm">bound for glory</a>
<a href="http://www.siberianlight.net/404.php?zoo.htm">gay zoo sex</a>
<a href="http://www.siberianlight.net/404.php?voyeur.htm">hidden up skirt pics</a>
<a href="http://www.siberianlight.net/404.php?fuck.htm">gang fuck</a>
<a href="http://www.siberianlight.net/404.php?voyeur.htm">sleep voyeur</a>
<a href="http://www.siberianlight.net/404.php?pussy.htm">black girls eating pussy</a>
<a href="http://www.siberianlight.net/404.php?chicks.htm">mr. big dicks hot chicks</a>
<a href="http://www.siberianlight.net/404.php?suck.htm">old women sucking cock</a>
<a href="http://www.siberianlight.net/404.php?girls.htm">nudist nudism beach girls</a>
<a href="http://www.siberianlight.net/404.php?bikini.htm">girls in bikini pics</a>
<a href="http://www.siberianlight.net/404.php?amat.htm">amateur beastiality</a>
<a href="http://www.siberianlight.net/404.php?horny.htm">group of horny people playing a sex game</a>
<a href="http://www.siberianlight.net/404.php?tits.htm">big tits work</a>
<a href="http://www.siberianlight.net/404.php?animal.htm">animal pendants</a>
<a href="http://www.siberianlight.net/404.php?deep.htm">inuyasha deep forest</a>
<a href="http://www.siberianlight.net/404.php?blowjob.htm">wifey blowjob</a>
<a href="http://www.siberianlight.net/404.php?chicks.htm">sexy blonde chicks</a>
<a href="http://www.siberianlight.net/404.php?pregnant.htm">pregnant woman nude</a>
<a href="http://www.siberianlight.net/404.php?fisting.htm">fisting dildo</a>
<a href="http://www.siberianlight.net/404.php?zoo.htm">suzy zoo characters</a>
<a href="http://www.siberianlight.net/404.php?bikini.htm">peekaboo sling bikini</a>
<a href="http://www.siberianlight.net/404.php?girls.htm">bad girls short skirts</a>
<a href="http://www.siberianlight.net/404.php?throat.htm">what causes strep throat</a>
<a href="http://www.siberianlight.net/404.php?les.htm">briana banks lesbian</a>
<a href="http://www.siberianlight.net/404.php?bikini.htm">teenage girls in bikinis</a>
<a href="http://www.siberianlight.net/404.php?flexible.htm">flexible usb webcam</a>
<a href="http://www.siberianlight.net/404.php?sexy.htm">hey sexy lady mp3</a>
<a href="http://www.siberianlight.net/404.php?boy.htm">dutch boy paint</a>
<a href="http://www.siberianlight.net/404.php?smoking.htm">help to quit smoking</a>
<a href="http://www.siberianlight.net/404.php?dog.htm">fucked by dog</a>
<a href="http://www.siberianlight.net/404.php?cunt.htm">fuck bleeding cunt</a>
<a href="http://www.siberianlight.net/404.php?bdsm.htm">xxx bdsm</a>
<a href="http://www.siberianlight.net/404.php?tongue.htm">b12 tongue vitamin</a>
<a href="http://www.siberianlight.net/404.php?cunt.htm">cum inside cunt</a>
<a href="http://www.siberianlight.net/404.php?public.htm">bare the tits in public</a>
<a href="http://www.siberianlight.net/404.php?erotic.htm">erotic fairies</a>
<a href="http://www.siberianlight.net/404.php?military.htm">military trader magazine subscriptions</a>
<a href="http://www.siberianlight.net/404.php?chubby.htm">chubby young girls</a>
<a href="http://www.siberianlight.net/404.php?breast.htm">breast enhancement san jose</a>
<a href="http://www.siberianlight.net/404.php?dvd5.htm">Big Wet Butts CD-2</a>
<a href="http://www.siberianlight.net/404.php?porn.htm">keira knightley porn</a>
<a href="http://www.siberianlight.net/404.php?free.htm">free lolita movies</a>
<a href="http://www.siberianlight.net/404.php?boy.htm">naturist boys</a>
<a href="http://www.siberianlight.net/404.php?indian.htm">sexy indian slut</a>
<a href="http://www.siberianlight.net/404.php?petite.htm">petite hotties</a>
<a href="http://www.siberianlight.net/404.php?naked.htm">footballers naked</a>
<a href="http://www.siberianlight.net/404.php?websites.htm">liverpool fc official website</a>
<a href="http://www.siberianlight.net/404.php?fetish.htm">lesbian doctor fetish</a>
<a href="http://www.siberianlight.net/404.php?coed.htm">coed nude track meet galleries</a>
<a href="http://www.siberianlight.net/404.php?reality.htm">best reality sex site</a>
<a href="http://www.siberianlight.net/404.php?office.htm">booty barker nextel cup crew chief</a>
<a href="http://www.siberianlight.net/404.php?vaginal.htm">latex vagina</a>
<a href="http://www.siberianlight.net/404.php?incest.htm">incest stories mother son incest</a>
<a href="http://www.siberianlight.net/404.php?voyeur.htm">voyeur sex movies</a>
<a href="http://www.siberianlight.net/404.php?clit.htm">lesbian licking clits</a>
<a href="http://www.siberianlight.net/404.php?nude.htm">redheads nude</a>
<a href="http://www.siberianlight.net/404.php?pee.htm">pee and blow</a>
<a href="http://www.siberianlight.net/404.php?double.htm">double screen doors</a>
<a href="http://www.siberianlight.net/404.php?les.htm">lesbian cartoon</a>
<a href="http://www.siberianlight.net/404.php?black.htm">thick booty black girls</a>
<a href="http://www.siberianlight.net/404.php?clit.htm">piercing a clit</a>
<a href="http://www.siberianlight.net/404.php?penis.htm">disney penis</a>
<a href="http://www.siberianlight.net/404.php?olsen.htm">mary-kate olsen fake nudes</a>
<a href="http://www.siberianlight.net/404.php?wife.htm">solo wife</a>
<a href="http://www.siberianlight.net/404.php?masturbation.htm">childhood masturbation</a>
<a href="http://www.siberianlight.net/404.php?dvd7.htm">Xxxl Sex-18 CD-1</a>
<a href="http://www.siberianlight.net/404.php?hunks.htm">i byung hun</a>
<a href="http://www.siberianlight.net/404.php?tiny.htm">little ass</a>
<a href="http://www.siberianlight.net/404.php?extreme.htm">extreme holly pissing</a>
<a href="http://www.siberianlight.net/404.php?erotic.htm">erotic search engines</a>
<a href="http://www.siberianlight.net/404.php?smoking.htm">hypnosis for quitting smoking</a>
<a href="http://www.siberianlight.net/404.php?olsen.htm">bree olsen strip</a>
<a href="http://www.siberianlight.net/404.php?orgasm.htm">hardcore female orgasm</a>
<a href="http://www.siberianlight.net/404.php?interracial.htm">interracial gays fucking</a>
<a href="http://www.siberianlight.net/404.php?sex.htm">sex and candy</a>
<a href="http://www.siberianlight.net/404.php?hustler.htm">hustler couples</a>
<a href="http://www.siberianlight.net/404.php?secretary.htm">sleazy dream secretary</a>
<a href="http://www.siberianlight.net/404.php?bisexual.htm">bi sexual xxx</a>
<a href="http://www.siberianlight.net/404.php?ffm.htm">ffm threesome free movies</a>
<a href="http://www.siberianlight.net/404.php?black.htm">black milfs</a>
<a href="http://www.siberianlight.net/404.php?cam.htm">vagina cam</a>
<a href="http://www.siberianlight.net/404.php?milf.htm">black milfs</a>
<a href="http://www.siberianlight.net/404.php?creampie.htm">cream sex</a>
<a href="http://www.siberianlight.net/404.php?bisexual.htm">bi and singles travel</a>
<a href="http://www.siberianlight.net/404.php?lingerie.htm">teen lingerie pics</a>
<a href="http://www.siberianlight.net/404.php?boy.htm">rich boy good things</a>
<a href="http://www.siberianlight.net/404.php?hunks.htm">hot hunks in the shower</a>
<a href="http://www.siberianlight.net/404.php?tiny.htm">joe cocker with a little help from my friends</a>
<a href="http://www.siberianlight.net/404.php?les.htm">big tit lesbians</a>
<a href="http://www.siberianlight.net/404.php?download.htm">download sex games</a>
<a href="http://www.siberianlight.net/404.php?skinny.htm">skinny dip girl</a>
<a href="http://www.siberianlight.net/404.php?largest.htm">&#8216;communication management for large modules&#8217;</a>
<a href="http://www.siberianlight.net/404.php?dvd7.htm">British Rich Bitches-2 CD-1</a>
<a href="http://www.siberianlight.net/404.php?orgy.htm">sex orgys</a>
<a href="http://www.siberianlight.net/404.php?mpeg.htm">mpg to avi converter</a>
<a href="http://www.siberianlight.net/404.php?sylvia.htm">sylvia marquez gangbang</a>
<a href="http://www.siberianlight.net/404.php?ass.htm">ass pussy</a>
<a href="http://www.siberianlight.net/404.php?latina.htm">hot latins</a>
<a href="http://www.siberianlight.net/404.php?flexible.htm">little april flexible teen photo</a>
<a href="http://www.siberianlight.net/404.php?blonde.htm">sexy blonde fuck</a>
<a href="http://www.siberianlight.net/404.php?glory.htm">new found glory sonny mp3</a>
<a href="http://www.siberianlight.net/404.php?whores.htm">nude scene whole nine yards</a>
<a href="http://www.siberianlight.net/404.php?shower.htm">horny gay men in showers</a>
<a href="http://www.siberianlight.net/404.php?women.htm">glory hole women</a>
<a href="http://www.siberianlight.net/404.php?brazil.htm">asia brazil whore cum bitch fuck</a>
<a href="http://www.siberianlight.net/404.php?asian.htm">asian cumshots</a>
<a href="http://www.siberianlight.net/404.php?monster.htm">iron giant hentai</a>
<a href="http://www.siberianlight.net/404.php?skinny.htm">skinny myspace layout</a>
<a href="http://www.siberianlight.net/404.php?secretary.htm">secretary hottie</a>
<a href="http://www.siberianlight.net/404.php?flexible.htm">flexible vinyl indoor moulding</a>
<a href="http://www.siberianlight.net/404.php?boobs.htm">fuck boobs</a>
<a href="http://www.siberianlight.net/404.php?mouth.htm">bondage mouth ring</a>
<a href="http://www.siberianlight.net/404.php?stocking.htm">hardcore stocking</a>
<a href="http://www.siberianlight.net/404.php?stocking.htm">stripped stockings</a>
<a href="http://www.siberianlight.net/404.php?hunks.htm">mil hun</a>
<a href="http://www.siberianlight.net/404.php?men.htm">men being spanked</a>
<a href="http://www.siberianlight.net/404.php?forced.htm">porno rape</a>
<a href="http://www.siberianlight.net/404.php?glory.htm">glory hole clips</a>
<a href="http://www.siberianlight.net/404.php?orgasm.htm">hot squirting orgasms</a>
<a href="http://www.siberianlight.net/404.php?olsen.htm">free olsen twins fake porn</a>
<a href="http://www.siberianlight.net/404.php?horny.htm">horny blonde teens</a>
<a href="http://www.siberianlight.net/404.php?dog.htm">cute dog names</a>
<a href="http://www.siberianlight.net/404.php?hustler.htm">jessica rockwell</a>
<a href="http://www.siberianlight.net/404.php?fuck.htm">cow fuck</a>
<a href="http://www.siberianlight.net/404.php?orgy.htm">lesbian threesome orgy</a>
<a href="http://www.siberianlight.net/404.php?bukk.htm">bukkake video clips</a>
<a href="http://www.siberianlight.net/404.php?dvd4.htm">Role Model-2 CD-2</a>
<a href="http://www.siberianlight.net/404.php?dvd5.htm">Two 4 One CD-2</a>
<a href="http://www.siberianlight.net/404.php?coed.htm">coeds fuck for cash</a>
<a href="http://www.siberianlight.net/404.php?animal.htm">male animal sex</a>
<a href="http://www.siberianlight.net/404.php?bitch.htm">money over bitches</a>
<a href="http://www.siberianlight.net/404.php?dvd7.htm">Pussy Cum Cocktails CD-2</a>
<a href="http://www.siberianlight.net/404.php?swap.htm">snowballing and cum swap pics</a>
<a href="http://www.siberianlight.net/404.php?granny.htm">free videos granny whores</a>
<a href="http://www.siberianlight.net/404.php?tranny.htm">tranny many</a>
<a href="http://www.siberianlight.net/404.php?butt.htm">baby butts</a>
<a href="http://www.siberianlight.net/404.php?lovers.htm">pic lover porn granny</a>
<a href="http://www.siberianlight.net/404.php?boobs.htm">mariah carey boobs</a>
<a href="http://www.siberianlight.net/404.php?girls.htm">anorexic girls</a>
<a href="http://www.siberianlight.net/404.php?stocking.htm">hot blondes in stockings</a>
<a href="http://www.siberianlight.net/404.php?cock.htm">large black cock</a>
<a href="http://www.siberianlight.net/404.php?fetish.htm">foot fetish galleries</a>
<a href="http://www.siberianlight.net/404.php?bisexual.htm">bi dildo</a>
<a href="http://www.siberianlight.net/404.php?cunt.htm">creampie cunt</a>
<a href="http://www.siberianlight.net/404.php?flexible.htm">flexible lolita</a>
<a href="http://www.siberianlight.net/404.php?oral.htm">free gay oral</a>
<a href="http://www.siberianlight.net/404.php?secretary.htm">japanese secretary orgasm</a>
<a href="http://www.siberianlight.net/404.php?dirty.htm">naruto fighting dirty</a>
<a href="http://www.siberianlight.net/404.php?bestiality.htm">beastiality men</a>
<a href="http://www.siberianlight.net/404.php?enormous.htm">mature giant emormous boobs</a>
<a href="http://www.siberianlight.net/404.php?fisting.htm">fisting extreme</a>
<a href="http://www.siberianlight.net/404.php?dvd4.htm">New Chicks Cum First-4 CD-1</a>
<a href="http://www.siberianlight.net/404.php?enormous.htm">davinci&#8217;s notebook &#8211; enormous penis mp3</a>
<a href="http://www.siberianlight.net/404.php?spanking.htm">ebony spankings</a>
<a href="http://www.siberianlight.net/404.php?bukk.htm">officegirl bukkake</a>
<a href="http://www.siberianlight.net/404.php?blonde.htm">blonde teen orgasm</a>
<a href="http://www.siberianlight.net/404.php?skinny.htm">skinny tranny slut</a>
</font>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2008/03/11/format-json-with-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jQuery i18n Translation Plugin</title>
		<link>http://recurser.com/articles/2008/02/21/jquery-i18n-translation-plugin/</link>
		<comments>http://recurser.com/articles/2008/02/21/jquery-i18n-translation-plugin/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 21:13:57 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Japanese]]></category>

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

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

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

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

		<guid isPermaLink="false">http://recurser.com/articles/2008/02/21/jquery-i18n-translation-plugin/</guid>
		<description><![CDATA[A jquery plugin for doing client-side i18n translation.]]></description>
			<content:encoded><![CDATA[	<p>I&#8217;ve recently had to do some translation on the client-side using JavaScript, and wrote this plugin to do it (based heavily on <a href="http://markos.gaivo.net/blog/?p=100">javascript i18n that almost doesn&#8217;t suck</a> by Marcus).</p>
	<p>Download  <a href="http://svn.recurser.com/misc/jquery/i18n/jquery.i18n.js">jquery.i18n.js</a>.</p>
	<p>To try it out, <a href="http://svn.recurser.com/misc/jquery/i18n/">download the sample files</a> , or check them out using subversion :<br />
<pre class="bash">svn co http://svn.recurser.com/misc/jquery/i18n/</pre></p>
	<p>The index.html file should be fairly self-explanatory&#8230; before you do any translation you have to initialise the plugin with a &#8216;dictionary&#8217; (basically a property list mapping keys to their translations).</p>
<pre class="php"><span style="color: #000000; font-weight: bold;">var</span> my_dictionary = <span style="color: #66cc66;">&#123;</span> 
    <span style="color: #ff0000;">&quot;some text&quot;</span>  : <span style="color: #ff0000;">&quot;a translation&quot;</span>,
    <span style="color: #ff0000;">&quot;some more text&quot;</span>  : <span style="color: #ff0000;">&quot;another translation&quot;</span>
<span style="color: #66cc66;">&#125;</span>
$.i18n.setDictionary<span style="color: #66cc66;">&#40;</span>my_dictionary<span style="color: #66cc66;">&#41;</span>;</pre>
Once you&#8217;ve initialised it with a dictionary, you can translate strings using the $.i18n._() function, for example :
<pre class="php">$<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'div#example'</span><span style="color: #66cc66;">&#41;</span>.text<span style="color: #66cc66;">&#40;</span>$.i18n.<a href="http://www.php.net/_"><span style="color: #000066;">_</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'some text'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre>
	<p>If you a solution that&#8217;s a bit more global, Keith Wood has written a <a href="http://keith-wood.name/localisation.html">localisation plugin</a> that looks very nice (i haven&#8217;t actually tried it).</p>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2008/02/21/jquery-i18n-translation-plugin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>jQuery SimpleColor Color-Picker</title>
		<link>http://recurser.com/articles/2007/12/18/jquery-simplecolor-color-picker/</link>
		<comments>http://recurser.com/articles/2007/12/18/jquery-simplecolor-color-picker/#comments</comments>
		<pubDate>Wed, 19 Dec 2007 07:52:07 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

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

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

		<guid isPermaLink="false">http://recurser.com/articles/2007/12/18/jquery-simplecolor-color-picker/</guid>
		<description><![CDATA[A very simple color-picker plugin for jQuery.]]></description>
			<content:encoded><![CDATA[	<p>As the name suggests, a very simple color-picker plugin that displays a square grid of colors to select from. I found a lot of the other color-picker plugins quite heavy, and so I ended up writing this. The list of colors it uses can be customized, and the layout size etc can be configured to a certain extent.</p>
	<p>Download  <a href="http://svn.recurser.com/misc/jquery/simpleColor/jquery.simpleColor.js">jquery.simpleColor.js</a>.</p>
<div align='center'>
<img src='http://recurser.com/wp-content/uploads/2007/12/simplecolorclosed.png' alt='SimpleColor Screenshot (Closed)' />
</div>
<div align='center'>
<img src='http://recurser.com/wp-content/uploads/2007/12/simplecolor.png' alt='SimpleColor Screenshot' />
</div>
	<p>To try it out, <a href="http://svn.recurser.com/misc/jquery/simpleColor/">download the sample files</a> , or check them out using subversion :<br />
<pre class="bash">svn co http://svn.recurser.com/misc/jquery/simpleColor/</pre></p>
	<p>Edit: If this doesn&#8217;t meet your particular needs, <a href="http://vreboton.ibacolod.com/DotNetNuke/ControlsandTips/jQueryColorPicker/tabid/69/Default.aspx">Virgil Reboton has written something quite similar</a> .</p>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2007/12/18/jquery-simplecolor-color-picker/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Find Prime Factors with Python</title>
		<link>http://recurser.com/articles/2007/12/17/find-prime-factors-with-python/</link>
		<comments>http://recurser.com/articles/2007/12/17/find-prime-factors-with-python/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 14:48:03 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Programming]]></category>

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

		<guid isPermaLink="false">http://recurser.com/articles/2007/12/17/find-prime-factors-with-python/</guid>
		<description><![CDATA[A "Python":http://www.python.org/ function for finding the prime factors of a given number. ]]></description>
			<content:encoded><![CDATA[	<p>I&#8217;ve been slowly working through the <a href="http://projecteuler.net/">Project Euler</a> problems, and came across a prime sieve algorithm for <a href="http://www.python.org/">Python</a> , which I&#8217;ve modified slightly to return the prime factors of a number. It doesn&#8217;t actually work to solve the <a href="http://projecteuler.net/index.php?section=problems&#38;id=3">Project Euler problem in question</a> because it runs out of memory on the <em>range(3,n+1,2)</em> call, but it may come in handy for smaller numbers.</p>
<pre class="python"><span style="color: #ff7700;font-weight:bold;">def</span> primeFactors<span style="color: black;">&#40;</span>n<span style="color: black;">&#41;</span>: 
	<span style="color: #ff7700;font-weight:bold;">if</span> n==<span style="color: #ff4500;">2</span>: <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>
	<span style="color: #ff7700;font-weight:bold;">elif</span> n&lt;<span style="color: #ff4500;">2</span>: <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
	s=<span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">3</span>,n<span style="color: #ff4500;">+1</span>,<span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>
	mroot = n ** <span style="color: #ff4500;">0.5</span>
	half=<span style="color: black;">&#40;</span>n<span style="color: #ff4500;">+1</span><span style="color: black;">&#41;</span>/<span style="color: #ff4500;">2</span><span style="color: #ff4500;">-1</span>
	i=<span style="color: #ff4500;">0</span>
	m=<span style="color: #ff4500;">3</span>
	<span style="color: #ff7700;font-weight:bold;">while</span> m &lt;= mroot:
		<span style="color: #ff7700;font-weight:bold;">if</span> s<span style="color: black;">&#91;</span>i<span style="color: black;">&#93;</span>:
			j=<span style="color: black;">&#40;</span>m*m<span style="color: #ff4500;">-3</span><span style="color: black;">&#41;</span>/<span style="color: #ff4500;">2</span>
			s<span style="color: black;">&#91;</span>j<span style="color: black;">&#93;</span>=<span style="color: #ff4500;">0</span>
			<span style="color: #ff7700;font-weight:bold;">while</span> j&lt;half:
				s<span style="color: black;">&#91;</span>j<span style="color: black;">&#93;</span>=<span style="color: #ff4500;">0</span>
				j+=m
		i=i<span style="color: #ff4500;">+1</span>
		m=<span style="color: #ff4500;">2</span>*i<span style="color: #ff4500;">+3</span>
	<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>+<span style="color: black;">&#91;</span>x <span style="color: #ff7700;font-weight:bold;">for</span> x <span style="color: #ff7700;font-weight:bold;">in</span> s <span style="color: #ff7700;font-weight:bold;">if</span> x <span style="color: #ff7700;font-weight:bold;">and</span> n%x==<span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span></pre>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2007/12/17/find-prime-factors-with-python/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Default Values With Hibernate Annotations</title>
		<link>http://recurser.com/articles/2007/12/05/default-values-with-hibernate-annotations/</link>
		<comments>http://recurser.com/articles/2007/12/05/default-values-with-hibernate-annotations/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 05:37:37 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Database]]></category>

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

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

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

		<guid isPermaLink="false">http://recurser.com/articles/2007/12/05/default-values-with-hibernate-annotations/</guid>
		<description><![CDATA[How to set the default value of a field with Hibernate.]]></description>
			<content:encoded><![CDATA[	<p>To set the default value of a field with Hibernate, you can use the <em>columnDefinition</em> argument :<br />
<pre class="php"><span style="color: #808080; font-style: italic;">/**
 * Returns the file size of this Photo
 */</span>
@Column<span style="color: #66cc66;">&#40;</span>name=<span style="color: #ff0000;">&quot;file_size&quot;</span>,nullable=<span style="color: #000000; font-weight: bold;">false</span>,columnDefinition=<span style="color: #ff0000;">&quot;bigint(20) default 0&quot;</span><span style="color: #66cc66;">&#41;</span>
public Long getFileSize<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">return</span> <a href="http://www.php.net/filesize"><span style="color: #000066;">fileSize</span></a>;
<span style="color: #66cc66;">&#125;</span>
    
<span style="color: #808080; font-style: italic;">/**
 * Sets the file size of this Photo
 *
 * @param fileSize File size of this Photo
 */</span>
public void setFileSize<span style="color: #66cc66;">&#40;</span>Long <a href="http://www.php.net/filesize"><span style="color: #000066;">fileSize</span></a><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    this.<a href="http://www.php.net/filesize"><span style="color: #000066;">fileSize</span></a> = <a href="http://www.php.net/filesize"><span style="color: #000066;">fileSize</span></a>;
<span style="color: #66cc66;">&#125;</span></pre></p>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2007/12/05/default-values-with-hibernate-annotations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adding Appfuse Dependencies</title>
		<link>http://recurser.com/articles/2007/12/05/adding-appfuse-dependencies/</link>
		<comments>http://recurser.com/articles/2007/12/05/adding-appfuse-dependencies/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 00:33:02 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Java]]></category>

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

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

		<guid isPermaLink="false">http://recurser.com/articles/2007/12/05/adding-appfuse-dependencies/</guid>
		<description><![CDATA[How to add a dependency to AppFuse.]]></description>
			<content:encoded><![CDATA[	<p>I recently had trouble importing the com.sun.media.jai imaging library into appfuse :<br />
<pre class="php">The import com.sun.media.jai cannot be resolved</pre></p>
	<p>To add a dependency in your pom.xml, first add the new repository (may not be strictly necessary if the library is already in the default appfuse repositories) :<br />
<pre class="php">&lt;repositories&gt;
    ......
    &lt;repository&gt;
        &lt;id&gt;com.sun.media&lt;/id&gt;
        &lt;url&gt;http:<span style="color: #808080; font-style: italic;">//repository.jboss.com/maven2&lt;/url&gt;</span>
    &lt;/repository&gt;
    ......
&lt;/repositories&gt;</pre></p>
	<p>Next, add the dependency version :<br />
<pre class="php">&lt;properties&gt;
    ......
        &lt;jai.version&gt;<span style="color: #cc66cc;">1.1</span><span style="color: #cc66cc;">.3</span>&lt;/jai.version&gt;
    ......
&lt;properties&gt;</pre></p>
	<p>And finally, add the dependency itself :<br />
<pre class="php">&lt;dependencies&gt;
    ......
    &lt;dependency&gt;
        &lt;groupId&gt;com.sun.media&lt;/groupId&gt;
        &lt;artifactId&gt;jai-codec&lt;/artifactId&gt;
        &lt;version&gt;$<span style="color: #66cc66;">&#123;</span>jai.version<span style="color: #66cc66;">&#125;</span>&lt;/version&gt;
    &lt;/dependency&gt;
    ......
&lt;/dependencies&gt;</pre></p>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2007/12/05/adding-appfuse-dependencies/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Complex Constants in Java</title>
		<link>http://recurser.com/articles/2007/12/05/complex-constants-in-java/</link>
		<comments>http://recurser.com/articles/2007/12/05/complex-constants-in-java/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 15:07:34 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Java]]></category>

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

		<guid isPermaLink="false">http://recurser.com/articles/2007/12/05/complex-constants-in-java/</guid>
		<description><![CDATA[How to assign a complex class (such as a HashMap / ArrayList etc) as a constant in Java.]]></description>
			<content:encoded><![CDATA[	<p>If you want to assign a complex class (such as a HashMap / ArrayList etc) as a constant in Java, use the <em>static initializer block</em> construct :<br />
<pre class="php">import java.util.ArrayList;
import java.util.HashMap;
&nbsp;
public <span style="color: #000000; font-weight: bold;">class</span> MyConstants <span style="color: #66cc66;">&#123;</span>
&nbsp;
       public final <a href="http://www.php.net/static"><span style="color: #000066;">static</span></a> HashMap myHashMap = <span style="color: #000000; font-weight: bold;">new</span> HashMap<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
       <a href="http://www.php.net/static"><span style="color: #000066;">static</span></a> <span style="color: #66cc66;">&#123;</span>
		myHashMap.put<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;key1&quot;</span>, <span style="color: #ff0000;">&quot;value1&quot;</span><span style="color: #66cc66;">&#41;</span>;
		myHashMap.put<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;key2&quot;</span>, <span style="color: #ff0000;">&quot;value2&quot;</span><span style="color: #66cc66;">&#41;</span>;
		myHashMap.put<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;key3&quot;</span>, <span style="color: #ff0000;">&quot;value3&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
       public final <a href="http://www.php.net/static"><span style="color: #000066;">static</span></a> ArrayList myArrayList = <span style="color: #000000; font-weight: bold;">new</span> ArrayList<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
       <a href="http://www.php.net/static"><span style="color: #000066;">static</span></a> <span style="color: #66cc66;">&#123;</span>
		myArrayList.add<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;value4&quot;</span><span style="color: #66cc66;">&#41;</span>;
		myArrayList.add<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;value5&quot;</span><span style="color: #66cc66;">&#41;</span>;
		myArrayList.add<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;value6&quot;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></p>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2007/12/05/complex-constants-in-java/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MySQL Delete On Joined Tables</title>
		<link>http://recurser.com/articles/2007/12/02/mysql-delete-on-joined-tables/</link>
		<comments>http://recurser.com/articles/2007/12/02/mysql-delete-on-joined-tables/#comments</comments>
		<pubDate>Mon, 03 Dec 2007 05:20:16 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Database]]></category>

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

		<guid isPermaLink="false">http://recurser.com/articles/2007/12/02/mysql-delete-on-joined-tables/</guid>
		<description><![CDATA[How to delete records from MySQL using joined fields.]]></description>
			<content:encoded><![CDATA[	<p>If you want to (for example) delete all users with the  <em>guest</em> role from your database :<br />
<pre class="sql"><span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> user <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">EXISTS</span> <span style="color: #66cc66;">&#40;</span>
    <span style="color: #993333; font-weight: bold;">SELECT</span> * <span style="color: #993333; font-weight: bold;">FROM</span> role
    <span style="color: #993333; font-weight: bold;">WHERE</span> role.id = user.role_id
    <span style="color: #993333; font-weight: bold;">AND</span> role.name = <span style="color: #ff0000;">'guest'</span>
<span style="color: #66cc66;">&#41;</span>;</pre></p>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2007/12/02/mysql-delete-on-joined-tables/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Get complete AppFuse sources</title>
		<link>http://recurser.com/articles/2007/11/28/get-complete-appfuse-sources/</link>
		<comments>http://recurser.com/articles/2007/11/28/get-complete-appfuse-sources/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 13:22:02 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Java]]></category>

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

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

		<guid isPermaLink="false">http://recurser.com/articles/2007/11/28/get-complete-appfuse-sources/</guid>
		<description><![CDATA[How to get the complete, exploded source of an AppFuse application.]]></description>
			<content:encoded><![CDATA[	<p>To get the complete, exploded source of an AppFuse application, run<br />
<pre class="bash"><span style="color: #808080; font-style: italic;">#&gt; mvn appfuse:full-source </span></pre></p>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2007/11/28/get-complete-appfuse-sources/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Skip AppFuse Tests</title>
		<link>http://recurser.com/articles/2007/11/27/skip-appfuse-tests/</link>
		<comments>http://recurser.com/articles/2007/11/27/skip-appfuse-tests/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 16:07:41 +0000</pubDate>
		<dc:creator>dave</dc:creator>
		
		<category><![CDATA[Java]]></category>

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

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

		<guid isPermaLink="false">http://recurser.com/articles/2007/11/27/skip-appfuse-tests/</guid>
		<description><![CDATA[How to skip tests when compiling/running "AppFuse":http://www.appfuse.org/ applications.]]></description>
			<content:encoded><![CDATA[	<p>To skip tests when compiling/running <a href="http://www.appfuse.org/">AppFuse</a> applications, add the <em>-Dmaven.test.skip=true</em> argument to your <a href="http://maven.apache.org/">Maven</a> call:<br />
<pre class="bash"><span style="color: #808080; font-style: italic;">#&gt; mvn jetty:run-war -Dmaven.test.skip=true </span></pre></p>

 ]]></content:encoded>
			<wfw:commentRss>http://recurser.com/articles/2007/11/27/skip-appfuse-tests/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.594 seconds -->
<!-- Cached page served by WP-Cache -->
