<?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>AquarLife &#187; Force Research</title>
	<atom:link href="http://www.aquarhead.com/category/forceresearch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aquarhead.com</link>
	<description>天空中的羽翼距离你还有多远 在你隐藏的感情之中寻找我的踪迹</description>
	<lastBuildDate>Wed, 01 Feb 2012 17:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/><cloud domain='www.aquarhead.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Sequel Pro连接Vagrant中的MySQL</title>
		<link>http://www.aquarhead.com/2011/12/sequel-pro-connect-mysql-in-vagrant/</link>
		<comments>http://www.aquarhead.com/2011/12/sequel-pro-connect-mysql-in-vagrant/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 10:24:20 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Sequel Pro]]></category>
		<category><![CDATA[Vagrant]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=1103</guid>
		<description><![CDATA[Sequel Pro还真是傲娇, 用Vagrant的端口映射不好使, 研究了一番之后用SSH连接成功. 暂记一下, 然后有时间整理整理再写一篇(一系列?)关于Vagrant, Puppet以及其他一些Python/Django的工具的笔记. 参考资料 首先在Vagrantfile中配置安装了MySQL的虚拟机的IP,例如: config.vm.network&#40;&#34;33.33.33.10&#34;&#41; 重启虚拟机之后在/home/vagrant/.ssh/authorized_keys后面加上自己的公钥~/.ssh/id_rsa.pub 最后在Sequel Pro连接时选择SSH方式 MySQL的Host填127.0.0.1, 其他参数正常填, SSH Host填上面的IP, SSH User填vagrant, SSH Port填22, 密码空着, 连接的时候问密码的话直接OK就行. Tags:MySQL,Sequel Pro,Vagrant]]></description>
			<content:encoded><![CDATA[<p>Sequel Pro还真是傲娇, 用Vagrant的端口映射不好使, 研究了一番之后用SSH连接成功.<br />
暂记一下, 然后有时间整理整理再写一篇(一系列?)关于Vagrant, Puppet以及其他一些Python/Django的工具的笔记.<br />
<a href="http://stevelosh.com/blog/2011/06/django-advice/" title="Django Advice">参考资料</a></p>
<p>首先在Vagrantfile中配置安装了MySQL的虚拟机的IP,例如:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">  config.<span style="color:#9900CC;">vm</span>.<span style="color:#9900CC;">network</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;33.33.33.10&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>重启虚拟机之后在/home/vagrant/.ssh/authorized_keys后面加上自己的公钥~/.ssh/id_rsa.pub<br />
最后在Sequel Pro连接时选择SSH方式<br />
MySQL的Host填127.0.0.1, 其他参数正常填, SSH Host填上面的IP, SSH User填vagrant, SSH Port填22, 密码空着,<br />
连接的时候问密码的话直接OK就行.</p>

	Tags:<a href="http://www.aquarhead.com/tag/mysql/" title="MySQL" rel="tag">MySQL</a>,<a href="http://www.aquarhead.com/tag/sequel-pro/" title="Sequel Pro" rel="tag">Sequel Pro</a>,<a href="http://www.aquarhead.com/tag/vagrant/" title="Vagrant" rel="tag">Vagrant</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2011/12/sequel-pro-connect-mysql-in-vagrant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shared Wiki构想</title>
		<link>http://www.aquarhead.com/2010/11/an-idea-of-shared-wiki/</link>
		<comments>http://www.aquarhead.com/2010/11/an-idea-of-shared-wiki/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 13:57:14 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[Shared Wiki]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=947</guid>
		<description><![CDATA[最近突然发现dokuwiki跟各种版本控制工具结合起来很有前途啊.前几天阿攀说准备弄一个团队博客,我就建议说不如弄个团队wiki.后来想了一下如果用git或者svn啊什么的搭配上纯文本目录结构的dokuwiki真的挺不错的.这样不但方便大家写wiki,而且不会有同时编辑等等的问题,而且每个人都可以在本地有一个wiki. 刚才晚上上逆向工程的时候突然想到还可以做shared wiki,具体来说就是为所有数据在git上开一个repo.然后几个朋友就可以一起push和pull那个repo了,这样每个人的机器上都会有别人share的资料什么的. 感觉靠谱的话就留个言哦,一起交流交流. 等我明天到公司了就弄一个git repo再在OS X里面弄一个本地的dokuwiki然后整理整理. Tags:Shared Wiki]]></description>
			<content:encoded><![CDATA[<p>最近突然发现dokuwiki跟各种版本控制工具结合起来很有前途啊.前几天阿攀说准备弄一个团队博客,我就建议说不如弄个团队wiki.后来想了一下如果用git或者svn啊什么的搭配上纯文本目录结构的dokuwiki真的挺不错的.这样不但方便大家写wiki,而且不会有同时编辑等等的问题,而且每个人都可以在本地有一个wiki.</p>
<p>刚才晚上上逆向工程的时候突然想到还可以做shared wiki,具体来说就是为所有数据在git上开一个repo.然后几个朋友就可以一起push和pull那个repo了,这样每个人的机器上都会有别人share的资料什么的.</p>
<p>感觉靠谱的话就留个言哦,一起交流交流.</p>
<p>等我明天到公司了就弄一个git repo再在OS X里面弄一个本地的dokuwiki然后整理整理.</p>

	Tags:<a href="http://www.aquarhead.com/tag/shared-wiki/" title="Shared Wiki" rel="tag">Shared Wiki</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2010/11/an-idea-of-shared-wiki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Goopy</title>
		<link>http://www.aquarhead.com/2010/09/goopy/</link>
		<comments>http://www.aquarhead.com/2010/09/goopy/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 02:33:35 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Pinyin]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=914</guid>
		<description><![CDATA[试用Mac上的Google Pinyin还果然只是个beta啊~ Tags:Google,Mac OS X,Pinyin]]></description>
			<content:encoded><![CDATA[<p>试用Mac上的Google Pinyin还果然只是个beta啊~</p>

	Tags:<a href="http://www.aquarhead.com/tag/google/" title="Google" rel="tag">Google</a>,<a href="http://www.aquarhead.com/tag/mac-os-x/" title="Mac OS X" rel="tag">Mac OS X</a>,<a href="http://www.aquarhead.com/tag/pinyin/" title="Pinyin" rel="tag">Pinyin</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2010/09/goopy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>浙大半月笔记整理</title>
		<link>http://www.aquarhead.com/2010/05/15-days-notes-in-zju/</link>
		<comments>http://www.aquarhead.com/2010/05/15-days-notes-in-zju/#comments</comments>
		<pubDate>Wed, 19 May 2010 16:56:52 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[Randy Paush]]></category>
		<category><![CDATA[合成生物学]]></category>
		<category><![CDATA[浙大]]></category>
		<category><![CDATA[生命科学导论]]></category>
		<category><![CDATA[笔记]]></category>
		<category><![CDATA[西方文学经典]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=891</guid>
		<description><![CDATA[生命科学导论: 生命 = {u'生物学角度': [u'存在形式', u'蛋白质 核酸 多分子体系'], u'物理学角度': [u'过程', u'负熵增加 趋近于零'], u'生物物理学角度': [u'现象', u'物质能量信息的变化协调和统一']} 生命的特征 += [u'化学成分的同一性', u'新陈代谢', u'应激性和运动', u'生长发育', u'繁殖与遗传', u'适应环境', u'具有个体发育与系统激怒啊的历史'] IT是组装产业,对人外在生存的影响,导致人种退化 BT涉及的领域是对人类自身的进化,使人活得更好 西方文学经典: 宙斯注定要我们从年轻到年老都要在艰苦的战争中度过,直到一个个都倒下. 心里有过的一点点微薄的希望也随着一场阴差阳错的单打独斗而丧失. 合成生物学(Synthetic Biology): 生物学的工程化 合成生物学定义: The design and construction of new biological parts, devices, and systems; The re-design of existing natural biological systems for useful purposes. Genetic [...]]]></description>
			<content:encoded><![CDATA[<p>生命科学导论:</p>
<p>生命 = {u'生物学角度': [u'存在形式', u'蛋白质 核酸 多分子体系'], u'物理学角度': [u'过程', u'负熵增加 趋近于零'], u'生物物理学角度': [u'现象', u'物质能量信息的变化协调和统一']}</p>
<p>生命的特征 += [u'化学成分的同一性', u'新陈代谢', u'应激性和运动', u'生长发育', u'繁殖与遗传', u'适应环境', u'具有个体发育与系统激怒啊的历史']</p>
<p>IT是组装产业,对人外在生存的影响,导致人种退化<br />
BT涉及的领域是对人类自身的进化,使人活得更好</p>
<p>西方文学经典:</p>
<p>宙斯注定要我们从年轻到年老都要在艰苦的战争中度过,直到一个个都倒下.</p>
<p>心里有过的一点点微薄的希望也随着一场阴差阳错的单打独斗而丧失.</p>
<p>合成生物学(Synthetic Biology):</p>
<p>生物学的工程化</p>
<p>合成生物学定义:</p>
<ol>
<li>The design and construction of new biological parts, devices, and systems;</li>
<li>The re-design of existing natural biological systems for useful purposes.</li>
</ol>
<p>Genetic Engineering -> Read<br />
Synthetic Biology -> Write</p>
<p>特点 = [u'标准化', u'解耦(逆向工程)', u'抽提(正向工程)']</p>
<p>Biobrick 生物积块<br />
生物部件(Part) ++-> 生物设备(Device) ++-> 生物系统(System)</p>
<p>合成生物学的成果 += [u'逻辑门', u'基因调控开关(双稳态开关)', u'Repressilator(自激振荡环)', u'微生物计算机(质粒 -> 线程)', u'大肠杆菌成像系统']</p>
<p>英语口语与听力:</p>
<p>Life is what happens to you when you're busy making other plans.</p>
<p>Brick walls are there for a reason, they let us prove how badly we want things.</p>
<p>third wheel</p>
<p>"head fake"</p>
<p>Loyalty is a two-way street</p>
<p>You can't get there alone</p>
<p>Get a feedback loop and listen to it</p>

	Tags:<a href="http://www.aquarhead.com/tag/randy-paush/" title="Randy Paush" rel="tag">Randy Paush</a>,<a href="http://www.aquarhead.com/tag/%e5%90%88%e6%88%90%e7%94%9f%e7%89%a9%e5%ad%a6/" title="合成生物学" rel="tag">合成生物学</a>,<a href="http://www.aquarhead.com/tag/%e6%b5%99%e5%a4%a7/" title="浙大" rel="tag">浙大</a>,<a href="http://www.aquarhead.com/tag/%e7%94%9f%e5%91%bd%e7%a7%91%e5%ad%a6%e5%af%bc%e8%ae%ba/" title="生命科学导论" rel="tag">生命科学导论</a>,<a href="http://www.aquarhead.com/tag/%e7%ac%94%e8%ae%b0/" title="笔记" rel="tag">笔记</a>,<a href="http://www.aquarhead.com/tag/%e8%a5%bf%e6%96%b9%e6%96%87%e5%ad%a6%e7%bb%8f%e5%85%b8/" title="西方文学经典" rel="tag">西方文学经典</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2010/05/15-days-notes-in-zju/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>悲剧按时落幕</title>
		<link>http://www.aquarhead.com/2010/03/tragedy-ended/</link>
		<comments>http://www.aquarhead.com/2010/03/tragedy-ended/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 08:16:00 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[wubi]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=775</guid>
		<description><![CDATA[其实吧，就算是sh:grub>这种超级命令行模式也是可以修复Ubuntu的。。。 这作者简直太牛掰了，代码各种眼花缭乱，还有图片。。。 可算是把我那个无限折腾人的Ubuntu搞好了，赶紧发一份代码到Gmail上去。 wubi悲剧按时落幕，Google很好很强大。 Tags:Google,grub,wubi]]></description>
			<content:encoded><![CDATA[<p><a href="http://bbs.mingyao.net/showtopic.aspx?topicid=18605&#038;page=end">其实吧，就算是sh:grub>这种超级命令行模式也是可以修复Ubuntu的。。。</a></p>
<p>这作者简直太牛掰了，代码各种眼花缭乱，还有图片。。。</p>
<p>可算是把我那个无限折腾人的Ubuntu搞好了，赶紧发一份代码到Gmail上去。</p>
<p>wubi悲剧按时落幕，Google很好很强大。</p>

	Tags:<a href="http://www.aquarhead.com/tag/google/" title="Google" rel="tag">Google</a>,<a href="http://www.aquarhead.com/tag/grub/" title="grub" rel="tag">grub</a>,<a href="http://www.aquarhead.com/tag/wubi/" title="wubi" rel="tag">wubi</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2010/03/tragedy-ended/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>要记住</title>
		<link>http://www.aquarhead.com/2010/03/to-remember/</link>
		<comments>http://www.aquarhead.com/2010/03/to-remember/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 17:29:30 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=765</guid>
		<description><![CDATA[从最简单版本开始 持续叠代（always beta） Eat your own dog food -from Felix Ding Tags:CakePHP]]></description>
			<content:encoded><![CDATA[<p>从最简单版本开始<br />
持续叠代（always beta）<br />
Eat your own dog food </p>
<p>-from <a href="http://dingyu.me/blog/posts/view/user-friendly-2007">Felix Ding</a></p>

	Tags:<a href="http://www.aquarhead.com/tag/cakephp/" title="CakePHP" rel="tag">CakePHP</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2010/03/to-remember/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ghost是神器啊</title>
		<link>http://www.aquarhead.com/2010/03/holy-shit-ghost/</link>
		<comments>http://www.aquarhead.com/2010/03/holy-shit-ghost/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 05:53:07 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[Ghost]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=723</guid>
		<description><![CDATA[如题。。。。。 Tags:Ghost]]></description>
			<content:encoded><![CDATA[<p>如题。。。。。</p>

	Tags:<a href="http://www.aquarhead.com/tag/ghost/" title="Ghost" rel="tag">Ghost</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2010/03/holy-shit-ghost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Width 100%的问题</title>
		<link>http://www.aquarhead.com/2010/01/a-problem-of-width-in-css-from-yeeyan/</link>
		<comments>http://www.aquarhead.com/2010/01/a-problem-of-width-in-css-from-yeeyan/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 11:29:12 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[FireBug]]></category>
		<category><![CDATA[FireFox]]></category>
		<category><![CDATA[WebDesign]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[想法]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=641</guid>
		<description><![CDATA[刚刚上译言，想翻译How to Create a Theme Development Environment for a Live WordPress Site。不过貌似新版编辑器提交的原文被截断了，于是作罢。拖拽Chrome的窗口玩，忽然发现译言首页的Header部分在窗口变窄后右侧便白了，重现了一次，结果还是如此，当时很震惊，第一感觉是译言的设计师写出BUG了，然后马上否定这个有点SB的想法，第二感觉是Chrome自身的渲染问题，赶紧切Firefox，结果还是如此，有图为证： 然后又觉得是不是译言网确实写错了代码，结果发现Inspect Element也有这问题，如图： 然后突然明白了，这是因为把width设成100%的原因。用Firefox的插件FireBug验证了这一点，如下图（看大图，注意右下角处FireBug中的高亮代码）： 知道问题所在后，我作为一个极其不专业的CSS初学者，利用FireBug强大的调试功能，根据Wordpress.org主页的相关代码，给出如下解决方案。 用min-width:960px之后，完美地解决了问题，因为译言把Header分成了TopHeader和TopNavi，我只修改了一个，正好作为对比。 或者有更好的解决方案？ Tags:CSS,Design,FireBug,FireFox,WebDesign,Wordpress,代码,想法]]></description>
			<content:encoded><![CDATA[<p>刚刚上译言，想翻译<a href="http://inspectelement.com/tutorials/create-a-wordpress-theme-development-environment/">How to Create a Theme Development Environment for a Live WordPress Site</a>。不过貌似新版编辑器提交的原文被截断了，于是作罢。拖拽Chrome的窗口玩，忽然发现译言首页的Header部分在窗口变窄后右侧便白了，重现了一次，结果还是如此，当时很震惊，第一感觉是译言的设计师写出BUG了，然后马上否定这个有点SB的想法，第二感觉是Chrome自身的渲染问题，赶紧切Firefox，结果还是如此，有图为证：<br />
<div id="attachment_642" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.aquarhead.com/wp-content/uploads/2010/01/ProblemIsLikeThis.png"><img src="http://www.aquarhead.com/wp-content/uploads/2010/01/ProblemIsLikeThis-300x227.png" alt="问题重现" title="问题重现" width="300" height="227" class="size-medium wp-image-642" /></a><p class="wp-caption-text">问题重现</p></div></p>
<p>然后又觉得是不是译言网确实写错了代码，结果发现Inspect Element也有这问题，如图：<br />
<div id="attachment_643" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.aquarhead.com/wp-content/uploads/2010/01/ProblemIsLikeThis2.png"><img src="http://www.aquarhead.com/wp-content/uploads/2010/01/ProblemIsLikeThis2-300x224.png" alt="Chrome中的Inspect Element" title="Chrome中的Inspect Element" width="300" height="224" class="size-medium wp-image-643" /></a><p class="wp-caption-text">Chrome中的Inspect Element</p></div></p>
<p>然后突然明白了，这是因为把width设成100%的原因。用Firefox的插件FireBug验证了这一点，如下图（看大图，注意右下角处FireBug中的高亮代码）：<br />
<div id="attachment_644" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.aquarhead.com/wp-content/uploads/2010/01/Width100Problem.png"><img src="http://www.aquarhead.com/wp-content/uploads/2010/01/Width100Problem-300x150.png" alt="Width:100%的问题及原因" title="Width:100%的问题及原因" width="300" height="150" class="size-medium wp-image-644" /></a><p class="wp-caption-text">Width:100%的问题及原因</p></div></p>
<p>知道问题所在后，我作为一个极其不专业的CSS初学者，利用FireBug强大的调试功能，根据Wordpress.org主页的相关代码，给出如下解决方案。<br />
<div id="attachment_645" class="wp-caption aligncenter" style="width: 208px"><a href="http://www.aquarhead.com/wp-content/uploads/2010/01/SolveWidth100Problem.png"><img src="http://www.aquarhead.com/wp-content/uploads/2010/01/SolveWidth100Problem-198x300.png" alt="解决方案" title="解决方案" width="198" height="300" class="size-medium wp-image-645" /></a><p class="wp-caption-text">解决方案</p></div></p>
<p>用min-width:960px之后，完美地解决了问题，因为译言把Header分成了TopHeader和TopNavi，我只修改了一个，正好作为对比。</p>
<p>或者有更好的解决方案？</p>

	Tags:<a href="http://www.aquarhead.com/tag/css/" title="CSS" rel="tag">CSS</a>,<a href="http://www.aquarhead.com/tag/design/" title="Design" rel="tag">Design</a>,<a href="http://www.aquarhead.com/tag/firebug/" title="FireBug" rel="tag">FireBug</a>,<a href="http://www.aquarhead.com/tag/firefox/" title="FireFox" rel="tag">FireFox</a>,<a href="http://www.aquarhead.com/tag/webdesign/" title="WebDesign" rel="tag">WebDesign</a>,<a href="http://www.aquarhead.com/tag/wordpress/" title="Wordpress" rel="tag">Wordpress</a>,<a href="http://www.aquarhead.com/tag/%e4%bb%a3%e7%a0%81/" title="代码" rel="tag">代码</a>,<a href="http://www.aquarhead.com/tag/%e6%83%b3%e6%b3%95/" title="想法" rel="tag">想法</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2010/01/a-problem-of-width-in-css-from-yeeyan/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>使用WordPress内建的wp_tag_cloud创建标签云</title>
		<link>http://www.aquarhead.com/2010/01/how-to-create-tag-cloud-using-wordpress-function/</link>
		<comments>http://www.aquarhead.com/2010/01/how-to-create-tag-cloud-using-wordpress-function/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 12:22:37 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Codex]]></category>
		<category><![CDATA[Simple Tags]]></category>
		<category><![CDATA[Tag Cloud]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[文]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=630</guid>
		<description><![CDATA[不可否认Simple Tags是个很好的插件——虽然我只使用它的Click Tags功能。。。但是它提供的st-tag-cloud实在是。。。 翻看了Wordpress的Function Reference页面，又一番链接后终于看到了Tag Cloud的相关Codex。 下面简单地翻译下这个Codex： 自Wordpress 2.3版本以来，wp_tag_cloud这个模板标签开始用于显示一个Tag列表，人们常称其为“Tag Cloud”，即标签云，它的特点是每个Tag显示的大小由包含这个Tag的日志数量决定。2.8版本后，taxonomy参数也被加入进来，这样任何分类都能作为生成Cloud的样本。也就是说，你也可以弄一个Categories生成的Cloud展示给浏览者。 这个标签的用法很简单： &#60;?php wp_tag_cloud&#40; $args &#41;; ?&#62; 默认的参数如下： &#60;?php $args = array&#40; 'smallest' =&#62; 8, 'largest' =&#62; 22, 'unit' =&#62; 'pt', 'number' =&#62; 45, 'format' =&#62; 'flat', 'separator' =&#62; '\n', 'orderby' =&#62; 'name', 'order' =&#62; 'ASC', 'exclude' =&#62; , 'include' =&#62; , 'link' =&#62; 'view', 'taxonomy' [...]]]></description>
			<content:encoded><![CDATA[<p>不可否认Simple Tags是个很好的插件——虽然我只使用它的Click Tags功能。。。但是它提供的st-tag-cloud实在是。。。</p>
<p>翻看了Wordpress的<a href="http://codex.wordpress.org/Function_Reference">Function Reference</a>页面，又一番链接后终于看到了Tag Cloud的<a href="http://codex.wordpress.org/Template_Tags/wp_tag_cloud">相关Codex</a>。</p>
<p>下面简单地翻译下这个Codex：</p>
<p>自Wordpress 2.3版本以来，wp_tag_cloud这个模板标签开始用于显示一个Tag列表，人们常称其为“Tag Cloud”，即标签云，它的特点是每个Tag显示的大小由包含这个Tag的日志数量决定。2.8版本后，taxonomy参数也被加入进来，这样任何分类都能作为生成Cloud的样本。也就是说，你也可以弄一个Categories生成的Cloud展示给浏览者。</p>
<p>这个标签的用法很简单：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_tag_cloud<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$args</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>默认的参数如下：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'smallest'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'largest'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">22</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'unit'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'pt'</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'number'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">45</span><span style="color: #339933;">,</span>  
    <span style="color: #0000ff;">'format'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'flat'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'separator'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'\n'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'orderby'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'name'</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'order'</span>     <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'ASC'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'exclude'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'include'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'link'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'view'</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'taxonomy'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'post_tag'</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'echo'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>默认参数注释：</p>
<ul>
<li><em>smallest</em> - 最小的Tag（使用次数最少）显示大小是8；</li>
<li><em>largest</em> - 最大的Tag（使用次数最多）显示大小是22；</li>
<li><em>unit</em> - 把'pt'作为字体大小的单位；</li>
<li><em>number</em> - 最多显示45个Tag；</li>
<li><em>format</em> - 用普通方式（空格作为分隔符）显示Tag；</li>
<li><em>separator</em> - 在Tag之间显示空格；</li>
<li><em>orderby</em> - 以Tag的名称排序（如果显示数量有限会影响哪些Tag能被显示）；</li>
<li><em>order</em> - 以升序排列Tag；</li>
<li><em>exclude</em> - 不排除任何Tag；</li>
<li><em>include</em> - 包含所有Tag；</li>
<li><em>link</em> - 查看模式；</li>
<li><em>taxonomy</em> - 使用日志的Tag作为样本生成Cloud；</li>
<li><em>echo</em> - 显示结果。</li>
</ul>
<p>参数详解：<br />
<strong>smallest</strong><br />
（整型）（可选）使用次数最少的Tag显示时的文字大小（单位由unit参数指定）<br />
默认值：8</p>
<p><strong>largest</strong><br />
（整型）（可选）使用次数最多的Tag显示时的文字大小（单位由unit参数指定）<br />
默认值：22</p>
<p><strong>unit</strong><br />
（字符串）（可选）指定<strong>smallest</strong>和<strong>largest</strong>的单位。可以使用任何CSS支持的长度单位，如pt，px，em，%等。<br />
默认值：'pt'</p>
<p><strong>number</strong><br />
（整型）（可选）Cloud中实际显示的Tag数量（输入0来显示全部Tag）。<br />
默认值：45</p>
<p><strong>format</strong><br />
（字符串）（可选）Cloud的显示格式。</p>
<ul>
<li>'flat' （默认）Tag之间用separator定义的空格分开；</li>
<li>'list' Tag会在ul标签中显示，同时带有class="wp-tag-cloud"属性；</li>
<li>'array' Tag会作为一个列表被<strong>返回</strong>而不是显示，这是在2.5版本中实现的。</li>
</ul>
<p><strong>separator</strong><br />
（字符串）（可选）Tag之间的文本或者空间。注意，这个功能在2.9版本才引入。<br />
默认值：'/n'（即空格）</p>
<p><strong>orderby</strong><br />
（字符串）（可选）Tag的顺序。可选值有：
<ul>
<li>'name' （默认）</li>
<li>'count'</li>
</ul>
<p><strong>order</strong><br />
（字符串）（可选）排序方式。可选值如下（<strong>必须大写</strong>）：
<ul>
<li>'ASC' （默认）</li>
<li>'DESC'</li>
<li>'RAND' Tag将随机排列。注意：这个参数在2.5版本中被引入。</li>
</ul>
<p><strong>exclude</strong><br />
（字符串）（可选）用逗号分隔Tag的term_id来排除特定的Tag。比如，'exclude=5,27'表示term_id为5或27的Tag不会被显示。<br />
默认不会排除任何Tag。</p>
<p><strong>include</strong><br />
（字符串）（可选）用逗号分隔Tag的term_id来包含特定的Tag。比如，'include=5,27'表示只有term_id为5或27的Tag会被显示。<br />
默认包含所有Tag。</p>
<p><strong>link</strong><br />
（字符串）（可选）设置链接以允许修改特定的Tag。注意，这个参数在2.7版本中被引入。可选值有：
<ul>
<li>'view' （默认）</li>
<li>'edit'</li>
</ul>
<p><strong>taxonomy</strong><br />
（字符串）（可选）选择生成Cloud时所用的分类。注意，这个参数在2.8版本中被引入。</p>
<ul>
<li>'post_tag' （默认）以日志使用的Tag生成Cloud。</li>
<li>'category' 以日志的Category生成Cloud。</li>
<li>'link-category' 用链接的Category生成Cloud。</li>
</ul>
<p><strong>echo</strong><br />
（布尔值）（可选）决定显示还是保存为变量。默认是真（即显示Tag Cloud）。注意，这个参数自2.8版本被进入。可选值：
<ul>
<li>1 (true) （默认）</li>
<li>0 (false)</li>
</ul>
<p>好了，现在你已经了解了wp_tag_cloud这个函数，因为这是一个模板标签，我们必须在模板——Template中使用它。以创建一个Tag Cloud的Page为例。</p>
<p>首先你最好在本地有一个你的Wordpress正在使用的主题，在文件夹中找到page.php，复制所有的内容，新建一个tag_cloud.php文件把page.php的全部内容拷贝进来。然后，在文件的开头输入以下内容（其中那个Template Name填随便一个你想的名就行）：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #666666; font-style: italic;">/*
Template Name: Tag Cloud
*/</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>然后找到 the_content() 这个函数，把你修改后的wp_tag_cloud函数加到它的前面或者后面（分别试试，我最后是放到前面了，但是这样如果你在Page里面写东西了的话就会在标签云后面了，自己看看哪个好吧）。像这样：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_tag_cloud<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'number=0&amp;order=RAND'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>保存这个文件，上传到你的博客这个主题的主文件夹下面，然后到博客的控制面板添加新页面，填一个题目就行了——比如Tag Cloud，然后找到Attributes（属性）这个控制项，在其中有个选模板的地方，选你刚才起的那个名——比如Tag Cloud，其他不用管，然后发布就可以了。</p>
<p>这样弄成的<a href="http://www.aquarhead.com/tag-cloud/">Tag Cloud</a>起码比Simple Tags弄出来的好看多啦，而且把全部的Tag都显示出来了。</p>

	Tags:<a href="http://www.aquarhead.com/tag/blog/" title="Blog" rel="tag">Blog</a>,<a href="http://www.aquarhead.com/tag/codex/" title="Codex" rel="tag">Codex</a>,<a href="http://www.aquarhead.com/tag/simple-tags/" title="Simple Tags" rel="tag">Simple Tags</a>,<a href="http://www.aquarhead.com/tag/tag-cloud/" title="Tag Cloud" rel="tag">Tag Cloud</a>,<a href="http://www.aquarhead.com/tag/wordpress/" title="Wordpress" rel="tag">Wordpress</a>,<a href="http://www.aquarhead.com/tag/%e4%bb%a3%e7%a0%81/" title="代码" rel="tag">代码</a>,<a href="http://www.aquarhead.com/tag/%e6%96%87/" title="文" rel="tag">文</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2010/01/how-to-create-tag-cloud-using-wordpress-function/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>typeface.js神器登场</title>
		<link>http://www.aquarhead.com/2010/01/awesome-typeface-js/</link>
		<comments>http://www.aquarhead.com/2010/01/awesome-typeface-js/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 19:27:07 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[typeface.js]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[字体]]></category>
		<category><![CDATA[开源]]></category>
		<category><![CDATA[文]]></category>
		<category><![CDATA[翻译]]></category>
		<category><![CDATA[英语]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=611</guid>
		<description><![CDATA[很久以前就看到过typeface.js这个脚本的官方网站，挺有趣的，但那时候没时间弄也就不了了之了。 今夜咖啡作祟，我又在创作（好吧，跟着教程的也算）Wordpress的主题，所以到Google搜索了几个关键字，最后用font js搜出了typeface.js的网站，一看就知道是它了。 typeface.js是用来渲染网站字体的一个脚本，它与众不同之处在于不用图片或者flash来显示用户想要表现的字体，你可以正常地写HTML或者CSS，而浏览者浏览时就像本地真的有这种字体一样。它的处理流程很简单：首先载入typeface.js的代码以及所需要的字体，然后就像平常一样调用即可。 typeface.js是一个开放源代码的项目，欢迎你的捐款。它的代码将永远保持免费和开放。这其中包括typeface.js本身的代码以及用来转换字体的perl模块。 typeface.js支持多个平台，支持Firefox 1.5+，Safari 2+，IE 6+的浏览器。其他浏览器上效果可能会有些微的降低。比如那些用PDA浏览你的网站的用户，他们仍然能正常地看到你的文字内容，只是没那么好看罢了。而搜索引擎也不再需要依赖于ORC技术或者图片的alt属性来识别文字了。 typeface.js的显示效果出众，CSS2标准包括了文字排版方面的大量指令，然而浏览器的实现情况并不令人满意。我们的库致力于填补这个空白。尤其是，我们的库已经支持'font-stretch'（字体拉伸）属性，并提供了对于'letter-spacing'（字符间距）等属性更好的控制。 typeface.js仍待发展，这个脚本还有很大的提升和优化空间。例如，你可能已经发现把typeface.js用在博客标题和文章题目上表现优秀，但用在文章内容上速度就慢了许多。而且我们还没有实现:hover伪类选择器的相关功能，以及其他可能出现的缺点。 要使用typeface.js其实很简单，首先你要下载typeface.js库，在下载页面可以找到，然后你需要一套typeface.js依赖的字体文件，几个准备好的字体包可以在字体页面找到（那里也可以把TrueType或OpenType字体转换成htm文件，再把扩展名改成js即可）。然后在你的网站代码中做出如下式样的修改： &#60;html&#62; &#60;head&#62; &#60;!-- load any external stylesheets first --&#62; &#60;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; href=&#34;/style.css&#34;&#62; &#160; &#60;!-- then load the typeface.js library and typeface.js fonts --&#62; &#60;script src=&#34;typeface-0.14.js&#34;&#62;&#60;/script&#62; &#60;script src=&#34;helvetiker_regular.typeface.js&#34;&#62;&#60;/script&#62; &#60;/head&#62; &#160; &#60;body&#62; &#60;!-- go ahead and specify typeface.js fonts with CSS --&#62; &#60;div class=&#34;typeface-js&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>很久以前就看到过typeface.js这个脚本的<a href="http://typeface.neocracy.org/">官方网站</a>，挺有趣的，但那时候没时间弄也就不了了之了。</p>
<p>今夜咖啡作祟，我又在创作（好吧，跟着教程的也算）Wordpress的主题，所以到Google搜索了几个关键字，最后用font js搜出了typeface.js的网站，一看就知道是它了。</p>
<p>typeface.js是用来渲染网站字体的一个脚本，它与众不同之处在于不用图片或者flash来显示用户想要表现的字体，你可以正常地写HTML或者CSS，而浏览者浏览时就像本地真的有这种字体一样。它的处理流程很简单：首先载入typeface.js的代码以及所需要的字体，然后就像平常一样调用即可。</p>
<p>typeface.js是一个开放源代码的项目，欢迎你的捐款。它的代码将永远保持免费和开放。这其中包括typeface.js本身的代码以及用来转换字体的perl模块。</p>
<p>typeface.js支持多个平台，支持Firefox 1.5+，Safari 2+，IE 6+的浏览器。其他浏览器上效果可能会有些微的降低。比如那些用PDA浏览你的网站的用户，他们仍然能正常地看到你的文字内容，只是没那么好看罢了。而搜索引擎也不再需要依赖于ORC技术或者图片的alt属性来识别文字了。</p>
<p>typeface.js的显示效果出众，CSS2标准包括了文字排版方面的大量指令，然而浏览器的实现情况并不令人满意。我们的库致力于填补这个空白。尤其是，我们的库已经支持'font-stretch'（字体拉伸）属性，并提供了对于'letter-spacing'（字符间距）等属性更好的控制。</p>
<p>typeface.js仍待发展，这个脚本还有很大的提升和优化空间。例如，你可能已经发现把typeface.js用在博客标题和文章题目上表现优秀，但用在文章内容上速度就慢了许多。而且我们还没有实现:hover伪类选择器的相关功能，以及其他可能出现的缺点。</p>
<p>要使用typeface.js其实很简单，首先你要下载typeface.js库，在<a href="http://typeface.neocracy.org/download.html">下载页面</a>可以找到，然后你需要一套typeface.js依赖的字体文件，几个准备好的字体包可以在<a href="http://typeface.neocracy.org/fonts.html">字体页面</a>找到（那里也可以把TrueType或OpenType字体转换成htm文件，再把扩展名改成js即可）。然后在你的网站代码中做出如下式样的修改：</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;html&gt;
  &lt;head&gt;
    &lt;!-- load any external stylesheets first --&gt;
    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;/style.css&quot;&gt;
&nbsp;
    &lt;!-- then load the typeface.js library and typeface.js fonts --&gt;
    &lt;script src=&quot;typeface-0.14.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;helvetiker_regular.typeface.js&quot;&gt;&lt;/script&gt;
  &lt;/head&gt;
&nbsp;
  &lt;body&gt;
    &lt;!-- go ahead and specify typeface.js fonts with CSS --&gt;
    &lt;div class=&quot;typeface-js&quot; style=&quot;font-family: Helvetiker&quot;&gt;
      Text here in Helvetiker font...
    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>这里有几件事你需要记住：</p>
<ul>
<li>默认情况下，typeface.js会渲染标题元素中的文字（如h1，h2等），只要他们指定了使用相应的typeface.js字体。你要记住标题元素中的文字是默认加粗的，所以要么你在标题的样式中加入font-weight: normal，要么你就加载一个加粗版本的字体文件。</li>
<li>其他任何类型的HTML元素要想使用typeface.js渲染，必须把typeface-js加入其class属性中。如果想用的元素已经有一个class属性，比如

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;heading&quot;&gt;</pre></div></div>

<p>那么你可以这样把typeface-js加进去</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;heading typeface-js&quot;&gt;</pre></div></div>

</li>
<li>你必须先加载外部样式表，再加载typeface.js。否则，Firefox 3将不理会typeface.js绘出的文本。</li>
<li>一个不幸的消息，font-stretch属性只能用在inline CSS中。</li>
<li>某些情况下，在IE 7浏览器中你会发现typeface.js渲染的文本在网页渲染完毕后的几千分之一秒后才出现，产生一种“闪烁”的效果。一种避免此情况的方式是在body标签结束之前手动调用 _typeface_js.initialize()。</li>
<li>你也可以通过禁止脚本产生能被选中的文本来加速脚本的运行。在加载typeface.js后，你可以设置参数来禁用可选文本，像这样：

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script&gt;_typeface_js.configure({ disableSelection: true })&lt;/script&gt;</pre></div></div>

</li>
</ul>
<p>上面把官网的HOME和USAGE两个网页的主要内容翻译出来了，我现在是用的Palatino Linotype的字体，我在Mathematica里面做FYC的习题的时候发现的这个字体。</p>
<p>脚本很好很强大。</p>
<p>我想把Vera Sans Yuan Ti的字体做一个来渲染中文，但是那个生成的字体文件下载下来有20+MB，一想得加载到啥时候啊，算了。暂时就这样了。</p>

	Tags:<a href="http://www.aquarhead.com/tag/blog/" title="Blog" rel="tag">Blog</a>,<a href="http://www.aquarhead.com/tag/typeface-js/" title="typeface.js" rel="tag">typeface.js</a>,<a href="http://www.aquarhead.com/tag/wordpress/" title="Wordpress" rel="tag">Wordpress</a>,<a href="http://www.aquarhead.com/tag/%e4%bb%a3%e7%a0%81/" title="代码" rel="tag">代码</a>,<a href="http://www.aquarhead.com/tag/%e5%88%86%e4%ba%ab/" title="分享" rel="tag">分享</a>,<a href="http://www.aquarhead.com/tag/%e5%ad%97%e4%bd%93/" title="字体" rel="tag">字体</a>,<a href="http://www.aquarhead.com/tag/%e5%bc%80%e6%ba%90/" title="开源" rel="tag">开源</a>,<a href="http://www.aquarhead.com/tag/%e6%96%87/" title="文" rel="tag">文</a>,<a href="http://www.aquarhead.com/tag/%e7%bf%bb%e8%af%91/" title="翻译" rel="tag">翻译</a>,<a href="http://www.aquarhead.com/tag/%e8%8b%b1%e8%af%ad/" title="英语" rel="tag">英语</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2010/01/awesome-typeface-js/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>一个关于交换的比喻</title>
		<link>http://www.aquarhead.com/2010/01/an-analogy-of-the-principles-of-exchange/</link>
		<comments>http://www.aquarhead.com/2010/01/an-analogy-of-the-principles-of-exchange/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 16:37:03 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[OI]]></category>
		<category><![CDATA[Pascal]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[回顾]]></category>
		<category><![CDATA[思考]]></category>
		<category><![CDATA[教育]]></category>
		<category><![CDATA[数学]]></category>
		<category><![CDATA[日记]]></category>
		<category><![CDATA[明白]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=608</guid>
		<description><![CDATA[晚上喝了杯咖啡，然后充分地体验了“杯具”的含义——头痛欲裂，整的我不得不在床上翻来覆去了三四个小时，现在好些了。 刚躺下的时候想到了一个关于交换两个变量的比喻，但是关了电脑所以只好用纸笔记录下来。 想起了高一下学期的时候数学老师讲算法，让我给讲交换两个变量时候为啥得用一个临时变量，Pascal代码可表示如下： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Program Exchange; Var a,b,c : Longint; &#160; Begin Readln&#40;a,b&#41;; // Exchange begins here c:=a; a:=b; b:=c; // Exchange Complete Writeln&#40;a,' ',b&#41;; Readln; End. 我想了这么个比喻法：假设现在有A、B两个杯，A里面是啤酒，B里面是白酒，要求让A里面是白酒，B里面是啤酒，怎么办？ 显然，得再拿个C杯，把A的啤酒倒进C里面，再把B的白酒倒进A里面，最后把C的啤酒倒进B里面。 当时我讲的时候主要是强调了算法程序中的等号不是数学意义上的=，而是赋值符号（即Pascal中的:=），而赋值符号的意义是把右边的值给左边，不用一个c变量进行备份的话会把原来的值覆盖掉。 现在想想当时讲的太麻烦了。 Tags:OI,Pascal,代码,回顾,思考,教育,数学,日记,明白]]></description>
			<content:encoded><![CDATA[<p>晚上喝了杯咖啡，然后充分地体验了“杯具”的含义——头痛欲裂，整的我不得不在床上翻来覆去了三四个小时，现在好些了。</p>
<p>刚躺下的时候想到了一个关于交换两个变量的比喻，但是关了电脑所以只好用纸笔记录下来。</p>
<p>想起了高一下学期的时候数学老师讲算法，让我给讲交换两个变量时候为啥得用一个临时变量，Pascal代码可表示如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="pascal" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">Program</span> Exchange;
<span style="color: #000000; font-weight: bold;">Var</span>
 a<span style="color: #339933;">,</span>b<span style="color: #339933;">,</span>c <span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">Longint</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">Begin</span>
 <span style="color: #000066;">Readln</span><span style="color: #009900;">&#40;</span>a<span style="color: #339933;">,</span>b<span style="color: #009900;">&#41;</span>;
<span style="color: #666666; font-style: italic;">// Exchange begins here</span>
 c<span style="color: #339933;">:=</span>a;
 a<span style="color: #339933;">:=</span>b;
 b<span style="color: #339933;">:=</span>c;
<span style="color: #666666; font-style: italic;">// Exchange Complete</span>
 <span style="color: #000066;">Writeln</span><span style="color: #009900;">&#40;</span>a<span style="color: #339933;">,</span><span style="color: #ff0000;">' '</span><span style="color: #339933;">,</span>b<span style="color: #009900;">&#41;</span>;
 <span style="color: #000066;">Readln</span>;
<span style="color: #000000; font-weight: bold;">End</span>.</pre></td></tr></table></div>

<p>我想了这么个比喻法：假设现在有A、B两个杯，A里面是啤酒，B里面是白酒，要求让A里面是白酒，B里面是啤酒，怎么办？</p>
<p>显然，得再拿个C杯，把A的啤酒倒进C里面，再把B的白酒倒进A里面，最后把C的啤酒倒进B里面。</p>
<p>当时我讲的时候主要是强调了算法程序中的等号不是数学意义上的=，而是赋值符号（即Pascal中的:=），而赋值符号的意义是把右边的值给左边，不用一个c变量进行备份的话会把原来的值覆盖掉。</p>
<p>现在想想当时讲的太麻烦了。</p>

	Tags:<a href="http://www.aquarhead.com/tag/oi/" title="OI" rel="tag">OI</a>,<a href="http://www.aquarhead.com/tag/pascal/" title="Pascal" rel="tag">Pascal</a>,<a href="http://www.aquarhead.com/tag/%e4%bb%a3%e7%a0%81/" title="代码" rel="tag">代码</a>,<a href="http://www.aquarhead.com/tag/%e5%9b%9e%e9%a1%be/" title="回顾" rel="tag">回顾</a>,<a href="http://www.aquarhead.com/tag/%e6%80%9d%e8%80%83/" title="思考" rel="tag">思考</a>,<a href="http://www.aquarhead.com/tag/%e6%95%99%e8%82%b2/" title="教育" rel="tag">教育</a>,<a href="http://www.aquarhead.com/tag/%e6%95%b0%e5%ad%a6/" title="数学" rel="tag">数学</a>,<a href="http://www.aquarhead.com/tag/%e6%97%a5%e8%ae%b0/" title="日记" rel="tag">日记</a>,<a href="http://www.aquarhead.com/tag/%e6%98%8e%e7%99%bd/" title="明白" rel="tag">明白</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2010/01/an-analogy-of-the-principles-of-exchange/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>图解全球网络连接速度与价格</title>
		<link>http://www.aquarhead.com/2010/01/internet-speeds-and-costs-from-around-the-world/</link>
		<comments>http://www.aquarhead.com/2010/01/internet-speeds-and-costs-from-around-the-world/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 13:01:26 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[价格]]></category>
		<category><![CDATA[图解]]></category>
		<category><![CDATA[网络]]></category>
		<category><![CDATA[速度]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=582</guid>
		<description><![CDATA[日本的网络真好，还有芬兰。 韩国电竞选手真幸福。 原来以为英国的网络速度就很快了。。。 Tags:价格,图解,网络,速度]]></description>
			<content:encoded><![CDATA[<p>日本的网络真好，还有芬兰。<br />
韩国电竞选手真幸福。<br />
原来以为英国的网络速度就很快了。。。</p>
<div id="attachment_583" class="wp-caption aligncenter" style="width: 277px"><a href="http://www.aquarhead.com/wp-content/uploads/2010/01/cwiNV.jpg"><img src="http://www.aquarhead.com/wp-content/uploads/2010/01/cwiNV-267x300.jpg" alt="图解全球网络连接速度与价格" title="图解全球网络连接速度与价格" width="267" height="300" class="size-medium wp-image-583" /></a><p class="wp-caption-text">图解全球网络连接速度与价格</p></div>

	Tags:<a href="http://www.aquarhead.com/tag/%e4%bb%b7%e6%a0%bc/" title="价格" rel="tag">价格</a>,<a href="http://www.aquarhead.com/tag/%e5%9b%be%e8%a7%a3/" title="图解" rel="tag">图解</a>,<a href="http://www.aquarhead.com/tag/%e7%bd%91%e7%bb%9c/" title="网络" rel="tag">网络</a>,<a href="http://www.aquarhead.com/tag/%e9%80%9f%e5%ba%a6/" title="速度" rel="tag">速度</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2010/01/internet-speeds-and-costs-from-around-the-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>转动运动学与质点运动学的类比</title>
		<link>http://www.aquarhead.com/2009/12/dynamics-of-rotation-and-dynamics-of-particles-analogies/</link>
		<comments>http://www.aquarhead.com/2009/12/dynamics-of-rotation-and-dynamics-of-particles-analogies/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 16:29:24 +0000</pubDate>
		<dc:creator>AquarHEAD</dc:creator>
				<category><![CDATA[Force Research]]></category>
		<category><![CDATA[Feynman]]></category>
		<category><![CDATA[物理]]></category>
		<category><![CDATA[笔记]]></category>
		<category><![CDATA[费曼物理学讲义]]></category>

		<guid isPermaLink="false">http://www.aquarhead.com/?p=542</guid>
		<description><![CDATA[以下左侧是转动运动学中的物理量，右侧是相应的质点运动学（不知用这两个词合适否？）中的物理量。 角度 位移 角速度 速度 角加速度 加速度 扭矩（转矩） 力 功 功 角动量 动量 转动惯量 质量 转动动能 动能 参考：《费曼物理学讲义》（第一卷） Tags:Feynman,物理,笔记,费曼物理学讲义]]></description>
			<content:encoded><![CDATA[<p>以下左侧是转动运动学中的物理量，右侧是相应的质点运动学（不知用这两个词合适否？）中的物理量。</p>
<ul>
<li>角度 <span class='MathJax_Preview'><img src='http://www.aquarhead.com/wp-content/plugins/latex/cache/tex_707f0aaf280fe515e32cfcd53f42b192.gif' style=' padding-bottom:1px;' class='tex' alt=" \theta \Longleftrightarrow s " /></span> 位移</li>
<li>角速度 <span class='MathJax_Preview'><img src='http://www.aquarhead.com/wp-content/plugins/latex/cache/tex_26c67279c5fe33afec983e9a759942b7.gif' style=' ' class='tex' alt=" \omega = \frac{d\theta}{dt} \Longleftrightarrow v = \frac{ds}{dt} " /></span> 速度</li>
<li>角加速度 <span class='MathJax_Preview'><img src='http://www.aquarhead.com/wp-content/plugins/latex/cache/tex_ba4d25bcb7a9de2dde5c5446a642b1cb.gif' style=' ' class='tex' alt=" \alpha = \frac{d\omega}{dt} = \frac{d^2\theta}{dt^2} \Longleftrightarrow a = \frac{dv}{dt} = \frac{d^2v}{dt^2} " /></span> 加速度</li>
<li>扭矩（转矩） <span class='MathJax_Preview'><img src='http://www.aquarhead.com/wp-content/plugins/latex/cache/tex_6ed61d2798983910121745f5b735c14d.gif' style=' padding-bottom:1px;' class='tex' alt=" \tau \Longleftrightarrow F " /></span> 力</li>
<li>功 <span class='MathJax_Preview'><img src='http://www.aquarhead.com/wp-content/plugins/latex/cache/tex_23ae80e277843ada213a5b52a9ee90b3.gif' style=' padding-bottom:1px;' class='tex' alt=" W = \tau \cdot \theta \Longleftrightarrow W = F \cdot s " /></span> 功</li>
<li>角动量 <span class='MathJax_Preview'><img src='http://www.aquarhead.com/wp-content/plugins/latex/cache/tex_5213f6375fabd51aef2cbd90124d41a3.gif' style=' ' class='tex' alt=" L = \int \tau dt \Longleftrightarrow p = \int F dt " /></span> 动量<br />
<span class='MathJax_Preview'><img src='http://www.aquarhead.com/wp-content/plugins/latex/cache/tex_8c909f0f397187e9d0174785abf64da8.gif' style=' ' class='tex' alt=" \frac{dL}{dt} = \tau \Longleftrightarrow \frac{dp}{dt} = F " /></span></li>
<li>转动惯量 <span class='MathJax_Preview'><img src='http://www.aquarhead.com/wp-content/plugins/latex/cache/tex_571736f4d463ef4964a7f597515dd396.gif' style=' ' class='tex' alt=" I = \frac{L}{\omega} \Longleftrightarrow m = \frac{p}{v} " /></span> 质量</li>
<li>转动动能 <span class='MathJax_Preview'><img src='http://www.aquarhead.com/wp-content/plugins/latex/cache/tex_504dab2748735d18b7fa51397dd19a62.gif' style=' ' class='tex' alt=" \frac{1}{2}I{\omega}^2 \Longleftrightarrow \frac{1}{2}mv^2 " /></span> 动能</li>
</ul>
<p>参考：<a href="http://www.douban.com/subject/1437852/">《费曼物理学讲义》（第一卷）</a></p>

	Tags:<a href="http://www.aquarhead.com/tag/feynman/" title="Feynman" rel="tag">Feynman</a>,<a href="http://www.aquarhead.com/tag/%e7%89%a9%e7%90%86/" title="物理" rel="tag">物理</a>,<a href="http://www.aquarhead.com/tag/%e7%ac%94%e8%ae%b0/" title="笔记" rel="tag">笔记</a>,<a href="http://www.aquarhead.com/tag/%e8%b4%b9%e6%9b%bc%e7%89%a9%e7%90%86%e5%ad%a6%e8%ae%b2%e4%b9%89/" title="费曼物理学讲义" rel="tag">费曼物理学讲义</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.aquarhead.com/2009/12/dynamics-of-rotation-and-dynamics-of-particles-analogies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

