<?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>Fly together Forever 比翼恒飞</title>
	<atom:link href="http://www.liucougar.net/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.liucougar.net/blog</link>
	<description></description>
	<lastBuildDate>Sat, 26 Mar 2011 06:37:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Lexmark Pro900 printer linux driver</title>
		<link>http://www.liucougar.net/blog/archives/275</link>
		<comments>http://www.liucougar.net/blog/archives/275#comments</comments>
		<pubDate>Fri, 25 Mar 2011 06:42:27 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/?p=275</guid>
		<description><![CDATA[It seems there is little documentation on how to setup Lexmark Pro900 printer driver in linux. Lexmark does provide linux driver,  but it&#8217;s only for RPM or DEB based systems, without a manual installation option, which does not help much for installing to a Gentoo distribution. After jumping through several hoops by reading the various scripts [...]]]></description>
				<content:encoded><![CDATA[<p>It seems there is little documentation on how to setup Lexmark Pro900 printer driver in linux. Lexmark does provide <a href="http://support.lexmark.com/index?segment=SUPPORT&amp;userlocale=EN_US&amp;locale=en&amp;productCode=LEXMARK_PINNACLE_PRO901&amp;page=product&amp;frompage=null#1" target="_blank">linux driver</a>,  but it&#8217;s only for RPM or DEB based systems, without a manual installation option, which does not help much for installing to a Gentoo distribution.</p>
<p>After jumping through several hoops by reading the various scripts embedded in the install script and postinstall script in RPM, I finally managed to install it manually onto my Gentoo, and add the network printer to CUPS just fine. Test page shows up properly as well.</p>
<p>In order to save other gentoo users (and myself if I need to reinstall this driver), I spent sometime on writing a gentoo ebuild.</p>
<p>To use it, add my overlay first:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">layman <span style="color: #660033;">-f</span> <span style="color: #660033;">-o</span> http:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>liucougar<span style="color: #000000; font-weight: bold;">/</span>portage<span style="color: #000000; font-weight: bold;">/</span>raw<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span>profiles<span style="color: #000000; font-weight: bold;">/</span>layman.xml <span style="color: #660033;">-a</span> liucougar</pre></div></div>

<p>keyword the package:</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;net-print/lexmark-inkjet&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>portage<span style="color: #000000; font-weight: bold;">/</span>package.keywords</pre></div></div>

<p>install it as root and restart cups</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">emerge net-print<span style="color: #000000; font-weight: bold;">/</span>lexmark-inkjet
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>cups restart</pre></div></div>

<p>go to the web UI of CUPS (make sure the printer is properly setup and accessible via network), and add a printer, now you should see lexmark in the add printer page.</p>
<p>I think this ebuild should support the following printers: Pro200-S500, Pro700, Pro800-Pro900, S300-S400, S600, X2600, X3646, X4900, X5666, X7600, Z2300, Z2400. </p>
<p>There are quite some extra features in the provided binary driver package: scanner support (sane, only locally connected via USB is supported as far as I can tell), firmware updater among other things. There are not yet supported by the ebuild.</p>
<p><b>DISCLAIM</b>: I only tested with Pro900, so if it does work for you with other printers listed above, please leave a comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/275/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>announcing kojslint: komodo jslint integration with autofix</title>
		<link>http://www.liucougar.net/blog/archives/269</link>
		<comments>http://www.liucougar.net/blog/archives/269#comments</comments>
		<pubDate>Mon, 20 Dec 2010 01:47:37 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[kojslint]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/?p=269</guid>
		<description><![CDATA[Just uploaded kojslint to komodo extension site: a komodo jslint integration with additional feature of auto-fix some of the most common jslint warnings. Kojslint is a fork of kjslint: thanks Ben Smawfield, the author of kjslint. Give it a try if you use komodo IDE or Edit. Currently kojslint inherits all features from kjslint, and [...]]]></description>
				<content:encoded><![CDATA[<p>Just uploaded <a href="http://www.liucougar.net/blog/projects/kojslint">kojslint</a> to <a href="http://community.activestate.com/xpi/kojslint">komodo extension site</a>: a komodo jslint integration with additional feature of auto-fix some of the most common jslint warnings. </p>
<p>Kojslint is a fork of kjslint: thanks Ben Smawfield, the author of kjslint.</p>
<p>Give it a try if you use komodo IDE or Edit. Currently kojslint inherits all features from kjslint, and added some more (check out details on the project <a href="http://www.liucougar.net/blog/projects/kojslint">kojslint</a>):</p>
<ul>
<li>provide UI to modify all available JSLint options</li>
<li>save jslint options as profiles (called modes) which are shared for all files/projects</li>
<li>add/delete profiles (modes)</li>
<li>auto-fix some common jslint warnings</li>
<li>all jslint warnings on the same line are grouped in the “JSLint errors” output tab</li>
<li>profiles can be locked (it can’t be changed/deleted until unlocked)</li>
<li>bundled with JSLint 2010-12-08</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/269/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debug komodo extensions</title>
		<link>http://www.liucougar.net/blog/archives/262</link>
		<comments>http://www.liucougar.net/blog/archives/262#comments</comments>
		<pubDate>Mon, 13 Dec 2010 22:35:27 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[kojslint]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/?p=262</guid>
		<description><![CDATA[After asking in komodo extension forum, and then digging in google search result, I finally found out how to record all errors in chrome (including all komodo extensions)  in the error console window: According to this MDN article on how to setup mozilla extension development, set javascript.options.showInConsole = true would log errors in chrome files [...]]]></description>
				<content:encoded><![CDATA[<p>After asking in <a href="http://community.activestate.com/forum/how-debug-komodo-extension" target="_blank">komodo extension forum</a>, and then digging in google search result, I finally found out how to record all errors in chrome (including all komodo extensions)  in the error console window:</p>
<p>According to this <a href="https://developer.mozilla.org/" target="_blank">MDN</a> article on <a href="https://developer.mozilla.org/en/setting_up_extension_development_environment#Development_preferences" target="_blank">how to setup mozilla extension development</a>, set <code>javascript.options.showInConsole = true</code> would log errors in chrome files to the Error Console.</p>
<p>In order to change this option, I think &#8220;<a href="http://community.activestate.com/xpi/komodo-developer-extension" target="_blank">Komodo developer extension</a>&#8221; extension has to be installed, so you can access a JSShell. Once in a JSShell, run <code>window.openDialog("about:config", "_blank");</code> to open a config UI to change that option. Alternatively, with the same extension, there is actually a control on the UI to set this option for you automatically: &#8216;Tools&#8221; -&gt; &#8220;Extension Developer&#8221; -&gt; &#8220;Enable Debugging Preferences&#8221; (according to the <a href="http://code.google.com/p/extensiondev/source/browse/trunk/content/extensiondevOverlay.js" target="_blank">source file</a>, this control toggles the following 3 boolean options:  &#8220;nglayout.debug.disable_xul_cache&#8221;, &#8220;javascript.options.showInConsole&#8221;, &#8220;browser.dom.window.dump.enabled&#8221;)</p>
<p>Now all chrome errors should show up in the Error Console, but Komodo does not provide a UI control to open it. <a href="http://community.activestate.com/xpi/dock-error-console" target="_blank">Dock Error Console</a> extension can be installed, or the following line of js code can be executed in JSShell to open one:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript javascript" style="font-family:monospace;">window.<span style="color: #660066;">openDialog</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;chrome://global/content/console.xul&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;ErrorConsole&quot;</span><span style="color: #009900;">&#41;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/262/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing virtualbox X video driver</title>
		<link>http://www.liucougar.net/blog/archives/256</link>
		<comments>http://www.liucougar.net/blog/archives/256#comments</comments>
		<pubDate>Wed, 10 Nov 2010 04:31:11 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/?p=256</guid>
		<description><![CDATA[It has been quite a while since I started X server in one of my development gentoo virtualbox guest. Today, when I tried to startx, I got the following error: dlopen: /usr/lib/xorg/modules/drivers/vboxvideo_drv.so: undefined symbol: resVgaShared (EE) Failed to load /usr/lib/xorg/modules/drivers/vboxvideo_drv.so (EE) Failed to load module "vboxvideo" (loader failed, 7) And X failed to start.  I [...]]]></description>
				<content:encoded><![CDATA[<p>It has been quite a while since I started X server in one of my development gentoo virtualbox guest. Today, when I tried to startx, I got the following error:</p>
<pre>dlopen: /usr/lib/xorg/modules/drivers/vboxvideo_drv.so: undefined symbol: resVgaShared
(EE) Failed to load /usr/lib/xorg/modules/drivers/vboxvideo_drv.so
(EE) Failed to load module "vboxvideo" (loader failed, 7)</pre>
<p>And X failed to start.  I tried to reinstall virtualbox-guest-additions, and rebooted, but X still exists with the same error. It turns out, in order to &#8220;properly&#8221; re-install virtualbox driver in the guest, I have to re-emerge the following two packages:</p>
<pre>emerge x11-drivers/xf86-video-virtualbox x11-drivers/xf86-input-virtualbox</pre>
<p>The problem is caused by upgrading xorg-server from 1.6.x to 1.7.x, after which virtualbox guest drivers have to be re-installed (portage does not show a warning, so it took me some time to figure that out).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/256/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>s3ql ebuild for gentoo in liucougar overlay</title>
		<link>http://www.liucougar.net/blog/archives/247</link>
		<comments>http://www.liucougar.net/blog/archives/247#comments</comments>
		<pubDate>Sun, 03 Oct 2010 17:41:51 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/?p=247</guid>
		<description><![CDATA[After some research for a S3 backup strategy, I settled with s3ql which looks to be one of the most promising solutions for a maintained, compressing, de-duplicating, encrypted, chunked, S3/ssh/sftp based, backup filesystem. However, the installation of s3ql is non-trivial work because there is no ebuild for it, so I decided to write one. I [...]]]></description>
				<content:encoded><![CDATA[<p>After some research for a S3 backup strategy, I settled with <a href="http://code.google.com/p/s3ql/">s3ql</a> which looks to be one of the most promising solutions for a maintained, compressing, de-duplicating, encrypted, chunked, S3/ssh/sftp based, backup filesystem.</p>
<p>However, the installation of s3ql is non-trivial work because there is <a href="http://bugs.gentoo.org/336283">no ebuild</a> for it, so I decided to write one. I just pushed the ebuilds to the <a href="http://github.com/liucougar/portage">liucougar overlay</a> on github (which currently contains <a href="http://code.google.com/p/s3ql/">s3ql</a> and two of its dependencies missing in official gentoo portage tree). As of today, unless you are using <a href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&amp;chap=3#doc_chap2">testing branch</a> of gentoo, in order to install s3ql, the following lines has to be added to <code>/etc/portage/package.keywords</code>:</p>
<pre>sys-fs/s3ql
dev-python/pycryptopp
dev-python/pyliblzma
dev-python/unittest2 #only useful if you intend to test the package
dev-python/apsw
dev-cpp/gccxml
dev-db/sqlite</pre>
<p>Please <a href="http://github.com/liucougar/portage/issues">report</a> any issues with github.</p>
<p>Note: if you want the <a href="http://www.rath.org/s3ql-docs/contrib.html">contrib scripts</a> shipped with s3ql installed, <code>contrib</code> use flag should be specified when emerging s3ql.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/247/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>psycopg2 &#8220;hidden&#8221; dependency of mx.DateTime</title>
		<link>http://www.liucougar.net/blog/archives/233</link>
		<comments>http://www.liucougar.net/blog/archives/233#comments</comments>
		<pubDate>Sat, 10 Jul 2010 20:40:30 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/?p=233</guid>
		<description><![CDATA[While trying to run our tests in a clean virtualenv (&#8211;no-site-packages), psycopg2 (tried both 2.0.13 and 2.0.14) can not be imported with a error traceback like the following: File &#34;....py&#34;, line .., in import psycopg2 File &#34;build/bdist.linux-i686/egg/psycopg2/__init__.py&#34;, line 69, in File &#34;build/bdist.linux-i686/egg/psycopg2/_psycopg.py&#34;, line 7, in File &#34;build/bdist.linux-i686/egg/psycopg2/_psycopg.py&#34;, line 6, in __bootstrap__ ImportError: can't import mx.DateTime [...]]]></description>
				<content:encoded><![CDATA[<p>While trying to run our tests in a clean <a href="http://pypi.python.org/pypi/virtualenv" target="_blank">virtualenv</a> (&#8211;no-site-packages), psycopg2 (tried both 2.0.13 and 2.0.14) can not be imported with a error traceback like the following:</p>

<div class="wp_syntax"><div class="code"><pre class="python python" style="font-family:monospace;">File <span style="color: #483d8b;">&quot;....py&quot;</span>, line .., <span style="color: #ff7700;font-weight:bold;">in</span>
  <span style="color: #ff7700;font-weight:bold;">import</span> psycopg2
  File <span style="color: #483d8b;">&quot;build/bdist.linux-i686/egg/psycopg2/__init__.py&quot;</span>, line <span style="color: #ff4500;">69</span>, <span style="color: #ff7700;font-weight:bold;">in</span>
  File <span style="color: #483d8b;">&quot;build/bdist.linux-i686/egg/psycopg2/_psycopg.py&quot;</span>, line <span style="color: #ff4500;">7</span>, <span style="color: #ff7700;font-weight:bold;">in</span>
  File <span style="color: #483d8b;">&quot;build/bdist.linux-i686/egg/psycopg2/_psycopg.py&quot;</span>, line <span style="color: #ff4500;">6</span>, <span style="color: #ff7700;font-weight:bold;">in</span> __bootstrap__
<span style="color: #008000;">ImportError</span>: can<span style="color: #483d8b;">'t import mx.DateTime module</span></pre></div></div>

<p>However, search python source files in the install psycopg2 package does not yeild any hits on <code>mx</code>, so my conclude was that it&#8217;s being imported in the psycopg2 c library.</p>
<p>It becomes clear after I took a look at the setup.py in the source tarball of psycopg2: while building the package, the setup.py will check whether it can find mx header files under the python include dir. If it can, it would just compile in the above import line into its c library. I don&#8217;t see any way it can be disabled given you have egenix-mx-base header files installed (even if you don&#8217;t have mx python module available, it will still compile in mx.DateTime support)</p>
<p>This would only happen if you have the egenix-mx-base header files install in the global python installation.</p>
<p>One workaround I came up with is to copy over the mx dir under site-packages from the global python installation into the virtualenv environment I am using to do test. Alternatively, don&#8217;t install the header files for egenix-mx-base (although in gentoo, that means you have to manually remove the header files). For now, I settled on the former workaround.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/233/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix Skype (2.1.0.81) video in Gentoo Linux</title>
		<link>http://www.liucougar.net/blog/archives/220</link>
		<comments>http://www.liucougar.net/blog/archives/220#comments</comments>
		<pubDate>Tue, 15 Jun 2010 06:20:40 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/?p=220</guid>
		<description><![CDATA[I have a USB camera I want to use with Skype to make video calls. The camera has the following lsusb output: Bus 004 Device 002: ID 0471:0328 Philips SPC 700NC PC Camera My gentoo is 64bit, using multilib (has 32bit libraries as well). After fiddling with Google to find the proper linux kernel driver [...]]]></description>
				<content:encoded><![CDATA[<p>I have a USB camera I want to use with Skype to make video calls. The camera has the following lsusb output:</p>
<pre>Bus 004 Device 002: ID 0471:0328 Philips SPC 700NC PC Camera</pre>
<p>My gentoo is 64bit, using multilib (has 32bit libraries as well).  After fiddling with Google to find the proper linux kernel driver for a while, I found a useful website  <a href="http://cateee.net/lkddb/" target="_blank">Linux Kernel Driver DataBase (LKDDb)</a> (the kernel module is called <a href="http://cateee.net/lkddb/web-lkddb/USB_GSPCA_SONIXJ.html" target="_blank"><code>CONFIG_USB_GSPCA_SONIXJ</code></a>).  After installing the kernel driver, reboot, Skype can detect a camera device <code>/dev/video0</code>, but when clicking the test button, nothing show up (the light on the camera comes on briefly then turns off).  <a href="http://bugs.gentoo.org/240090" target="_blank">Further google</a> leads me to this solution:  Edit /usr/bin/skype, add the following line before the last line (<code>exec ./skype "$@"</code>):</p>
<pre>export LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so</pre>
<p>skype is a pre-built 32-bit binary, so I have to specify the lib32 explicitly above.  Note: if you receive any of the following errors:</p>
<pre id="comment_text_12">ERROR: ld.so: object '/usr/lib32/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib64/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib32/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/usr/lib64/libv4l/v4l2convert.so' from LD_PRELOAD cannot be preloaded: ignored.
</pre>
<p>You are probably trying to set LD_PRELOAD on a shell script (the /usr/bin/skype is actually a shell wrapper around /opt/skype/skype, the real binary), so the following would lead to one of the above errors:</p>
<pre>LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so skype</pre>
<p>Try to add that line to the script instead as suggested above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/220/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;setting a property that has only a getter error&#8221; Error in FF 3.6</title>
		<link>http://www.liucougar.net/blog/archives/207</link>
		<comments>http://www.liucougar.net/blog/archives/207#comments</comments>
		<pubDate>Fri, 19 Feb 2010 20:12:11 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[dojo]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/?p=207</guid>
		<description><![CDATA[I have been seeing &#8220;setting a property that has only a getter error&#8221; poping up in my firebug for a while, which I believed was a Firefox extension conflict with new version of firebug. A recent post to dojo-interest mailing list caught my eye: basically, a user can reproduce this problem by just loading dojo [...]]]></description>
				<content:encoded><![CDATA[<p>I have been seeing &#8220;setting a property that has only a getter error&#8221; poping up in my firebug for a while, which I believed was a Firefox extension conflict with new version of firebug.</p>
<p>A recent <a href="http://n3.nabble.com/Getting-error-setting-a-property-that-has-only-a-getter-when-loading-a-test-page-tp215458p217155.html" target="_blank">post</a> to dojo-interest mailing list caught my eye: basically, a user can reproduce this problem by just loading dojo from google CDN.</p>
<p>I decided to take a look at this and try to figure out why.</p>
<p>A firebug <a href="http://code.google.com/p/fbug/issues/detail?id=2263" target="_blank">bug report</a> is filed about this error: with FireFox&gt;3.5.2, modifying window.console (or attributes on console) would trigger this error. However, in the test case mentioned in the post, even if dojo is not loaded, the error still pops up in firebug, so it must be in some firefox extension, rather than dojo.</p>
<p>The only other extension I have in my development firefox profile is Selenium-IDE 1.0.4. Disabling it, and the error immediately goes away. Searching selenium-ide bug report, it <a href="http://code.google.com/p/selenium/issues/detail?id=363" target="_blank">turns out</a> it has just been fixed in <a href="http://release.seleniumhq.org/selenium-ide/1.0.5/selenium-ide-1.0.5.xpi" target="_blank">Selenium-IDE 1.0.5</a> (direct link to the xpi file).</p>
<p>In a summary, if you are getting &#8220;setting a property that has only a getter error&#8221; Error in FF 3.6 with any page, make sure you have at least Selenium-IDE 1.0.5. If you don&#8217;t use it, then you are probably messing around with window.console. (the error message would be much more helpful if it states what property is being accessed)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/207/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bug fixes and a new feature in DOH</title>
		<link>http://www.liucougar.net/blog/archives/186</link>
		<comments>http://www.liucougar.net/blog/archives/186#comments</comments>
		<pubDate>Mon, 16 Feb 2009 08:50:47 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[dojo]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/?p=186</guid>
		<description><![CDATA[Over the weekends, I spent some time on Dojo Objective Harness (DOH) to fix a reported bug: in some cases the global progress bar overshoots 100%. This is obvious in the dojo test suite, the progress bar goes beyond 900%. After some digging, it turns out the algorithm to calculate the global progress bar has [...]]]></description>
				<content:encoded><![CDATA[<p>Over the weekends, I spent some time on Dojo Objective Harness (DOH) to fix <a href="http://bugs.dojotoolkit.org/ticket/8378">a reported bug</a>: in some cases the global progress bar overshoots 100%. This is obvious in the <a href="http://archive.dojotoolkit.org/dojo-2009-02-15/dojotoolkit/dojo/tests/runTests.html">dojo test suite</a>, the progress bar goes beyond 900%.</p>
<p>After some digging, it turns out the algorithm to calculate the global progress bar has a flawed assumption: the number of tests in each group is known before the tests start. That&#8217;s not the case if nested test suites are used, such as the case in dojo._base.test.</p>
<p>The <a href="http://bugs.dojotoolkit.org/changeset/16684">fix</a> is quite simple as well: rather than trying to create a portion in the global progressbar for each test, we only create one for each group.</p>
<p>Another problem noted in the <a href="http://bugs.dojotoolkit.org/ticket/8378">original bug report</a> is overflow of test group progressbar. I never noticed it before, but keeping a close eye on each group progressbar when running dojo test suite does reveal it. By removing tests in the dojo test suite, I isolated the problem to dojo.date and dojo.date. The problem is the test group progress bar is not updated at all due to the fact that they don&#8217;t have a html page (instead both dojo.date and dojo.data test cases only use javascript files). The <a href="http://bugs.dojotoolkit.org/changeset/16690">fix</a> for this turns out to be quite straghtforward as well as soon as I know what causes it.</p>
<p>After the bug fixes, I feel like to add a new feature to DOH, <a href="http://bugs.dojotoolkit.org/ticket/8653">clickable test cases</a> which will hilight the relevant log line after the test finishes. Searching a failture/error in the log pane is a real pain especially if you have lots of tests generating huge number of messages. The log line will be hilighted according to whether the test failed or succeeded. (Note: the hilighting requires dojo, so if DOH is used without dojo, you won&#8217;t be able to see the hilighting animation.)</p>
<p>Similarly, when clicking on the global progressbar, the test group associated with that portion of the bar will be scrolled into view (for any failed test group, a tooltip is also attached to the global progressbar portion to indicate which test group it is). This is useful when locating a failed test group.</p>
<p>In addition, a tfoot is added to the test list table after all tests finish, which contains a summary of the test run. Check out the <a href="http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/tests/runTests.html">online demo in our nightly</a>. This will be part of dojo 1.3 release.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/186/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switch user interface language in google maps</title>
		<link>http://www.liucougar.net/blog/archives/179</link>
		<comments>http://www.liucougar.net/blog/archives/179#comments</comments>
		<pubDate>Fri, 06 Feb 2009 08:58:21 +0000</pubDate>
		<dc:creator>liucougar</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.liucougar.net/blog/?p=179</guid>
		<description><![CDATA[Apparently, google maps has different features/capacities based on different user interface languages. My parents just complained to me that they can&#8217;t find &#8220;place of interests&#8221; in their google maps any more. After obtaining more information from them, it appears that they are actually using Chinese version of google maps, while when they were using the [...]]]></description>
				<content:encoded><![CDATA[<p>Apparently, google maps has different features/capacities based on different user interface languages. My parents just complained to me that they can&#8217;t find &#8220;place of interests&#8221; in their google maps any more. After obtaining more information from them, it appears that they are actually using Chinese version of google maps, while when they were using the English version, &#8220;place of interests&#8221; was indeed visible as an option.</p>
<p>So the problem is how to change the UI language. The website URL for the Chinese version of google maps is the same as the English version, both of which is maps.google.com, so must be another way of doing it. Searching the UI, I can&#8217;t find a control to change language anywhere. However, I did notice on one page when clicking around, where I have this in my address bar.</p>
<p><a href="http://maps.google.com/maps/mm?hl=en">http://maps.google.com/maps/mm?hl=en</a></p>
<p>by chaning it to:</p>
<p><a href="http://maps.google.com/maps/mm?hl=zh-CN">http://maps.google.com/maps/mm?hl=zh-CN</a></p>
<p>As expected, I get Simplified Chinese version of google maps. So to switch UI language in gmap is to append &#8220;?hl=LANG_CODE&#8221; to the URL, such as:</p>
<p><a href="http://maps.google.com/?hl=en">http://maps.google.com/?hl=en</a></p>
<p>Will load the gmap front page in English. Some LANG_CODE I tried which are recognized by gmap is: de, en, fr, ko, ja, ru, zh-CN and zh-TW. (See <a href="http://www.i18nguy.com/unicode/language-identifiers.html">language identifier</a> for a complete list)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liucougar.net/blog/archives/179/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.278 seconds -->
<!-- Cached page served by WP-Cache -->
