<?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>Here comes the Sun &#187; javascript</title>
	<atom:link href="http://sunng.info/blog/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://sunng.info/blog</link>
	<description>Homemade Clojure Geek</description>
	<lastBuildDate>Fri, 11 May 2012 02:24:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>为WebWorker设置正确的路径</title>
		<link>http://sunng.info/blog/2012/03/%e4%b8%bawebworker%e8%ae%be%e7%bd%ae%e6%ad%a3%e7%a1%ae%e7%9a%84%e8%b7%af%e5%be%84/</link>
		<comments>http://sunng.info/blog/2012/03/%e4%b8%bawebworker%e8%ae%be%e7%bd%ae%e6%ad%a3%e7%a1%ae%e7%9a%84%e8%b7%af%e5%be%84/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 09:32:32 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[把戏]]></category>
		<category><![CDATA[heatcanvas]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/?p=1208</guid>
		<description><![CDATA[WebWorker的路径通常是写在代码源文件中，而且这个路径并非其相对父js文件的相对路径，而似乎是相对页面的路径。所以指定一个正确的可随处部署的路径变得有些麻烦。昨天有人给HeatCanvas提了这个问题我才想到上网搜索了一下，有一个还算挺不错的办法。 写一个getPath函数，从document里找到父js的路径，拼到Worker的名字上。对heatcanvas.js这个文件来说就是： HeatCanvas.getPath = function&#40;&#41; &#123; &#160; &#160; var scriptTags = document.getElementsByTagName&#40;&#34;script&#34;&#41;; &#160; &#160; for &#40;var i=0; i&#60;scriptTags.length; i++&#41; &#123; &#160; &#160; &#160; &#160; var src = scriptTags&#91;i&#93;.src; &#160; &#160; &#160; &#160; var pos = src.indexOf&#40;&#34;heatcanvas.js&#34;&#41;; &#160; &#160; &#160; &#160; &#8230; <a href="http://sunng.info/blog/2012/03/%e4%b8%bawebworker%e8%ae%be%e7%bd%ae%e6%ad%a3%e7%a1%ae%e7%9a%84%e8%b7%af%e5%be%84/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>WebWorker的路径通常是写在代码源文件中，而且这个路径并非其相对父js文件的相对路径，而似乎是相对页面的路径。所以指定一个正确的可随处部署的路径变得有些麻烦。昨天有人给HeatCanvas提了这个问题我才想到上网搜索了一下，有一个还算挺不错的办法。</p>
<p>写一个getPath函数，从document里找到父js的路径，拼到Worker的名字上。对heatcanvas.js这个文件来说就是：</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">HeatCanvas.<span style="color: #660066;">getPath</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> scriptTags <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;script&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>scriptTags.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> src <span style="color: #339933;">=</span> scriptTags<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">src</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> pos <span style="color: #339933;">=</span> src.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;heatcanvas.js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>pos <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> src.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> pos<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></div></div>
<p>因此现在HeatCanvas已经解决了这个路径问题，现在这个库应该更好用了。当然如果你改了我的文件名我就无话可说了。</p>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2012/03/%e4%b8%bawebworker%e8%ae%be%e7%bd%ae%e6%ad%a3%e7%a1%ae%e7%9a%84%e8%b7%af%e5%be%84/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HeatCanvas performance enhanced</title>
		<link>http://sunng.info/blog/2012/02/heatcanvas-performance-enhanced/</link>
		<comments>http://sunng.info/blog/2012/02/heatcanvas-performance-enhanced/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 14:11:29 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[ANN]]></category>
		<category><![CDATA[heatcanvas]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/?p=1169</guid>
		<description><![CDATA[时隔半年日日沉浸在clojure世界里的时候，多亏了github上Daniel Azuma的提示，现在HeatCanvas通过Image Data数组来绘制图像。过去由于不太熟悉Canvas API，我用的是fillRect来填充1像素大小的区域，模拟像素的渲染。但是这种方式导致浏览器渲染的效率非常低。 ImageDataArray允许用户开辟一个固定大小的buffer，并设置每一像素的像素值，然后一次性地渲染到canvas上。详情可以参考这里：Pixel manipulation with canvas 这次性能的提升基本没有影响API，唯一的区别是如果原先自定义了value-color的映射函数的话，现在不再接受hsl的css字符串了，新的API需要你返回一个四个元素的数组，分别代表h, s, l, a，值域[0-1]。 感谢关注HeatCanvas的朋友。]]></description>
			<content:encoded><![CDATA[<p><img src="http://i.imgur.com/6vkpo.png" alt="heatcanvas" /></p>
<p>时隔半年日日沉浸在clojure世界里的时候，多亏了github上<a href="https://github.com/dazuma">Daniel Azuma</a>的提示，现在HeatCanvas通过Image Data数组来绘制图像。过去由于不太熟悉Canvas API，我用的是fillRect来填充1像素大小的区域，模拟像素的渲染。但是这种方式导致浏览器渲染的效率非常低。</p>
<p>ImageDataArray允许用户开辟一个固定大小的buffer，并设置每一像素的像素值，然后一次性地渲染到canvas上。详情可以参考这里：<a href="https://developer.mozilla.org/En/HTML/Canvas/Pixel_manipulation_with_canvas" target="_blank">Pixel manipulation with canvas</a></p>
<p>这次性能的提升基本没有影响API，唯一的区别是如果原先自定义了value-color的映射函数的话，现在不再接受hsl的css字符串了，新的API需要你返回一个四个元素的数组，分别代表h, s, l, a，值域[0-1]。</p>
<p>感谢关注HeatCanvas的朋友。</p>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2012/02/heatcanvas-performance-enhanced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Roar for mootools 1.4</title>
		<link>http://sunng.info/blog/2011/12/roar-for-mootools-1-4/</link>
		<comments>http://sunng.info/blog/2011/12/roar-for-mootools-1-4/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 15:16:31 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[装备]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/?p=1123</guid>
		<description><![CDATA[早在天下大势还处在分久必合的时候，那时候mootools还有不少简单实用的小库，比如我今天搜索&#8221;mootools notification&#8221;就找到这个08年的库叫做Roar。不过遗憾的是从那以后，这个库就再也没有更新过了。 Mootools本身也沉寂了很久，这个项目恐怕也要思考自己未来的发展方向了。今年9月Mootools迈进了1.4，API上有一些变化。现在的下载页也能看到with/without backward compatibility的版本分开下载。为了用上Roar，我尝试了这两个版本发现都不能使用。最后downgrade到1.2可以确定Roar本身在当时是没有什么问题。 这么多年对mootools痴心不改，所以顺手维护了一下Roar，现在可以在1.4 without compatibility的发布下运行了。主要是几个小修改，大多是一些多年deprecated函数被正式删除： Type常量，原先的String.type，Object.type现在统一到一个Type对象下，变成Type.isString和Type.isObject $empty 常量被删除了，现在直接用function()或Function.from()代替 $pick 方法被Array.pick取代，参数现在也必须接受数组类型了 $merge 方法被Object.merge取代 $type 被typeOf取代 函数对象的create方法被删除了，现在可以用函数对象的bind方法替代 Browser.Engine 被删除了，需要用其他Browser的API替代 修改后的Roar，放在这个gist里，测试过可以在firefox和chromium上健康使用。IE没有做测试。这个08年的库，眼看四年过去了，用起来依然不错。 作为mootools的铁杆，我还是会一直专一地坚守下去的。（于是，我也已经变成了多年前那些我眼中为旧事物顽抗到底的老家伙了）]]></description>
			<content:encoded><![CDATA[<p>早在天下大势还处在分久必合的时候，那时候mootools还有不少简单实用的小库，比如我今天搜索&#8221;mootools notification&#8221;就找到这个08年的库叫做<a href="http://digitarald.de/project/roar/" target="_blank">Roar</a>。不过遗憾的是从那以后，这个库就再也没有更新过了。</p>
<p>Mootools本身也沉寂了很久，这个项目恐怕也要思考自己未来的发展方向了。今年9月Mootools迈进了1.4，API上有一些变化。现在的下载页也能看到with/without backward compatibility的版本分开下载。为了用上Roar，我尝试了这两个版本发现都不能使用。最后downgrade到1.2可以确定Roar本身在当时是没有什么问题。</p>
<p>这么多年对mootools痴心不改，所以顺手维护了一下Roar，现在可以在1.4 without compatibility的发布下运行了。主要是几个小修改，大多是一些多年deprecated函数被正式删除：</p>
<ul>
<li>Type常量，原先的String.type，Object.type现在统一到一个Type对象下，变成Type.isString和Type.isObject</li>
<li>$empty 常量被删除了，现在直接用function()或Function.from()代替</li>
<li>$pick 方法被Array.pick取代，参数现在也必须接受数组类型了</li>
<li>$merge 方法被Object.merge取代</li>
<li>$type 被typeOf取代</li>
<li>函数对象的create方法被删除了，现在可以用函数对象的bind方法替代</li>
<li>Browser.Engine 被删除了，需要用其他Browser的API替代</li>
</ul>
<p>修改后的Roar，放在<a href="https://gist.github.com/1516568" target="_blank">这个gist</a>里，测试过可以在firefox和chromium上健康使用。IE没有做测试。这个08年的库，眼看四年过去了，用起来依然不错。</p>
<p>作为mootools的铁杆，我还是会一直专一地坚守下去的。（于是，我也已经变成了多年前那些我眼中为旧事物顽抗到底的老家伙了）</p>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2011/12/roar-for-mootools-1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Google closure library with ClojureScript</title>
		<link>http://sunng.info/blog/2011/08/using-google-closure-library-with-clojurescript/</link>
		<comments>http://sunng.info/blog/2011/08/using-google-closure-library-with-clojurescript/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 12:04:02 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[手艺]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[clojurescript]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/?p=956</guid>
		<description><![CDATA[Google closure library is shipped with ClojureScript, and could be compiled with ClojureScript into a minimized javascript file. So closure library is doubtlessly the first candidate when you are considering to use an external Javascript library in your cljs browser &#8230; <a href="http://sunng.info/blog/2011/08/using-google-closure-library-with-clojurescript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Google closure library is shipped with ClojureScript, and could be compiled with ClojureScript into a minimized javascript file. So closure library is doubtlessly the first candidate when you are considering to use an external Javascript library in your cljs browser application.</p>
<p>However, different from clojure&#8217;s interoperability with Java, ClojureScript has its own characteristics when you are interoperating with JavaScript and JavaScript based libraries.</p>
<p><strong>Clojure types are not fully compatible with JavaScript types</strong><br />
In ClojureScript, you can never treat a Clojure map as a JavaScript object although they have similar characteristics. You have to do some conversion before passing a clojure map to javascript functions. Matthew Gilliard made <a href="https://gist.github.com/1098417#file_ajax.cljs" target="_blank">a sample</a> of such conversion.</p>
<p><strong>JavaScript package is not Clojure namespace</strong><br />
This could be a common mistake for ClojureScript newbie. Actually, JavaScript doesn&#8217;t have concept of &#8220;Package&#8221; or &#8220;Namespace&#8221;. Many JavaScript libraries(dojo, Google Closure) made enhancement on this. ClojureScript also takes advantage of this mechanism. So before you start to coding with closure, you may browse <a href="http://closure-library.googlecode.com/svn/docs/index.html" target="_blank">closure library API document</a>, and find a module called <em>goog.net</em> which includes lots of types. Then you write this:</p>
<div class="codecolorer-container clojure twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="clojure codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">ns</span> myjs<br />
&nbsp; <span style="color: #66cc66;">&#40;</span>:<span style="color: #555;">require</span> <span style="color: #66cc66;">&#91;</span>goog<span style="color: #66cc66;">.</span>net :<span style="color: #555;">as</span> gnet<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></div></div>
<p>But compiler shows you &#8220;ERROR: JSC_MISSING_PROVIDE_ERROR. required &#8220;goog.net&#8221; namespace never<br />
provided at &#8230; &#8220;. This is not a PATH issue. The root cause is that closure module has a lower granularity than Clojure ones. Types are often contained in their own modules. You can find closure source code in <em>clojurescript/closure/library/closure</em>. Modules are declare with <em>goog.provide</em> function. Thus, you should require this name instead of the logical module name.</p>
<div class="codecolorer-container clojure twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="clojure codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">ns</span> myjs<br />
&nbsp; <span style="color: #66cc66;">&#40;</span>:<span style="color: #555;">require</span> <span style="color: #66cc66;">&#91;</span>goog<span style="color: #66cc66;">.</span>net<span style="color: #66cc66;">.</span>XhrIo :<span style="color: #555;">as</span> gxhr<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></div></div>
<p>In addition, ClojureScript does not support &#8216;use&#8217;.</p>
<p><strong>Just use full name for JavaScript class</strong><br />
For functions contains in some module, you can refer it with the clojure way:</p>
<div class="codecolorer-container clojure twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="clojure codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">ns</span> myjs<br />
&nbsp; <span style="color: #66cc66;">&#40;</span>:<span style="color: #555;">require</span> <span style="color: #66cc66;">&#91;</span>goog<span style="color: #66cc66;">.</span>dom :<span style="color: #555;">as</span> dom<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#40;</span>dom<span style="color: #66cc66;">/</span>$ <span style="color: #ff0000;">&quot;element-id&quot;</span><span style="color: #66cc66;">&#41;</span></div></div>
<p>But for classes, just use the full name and ignore the module alias.</p>
<div class="codecolorer-container clojure twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="clojure codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">ns</span> myjs<br />
&nbsp; <span style="color: #66cc66;">&#40;</span>:<span style="color: #555;">require</span> <span style="color: #66cc66;">&#91;</span>goog<span style="color: #66cc66;">.</span>net<span style="color: #66cc66;">.</span>XhrIo :<span style="color: #555;">as</span> gxhr<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">def</span> xhr <span style="color: #66cc66;">&#40;</span>goog<span style="color: #66cc66;">.</span>net<span style="color: #66cc66;">.</span>XhrIo<span style="color: #66cc66;">.</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></div></div>
<p>These are basic tips before you start using Closure with ClojureScript. Leveraging on Google&#8217;s closure library, you can create cross-browser JavaScript application with Clojure easily.</p>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2011/08/using-google-closure-library-with-clojurescript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HeatCanvas support for Leaflet</title>
		<link>http://sunng.info/blog/2011/07/heatcanvas-support-for-leaflet/</link>
		<comments>http://sunng.info/blog/2011/07/heatcanvas-support-for-leaflet/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 12:50:03 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[ANN]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[heatcanvas]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[map]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/?p=916</guid>
		<description><![CDATA[Leaflet is a light weight web mapping library developed by Cloudmade. Leaflet is designed for compatibility with both desktop browser and mobile browser. HeatCanvas-Leaflet extension enables heat map on Leaflet. You can create heat map layer and add it to &#8230; <a href="http://sunng.info/blog/2011/07/heatcanvas-support-for-leaflet/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://leaflet.cloudmade.com/" title="leaflet" target="_blank">Leaflet</a> is a light weight web mapping library developed by <a href="http://cloudmade.com/" title="cloudmade" target="_blank">Cloudmade</a>. Leaflet is designed for compatibility with both desktop browser and mobile browser.</p>
<p>HeatCanvas-Leaflet extension enables heat map on Leaflet. You can create heat map layer and add it to Leatlet map:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> heatmap <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> L.<span style="color: #660066;">TileLayer</span>.<span style="color: #660066;">HeatCanvas</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Heat Canvas&quot;</span><span style="color: #339933;">,</span> map<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'step'</span><span style="color: #339933;">:</span><span style="color: #CC0000;">0.3</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'degree'</span><span style="color: #339933;">:</span>HeatCanvas.<span style="color: #660066;">QUAD</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'opacity'</span><span style="color: #339933;">:</span><span style="color: #CC0000;">0.7</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
heatmap.<span style="color: #660066;">pushData</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">32.1104</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">118.0852</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">14</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #006600; font-style: italic;">//push more data ...</span><br />
map.<span style="color: #660066;">addLayer</span><span style="color: #009900;">&#40;</span>heatmap<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>You can find live demo on:<br />
<a href="http://sunng87.github.com/heatcanvas/leaflet.html" title="heatcanvas demo" target="_blank">http://sunng87.github.com/heatcanvas/leaflet.html</a><br />
Mobile browser is also supported. (Tested on Firefox Android and default Android browser)</p>
<p>Find more about HeatCanvas on <a href="https://github.com/sunng87/heatcanvas">github page</a>.</p>
<p>Leaflet is still buggy for extension. There is a latlng-pixel coordinate conversion <a href="https://github.com/CloudMade/Leaflet/issues/190" target="_blank">issue</a> in low zoom level, affects this demo. Hope it could be fixed soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2011/07/heatcanvas-support-for-leaflet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ngeohash: node module for geohash algorithm</title>
		<link>http://sunng.info/blog/2011/06/ngeohash-node-module-for-geohash-algorithm/</link>
		<comments>http://sunng.info/blog/2011/06/ngeohash-node-module-for-geohash-algorithm/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 12:34:26 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[ANN]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[nodejs]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/2011/06/ngeohash-node-module-for-geohash-algorithm/</guid>
		<description><![CDATA[ngeohash是一个geohash的javascript实现，之所以叫做ngeohash是因为到了Publish的时候才发现已经有geohash这个module了。这么令人沮丧的事就不多说了。 安装 npm install ngeohash 使用 var geohash = require(&#8216;ngeohash&#8217;); sys.puts(geohash.encode(32.1717, 118.2342)); 详细 访问github的相关页面：https://github.com/sunng87/node-geohash]]></description>
			<content:encoded><![CDATA[<p>ngeohash是一个geohash的javascript实现，之所以叫做ngeohash是因为到了Publish的时候才发现已经有geohash这个module了。这么令人沮丧的事就不多说了。</p>
<p>安装<br />
<font face="monospace">npm install ngeohash<br />
</font></p>
<p>使用<br />
var geohash = require(&#8216;ngeohash&#8217;);<br />
sys.puts(geohash.encode(32.1717, 118.2342));</p>
<p>详细<br />
访问github的相关页面：<a href="https://github.com/sunng87/node-geohash">https://github.com/sunng87/node-geohash<br />
</a></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=62cf2f06-ce63-87a6-a76b-5899455660e7" /></div>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2011/06/ngeohash-node-module-for-geohash-algorithm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update on HeatCanvas and gefr</title>
		<link>http://sunng.info/blog/2011/06/update-on-heatcanvas-and-gefr/</link>
		<comments>http://sunng.info/blog/2011/06/update-on-heatcanvas-and-gefr/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 03:06:35 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[ANN]]></category>
		<category><![CDATA[gefr]]></category>
		<category><![CDATA[heatcanvas]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jython]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/?p=895</guid>
		<description><![CDATA[HeatCanvas的百度地图扩展 感谢@lbt05姐的无私贡献，现在HeatCanvas又增加了百度地图API支持。你可以在你的百度地图中使用heat map了。详情可以参考@lbt05姐撰写的文档，而这里是一个简单的live demo。此外，@lbt05姐还贡献了GoogleMap扩展的patch，帮助我解决了地图拖动后Canvas无法覆盖viewport的bug。再次感谢@lbt05姐。 百度地图支持已经汇入主干，可以在github找到它。 Gefr新增 Jetty WSGI Bridge 昨天为gefr新增了Jetty服务器的支持，这样你可以将自己的Python WSGI程序运行在成熟的Jetty服务器上。性能是大家关心的因素，下面是在我的本机（32位CentOS，双核2.8GHz，4G内存）上一个粗略的测试结果： 100并发，20000请求： Server Software: gefr-jetty/0.3dev Server Hostname: localhost Server Port: 8088 Document Path: / Document Length: 19 bytes Concurrency Level: 100 Time taken for tests: 3.120827 seconds Complete requests: 20000 &#8230; <a href="http://sunng.info/blog/2011/06/update-on-heatcanvas-and-gefr/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>HeatCanvas的百度地图扩展</h3>
<p>感谢@lbt05姐的无私贡献，现在HeatCanvas又增加了百度地图API支持。你可以在你的百度地图中使用heat map了。详情可以参考<a href="http://nihuajie.com/blog/?p=469">@lbt05姐撰写的文档</a>，而<a href="http://sunng87.github.com/heatcanvas/baidumap.html">这里</a>是一个简单的live demo。此外，@lbt05姐还贡献了GoogleMap扩展的patch，帮助我解决了地图拖动后Canvas无法覆盖viewport的bug。再次感谢<a href="http://twitter.com/lbt05">@lbt05</a>姐。</p>
<p>百度地图支持已经汇入主干，可以在<a href="https://github.com/sunng87/heatcanvas">github</a>找到它。</p>
<h3>Gefr新增 Jetty WSGI Bridge</h3>
<p>昨天为<a href="https://bitbucket.org/sunng/gefr">gefr</a>新增了Jetty服务器的支持，这样你可以将自己的Python WSGI程序运行在成熟的Jetty服务器上。性能是大家关心的因素，下面是在我的本机（32位CentOS，双核2.8GHz，4G内存）上一个粗略的测试结果：</p>
<p>100并发，20000请求：</p>
<blockquote><p>
Server Software:        gefr-jetty/0.3dev<br />
Server Hostname:        localhost<br />
Server Port:            8088</p>
<p>Document Path:          /<br />
Document Length:        19 bytes</p>
<p>Concurrency Level:      100<br />
Time taken for tests:   3.120827 seconds<br />
Complete requests:      20000<br />
Failed requests:        0<br />
Write errors:           0<br />
Total transferred:      2584515 bytes<br />
HTML transferred:       380665 bytes<br />
Requests per second:    6408.56 [#/sec] (mean)<br />
Time per request:       15.604 [ms] (mean)<br />
Time per request:       0.156 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          808.44 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
              min  mean[+/-sd] median   max<br />
Connect:        0    4 114.1      0    3000<br />
Processing:     0    7  18.5      5    1776<br />
Waiting:        0    6  18.5      4    1776<br />
Total:          0   12 115.8      6    3015</p>
<p>Percentage of the requests served within a certain time (ms)<br />
  50%      6<br />
  66%      7<br />
  75%      8<br />
  80%      8<br />
  90%     10<br />
  95%     13<br />
  98%     70<br />
  99%     74<br />
 100%   3015 (longest request)
</p></blockquote>
<p>如果打开KeepAlive，吞吐量可以达到10000以上：</p>
<blockquote><p>
Server Software:        gefr-jetty/0.3dev<br />
Server Hostname:        localhost<br />
Server Port:            8088</p>
<p>Document Path:          /<br />
Document Length:        19 bytes</p>
<p>Concurrency Level:      100<br />
Time taken for tests:   1.749189 seconds<br />
Complete requests:      20000<br />
Failed requests:        0<br />
Write errors:           0<br />
Keep-Alive requests:    20000<br />
Total transferred:      3062142 bytes<br />
HTML transferred:       380266 bytes<br />
Requests per second:    11433.87 [#/sec] (mean)<br />
Time per request:       8.746 [ms] (mean)<br />
Time per request:       0.087 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          1709.36 [Kbytes/sec] received</p>
<p>Connection Times (ms)<br />
              min  mean[+/-sd] median   max<br />
Connect:        0    0   0.8      0      23<br />
Processing:     0    8   8.0      6      85<br />
Waiting:        0    8   8.0      6      85<br />
Total:          0    8   8.1      6      85</p>
<p>Percentage of the requests served within a certain time (ms)<br />
  50%      6<br />
  66%      7<br />
  75%      8<br />
  80%      9<br />
  90%     11<br />
  95%     20<br />
  98%     41<br />
  99%     43<br />
 100%     85 (longest request)
</p></blockquote>
<p>你可以根据<a href="http://gefr.rtfd.org/">gefr的文档</a>安装它。</p>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2011/06/update-on-heatcanvas-and-gefr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenLayers extension for HeatCanvas</title>
		<link>http://sunng.info/blog/2011/06/openlayers-extension-for-heatcanvas/</link>
		<comments>http://sunng.info/blog/2011/06/openlayers-extension-for-heatcanvas/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 05:56:24 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[ANN]]></category>
		<category><![CDATA[heatcanvas]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[OpenStreetMap]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/2011/06/openlayers-extension-for-heatcanvas/</guid>
		<description><![CDATA[As the screenshot shows, now you can embed HeatCanavs in your OpenLayers application, as well as OpenSteetMap. Three steps to create such kind of map: 1. Create HeatCanvas layer: // constructor params: // name, OpenLayers map instance, OpenLayers layer options, &#8230; <a href="http://sunng.info/blog/2011/06/openlayers-extension-for-heatcanvas/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://i.imgur.com/rtEuI.png" alt="" title="Hosted by imgur.com" /></p>
<p>As the screenshot shows, now you can embed HeatCanavs in your OpenLayers application, as well as OpenSteetMap.</p>
<p>Three steps to create such kind of map:</p>
<p>1. Create HeatCanvas layer:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">// constructor params:</span><br />
<span style="color: #006600; font-style: italic;">// name, OpenLayers map instance, OpenLayers layer options, HeatCanvas options</span><br />
<span style="color: #003366; font-weight: bold;">var</span> heatmap <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> OpenLayers.<span style="color: #660066;">Layer</span>.<span style="color: #660066;">HeatCanvas</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;HeatCanvas&quot;</span><span style="color: #339933;">,</span> map<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'step'</span><span style="color: #339933;">:</span><span style="color: #CC0000;">0.3</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'degree'</span><span style="color: #339933;">:</span>HeatCanvas.<span style="color: #660066;">QUAD</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'opacity'</span><span style="color: #339933;">:</span><span style="color: #CC0000;">0.8</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>2. Feed some data on layer:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">heatmap.<span style="color: #660066;">pushData</span><span style="color: #009900;">&#40;</span>latitude<span style="color: #339933;">,</span> longitude<span style="color: #339933;">,</span> value<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>3. Add layer to map:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">map.<span style="color: #660066;">addLayer</span><span style="color: #009900;">&#40;</span>heatmap<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>The live demo is hosted on github:<br />
<a href="http://sunng87.github.com/heatcanvas/openstreetmap.html">http://sunng87.github.com/heatcanvas/openstreetmap.html</a></p>
<p><a href="https://github.com/sunng87/heatcanvas">HeatCanavs</a> is a heat map implementation on HTML5 canvas and WebWorker API.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=c938a108-0a36-8a66-b89a-693e8cf88e05" /></div>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2011/06/openlayers-extension-for-heatcanvas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HeatCanvas hits 1.0, and public available</title>
		<link>http://sunng.info/blog/2011/06/heatcanvas-hits-1-0-and-public-available/</link>
		<comments>http://sunng.info/blog/2011/06/heatcanvas-hits-1-0-and-public-available/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 13:55:08 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[ANN]]></category>
		<category><![CDATA[heatcanvas]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/2011/06/heatcanvas-hits-1-0-and-public-available/</guid>
		<description><![CDATA[As described in Wikipedia, a heat map is a graphical representation of data in a two-dimensional table. HeatCanvas enables heat map on HTML5 canvas. With HeatCanvas, you can visualize your data on modern web browser without server-side support. HeatCanvas is &#8230; <a href="http://sunng.info/blog/2011/06/heatcanvas-hits-1-0-and-public-available/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As described in Wikipedia, a heat map is a graphical representation of data in a two-dimensional table. HeatCanvas enables heat map on HTML5 canvas. With HeatCanvas, you can visualize your data on modern web browser without server-side support.</p>
<p>HeatCanvas is based on <a href="http://sunng.info/blog/2010/02/sunngs-canvas-based-heatmap-api/">the prototype</a> I wrote 15 months ago. I just rewrite the whole with WebWorker API to keep user away from UI frozen and annoying slow-script warning. HeatCanvas is implemented as pixel based, so the image quality is great.</p>
<p><img src="http://i.imgur.com/gNHOw.png" alt="" title="Hosted by imgur.com" /></p>
<p>The API is rather simple. There are only three steps to create a basic heat map.</p>
<p>1. Create the heat map object:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">var</span> heatmap <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> HeatCanvas<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'canvasId'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>2. Add some data to heat map:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">heatmap.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">223</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">98</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// x,y and value for this point</span></div></div>
<p>3. Render it:</p>
<div class="codecolorer-container javascript twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">heatmap.<span style="color: #660066;">render</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>In contrast to the base API, HeatCanvas also supports flexible options to customize the rendering. Even custom colour scheme is allowed. You can <a href="https://github.com/sunng87/heatcanvas/blob/master/README.md">refer to the doc</a> for detail.</p>
<p>And for your convenience, we have a GoogleMap plugin, <b>HeatCanvasOverlayView</b>, that wraps HeatCanvas. You can use it in your GoogleMap application.</p>
<p>For live demos, you can find at:<br />
<a href="http://sunng87.github.com/heatcanvas/">http://sunng87.github.com/heatcanvas/</a></p>
<p>As always, the project is hosted on github:<br />
<a href="https://github.com/sunng87/heatcanvas">https://github.com/sunng87/heatcanvas</a> .</p>
<p>The three javascript files are only necessary in your application, thus, please ignore the htmls in your deployment. Any feedback is welcomed and also please kindly let me know your application using this API.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=9343259e-039c-8fdf-8721-dbd6277de695" /></div>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2011/06/heatcanvas-hits-1-0-and-public-available/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>用coffeescript重写了首页</title>
		<link>http://sunng.info/blog/2011/05/%e7%94%a8coffeescript%e9%87%8d%e5%86%99%e4%ba%86%e9%a6%96%e9%a1%b5/</link>
		<comments>http://sunng.info/blog/2011/05/%e7%94%a8coffeescript%e9%87%8d%e5%86%99%e4%ba%86%e9%a6%96%e9%a1%b5/#comments</comments>
		<pubDate>Fri, 13 May 2011 14:48:20 +0000</pubDate>
		<dc:creator>sunng</dc:creator>
				<category><![CDATA[装备]]></category>
		<category><![CDATA[coffeescript]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://sunng.info/blog/2011/05/%e7%94%a8coffeescript%e9%87%8d%e5%86%99%e4%ba%86%e9%a6%96%e9%a1%b5/</guid>
		<description><![CDATA[下午有时间看了一下coffeescript，发现非常优雅。过去对JavaScript的工作，从dojo到jquery主要是在库的层面，这次coffeescript的出现是在语言层面对javascript做了一次加强。现在对语言的加强不再需要mozilla/microsoft/google/apple几家坐下来慢慢聊了，民间的力量就可以实现。 coffeescript的几个特点也属于博采众长： 类似python的，以缩进取代代码块 类似ruby/perl，方法调用括号可选 类似ruby，无须return 正常的类声明语法 在nodejs的环境里可以通过npm安装coffer-script，利用它的命令行程序，可以把coffeescript编译成javascript。不过最给力的是可以在网页里通过引入coffee-script.js来直接执行（其实也是编译一下）coffeescript。 于是我顺手重写了一下首页的js，改写成coffeescript。因为少打很多() {}，手可以控制在键盘中心的，敲字的效率大大提高。用空你也可以尝试一下。]]></description>
			<content:encoded><![CDATA[<p>下午有时间看了一下<a href="http://jashkenas.github.com/coffee-script/">coffeescript</a>，发现非常优雅。过去对JavaScript的工作，从dojo到jquery主要是在库的层面，这次coffeescript的出现是在语言层面对javascript做了一次加强。现在对语言的加强不再需要mozilla/microsoft/google/apple几家坐下来慢慢聊了，民间的力量就可以实现。</p>
<p>coffeescript的几个特点也属于博采众长：</p>
<ul>
<li>类似python的，以缩进取代代码块</li>
<li>类似ruby/perl，方法调用括号可选</li>
<li>类似ruby，无须return</li>
<li>正常的类声明语法</li>
</ul>
<p>在nodejs的环境里可以通过npm安装coffer-script，利用它的命令行程序，可以把coffeescript编译成javascript。不过最给力的是可以在网页里通过<a href="http://jashkenas.github.com/coffee-script/#scripts">引入coffee-script.js</a>来直接执行（其实也是编译一下）coffeescript。</p>
<p>于是我顺手重写了一下首页的js，改写成coffeescript。因为少打很多() {}，手可以控制在键盘中心的，敲字的效率大大提高。用空你也可以尝试一下。</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=c7456ff3-1bf5-8c54-b037-86800bd4f910" /></div>
]]></content:encoded>
			<wfw:commentRss>http://sunng.info/blog/2011/05/%e7%94%a8coffeescript%e9%87%8d%e5%86%99%e4%ba%86%e9%a6%96%e9%a1%b5/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

