<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-33200808</id><updated>2024-09-02T00:26:06.086+08:00</updated><category term="生活周围"/><category term="眼中的大千"/><category term="奇技淫巧"/><category term="无知的我"/><category term="排版"/><category term="其它"/><category term="笑话"/><category term="诗歌"/><category term="我的收藏"/><category term="读书"/><category term="ThuThesis"/><category term="历史"/><category term="牛人系列"/><category term="Windows"/><category term="老家"/><title type='text'>伸脚地</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default?start-index=26&amp;max-results=25'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>386</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-33200808.post-2944901544765885366</id><published>2014-10-05T09:49:00.005+08:00</published><updated>2014-10-05T09:49:57.776+08:00</updated><title type='text'>Grunt vs Gulp</title><content type='html'>&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;设计理念&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Grunt以”配置“为主，target隐含了plugin的动作；&lt;/li&gt;
&lt;li&gt;Gulp以”流“为主，没有target，每个task可以看作是一个（实际上可以是一组）流的动态流动，从src到dest。 &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;串行并行&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Grunt的每个trask或者target执行完毕之后，所有的动作都是commit到磁盘的，即可以期望在磁盘上能看到dest文件。&lt;/li&gt;
&lt;li&gt;Gulp的流在task没有将其return之前，不能期望dest中有文件，尤其是一个task调用多个gulp.src时，要么最后用merge-stream合并return，要么就改造task为多个task。&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;依赖关系&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Grunt可以在task内run其它task，像普通程序的函数调用。所以依赖关系比较好组织。&lt;/li&gt;
&lt;li&gt;Gulp的start已经不推荐使用了，强迫用户按照“流”的思路改造程序。依赖关系只剩下定义task中的deps参数了。而这个deps也会并行执行，所以，如果他们之间也有依赖关系，要非常注意。&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/2944901544765885366/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/2944901544765885366' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/2944901544765885366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/2944901544765885366'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2014/10/grunt-vs-gulp.html' title='Grunt vs Gulp'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-7416394917596682720</id><published>2011-09-14T10:27:00.000+08:00</published><updated>2011-09-14T10:29:23.925+08:00</updated><title type='text'>Swiss-knifes for Linux</title><content type='html'>- tmux/byobu/screen&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;- git/tig (forget svn and try &lt;a href=&quot;https://github.com/nirvdrum/svn2git&quot; target=&quot;_blank&quot;&gt;svn2git&lt;/a&gt;)&lt;br&gt;- &lt;a href=&quot;http://cheat.errtheblog.com/&quot; target=&quot;_blank&quot;&gt;cheat&lt;/a&gt;&lt;br&gt;  - emacs/vim/nano&lt;br&gt;&lt;br&gt;Several less used but very interesting tools:&lt;br&gt; - zsh/fish&lt;br&gt;- bpython/ipython (for python development)&lt;br&gt;- pdftk&lt;br&gt;&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/7416394917596682720/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/7416394917596682720' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/7416394917596682720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/7416394917596682720'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2011/09/swiss-knifes-for-linux.html' title='Swiss-knifes for Linux'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-2287777870753678789</id><published>2011-08-30T16:55:00.001+08:00</published><updated>2011-08-30T16:55:47.019+08:00</updated><title type='text'>sendmail@ubuntu 11.04</title><content type='html'>If you find the default installation of sendmail on ubuntu 11.04 does not work, check whether there a file called &amp;quot;/etc/mail/sendmail.cf.error&amp;quot;:&lt;br&gt;&lt;br&gt;Creating /etc/mail/sendmail.cf...&lt;br&gt;*** ERROR: FEATURE() should be before MAILER()&lt;br&gt;  *** MAILER(`local&amp;#39;) must appear after FEATURE(`always_add_domain&amp;#39;)*** ERROR: FEATURE() should be before MAILER()&lt;br&gt;*** MAILER(`local&amp;#39;) must appear after FEATURE(`allmasquerade&amp;#39;)*** ERROR: FEATURE() should be before MAILER()&lt;br&gt;  &lt;br&gt;if so, do this:&lt;br&gt;$ cd /etc/mail&lt;br&gt;$ vi &lt;a href=&quot;http://sendmail.mc&quot;&gt;sendmail.mc&lt;/a&gt;&lt;br&gt;# move the MAILER part to the end of the file&lt;br&gt;$ make&lt;br&gt;$ /etc/init.d/sendmail reload&lt;br&gt;&lt;br&gt;DONE.&lt;br&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/2287777870753678789/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/2287777870753678789' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/2287777870753678789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/2287777870753678789'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2011/08/sendmailubuntu-1104.html' title='sendmail@ubuntu 11.04'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-5185476659210357615</id><published>2011-04-30T14:31:00.001+08:00</published><updated>2011-04-30T14:31:52.395+08:00</updated><title type='text'>several papers you&#39;d better to know about python</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.cafepy.com/article/python_types_and_objects/&quot;&gt;Python Types and Objects&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.cafepy.com/article/python_attributes_and_methods/&quot;&gt;Python Attributes and Methods&lt;/a&gt;&lt;br&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.dabeaz.com/coroutines/&quot;&gt;A Curious Course on Coroutines and Concurrency&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.dabeaz.com/generators/index.html&quot;&gt;Generator Tricks for Systems Programmers&lt;/a&gt;&lt;br&gt;&lt;/li&gt;  &lt;li&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/5185476659210357615/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/5185476659210357615' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/5185476659210357615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/5185476659210357615'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2011/04/several-papers-youd-better-to-know.html' title='several papers you&#39;d better to know about python'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-8667979049692755718</id><published>2011-04-27T21:04:00.001+08:00</published><updated>2011-04-27T21:04:41.623+08:00</updated><title type='text'>emacs reloaded</title><content type='html'>enjoy </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/8667979049692755718/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/8667979049692755718' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/8667979049692755718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/8667979049692755718'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2011/04/emacs-reloaded.html' title='emacs reloaded'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-4598907758389878223</id><published>2011-04-27T19:25:00.001+08:00</published><updated>2011-04-27T19:25:57.811+08:00</updated><title type='text'>emacs 23 fontset</title><content type='html'>&lt;div&gt;(set-frame-font &amp;quot;Monaco-14&amp;quot;)&lt;/div&gt;&lt;div&gt;(set-fontset-font &amp;quot;fontset-default&amp;quot; &amp;#39;han &amp;#39;(&amp;quot;华文细黑&amp;quot; . &amp;quot;unicode-bmp&amp;quot;))&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/4598907758389878223/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/4598907758389878223' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/4598907758389878223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/4598907758389878223'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2011/04/emacs-23-fontset.html' title='emacs 23 fontset'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-6280468416033891501</id><published>2010-12-20T20:39:00.001+08:00</published><updated>2010-12-20T20:39:14.717+08:00</updated><title type='text'>又玩了一番iptables+nginx</title><content type='html'>怎么会有这么强悍的软件呢！ </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/6280468416033891501/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/6280468416033891501' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/6280468416033891501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/6280468416033891501'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/12/iptablesnginx.html' title='又玩了一番iptables+nginx'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-687482049373994263</id><published>2010-12-18T15:47:00.001+08:00</published><updated>2010-12-18T15:47:48.207+08:00</updated><title type='text'>戏子</title><content type='html'>如今之演艺圈，尤其是女星，用传统的&quot;戏子&quot;来看她们，再恰当不过。 </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/687482049373994263/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/687482049373994263' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/687482049373994263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/687482049373994263'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/12/blog-post_18.html' title='戏子'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-8221630988721028031</id><published>2010-11-30T20:22:00.001+08:00</published><updated>2010-11-30T20:22:37.561+08:00</updated><title type='text'>趁着srwxr-xr-- root wheel的笑话</title><content type='html'>再次温习了一下file permissions。这2个字节真是玩儿出了大花样。 </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/8221630988721028031/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/8221630988721028031' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/8221630988721028031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/8221630988721028031'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/11/srwxr-xr-root-wheel.html' title='趁着srwxr-xr-- root wheel的笑话'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-6060273939215657444</id><published>2010-11-27T00:01:00.001+08:00</published><updated>2010-11-27T00:01:11.714+08:00</updated><title type='text'>decorator is great!</title><content type='html'>decorator seems to be a great solution for permission checking. </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/6060273939215657444/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/6060273939215657444' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/6060273939215657444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/6060273939215657444'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/11/decorator-is-great.html' title='decorator is great!'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-2729575003298867906</id><published>2010-11-06T23:12:00.001+08:00</published><updated>2010-11-06T23:12:31.524+08:00</updated><title type='text'>一个有趣的现象</title><content type='html'>国内比较好一点的IT公司名字（缩写）两个字居多，新浪、网易、搜狐、腾讯、百度、华为、联想、淘宝、阿里（巴巴？）、人人、当当、卓越、携程，甚至包括一些外资工资谷歌、雅虎、脸书（？）、微软、惠普、戴尔、三星。。。。&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;内三个字的不多斯达康（？），表现平平&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div&gt;四个字的基本都不怎么样，XX动力，XX科技，XX互联，XX信息，XX国际，XX数码，XX移动（？），XX联通（？），XX电信（？），以及各种稀奇古怪的命名，甚至包括外资的摩托罗拉，阿尔卡特。。。&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/2729575003298867906/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/2729575003298867906' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/2729575003298867906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/2729575003298867906'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/11/blog-post.html' title='一个有趣的现象'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-475906339089201189</id><published>2010-11-03T20:07:00.001+08:00</published><updated>2010-11-03T20:07:33.043+08:00</updated><title type='text'>understand unicode and encodings more</title><content type='html'>&lt;br&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/475906339089201189/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/475906339089201189' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/475906339089201189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/475906339089201189'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/11/understand-unicode-and-encodings-more.html' title='understand unicode and encodings more'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-6155955397693817475</id><published>2010-08-13T21:09:00.001+08:00</published><updated>2010-08-13T21:09:37.718+08:00</updated><title type='text'>最新的sig-alternate.cls的毛病</title><content type='html'>首先文件名和\ProvideClass提供的不一致。&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;其次，在@sect, @ssect定义的最后一句：&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;\@xsect{#5}\parskip=10.5pt% within the section, parskip = leading 12 Jan 2000 gkmt&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;这是乱说的，\parskip的效果根本没有&quot;with in the section&amp;quot;，导致正文段落\parskip太大。&lt;/div&gt; &lt;div&gt;修改办法也简单，将上述语句替换为：&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;\@xsect{#5}\vskip10.5pt\parskip=0pt&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;这个错误很过分。&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;另，发现自己对copyrightbox的&lt;a href=&quot;http://xueruini.spaces.live.com/blog/cns!DF086AB717BC7F6F!540.entry&quot;&gt;修改方法&lt;/a&gt;被加到模版中了。&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/6155955397693817475/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/6155955397693817475' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/6155955397693817475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/6155955397693817475'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/08/sig-alternatecls.html' title='最新的sig-alternate.cls的毛病'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-2712986830476461217</id><published>2010-08-01T17:00:00.001+08:00</published><updated>2010-08-01T17:00:41.703+08:00</updated><title type='text'>春风疑不到天涯</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: 14px; line-height: 22px; &quot;&gt;&lt;pre style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: normal; zoom: 1; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 22px; font-family: Arial; &quot;&gt; 干活累了，小憩一会儿。&lt;/pre&gt;&lt;pre style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: normal; zoom: 1; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 22px; font-family: Arial; &quot;&gt; &lt;br&gt;&lt;/pre&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; &quot;&gt; 戏答元珍（宋・欧阳修） &lt;/blockquote&gt;&lt;pre style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: normal; zoom: 1; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 22px; font-family: Arial; &quot;&gt; &lt;blockquote&gt;  春风疑不到天涯，二月山城未见花。&lt;/blockquote&gt;&lt;blockquote&gt;  残雪压枝犹有橘，冻雷惊笋欲抽芽。&lt;/blockquote&gt;&lt;blockquote&gt;  夜闻归雁生乡思，病入新年感物华。&lt;/blockquote&gt;&lt;blockquote&gt;  曾是洛阳花下客，野芳虽晚不须嗟。&lt;/blockquote&gt;&lt;/pre&gt;&lt;blockquote&gt;&lt;br&gt;首尾两句呼应的很自然，很有味道。虽然通篇看下来不过是风景乡思，但字里行间还是透露出欧阳大侠那种酸溜溜的情绪。&lt;/blockquote&gt; &lt;blockquote&gt;同样的题材，五言长城的《长沙过贾谊宅》就完胜欧阳大侠：&lt;br&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;pre style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: normal; zoom: 1; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 22px; font-family: Arial; &quot;&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;white-space: normal; &quot;&gt;&lt;pre style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: normal; zoom: 1; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 22px; font-family: Arial; &quot;&gt; &lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; &quot;&gt; 长沙过贾谊宅（唐.刘长卿）&lt;/blockquote&gt;&lt;blockquote&gt;三年谪宦此栖迟，万古惟留楚客悲。&lt;/blockquote&gt;&lt;blockquote&gt;秋草独寻人去后，寒林空见日斜时。&lt;/blockquote&gt;&lt;blockquote&gt;汉文有道恩犹薄，湘水无情吊岂知。&lt;/blockquote&gt;&lt;blockquote&gt;寂寂江山摇落处，怜君何事到天涯。&lt;/blockquote&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;blockquote&gt; &lt;br&gt;&lt;/blockquote&gt;&lt;blockquote&gt;这里的风景写得很凝重，很沉闷，出现的事物都给人以压抑感（秋草、寒林），而且还故意用一些悲凉的字（悲、独、空、薄，寂），渲染的气氛就不再是酸溜溜了，而是怨气，一股浓浓的怨气。非常喜欢颈链，典故运用的太恰当了，吊古寓己，相当有表现力。不禁想起&quot;可怜夜半虚前席，不问苍生问鬼神&quot;，汉文算是不错的皇帝了，可就在贾谊这事上，不断被后世拿来开涮，真是有趣的紧。&lt;/blockquote&gt;&lt;blockquote&gt; &lt;br&gt;&lt;/blockquote&gt;&lt;/span&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/2712986830476461217/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/2712986830476461217' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/2712986830476461217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/2712986830476461217'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/08/blog-post.html' title='春风疑不到天涯'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-327183147596242758</id><published>2010-07-31T22:14:00.001+08:00</published><updated>2010-07-31T22:14:08.941+08:00</updated><title type='text'>tornado.web.authenticated是怎么判断的？</title><content type='html'>tornado/web.py：&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 17px; &quot;&gt;&lt;pre style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font: normal normal normal 12px/normal Monaco, &amp;#39;Courier New&amp;#39;, &amp;#39;DejaVu Sans Mono&amp;#39;, &amp;#39;Bitstream Vera Sans Mono&amp;#39;, monospace; line-height: 1.4em; font-family: &amp;#39;Bitstream Vera Sans Mono&amp;#39;, Courier, monospace; font-size: 15px; &quot;&gt; &lt;div class=&quot;line&quot; id=&quot;LC1367&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&lt;span class=&quot;k&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(153, 0, 0); font-weight: bold; &quot;&gt;authenticated&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;method&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;):&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1368&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;sd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(221, 17, 68); &quot;&gt;&amp;quot;&amp;quot;&amp;quot;Decorate methods with this to require that the user be logged in.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1369&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;nd&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;@functools.wraps&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;method&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;)&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1370&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;k&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(153, 0, 0); font-weight: bold; &quot;&gt;wrapper&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(153, 153, 153); &quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;):&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1371&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;k&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;if&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;not&lt;/span&gt; &lt;span class=&quot;bp&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(153, 153, 153); &quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;current_user&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;:&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1372&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;k&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;if&lt;/span&gt; &lt;span class=&quot;bp&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(153, 153, 153); &quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;request&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;method&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(221, 17, 68); &quot;&gt;&amp;quot;GET&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;:&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1373&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(153, 153, 153); &quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;get_login_url&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;()&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1374&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;k&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;if&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(221, 17, 68); &quot;&gt;&amp;quot;?&amp;quot;&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;not&lt;/span&gt; &lt;span class=&quot;ow&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;:&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1375&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(221, 17, 68); &quot;&gt;&amp;quot;?&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;urllib&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;urlencode&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(0, 134, 179); &quot;&gt;dict&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(0, 134, 179); &quot;&gt;next&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(153, 153, 153); &quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;request&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;uri&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;))&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1376&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;bp&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(153, 153, 153); &quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;redirect&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;)&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1377&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;k&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;return&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1378&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;k&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;raise&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;HTTPError&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(0, 153, 153); &quot;&gt;403&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;)&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1379&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;k&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;method&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; color: rgb(153, 153, 153); &quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;args&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;)&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1380&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;k&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; font-weight: bold; &quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;wrapper&lt;/span&gt;&lt;/div&gt; &lt;div class=&quot;line&quot; id=&quot;LC1380&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt;&lt;span class=&quot;n&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.4em; &quot;&gt;&lt;br&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line&quot; id=&quot;LC1380&quot; style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; line-height: 1.4em; &quot;&gt; 如果current_user为空就认为没有登陆，而current_user由get_current_user()设定。所以在重载get_current_user()时，如果返回不空，说明用户已经登陆；否则，表示用户尚未登陆。从上面的代码可以看出来，next会记录出错时的uri，登陆之后可供redirect，即self.redirect(self.get_argument(&amp;#39;next&amp;#39;, &amp;#39;xxxxx&amp;#39;))，其中xxxx一般为/。&lt;/div&gt; &lt;/pre&gt;&lt;/span&gt;&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/327183147596242758/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/327183147596242758' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/327183147596242758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/327183147596242758'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/07/tornadowebauthenticated.html' title='tornado.web.authenticated是怎么判断的？'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-151452396043806124</id><published>2010-07-29T20:44:00.001+08:00</published><updated>2010-07-29T20:44:48.653+08:00</updated><title type='text'>removeslash和addslash</title><content type='html'>&lt;div&gt;很多web framework中对URL pattern的匹配遇到的最常见的问题就是末尾的&amp;#39;/&amp;#39;，比如定义了r&amp;#39;/books/([0-9]+)&amp;#39;，那么&lt;a href=&quot;http://xxx/books/123/&quot;&gt;http://xxx/books/123/&lt;/a&gt;就会报404网页找不到的错误；如果r&amp;#39;/books/([0-9]+)/&amp;#39;，那么&lt;a href=&quot;http://xx/books/123&quot;&gt;http://xx/books/123&lt;/a&gt;也会报404错，就是因为URLpattern最后的一个&amp;#39;/&amp;#39;字符的匹配问题。很多framework需要程序员自己处理request回来的path，tornado&lt;/div&gt; &lt;div&gt;提供了两个方便的decorator：removeslash和addslash，参见&lt;/div&gt;&lt;a href=&quot;http://github.com/facebook/tornado/blob/master/tornado/web.py&quot;&gt;http://github.com/facebook/tornado/blob/master/tornado/web.py&lt;/a&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/151452396043806124/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/151452396043806124' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/151452396043806124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/151452396043806124'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/07/removeslashaddslash.html' title='removeslash和addslash'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-4389555700509287019</id><published>2010-07-25T09:35:00.001+08:00</published><updated>2010-07-25T09:35:41.744+08:00</updated><title type='text'>donated是个人才</title><content type='html'>&lt;a href=&quot;http://yulewang.spaces.live.com&quot;&gt;http://yulewang.spaces.live.com&lt;/a&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/4389555700509287019/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/4389555700509287019' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/4389555700509287019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/4389555700509287019'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/07/donated.html' title='donated是个人才'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-2647420986949822599</id><published>2010-07-23T22:04:00.001+08:00</published><updated>2010-07-23T22:04:39.205+08:00</updated><title type='text'>《程序员》不够水准</title><content type='html'>从今年四月份开始订阅《程序员》，几乎每期都有很多错误，有文字错误，也有内容错误。开始没太在意，以为是偶然事件，后来发现CSDN这帮人可能已经习惯了，也可能从来没有人给他们反馈过。毕竟阅读群体的纠错能力很强，也大多没有那么吹毛求疵，比如看到Berkley DB知道它是什么意思，看到2^32顶多会心一笑。虽然读者很宽容，但是编辑不应该浪费读者的感情。今天下午认真看了《三联生活周刊》，人家那才是杂志。且不论内容，也不论排版，但是里面的插图就让人心悦诚服，一张算一张，不应付读者。再看看《程序员》，排版乱七八糟，一旦有中英文混排，英文基本惨不忍睹，插图的质量就更不敢恭维了，真是可惜了那张纸和彩墨了：这都是典型的IT民工做幻灯片的水准，以这种思路办杂志，实在想不通编辑们每天都在忙乎啥。&lt;div&gt; &lt;br&gt;&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/2647420986949822599/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/2647420986949822599' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/2647420986949822599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/2647420986949822599'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/07/blog-post_23.html' title='《程序员》不够水准'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-4220598110742419567</id><published>2010-06-21T15:42:00.000+08:00</published><updated>2010-06-21T15:43:01.148+08:00</updated><title type='text'>这个网站好</title><content type='html'>&lt;a href=&quot;http://academic.research.microsoft.com/&quot;&gt;http://academic.research.microsoft.com/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/4220598110742419567/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/4220598110742419567' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/4220598110742419567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/4220598110742419567'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/06/blog-post_21.html' title='这个网站好'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-7757763156179412054</id><published>2010-06-19T09:25:00.001+08:00</published><updated>2010-06-19T09:25:25.922+08:00</updated><title type='text'>世界杯主题歌</title><content type='html'>真好听。张学友的中文版也不错。&lt;p&gt;想起了世博会的抄袭歌曲，丢人。</content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/7757763156179412054/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/7757763156179412054' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/7757763156179412054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/7757763156179412054'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/06/blog-post_19.html' title='世界杯主题歌'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-294832560953358901</id><published>2010-06-02T19:39:00.002+08:00</published><updated>2010-06-05T11:29:33.997+08:00</updated><title type='text'>好文章</title><content type='html'>&lt;blockquote style=&quot;margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 26px;&quot;&gt;我已经忘记了怎么和他初次会面，以及他怎么能到 了北京。他到北京，恐怕是在《新青年》投稿之后，由蔡孑民先生或陈独秀先生去请来的，到了之后，当然更是《新青年》里的一个战士。他活泼，勇敢，很打了几 次大仗。譬如罢，答王敬轩的双簧信，&amp;ldquo;她&amp;rdquo;字和&amp;ldquo;它&amp;rdquo;字的创造，就都是的。这两件，现在看起来，自然是琐屑得很，但那是十多年前，单是提倡新式标点，就会 有一大群人&amp;ldquo;若丧考妣&amp;rdquo;，恨不得&amp;ldquo;食肉寝皮&amp;rdquo;的时候，所以的确是&amp;ldquo;大仗&amp;rdquo;。现在的二十左右的青年，大约很少有人知道三十年前，单是剪下辫子就会坐牢或杀头 的了。然而这曾经是事实。&amp;mdash;&amp;mdash;鲁迅《忆刘半农君》&lt;/span&gt;&lt;/blockquote&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/294832560953358901/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/294832560953358901' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/294832560953358901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/294832560953358901'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/06/blog-post_02.html' title='好文章'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-574934533390418861</id><published>2010-06-01T20:11:00.001+08:00</published><updated>2010-06-01T20:11:55.297+08:00</updated><title type='text'>关于翻译</title><content type='html'>实验室在翻译&lt;a href=&quot;http://www.amazon.com/Principles-Computer-System-Design-Introduction/dp/0123749573&quot; target=&quot;_blank&quot;&gt;Principles of Computer System Design: An Introduction&lt;/a&gt;，我负责前两章，刚刚完工。自己感觉，第一章和第二章的后半部分还可以，第二章的开头部分翻译得一般。最头疼的是有些术语国内没找到标准的叫法，自己译过来感觉很别扭。比如突生属性（emergent properties），扩展不相称（incommensurate scaling，实际上还有scale down的意义，刚开始翻译为缩放不相称，也不满意），前后原子性（before-or-after atomicity）。另一个比较费劲，但比较有意思的是第一章每页下面的那些名言。我尽量找到对应的中文原始翻译，如果发现译文特别烂，那一定是我没找到原文，自己硬上的。这些问题都是等着被拍的。&lt;br&gt;  &lt;br&gt;另外，第二章英文原版有不少错误， 如果看原文一定要参照&lt;a href=&quot;http://ocw.mit.edu/NR/rdonlyres/resources/RES-6-004Spring-2009/PartI/errata_part_i.pdf&quot;&gt;勘误表&lt;/a&gt;。值得佩服的是，本书的第一作者Prof. Saltzer已经退休了，正在老家颐养天年，每次半夜写信汇报错误，第二天一早一准能看到他的回信（前两章主要是他写的）。&lt;br&gt;&lt;br&gt; 这本书是由MIT CSE&lt;a href=&quot;http://web.mit.edu/6.033/www/&quot;&gt;入门课程&lt;/a&gt;的讲义总结而来，是对计算机系统工作原理和常见技术方法的非常高层的概括，对于只想了解思想方法而不打算深入实现细节的同学来说非常适合。听说复旦的臧老师是用此书做教材的，不知道国内其它高校如何，至少清华还没有启动。&lt;br&gt;&lt;br&gt;中文版年内开卖应该没有问题，不过就国内目前技术文献的翻译现状来看，还是建议尽量读原著。如果选择了中文版，就要多提建设性意见和建议，不要一味拍黑砖。什么时候国内的翻译不再是纯粹的市场驱动，或许我们就能像上世纪那样看到高质量的译著。&lt;br&gt;  </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/574934533390418861/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/574934533390418861' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/574934533390418861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/574934533390418861'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/06/blog-post.html' title='关于翻译'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-7499380961835715177</id><published>2010-05-29T14:20:00.001+08:00</published><updated>2010-05-29T14:20:50.998+08:00</updated><title type='text'>PPTP VPN 配置注意</title><content type='html'>前两天配置PPTP VPN，网上有很多中文配置教程，一步一步配置之后客户端却总是连接不上，甚是蹊跷。偶然上poptop官网看Troubleshooting才找到原因。&lt;br&gt;&lt;br&gt;大部分中文教程关于iptables部分都写到：&lt;br&gt;&lt;br&gt;iptables -A INPUT -p tcp -dport 1723 -j ACCEPT &lt;br&gt;&lt;b&gt;&lt;i&gt;iptables -A INPUT -p tcp -dport 47 -j ACCEPT &lt;/i&gt;&lt;/b&gt;&lt;br&gt; &lt;i&gt;&lt;b&gt;iptables -A INPUT -p gre -j ACCEPT &lt;br&gt;&lt;/b&gt;&lt;/i&gt;iptables -t nat -A POSTROUTING -s &lt;a href=&quot;http://192.168.8.0/24&quot;&gt;192.168.8.0/24&lt;/a&gt; -o eth0 -j MASQUERADE &lt;br&gt;&lt;br&gt;其中第二条命令是有错误的。PPTP的&lt;a href=&quot;http://poptop.sourceforge.net/dox/gre-protocol-unavailable.phtml&quot;&gt;FAQ&lt;/a&gt;中有如下两条说明：&lt;br&gt; &lt;blockquote style=&quot;margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;&lt;p&gt;&lt;b&gt;#2. Server firewall&lt;/b&gt;&lt;br&gt; &lt;/p&gt;&lt;ul&gt;         Make sure your PPTP server can recieve a connection on port 1723  and that protocol 47 is being allowed or forwarded.         &lt;p&gt;&lt;i&gt;If your PPTP server has iptables running&lt;/i&gt; &lt;/p&gt;&lt;p&gt;         iptables -A INPUT -p tcp --dport 1723 -j ACCEPT&lt;br&gt;         &lt;b&gt;iptables -A INPUT -p 47 -j ACCEPT &lt;/b&gt;&lt;/p&gt;&lt;p&gt;         &lt;i&gt;or if your PPTP server is behind a machine running iptables&lt;/i&gt; &lt;/p&gt;&lt;p&gt;         iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 1723 -j  DNAT --to SERVER_IP&lt;br&gt;         iptables -t nat -A PREROUTING -i eth0 -p 47 -j DNAT --to  SERVER_IP&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/ul&gt; &lt;p&gt;&lt;b&gt;#3. Protocol 47 NOT port 47&lt;/b&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;ul&gt;         This is a simple but extremely common problem.  Do not get &lt;i&gt;port  47&lt;/i&gt; confused with &lt;a href=&quot;http://rfc.net/rfc1701.html&quot;&gt;&lt;i&gt;protocol  47&lt;/i&gt;&lt;/a&gt;.  Opening port 47 on your firewall is not the same as  allowing &lt;a href=&quot;http://rfc.net/rfc1701.html&quot;&gt;protocol 47 or gre&lt;/a&gt;. &lt;/ul&gt;&lt;/blockquote&gt;二手资料太可怕。想起一个故事：&lt;br&gt;&lt;br&gt;&lt;blockquote style=&quot;margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;民国时期学者古直先生隐居庐山设帐授徒，杜宣等人去拜师求教。古直问他带了什么书，杜宣说只带了一部《辞源》，古直闻听大怒：&amp;ldquo;怎么我的学生用《辞源》？&amp;rdquo;杜宣回答：&amp;ldquo;学生我有不认识的字，不查《辞源》查什么？&amp;rdquo;古直听了更加愤怒：&amp;ldquo;怎么我的学生查《辞源》？&amp;rdquo;后来气氛缓和，古直才说：&amp;ldquo;做学问，不能靠二手货，不懂的字，要查《说文》、查《尔雅》、查《水经》&amp;hellip;&amp;hellip;要查这个字第一次出现的地方，这样才可靠。《辞源》这一类书是二手货，不可靠的。&amp;rdquo;&lt;br&gt; &lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/7499380961835715177/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/7499380961835715177' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/7499380961835715177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/7499380961835715177'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/05/pptp-vpn.html' title='PPTP VPN 配置注意'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-8337830119362929065</id><published>2010-05-28T20:40:00.001+08:00</published><updated>2010-05-28T20:40:55.697+08:00</updated><title type='text'>为什么Apple在中国高校流行不起来</title><content type='html'>前天听一个外国教授说，在美国所有的申请都可以用LaTeX来写，最后交PDF就OK了。&lt;br&gt;终于明白为什么中国的教授不用Apple了，否则他们90%的工作都得在虚拟机中完成。&lt;br&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/8337830119362929065/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/8337830119362929065' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/8337830119362929065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/8337830119362929065'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/05/apple.html' title='为什么Apple在中国高校流行不起来'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-33200808.post-8077798090665672774</id><published>2010-05-25T14:42:00.001+08:00</published><updated>2010-05-25T14:42:32.195+08:00</updated><title type='text'>四川又地震</title><content type='html'>&lt;a href=&quot;http://news.ifeng.com/mainland/detail_2010_05/25/1551920_0.shtml&quot;&gt;http://news.ifeng.com/mainland/detail_2010_05/25/1551920_0.shtml&lt;/a&gt;&lt;br&gt;&lt;br&gt;不让人活了&lt;br&gt; </content><link rel='replies' type='application/atom+xml' href='http://xueruini.blogspot.com/feeds/8077798090665672774/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/33200808/8077798090665672774' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/8077798090665672774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/33200808/posts/default/8077798090665672774'/><link rel='alternate' type='text/html' href='http://xueruini.blogspot.com/2010/05/blog-post_25.html' title='四川又地震'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>