<?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>Jenny Fong</title>
	<atom:link href="http://www.jennyfong.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jennyfong.net</link>
	<description>Blog &#38; Online Art Galleries</description>
	<lastBuildDate>Sat, 08 Oct 2011 11:25:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Blog glitches</title>
		<link>http://www.jennyfong.net/2011/10/08/blog-glitches/</link>
		<comments>http://www.jennyfong.net/2011/10/08/blog-glitches/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 11:23:26 +0000</pubDate>
		<dc:creator>Jenny</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jennyfong.net/?p=479</guid>
		<description><![CDATA[I have recently (well 2 months ago) migrated my hosting from DreamHost to a relatively cheap hosting to host wordpress since I don&#8217;t really have time to play with RoR now. And then I had to migrate my previous word press database to the new hosting, unfortunately that didn&#8217;t go so well and I ended [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently (well 2 months ago) migrated my hosting from DreamHost to a relatively cheap hosting to host wordpress since I don&#8217;t really have time to play with RoR now. And then I had to migrate my previous word press database to the new hosting, unfortunately that didn&#8217;t go so well and I ended up hacking the database to move the data across. The codes are messed up the original text and some symbols were escaped, basically hardly readable. Luckily there aren&#8217;t that many posts so I can go through each of them and fix them individually, but that&#8217;ll just take a little while. If you happen to find some of the posts writing nonsense I&#8217;m really sorry about that, I hope you&#8217;ll find the answer somewhere else on Google, otherwise please drop me an email on askme at jennyfong dot net , I have disabled comments in the posts as there&#8217;s a stupid spam going around that managed to get away from the spam filters.<br />
I hope everyone&#8217;s well, I&#8217;m currently busy doing a new course but hopefully will be blogging again soon! &#8211; Perhaps more graphics than geeky codes!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyfong.net/2011/10/08/blog-glitches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indicate git branch name in prompt / Terminal</title>
		<link>http://www.jennyfong.net/2011/07/22/indicate-git-branch-name-in-prompt-terminal/</link>
		<comments>http://www.jennyfong.net/2011/07/22/indicate-git-branch-name-in-prompt-terminal/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 16:42:09 +0000</pubDate>
		<dc:creator>Jenny</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.jennyfong.net/?p=341</guid>
		<description><![CDATA[Ubuntu Add the following to ~/.bashrc export PS1=&#039;\[\033[01;32m\]\h\[\033[01;34m\] \w\[\033[31m\]$(__git_ps1 &#34;(%s)&#34;) \[\033[01;34m\]$\[\033[00m\] &#039; Thanks for the following post: http://www.holubmichal.cz/2011/03/indicate-git-branch-in-prompt-ubuntu/]]></description>
			<content:encoded><![CDATA[<h3>Ubuntu</h3>
<p>Add the following to ~/.bashrc<br />
<pre>export PS1=&#039;\[\033[01;32m\]\h\[\033[01;34m\] \w\[\033[31m\]$(__git_ps1 &quot;(%s)&quot;) \[\033[01;34m\]$\[\033[00m\] &#039;</pre><br />
Thanks for the following post:</p>
<p><a href="http://www.holubmichal.cz/2011/03/indicate-git-branch-in-prompt-ubuntu/">http://www.holubmichal.cz/2011/03/indicate-git-branch-in-prompt-ubuntu/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyfong.net/2011/07/22/indicate-git-branch-name-in-prompt-terminal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Count down to Chinese New Year</title>
		<link>http://www.jennyfong.net/2011/01/30/count-down-to-chinese-new-year/</link>
		<comments>http://www.jennyfong.net/2011/01/30/count-down-to-chinese-new-year/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 20:38:17 +0000</pubDate>
		<dc:creator>Jenny</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.jennyfong.net/?p=335</guid>
		<description><![CDATA[3 more days until Chinese New Year! Spent 4 hours practising my rusty calligraphy yesterday, but hey, effort counts! The new year fai chun will be posted to parents tomorrow. Happy Chinese New Year!]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.jennyfong.net/wp-content/uploads/2011/01/fai_chung2.jpg"><img class="size-full wp-image-336 aligncenter" title="fsicjung" src="http://www.jennyfong.net/wp-content/uploads/2011/01/fai_chung2.jpg" alt="" /></a></p>
<p style="text-align: center;">3 more days until Chinese New Year!</p>
<p style="text-align: center;">Spent 4 hours practising my rusty calligraphy yesterday, but hey, effort counts! The new year fai chun will be posted to parents tomorrow. <img src='http://www.jennyfong.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Happy Chinese New Year!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyfong.net/2011/01/30/count-down-to-chinese-new-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error when installing yard on Ubuntu 10.04</title>
		<link>http://www.jennyfong.net/2010/08/09/error-when-install-yard-on-ubuntu/</link>
		<comments>http://www.jennyfong.net/2010/08/09/error-when-install-yard-on-ubuntu/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 07:49:12 +0000</pubDate>
		<dc:creator>Jenny</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.jennyfong.net/?p=311</guid>
		<description><![CDATA[&#62; sudo gem install yard Successfully installed yard-0.5.8 1 gem installed Installing ri documentation for yard-0.5.8... RDoc failure in lib/yard/core_ext/hash.rb at or around line 13 column 11 Before reporting this, could you check that the file you&#039;re documenting compiles cleanly--RDoc is not a full Ruby parser, and gets confused easily if fed invalid programs. The [...]]]></description>
			<content:encoded><![CDATA[<p><pre><pre>
&gt; sudo gem install yard
Successfully installed yard-0.5.8
1 gem installed
Installing ri documentation for yard-0.5.8...

RDoc failure in lib/yard/core_ext/hash.rb at or around line 13 column 11

Before reporting this, could you check that the file
you&#039;re documenting compiles cleanly--RDoc is not a
full Ruby parser, and gets confused easily if fed
invalid programs.

The internal error was:

ERROR:&nbsp;&nbsp;While generating documentation for yard-0.5.8
... MESSAGE:&nbsp;&nbsp; Name or symbol expected (got #)
... RDOC args: --ri --op /var/lib/gems/1.8/doc/yard-0.5.8/ri --quiet lib --title yard-0.5.8 Documentation
(continuing with the rest of the installation)
Installing RDoc documentation for yard-0.5.8...

RDoc failure in lib/yard/core_ext/hash.rb at or around line 13 column 11

Before reporting this, could you check that the file
you&#039;re documenting compiles cleanly--RDoc is not a
full Ruby parser, and gets confused easily if fed
invalid programs.

The internal error was:

ERROR:&nbsp;&nbsp;While generating documentation for yard-0.5.8
... MESSAGE:&nbsp;&nbsp; Name or symbol expected (got #)
... RDOC args: --op /var/lib/gems/1.8/doc/yard-0.5.8/rdoc --quiet lib --title yard-0.5.8 Documentation
(continuing with the rest of the installation)
</pre></pre><br />
The problem was because rdoc being installed on the ubuntu level not on the gem level, so all you need to do is to uninstall rdoc from apt-get remove, then re-install yard and rdoc gems.</p>
<p><pre>sudo apt-get remove rdoc</pre></p>
<p>Then uninstall yard and rdoc gems if you have installed them already</p>
<p><pre>sudo gem uninstall rdoc</pre></p>
<p><pre>sudo gem uninstall yard</pre></p>
<p>Then re-install rdoc and yard gems</p>
<p><pre>sudo gem install rdoc</pre></p>
<p><pre>sudo gem install yard</pre></p>
<p>This worked for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyfong.net/2010/08/09/error-when-install-yard-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sayonara, old site</title>
		<link>http://www.jennyfong.net/2010/08/01/sayonara-old-site/</link>
		<comments>http://www.jennyfong.net/2010/08/01/sayonara-old-site/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 17:51:36 +0000</pubDate>
		<dc:creator>Jenny</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.jennyfong.net/?p=302</guid>
		<description><![CDATA[The fact that the long-waited Rails 3 release candidate already came out last week, my existing main site written in Rails 2.1 is very outdated. My artwork and my mildly geeky blog don√¢‚Ç¨‚Ñ¢t seem to bond together very well either. I√¢‚Ç¨‚Ñ¢m going to redirect my main site to this blog for the time being, hopefully [...]]]></description>
			<content:encoded><![CDATA[<p>The fact that the long-waited <a href="http://weblog.rubyonrails.org/2010/7/26/rails-3-0-release-candidate">Rails 3 release candidate</a> already came out last week, my existing main site written in Rails 2.1 is very outdated. My artwork and my mildly geeky blog don√¢‚Ç¨‚Ñ¢t seem to bond together very well either. I√¢‚Ç¨‚Ñ¢m going to redirect my main site to this blog for the time being, hopefully the new site will be up soon √¢‚Ç¨‚Äú providing I don&#8217;t get distracted too much by the <a href="http://en.wikipedia.org/wiki/Atashin%27chi" target="_blank">new cartoon series</a> <img src='http://www.jennyfong.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p>A selection of my art work is available from <a href="http://jennyfong.daportfolio.com/gallery/321365" target="_blank">http://jennyfong.daportfolio.com/gallery/321365</a></p>
<p>Ciao, my old website</p>
<p><a href="http://www.jennyfong.net/wp-content/uploads/2010/08/Screen-shot-2010-08-01-at-01-August-2010-18.33.43-.png"><img class="alignnone size-large wp-image-303" style="border: 1px solid gray;" title="Screen shot 2010-08-01 at 01 August 2010  18.33.43" src="http://www.jennyfong.net/wp-content/uploads/2010/08/Screen-shot-2010-08-01-at-01-August-2010-18.33.43--1024x528.png" alt="" width="491" height="253" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyfong.net/2010/08/01/sayonara-old-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remotely call TinyMCE toolbar commands &#8211; List of executable instance commands</title>
		<link>http://www.jennyfong.net/2010/07/07/remotely-call-tinymce-toolbar-commands-list-of-executable-instance-commands/</link>
		<comments>http://www.jennyfong.net/2010/07/07/remotely-call-tinymce-toolbar-commands-list-of-executable-instance-commands/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 11:03:25 +0000</pubDate>
		<dc:creator>Jenny</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[build external toolbar]]></category>
		<category><![CDATA[execCommand]]></category>
		<category><![CDATA[Format Block]]></category>
		<category><![CDATA[Heading]]></category>
		<category><![CDATA[instance commands]]></category>
		<category><![CDATA[TinyMCE]]></category>
		<category><![CDATA[tinyMce.activeEditor.execCommand]]></category>

		<guid isPermaLink="false">http://blog.jennyfong.net/?p=288</guid>
		<description><![CDATA[There are two types of commands can be called within TinyMCE, the Global Commands and the Instance Commands, Global commands are independent of any editor instance (focusing a specific editor or adding a new editor to a textarea, for example). Instance commands are for a specific editor instance (making the current selection in a specific [...]]]></description>
			<content:encoded><![CDATA[<p>There are two types of commands can be called within TinyMCE, the Global Commands and the Instance Commands,</p>
<blockquote><p>Global commands are independent of any editor instance (focusing a   specific editor or adding a new editor to a textarea, for example).   Instance commands are for a specific editor instance (making the current   selection in a specific editor bold, for example).</p>
<p><a href="http://wiki.moxiecode.com/index.php/TinyMCE:Commands" target="_blank">http://wiki.moxiecode.com/index.php/TinyMCE:Commands</a></p></blockquote>
<p>The wiki page has a good range of instance commands covered, but I was unable to locate those I wanted and some took me a while to find, in this post I&#8217;m going to list the typical instance commands, this is particular useful if you are building elements outside the editor, e.g. An external toolbar. The list applies to TinyMCE version 3.<br />
<pre><pre>tinyMCE.execCommand(command, user_interface, value)
</pre></pre><br />
For example, to execute the command mceSave<br />
<pre><pre>tinyMCE.activeEditor.execCommand(&#039;mceSave&#039;, false, null)
</pre></pre><br />
I&#8217;m using the activeEditor at the moment but feel free to replace this if you have more than one editor on the same page.</p>
<table cellspacing="0px" cellpadding="2px">
<tbody>
<tr>
<th>Name</th>
<th>Command</th>
<th>user_interface, value</th>
</tr>
<tr>
<td>Save</td>
<td>mceSave</td>
<td>false, null</td>
</tr>
<tr>
<td>Undo</td>
<td>Undo</td>
<td>false, null</td>
</tr>
<tr>
<td>Redo</td>
<td>Redo</td>
<td>false, null</td>
</tr>
<tr>
<td>Select all</td>
<td>SelectAll</td>
<td>false, null</td>
</tr>
<tr>
<td>Find and Replace</td>
<td>mceSearch</td>
<td>false, null</td>
</tr>
<tr>
<td>Edit HTML</td>
<td>mceCodeEditor</td>
<td>false, null</td>
</tr>
<tr>
<td>Full Screen</td>
<td>mceFullScreen</td>
<td>false, null</td>
</tr>
<tr>
<td>Insert Row Before</td>
<td>mceTableInsertRowBefore</td>
<td>false, null</td>
</tr>
<tr>
<td>Insert Row After</td>
<td>mceTableInsertRowAfter</td>
<td>false, null</td>
</tr>
<tr>
<td>Delete Row</td>
<td>mceTableDeleteRow</td>
<td>false, null</td>
</tr>
<tr>
<td>Insert Column Before</td>
<td>mceTableInsertColBefore</td>
<td>false, null</td>
</tr>
<tr>
<td>Insert Column After</td>
<td>mceTableInsertColAfter</td>
<td>false, null</td>
</tr>
<tr>
<td>Delete Column</td>
<td>mceTableDeleteCol</td>
<td>false, null</td>
</tr>
<tr>
<td>Delete Table</td>
<td>mceTableDelete</td>
<td>false, null</td>
</tr>
<tr>
<td>Align Left</td>
<td>JustifyLeft</td>
<td>false, null</td>
</tr>
<tr>
<td>Align Center</td>
<td>JustifyCenter</td>
<td>false, null</td>
</tr>
<tr>
<td>Align Right</td>
<td>JustifyRight</td>
<td>false, null</td>
</tr>
<tr>
<td>Justified</td>
<td>JustifyFull</td>
<td>false, null</td>
</tr>
<tr>
<td>Paragraph &#8211; Normal</td>
<td>formatBlock</td>
<td>false, &#8216;p&#8217;</td>
</tr>
<tr>
<td>Paragraph &#8211; Heading 1</td>
<td>formatBlock</td>
<td>false, &#8216;h1&#8242;</td>
</tr>
<tr>
<td>Paragraph &#8211; Heading 2</td>
<td>formatBlock</td>
<td>false, &#8216;h2&#8242;</td>
</tr>
<tr>
<td>Strikethrough</td>
<td>StrikeThrough</td>
<td>false, null</td>
</tr>
<tr>
<td>Superscript</td>
<td>Superscript</td>
<td>false, null</td>
</tr>
<tr>
<td>Subscript</td>
<td>Subscript</td>
<td>false, null</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Clear Format</td>
<td>removeFormat</td>
<td></td>
</tr>
</tbody>
</table>
<p>For any other commands or calling a custom plugin, it&#8217;s pretty easy to find, go to the plugins directory &#8211; javascript/tinymce/jscrips/tinymce/plugins<br />
And find the editor_plugin_src.js, and in that file find the line</p>
<p><pre><pre>
ed.addCommand(&#039;mceExample&#039;, function() {
..
</pre></pre></p>
<p>This line registers the command, so that you can call</p>
<p><code>tinyMCE.activeEditor.execCommand(&#039;mceExample&#039;);</code></p>
<p>to trigger this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyfong.net/2010/07/07/remotely-call-tinymce-toolbar-commands-list-of-executable-instance-commands/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using jQuery and Prototype within the same page</title>
		<link>http://www.jennyfong.net/2010/05/11/using-jquery-and-prototype-in-the-same-page/</link>
		<comments>http://www.jennyfong.net/2010/05/11/using-jquery-and-prototype-in-the-same-page/#comments</comments>
		<pubDate>Tue, 11 May 2010 10:37:19 +0000</pubDate>
		<dc:creator>Jenny</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[dollar sign in jQuery]]></category>
		<category><![CDATA[jQuery and prototype]]></category>
		<category><![CDATA[Learning jQuery]]></category>
		<category><![CDATA[same page]]></category>

		<guid isPermaLink="false">http://blog.jennyfong.net/?p=277</guid>
		<description><![CDATA[Conflicts could arise if you&#8217;re using jQuery and other JavaScript libraries on the same page, this is because the dollar sign ($) is very commonly used in JavaScript libraries but it is also an alias for jQuery. To resolve this, use the .noConflict() method provided by jQuery to return the control of the &#8216;$&#8217; identifier [...]]]></description>
			<content:encoded><![CDATA[<p>Conflicts could arise if you&#8217;re using jQuery and other JavaScript libraries on the same page, this is because the dollar sign ($) is very commonly used in JavaScript libraries but it is also an alias for jQuery. To resolve this, use the .noConflict() method provided by jQuery to return the control of the &#8216;$&#8217; identifier back to other JavaScript libraries.</p>
<p>For example when using Prototype together with jQuery:</p>
<p><pre><pre>
&lt;script src=&quot;prototype.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;jquery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&gt;
jQuery.noConflict();
&lt;/script&gt;
&lt;script src=&quot;myfile.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

</pre></pre></p>
<p><pre><pre>jQuery(document).ready(function($) {
// We can use $ like normal here
});</pre></pre></p>
<p>Reference: Page 38, Learning jQuery 1.3 by Jonathan Chaffer, Karl Swedberg</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyfong.net/2010/05/11/using-jquery-and-prototype-in-the-same-page/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Testing IE6, IE7 and IE8 on a single machine</title>
		<link>http://www.jennyfong.net/2010/04/18/testing-ie6-ie7-and-ie8-on-a-single-machine/</link>
		<comments>http://www.jennyfong.net/2010/04/18/testing-ie6-ie7-and-ie8-on-a-single-machine/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 20:16:25 +0000</pubDate>
		<dc:creator>Jenny</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[IETester]]></category>
		<category><![CDATA[Test IE6]]></category>
		<category><![CDATA[virtual PC]]></category>
		<category><![CDATA[Virtual PC Image]]></category>

		<guid isPermaLink="false">http://blog.jennyfong.net/?p=214</guid>
		<description><![CDATA[The information of this article is extracted from the blog here: http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-achine.aspx Download a Virtual PC &#8211; This only supports machines up to 32 bits √Ø¬ª¬øhttp://www.microsoft.com/downloads/details.aspx?FamilyId=6D58729D-DFA8-40BF-AFAF-20BCB7F01CD1&#38;displaylang=en For 64 bits machines or windows 7 machines http://www.microsoft.com/windows/virtual-pc/download.aspx Download VPC Image for IE6, IE7 and IE8 http://go.microsoft.com/fwlink/?LinkId=70868 Alternatively, you can download a software called IEtester which has all [...]]]></description>
			<content:encoded><![CDATA[<p>The information of this article is extracted from the blog here: <a href=" http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-machine.aspx">http://blogs.msdn.com/ie/archive/2006/11/30/ie6-and-ie7-running-on-a-single-achine.aspx</a></p>
<p>Download a Virtual PC &#8211; This only supports machines up to 32 bits<br />
<a href="√Ø¬ª¬øhttp://www.microsoft.com/downloads/details.aspx?FamilyId=6D58729D-DFA8-40BF-AFAF-20BCB7F01CD1&amp;displaylang=en">√Ø¬ª¬øhttp://www.microsoft.com/downloads/details.aspx?FamilyId=6D58729D-DFA8-40BF-AFAF-20BCB7F01CD1&amp;displaylang=en</a></p>
<p>For 64 bits machines or windows 7 machines<br />
<a href="http://www.microsoft.com/windows/virtual-pc/download.aspx">http://www.microsoft.com/windows/virtual-pc/download.aspx<br />
</a><br />
Download VPC Image for IE6, IE7 and IE8<br />
<a href="http://go.microsoft.com/fwlink/?LinkId=70868">http://go.microsoft.com/fwlink/?LinkId=70868</a></p>
<p>Alternatively, you can download a software called IEtester which has all IE versions included, but the build versions are different from the VPC images above. </p>
<p>IETester: <a href="http://www.my-debugbar.com/wiki/IETester/HomePage">http://www.my-debugbar.com/wiki/IETester/HomePage</a></p>
<p>I always use both to test IE6 as they can behave differently with just one minor version apart. </p>
<p>IE6 Build version on IETester is 6.0.2800.1314<br />
<a href="http://www.my-debugbar.com/forum/p1401-2009-04-14-08:25:25.html">http://www.my-debugbar.com/forum/p1401-2009-04-14-08:25:25.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyfong.net/2010/04/18/testing-ie6-ie7-and-ie8-on-a-single-machine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Create YML fixtures from existing database</title>
		<link>http://www.jennyfong.net/2010/04/18/create-yml-fixtures-from-existing-database/</link>
		<comments>http://www.jennyfong.net/2010/04/18/create-yml-fixtures-from-existing-database/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 19:59:01 +0000</pubDate>
		<dc:creator>Jenny</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[existing database]]></category>
		<category><![CDATA[fixtures]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[YML]]></category>

		<guid isPermaLink="false">http://blog.jennyfong.net/?p=185</guid>
		<description><![CDATA[References: http://snippets.dzone.com/posts/show/2525 http://media.pragprog.com/titles/fr_rr/code/CreateFixturesFromLiveData/lib/tasks/extract_fixtures.rake desc &#039;Create YAML test fixtures from data in an existing database. Defaults to development database.&#160;&#160;Set RAILS_ENV to override.&#039; task :extract_fixtures =&#62; :environment do sql&#160;&#160;= &#34;SELECT * FROM %s&#34; skip_tables = [&#34;schema_info&#34;] ActiveRecord::Base.establish_connection (ActiveRecord::Base.connection.tables - skip_tables).each do &#124;table_name&#124; i = &#34;000&#34; File.open(&#34;#{RAILS_ROOT}/test/fixtures/#{table_name}.yml&#34;, &#039;w&#039;) do &#124;file&#124; data = ActiveRecord::Base.connection.select_all(sql % table_name) file.write data.inject({}) { [...]]]></description>
			<content:encoded><![CDATA[<p>References:<br />
<a href="http://snippets.dzone.com/posts/show/2525">http://snippets.dzone.com/posts/show/2525</a><br />
<a href="http://media.pragprog.com/titles/fr_rr/code/CreateFixturesFromLiveData/lib/tasks/extract_fixtures.rake">http://media.pragprog.com/titles/fr_rr/code/CreateFixturesFromLiveData/lib/tasks/extract_fixtures.rake</a></p>
<p><pre><pre>
desc &#039;Create YAML test fixtures from data in an existing database.
Defaults to development database.&nbsp;&nbsp;Set RAILS_ENV to override.&#039;

task :extract_fixtures =&gt; :environment do

sql&nbsp;&nbsp;= &quot;SELECT * FROM %s&quot;
skip_tables = [&quot;schema_info&quot;]
ActiveRecord::Base.establish_connection
(ActiveRecord::Base.connection.tables - skip_tables).each do |table_name|
i = &quot;000&quot;
File.open(&quot;#{RAILS_ROOT}/test/fixtures/#{table_name}.yml&quot;, &#039;w&#039;) do |file|
data = ActiveRecord::Base.connection.select_all(sql % table_name)
file.write data.inject({}) { |hash, record|
hash[&quot;#{table_name}_#{i.succ!}&quot;] = record
hash
}.to_yaml
end
end

end
</pre></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyfong.net/2010/04/18/create-yml-fixtures-from-existing-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test coverage using RCov</title>
		<link>http://www.jennyfong.net/2010/04/17/test-coverage-using-rcov/</link>
		<comments>http://www.jennyfong.net/2010/04/17/test-coverage-using-rcov/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 09:30:43 +0000</pubDate>
		<dc:creator>Jenny</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[rcov]]></category>
		<category><![CDATA[rcov [BUG] Segmentation fault]]></category>
		<category><![CDATA[sudo gem uninstall rcov InstallError]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>

		<guid isPermaLink="false">http://blog.jennyfong.net/?p=175</guid>
		<description><![CDATA[If you do not already know, RCov is a code coverage tool for Ruby. It is a great tool and commonly used for viewing overall test coverage of target code. I have recently done a fresh install on a new project and I am writing this entry to describe the installation process, the problems I [...]]]></description>
			<content:encoded><![CDATA[<p>If you do not already know, RCov is a code coverage tool for Ruby. It is a great tool and commonly used for viewing overall  test coverage of target code. I have recently done a fresh install on a new project and I am writing this entry to describe the installation process, the problems I encountered and the solutions I found.</p>
<p><strong>Install Rcov</strong></p>
<p>You have two options:</p>
<p style="padding-left: 30px;"><strong>1. Gem install </strong>(lightweight and very easy to install):</p>
<p><pre>sudo gem install rcov</pre></p>
<p style="padding-left: 30px;"><strong>2. Full install from tarball </strong>(claimed to be over 100 faster but requires Ruby 1.8.3 or above, this is  great if you&#8217;re running RCov continuously. E.g.√Ç¬† On cruise control)<strong>:</strong></p>
<p style="padding-left: 30px;">Download RCov from:</p>
<p style="padding-left: 30px;"><a href="http://eigenclass.org/hiki.rb?rcov#l1" target="_blank">http://eigenclass.org/hiki.rb?rcov#l1</a></p>
<p style="padding-left: 30px;">Run the following command to fire the setup:</p>
<p><pre><pre>sudo vender/plugins/rcov/setup.rb
</pre></pre></p>
<p style="padding-left: 30px;">If you cannot compile extensions for some reason, or you have an older Ruby (&lt;1.8.3), try:</p>
<p><code style="padding-left: 30px;">ruby setup.rb all --without-ext</code><br />
<strong>Run tests</strong><br />
<pre><pre>
Macintosh:trunk jennyfong$ rcov test/*.rb

Loaded suite /usr/bin/rcov
Started
Finished in 0.000256 seconds.
0 tests, 0 assertions, 0 failures, 0 errors

</pre></pre><br />
To find your summary page, [your_app]/coverage/index.html</p>
<p>You will probably notice the test coverage includes your gems directory, you can use the exclude argument to exclude it from the list:</p>
<p><pre>rcov test/*.rb --exclude gems</pre><br />
To run the tests easier, put the commands into a rake task:<br />
<pre><pre>
require &#039;rcov/rcovtask&#039;
desc &#039;Measures test coverage using rcov&#039;
namespace :rcov do
desc &#039;Measures test coverage&#039;
task :coverage do
rm_f &quot;coverage&quot;
rm_f &quot;coverage.data&quot;

rcov = &quot;rcov --rails --aggregate coverage.data --text-summary -Ilib&nbsp;&nbsp;--exclude osx\/objc,gems\/,spec\/&quot;
system(&quot;#{rcov} --no-html test/unit/*_test.rb&quot;)
system(&quot;#{rcov} --no-html test/functional/*_test.rb&quot;)
system(&quot;#{rcov} --html test/integration/*_test.rb&quot;)
system(&quot;open coverage/index.html&quot;) if PLATFORM[&#039;darwin&#039;]
end

desc &#039;Measures unit test coverage&#039;
task :unit do
rm_f &quot;coverage&quot;
rm_f &quot;coverage.data&quot;
rcov = &quot;rcov --rails --aggregate coverage.data --text-summary -Ilib&nbsp;&nbsp;--exclude osx\/objc,gems\/,spec\/&quot;
system(&quot;#{rcov} --no-html test/unit/*_test.rb&quot;)
system(&quot;open coverage/index.html&quot;) if PLATFORM[&#039;darwin&#039;]
end

desc &#039;Measures functional test coverage&#039;
task :functional do
rm_f &quot;coverage&quot;
rm_f &quot;coverage.data&quot;
rcov = &quot;rcov --rails --aggregate coverage.data --text-summary -Ilib&nbsp;&nbsp;--exclude osx\/objc,gems\/,spec\/&quot;
system(&quot;#{rcov} --no-html test/functional/*_test.rb&quot;)
system(&quot;open coverage/index.html&quot;) if PLATFORM[&#039;darwin&#039;]
end

end
</pre></pre></p>
<p>The codes above are extracted from: <a href="http://clarkware.com/cgi/blosxom/2007/01/05">http://clarkware.com/cgi/blosxom/2007/01/05</a> with modifications.</p>
<p><strong>4. Troubleshoot</strong></p>
<p><strong>Segmentation fault when trying to run &#8216;rcov test/*.rb&#8217; on Ubuntu 9.10</strong><br />
<pre><pre>jfong@netty:~/website$ rcov test/*.rb

/home/jfong/.gem/ruby/1.8/gems/rails-2.2.2/lib/ruby_version_check.rb:2: [BUG] Segmentation fault&lt;br/&gt;
ruby 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]&lt;br/&gt;
Aborted</pre></pre></p>
<p>Then I tried to un-install the gem and I got:<br />
<pre><pre>sudo gem uninstall rcov
ERROR:&nbsp;&nbsp;While executing gem ... (Gem::InstallError)
Unknown gem rcov &lt;= 0
</pre></pre><br />
Apparently there was a bug on Ubuntu and I resolved this by upgrading  to the latest version and the  gem was removed successfully.</p>
<p>Now the gem is removed successfully and when I tried to install rcov again there was no error, but .. it was still not working! Somehow the gem directory was messed up and I ended up replacing my ruby directory under /opt/ with a working copy from my colleague and it all works again.</p>
<p>Make sure you add it to your path if the ruby directory is changed:<br />
<code>export PATH=/opt/enterprise-ruby/bin/:$PATH</code><br />
I&#8217;m afraid this might not be the best solution and if you know a better way to resolve this please let me know.</p>
<p>References:</p>
<p><a href="http://eigenclass.org/hiki.rb?rcov#l1" target="_blank">http://eigenclass.org/hiki.rb?rcov#l1</a></p>
<p><a href="http://clarkware.com/cgi/blosxom/2007/01/05" target="_blank">http://clarkware.com/cgi/blosxom/2007/01/05</a></p>
<p><a href="http://thelucid.com/2007/08/24/using-rcov-to-measure-the-test-coverage-of-rails-plugins/" target="_blank">http://thelucid.com/2007/08/24/using-rcov-to-measure-the-test-coverage-of-rails-plugins/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyfong.net/2010/04/17/test-coverage-using-rcov/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

