<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>Jazzanowak on Rails</title>
	<link>http://ruby.jazzanowak.de</link>
	<description>Daniel Nowak about Software Developing</description>
	<pubDate>Thu, 25 Feb 2010 10:43:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3 DE-Edition</generator>
	<language>en</language>
			<item>
		<title>Duplicate entries in resultset of a hibernate query</title>
		<link>http://ruby.jazzanowak.de/duplicate-entries-in-resultset-of-a-hibernate-query/</link>
		<comments>http://ruby.jazzanowak.de/duplicate-entries-in-resultset-of-a-hibernate-query/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 10:43:49 +0000</pubDate>
		<dc:creator>jazzanowak</dc:creator>
		
		<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://ruby.jazzanowak.de/duplicate-entries-in-resultset-of-a-hibernate-query/</guid>
		<description><![CDATA[If you have duplicate entries in a resultset of a hibernate query, then this could be caused by a eager fetchmode. A result is to add a ResulTransformer to your query.
Example:
Criteria criteria = getSession().createCriteria(Order.class);
criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
More Infos here: https://www.hibernate.org/117.html#A12
]]></description>
			<content:encoded><![CDATA[<p>If you have duplicate entries in a resultset of a hibernate query, then this could be caused by a eager fetchmode. A result is to add a ResulTransformer to your query.</p>
<p>Example:</p>
<pre>Criteria criteria = getSession().createCriteria(Order.class);
criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);</pre>
<p>More Infos here: <a href="https://www.hibernate.org/117.html#A12">https://www.hibernate.org/117.html#A12</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ruby.jazzanowak.de/duplicate-entries-in-resultset-of-a-hibernate-query/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Get rid off blue highlighting of focussed input fields in safari and google chrome</title>
		<link>http://ruby.jazzanowak.de/get-rid-off-blue-highlighting-of-focussed-input-fields-in-safari-and-google-chrome/</link>
		<comments>http://ruby.jazzanowak.de/get-rid-off-blue-highlighting-of-focussed-input-fields-in-safari-and-google-chrome/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 21:16:03 +0000</pubDate>
		<dc:creator>jazzanowak</dc:creator>
		
		<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://ruby.jazzanowak.de/get-rid-off-blue-highlighting-of-focussed-input-fields-in-safari-and-google-chrome/</guid>
		<description><![CDATA[If you want to get rid off the blue highlighting of focussed input fields in safari and google chrome you have to add the following style to your input fields:

input {
  outline: 0 none;
}
textarea {
  outline: 0 none;
}
]]></description>
			<content:encoded><![CDATA[<p>If you want to get rid off the blue highlighting of focussed input fields in safari and google chrome you have to add the following style to your input fields:</p>
<pre class="alt2" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 82px">
input {
  outline: 0 none;
}
textarea {
  outline: 0 none;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://ruby.jazzanowak.de/get-rid-off-blue-highlighting-of-focussed-input-fields-in-safari-and-google-chrome/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Writing mobile applications for iphone,blackberry and android</title>
		<link>http://ruby.jazzanowak.de/writing-mobile-applications-for-iphoneblackberry-and-android/</link>
		<comments>http://ruby.jazzanowak.de/writing-mobile-applications-for-iphoneblackberry-and-android/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 08:14:07 +0000</pubDate>
		<dc:creator>jazzanowak</dc:creator>
		
		<category><![CDATA[iphone]]></category>

		<category><![CDATA[android]]></category>

		<category><![CDATA[blackberry]]></category>

		<category><![CDATA[framework]]></category>

		<guid isPermaLink="false">http://ruby.jazzanowak.de/writing-mobile-applications-for-iphoneblackberry-and-android/</guid>
		<description><![CDATA[I found a very good framework for writing applications for multiple mobile devices like the iphone, blackberry or android.
The name is phonegap and you find it here.
I will write here in a few weeks about my experiences with it. But the idea behind the framework is cool. Instead of writing native code you write web [...]]]></description>
			<content:encoded><![CDATA[<p>I found a very good framework for writing applications for multiple mobile devices like the iphone, blackberry or android.</p>
<p>The name is phonegap and you find it <a href="http://phonegap.com">here</a>.</p>
<p>I will write here in a few weeks about my experiences with it. But the idea behind the framework is cool. Instead of writing native code you write web pages. That are interpreted by the browser widget of the device. But the web server is not running on a server somewhere in the internet, no it is running on the device so you can use the whole functionality of the devices API. Sounds cool, doesn&#8217;t it. Does anyone already has played with this framework, i am realy looking forward for some feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruby.jazzanowak.de/writing-mobile-applications-for-iphoneblackberry-and-android/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Date functions in DbUnit fixtures</title>
		<link>http://ruby.jazzanowak.de/date-functions-in-dbunit-fixtures/</link>
		<comments>http://ruby.jazzanowak.de/date-functions-in-dbunit-fixtures/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 11:55:05 +0000</pubDate>
		<dc:creator>jazzanowak</dc:creator>
		
		<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://ruby.jazzanowak.de/date-functions-in-dbunit-fixtures/</guid>
		<description><![CDATA[I needed some simple functions for writing integegration tests with DbUnit.
Functions like:
NOW()
addDays(NOW(),1)
So I downloaded the source code of DbUnit and added them. You can downdload the patch here, or the patched jar here.
Short Documentation
In every DateTime field in your dbunit fixture you can use the following functions:
addDays(baseDate, days), addHours(baseDate, hours),
addMinutes(baseDate, minutes) and addSeconds(baseDate, seconds)
Example 1:
&#60;table [...]]]></description>
			<content:encoded><![CDATA[<p>I needed some simple functions for writing integegration tests with DbUnit.</p>
<p>Functions like:</p>
<pre>NOW()</pre>
<pre>addDays(NOW(),1)</pre>
<p>So I downloaded the source code of DbUnit and added them. You can downdload the patch <a href="http://ruby.jazzanowak.de/wp-content/uploads/2009/07/date_functions.patch" title="DbUnit Date Functions">here</a>, or the patched jar <a href="http://ruby.jazzanowak.de/wp-content/uploads/2009/07/dbunit-246-snapshot.jar" title="DbUnit Date Functions Jar">here</a>.</p>
<h3>Short Documentation</h3>
<p>In every DateTime field in your dbunit fixture you can use the following functions:</p>
<pre>addDays(baseDate, days), addHours(baseDate, hours),</pre>
<pre>addMinutes(baseDate, minutes) and addSeconds(baseDate, seconds)</pre>
<p>Example 1:</p>
<pre>&lt;table date="addDays(NOW(),2)"/&gt;</pre>
<p>Example: 2:</p>
<pre>&lt;table date="addDays(NOW(), -2)"/&gt;</pre>
<p>Example: 3:</p>
<pre>&lt;table date="addSeconds(2000-01-01 00:00:00, 1)"/&gt;</pre>
<p>It was very helpful for me, I hope it is also helpful for you. If you find any bugs or have ideas for improving the functionality, do not hesitate to write a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruby.jazzanowak.de/date-functions-in-dbunit-fixtures/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Making a full text search with MySQL</title>
		<link>http://ruby.jazzanowak.de/making-a-full-text-search-with-mysql/</link>
		<comments>http://ruby.jazzanowak.de/making-a-full-text-search-with-mysql/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 18:21:48 +0000</pubDate>
		<dc:creator>jazzanowak</dc:creator>
		
		<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://ruby.jazzanowak.de/making-a-full-text-search-with-mysql/</guid>
		<description><![CDATA[I looked for a possiblity to add a full text search to my application without using lucene.
What I found was the FULLTEXT index of mysql.
In Detail it is described here. I provide you a short summary:
1. Create a fulltext index
ALTER TABLE entities ADD FULLTEXT KEY search_text (title);
2. Execute a select
SELECT id,title FROM entities WHERE  MATCH(title) [...]]]></description>
			<content:encoded><![CDATA[<p>I looked for a possiblity to add a full text search to my application without using lucene.</p>
<p>What I found was the FULLTEXT index of mysql.</p>
<p>In Detail it is described <a href="http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html">here</a>. I provide you a short summary:</p>
<p>1. Create a fulltext index</p>
<p>ALTER TABLE entities ADD FULLTEXT KEY search_text (title);</p>
<p>2. Execute a select</p>
<p>SELECT id,title FROM entities WHERE  MATCH(title) AGAINST (&#8217;jazz&#8217; IN BOOLEAN MODE);</p>
]]></content:encoded>
			<wfw:commentRss>http://ruby.jazzanowak.de/making-a-full-text-search-with-mysql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Making a full text search on the iPhone</title>
		<link>http://ruby.jazzanowak.de/making-a-full-text-search-on-the-iphone/</link>
		<comments>http://ruby.jazzanowak.de/making-a-full-text-search-on-the-iphone/#comments</comments>
		<pubDate>Fri, 29 May 2009 14:14:57 +0000</pubDate>
		<dc:creator>jazzanowak</dc:creator>
		
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://ruby.jazzanowak.de/making-a-full-text-search-on-the-iphone/</guid>
		<description><![CDATA[I found a GOOD article about full text search on http://vafer.org/blog/20090107014544. The author describes there a way to port lucene on the iphone and how to use sqlites built in feature for text search on the iPhone. Both ways seemed to be a little bit to complex for my problem. The Lucene port seems not [...]]]></description>
			<content:encoded><![CDATA[<p>I found a GOOD article about full text search on <a href="http://vafer.org/blog/20090107014544">http://vafer.org/blog/20090107014544</a>. The author describes there a way to port lucene on the iphone and how to use sqlites built in feature for text search on the iPhone. Both ways seemed to be a little bit to complex for my problem. The Lucene port seems not be very stable and the sqlite approach needed an own compiled sqlite lib added to your own project which could be refused by apple.</p>
<p>My approach is very easy. Just use standard sqlite and <strong>like</strong>.</p>
<p>A statement will look then like: <span class="commentbody">SELECT * FROM table WHERE hackstack like ‘%needle%’;</span></p>
<p>Because like is case insensitive it fits my needs quite good. Of course no stemming, but that is okay for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruby.jazzanowak.de/making-a-full-text-search-on-the-iphone/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Good Rails Tutorials</title>
		<link>http://ruby.jazzanowak.de/good-rails-tutorials/</link>
		<comments>http://ruby.jazzanowak.de/good-rails-tutorials/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 16:52:21 +0000</pubDate>
		<dc:creator>jazzanowak</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://ruby.jazzanowak.de/good-rails-tutorials/</guid>
		<description><![CDATA[I found a nice list of rails tutorals on this site : http://www.digitalmediaminute.com/article/1816/top-ruby-on-rails-tutorials
]]></description>
			<content:encoded><![CDATA[<p>I found a nice list of rails tutorals on this site : <a href="http://www.digitalmediaminute.com/article/1816/top-ruby-on-rails-tutorials" target="_blank">http://www.digitalmediaminute.com/article/1816/top-ruby-on-rails-tutorials</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ruby.jazzanowak.de/good-rails-tutorials/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing Ruby and Rails on Windows</title>
		<link>http://ruby.jazzanowak.de/installing-ruby-and-rails-on-windows/</link>
		<comments>http://ruby.jazzanowak.de/installing-ruby-and-rails-on-windows/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 16:48:08 +0000</pubDate>
		<dc:creator>jazzanowak</dc:creator>
		
		<category><![CDATA[general]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://ruby.jazzanowak.de/installing-ruby-and-rails-on-windows/</guid>
		<description><![CDATA[May be you heard about the web framework ruby on rails, and you want to give ti a try. Well, this post describes how you install ruby and rails on a windows computer in less then 10 minutes.
Installing Ruby
First you need to install ruby.

Download the latest ruby version from  http://www.ruby-lang.org/en/downloads/ .
Execute the installer.
Add the [...]]]></description>
			<content:encoded><![CDATA[<p>May be you heard about the web framework ruby on rails, and you want to give ti a try. Well, this post describes how you install ruby and rails on a windows computer in less then 10 minutes.</p>
<h3>Installing Ruby</h3>
<p>First you need to install ruby.</p>
<ol>
<li>Download the latest ruby version from  <a href="http://www.ruby-lang.org/en/downloads/" target="_blank">http://www.ruby-lang.org/en/downloads/</a> .</li>
<li>Execute the installer.</li>
<li>Add the Path to the ruby executable to your PATH. (You find detailed description how to expand the PATH <a href="http://vlaurie.com/computers2/Articles/environment.htm" target="_blank">here</a>.)</li>
</ol>
<h3>Install Gem</h3>
<p>Gem is the ruby <a href="http://en.wikipedia.org/wiki/RubyGems" target="_blank">packet manager</a>.  We need it beecause rails is a gem itself.</p>
<ol>
<li>Download the latest version ruby gems from  <a href="http://rubyforge.org/frs/?group_id=126" target="_blank">http://rubyforge.org/frs/?group_id=126</a></li>
<li>Exctract the archive</li>
<li>Navigate on a command shell to the  top directory (This directory contains the file setup.rb)</li>
<li>Execute the setup  file with the command : <em>ruby setup.rb</em></li>
</ol>
<h3>Installing rails</h3>
<p>We already installed ruby and the gem packet manager. The last step  is that we install rails itself.</p>
<ol>
<li>Open a command shell.</li>
<li>Type the command : <em>gem install rails</em>.</li>
</ol>
<p>That&#8217;s it ! If you want to test your installation just type on your command shell the following command.</p>
<p><em>rails myapp</em></p>
<p>This should create a rails app skeleton with the name myapp.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruby.jazzanowak.de/installing-ruby-and-rails-on-windows/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using partials in Actionmailer Templates</title>
		<link>http://ruby.jazzanowak.de/using-partials-in-actionmailer-templates/</link>
		<comments>http://ruby.jazzanowak.de/using-partials-in-actionmailer-templates/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 18:32:42 +0000</pubDate>
		<dc:creator>jazzanowak</dc:creator>
		
		<category><![CDATA[actionmailer]]></category>

		<category><![CDATA[bugfix]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[partials]]></category>

		<category><![CDATA[templates]]></category>

		<category><![CDATA[work around]]></category>

		<guid isPermaLink="false">http://ruby.jazzanowak.de/using-partials-in-actionmailer-templates/</guid>
		<description><![CDATA[If you try to use partials in an actionmailer template, you probably get the the following error message:

undefined method `controller_path' for SupportMailer:Class
That is because the actionmailer does not support partials out of the box. (here is the belonging Trac Ticket) .
But there are two workarounds:
 Patching the actionmailer staticly
This workaround is metioned in the  [...]]]></description>
			<content:encoded><![CDATA[<p>If you try to use partials in an actionmailer template, you probably get the the following error message:</p>
<pre>
undefined method `controller_path' for SupportMailer:Class</pre>
<p>That is because the actionmailer does not support partials out of the box. (here is the belonging <a href="http://dev.rubyonrails.org/ticket/2926">Trac Ticket</a>) .</p>
<p>But there are two workarounds:</p>
<h3> Patching the actionmailer staticly</h3>
<p>This workaround is metioned in the  <a href="http://dev.rubyonrails.org/ticket/2926">Bug Report</a> so I will describe its usage first, though I don&#8217;t like it.</p>
<ol>
<li>open your ruby directory (C:\Programm files\ruby or /usr/local/ruby) and then navigate to this subdirectory lib\ruby\gems\1.8\gems\actionmailer-1.x.x\lib\action_mailer.</li>
<li> open the file base.rb</li>
<li>add the following line right before/above the private statement:
<pre>
# enable partials in ActionMailer templates, there is still a lot to be
# done to make it work with auto multi-part partials
def self.controller_path #:nodoc:
  return  ''
end</pre>
</li>
<li>Restart your Server</li>
</ol>
<p>That&#8217;s it. Now you can use partials inside your mail templates.</p>
<h3> Patching the actionmailer at runtime</h3>
<p>This is my prefered way to deal with this &#8220;Bug&#8221;.</p>
<p>I add  the following file in my rails app under the path config/actionmailer_patch.rb</p>
<pre>module ActionMailer

  class Base

    # enable partials in ActionMailer templates, there is still a lot to be
    # done to make it work with auto multi-part partials
    def self.controller_path #:nodoc:
      return  ''
    end
  end
end</pre>
<p>Then include this file to your rails app by adding the following line to your config/environment.rb file:</p>
<pre>require "actionmailer_patch"</pre>
<p>After a restart of your webbrick server/fcgi process you should be able to use partials in ActionMailer Templates.</p>
<h3> Comparing the solutions</h3>
<p>The first solution has to be executed on every computer you run your app on. After every upgrade of the actionmailer this task has to be redone.</p>
<p>The second solution has to be done for every of your rails apps.</p>
<p>I usally have more mashiens and version sthen apps, that is why I prefer the second solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruby.jazzanowak.de/using-partials-in-actionmailer-templates/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hello World !</title>
		<link>http://ruby.jazzanowak.de/hallo-welt/</link>
		<comments>http://ruby.jazzanowak.de/hallo-welt/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 20:51:30 +0000</pubDate>
		<dc:creator>jazzanowak</dc:creator>
		
		<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://ruby.jazzanowak.de/?p=1</guid>
		<description><![CDATA[Hello dear reader,
my Name is Daniel Nowak. This is my blog about my expriences with the programming language Ruby  and the framework Rails. If you want to know more about me, plase read the about me page.
I hope you enjoy reading this blog. If you find anything anoying, please leave a comment.
]]></description>
			<content:encoded><![CDATA[<p>Hello dear reader,</p>
<p>my Name is Daniel Nowak. This is my blog about my expriences with the programming language Ruby  and the framework Rails. If you want to know more about me, plase read the <a href="/about-me">about me</a> page.</p>
<p>I hope you enjoy reading this blog. If you find anything anoying, please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://ruby.jazzanowak.de/hallo-welt/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
