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

<channel>
	<title>Nordt Blog</title>
	<atom:link href="http://www.ncoffee.de/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.ncoffee.de/blog</link>
	<description>Life &#38; Tech</description>
	<lastBuildDate>Sat, 31 Jul 2010 12:25:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Automatic update of wordpress @Hosteurope for sub dir installations</title>
		<link>http://www.ncoffee.de/blog/?p=146</link>
		<comments>http://www.ncoffee.de/blog/?p=146#comments</comments>
		<pubDate>Sat, 31 Jul 2010 12:22:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[host europe]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.ncoffee.de/blog/?p=146</guid>
		<description><![CDATA[A solution to remove path problems with the automatic uploader of wp metioned here, is still working fine for WordPress 3 + HostEurope.]]></description>
			<content:encoded><![CDATA[<p>A solution to remove path problems with the automatic uploader of wp metioned <a href="http://www.lastmanstanding.de/2008-12-19/wordpress-27-loesung-fuer-automatisches-plugincore-update-problem">here</a>, is still working fine for WordPress 3 + HostEurope.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ncoffee.de/blog/?feed=rss2&amp;p=146</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ontology &amp; Initialisation data seed for Chado-On-Rails</title>
		<link>http://www.ncoffee.de/blog/?p=129</link>
		<comments>http://www.ncoffee.de/blog/?p=129#comments</comments>
		<pubDate>Wed, 30 Jun 2010 11:24:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bioinformatics]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[CHADO]]></category>
		<category><![CDATA[Ontologies]]></category>
		<category><![CDATA[Ontology]]></category>
		<category><![CDATA[Postgresql]]></category>
		<category><![CDATA[Rake]]></category>

		<guid isPermaLink="false">http://www.ncoffee.de/blog/?p=129</guid>
		<description><![CDATA[A CHADO instance without the use of ontologies is relatively useless, even for basic things such as running some tests in rails. Fixtures are great for minimalistic testing data but the required ontologies exceed those limits easily. This great blog post by Matthias Marschall and this thread @ stackoverflow give some very good advice, how [...]]]></description>
			<content:encoded><![CDATA[<p>A CHADO instance without the use of ontologies is relatively useless, even for basic things such as running some tests in rails. Fixtures are great for minimalistic testing data but the required ontologies exceed those limits easily.</p>
<p><a href="http://www.agileweboperations.com/seed-data-in-ruby-on-rails/">This</a> great blog post by Matthias Marschall and <a href="http://stackoverflow.com/questions/1574797/how-to-load-dbseed-data-into-test-database-automatically">this thread</a> @ stackoverflow give some very good advice, how to load the required data without the usage of fixtures. The basic idea is simple:  Dump the loaded ontologies  from Postgresql/CHADO. Overwrite a Rake task with system calls that load the sql files and finaly run the rake command to populate the db.  Hence the above mentioned solution presents a convienient way to make use of the ontologies while testing an application that relies on CHADO.</p>
<p>A basic example to solve the situation could look something like this:</p>
<p>Create a file in lib/tasks/load_seed.rake with:</p>
<pre class="brush: ruby;">
namespace :db do
  namespace :seed do

    desc &quot;load the dumped seed data from db/*.sql into the test database&quot;
    task :load =&gt; :environment do
      config = ActiveRecord::Base.configurations['test']
      system(&quot;psql --username=#{config['username']} #{config['database']} &lt; db/db_ontologies.sql&quot;)
      system(&quot;psql --username=#{config['username']} #{config['database']} &lt; db/db_initialize.sql&quot;)
     end
  end
end
</pre>
<p>To populate the test database with the data run</p>
<pre class="brush: bash;">rake:db:seed:load</pre>
<p>, in addition to</p>
<pre class="brush: bash;">rake db:test:prepare</pre>
<p>and</p>
<pre class="brush: bash;">rake db:test:load</pre>
<p>I&#8217;m using a single sql dump of the ontologies needed, since the download, conversion and load of the ontologies every time  db:seed:load is called would require an enormous amount of time.</p>
<p>(In this post I&#8217;m assuming that the database used is Postgresql and that the sql-file db_ontology.sql  represents a data dump of the chado instance  + ontologies loaded. db_initialize.sql is equal to gmod/load/etc/initialize.sql. See the CHADO installation manuel for more information.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ncoffee.de/blog/?feed=rss2&amp;p=129</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DBD::mysql install</title>
		<link>http://www.ncoffee.de/blog/?p=109</link>
		<comments>http://www.ncoffee.de/blog/?p=109#comments</comments>
		<pubDate>Wed, 09 Jun 2010 23:08:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[BioPerl]]></category>
		<category><![CDATA[Bitnami]]></category>
		<category><![CDATA[DBD::mysql]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.ncoffee.de/blog/?p=109</guid>
		<description><![CDATA[I had quite some trouble to install DBD::mysql on a Ubuntu machine with MYSQL inside the Bitnami Rubystack folder. Hence here a brief description on the solution that got things working for me: Follow the manual installation described here until the point: perl Makefile.PL. Determine the path of YOUR mysql_config file, it is in the [...]]]></description>
			<content:encoded><![CDATA[<p>I had quite some trouble to install DBD::mysql on a Ubuntu machine with MYSQL inside the Bitnami Rubystack folder. Hence here a brief description on the solution that got things working for me:</p>
<ol>
<li>Follow the manual installation described <a title="here" href="http://cpansearch.perl.org/src/CAPTTOFU/DBD-mysql-2.9007/INSTALL.html">here</a> until the point:
<pre class="brush: bash;">perl Makefile.PL.</pre>
</li>
<li>Determine the path of <strong>YOUR</strong> mysql_config file, it is in the bin folder of your installation, or try to determine it with:
<pre class="brush: bash;">whereis mysql_config</pre>
</li>
<li>call:
<pre class="brush: bash;">sudo perl Makefile.PL --mysql_config=&quot;your_mysql_path/bin/mysql_config&quot;</pre>
</li>
<li>Try to follow the instructions in #1, if an error occours that names a connection problem with:
<pre class="brush: bash;">tmp/mysql.sock</pre>
<p>set an symlink as follows:</p>
<pre class="brush: bash;">ln -s /your_path_to_your_mysq/tmp/mysql.sock /tmp/mysql.sock</pre>
</li>
<li>Try again to run make test, and u should be good to go!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.ncoffee.de/blog/?feed=rss2&amp;p=109</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Five things I used to forget about Java</title>
		<link>http://www.ncoffee.de/blog/?p=61</link>
		<comments>http://www.ncoffee.de/blog/?p=61#comments</comments>
		<pubDate>Sat, 30 May 2009 13:08:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.ncoffee.de/blog/?p=61</guid>
		<description><![CDATA[When I re-pick-up Java, after having dealt with really different programming languages in the months before, I encounter these moments of “damn-you-know-this”. So when I came back to java this time, I recorded my top five missing Java pieces: Conversion from String to Integer String example=“1”; int value = Integer.parseInt( example ); It is NOT: [...]]]></description>
			<content:encoded><![CDATA[<p>When I re-pick-up Java, after having dealt with really different programming languages  in the months before, I encounter these moments of “<strong>damn-you-know-this</strong>”.  So when I came back to java this time, I recorded my top five missing Java pieces:</p>
<ol>
<li> <strong>Conversion from String to Integer</strong>
<pre class="brush: java;">
String example=“1”;
int value = Integer.parseInt( example );
</pre>
<p>It is <strong>NOT:</strong></p>
<p><span style="text-decoration: line-through;"></p>
<pre class="brush: java;">Integer.getInteger( example );</pre>
<p></span></p>
<p>The getInteger method trys to</p>
<p></span></p>
<blockquote><p>Determines the integer value of the system property with the specified name.</p></blockquote>
</li>
<li><strong>The ? &#8211; Operator </strong>The Java ternary operator (sometimes referred to as the &#8220;questionmark operator&#8221;) is an elegeant way to deal with boolean (TRUE / FALSE) decisions or assignments in the programming world. The ternary operator differs from an if-else statement due to the fact that it is an expression that returns a value. While the if-else structure  executes a statement.  The following Example assigns the maximum Value of two ints to a new variable:
<pre class="brush: java;">
int a = 5;
int b = 10;
int max  = (a &amp;gt; b ? a : b);
</pre>
</li>
<li><strong>instanceof and isInstance </strong>The binary operator <strong>instanceof </strong>checks if an object is a member of a class:
<pre class="brush: java;">
SampleObject sample = new SampleObject();
if(sample instanceof SampleObject) {
...
}
</pre>
<p>Unfortunately though it is <strong>not possible to set the type</strong> (which the object is tested against) <strong>at runtime</strong> and use for example a string at the leftside of the instanceof operator:</p>
<pre class="brush: java;">
SampleObject sample = new SampleObject();
String sampleStr = &quot;sampleObject&quot;;
</pre>
<p><span style="text-decoration: line-through;"></p>
<pre class="brush: java;">if(sample instanceof sampleStr) {</pre>
<p></span></p>
<pre class="brush: java;">
...
}
</pre>
<p>At runtime it is possible though to check the type of an object with the <strong>isInstance </strong>method:</p>
<pre class="brush: java;">
// the object where we know what kind of type it is
SampleObject sampleold = new SampleObject();

// our &quot;unknown&quot; type object
Object samplenew = new SampleObject();

if(sampleold.getClass().isInstance(samplenew)) {
...
}
</pre>
<p>Attention to the switch of the arguments between <strong>instanceof</strong> and <strong>isInstance</strong> !</li>
<li><strong>Comparator<br />
</strong><br />
If I write a Comparator Object I usually implement Comparator&lt;T&gt; and then override  int compare(T t1, T t2). To implement a proper working compare method the following &#8220;handrules&#8221; apply:<strong> </strong></p>
<ol>
<li> (t1 &lt; t2) -&gt;  return a negative value</li>
<li>(t1 == t2) -&gt; return zero</li>
<li>(t1 &gt; t2) -&gt; return a positive value</li>
</ol>
<p>The &lt;, ==, &gt; do NOT have to refer to the standard smaller, greater, etc operators !<strong> </strong></li>
</ol>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ncoffee.de/blog/?feed=rss2&amp;p=61</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Yann Tiersen &amp; Jay Haze : Comptine d&#8217;un autre été</title>
		<link>http://www.ncoffee.de/blog/?p=29</link>
		<comments>http://www.ncoffee.de/blog/?p=29#comments</comments>
		<pubDate>Sat, 29 Nov 2008 23:34:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://www.ncoffee.de/blog/?p=29</guid>
		<description><![CDATA[Still touching but with some beat. Great rmx. Click]]></description>
			<content:encoded><![CDATA[<p>Still touching but with some beat. Great rmx.</p>
<p><a href="http://www.youtube.com/watch?v=LdYN-0X6B8E&amp;feature=related">Click</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ncoffee.de/blog/?feed=rss2&amp;p=29</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>upgrade</title>
		<link>http://www.ncoffee.de/blog/?p=27</link>
		<comments>http://www.ncoffee.de/blog/?p=27#comments</comments>
		<pubDate>Sun, 23 Nov 2008 22:51:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ncoffee.de/blog/?p=27</guid>
		<description><![CDATA[upgrade.]]></description>
			<content:encoded><![CDATA[<p>upgrade.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ncoffee.de/blog/?feed=rss2&amp;p=27</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tetris is NP-Complete</title>
		<link>http://www.ncoffee.de/blog/?p=4</link>
		<comments>http://www.ncoffee.de/blog/?p=4#comments</comments>
		<pubDate>Sat, 01 Mar 2008 22:36:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://www.ncoffee.de/blog/2008/03/01/tetris-is-np-complete/</guid>
		<description><![CDATA[During my prep for the upcoming exam in theoretical informatics I stumbled upon this Paper with the proof that Tetris is NP-Complete.  An unsual way to apply theory to practise]]></description>
			<content:encoded><![CDATA[<p>During my prep for the upcoming exam in theoretical informatics I stumbled upon this <a href="http://www.inf.fu-berlin.de/lehre/SS07/Seminar-Algorithmen-Komplexitaet/Tetris.pdf" target="_blank">Paper</a> with the proof that Tetris is NP-Complete.  An unsual way to apply theory to practise <img src='http://www.ncoffee.de/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ncoffee.de/blog/?feed=rss2&amp;p=4</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog and Page</title>
		<link>http://www.ncoffee.de/blog/?p=3</link>
		<comments>http://www.ncoffee.de/blog/?p=3#comments</comments>
		<pubDate>Thu, 28 Feb 2008 21:39:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.ncoffee.de/blog/2008/02/28/blog-and-page/</guid>
		<description><![CDATA[As you can see, an early version of my personal page plus blog is now &#8220;public&#8221;&#8230;]]></description>
			<content:encoded><![CDATA[<p>As you can see, an early version of my personal page plus blog is now &#8220;public&#8221;&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ncoffee.de/blog/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
