<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>Personal blog of Joe Topjian.</description><title>Eidetica</title><generator>Tumblr (3.0; @eidetica)</generator><link>http://eidetica.net/</link><item><title>orbus005 – April 16, 1993 – Manchester</title><description>&lt;a href="http://orbus.terrarum.net/show/orbus005-april-16-1993-manchester.html"&gt;orbus005 – April 16, 1993 – Manchester&lt;/a&gt;: &lt;p&gt;The Orb live @ Manchester ‘93&lt;/p&gt;</description><link>http://eidetica.net/post/394828271</link><guid>http://eidetica.net/post/394828271</guid><pubDate>Wed, 17 Feb 2010 08:47:37 -0700</pubDate></item><item><title>Doctrine ORM, Part 1</title><description>&lt;p&gt;I’m planning on writing some detailed information about Doctrine in the future. For now, here are some notes of mine.&lt;/p&gt;

&lt;h3&gt;Getting Started&lt;/h3&gt;

&lt;h4&gt;Bootstrap File&lt;/h4&gt;

&lt;p&gt;A bootstrap file is the best way to get started with Doctrine. It can contain all Global settings and information needed to connect to the database (or databases). The file is commonly called &lt;code&gt;bootstrap.php&lt;/code&gt;:&lt;/p&gt;

&lt;pre class="sh_php"&gt;
&lt;?php
require_once('Doctrine/lib/Doctrine.php');
spl_autoload_register(array('Doctrine','autoload'));
spl_autoload_register(array('Doctrine', 'modelsAutoload'));

$dsn = "mysql://stuff:stuff@host/db";
$connection = Doctrine_Manager::connection($dsn);
$manager = Doctrine_manager::getInstance();
$manager-&gt;setAttribute(Doctrine_Core::ATTR_MODEL_LOADING, Doctrine_Core::MODEL_LOADING_CONSERVATIVE);
Doctrine_Core::loadModels('models');
&lt;/pre&gt;

&lt;h3&gt;Working with PDO&lt;/h3&gt;

&lt;p&gt;Because Doctrine utilizes &lt;a href="http://php.net/pdo"&gt;PDO&lt;/a&gt;, you can perform &lt;em&gt;some&lt;/em&gt; PDO-style actions with the &lt;code&gt;$connection&lt;/code&gt; object:&lt;/p&gt;

&lt;pre class="sh_php"&gt;
&lt;?php
require_once('bootstrap.php');

$query = $connection-&gt;prepare("select first_name from users");
$query-&gt;execute();
foreach ($query-&gt;fetchAll() as $row) {
    echo $row[0] . "\n";
}
&lt;/pre&gt;

&lt;p&gt;Unfortunately it seems the &lt;code&gt;$connection-&gt;query()&lt;/code&gt; function does not work through PDO.&lt;/p&gt;

&lt;h3&gt;Doctrine CLI&lt;/h3&gt;

