<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' version='2.0'><channel><atom:id>http://www.blogger.com/feeds/17888006/posts/full</atom:id><lastBuildDate>Fri, 30 Mar 2007 14:36:22 +0000</lastBuildDate><title>Chistoph Online</title><description></description><link>http://cgerdes.com</link><managingEditor>Christoph</managingEditor><generator>Blogger</generator><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>15</openSearch:itemsPerPage><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/117526535018138054</guid><pubDate>Fri, 30 Mar 2007 14:29:00 +0000</pubDate><atom:updated>2007-03-30T16:36:22.513+02:00</atom:updated><title>Thanks!</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Thanks to everyone who's been sending in bug reports and ideas or otherwise supporting JarInspector! Your feedback is greatly appreciated. I just uploaded release candidate 5 which I planned to be the last before the final version. Go get it at &lt;a href="http://www.codeland.org"&gt;codeland.org&lt;/a&gt;&lt;/div&gt;</description><link>http://cgerdes.com/2007/03/thanks.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/116238747909720153</guid><pubDate>Wed, 01 Nov 2006 12:37:00 +0000</pubDate><atom:updated>2006-11-01T14:24:40.166+01:00</atom:updated><title>Converting NSString to OSType</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;OSTypes, formerly known as ResTypes, are four byte sequences to identify data formats and creator applications under MacOS X. To convert from NSString to OSType the straight forward solution might be:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;OSType convertNSStringToOSType(NSString* str) {&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;OSType app = 0;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;memcpy(&amp;app, [str cstring],sizeof(app));&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;return app;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;which works but of course ignores the encoding completely. So:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;OSType convertNSStringToOSType(NSString* str) {&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;OSType app = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  NSData* data = [str dataUsingEncoding: NSUTF8StringEncoding];&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;  [data getBytes:&amp;app length:sizeof(app)];&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;  return app;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This works great until moving the whole thing to Intel! For a java hacker puzzling at first but then, recalling computer architecture class, the endians! So a look in the &lt;a href="http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_byte_swap/chapter_4_section_5.html#//apple_ref/doc/uid/TP40002217-CH243-291523"&gt;Universal Binary Programming Guide&lt;/a&gt; yields&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;OSType convertNSStringToOSType(NSString* str) {&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;OSType app = UTGetOSTypeFromString((CFStringRef)str);&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;return app;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The CFString cast is okay &lt;a href="http://www.cocoadev.com/index.pl?CFStringRef"&gt;http://www.cocoadev.com/index.pl?CFStringRef&lt;/a&gt;&lt;/div&gt;</description><link>http://cgerdes.com/2006/11/converting-nsstring-to-ostype.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/115053635963875778</guid><pubDate>Sat, 17 Jun 2006 08:55:00 +0000</pubDate><atom:updated>2006-06-17T11:25:59.646+02:00</atom:updated><title>Building Universal Binaries for Cocoa-Java based Apps</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;With the introduction of Intel based Macs, Apple also introduced a new binary format that is capable to run natively on both architectures x86 and PowerPC. The Apple developer tools feature support for all project types to compile universal binary versions. For all projects types? All but Cocoa-Java based ones. &lt;br /&gt;Apple &lt;a href="http://developer.apple.com/documentation/Cocoa/Conceptual/LanguageIntegration/index.html"&gt;silently dropped&lt;/a&gt; support for Cocoa-Java which might explain the lack of information on how to build universal binaries for Cocoa-Java based apps. In general it is quite simple but there are a few non obvious obstacles. In order to create universal binaries the respective target in XCode must be upgraded to native. XCode, however, prohibits targets with java source code to be upgraded. The solution is to split the target in pure Obj-C part and a pure Java part. See this &lt;a href="http://lists.apple.com/archives/xcode-users/2006/Apr/msg00174.html"&gt;post&lt;/a&gt; on the XCode mailing list. Since the release J2SE 5.0 Release 4 the above approached fails with "Unable to find class:" exceptions or similar unless you make sure both targets specify the same target VM (1.3*, 1.4* ..). See also &lt;a href="http://developer.apple.com/qa/qa2006/qa1474.html"&gt;Technical Q&amp;A QA1474&lt;/a&gt;.&lt;/div&gt;</description><link>http://cgerdes.com/2006/06/building-universal-binaries-for-cocoa.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/114746745998472777</guid><pubDate>Fri, 12 May 2006 20:26:00 +0000</pubDate><atom:updated>2006-05-12T22:57:40.003+02:00</atom:updated><title>JarInspector 1.0b5</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;The JarInspector version 1.0 beta 5 has just been released. The beta 5 is a landmark release with a newly designed document based architecture. The new architecture is an important step towards the first release candidate (1.0RC1) as well as future versions. But it is already visible in the current beta which includes a feature for multiple jar file edit. Additionally the manifest editor has advanced to a general purpose editor for jar file contents. This means you can edit web.xml, jboss.xml and suchlike on the fly without the need to extract and rebuild the whole jar. &lt;br /&gt;&lt;br /&gt;In summary the features are:&lt;br /&gt;&lt;br /&gt; - jar file viewer&lt;br /&gt; - integrated editor&lt;br /&gt; - syntax highlighting&lt;br /&gt; - java class decompiler&lt;br /&gt; - file extraction&lt;br /&gt; - full integration into Mac OS X&lt;br /&gt;&lt;br /&gt;You can download the JarInspector &lt;a href="http://www.codeland.org"&gt;here&lt;/a&gt;&lt;/div&gt;</description><link>http://cgerdes.com/2006/05/jarinspector-10b5.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/114643663665491211</guid><pubDate>Sun, 30 Apr 2006 22:27:00 +0000</pubDate><atom:updated>2006-05-05T17:26:17.270+02:00</atom:updated><title>A jar file viewer for Mac OS X</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;The Jar Inspector is a cocoa based application for Mac OS X. It is a utility to view and edit jar files on the mac. Currently it features:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    a file manager for jar entries&lt;/li&gt;&lt;li&gt;    manifest viewer and editor&lt;/li&gt;&lt;li&gt;    file extraction&lt;/li&gt;&lt;li&gt;    java decompiler&lt;/li&gt;&lt;/ul&gt;Go check it out at &lt;a href="http://www.codeland.org"&gt;codeland.org&lt;/a&gt;&lt;/div&gt;</description><link>http://cgerdes.com/2006/05/jar-file-viewer-for-mac-os-x.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/114543053076506544</guid><pubDate>Wed, 19 Apr 2006 06:52:00 +0000</pubDate><atom:updated>2006-04-19T09:08:50.780+02:00</atom:updated><title>qmail and Mac OS X</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;I still get a lot of hits on my site from people searching for qmail+macosx. Back in 2001 I wrote a tutorial on howto setup qmail on macosx but lost it during a server crash in 2003, sorry. Anyway, qmail needed a patch to compile on osx. The patch is still there. You can get it &lt;a href="qmail-1.03.patch"&gt;here&lt;/a&gt;. Maybe this is of help for you. Please note that the patch is not from me but credit goes someone that also worked on the topic back then (don't remember the name). It is probably out of date anyway. I personally switched from qmail to postfix cause qmail required to lot of effort maintaining and adjusting to each new version of osx.&lt;/div&gt;</description><link>http://cgerdes.com/2006/04/qmail-and-mac-os-x.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/114390384220381149</guid><pubDate>Sat, 01 Apr 2006 14:44:00 +0000</pubDate><atom:updated>2006-04-01T17:04:03.353+02:00</atom:updated><title>JBoss, myfaces and tomahawk extensions</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Jboss uses Apache myfaces as JSF implementation. The api and impl packages are included in jbossweb-tomcatXX/jsf-libs. Unfortunately when trying to deploy a webapp that uses the tomahawk extensions you run into classloading problems (java.lang.ClassCastException) because the impl package as well as the tomahwak.jar contain both shared classes. To solve these problems make sure that all jars are loaded by the same classloader (i.e. copy tomahawk.jar to jbossweb-tomcatXX/jsf-libs or remove jsf-libs and add myfaces-api.jar, myfaces-impl.jar and tomahawk.jar to your WEB-INF/libs). With the former solution, however, you're not able to access any resources from your webapp. Therefore it is best if you remove the jsf-libs and include all required libs in the webapp.&lt;/div&gt;</description><link>http://cgerdes.com/2006/04/jboss-myfaces-and-tomahawk-extensions.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/113785496330871818</guid><pubDate>Sat, 21 Jan 2006 14:34:00 +0000</pubDate><atom:updated>2006-01-21T15:51:05.940+01:00</atom:updated><title>High load...</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;The other day when compiling a project ...&lt;br /&gt;&lt;br /&gt;&lt;center&gt; &lt;img src="higherload.gif"&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;I guess I should buy a new computer. Or should I? Concluding from this amazing piece of scientific &lt;a href="http://www.gil-barad.net/~chrisg/mooreslaw/Paper.html"&gt;work&lt;/a&gt; I could as well slack on the beach for two years then come back, buy a new computer, start the calculation and still be done earlier! Only drawback is that computations need complex enough and require appropriate amounts of cpu time.&lt;/div&gt;</description><link>http://cgerdes.com/2006/01/high-load.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/113147942851685266</guid><pubDate>Tue, 08 Nov 2005 19:47:00 +0000</pubDate><atom:updated>2005-11-08T20:51:48.863+01:00</atom:updated><title>Code from the genius himself</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;from the worst-code-ever-dept.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* @author root&lt;br /&gt;*&lt;br /&gt;* To change the template for this generated type comment go to&lt;br /&gt;* Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments&lt;br /&gt;*/&lt;/div&gt;</description><link>http://cgerdes.com/2005/11/code-from-genius-himself.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/113147887296787894</guid><pubDate>Mon, 20 Jun 2005 18:39:00 +0000</pubDate><atom:updated>2005-11-08T20:46:54.083+01:00</atom:updated><title>The other day at a Chinese restaurant</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;mhmmm yummy.&lt;br /&gt;&lt;br /&gt;&lt;img style="width: 359px; height: 314px;" src="http://www.cgerdes.com/images/chinesefood.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;Took a couble of beers but then: delicious!&lt;/div&gt;</description><link>http://cgerdes.com/2005/06/other-day-at-chinese-restaurant.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/113130439609737887</guid><pubDate>Sun, 06 Nov 2005 18:37:00 +0000</pubDate><atom:updated>2005-11-06T20:18:20.783+01:00</atom:updated><title>favicon.ico 404</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;Favicons are small (16x16 or 32x32 pixels) page icons displayed in the browsers addressbar or your favorites listings (hence: favorites icon). Most modern browsers support favicons and therefore send a http request for either /facicon.ico  or  whatever is specified in the &lt;code&gt;&amp;lt;link rel="icon"...&amp;gt;&lt;/code&gt; tag  specified in the header of the page. If the favicon.ico file does not exist browsers show a standard icon and ignore error responses from the server. Simlarly many web servers filter favicon related error messages to keep their error logs readable. &lt;br /&gt;&lt;br /&gt;If the favicon.ico file resides in a protected directory (which is likely if the context root is protected) browsers get confused and display a resource not found (404 ) error message. When a browser is pointed to http://somehost.com/ it requests the favicon file /favicon.ico. However since / is protected the browser is redirected to the login page. After specifying the correct login and password, the favicon is loaded and shown - but not the content of / (e.g. index.html).&lt;br /&gt;&lt;br /&gt;To solve the problem save the favicon file in a public context or specifically allow access to the file. For example:&lt;br /&gt;&lt;code&gt; &lt;br /&gt;&amp;lt;security-constraint&gt;&lt;br /&gt;  &amp;lt;web-resource-collection&amp;gt;&lt;br /&gt;   &amp;lt;web-resource-name&amp;gt;restricted&amp;lt;/web-resource-name&amp;gt;&lt;br /&gt;   &amp;lt;url-pattern&gt;/public/favicon.ico&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;   &amp;lt;http-method&gt;GET&amp;lt;/http-method&amp;gt;&lt;br /&gt;   &amp;lt;http-method&gt;POST&amp;lt;/http-method&amp;gt;&lt;br /&gt;  &amp;lt;/web-resource-collection&amp;gt;&lt;br /&gt; &amp;lt;/security-constraint&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Then in the header of the login page specify the location of the icon file &lt;code&gt;&lt;br /&gt;&amp;lt;link rel="icon" href="public/favicon.ico" /&amp;gt;&lt;br /&gt;&amp;lt;link rel="shortcut icon" href="/public/favicon.ico" /&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;</description><link>http://cgerdes.com/2005/11/faviconico-404.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/113084713886263429</guid><pubDate>Tue, 01 Nov 2005 11:55:00 +0000</pubDate><atom:updated>2005-11-01T13:12:18.873+01:00</atom:updated><title>ClamXav &amp; Fink</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;ClamXav comes with its own installer for the clamav engine. The installer, however, is not as frequently updated as is the clamav engine itself, yielding:&lt;br /&gt;&lt;br /&gt;&lt;pre wrap=""&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;LibClamAV Warning: ********************************************************&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;LibClamAV Warning: ***  This version of the ClamAV engine is outdated.  ***&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;LibClamAV Warning: *** DON'T PANIC! Read &lt;/span&gt;&lt;a style="font-family: courier new;" class="moz-txt-link-freetext" href="http://www.clamav.net/faq.html"&gt;http://www.clamav.net/faq.html&lt;/a&gt;&lt;span style="font-family:courier new;"&gt; ***&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;LibClamAV Warning: ********************************************************&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;in the log files. The fink version of clamav is much more recent. To make clamXav use the fink version follow this procedure:&lt;ol&gt;&lt;li&gt;Download the lastest clamXav (if this is the first install preceed like here: &lt;a href="http://http//www.clamxav.com/index.php?page=FAQ"&gt;http://www.clamxav.com/index.php?page=FAQ&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Run the removeEngine script&lt;/li&gt;&lt;li&gt;Run fink install clamav&lt;/li&gt;&lt;li&gt;Run fink install clamav-daemon&lt;/li&gt;&lt;li&gt;Edit ~/Library/Preferences/uk.co.markallan.clamxav.plist and set User Defined clamav Path to /sw (or whereever your fink installation is)&lt;/li&gt;&lt;li&gt;If not already there copy ClamXav to /Applications&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</description><link>http://cgerdes.com/2005/11/clamxav-fink.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/113043702225123524</guid><pubDate>Thu, 27 Oct 2005 18:08:00 +0000</pubDate><atom:updated>2005-10-27T20:17:02.260+02:00</atom:updated><title>Forest</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;from the coolest-software-ever-dept&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've been looking for something like this for a very long time. Forst generates ambient sounds "as if you were walking in a forrest".  Besides forrest there are several worlds to chose from: garden world, night world, storm world. Sounds are generated randomly thus forest can run for hours without repeating itself. Sound quality is a bit bad, though. Check it out at &lt;a href="http://www.macunicorn.com/forest/index.htm"&gt;http://www.macunicorn.com/forest/index.htm&lt;/a&gt;&lt;/div&gt;</description><link>http://cgerdes.com/2005/10/forest.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/113009798734162533</guid><pubDate>Sun, 23 Oct 2005 19:58:00 +0000</pubDate><atom:updated>2005-10-23T22:16:03.273+02:00</atom:updated><title>JBoss and Postgresql</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;To setup JBoss to use postgresql instead of hsqldb follow this procedure&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Shutdown JBoss&lt;/li&gt;&lt;li&gt;delete hsqldb-ds.xml from [server]/deploy&lt;br /&gt;&lt;/li&gt;&lt;li&gt;copy postgres-ds.xml from [jboss.home]/docs/examples to [server]/deploy&lt;/li&gt;&lt;li&gt;edit postgres-ds.xml and replace all occurences of PostgresDS with DefaultDS&lt;/li&gt;&lt;li&gt;delete hsqldb-jdbc?-service.xml (leave hsqldb-jdbc-state-service.xml there) [server]/deploy/jms&lt;br /&gt;&lt;/li&gt;&lt;li&gt;copy postgres-jdbc3-service.xml [jboss.home]/docs/examples/jms to [server]deploy/jms&lt;/li&gt;&lt;li&gt;edit postgres-jdbc3-service.xml and replace all occurences of PostgresDS with DefaultDS&lt;/li&gt;&lt;li&gt;Start JBoss&lt;/li&gt;&lt;li&gt;Adapt your applications and redeploy them&lt;br /&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;Tested with JBoss version 4.0.3 and postgresql 8.0.4-21&lt;/div&gt;</description><link>http://cgerdes.com/2005/10/jboss-and-postgresql.html</link><author>Christoph</author></item><item><guid isPermaLink='false'>http://www.blogger.com/feeds/17888006/posts/full/112958064182908855</guid><pubDate>Thu, 07 Jul 2005 20:18:00 +0000</pubDate><atom:updated>2005-10-18T18:33:39.036+02:00</atom:updated><title>Premium Code</title><description>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;from the worst-code-ever dept.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Found this code fragment:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ComboBox c = new ComboBox();&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;c.add("0");&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;c.add("1");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;c.add("2");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;c.add("97");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;c.add("98");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;c.add("99");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Total 101 lines of code!&lt;/div&gt;</description><link>http://cgerdes.com/2005/07/premium-code.html</link><author>Christoph</author></item></channel></rss>