<?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>Misterdom's World &#187; Dev Logbook</title>
	<atom:link href="http://www.guinard.org/~misterdom/category/loogbook/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.guinard.org/~misterdom</link>
	<description>My Computing Logbook</description>
	<lastBuildDate>Fri, 25 Jun 2010 14:12:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Packaging a Property File in a Maven Project</title>
		<link>http://www.guinard.org/~misterdom/2010/06/25/property-file-maven-project/</link>
		<comments>http://www.guinard.org/~misterdom/2010/06/25/property-file-maven-project/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 14:12:52 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=154</guid>
		<description><![CDATA[When working with a Maven project, property (e.g. config.properties) files are not copied to the build as a default. The easiest way to have them appear in the final jar is to put them in ${basedir}/src/main/resources.
As a result your property file will be copied at the root of your packaged jar.
]]></description>
			<content:encoded><![CDATA[<p>When working with a Maven project, property (e.g. config.properties) files are not copied to the build as a default. The easiest way to have them appear in the final jar is to put them in <code>${basedir}/src/main/resources</code>.</p>
<p>As a result your property file will be copied at the root of your packaged jar.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2010/06/25/property-file-maven-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manually Add a Jar to a Maven Repository</title>
		<link>http://www.guinard.org/~misterdom/2010/06/21/manually-add-a-jar-to-a-maven-repository/</link>
		<comments>http://www.guinard.org/~misterdom/2010/06/21/manually-add-a-jar-to-a-maven-repository/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 16:42:15 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[jar]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=148</guid>
		<description><![CDATA[Use this command to manually add a Jar to a Maven Repository
mvn install:install-file -DgroupId=javax.comm -DartifactId=comm -Dversion=3.0 -Dpackaging=jar -Dfile=/home/misterdom/Documents/3_Software_Projects/WebPlogg/commapi/comm.jar
]]></description>
			<content:encoded><![CDATA[<p>Use this command to manually add a Jar to a Maven Repository<br />
<code>mvn install:install-file -DgroupId=javax.comm -DartifactId=comm -Dversion=3.0 -Dpackaging=jar -Dfile=/home/misterdom/Documents/3_Software_Projects/WebPlogg/commapi/comm.jar</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2010/06/21/manually-add-a-jar-to-a-maven-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing a Service from Init.d in Linux</title>
		<link>http://www.guinard.org/~misterdom/2010/05/29/removing-a-service-from-init-d-in-linux/</link>
		<comments>http://www.guinard.org/~misterdom/2010/05/29/removing-a-service-from-init-d-in-linux/#comments</comments>
		<pubDate>Sat, 29 May 2010 12:53:31 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=140</guid>
		<description><![CDATA[Use this command:
sudo update-rc.d -f SERVICE_NAME remove
where SERVICE_NAME is the name of the service to remove, e.g. vsftpd.
More info on the topic: http://www.unixtutorial.org/2009/01/disable-service-startup-in-ubuntu/
]]></description>
			<content:encoded><![CDATA[<p>Use this command:</p>
<blockquote><p><code>sudo update-rc.d -f SERVICE_NAME remove</code></p></blockquote>
<p>where <code>SERVICE_NAME</code> is the name of the service to remove, e.g. vsftpd.</p>
<p>More info on the topic: <a href="http://www.unixtutorial.org/2009/01/disable-service-startup-in-ubuntu/">http://www.unixtutorial.org/2009/01/disable-service-startup-in-ubuntu/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2010/05/29/removing-a-service-from-init-d-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the Default Java Vendor (or Version) in Ubuntu</title>
		<link>http://www.guinard.org/~misterdom/2010/04/20/changing-the-default-java-vendor-or-version-in-ubuntu/</link>
		<comments>http://www.guinard.org/~misterdom/2010/04/20/changing-the-default-java-vendor-or-version-in-ubuntu/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 08:34:13 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=135</guid>
		<description><![CDATA[Run sudo update-java-alternatives -l to see the current configuration and possibilities.
Run sudo update-java-alternatives -s XXXX to set the XXX java version as default.
For Sun Java 6 this would be sudo update-java-alternatives -s java-6-sun
Run java -version to ensure that the correct version is being called. 
Source: https://help.ubuntu.com/community/Java
]]></description>
			<content:encoded><![CDATA[<p><code>Run sudo update-java-alternatives -l to see the current configuration and possibilities.</code></p>
<p><code>Run sudo update-java-alternatives -s XXXX to set the XXX java version as default.<br />
For Sun Java 6 this would be sudo update-java-alternatives -s java-6-sun</code></p>
<p>Run <code>java -version</code> to ensure that the correct version is being called. </p>
<p>Source: <a href="https://help.ubuntu.com/community/Java">https://help.ubuntu.com/community/Java</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2010/04/20/changing-the-default-java-vendor-or-version-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete all the SVN Folders in a Directory</title>
		<link>http://www.guinard.org/~misterdom/2009/10/08/delete-all-the-svn-folders/</link>
		<comments>http://www.guinard.org/~misterdom/2009/10/08/delete-all-the-svn-folders/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 16:38:06 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Dev Logbook]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=116</guid>
		<description><![CDATA[find . -name ".svn" -exec rm -rf {} \;
]]></description>
			<content:encoded><![CDATA[<blockquote><p><code>find . -name ".svn" -exec rm -rf {} \;</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2009/10/08/delete-all-the-svn-folders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browse to URI (or URL) in the Default Browser Directly From Java</title>
		<link>http://www.guinard.org/~misterdom/2009/10/03/browse-url-java/</link>
		<comments>http://www.guinard.org/~misterdom/2009/10/03/browse-url-java/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 10:52:57 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=114</guid>
		<description><![CDATA[
if (Desktop.isDesktopSupported()) {
                        Desktop dt = Desktop.getDesktop();
                        if (dt.isSupported(Desktop.Action.BROWSE)) [...]]]></description>
			<content:encoded><![CDATA[<p><code><br />
if (Desktop.isDesktopSupported()) {<br />
                        Desktop dt = Desktop.getDesktop();<br />
                        if (dt.isSupported(Desktop.Action.BROWSE)) {<br />
                            dt.browse(new URI("http://localhost:8182/EnergieVisible"));<br />
                        }<br />
                    }<br />
</code></p>
<p>From Java 1.6.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2009/10/03/browse-url-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doing PUT DELETE and Other Niceties with GWT</title>
		<link>http://www.guinard.org/~misterdom/2009/10/01/doing-put-with-gwt/</link>
		<comments>http://www.guinard.org/~misterdom/2009/10/01/doing-put-with-gwt/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 15:33:35 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Google Web Toolkit (GWT)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[POST]]></category>
		<category><![CDATA[PUT]]></category>
		<category><![CDATA[verbs]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=112</guid>
		<description><![CDATA[You probably are REST lovers like I personally am.
Thus you were probably quite frustrated when seeing that a GWT (Google Web Toolkit) client cannot send other requests than POST or GET.
Well here is the solution:
public class RequestBuilderForAnyHTTPMethodTypeExample extends RequestBuilder {
  /**
   * Constructor that allows a developer to override the HTTP method
 [...]]]></description>
			<content:encoded><![CDATA[<p>You probably are REST lovers like I <a href="http://www.webofthings.com/tag/rest/">personally am</a>.</p>
<p>Thus you were probably quite frustrated when seeing that a GWT (Google Web Toolkit) client cannot send other requests than POST or GET.<br />
Well here is the solution:</p>
<p><code>public class RequestBuilderForAnyHTTPMethodTypeExample extends RequestBuilder {</p>
<p>  /**<br />
   * Constructor that allows a developer to override the HTTP method<br />
   * restrictions imposed by the RequestBuilder class.  Note if you override the<br />
   * RequestBuilder's HTTP method restrictions in this manner, your application<br />
   * may not work correctly on Safari browsers.<br />
   *<br />
   * @param httpMethod any non-null, non-empty string is considered valid<br />
   * @param url any non-null, non-empty string is considered valid<br />
   *<br />
   * @throws IllegalArgumentException if httpMethod or url are empty<br />
   * @throws NullPointerException if httpMethod or url are null<br />
   */<br />
  public RequestBuilderForAnyHTTPMethodTypeExample(String httpMethod, String url) {<br />
    super(httpMethod, url);<br />
  }<br />
</code></p>
<p>i.e. simply subclass the <code>RequestBuilder</code></p>
<p>Source: <a href="http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/http/client/package-summary.html"> (see the bottom of the page).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2009/10/01/doing-put-with-gwt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Distributing a Visual Studio C++ Exe That Does not Need the Windows .NET Framework</title>
		<link>http://www.guinard.org/~misterdom/2009/09/17/distributing-a-visual-studio-c-exe/</link>
		<comments>http://www.guinard.org/~misterdom/2009/09/17/distributing-a-visual-studio-c-exe/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 11:49:24 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Visual Studio .Net]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[exe]]></category>
		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=108</guid>
		<description><![CDATA[If like me you export your Visual Studio (2008) .NET C++ project as an EXE, copy it on another machine and get: &#8220;This application has failed to start because the application configuration is incorrect&#8221;. Then it might be because the target machine is actually missing the Microsoft .NET Framework.
Since I did not really felt like [...]]]></description>
			<content:encoded><![CDATA[<p>If like me you export your Visual Studio (2008) .NET C++ project as an EXE, copy it on another machine and get: &#8220;This application has failed to start because the application configuration is incorrect&#8221;. Then it might be because the target machine is actually missing the Microsoft .NET Framework.</p>
<p>Since I did not really felt like asking all the future users of my app to install the .NET framework, I started looking for a way of embedding these libs in my final app.</p>
<p>While it is apparently not possible to do so without requiring a special (commercial) tool, there is a workaround that worked for me. By forcing the C/C++ to by statically linked the framework functions actually are embedded into the EXE (which, btw, gets much bigger then).</p>
<p>To do so (in Visual Studio .NET 2008 C/C++, Express) do:<br />
Property Page -> Configuration Properties -> C/C++ -> Code Generation then &#8220;Runtime Library&#8221; should be set to an &#8220;non-dll&#8221; option such as Multi-threaded (for the release target) or Multi-threaded Debug (to debug your app).</p>
<p>Here we go!</p>
<p>Sources:<br />
<a href="http://stackoverflow.com/questions/271290/can-visual-studio-2008-standard-create-a-single-exe-that-does-not-require-net-fr">http://stackoverflow.com/questions/271290/can-visual-studio-2008-standard-create-a-single-exe-that-does-not-require-net-fr</a></p>
<p><a href="http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/36971526-95f3-4a9f-a601-1843c86332c1">http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/36971526-95f3-4a9f-a601-1843c86332c1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2009/09/17/distributing-a-visual-studio-c-exe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSON and the Quoted Strings</title>
		<link>http://www.guinard.org/~misterdom/2009/09/16/json-and-the-quoted-strings/</link>
		<comments>http://www.guinard.org/~misterdom/2009/09/16/json-and-the-quoted-strings/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 16:50:38 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Dev Logbook]]></category>
		<category><![CDATA[Google Web Toolkit (GWT)]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=103</guid>
		<description><![CDATA[&#8220;Bug&#8221; number two for today is a little more tricky.
I was retrieving a JSON object in the GWT (Google Web Toolkit) and putting its Java representation in a HashMap. The only problem is that I could never find it again by referring to its key which I also extracted from JSON object. Here is why:

currentCons.get("URI").isString().toString()

Is [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Bug&#8221; number two for today is a little more tricky.</p>
<p>I was retrieving a JSON object in the <a href="../../../../category/loogbook/google-web-toolkit-gwt/">GWT (Google Web Toolkit)</a> and putting its Java representation in a <code>HashMap</code>. The only problem is that I could never find it again by referring to its key which I also extracted from JSON object. Here is why:</p>
<blockquote><p>
<code>currentCons.get("URI").isString().toString()</code>
</p></blockquote>
<p>Is actually not returning the String representation of a JSONString object but the quoted representation of that String: e.g. &#8220;key&#8221; and not key. It was in the API but it took me a while to figure it out&#8230;</p>
<p>The solution is:</p>
<blockquote><p>
<code>currentCons.get("URI").isString().stringValue();</code>
</p></blockquote>
<p>Which gets what I wanted, i.e. the String representation without the quotes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2009/09/16/json-and-the-quoted-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iterators and Deadlocks: How Not to Use Iterators!</title>
		<link>http://www.guinard.org/~misterdom/2009/09/16/iterators-and-deadlocks-how-not-to-use-iterators/</link>
		<comments>http://www.guinard.org/~misterdom/2009/09/16/iterators-and-deadlocks-how-not-to-use-iterators/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 16:34:59 +0000</pubDate>
		<dc:creator>misterdom</dc:creator>
				<category><![CDATA[Dev Logbook]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[collection]]></category>
		<category><![CDATA[iterators]]></category>

		<guid isPermaLink="false">http://www.guinard.org/~misterdom/?p=99</guid>
		<description><![CDATA[Two nice little bugs today which sums up most of my day  
How not to use iterators:


        while(views.iterator().hasNext()) {
            View currentView = (View) views.iterator.next();
            currentView.update();
 [...]]]></description>
			<content:encoded><![CDATA[<p>Two nice little bugs today which sums up most of my day <img src='http://www.guinard.org/~misterdom/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>How not to use iterators:</p>
<blockquote><p>
<code><br />
        while(views.iterator().hasNext()) {<br />
            View currentView = (View) views.iterator.next();<br />
            currentView.update();<br />
        }<br />
</code>
</p></blockquote>
<p>Bing that basically crashed my Firefox (this is part of a GWT app) when running it as well as my Netbeans / GWT debugger. Notice that Firefox was so good to tell me that apparently the script I was running in a weird manner.</p>
<p>And it was indeed in an endless loop as you can guess: invoking the <code>iterator()</code> method returns a new <code>Iterator</code> object every time (which it is supposed to do, I&#8217;m the dumb one in that story). Thus, I was basically getting the same &#8220;<code>next()</code>&#8221; object every time and <code>hasNext()</code> was thus always true <img src='http://www.guinard.org/~misterdom/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Anyway that fixes it:</p>
<blockquote><p>
<code><br />
        Iterator viewsIt = views.iterator();<br />
        while(viewsIt.hasNext()) {<br />
            View currentView = (View) viewsIt.next();<br />
            currentView.update();<br />
        }<br />
</code>
</p></blockquote>
<p>Ok that was a trivial one, but actually so trivial that I just felt like shaming me a little more and publishing it here <img src='http://www.guinard.org/~misterdom/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.guinard.org/~misterdom/2009/09/16/iterators-and-deadlocks-how-not-to-use-iterators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