&lt;p&gt;Doctrine provides some core actions that you are bound to repeat often. While it is possible to generate individual PHP files to act as tools (such as &lt;code&gt;generate_models.php&lt;/code&gt;, it is much easier to work with the Doctrine CLI.&lt;/p&gt;

&lt;p&gt;In order to get started with the CLI, create a file that looks like such:&lt;/p&gt;

&lt;pre class="sh_php"&gt;
&lt;?php
require_once('bootstrap.php');
$cli = new Doctrine_Cli();
$cli-&gt;run($_SERVER['argv']);
&lt;/pre&gt;

&lt;p&gt;You can then interface with the CLI by running this file on the command line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ php doctrine.php
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Automatically Generating Models&lt;/h4&gt;

&lt;p&gt;To do any serious work with Doctrine, you first need to create Models that describe the database you are working with. This is easy with the CLI:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mkdir models
$ php doctrine.php generate-models-db models
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You should now have several PHP classes in the &lt;code&gt;models&lt;/code&gt; directory.&lt;/p&gt;

&lt;h4&gt;Creating a YAML Schema file&lt;/h4&gt;

&lt;p&gt;If you need to make any edits or changes to your existing database structure, it is easy to do with the Doctrine YAML format. You can create an initial YAML file with the CLI:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mkdir schema
$ php doctrine.php generate-yaml-db schema
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Dumping Existing Data&lt;/h4&gt;

&lt;p&gt;If the existing database already has data, you can dump this data into a YAML file known as a “Fixture”:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ mkdir fixtures
$ php doctrine.php dump-data fixtures
&lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Reloading Your Database&lt;/h4&gt;

&lt;p&gt;After you make any changes to the schema and existing fixtures (for example, renaming a table), you can reload your database with the CLI. This will drop all tables, then re-create all tables with the new schema and reload all of the existing fixtures as well as regenerate all Models:&lt;/p&gt;

&lt;p&gt;$ php doctrine.php build-all-reload&lt;/p&gt;

&lt;h3&gt;Relationships with Existing Databases&lt;/h3&gt;

&lt;p&gt;The database I am working with right now is rather sloppy and I haven’t been able to get automatic relationship recognition to work. Therefore, the solution is to manually define the relationships. This can either be done in the schema YAML or in the Models. If it is defined in the schema, you have the benefit of not having to redefine the relationship in the Models when they are regenerated.&lt;/p&gt;

&lt;p&gt;Again, since the test database I am working with is old and inconsistent, even describing relationships in the Schema is not working (Foreign constraint fails). Therefore, I have to opt to describing the relationship through the Models. For example, if I have a &lt;code&gt;users&lt;/code&gt; table and a &lt;code&gt;messages&lt;/code&gt; table and each user can have many messages, I add the following to the Users class definition under &lt;code&gt;setUp()&lt;/code&gt;:&lt;/p&gt;

&lt;pre class="sh_php"&gt;
&lt;?php
$this-&gt;hasMany('Messages as Messages', array(
        'local' =&gt; 'id',
        'foreign' =&gt; 'user_id'
));
&lt;/pre&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;That’s all I’ve got for Doctrine for now.&lt;/p&gt;</description><link>http://eidetica.net/post/391350025</link><guid>http://eidetica.net/post/391350025</guid><pubDate>Mon, 15 Feb 2010 13:51:07 -0700</pubDate><category>php</category><category>doctrine</category><category>code</category></item><item><title>Quality Dub Techno</title><description>&lt;p&gt;I discovered Dub Techno around two years ago. The style seemed great to me: cold, mechanical, analogue, and deep. However, the only problem was that I could rarely ever distinguish one song from another. Stereotypical Techno, I know, but it’s very apparent for Dub Techno. This frustrated me to no end and I would usually just end up not listening to the style at all.&lt;/p&gt;

&lt;p&gt;Tonight I was cleaning out some music folders and came across some &lt;a href="http://www.echocord.com/"&gt;echocord&lt;/a&gt;. As much as I like the idea of dub techno, this music just didn’t sit right with me, so I deleted it.&lt;/p&gt;

&lt;p&gt;Later I came across some &lt;a href="http://www.discogs.com/label/Scion+Versions"&gt;Scion Versions&lt;/a&gt;.  “Holy shit,” I thought, “this is good.”&lt;/p&gt;

&lt;p&gt;Then I had an idea. I recovered some of the echocord and started switching between the two. The Scion Versions was by far better.&lt;/p&gt;

&lt;p&gt;So not &lt;em&gt;all&lt;/em&gt; Dub Techno sounds the same. It was a revelation to me.&lt;/p&gt;

&lt;p&gt;Here’s an example. The below video is from the Scion Versions label:&lt;/p&gt;

&lt;p&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/5lZrVQ3rtnY&amp;hl=en_US&amp;fs=1&amp;"&gt;
&lt;param name="allowFullScreen" value="true"&gt;
&lt;param name="allowscriptaccess" value="always"&gt;
&lt;embed src="http://www.youtube.com/v/5lZrVQ3rtnY&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;

&lt;p&gt;And this one is echocord:&lt;/p&gt;

&lt;p&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/G_OO27Qu8-Y&amp;hl=en_US&amp;fs=1&amp;"&gt;
&lt;param name="allowFullScreen" value="true"&gt;
&lt;param name="allowscriptaccess" value="always"&gt;
&lt;embed src="http://www.youtube.com/v/G_OO27Qu8-Y&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;</description><link>http://eidetica.net/post/385017030</link><guid>http://eidetica.net/post/385017030</guid><pubDate>Thu, 11 Feb 2010 22:21:45 -0700</pubDate><category>dub</category><category>techno</category><category>music</category></item><item><title>listening to "deepzone - Marshall Jefferson vs. Noosa Heads - Mushrooms (Salt City Orchestra remix)"</title><description>&lt;a href="http://blip.fm/~kq6zj"&gt;listening to "deepzone - Marshall Jefferson vs. Noosa Heads - Mushrooms (Salt City Orchestra remix)"&lt;/a&gt;</description><link>http://eidetica.net/post/382497651</link><guid>http://eidetica.net/post/382497651</guid><pubDate>Wed, 10 Feb 2010 15:27:23 -0700</pubDate></item><item><title>LPI and NOVELL partnership</title><description>&lt;a href="http://www.lpi.org/eng/certification/lpi_and_novell_partnership"&gt;LPI and NOVELL partnership&lt;/a&gt;: &lt;p&gt;I just got a free certification!&lt;/p&gt;</description><link>http://eidetica.net/post/382326886</link><guid>http://eidetica.net/post/382326886</guid><pubDate>Wed, 10 Feb 2010 13:22:57 -0700</pubDate><category>linux</category><category>lpi</category><category>novell</category></item><item><title>orbus004 – June 22, 1996 – Los Angeles</title><description>&lt;a href="http://orbus.terrarum.net/show/orbus004-june-22-1996-los-angeles.html"&gt;orbus004 – June 22, 1996 – Los Angeles&lt;/a&gt;: &lt;p&gt;The Orb live @ Organic ‘96 Los Angeles&lt;/p&gt;</description><link>http://eidetica.net/post/382091662</link><guid>http://eidetica.net/post/382091662</guid><pubDate>Wed, 10 Feb 2010 10:36:26 -0700</pubDate></item><item><title>orbus003 – October 14, 1992 – Leeds</title><description>&lt;a href="http://orbus.terrarum.net/show/orbus003-october-14-1992-leeds.html"&gt;orbus003 – October 14, 1992 – Leeds&lt;/a&gt;: &lt;p&gt;The Orb live @ Leeds University ‘92&lt;/p&gt;</description><link>http://eidetica.net/post/374535663</link><guid>http://eidetica.net/post/374535663</guid><pubDate>Sat, 06 Feb 2010 12:16:10 -0700</pubDate></item><item><title>Calgary - U of C offends Chinese government</title><description>&lt;a href="http://www.cbc.ca/canada/calgary/story/2010/02/04/calgary-university-chinese-dalai-lama.html"&gt;Calgary - U of C offends Chinese government&lt;/a&gt;: &lt;p&gt;“Academic degrees from the University of Calgary may no longer be recognized in China because that country’s government is upset the Dalai Lama was given an honourary degree last December by the university.”&lt;/p&gt;

&lt;p&gt;I really hope that people will stop taking Universities seriously one day.&lt;/p&gt;</description><link>http://eidetica.net/post/372617901</link><guid>http://eidetica.net/post/372617901</guid><pubDate>Fri, 05 Feb 2010 11:02:16 -0700</pubDate></item><item><title>Massive Attack: Splitting the Atom</title><description>&lt;object width="400" height="255" id="delve_playerf41db15d64b449eaa0064d5529d83f23334260o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"&gt;&lt;param name="movie" value="http://assets.delvenetworks.com/player/loader.swf" /&gt;&lt;param name="wmode" value="window" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="flashvars" value="mediaId=691af89607894fb7849c31295b031020&amp;playerForm=88a26316a62d4655a806dda0da4e95ca&amp;autoplayNextClip=true" /&gt;&lt;embed src="http://assets.delvenetworks.com/player/loader.swf" name="delve_playerf41db15d64b449eaa0064d5529d83f23334260e" wmode="window" width="400" height="255" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" flashvars="mediaId=691af89607894fb7849c31295b031020&amp;playerForm=88a26316a62d4655a806dda0da4e95ca&amp;autoplayNextClip=true"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Massive Attack: Splitting the Atom&lt;/p&gt;</description><link>http://eidetica.net/post/368974484</link><guid>http://eidetica.net/post/368974484</guid><pubDate>Wed, 03 Feb 2010 10:00:17 -0700</pubDate></item><item><title>Facebook Developers | HipHop for PHP: Move Fast</title><description>&lt;a href="http://developers.facebook.com/news.php?blog=1&amp;story=358"&gt;Facebook Developers | HipHop for PHP: Move Fast&lt;/a&gt;</description><link>http://eidetica.net/post/368892177</link><guid>http://eidetica.net/post/368892177</guid><pubDate>Wed, 03 Feb 2010 08:43:58 -0700</pubDate></item><item><title>Dirty Harry</title><description>&lt;img src="http://26.media.tumblr.com/tumblr_kx4rja2U611qzz4jfo1_400.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://xkcd.com/692/"&gt;Dirty Harry&lt;/a&gt;&lt;/p&gt;</description><link>http://eidetica.net/post/363778324</link><guid>http://eidetica.net/post/363778324</guid><pubDate>Sun, 31 Jan 2010 14:25:58 -0700</pubDate></item><item><title>Wordpress Markdown Codeblock Attributes Patch</title><description>&lt;a href="http://joe.topjian.net/wpmarkdown_codeblock_attrib.patch"&gt;Wordpress Markdown Codeblock Attributes Patch&lt;/a&gt;: &lt;p&gt;I like to write in Markdown format but I also like using a Syntax highlighter such as &lt;a href="http://code.google.com/p/syntaxhighlighter"&gt;Google  Syntax Highlighter&lt;/a&gt;. The two formats do not work well together.&lt;/p&gt;

&lt;p&gt;This patch will modify the &lt;a href="http://wordpress.org/extend/plugins/markdown-for-wordpress-and-bbpress/"&gt;Wordpress Markdown Plugin&lt;/a&gt; to allow extra attributes with a fenced codeblock in order to work with Google Syntax Highlighter. For example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
~~~ name="code" class="php"
code goes here
~~~
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will result in &lt;code&gt;&lt;pre name="code" class="php"&gt;&lt;/pre&gt;&lt;/code&gt;.&lt;/p&gt;</description><link>http://eidetica.net/post/362149403</link><guid>http://eidetica.net/post/362149403</guid><pubDate>Sat, 30 Jan 2010 17:05:00 -0700</pubDate><category>code</category><category>markdown</category><category>wordpress</category></item><item><title>Fabric 50 - Martyn</title><description>&lt;a href="http://www.discogs.com/Martyn-Fabric-50/release/2095422"&gt;Fabric 50 - Martyn&lt;/a&gt;: &lt;p&gt;It has some decent tracks; but overall, I thought it was a very dull mix.&lt;/p&gt;</description><link>http://eidetica.net/post/359178153</link><guid>http://eidetica.net/post/359178153</guid><pubDate>Thu, 28 Jan 2010 22:46:43 -0700</pubDate><category>music</category></item><item><title>Students shocked by proposed tuition hike</title><description>&lt;a href="http://calgary.ctv.ca/servlet/an/local/CTVNews/20100128/CGY_Tuition_UofC_100128/20100128?hub=CalgaryHome"&gt;Students shocked by proposed tuition hike&lt;/a&gt;: &lt;p&gt;Universities made sense in the 1600s.&lt;/p&gt;</description><link>http://eidetica.net/post/358828098</link><guid>http://eidetica.net/post/358828098</guid><pubDate>Thu, 28 Jan 2010 19:03:00 -0700</pubDate></item><item><title>Exactly simultaneous PowerDNS Recursor Crashes in a number of places</title><description>&lt;a href="https://lists.dns-oarc.net/pipermail/dns-operations/2010-January/004891.html"&gt;Exactly simultaneous PowerDNS Recursor Crashes in a number of places&lt;/a&gt;: &lt;p&gt;wtf&lt;/p&gt;</description><link>http://eidetica.net/post/358777746</link><guid>http://eidetica.net/post/358777746</guid><pubDate>Thu, 28 Jan 2010 18:34:05 -0700</pubDate><category>dns</category></item><item><title>via verydemotivational.com</title><description>&lt;img src="http://27.media.tumblr.com/tumblr_kwzhjqWqZr1qzz4jfo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;via &lt;a href="http://verydemotivational.com/wp-content/uploads/2010/01/129068378416580417.jpg"&gt;verydemotivational.com&lt;/a&gt;&lt;/p&gt;</description><link>http://eidetica.net/post/358725926</link><guid>http://eidetica.net/post/358725926</guid><pubDate>Thu, 28 Jan 2010 18:02:14 -0700</pubDate></item><item><title>AAPL goes on a roller-coaster ride</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_kwxmpq5VZU1qzz4jfo1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://www.tuaw.com/2010/01/27/aapl-goes-on-a-roller-coaster-ride/"&gt;AAPL goes on a roller-coaster ride&lt;/a&gt;&lt;/p&gt;</description><link>http://eidetica.net/post/357315386</link><guid>http://eidetica.net/post/357315386</guid><pubDate>Wed, 27 Jan 2010 21:23:11 -0700</pubDate></item><item><title>Apache Software Foundation releases SpamAssassin 3.3.0</title><description>&lt;a href="http://www.h-online.com/security/news/item/Apache-Software-Foundation-releases-SpamAssassin-3-3-0-914030.html"&gt;Apache Software Foundation releases SpamAssassin 3.3.0&lt;/a&gt;: &lt;p&gt;yay!&lt;/p&gt;</description><link>http://eidetica.net/post/356955119</link><guid>http://eidetica.net/post/356955119</guid><pubDate>Wed, 27 Jan 2010 17:54:48 -0700</pubDate></item><item><title>RA Poll: Top 100 albums of the '00s</title><description>&lt;a href="http://www.residentadvisor.net/feature.aspx?1144"&gt;RA Poll: Top 100 albums of the '00s&lt;/a&gt;: &lt;p&gt;Glad to see The Avalanches make it.&lt;/p&gt;</description><link>http://eidetica.net/post/354490814</link><guid>http://eidetica.net/post/354490814</guid><pubDate>Tue, 26 Jan 2010 08:47:41 -0700</pubDate></item><item><title>Fabric 41 - Luciano</title><description>&lt;p&gt;&lt;img src="http://ecx.images-amazon.com/images/I/51J8MtI8QWL._SL500_AA240_.jpg" alt="Fabric 41 - Luciano"/&gt;&lt;/p&gt;

&lt;p&gt;I haven’t been a huge fan of the minimal &amp; tech house proliferation of the past few years. It seems too… soulless. However, this mix has just enough house weaved through it to give it some life. It’s pretty good.&lt;/p&gt;</description><link>http://eidetica.net/post/353915828</link><guid>http://eidetica.net/post/353915828</guid><pubDate>Mon, 25 Jan 2010 22:51:23 -0700</pubDate><category>music</category><category>inventory</category><category>review</category></item></channel></rss>
