<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>mycrobe</title>
	<atom:link href="http://mycrobe.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mycrobe.wordpress.com</link>
	<description></description>
	<lastBuildDate>Thu, 05 Nov 2009 21:32:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='mycrobe.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>mycrobe</title>
		<link>http://mycrobe.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://mycrobe.wordpress.com/osd.xml" title="mycrobe" />
	<atom:link rel='hub' href='http://mycrobe.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Case sensitivity in MySQL</title>
		<link>http://mycrobe.wordpress.com/2009/05/22/case-sensitivity-in-mysql/</link>
		<comments>http://mycrobe.wordpress.com/2009/05/22/case-sensitivity-in-mysql/#comments</comments>
		<pubDate>Fri, 22 May 2009 03:16:32 +0000</pubDate>
		<dc:creator>mycrobial</dc:creator>
				<category><![CDATA[1]]></category>

		<guid isPermaLink="false">http://mycrobe.wordpress.com/?p=12</guid>
		<description><![CDATA[It is sometimes necessary to perform a case-sensitive query for text stored in a MySQL table. By default, searches are case insensitive. In MySQL, the character set defines what kind of characters you can store, but not how they are compared or sorted. This is determined by the character set&#8217;s collation setting. For example, take [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mycrobe.wordpress.com&amp;blog=5830018&amp;post=12&amp;subd=mycrobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It is sometimes necessary to perform a case-sensitive query for text stored in a MySQL table.  By default, searches are case insensitive.</p>
<p>In MySQL, the <em>character set</em> defines what kind of characters you can store, but not how they are compared or sorted.  This is determined by the character set&#8217;s <em>collation</em> setting.  </p>
<p>For example, take the following table:<br />
<code><br />
CREATE TABLE `CHEM_FRAGMENT` (<br />
  `CFR_ID` bigint(20) NOT NULL auto_increment,<br />
  `CFR_SMILES` varchar(255) NOT NULL,<br />
  ...<br />
) ENGINE=InnoDB DEFAULT CHARSET=latin1<br />
</code></p>
<p>The character set is &#8216;latin1&#8242;.  The collation settings are not shown because they are set to the default value.  What&#8217;s that?  Well:</p>
<p><code><br />
mysql&gt; show collation where charset = 'latin1';</p>
<pre>
+-------------------+---------+----+---------+----------+---------+
| Collation         | Charset | Id | Default | Compiled | Sortlen |
+-------------------+---------+----+---------+----------+---------+
| latin1_german1_ci | latin1  |  5 |         | Yes      |       1 |
| latin1_swedish_ci | latin1  |  8 | Yes     | Yes      |       1 |
| latin1_danish_ci  | latin1  | 15 |         | Yes      |       1 |
| latin1_german2_ci | latin1  | 31 |         | Yes      |       2 |
| latin1_bin        | latin1  | 47 |         | Yes      |       1 |
| latin1_general_ci | latin1  | 48 |         | Yes      |       1 |
| latin1_general_cs | latin1  | 49 |         | Yes      |       1 |
| latin1_spanish_ci | latin1  | 94 |         | Yes      |       1 |
+-------------------+---------+----+---------+----------+---------+
</pre>
<p>8 rows in set (0.00 sec)<br />
</code></p>
<p>The default collation is &#8216;latin1_swedish_ci&#8217;.  Ignoring everything else, the important thing is the <em>&#8216;_ci&#8217;</em> at the end, which stands for &#8216;case insensitive&#8217;.  So change it!  &#8216;latin1_general_cs&#8217; is case sensitive, and so is &#8216;latin1_bin&#8217;.</p>
<p>To alter the collation for an <a href="http://dev.mysql.com/doc/refman/5.1/en/charset-table.html">entire table</a>:<br />
<code><br />
ALTER TABLE `THE_TABLE` <strong>COLLATE latin1_general_cs</strong>;<br />
</code></p>
<p>To alter the collation for a <a href="http://dev.mysql.com/doc/refman/5.0/en/charset-column.html">single column</a>:<br />
<code><br />
ALTER TABLE `THE_TABLE` MODIFY `THE_COLUMN` varchar(760) default NULL <strong>COLLATE latin1_general_cs</strong>;<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mycrobe.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mycrobe.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mycrobe.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mycrobe.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mycrobe.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mycrobe.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mycrobe.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mycrobe.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mycrobe.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mycrobe.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mycrobe.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mycrobe.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mycrobe.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mycrobe.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mycrobe.wordpress.com&amp;blog=5830018&amp;post=12&amp;subd=mycrobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mycrobe.wordpress.com/2009/05/22/case-sensitivity-in-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c981124160207430a9aa6fded335b44c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mycrobial</media:title>
		</media:content>
	</item>
		<item>
		<title>How to recover from a tarbomb incident, and why not to do it</title>
		<link>http://mycrobe.wordpress.com/2009/02/04/how-to-recover-from-a-tarbomb-incident-and-why-not-to-do-it/</link>
		<comments>http://mycrobe.wordpress.com/2009/02/04/how-to-recover-from-a-tarbomb-incident-and-why-not-to-do-it/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 00:25:30 +0000</pubDate>
		<dc:creator>mycrobial</dc:creator>
				<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://mycrobe.wordpress.com/?p=10</guid>
		<description><![CDATA[<a title="Wikipedia entry for Tarbomb" href="http://en.wikipedia.org/wiki/Tar_(file_format)#Tarbombs" target="_blank">Tarbombs</a> are irritating.  I found an easy way to reverse the effect and then paid the consequences for not testing it first.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mycrobe.wordpress.com&amp;blog=5830018&amp;post=10&amp;subd=mycrobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a title="Wikipedia entry for Tarbomb" href="http://en.wikipedia.org/wiki/Tar_(file_format)#Tarbombs" target="_blank">Tarbombs</a> are irritating.  I just experienced a minor one downloading the <a title="Project.net homepage" href="http://dev.project.net/trac/pnet-community/wiki">project.net</a> version <a title="Sourceforge download page link -- not to the tarball!" href="http://sourceforge.net/project/showfiles.php?group_id=198504&amp;package_id=304410">9 beta 1 tarball</a>.  My working directory was filled with install scripts and a file called &#8220;ping.html&#8221; that I was fairly sure I didn&#8217;t care about.</p>
<p>There&#8217;s an easy way to fix it using <code>xargs</code>, that I found via google on <a href="http://it.toolbox.com/blogs/locutus/easily-recover-from-a-tarbomb-with-xargs-27008">Toolbox for IT</a>, a new site for me.</p>
<p>All you do is ask tar to list the contents of the tarball and use <code>xargs</code> to delete those files.  Look how easy it seems:</p>
<p><code>$ tar ztf project_net_installer_linux90b1.tar.gz | xargs rm -rf</code></p>
<p>HOWEVER. The first entry in this particular tarball is &#8216;<code>./</code>&#8216;.  So the first thing running that script did was to delete everything in my working directory (and tell me that it couldn&#8217;t delete the working directory itself).  Awesome.</p>
<p>Nothing of value was lost, though I did have to redownload the tarball.  And this is nowhere near as elegant, but to save youself from this one could try</p>
<p><code>$ tar ztf project_net_installer_linux90b1.tar.gz | egrep -v '^./$' | xargs rm -rf</code></p>
<p>It worked for me.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mycrobe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mycrobe.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mycrobe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mycrobe.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mycrobe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mycrobe.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mycrobe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mycrobe.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mycrobe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mycrobe.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mycrobe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mycrobe.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mycrobe.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mycrobe.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mycrobe.wordpress.com&amp;blog=5830018&amp;post=10&amp;subd=mycrobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mycrobe.wordpress.com/2009/02/04/how-to-recover-from-a-tarbomb-incident-and-why-not-to-do-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c981124160207430a9aa6fded335b44c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mycrobial</media:title>
		</media:content>
	</item>
		<item>
		<title>Working with SDFs using MX and groovy</title>
		<link>http://mycrobe.wordpress.com/2008/12/18/working-with-sdfs-using-mx-and-groovy/</link>
		<comments>http://mycrobe.wordpress.com/2008/12/18/working-with-sdfs-using-mx-and-groovy/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 07:57:22 +0000</pubDate>
		<dc:creator>mycrobial</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[cheminformatics]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[mx]]></category>

		<guid isPermaLink="false">http://mycrobe.wordpress.com/?p=4</guid>
		<description><![CDATA[Rich Apodaca recently introduced MX, a lightweight cheminformatics toolkit. He also recently published a quick demo to demonstrate how easy it was to use MX to read and write SDFiles using jruby to script it. I wanted to replicate the functionality in groovy, another scripting language that runs on the JVM &#8212; one I&#8217;ve recently been using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mycrobe.wordpress.com&amp;blog=5830018&amp;post=4&amp;subd=mycrobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Rich Apodaca recently introduced <a href="http://code.google.com/p/mx-java">MX</a>, a lightweight cheminformatics toolkit.  He also recently published a quick demo to demonstrate how easy it was to <a href="http://depth-first.com/articles/2008/12/15/reading-and-writing-sd-files-with-mx">use MX to read and write SDFiles</a> using <a href="http://jruby.codehaus.org/">jruby</a> to script it.</p>
<p>I wanted to replicate the functionality in <a href="http://groovy.codehaus.org/">groovy</a>, another scripting language that runs on the JVM &#8212; one I&#8217;ve recently been using quite extensively (in conjunction with its web development framework called, inevitably, <a href="http://grails.org/">grails</a>).</p>
<p>Here&#8217;s what I did to get this working</p>
<ol>
<li>Download mx
<pre>$ wget wget http://mx-java.googlecode.com/files/mx-0.107.0.jar</pre>
</li>
<li>Copy to ~/.groovy/lib
<pre>$ cp mx-0.107.0.jar ~/.groovy/lib</pre>
</li>
<li>Test reading an SD file in groovy (this is transliterated from the example provided by Mr Apodaca)
<pre>$ groovysh
Groovy Shell (1.5.6, JVM: 1.6.0_0-b12)
Type 'help' or '\h' for help.
-------------------------------------------------------------------------------
groovy:000&gt; import com.metamolecular.mx.io.mdl.SDFileReader
groovy:000&gt; r = new SDFileReader("example.sdf")
===&gt; com.metamolecular.mx.io.mdl.SDFileReader@4e2892b
groovy:000&gt; r.nextRecord()
===&gt; null
groovy:000&gt; m = r.molecule
===&gt; com.metamolecular.mx.model.DefaultMolecule@64c272bc
groovy:000&gt; m.countAtoms()
===&gt; 20
groovy:000&gt; r.keys.each{ key -&gt; println "$key : ${r.getData(key)}" }
Mol Weight : 275.2203
Formula : C11H9N5O4
===&gt; [Mol Weight, Formula]</pre>
</li>
</ol>
<p>There you have it! I am impressed with the relatively straightforward API, though it is rather tempting to wrap it inside a <a href="http://groovy.codehaus.org/Builders">groovy builder</a> to make a mini-DSL. SDFileBuilder has a certain ring to it&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mycrobe.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mycrobe.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mycrobe.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mycrobe.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/mycrobe.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/mycrobe.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/mycrobe.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/mycrobe.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mycrobe.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mycrobe.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mycrobe.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mycrobe.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mycrobe.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mycrobe.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mycrobe.wordpress.com&amp;blog=5830018&amp;post=4&amp;subd=mycrobe&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://mycrobe.wordpress.com/2008/12/18/working-with-sdfs-using-mx-and-groovy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c981124160207430a9aa6fded335b44c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mycrobial</media:title>
		</media:content>
	</item>
	</channel>
</rss>
