<?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: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-898049633712407853</id><updated>2011-12-06T21:05:04.599+08:00</updated><category term='杂碎'/><category term='程序'/><category term='御宅'/><category term='代码'/><category term='八道'/><category term='网络'/><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://otnth.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>83</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-2574090604663490848</id><published>2011-09-06T05:05:00.002+08:00</published><updated>2011-09-06T05:35:17.955+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>EmEditor v11 Chinese Language Pack</title><summary type='text'>前些日子收到EM作者的信，说v11要发布了，问我可不可以做一下汉化。有点奇怪他们为什么又找上我，不过既然在blog上说过以后会持续更新，所以还是弄一下吧。

汉化包已经寄过去了，会不会被采用我也不知道，有在用v11 beta版的同学倒是可以我做的这个。不管官方采不采用，咱这边还是老样子，有发现什么问题的话请留言，我会更新的。

下载地址：

http://www.box.net/shared/l0pqesq9aaz3bs4q9eck</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/2574090604663490848/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2011/09/emeditor-v11-chinese-language-pack.html#comment-form' title='8 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2574090604663490848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2574090604663490848'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2011/09/emeditor-v11-chinese-language-pack.html' title='EmEditor v11 Chinese Language Pack'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6615315812547071974</id><published>2011-02-13T01:57:00.003+08:00</published><updated>2011-09-18T12:47:39.285+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Miranda上GTalk的隐身问题</title><summary type='text'>用Miranda上GTalk有挺长一段日子了，隐身的功能一直有问题。虽然GTalk上的朋友没有很烦人的那种，所以对这个功能需求并不强烈，不过每每想起还是有一点疙瘩在。前些天乱逛的时候看到一些相关资料，这几天零零碎碎又作了一些尝试，算是知道这是怎么一回事了吧…

Jabber/XMPP关于隐身的规范有三个，分别是：


XEP-0018: Invisible Presence
XEP-0126: Invisibility
XEP-0186: Invisible Command


按照规范文本的说法，XEP-0018已被拒绝，而XEP-0186又被推迟，目前只有XEP-0126是受XMPP委员会认可的规范。然而不知道出于什么原因，GTalk三个规范都没有采用，而是自己定义了一个google:shared-status的扩充规范来实现这个功能。

（evil不evil的，有人提到GTalk</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6615315812547071974/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2011/02/make-gtalk-invisible-work-in-miranda.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6615315812547071974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6615315812547071974'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2011/02/make-gtalk-invisible-work-in-miranda.html' title='Miranda上GTalk的隐身问题'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-5384490666086937593</id><published>2011-02-06T04:24:00.001+08:00</published><updated>2011-02-06T05:04:30.397+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>我该感到自豪么…</title><summary type='text'>EmEditor更新到了v10.0.5，除了例行的bug修复外，也第一次加入了官方的简体中文语言文件——当然，不是我做的那个。

本想着这是件好事儿，大陆的同学们从此以后等破解就好，不用再等汉化了。可是抓回来看了看发现，官方的翻译也太有爱了些：“Use Regular Expressions”翻译成“常用查找方式”，“Search Only Word”则是“只查找word文档”。原以为我英文够烂了，看来还妄自菲薄了一点点…

除非有做汉化的人正好也用EM，否则以后应该不会有人再做EM汉化了吧，毕竟都有官方版了。好在我做的v10都能用，将就先对付着吧。至于v11出来之后，呃，到时候再说…</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/5384490666086937593/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2011/02/should-i-pride-myself.html#comment-form' title='11 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5384490666086937593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5384490666086937593'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2011/02/should-i-pride-myself.html' title='我该感到自豪么…'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-1231414699775525023</id><published>2010-12-29T21:56:00.002+08:00</published><updated>2010-12-29T22:27:14.005+08:00</updated><title type='text'>RGD - libgd binding for Ruby</title><summary type='text'>前些日子在硬盘里乱逛，看到以前写的那一堆半成品，突然觉得自己还蛮不负责的。想说挑一些别人可能用得上的稍微整理一下吧，也算是给自己一个交待吧…

Ruby图片处理一直以来似乎都是用ImageMagick，可这东西即使没有内存泄漏的问题也显得过于庞大了，而且Win32下gem装上的包会把Ruby目录搞得非常恶心，所以一年多以前我根据只支持1.8的Ruby/GD改了一个出来用。

因为Ruby API在IO的部分变化大了点，再加上我对图片处理以及GD其实不熟，后来改着改着就完全重写了一遍。但因为代码并不是集中在一个时间段内完成的，所以还是会有些乱。好在就是这次整理没太偷懒，至少把libgd官方的文档都搬了过来，好歹算有点样子了吧。

代码托管在github：https://github.com/oTnTh/rgd

安装可以直接用gem：gem install rgd

用Windows</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/1231414699775525023/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/12/rgd-libgd-binding-for-ruby.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1231414699775525023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1231414699775525023'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/12/rgd-libgd-binding-for-ruby.html' title='RGD - libgd binding for Ruby'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6213944709338612177</id><published>2010-11-17T01:05:00.002+08:00</published><updated>2010-11-17T17:48:39.253+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>微软NLS文件格式</title><summary type='text'>最近一直在纠缠Ruby的字符串编码问题，其中就涉及到了CP936、CP950和CP951等代码页的码表。想说与其去翻不知道靠谱与否的资料，不如直接从系统里的NLS文件中提取数据，这又牵涉到了NLS的文件格式问题。

网上能找到的NLS文件格式信息很少，Konstantin Kazarnovsky童鞋在2002年写的一篇是其中最详细的了。不过比对一下c_936.nls等双字节编码发现，那篇东西错处还是不少，表格也很不知所云。于是打开WinHex猜了老半天，算是有了一点成果吧。

注：NT和非NT系统的NLS文件格式有所不同，下面的内容只适用于NT系统内的NLS文件。

以下是文件头信息，还蛮简单的：




地址
字节长
备注




0x00
2
文件标志，NT内的NLS应为0x000D（注一）


0x02
2
代码页，如936


0x04
2
1表示单字节编码，2表示双字节编码

</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6213944709338612177/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/11/microsoft-nls-file-format.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6213944709338612177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6213944709338612177'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/11/microsoft-nls-file-format.html' title='微软NLS文件格式'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-4075811618358258805</id><published>2010-11-14T01:39:00.000+08:00</published><updated>2010-11-17T06:11:26.700+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Encoding，还是Encoding</title><summary type='text'>话说，上次发现台湾用big5-uao很多，于是和某台湾人士讨论了一下，而下面要说的问题就是在讨论过程中遇到的。

嗯，该问题虽然还是跟Encoding有关，不过这次倒不能说是Ruby的错。

以下是代码：


require 'mechanize'

agent = Mechanize.new
# 请自备梯子
agent.set_proxy('127.0.0.1', '8118')
# 该页面有用big5-uao编码的字符串
url = 'http://www.ptt.cc/man/Japanese-B95/index.html'
page = agent.get(url)
t = page.root.css('#finds &gt; p')[0]

puts t.text.encoding
p t.text
p t.text.encode('gbk')
puts </summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/4075811618358258805/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/11/encoding-still-encoding.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/4075811618358258805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/4075811618358258805'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/11/encoding-still-encoding.html' title='Encoding，还是Encoding'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-2945113609475629496</id><published>2010-11-07T16:16:00.003+08:00</published><updated>2010-11-07T16:21:19.580+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Encoding，又是Encoding</title><summary type='text'>话说，前几天在用Ruby的Mechanize抓一个台湾网站的时候，又遇到了一系列令人无语的事情。详细的过程我就不复述了，以下只是精简版。

假设我们用如下脚本：


agent = Mechanize.new
page = agent.get(url)
puts page.root.inner_html.encode('gbk') if page.root.css('#ln2').length == 0


去抓这么一个HTML页面：


&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=big5" /&gt;
&lt;title&gt;TT&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;p id="ln1"&gt;豬八戒照鏡子——裏外不是人&lt;/p&gt;
&lt;p id="ln2"&gt;／</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/2945113609475629496/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/11/encoding-encoding-again.html#comment-form' title='10 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2945113609475629496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2945113609475629496'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/11/encoding-encoding-again.html' title='Encoding，又是Encoding'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8195064343221343375</id><published>2010-10-30T02:01:00.013+08:00</published><updated>2010-11-02T16:35:10.732+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Let's SSH</title><summary type='text'>28号的时候SSHChina又断了整整一天，无法，只好在网上找个临时的。翻了一下，发现Paying.org.ru还不错，只是会半个小时就修改密码并且断线一次。Bitvise Tunnelier蛮好用，但是每半个小时就打开浏览器再复制粘贴，也太折磨人了。

网上现成的脚本大多不是Windows里可以用的，而且也处理不了密码会变的问题，所以就自己写了个。这个脚本比较适用于频繁修改密码的SSH帐户，登陆信息固定那种还是用Bitvise Tunnelier吧。

话说，每次为了方便给别人用而逼不得已写VBScript或者JavaScript的时候我都在想，Windows要是内置一套Ruby该多好……

将以下内容保存为letsSSH.js，再去下一个Plink放到同一个目录，双击letsSSH.js即可。


function lets_ssh(ask_for_account) {
    </summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8195064343221343375/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/10/lets-ssh.html#comment-form' title='6 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8195064343221343375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8195064343221343375'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/10/lets-ssh.html' title='Let&apos;s SSH'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-2900014555562067879</id><published>2010-10-18T09:49:00.004+08:00</published><updated>2010-10-18T14:01:50.194+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>SSL证书制作</title><summary type='text'>证书签名方案

使用OpenSSL制作证书其实还蛮简单的，只是证书签名的部分有一点复杂，方法有三：


交由受浏览器信任的第三方证书颁发机构签名；
自签名；
自制CA证书并用其签名。


对于上线运营的网站来说，第一个方案是首选，因为只有这样浏览器才不会报警。过去买证书很贵，现在倒是有免费的了，比如IE和Firefox都内置的StartSSL。

不同的证书颁发机构对于证书生成多少都会有自己的要求，所以本文主要讨论后两种方案。

自签名证书

注：下面提到的很多命令都需要一个openssl配置文件，该文件一般名为openssl.cnf。Linux里一般不用管，Windows可使用参数config指定路径，使用环境变量OPENSSL_CONF也可以。

使用如下命令即可生成自签名证书：

openssl req -x509 -newkey rsa:1024 -nodes -days 365</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/2900014555562067879/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/10/make-ssl-certificate-by-openssl.html#comment-form' title='2 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2900014555562067879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2900014555562067879'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/10/make-ssl-certificate-by-openssl.html' title='SSL证书制作'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-5693355962943720864</id><published>2010-10-16T21:57:00.004+08:00</published><updated>2010-10-16T22:30:38.811+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='御宅'/><title type='text'>《植物大战僵尸》之我圆满了…</title><summary type='text'>首先是有钱就能办到的，两个方向各11种颜色的金盏花。

若说是彩虹金字塔吧，其实也挺像张开双臂躺下的人……



水生植物就3种。呃，十字固定？



夜生植物8种。

队形怎么排纠结了一下，最后就这个了。

朵朵红花向太阳……



最后，也是最花时间的，日常植物27种。

向左看齐向右看齐的貌似都有人收集过，我就弄了一个向左看向右看……

</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/5693355962943720864/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/10/plants-vs-zombies.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5693355962943720864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5693355962943720864'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/10/plants-vs-zombies.html' title='《植物大战僵尸》之我圆满了…'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kg2JKUUiY_g/TLm1fqrhK3I/AAAAAAAAAFE/rqam9eg_XJQ/s72-c/garden-04.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-5309749332253444158</id><published>2010-09-15T15:49:00.002+08:00</published><updated>2010-09-16T19:00:19.240+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>SImages</title><summary type='text'>协助用户保存当前页面图片的Firefox扩展。用处的话，你们懂的。

好吧，其实就是Imagez在Firefox上的实现。嗯，初步的。

至于写这个东西的理由，马桶2愈加老旧，遨游却把少得可怜的开发力量都扔到了马桶3上面。而Chrome的API是相当有限的，SImages的功能在Chrome内无法实现。

我之前其实根本没怎么用过Firefox，主要是对Firefox当初的恐吓式营销（安全，安全，像不像如今360的措辞？）相当不感冒，这自然也是我第一次写Firefox扩展。

感觉嘛，Firefox的扩展系统的确蛮强大，不过莫名其妙的小毛病也不少。（打开代码看看我写的那一大堆注释就知道了。）

有问题欢迎留言。

http://www.boxcn.net/shared/tpizij8ea2

v0.1 - 2010-9-15


实现基本功能
不会JS的话，设置内的东西就表乱改了


</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/5309749332253444158/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/09/simages.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5309749332253444158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5309749332253444158'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/09/simages.html' title='SImages'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8001753330711774938</id><published>2010-07-06T20:27:00.002+08:00</published><updated>2010-07-23T04:26:22.683+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>手贱</title><summary type='text'>前两天试了试Blogger的导入和导出功能，今天才发现就这么一试导致链接地址全变了。PR什么的我倒是不在乎，可看着也挺不舒服的。Blogger后端没有修改POST URL的功能，API里也没有。等空了找找看有没有什么办法吧，不过暂时只能这么放着了。

要是有人链到我这儿，对不起先。

Update：

折腾了一下，总算是解决了这个问题，部分解决。

首先，打开导出的XML文件，检查每一个entry元素的link子元素，确保href是你想要的。接着写一个脚本，将entry的title子元素改成链接的文件名部分。这里跟直接发帖一样，不改的话Blogger会根据entry的title给你自动生成一个。


# coding: UTF-8
require 'rexml/document'

doc = REXML::Document.new(File.open(ARGV[0], 'r'))

</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8001753330711774938/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/07/fml.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8001753330711774938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8001753330711774938'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/07/fml.html' title='手贱'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-3956218216946031156</id><published>2010-07-04T16:21:00.003+08:00</published><updated>2010-08-31T00:31:45.935+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>EmEditor v10 Chinese Language Pack</title><summary type='text'>我已经尽可能保证翻译的准确和统一了，不过汉化这东西还挺费神的，差错在所难免。如果有发现错别字在内的任何错误，烦请留言告知。

已经寄给官方了，只是不知道会不会被采纳。不过大陆这边过几天应该就会出现所谓汉化版了吧，应该也不会有人在乎。

Update：弄好这东西之后，本来也没想到处去嚷嚷。可既然费那么大劲儿，还是希望多一点人能用得上。在精品绿色便携软件上看到了一篇EmEditor Professional 10.0.0 简体中文便携版，于是就留言提了一句。

既然有可能会散布开来，难免要多说几句。从Windows 98开始用EmEditor，前前后后见过很多个不同版本不同前辈做的语言包。这个这里翻得不对，那个那里翻译得不好（完全没有抱怨的意思，自己弄一次就知道这东西有多麻烦了），改来改去换来换去，我曾经用过的语言包的作者究竟是谁我也说不清楚了。不过可以肯定的是，我所做的语言包，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/3956218216946031156/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/07/emeditor-v10-chinese-language-pack.html#comment-form' title='15 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3956218216946031156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3956218216946031156'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/07/emeditor-v10-chinese-language-pack.html' title='EmEditor v10 Chinese Language Pack'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-1057817084700314841</id><published>2010-03-18T06:39:00.000+08:00</published><updated>2010-07-23T02:36:36.440+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>Opera Mini翻墙笔记</title><summary type='text'>一直在用的某一个Opera Mini 4.2修改版突然不能爬墙了。本不想折腾，可实在是被各种“优化”过的皮肤刺激得不轻，于是花了点时间，有了这一篇笔记。

自从Opera Mini国际版服务器封掉所有来自大陆IP的请求后，要用OPM翻墙就需要解决两个问题：首先是找一个，或者自己搭一个中继服务器；其次是将OPM程序中原来的服务器地址改掉。

网上别人搭好的中继服务器很多，几乎全用的是opm-server-mirror。验证一个中继服务器是否可用很简单，只要在服务器地址最后加上“/?test=1”（例如：http://xx.oo.com/opm/?test=1）并用浏览器访问，如显示“Hello Opera Mini Server! Fuck GFW!”    则表示中继服务器工作正常。

要求不高的话，用别人搭好的中继服务器也没啥，可这样会存在一个严重的安全隐患。因为OPM</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/1057817084700314841/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/03/fack-gfw-with-opera-mini.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1057817084700314841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1057817084700314841'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/03/fack-gfw-with-opera-mini.html' title='Opera Mini翻墙笔记'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-7148614530362820291</id><published>2010-01-21T20:09:00.000+08:00</published><updated>2010-07-23T02:36:38.234+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Ruby版SendKey</title><summary type='text'>VBScript中的SendKey是个很有用的方法，可以用代码实现一些简单的自动化操作。实际上，通过SendMessage发送WMKEYDOWN和WMKEYUP消息就可以实现同样的功能。而且这个办法可以向任意窗口发送消息，目标窗口并不需要具有焦点。

从MSDN可以查到，WM_KEYDOWN和WM_KEYUP消息除了virtual-key code之外，还需要一个scan code。文档只说这个值根据不同的键盘会有所不同，但如何获得这个值却没有提。

好吧，这篇东西值得看的其实也就这一点点了，那就是：MapVirtualKey

以下程序是我用No$gba玩《恶魔城·苍月的十字架》时写来刷25号怪的，该作的魂系统实在太变态，不想点办法我会有一种被游戏玩了的感觉。还别说，有一种当年玩MUD的感觉。


require "Win32API"

module Win32
  </summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/7148614530362820291/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/01/sendkey-of-vbscript-in-ruby.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7148614530362820291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7148614530362820291'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/01/sendkey-of-vbscript-in-ruby.html' title='Ruby版SendKey'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-206009079766650278</id><published>2010-01-08T00:18:00.000+08:00</published><updated>2010-07-23T02:36:40.117+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>Windows 7 IPv6不完全折腾</title><summary type='text'>按照网上很多人的说法，Windows 7下只需要开一个有管理员权限的控制台，执行类似如下两条命令即可：


netsh interface ipv6 isatap set router isatap.tsinghua.edu.cn
netsh interface ipv6 isatap set state enabled


然而很奇怪的是，ipconfig显示我已经有了一个2001开头的IPv6地址，ipv6.google.com却打不开。试了很多个isatap服务器都不行，正像只没头苍蝇一样在网上乱逛的时候，鬼使神差地敲了一句ping -6 ipv6.google.com。呃，居然有回复？！然后试着在浏览器里访问http://[2001:4860:c004::68]，还真的可以打开……


C:\&gt;nslookup www.kame.net
服务器:  </summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/206009079766650278/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/01/setup-ipv6-in-windows-7.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/206009079766650278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/206009079766650278'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/01/setup-ipv6-in-windows-7.html' title='Windows 7 IPv6不完全折腾'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-3658335324446363670</id><published>2010-01-04T07:53:00.000+08:00</published><updated>2010-07-23T02:36:42.065+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>初尝黑苹果</title><summary type='text'>最近手上多出来一块160G的硬盘，拿来干什么都太小，突然想起来还有黑苹果这种东西，正好对传说中Windows的GUI+Linux的Console很有兴趣，于是装上试了试。

手上没有刻录机，安装过程参考了远景论坛的这张帖子，基本没有遇到太大的问题，不过一些小地方还是耗费了不少精神。

Boot Think 2.3.18在OS X中安装至MBR无法引导，Chameleon 2.0 RC4虽然可以安装，但是有部分KEXT又会无法加载。最后索性多分了一个区装上Windows XP，把Boot Think放在Windows分区上。反正现在用的Windows 7也有部分软件表现不良，就当备用吧。

驱动方面方面，我用了如下这些KEXT：AppleNForceATA、ElliottForceLegacyRTC、fakesmc、NullCPUPowerManagement、</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/3658335324446363670/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2010/01/note-of-hackintosh-installation.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3658335324446363670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3658335324446363670'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2010/01/note-of-hackintosh-installation.html' title='初尝黑苹果'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8886236256921792173</id><published>2009-11-19T01:13:00.000+08:00</published><updated>2010-07-23T02:36:45.485+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>eD2k Hash in Ruby</title><summary type='text'>很久以来一直都以为eD2k Hash就是MD4（罪魁祸首），这几天才发现错得很离谱。

花了点时间查资料，写了个用以生成eD2k链接的模块，包括AICH部分。代码有个偷懒的地方，读取文件的缓存大小必须为PART_SIZE，如果要拿去用的话请留意。Ruby 1.8.6和1.8.7的File.size在Windows平台下有bug，当文件尺寸比较大时会返回负数，这一点也请留意。

部分代码移植自pyaich和Python的Base64模块，GPL许可证。


require 'openssl'

module OtNtH
  module Digest
    # fit for eD2k Hash
    PART_SIZE = 9_728_000
    BLOCK_SIZE = 184_320

    class ED2K
      def initialize
        @</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8886236256921792173/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/11/ed2k-hash-in-ruby.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8886236256921792173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8886236256921792173'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/11/ed2k-hash-in-ruby.html' title='eD2k Hash in Ruby'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-2125198208415534948</id><published>2009-09-19T17:55:00.000+08:00</published><updated>2010-07-23T02:36:47.443+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>小改ImageZ</title><summary type='text'>从网上抓图，Imagez是个很不错的程序。可是在该程序在选择保存目录的时候，无法设置起始目录，也不能直接输入已存在路径，只能从我的电脑开始一级一级点。虽然官网上说0.7Final会提供该功能，可一年半后的现在版本号都0.82了却仍然没有兑现，说不得只好自己想办法了。

选择目录的API函数是SHBrowseForFolder，通过LPBROWSEINFO的pidRoot和ulFlags两个成员可以实现我上面说到功能。pidRoot没办法，ulFlags只需要加上BIF_EDITBOX即可，这倒是可以动动脑筋。

用UPX解压后再用FileInfo查看可得知，ImageZ是用VB6写的。而VB6调用外部API都是动态载入DLL，用W32DASM静态分析会比较困难，所以还是请出大神OllyDbg。

在OllyDbg中打开ImageZ.exe，F9执行。Alt+E，找到shell32双击。</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/2125198208415534948/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/09/imagez-hacking.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2125198208415534948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2125198208415534948'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/09/imagez-hacking.html' title='小改ImageZ'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8536279297748712293</id><published>2009-09-18T15:09:00.000+08:00</published><updated>2010-07-23T02:36:49.121+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>ActiveScriptRuby和RubyInstaller的兼容性问题</title><summary type='text'>近来一直在用Luis做的RubyInstaller，这个版本的Ruby用Mingw编译，比VC6编译的快了很多。而且Mingw和VC6编译出来的东西都依赖msvcrt.dll，也算解决了Ruby极端讨人厌的DLL文件名问题。

可是RubyInstaller却跟Arton写的ActiveScriptRuby有兼容性问题，regsvr32无法注册库文件，提示“找不到指定的程序”。

用dumpbin检查了一下，Arton发布的ActiveScriptRuby从msvcrt-ruby191.dll中导入了一个vsnprintf函数，但该函数在Mingw编译的msvcrt-ruby191.dll中并不存在。

抓来ActiveScriptRuby的代码，将win32oleex.cpp第568行的vsnprintf改为_vsnprintf，使用VC6版本的include和lib文件编译通过。

</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8536279297748712293/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/09/activescriptruby-and-rubyinstaller.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8536279297748712293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8536279297748712293'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/09/activescriptruby-and-rubyinstaller.html' title='ActiveScriptRuby和RubyInstaller的兼容性问题'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-3566616792071176418</id><published>2009-08-15T08:55:00.000+08:00</published><updated>2010-07-23T02:36:53.239+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>Tumblr vs Publr</title><summary type='text'>现在才写似乎有些Out了，不过我的确是最近才开始用类似的东西。因为就是用来贴图而已，所以我只关注了这两家网站关于贴图的相关功能。

因为墙的关系，最先开始用的是Publr。本以为作为Tumblr的后来者，功能方面应该较弱才对，结果用了一段时间发现事实并非如此。Publr可以自定义Theme，网站提供的三款也都是设计优良的作品。发布照片的界面也很好用，能够一次选择多张图片，并且在上传的时候去写文字内容。基本上我介意的核心功能，Publr都能很好地提供。

要说缺点，不能设置Post发布时间算一个，无法调整Photoset顺序也算一个，不过都还可以忍受就是。真正让我起意尝试其他相似服务的原因并不在于功能，而是出于对数据安全性的担心。

Tumblelog，看名字就知道，这一类网站Tumblr肯定才是老大，Publr是否能找到自己的位置？上线有一年了吧，我只用了月余就抓出了三个Bug，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/3566616792071176418/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/08/tumblr-vs-publr.html#comment-form' title='2 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3566616792071176418'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3566616792071176418'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/08/tumblr-vs-publr.html' title='Tumblr vs Publr'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-5037888266828320778</id><published>2009-08-06T01:22:00.000+08:00</published><updated>2010-07-23T02:36:54.721+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>利用GAE实现Twitter短信通知</title><summary type='text'>简介

随着国内Twitter Clone集体被自杀，利用叽歪绑定飞信，通过手机短信获取Twitter更新的法子就失效了，于是我再一次开始折腾。

这次用到的东西包括cocobear写的PyFetion、Yahoo Pipes和Google App Engine。基本思路就是利用GAE的Cron功能定时检查Yahoo Pipes抓取的RSS，如果有新的东西就用PyFetion给自己的手机发短信。

除了Twitter，这个程序可以用来做的事情挺多，比如接收实时天气预报之类，各位可以自由发挥。

安装及使用说明

由于PyFetion、FeedParser等第三方库都采用GPL许可证发布，所以我的代码也使用GPL v2许可证，使用及再发布请留意相关限制。

代码放到Github上了，下载请走这里，点击download即可获得最新源文件的压缩包。

我并没有为本程序单独建立一个代码仓库，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/5037888266828320778/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/08/push-rss-to-mobile-sms.html#comment-form' title='10 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5037888266828320778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5037888266828320778'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/08/push-rss-to-mobile-sms.html' title='利用GAE实现Twitter短信通知'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-7746051162183251057</id><published>2009-07-01T05:38:00.000+08:00</published><updated>2010-07-23T02:36:56.803+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='物件'/><title type='text'>N78印象</title><summary type='text'>在刚发布的时候，Nokia N78就吸引到了我的注意力，只是手上的SE K750一直都没坏，所以就一直都没换。月前花了1600大洋将其捧回，就这一段时间的使用感受来说，印象其实不太好。

2008年5月N78上市时要价3500以上，一年间跌去2000，入手时间应该说没什么问题。尺寸方面虽然比K750大了很多圈，不过放牛仔裤兜里也还好。长条形按键适应良好，没我想象中的难用。价格和外观我都基本满意。

（这篇写得我相当没兴趣，连一个我非常在意的缺点都忘记说了：手汗重的同学谨慎考虑指纹机，很恶很麻烦。）

最不爽的是续航时间。我的电话非常少，如果不用其他功能，N78也就能撑两天多。要是开了WIFI上网，半天时间就可以把电池耗光。而K750即使偶尔听听广播，一次充电差不多也可以用一周。N78如此表现，实在有点差强人意。

另一个很不爽的地方是WIFI的兼容性。我的无线路由是当年也很便宜的腾达</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/7746051162183251057/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/06/impressions-of-nokia-n78.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7746051162183251057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7746051162183251057'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/06/impressions-of-nokia-n78.html' title='N78印象'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6039771451255446832</id><published>2009-06-07T17:37:00.001+08:00</published><updated>2011-01-08T07:00:19.672+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>公历农历互转的Ruby实现</title><summary type='text'>网上只能找到公历转换到农历的程序，反过来的Ruby实现似乎没有，所以就自己写了个，取名rbCCal。程序采用查表法，大约能实现公元1900年至2100年间200年的公历和农历互转。

数据部分出自Zhuo Meng的CCAL，该程序用GPL发布，所以rbCCal也用GPL发布。

代码放在Github。其实觉得Google Code会更靠谱些，个人用SVN和Git也不会有太大区别。可这个站是Ruby写的，而且还很漂亮。

另，因为Github只支持ASCII和UTF-8，为了能在网站上显示中文，我只好将代码存成了UTF-8，这样在Windows里直接用就会有问题。需要的话请将代码保存为GBK，或者重载LunarDate类。

下载请往这边走：https://github.com/oTnTh/ccal


require 'ccal'

l = Time.now.to_lunar()
</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6039771451255446832/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/06/rbccal-ruby-chinese-calendar-library.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6039771451255446832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6039771451255446832'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/06/rbccal-ruby-chinese-calendar-library.html' title='公历农历互转的Ruby实现'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8400552237384880785</id><published>2009-06-04T22:59:00.000+08:00</published><updated>2010-07-23T02:37:00.874+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>Mobile Over The Cloud</title><summary type='text'>Apple MobileMe和Microsoft MyPhone都只支持特定平台，所以我的手机没法用，features倒是看起来很诱人。

Nokia Ovi用的是SyncML协议，理论上应该很多手机平台都支持。不过同步使用的密码需要以OTA的方式获得，非塞班手机能不能用没试过。支持同步通讯录、日历和记事本，貌似不错，可是服务器经常停机，频繁到影响使用的程度。

Google Sync则SyncML和ActiveSync两种协议都支持，S60上自然是用SyncML。有Google帐户就可以直接使用，能同步通讯录和日历。

因为我还没有忙到需要用计算机管理日程的程度，所以比较关注的只有通讯录一项。Ovi既然是Nokia出的，似乎应该对自家手机支持比较好才对，事实上也不尽然。

我先试了Google Sync，发现其不支持生日和备注字段。接着再试Ovi，生日备注是支持了，可是“手机（家庭）”</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8400552237384880785/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/06/mobile-over-cloud.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8400552237384880785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8400552237384880785'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/06/mobile-over-cloud.html' title='Mobile Over The Cloud'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-1136513792791071042</id><published>2009-05-29T21:05:00.000+08:00</published><updated>2010-07-23T02:37:02.837+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Side-Effect</title><summary type='text'>近来说FP（函数式语言）很好很强大的人越来越多了，只是因为没需求，所以就一直没动力去学。也正是因为这样，我对副作用、引用透明之类的概念总是不甚了了。昨晚忍不住拽了一位童鞋聊了聊，算是有了点收获吧。

首先是引用透明，某童鞋的说法是：引用透明就是可以用函数的返回值代替函数的调用。

我觉得的这样的说法并不完整，于是写了这样一段代码问他：


int x;

int fa(int m, int n) {
  x = m + n;
  return x;
}

int fb(int z) {
  return x + z;
}


他说fa函数不算引用透明，因为用fa的返回值代替函数调用后，整个程序的运行结果会发生变化。可问题是，如果fb从来没调用过，且没有在其他地方读写过全局变量x的值呢？

于是试着总结一下，一个引用透明的函数，似乎应该满足以下三个条件：


只通过传值调用输入数据；
</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/1136513792791071042/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/05/side-effect.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1136513792791071042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1136513792791071042'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/05/side-effect.html' title='Side-Effect'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-4610090445392369248</id><published>2009-05-28T05:28:00.001+08:00</published><updated>2011-03-08T22:59:39.174+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>AMR Plugin For Winamp &amp; foobar2000</title><summary type='text'>好吧，我快要叛变了。又写了个foobar2000的AMR插件，下载链接等在文末。

KMplayer就可以放AMR，但启动太慢了。foobar2000早就有相关插件，问题是歌词外挂支持不良。惦记了很久Winamp的AMR插件一直没出现，今天终于自己写了一个。

（从*UIX系统来的不算，命令行工具不算，Winamp是我现在还常用的辈分最老的程序了，总觉得有那么点英雄迟暮的味道。）

AMR由rfc3267定义，网上最容易找到的实现是3GPP发布的3GPP TS 26.104（AMR-NB）和3GPP TS 26.204（AMR-WB）。

由于写这个插件就是为了播放手机录制的音频文件，而手机录制的音频文件全部都是AMR-NB IF1格式，所以这个插件目前只实现了AMR-NB IF1的解码功能。ETSI和IF都没有文件头，应该不是设计给独立文件用的。至于AMR-WB，以后遇到了再说吧。

</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/4610090445392369248/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/05/amr-plugin-for-winamp.html#comment-form' title='7 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/4610090445392369248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/4610090445392369248'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/05/amr-plugin-for-winamp.html' title='AMR Plugin For Winamp &amp;amp; foobar2000'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6530432563916041435</id><published>2009-05-26T01:43:00.000+08:00</published><updated>2010-07-23T02:37:06.321+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Build Ruby With ICC</title><summary type='text'>前些日子试图用WinDDK编译Ruby失败，不过却一直惦记着。这两天突然想起，天底下除了VC和GCC，还有一个叫Intel C++ Compiler的东西，于是就试了试。

我用的ICC是v10.1.021版，虽然v11早就有了，可看起来新版本不再支持VC6了的样子，所以只好用旧版。

正常运行configure.bat，打开生成的Makefile，在最后一句include前面加上如下三行：


CC = icl
CPP = icl
LDFLAGS = -incremental:no -debug -opt:ref -opt:icf /nodefaultlib:libmmd.lib


最后一句的nodefaultlib是为了去掉对libmmd.dll的依赖，虽然据说会快一点，不过能少一个库也是好的。

编译过程没出什么问题，除了编译速度很慢很慢以外。ZLib和PDCurses用ICC</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6530432563916041435/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/05/build-ruby-with-icc.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6530432563916041435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6530432563916041435'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/05/build-ruby-with-icc.html' title='Build Ruby With ICC'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-1458432350171550727</id><published>2009-05-21T20:17:00.000+08:00</published><updated>2010-07-23T02:37:08.133+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Ruby中的负数整除问题</title><summary type='text'>Ruby中两个整数相除，其结果为整数，例如1/2为0，7/3为2。这跟C是一样的，所以我一直以为Ruby的除法运算跟C是一回事。前些日子移植一个C程序时结果出错，这才发现自己又想当然了。在Ruby中，-7/3不等于-2，而是-3。

翻书，《The Ruby Programming Language》有提到这个问题。书中解释，Ruby作整除运算时对结果进行向下（负无穷大）取整，而C则是向零取整。相应的，Ruby中-7%3的结果就是2，而非-1，想来这样的结果是为了满足(a/b)*b+(a%b)=a这一等式。

C当然也可以进行向下取整，函数名为floor。近似地，向上（正无穷大）取整的函数名则叫ceil。Ruby中也有同名的两个取整方法，若想在Ruby中进行向零取整，需要调用truncate方法，而想获得跟C一样的求余结果则要用remainder方法。

仔细想想，总觉得Ruby</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/1458432350171550727/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/05/negative-division-in-ruby.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1458432350171550727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1458432350171550727'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/05/negative-division-in-ruby.html' title='Ruby中的负数整除问题'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-4183363003465089108</id><published>2009-04-29T23:14:00.000+08:00</published><updated>2010-07-23T02:37:10.045+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>VC2008链接MSVCRT.DLL不完全折腾</title><summary type='text'>Ruby在Windows上有一个很讨厌的问题，其动态链接库文件名中包含了CRT库的文件名。例如用VC6编译的Ruby 1.8.6库名为msvcrt-ruby18.dll，而VC2008编译的则叫msvcr90-ruby18.dll。网上能找到的Ruby C库几乎都是用VC6编译的，如果你用的Ruby不是VC6编译的那就没法用。

造成这个问题的主要原因是不同版本VC的CRT库不兼容，ERRNO、alloc、free等在不同版本的CRT中混用会出问题。虽然这些问题似乎都可以绕过去，可Ruby社区的大牛小牛都不太喜欢搭理Windows的样子。总之现状就是，要么老实用VC6，要么所有东西都自己编译一遍。

我为啥会对这个问题有兴趣？因为新版本的VC编译出来的东西通常情况下会快一点，例如Ruby 1.9.1中的dl模块，VC2008编译出来的代码比VC6编译的至少要快50%。

</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/4183363003465089108/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/04/linking-with-msvcrtdll-using-vc2008.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/4183363003465089108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/4183363003465089108'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/04/linking-with-msvcrtdll-using-vc2008.html' title='VC2008链接MSVCRT.DLL不完全折腾'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-7194782183959409271</id><published>2009-04-09T23:44:00.000+08:00</published><updated>2010-07-23T02:37:14.461+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Unicode In Ruby 1.9</title><summary type='text'>Ruby 1.9终于抛弃了丑陋的jcode，提供一定程度上的Unicode支持。只不过我总觉得有点儿不对劲，Ruby当前采用的处理方式，很可能会带来一些新的问题。

String有了encoding属性，部分方法的处理单位也由字节改为字符。源码文件的默认编码为US-ASCII，如果在代码中写了中文，就必须指定encoding。如果不想写，也可以用BOM。


# encoding: utf-8

s = '幺贰和叁'
puts s.encoding     # =&gt; UTF-8
puts s.length     # =&gt; 4
puts s.bytesize     # =&gt; 12


不同encoding字符串之间可以直接比较，也就是说从今以后比较字符串都要考虑编码问题，搞不好会有很多Bug因此而产生。


# encoding: utf-8

s = '位'.encode('gbk'</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/7194782183959409271/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/04/unicode-in-ruby-19.html#comment-form' title='1 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7194782183959409271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7194782183959409271'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/04/unicode-in-ruby-19.html' title='Unicode In Ruby 1.9'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-1969349176372940445</id><published>2009-04-07T23:52:00.003+08:00</published><updated>2010-12-29T22:35:30.738+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Ruby/GD2</title><summary type='text'>已更新，新内容参见：RGD - libgd binding for Ruby

Ruby/GD2是一个GD library的Ruby binding，支持GD2、Ruby 1.9，可运行于MSWin32平台。

本扩展很多代码都源自Ruby/GD v0.8.0，但由于API变化比较大，且不打算支持GD2之前的版本，故改名Ruby/GD2发布。由于我没有查到Ruby/GD采用的是何种许可证，如果将本扩展用于商业用途，请自行联系Ruby/GD当前维护者Alain Hoang，以确定没有法律问题。（真有人去问，也请告诉我一声。）

如果跟我一样在Windows下用Ruby 1.9.1，压缩包中有编译好的文件可以直接用。将bgd.dll放到Ruby的bin下，GD2.so放到site_ruby\1.9.1\i386-msvcrt下即可。我不确定是否可以在Ruby 1.8下编译，应该没有问题。</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/1969349176372940445/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/04/ruby-gd2.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1969349176372940445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1969349176372940445'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/04/ruby-gd2.html' title='Ruby/GD2'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8945759368911703125</id><published>2009-04-02T08:06:00.000+08:00</published><updated>2010-07-23T02:37:18.808+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Move Ruby/GD To Ruby 1.9.1</title><summary type='text'>If you are looking for Ruby extension to use GD library, plese check here.

因为实在无法忍受JRuby调用JAVA API处理Jpeg的龟速，所以花了点时间改了一下Ruby/GD的代码，使其能运行在mswin32版Ruby 1.9.1下。成果是有一点，不过还是有暂时无法解决的问题。

Ruby/GD用到的API主要是IO部分，从Ruby的头文件定义来看，变动不小。以下这几个宏，是我从RMagick等其他扩展里抄来的：


// GetReadFile doesn't exist in Ruby 1.9.0
#if !defined(GetReadFile)
#define GetReadFile(fptr) rb_io_stdio_file(fptr)
#define GetWriteFile(fptr) </summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8945759368911703125/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/04/ruby-gd-for-ruby-191.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8945759368911703125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8945759368911703125'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/04/ruby-gd-for-ruby-191.html' title='Move Ruby/GD To Ruby 1.9.1'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6428358680203280720</id><published>2009-03-14T04:44:00.000+08:00</published><updated>2010-07-23T02:37:20.775+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>Psiphon2试用</title><summary type='text'>在网上翻到Psiphon2，没仔细看究竟是啥玩意儿，就发了封信到english@sesawe.net（写英文）要邀请。不曾想才过半个小时，就收到了Freerk Ohling的回信。那个时候加拿大应该是半夜才对，莫非Freerk也是宅男夜猫子？

具体怎么用，请到这里去看吧，很简单，我就只说说一天来的使用感想好了。

Psiphon2跟go2一样，其实就是一个在线代理。比如你被分配到的代理地址是https://xx.xx.xx.xx/xxx/，若要访问被墙了的http://fackgfw.cn，那就可以这样用：https://xx.xx.xx.xx/xxx/http://fackgfw.cn。

在线代理有的缺陷Psiphon2自然都有，如只支持http和https协议，以及访问采用AJAX技术的网站可能会有问题等等。优点则是不需要修改系统或浏览器的任何设置，也就是说网吧等地方也能用。

</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6428358680203280720/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/03/psiphon2.html#comment-form' title='4 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6428358680203280720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6428358680203280720'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/03/psiphon2.html' title='Psiphon2试用'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-427908011403684914</id><published>2009-03-08T19:56:00.000+08:00</published><updated>2010-07-23T02:37:22.569+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='八道'/><title type='text'>纠结</title><summary type='text'>我很爱EmEditor，从Windows 98时代开始一直用到现在。每次打开机器我肯定都会用到他，也因此Ctrl+Alt+M这个系统级热键被其占据已经很多年了。

前些日子，我发现了EmEditor简体中文语言包一处莫名其妙的翻译：菜单栏上，工具、自定义、窗口，“切换到下一个文档命令最后使用的文档”。换成英文一看，原来是“Switch to Last Used Document for Next Document Command”。

查看info.ini，汉化者是莫尼卡，版本为8.00。完美主义作祟，于是跑到EmEditor官方网站下了一个语言包，发布日是2008年12月12日，作者为“逐浪清风”。谁知装上后再看，仍然是“切换到下一个文档命令最后使用的文档”。

对的一样还情有可原，翻错了还一样？我检查了两个文件的MD5值，都是</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/427908011403684914/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/03/tanglement.html#comment-form' title='3 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/427908011403684914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/427908011403684914'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/03/tanglement.html' title='纠结'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_WDffCNVga7A/SbOyymULtjI/AAAAAAAABZg/_ea8moRF2VU/s72-c/tracky_01.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6725404302874319363</id><published>2009-03-06T17:11:00.000+08:00</published><updated>2010-07-23T02:37:24.308+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>用脚本控制Tor更换IP</title><summary type='text'>不多说，直接看代码吧，虽然我觉得用得上这个脚本的地方都很无聊。


require 'net/telnet'
require 'net/http'
require 'uri'
require 'time'

def torNewIP()
  tor_addr = '127.0.0.1'
  tor_ctrl = 9051
  
  host = Net::Telnet.new(
    'Host' =&gt; tor_addr,
    'Port' =&gt; tor_ctrl,
    'Prompt' =&gt; /\n/n)
  r = host.cmd('AUTHENTICATE')
  return false if r != "250 OK\n"
  r = host.cmd('signal NEWNYM')
  return false if r != "250 OK\n"
  </summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6725404302874319363/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/03/use-script-to-control-tor.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6725404302874319363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6725404302874319363'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/03/use-script-to-control-tor.html' title='用脚本控制Tor更换IP'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-3908762419563616255</id><published>2009-03-05T10:14:00.000+08:00</published><updated>2010-07-23T02:37:26.273+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>Tips of Hotspot Shield</title><summary type='text'>Hotspot Shield是架还不错的翻墙梯，至少速度还不错。只是广告很烦人，要装客户端也很烦人，而且默认情况下连接成功后所有网络请求都会走Hotspot Shield的线路，没什么必要。

曾试着用Windows自带的拨号工具代替Hotspot Shield客户端，只是没找到怎么样才能向服务器提交CA证书通过IPSec验证，所以尝试失败，客户端还是得装。不过另外两个问题，倒是有办法解决。

先说说比较简单的广告问题。最直接的法子当然是过滤，可是也太麻烦了些。实际上有人发现，使用Opera的时候Hotspot Shield不会添加广告。所以这个问题可以通过伪造User-Agent来实现，比如你要是也用Privoxy的话，可以这样写：

{ +hide-user-agent{Opera/9.64 (Windows NT 5.1; U; Edition IBIS; zh-cn) </summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/3908762419563616255/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/03/tips-of-hotspot-shield.html#comment-form' title='1 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3908762419563616255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3908762419563616255'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/03/tips-of-hotspot-shield.html' title='Tips of Hotspot Shield'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8102253365359553757</id><published>2009-02-20T22:03:00.000+08:00</published><updated>2010-07-23T02:37:28.042+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>尝试IE8 RC1</title><summary type='text'>其实前不久才升级了IE7，但因为CSS Filter导致ClearType强制关闭的问题，我又不愿意挂上GDI++，一直用得不太舒服。这几天看到IE8 RC1发布的消息，虽然有评测说IE8内存占用率很高，但想想用Maxthon应该影响不大，于是就装上试了试，感觉变化还蛮大的。

UI有变漂亮一点，菜单上多了很多Icon。“管理加载项”对话框Live风格明显，不过总觉得有点粗糙。内存占用似乎是比较高一点，但速度还不错。地址栏跟Chrome一样了，会突出显示顶级域名主体。

新增加功能方面。“加速器”（Accelerators）这个名字怪怪的，作用其实和BHO类似，叫Launcher或许还准确点。SmartScreen的作用机制不明，如果跟IE7反钓鱼功能类似，那其实没什么用。InPrivate隐私保护模式开启时，Cookie、历史纪录、Internet临时文件等内容不会被保存，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8102253365359553757/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/02/try-ie8-rc1-fix-filter-cleartype-issue.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8102253365359553757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8102253365359553757'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/02/try-ie8-rc1-fix-filter-cleartype-issue.html' title='尝试IE8 RC1'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-577864271061016511</id><published>2009-02-10T03:54:00.000+08:00</published><updated>2010-07-23T02:37:29.839+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>如何开启Live Mail的POP3功能</title><summary type='text'>在网上看到Live Mail，也就是曾经的Hotmail、MSN提供POP3支持的消息，一点也不高兴：该功能只对有限的几个国家的用户开放，显然，不包括中国。

好吧，根据以往的经验，试试能不能冒充一下外国友人，享受非国民待遇。因为某些原因，先试了荷兰，不成，接着试了英国和加拿大，还是不成。心想说微软不至于这么小气吧，于是Google之，找到了这里，照做之下还是不成。

最后才发现，原来是我用以测试的Magic Mail Monitor这个程序有问题。可叹我用了他那么些年，直到正式皈依GMail为止。GMail的POP3貌似是独立的，在Web中删除或归档的信件不会反映在POP3连接中，于是把POP3当作检查新邮件的手段就不好使了。

呃，不废话了，以下是开启Live Mail POP3功能的办法：


用浏览器打开：https://account.live.com/?mkt=en-gb
</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/577864271061016511/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/02/live-mail-pop3-not-8bit-clean.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/577864271061016511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/577864271061016511'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/02/live-mail-pop3-not-8bit-clean.html' title='如何开启Live Mail的POP3功能'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_WDffCNVga7A/SZCKOagDICI/AAAAAAAABU8/ouzog0UNztw/s72-c/hotmail-location-hack.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-2333526767493689451</id><published>2009-02-08T20:53:00.000+08:00</published><updated>2010-07-23T02:37:31.845+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>帮人搬家之导入Blogger</title><summary type='text'>在跟我实在不熟的Python奋斗了若干时间后，我才悲哀地发现，Blogger现在对API导入添加了限制。每天通过API发布一定量的帖子后，再发就得输入验证码，我太阳。

还好，通过尝试发现，Blogger GUI中提供的导入功能可以用。不然的话，某人的小500张帖子，还不知道要弄到什么时候去。

用Javascript写这段代码，看起来就乱七八糟的。不过没办法，还是因为Ruby没有好用的HTMLParser。虽然可以在Ruby里可以调用ActiveX COM，但是会有回车换行符混乱的问题，将就用吧。


// 这个函数用来处理内文需要修改的地方
// 如果没什么可改的那就不需要调用
function parseHTML(src) {
  var doc = new ActiveXObject('htmlfile');
  doc.write(src);
  
  var es = </summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/2333526767493689451/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/02/import-to-blogger.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2333526767493689451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2333526767493689451'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/02/import-to-blogger.html' title='帮人搬家之导入Blogger'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6125948651701052286</id><published>2009-02-08T17:50:00.000+08:00</published><updated>2010-07-23T02:37:36.920+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>帮人搬家之导入图片至Picasa</title><summary type='text'>Blog搬家，文字部分其实很好处理，麻烦的是图片。如果BSP下手狠一点直接删掉，而且本地又没有备份的话，那就全完了。

歪酷到目前为止相册都还没动，不知道是没检查到还是怎样，总之现在还能抓就是了。

因为Ruby没有好用的HTMLParser类，所以以下代码用的是Javascript。由于我不确定歪酷服务器上的图片文件名是否唯一，所以直接将URL处理后作为文件名保存。


function parseHTML(src) {
  var doc = new ActiveXObject('htmlfile');
  doc.write(src);
  
  var es = doc.getElementsByTagName('img');
  for (var i=0;i&lt;es.length;i++) {
    var s = es[i].src;
    if (s.indexOf('</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6125948651701052286/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/02/batch-upload-to-picasa.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6125948651701052286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6125948651701052286'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/02/batch-upload-to-picasa.html' title='帮人搬家之导入图片至Picasa'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8448670043714844340</id><published>2009-02-08T14:33:00.000+08:00</published><updated>2010-07-23T02:37:38.642+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>帮人搬家之导出Google Reader缓存</title><summary type='text'>某人的Blog原来放在歪酷上，因为歪酷上榜第七批，所以。

目前歪酷被关Blog的帖子部分无论前台后台均无法访问，日后是否会提供下载不得而知。好在某人的Blog自从2006起就有人（敝人）在Google Reader上订阅，歪酷的Feed也是全文输出，所以能救一部分回来。

但是借助Google Reader缓存搬迁Blog的法子也有不小的局限性：


原Blog提供了全文Feed输出；
只能取回自第一次有人在Reader订阅之后发布的文；
如修改过不包含在Feed中的旧文，则修改部分无法取回；


本想用Javascript写代码，但因为XMLHTTP不能自定义Cookie（ServerXMLHTTP好像可以，不过我没试），所以改用Ruby。


require 'net/https'
require 'uri'

def getSID(email, passwd)
  uri = </summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8448670043714844340/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/02/export-cached-feed-from-google-reader.html#comment-form' title='5 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8448670043714844340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8448670043714844340'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/02/export-cached-feed-from-google-reader.html' title='帮人搬家之导出Google Reader缓存'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-1517516613002003585</id><published>2009-02-05T16:21:00.000+08:00</published><updated>2010-07-23T02:37:40.298+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>禁止WLM自动运行</title><summary type='text'>Windows Live Messenger在每次登陆Live.com的时候都会自动运行，很烦人。网上多方寻觅不得其解，只好自己写办法。

用IE浏览某个网站就执行一个本地程序，怎么想都是ActiveX最可疑。经过尝试，在IE菜单栏中选择“工具”、“Internet选项”，“程序”页中点击“管理加载项”，禁用下图红框中的Windows Live项目即可解决问题。



经过如上设置，用IE登陆Live.com时Messenger是不会自动运行了，但Maxthon或TheWorld却还是照旧。IE中禁用的项在Maxthon中却可以加载，不知这算不算是一个Bug。

试了试直接将“C:\Program Files\Windows Live\Messenger\msgsc.14.0.8050.1202.dll”改名，但一运行WLM就会修复。只好用老办法了，直接屏蔽，将下述内容导入注册表即可：
</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/1517516613002003585/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/02/disable-messenger-auto-launch.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1517516613002003585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1517516613002003585'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/02/disable-messenger-auto-launch.html' title='禁止WLM自动运行'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_WDffCNVga7A/SYrbgqCCIXI/AAAAAAAABTc/wUdxWYKcvAo/s72-c/IEOpt4WLM.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-763915763087582090</id><published>2009-02-03T01:46:00.000+08:00</published><updated>2010-07-23T02:37:42.140+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Bug In Blogger HTML Gadget</title><summary type='text'>在Blogger中添加一个HTML/Javascript Gadget，贴入以下代码：


&lt;script type="text/javascript"&gt;
function do_something() {
  var a = document.getElementsByTagName('div');
  for (var i=0;i&lt;a.length;i++) {
    if (a[i].className=='XX') a[i].className='OO';
  }
}
&lt;/script&gt;


保存以后再点修改，会发现代码变成了这个样子：


&lt;script type="text/javascript"&gt;
function do_something() {
  var a = document.getElementsByTagName('div');
  for (var i=0</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/763915763087582090/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/02/bug-in-blogger-html-gadget.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/763915763087582090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/763915763087582090'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/02/bug-in-blogger-html-gadget.html' title='Bug In Blogger HTML Gadget'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-2575699861630186942</id><published>2009-01-30T18:34:00.000+08:00</published><updated>2010-07-23T02:37:44.147+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>IE7中ClearType自动关闭的问题</title><summary type='text'>我的系统是Windows XP，装上了微软雅黑并打开ClearType。前些日子更新了IE7之后，很快我就发现，有很多页面（如百度空间）上的雅黑中文显示不正常，发虚，很模糊，而英文却又全是锯齿，总之没法看。

拜了Google大神，都说是IE7默认打开了ClearType导致中文发虚，可我这里的问题明明是ClearType被关了才会这样。小白太多，把Google都淹了，于是只好靠自己。在百度空间上随便找一个页面保存下来，一点一点找，总算是确定了问题所在：“FILTER: none”和“ZOOM: 1”。

有了关键字才好Google。IEBlog上有一篇《Notes on the interaction of ClearType with DXTransforms in IE7》，说是启用了filter就会强制关闭ClearType。《IE 透明度失效和 zoom:1 有關？》还提及，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/2575699861630186942/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/01/ie7-css-filter-auto-disable-cleartype.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2575699861630186942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2575699861630186942'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/01/ie7-css-filter-auto-disable-cleartype.html' title='IE7中ClearType自动关闭的问题'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_WDffCNVga7A/SYLYAZE62oI/AAAAAAAABTM/bzRMVnDKSqY/s72-c/ie7filter.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8417246465675916322</id><published>2009-01-29T22:42:00.000+08:00</published><updated>2010-07-23T02:37:45.883+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>WSH中XMLHttp的怪异表现</title><summary type='text'>参考如下JScript代码：


var xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");
xmlhttp.onreadystatechange = function () {
 WScript.Echo(xmlhttp.readyState);
}
xmlhttp.open("GET", "http://otnth.blogspot.com/", true);
xmlhttp.send();


保存为js文件并用cscript或wscript执行，上述程序输出两次1后退出。如果把open挪到onreadystatechange前面，则只输出一次1后退出。

网上有很多人遇到移步方式下onreadystatechange只执行一次的问题，解决办法是把onreadystatechange写在open前面。但这里的问题似乎没有那么简单，感觉像是</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8417246465675916322/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/01/xmlhttpquest-within-wsh.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8417246465675916322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8417246465675916322'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/01/xmlhttpquest-within-wsh.html' title='WSH中XMLHttp的怪异表现'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-7299277664585719694</id><published>2009-01-20T05:17:00.000+08:00</published><updated>2010-07-23T02:37:47.806+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>从解码Base64的宏想起</title><summary type='text'>从找到那天起，一直都很爱EmEditor。轻巧快速，完善的正则表达式和多内码支持。除了编辑超大文件时的表现不如UEdit32外，我几乎找不到别的缺点。而且在没有丢失已有优点的前提下，EmEditor也有在一点点变得更好更强大，是个用起来很窝心的编辑器。

好了，工商时间结束。话说最近一次升级到EmEditor v8后发现，以前的Base64解码插件不能用了。正好现在的EmEditor借助Windows Scripting Host（WSH）提供了宏功能，于是想自己写个解码宏试试感觉。

这个宏需要做的有两件事：一、将Base64字符串解码；二、如需要，进行内码转换。

WSH的标准配备Javascript和VBScript都没有直接提供解决这两件事的函数或对象，也没有所谓标准库一说，要用JS或VBS的话就必须找现成的纯实现或自己写。当然，如果喜欢Perl、PHP、Python、Ruby</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/7299277664585719694/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/01/from-macro-of-emeditor.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7299277664585719694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7299277664585719694'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/01/from-macro-of-emeditor.html' title='从解码Base64的宏想起'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-3968176267158285287</id><published>2009-01-15T19:07:00.000+08:00</published><updated>2010-07-23T02:37:49.476+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>用手机接收Twitter Replies</title><summary type='text'>本来Twitter只是我用来作为一个自闭宅男自言自语的地方，没事偷着乐而已。可是近来接连被人在那里抓住现行，这下问题就出来了。

先是发现，即使在Notices设置中选择Show me all @ replies，未follow对象@我的消息仍然不会显示在Home Time Line里。继而又发现，没有任何方便的法子获取replies提醒，没email，没im，当然更不会有短信。

要知道，我更新Twitter都是通过叽歪同步的方式，难道我得三不五时用浏览器去访问Twitter @Replies Tab才成？好吧，于是开始折腾。

在经过艰苦卓绝的探索，克服了一系列难关之后，我终于实现了用手机接收Twitter Replies提醒短信的终极目标，完成了一次互联网上的二万五千里长征。

好吧，我不贫了，下面就说具体过程。

据说，过去叽歪和饭否等国内网站，都提供手机短信下行提醒服务。</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/3968176267158285287/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/01/use-sms-to-receive-twitter-replies.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3968176267158285287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3968176267158285287'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/01/use-sms-to-receive-twitter-replies.html' title='用手机接收Twitter Replies'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8681907430782241440</id><published>2009-01-11T06:42:00.000+08:00</published><updated>2010-07-23T02:37:51.380+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>Tips of Chrome</title><summary type='text'>&lt;!--


--&gt;
目录

最近一直在用Google Chrome，下面就是我遇到的一些问题及解决方式。这一篇应该会持续更新吧……


如何获知Chrome的更新信息？
如何下载Chrome的离线安装包？
如何制作可移动版（绿化）Chrome？
如何获得未发布的最新版本？
如何使用用户脚本（Greasemonkey）？
播放Flash很卡怎么办？
如何过滤广告内容？
如何修改书签图标？
如何查看缓存文件？


如何获知Chrome的更新信息？

Chrome的更新信息都可以在Google Chrome Releases Blog上看到。

有时一些微小更新并不会导致版本号变化，如修正了Hotmail和Yahoo! Mail问题之后的Chrome仍然是1.0.154.46版。如果想及时了解Chrome的更新信息，就订阅吧。

如何下载Chrome的离线安装包？

从Google </summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8681907430782241440/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/01/tips-of-chrome.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8681907430782241440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8681907430782241440'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/01/tips-of-chrome.html' title='Tips of Chrome'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-7724623517204019850</id><published>2009-01-10T01:49:00.000+08:00</published><updated>2010-07-23T02:37:53.455+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>Chrome 2.0 预测试版发布</title><summary type='text'>1.0正式版发布没多久，2.0 Pre-Beta版就来了。2.0.156.1版下载地址。

新闻提到的新功能：


自动完成：
似乎不是谷歌输入框里的那种，倒是有根据历史纪录提示URL的功能，可我也不确定是不是新加的功能。比如访问过我的blog，打个“幺”会提示出访问过的所有Title包括“幺”的地址。
页面缩放：
Ctrl+“+”放大，Ctrl+“-”缩小，Ctrl+“0”还原，还不错，不过只能通过键盘操作。
自动滚动：
按鼠标中建，也就是滚轮，上下左右移动就行，没什么用。
简易切换配置文件：
命令行参数--user-data-dir=PATH的菜单版。
支持Greasemonkey脚本：
早就说要加上的功能，说不定Chrome以后的插件指的就是用户脚本了（跟Opera一样），也是驱使我尝鲜的原因。




Update，发现两个bug，问题还都不小：


中文输入法不能实现光标跟随，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/7724623517204019850/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/01/chrome-20-pre-beta-release.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7724623517204019850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7724623517204019850'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/01/chrome-20-pre-beta-release.html' title='Chrome 2.0 预测试版发布'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_WDffCNVga7A/SWeO0-Lqb4I/AAAAAAAABBU/DU_bOHGwlJY/s72-c/chrome_2_user_scripts.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6120638112936232497</id><published>2009-01-06T04:21:00.000+08:00</published><updated>2010-07-23T02:37:58.204+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>选个Feed来订阅</title><summary type='text'>有一点点矛盾，写Blog的人可能不会喜欢Feed Cache这东西，但读者肯定喜欢。比如我在订阅Feed的时候，一般都会选Cache量最大的地址订阅。

怎么样判断哪个地址的Cache量最大呢？都订阅上然后手工去翻，或者借助服务提供商的API，如果有的话。Google Reader是有的，Bloglines和NewsGator不太清楚，应该也有吧。

我写了一个Google Reader API检查Cache量的小东西，附在文末。在文本框中填入Feed URL，点后面的按钮就可以了，结果会以表格的样式显示在文本框下面。为了图方便，代码用了同步模式获取数据，如果老半天没反应就手动刷新一下页面再试。

Google Reader API目前还没有正式发布，需要先验证，而且还没JSON版本，所以会遇到著名的跨域问题。IE6用户在菜单上选工具、Internet选项，在安全页中点自定义级别，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6120638112936232497/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/01/choose-feed-to-sub.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6120638112936232497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6120638112936232497'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/01/choose-feed-to-sub.html' title='选个Feed来订阅'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-3683008374434819933</id><published>2009-01-04T11:23:00.000+08:00</published><updated>2010-07-23T02:37:59.880+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='八道'/><title type='text'>又到春运时</title><summary type='text'>

今年春运计划从1月11号开始，而北京更是根据客流量情况，提前10天进入春运。

每年一到这个时候，售票处、火车站、飞机场都是兵荒马乱的地方。排一、两小时甚至更长时间的队，只是为了问上一句话，而得到的答案很可能却是：“没票了”。那么多那么多人的脸上，除了焦急就是疲惫，一点都看不到回家的喜悦。

小时候的我也曾相当传统，认为回家是天大的事，所以会想尽办法提前动身，或者咬着牙买全价机票。不过人总是会长大的，会有第一次、第二次和更多次。然后我也开始疑惑，为了那一顿饭，值得么？

时至今日，我也没有一个确定的答案。尤其是想到那冗长的队伍，拥挤的人群，污浊的空气，我就会愈加动摇。可是当我坐在家里，想到“家”这个字所代表的这些那些时，我又会觉得，大概是值得吧。

今年的我不需要再经历春运，或许以后也不再需要。不过还是有些我认识的和在乎的人，不会回家，或想回而回不了家。希望他们能过个不错的春节，不要</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/3683008374434819933/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2009/01/it-is-time-to-go-home.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3683008374434819933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3683008374434819933'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2009/01/it-is-time-to-go-home.html' title='又到春运时'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_WDffCNVga7A/SWAr81_KuqI/AAAAAAAAA_Y/Ln1bwT_gLdA/s72-c/chunyun09.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-550072915157761401</id><published>2009-01-01T04:05:00.000+08:00</published><updated>2010-07-23T02:38:01.969+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>Feed迷思</title><summary type='text'>Feed，或者叫RSS，总之就是那玩意儿，我现在的生活已经有点离不开了。每当我又不知道该做什么才好的时候，总会打开Feed阅读器看看有啥新东西了没。

我有不止一台机器，也并非完全没有用别人机器的可能，所以一开始对在线阅读器还是挺有兴趣的。不过在尝试使用了一段时间Bloglines之后，我放弃了。

实在是太慢了。Bloglines服务器在国外，本来就不快，还要再加上等待页面重绘的时间，慢得让我无法忍受。我可是至今都还在用AcdSee 2.4的人，图的就是一个爽利。

之后我遇到了国产的GreatNews离线阅读器，曾一度惊为天人。体积小巧，资源占用不多，而且还能绑定Bloglines帐户。GreatNews+Bloglines的组合，我用了很长一段时间。

然而渐渐的，我也发现了GreatNews的不少缺点。首先是与Bloglines的集成度不高，Clippings只是本地操作，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/550072915157761401/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2008/12/myths-of-feed.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/550072915157761401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/550072915157761401'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2008/12/myths-of-feed.html' title='Feed迷思'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-1922347339727064545</id><published>2008-12-30T09:23:00.000+08:00</published><updated>2010-07-23T02:38:03.984+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='八道'/><title type='text'>记任超奇案</title><summary type='text'>28岁的任超奇和同为河南南阳市民的李晋（一说王明，或许都是化名）是生意伙伴，二人在南阳光彩大世界租了一家店面，打算开一家汽车配件店。2008年8月18日，南阳市公安局直属分局的网警来到没有装修完成还未开张的店里，称李晋的电脑涉嫌传播反动（不良）信息，要进行检查。

在李晋的电脑中没有找到证据的警方，又检查了任超奇从家中搬来的电脑，在其中发现了涉黄视频后，就扣押了电脑主机。应警方要求，任超奇于当天下午到警察局做了笔录，承认是自己下载了视频，但没有传播，也没有给别人看。9月12日，任超奇收到了警方的处罚决定书，称“进行日常检查时发现其中一台电脑上复制下载有一部淫秽视频”，决定对任超奇“警告并处1900元罚款”。



任超奇接到的《公安行政处罚决定书》中注明，该处罚依据的是“《计算机信息网络国际联网安全保护管理办法》第五条第（六）项及第二十条之规定”。该办法于1997年12月11</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/1922347339727064545/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2008/12/case-of-renchaoqi.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1922347339727064545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1922347339727064545'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2008/12/case-of-renchaoqi.html' title='记任超奇案'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_WDffCNVga7A/SVl4-Yq7NdI/AAAAAAAAA9E/5_1XGqQ_sFo/s72-c/renchaoqi_001.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8831646130947436648</id><published>2008-12-29T21:12:00.000+08:00</published><updated>2010-07-23T02:38:05.943+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='物件'/><title type='text'>夏普新机SH1810C及SH6010C</title><summary type='text'>我自认是个物欲不强的人，消费理念也是以注重性价比为主。不过我偶尔还是会被一些长得很漂亮的高价货给萌到，比如苹果的Macbook，再比如Sharp他们家的手机。

Sharp今天在上海发布了两款针对中国市场的手机，分别是高端型号SH1810C（对应日版930SH），和中端型号SH6010C（对应日版820SH）。两款手机都将于明年年初开始贩卖，从Sharp一贯的定价策略来看，SH1810C大概会卖3到4K，SH6010C也不会低于2K。

外形方面两款手机我都觉得很漂亮，尤其SH6010C，极简金属风很合我的胃口。不过基本上可以确定，我不会买就是了。

SH6010C

SH1810C

日本手机市场是全世界最有趣且最特别的地方。在那里，Nokia、Samsung等他国厂家使尽浑身解数，也无法找到立足之地（今年底，Nokia正式宣布退出日本市场），绝大部分市场份额都由Sharp、</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8831646130947436648/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2008/12/sharp-release-sh1810c-and-sh6010c.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8831646130947436648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8831646130947436648'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2008/12/sharp-release-sh1810c-and-sh6010c.html' title='夏普新机SH1810C及SH6010C'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_WDffCNVga7A/SVjNqyiNSrI/AAAAAAAAA88/z_MKq_0bfg4/s72-c/SH6010C.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6531055573288441757</id><published>2008-12-24T09:45:00.000+08:00</published><updated>2010-07-23T02:38:07.661+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>Tips of RayFile</title><summary type='text'>安装RaySource之后，该软件会偷偷摸摸地在系统加载项里添加一条peer.exe的记录，记得用Windows优化大师一类的工具将其去掉。

执行RaySource程序，或浏览RayFile网站时，peer.exe也同样会被加载，同时被加载的还有一个PeerAdapter.exe。如当前并没有使用RaySource下载什么东西，这两个进城都可以杀掉。

在已知文件MD5值的情况下，可用如下方式查验该文件是否存在于RayFile服务器中：

http://cachefile.rayfile.com/zh-cn/download/C2DB9C4749C6ECF521FFCA0DD8F62752/

这个地址的最后一段即为MD5值，该地址会被转向至：

http://www.rayfile.com/zh-cn/files/284c6299-4120-11dd-bbb3-</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6531055573288441757/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2008/12/tips-of-rayfile.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6531055573288441757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6531055573288441757'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2008/12/tips-of-rayfile.html' title='Tips of RayFile'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-7303015262166123410</id><published>2007-11-02T18:39:00.000+08:00</published><updated>2010-07-23T02:38:09.595+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='八道'/><title type='text'>奥运会与居民小区</title><summary type='text'>这么说尽管显得觉悟不够，可即使是在当年，我就不是申奥的坚定支持者。理由很简单，我不相信北京奥运能做到收支平衡——又要全国人民为北京买单了。当然我也并不是反对北京申办奥运会，只是个人不认同举国办奥运的操作方式。不过我也明白，奥运会不仅仅是奥运会，中国需要这次机会，所以我那小小的不满也只好装在肚子里了。但是这份不满，近来却有反刍的趋势。

我所住的小区不小，所以出入口有好几个。离我们楼最近的那个出入口，原本是不能通车的。前段时间为了进行装修改造，那个出入口封闭了近一个月。在这段时间里，我每天出门回家都要多花5分钟绕路。这原本是好事，出入口修好了人走车走都方便，所以短时间的不便并非无法忍受。但从这件事开始，小区里还发生了不少其他的变化，就未必件件都是好事了。

首先是小区里没有固定营业场所的小贩全部被取缔。这些小贩有卖水果蔬菜的，有卖零食小吃的，还有收废品的。</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/7303015262166123410/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/11/olympic-and-apartments.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7303015262166123410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7303015262166123410'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/11/olympic-and-apartments.html' title='奥运会与居民小区'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8619544889061793585</id><published>2007-10-28T13:46:00.000+08:00</published><updated>2010-07-23T02:38:11.340+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='八道'/><title type='text'>电梯司机</title><summary type='text'>有一个上海的朋友过来玩的时候，曾戏言说这个城市各方面都不错，但就是24小时营业的超市太少，显然是下岗女工不够多。果然是首善之都，就业和再就业工作做得好么？未必，至少这里就有很多莫名其妙的职位安排了不少人，比如说电梯司机。

根据国家规定，七层以上住宅必须安装电梯。我现在所住的楼虽然年纪不小，可也有15层高，自然也装了电梯。据说94年曾有文件要求住宅电梯必须配备司机，所以当时每辆住宅电梯都安排了两位司机值班。该文件在2000年已经被废止，但现在仍有很多电梯司机坚守岗位，每天早六点至午夜十二点守在狭小的轿厢里为人民服务。

我这人算来算去没有别的优点，也就是讲礼貌、尊老敬贤值得被人夸几句。无论是商场里的售货员还是脸色比较好看的小贩，买了东西、被人服务了之后我都会习惯性地说句谢谢，对电梯司机当然也不例外。单只凭这一点，我就跟不少电梯司机保持了良好的关系。

例如按前面所说的电梯工作时间，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8619544889061793585/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/10/lift-attendant.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8619544889061793585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8619544889061793585'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/10/lift-attendant.html' title='电梯司机'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-4217290645939641190</id><published>2007-10-24T20:04:00.000+08:00</published><updated>2010-07-23T02:38:13.127+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='物件'/><title type='text'>好难看的N81</title><summary type='text'>

发布会已经开了，11月上市，8G版本建议零售价约4700。这款手机本来我是相当看好的，参数方面非常漂亮，具备成为新一代机皇的潜力。虽然也曾担心Nokia近年来的工业设计越来越没质感，可是看宣传照的感觉还不错，就没多想。

可是这次发布会上的真机实照让我很失望，实在实在实在是非常非常的难看。黑色高光的外壳看起来一股子劣质塑料的味道，八向操纵杆越看越像硕大的方形肚脐，而且拿在ShowGirl手上就爬满了油腻腻的指纹。

一句话，Nokia真的已经堕落了……</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/4217290645939641190/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/10/wtf-of-nokia-n81.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/4217290645939641190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/4217290645939641190'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/10/wtf-of-nokia-n81.html' title='好难看的N81'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_WDffCNVga7A/SVZpDp4Qm8I/AAAAAAAAA7g/05uxDdwQNFk/s72-c/nokia_n81.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-3327659975623882921</id><published>2007-10-22T18:12:00.000+08:00</published><updated>2010-07-23T02:38:15.083+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='物件'/><title type='text'>Razer蓝色响尾蛇</title><summary type='text'>

我曾经用的也是30块一套的键盘鼠标，可那已经是很多年前的事情了。改变我这一习惯的是我哥，因为他对我说，键盘鼠标显示器这种东西是天天都会看到摸到的，应该要买好一点。想想说得有道理，我也就从善如流了。更何况，我有个疼爱老弟的哥，这些年用的鼠标都是他送的。

还好我不是很毁东西的败家子，一个鼠标可以用上好多年。上一个我哥给我的鼠标还是罗技的极光旋貂，红色那款，有些年头了。因为近来觉得左键被用得不太灵光，所以趁着去我哥那吃饭的时候，又顺了个新的回来，Razer的蓝色响尾蛇。

我用的，或者说我哥送我的鼠标一直都是罗技的，初见Razer时感觉很不一样。这个鼠标的机身比较长，扁扁的，看起来还真有些响尾蛇头的样子。而且装饰性的线条比较多，插进USB口连滚轮也有磨砂的蓝光，倒是挺漂亮。老哥告诉我说Razer的产品都是游戏鼠，CS犯爱用。

不过真用起来，多少还是有些不适应。因为造型的关系，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/3327659975623882921/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/10/razer-diamondback.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3327659975623882921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3327659975623882921'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/10/razer-diamondback.html' title='Razer蓝色响尾蛇'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_WDffCNVga7A/SVZl3s4rq1I/AAAAAAAAA7U/1-UUz6al2_M/s72-c/razer_diamondback.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8448449384848963238</id><published>2007-10-06T01:00:00.000+08:00</published><updated>2010-07-23T02:38:19.213+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>Opera中的站点首选项</title><summary type='text'>因为新浪等BSP的图片不允许外链，所以用Google Reader看这样的Feed会很难受。为了解决这个问题，我试着在Opera中，针对www.google.com的站点首选项设置为不发送引用页。但这样设置却起不到预期的作用，还是必须在菜单上修改快速首选项并刷新才行。

（注：后来才知道我这是舍近求远，其实只要用HTTPS访问Google Reader就可以了。因为考虑到安全原因，HTTPS规范推荐不发送引用页数据。）

一直都以为是站点首选项和快速首选项的优先级有问题，过了好些日子才想到了另外一种可能。在自己机器上搭了个Web服务器，经测试验证了自己的想法后，才发现原来是自己笨。

Opera中站点首选项针对的是被引用文件所在主机，而非引用页所在的主机。如需要在Google Reader中看新浪Blog的图片，则应该针对album.sina.com.cn设置为不发送引用页，而非</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8448449384848963238/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/10/site-preferences-in-opera.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8448449384848963238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8448449384848963238'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/10/site-preferences-in-opera.html' title='Opera中的站点首选项'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-849414840193932054</id><published>2007-10-03T22:21:00.000+08:00</published><updated>2010-07-23T02:38:21.217+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='八道'/><title type='text'>找房记</title><summary type='text'>房租即将到期，动了搬家的心思。

今天去看的房子，信息是在网上查到的，虽然写着“非中介”，但把联系电话当关键字搜一下，一看可知不是那么回事。明知这样还去看房，理由无非就是价钱，一个很具诱惑力的价钱。

其实我也没有那么讨厌中介。只要不骗人，利润合理，大家都是一样要过日子的人。想说看看也无妨，只要小心一点，我没那么好骗。这种想法是有点期待天上掉馅饼的味道，我承认。事实证明我是白跑一趟，所以小朋友千万不要学。

房子所在的楼盘叫“壹线国际”，以前没听说过，地点在四惠。那里位于城市的东边，算是一个城郊的分界点，再往东差不多就出了闹市区。而且也是一个交通枢纽，地铁、公交总站、长途客车站都很集中，就是那种早晚高峰和逢年过节都兵荒马乱的地方。

我在四惠下车，很容易就看到了马路北边的“壹线国际”。这个小区整个就是建在一线地铁线路上的，差不多从四惠站跨到四惠东，怪不得叫这个名字。因为地点特别，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/849414840193932054/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/10/look-for-apartment.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/849414840193932054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/849414840193932054'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/10/look-for-apartment.html' title='找房记'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-7853161978429340690</id><published>2007-09-19T06:18:00.000+08:00</published><updated>2010-07-23T02:38:23.282+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>Say bye to flickr</title><summary type='text'>flickr被和谐的时候，我多少也觉得有些愤慨。没想到的是，不久之后flickr就从受害者变成了加害者——他们取消了免费账户的原始照片下载权限。

我曾在flickr放了一组很值得留下的照片，而且我以为自己没有留底。flickr此举就代表着，除非我付那25美金的年费，否则就算是我也拿不回自己的原始文件。更过分的是，以往这方面并没有限制，变更服务条款也没有通知我。

一直隐忍着，直到今天在硬盘上乱翻，才在一个角落里意外发现了那一组照片的原始文件。不夸张的说，有种重新取得回忆所有权的感觉。一阵狂喜，接着我删掉了旧的flickr账户，重新注册了一个，并决定以后只看照片，绝不上传。

凭心而论，flickr对免费账户的限制本来就很多，加上这么招人恨的一条不知道是为了什么。不允许外链就是了，连原始文件也不让下载，太过分了些。</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/7853161978429340690/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/09/say-bye-to-flickr.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7853161978429340690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7853161978429340690'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/09/say-bye-to-flickr.html' title='Say bye to flickr'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-3425665439803279195</id><published>2007-09-17T20:17:00.000+08:00</published><updated>2010-07-23T02:38:25.181+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>被某人记得</title><summary type='text'>我有在Facebook上注册过，为了看看有啥好玩的。逛了一圈，没找到继续流连的理由，于是就扔在一边了。若不是今天收到了一封email，告知我某人在Facebook上加我为好友，我都快忘记有这么一回事了。

那是一个曾经很熟的人。登录上去才知道，他也刚注册而已，我是他添加的第一个人。

是不是该感到窃喜？因为还有人记得我。事实上，刚开始我确实有这样的情绪。然而继续在Facebook上翻了翻，我才发现完全不是这么回事。

如果你愿意提交email帐户及密码，Facebook会去读取你的通讯录，并告诉你哪些你认识的人曾经在他们家注册过。我的GMail邀请函就是那位曾经很熟的人发给我的，所以他的通讯录里有我。原来如此。

当然，Facebook这个功能很棒。只是我和那位曾经很熟的人，不可能会再次变熟了。所以我的Facebook上其实还是一个好友都没有，我还是没有找到流连的理由。</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/3425665439803279195/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/09/remember-by-someone.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3425665439803279195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3425665439803279195'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/09/remember-by-someone.html' title='被某人记得'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-7281032805177536358</id><published>2007-04-29T20:36:00.000+08:00</published><updated>2010-07-23T02:38:27.131+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='物件'/><title type='text'>别买NEC光驱</title><summary type='text'>我的光驱是NEC的3550A，买他的原因当然就是冲着可以刷成4551A，支持光雕，虽然我一张盘都没雕过。购买时间是去年夏天，至今一年都不到。可前两天突然发现，买来的DVD和自己刻的DVD-R都不能读了。而且奇怪的是，我发现在Windows和Linux中都不能读的盘，在Dos里却可以读出来。

上网一查，发现这原来不是特例。很多人都遇到了NEC光驱读盘能力弱、使用一段时间后不认自己刻的DVD-R等问题。有没有解决办法也众说纷纭，有把4551A刷回去变好的，有说清理一下光头有用的，不过有一点是可以肯定的了，NEC光驱口碑很次。

那些办法我都还没试过，反正手头还有一个闲置的康宝。不过想想堂堂日系一线厂商，人品竟然沦落成这样，也真是够可怜的。奉劝大家一句，别买NEC的光驱。</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/7281032805177536358/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/04/bad-news-for-my-nec-3550a.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7281032805177536358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/7281032805177536358'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/04/bad-news-for-my-nec-3550a.html' title='别买NEC光驱'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-718424557510723652</id><published>2007-04-11T07:02:00.000+08:00</published><updated>2010-07-23T02:38:28.823+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='杂碎'/><title type='text'>少年包青天3</title><summary type='text'>“明天我就要走了。你收拾好一切，跟我一起走好吗。你放心，我会好好疼你。你病了，我喂你吃药。你累了，我让你靠在我胸口休息。你老了，我就拉着你的手，我们一起去看夕阳，一起回忆双喜镇的事，回忆年轻时的事，回忆我们的儿子出生时，孙子出生时的事。你放心，我一定会好好照顾自己，不让自己比你先死。我会照顾你到最后，让你舒舒服服地走。然后我会立刻下去陪你，不让你有一点孤独。”

这是《少年包青天3》里，公孙策的对白。要不是因为有PPLive，我也不会看到。如果仅仅是肉麻，那也就罢了。问题在于公孙策是男的，而他倾诉的对象，也是男的。这本是剧情最关键的秘密，我当时就能知道并不是因为我比“大宋第二聪明人”聪明，而是因为我看过《金田一》。

这部强片第一个故事就来“唇红齿白，模样俊俏”的男扮女装，第二个故事不但有日本三大神器，还有火贺派忍者小萝莉。除了这些，对白里还有二尾子、大小和尚的龌龊事、清秀的禁脔，连“</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/718424557510723652/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/04/shaonianbaoqingtian3.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/718424557510723652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/718424557510723652'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/04/shaonianbaoqingtian3.html' title='少年包青天3'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-886681224431632775</id><published>2007-04-06T15:53:00.000+08:00</published><updated>2010-07-23T02:38:30.743+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>令人失望的谷歌拼音</title><summary type='text'>头一回见到“谷歌”这名字，不是在网络上，而是在《经济观察报》上看到的平面广告。虽说无肉使人瘦，可那占了整版的水墨竹广告，还是让我觉得很俗气。一种说不清的感觉，味道不太对。之后，“Google”还是google.com。反正cache一样不能用，gmail、gtalk也没变成谷歌邮、谷歌通，我找不到任何改变习惯的理由。

看报纸、看杂志、看网站，“本地化”这三个字看得实在有点腻味。感觉那是说给上司听的，说给政府和股民听的。反正只要不撞墙，不管是Google中文还是谷歌，不管服务器和公司注册地是在美国还是中国，对我来说也没多少区别。不过关心还是要关心的，毕竟是几乎天天用到的服务。起码，也可以当娱乐版来看。

这不，传言了大半个月的谷歌输入法真的放出来了，各处讨论又是一派热火朝天的景象。这个热闹一定要凑，我尝试从智能ABC换到搜狗拼音，还在磨合期中，是经不起什么诱惑的。可惜用了一小会，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/886681224431632775/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/04/guge-pinyin.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/886681224431632775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/886681224431632775'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/04/guge-pinyin.html' title='令人失望的谷歌拼音'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-5485033477254143964</id><published>2007-04-04T09:13:00.000+08:00</published><updated>2010-07-23T02:38:32.525+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>病毒之后</title><summary type='text'>究竟是31号还是1号中的毒，我也不记得了，总之这是个蛮特别的愚人节。感觉，有一点复杂。

虽然裸奔习惯的确不好，可这次事件我就算装了什么病毒监控也一样没用。有人提到说他25号就已经中毒了，那离我在网上找寻解决办法至少有五天。如果是我花了钱，买了一套杀毒软件，却发现不但没有尽到保护责任，反应速度还这么慢，那种感觉肯定很糟。一众杀毒软件商们，看来也就这样了。

在刚发现感染病毒的时候，我并没太当一回事。利用了Windows的新漏洞是挺先锋，可病毒本身并没什么特别的。实际上我用Ruby写的清除程序原始版本，只有50来行。包括分析病毒行为和写代码在内，也不过三、五个小时。

不但如此，我甚至还觉得有一点好玩。毕竟我自己的机器几乎没中过毒，该病毒修改可执行文件的手法也不邪恶，所以刚开始也就没有感到作者很恶意。而且病毒试图在hosts文件里屏蔽的那些网站，都不是什么好去处。过招谈不上，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/5485033477254143964/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/04/after-sysload3.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5485033477254143964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5485033477254143964'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/04/after-sysload3.html' title='病毒之后'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8297522144434630648</id><published>2007-04-01T14:04:00.000+08:00</published><updated>2010-07-23T02:38:34.362+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>遭遇sysload3</title><summary type='text'>因为机器比较老旧，我一向都是裸奔，下了什么东西运行以前，顶多用AVPDOS32扫描一下。这的确不是一个好习惯，以下就算是一个教训。

事情是这样的，昨天找了几个PS2相关的软件，就发现系统不太正常。执行一些控制台程序，例如ruby.exe、lftp.exe、grep.exe等，会弹出一个新控制台窗口，隐隐觉得不对。打开任务管理器一看，有若干个notepad.exe和iexplore.exe进程。可我当时一个记事本都没打开，肯定有问题。

查看系统启动加载项，发现了诸如iexpl0re.exe、c0nime.exe、winlog0n.exe之类的东西，显然是中木马了。我首先想到的就是360安全卫士，奇虎从良以后这个产品的口碑还是不错的。下载运行，查出了两个恶意软件cmdbcs和upxdnd。强制停掉进程后修复，并把加载项及其指向的文件全部删掉后重启，这下360报告没有找到恶意程序了，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8297522144434630648/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/03/caught-virus-sysload3.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8297522144434630648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8297522144434630648'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/03/caught-virus-sysload3.html' title='遭遇sysload3'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-2972721942608049663</id><published>2007-03-03T10:23:00.000+08:00</published><updated>2010-07-23T02:38:36.311+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='代码'/><title type='text'>Torrent文件格式</title><summary type='text'>ed2k链接包含了文件长度和md4值，有了这两部分信息就很容易验证某个文件是否正确。而我在用BT下载某个文件前，有时想检查一下本地是否已经有了该文件的副本。可是很遗憾，我的目的无法达到，或者说不一定能够达到。

本文只涉及Toreent文件格式，TheoryOrg有一份v1.0的BT协议文本，有兴趣了解BT协议其他部分的可以自己看一下。

Torrent文件格式简单得可爱，其使用了一种叫bencoding的数据表达方法，支持四种数据格式：字符串、整数、列表、字典。一个Torrent文件就是一个经过编码的bencoding字典。bencoding的编码方式如下：

字符串格式为“[[长度]:[数据]]”。其中第一部分长度为ASCII表示的十进制数字，两部分中间用冒号分隔。例：4:spam。
整数格式为“[i[数据]e]"。开始标识i和结束标识e之间也是用ASCII表示的十进制数字，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/2972721942608049663/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/03/parse-torrent-file-by-ruby.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2972721942608049663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/2972721942608049663'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/03/parse-torrent-file-by-ruby.html' title='Torrent文件格式'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-718365798178613138</id><published>2007-01-31T10:57:00.002+08:00</published><updated>2010-12-29T22:45:16.555+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>如何在XP中使用微软雅黑</title><summary type='text'>虽然观感是很个人的问题，但中易宋体的内嵌点阵确实要比微软雅黑来得清晰锐利。不过微软雅黑的意义在于实现了中文字体的ClearType和平滑缩放，这却是中易宋不能比拟的优势。看久了，大概也就习惯了吧。

目前微软雅黑的版本窜到了5.0，但仍有不小改进空间。文字大小参差不齐的情况依然。中文数字“一”在连续出现时会连在一起，如“一一解决”看起来就是个破折号。最难看的是标点符号部分，尤其是左右单、双引号，两对符号形状完全一样，只是略为靠左或靠右。

想在XP中使用Vista的字体，网上流传的方法大多不太完整，要不就显得太为暴力。这里提供一个较为全面的方案，除了尽可能安全外，还解决了如日文和韩文乱码等问题。

首先需要获得Vista的内置字体，简体中文的字体名为微软雅黑，还有繁体中文的微软正黑，日文的Meiryo，韩文的Malgun。这几个字体目前最新的版本都是v5.00，HuangYongTao</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/718365798178613138/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/01/how-to-use-vistas-font-in-xp.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/718365798178613138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/718365798178613138'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/01/how-to-use-vistas-font-in-xp.html' title='如何在XP中使用微软雅黑'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6800467098521476141</id><published>2007-01-28T20:32:00.000+08:00</published><updated>2010-07-23T02:38:42.813+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='御宅'/><title type='text'>《战神》：好故事，虽然不太懂</title><summary type='text'>最近没发现什么好玩的游戏，又把《God of War》翻出来了，正好还有个God难度没打过。一路都还算顺遂，可现在卡在Ares之战的第二场。看到网上有人说这里卡了两个月，所以我也不着急，慢慢磨吧。

能让我这种Light User拿起手柄挑战最高难度的五周目，《战神》当然很好玩。不过我想说的不是关卡设计或者打击手感什么的，我觉得更加难得的是，一个动作游戏还能编出个不错的故事来。

《战神》是一个18禁游戏，除了有暴力血腥的镜头以外，连故事情节都很少儿不宜。但没打过游戏的人也别误会，所谓“少儿不宜”，跟色情没什么关系。只因为这个游戏里没有所谓的好人，没有正义和邪恶的对决，一切的杀戮都显得毫无意义。

主角Kratos本来就是个嗜血的斯巴达人。当他在一次战斗中失败，面对敌人即将落下的斧头时，他大喊Ares的名字乞求帮助。Kratos得救了，并且从此成为了Ares的仆人。为了将战火献给他的主人</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6800467098521476141/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/01/good-story-god-of-war.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6800467098521476141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6800467098521476141'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/01/good-story-god-of-war.html' title='《战神》：好故事，虽然不太懂'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-3338797420349791860</id><published>2007-01-26T11:55:00.000+08:00</published><updated>2010-07-23T02:38:44.659+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>智能ABC之后</title><summary type='text'>Vista拿掉了智能ABC，很多人都不满意，包括我在内。于是网上开始流传着“Vista版智能ABC”，以及关闭IE7保护模式的方法。可排除了个人情绪之后，我也只能说，这怪不了微软。

在微软主页上我翻到了一条旧闻，标题是《国家有关部门与微软签署Windows 95™中文版项目标准规划合作协议书》。其中有这么两句：“Windows 95™中文版将选择全国信息技术标准化委员会推荐的标准规划化中文字和规划化中文输入法。该委员会将根据中国政府有关部门的规定，以合理的方式和价格向微软进行技术转让。”

大家都知道，Win95中除了拼音、区位之类几乎没什么实用性的输入法外，主要附带的输入法就是智能ABC和郑码两种。前者的开发者为北京大学朱守涛，后者的版权则属于北京中易电子公司。两者与信标委应该都不存在上下级关系，“该委员会……向微软进行技术转让”不知从何谈起，想来无非也就是“政府协调”吧。

</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/3338797420349791860/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2007/01/after-znabc.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3338797420349791860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3338797420349791860'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2007/01/after-znabc.html' title='智能ABC之后'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-5003342076567714465</id><published>2006-12-25T07:55:00.000+08:00</published><updated>2010-07-23T02:38:46.554+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>Why UTF-8 Sucks</title><summary type='text'>Linux应该用哪一种locale，这还用得着问么，当然是UTF-8。如果在充满愤青的开源论坛上对此提出异议，那你就等着被拍吧。不过我还是有些不同的意见，而且标题为“Why XXX Sucks”的文章看多了，感觉这个句式挺爽，所以今天试着说说，为什么UTF-8也sucks。

首先，使用UTF-8保存文本，会使字节数膨胀。具体增加值根据文本类型会有所不同，对于中文用户而言，UTF-8文件尺寸约为GBK内码的1.5倍。在存储成本越来越低的今天，这的确有点鸡蛋里边挑骨头的味道，所以放在第一个说。

其次，排序方法不符合用户习惯。虽然我没有找到可靠的资料说明Unicode采用了怎样的编码顺序，但翻阅Unicode的码表可以看出，应该是主要采用了笔画序。如果你也像我一样有很多mp3文件，以演唱者为目录名分类存放，你就知道那有多痛苦了。类似的问题其实很容易遇到，例如通讯录中的联系人名单等。

第三</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/5003342076567714465/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2006/12/why-utf-8-sucks.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5003342076567714465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5003342076567714465'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2006/12/why-utf-8-sucks.html' title='Why UTF-8 Sucks'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6360601266018261303</id><published>2006-12-14T09:07:00.000+08:00</published><updated>2010-07-23T02:38:48.535+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='物件'/><title type='text'>更新小k</title><summary type='text'>我的手机是索爱的k750i，起码几天前还是。这个手机用了有一年多，虽然我也没有特别珍惜爱护，可对我来说意义其实蛮特别的。拿回来的时候软件版本是R1J002，过不多久就有新版本出来了。当时小k虽然已经被破解，但非官方的刷机是要收钱的。而我的CDA是102337/1，在官网上升级有可能被刷成英文机，所以一直没动过。

前几天突然想起，上网随便逛了一下，发现小k已经被完全破解了。有个叫Darkmen的乌克兰人完成了破解小k的最后一步，他发布了一个FAR的插件SEFP，通过该插件可以对小k的内部文件和存储器进行直接操作，完成刷机所必须的“闭合”。这不过是今年6月4号的事情，可这几个月来国内外手机论坛都蛮热闹的，有关小k刷机改机的内容非常多。

仔细看了看，虽然单纯升级系统的意义不大，不过有几个补丁还是挺吸引人的。例如修改标点符号的排列顺序，把中文标点提前；对方接电话的时候震一下手机，可以提醒你；</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6360601266018261303/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2006/12/updated-my-sonyericsson-k750.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6360601266018261303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6360601266018261303'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2006/12/updated-my-sonyericsson-k750.html' title='更新小k'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-6484875786621270689</id><published>2006-12-11T01:09:00.000+08:00</published><updated>2010-07-23T02:38:50.510+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网络'/><title type='text'>Zooomr：年轻真好</title><summary type='text'>过去一直在用flickr，前几天因为一个心血来潮的理由，集中体验了一下很热门的几个相册服务，包括Zooomr、23hq、Zoto、PBase等等。虽然最后还是觉得flickr最好，而且Zooomr"&gt;连第二也排不到，不过仍然觉得这是个很有意思的地方。

这家站最被容易被人口口相传的有这么几点：相册服务的后起之秀，flickr的追赶者；可能会被收购，传言金额在500万美元左右；只有一个（以前的事了）站长兼程序员，当年17岁，今年18岁。不过这些特点跟用户的关系不大，而我对Zooomr的第一印象却好坏各半，感觉这里做得很时髦，却也很粗糙。

时髦在申请账户的时候就可以感觉到了，Zooomr并不自己管理用户认证，而是用了OpenID。所谓OpenID，就像你在MS、Yahoo、Google，只要申请过一个账户，就可以使用该站旗下的所有服务。只不过MS他们的账户只限于自己的旗下网站，OpenID</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/6484875786621270689/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2006/12/zooomr-passion-and-immature.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6484875786621270689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/6484875786621270689'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2006/12/zooomr-passion-and-immature.html' title='Zooomr：年轻真好'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-1150544916382748518</id><published>2006-11-10T01:17:00.000+08:00</published><updated>2010-07-23T02:38:52.791+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='杂碎'/><title type='text'>律制初步</title><summary type='text'>律制基础

听觉位列五感之一，音乐可以说是人类与生俱来的才能和需要。而音乐作品的创作、乐器的设计和制造，都需要选出特定的几个音作为标准和素材，律制就是为解决这一问题而已产生的。

在很早以前人们就发现，人耳对于音高的比值较为敏感，而对绝对音高则并不敏感。在人类通过研究物理发现“频率”以前，律制通常是借由物体的长度、容积等物理量进行对比的，而现代则多采用频率比。

比值进行比较和运算十分麻烦，需要进行乘除法甚至乘法、开方运算。而当数学发展到对数产生时，律制的计算获得了大幅度的简化。将比值取同一个数为底的对数（例如常用对数），乘除法可简化为加减法，乘方开方运算可简化为乘除法。（对数运算法则可见维基百科）

由于对数通常为小数，纪录和书写不便，人们又通过其他手段发展出其他单位来表示音高的比值。最常用的一种叫做音分，将八度音程划分为1200音分。求某个比值相当于多少音分，可比值取常用对数，乘以</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/1150544916382748518/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2006/11/tone-system-basic.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1150544916382748518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1150544916382748518'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2006/11/tone-system-basic.html' title='律制初步'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-3481024914920145431</id><published>2006-11-01T00:26:00.000+08:00</published><updated>2010-07-23T02:38:55.850+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='杂碎'/><title type='text'>乐理初步</title><summary type='text'>简谱上用的阿拉伯数字1、2、3、4、5、6、7，唱名分别为do、re、mi、fa、sol、la、si。每两个音之间都有相对固定的音高差距，即所谓音程。唱歌会走音，是因为没有把握好音程关系，发音的频率偏高或偏低。

如今表示音高，通常使用C、D、E、F、G、A、B这7个字母。C到B分别与do到si相对应，又叫音的音名。表示音高的方法有两种，分别应用于物理和音乐两种学科。物理学上表示音高，用一个大写字母加一个表示音组的数字，例如C4、B6。音乐中则分小字组和大字组。小字组用小写字母表示，如c、d。比小字组高的为小字一组、小字二组等，用小写字母标示并在右上方加组数。比小字组低的依次为大字组、大字一组、大字二组等，大字组使用不带数字的大写字母标记，其他则用大写字母加右下方的组数表示。

有关音乐方面的标准音高有两个，第一国际音高是1834年在德国斯图加特决定的a1=440Hz，第二国际音高是</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/3481024914920145431/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2006/10/music-theory-basic.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3481024914920145431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/3481024914920145431'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2006/10/music-theory-basic.html' title='乐理初步'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-8026487224685667117</id><published>2006-10-28T23:25:00.000+08:00</published><updated>2010-07-23T02:38:57.582+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='八道'/><title type='text'>小叔出世</title><summary type='text'>第一次有当长辈的感觉，已经是很久以前了。那时我才17、8岁，正值春节，我哥的高中同学、我妈的干儿子，带着他的老婆和出生不久的儿子，来我们家拜年。因为事前没有通知，我们家也没有准备，我还躺在床上没有起来。我妈说让我也见见自己的干侄儿，于是就把那个被衣服包得紧紧的婴儿交到了我手上。怕摔了他，我就把腿弓起来，把他放在我的大腿上，跟他打了第一个照面。

干哥哥夫妻算得上是俊男美女，儿子自然也差不到哪里去。眉眼周正，小脸肉乎乎的，透着嫩嫩的粉红色。或许是搞不清楚我这个陌生人是谁，一双漂亮的眼睛很疑惑地盯着我。那个表情很可爱，就像是初生的小猫小狗一样，我也笑着跟他对视。可惜顶多过了三秒钟，他就放开嗓子哭了起来。我究竟还是没能获得他的青睐，急忙把孩子还给了他的母亲。

第二次同样也是过年，叔伯姑婶齐聚在爷爷家里，我二姑的女儿，也就是我的表姐，带来了一个孩子，说是她的儿子。我稍微有点吃惊，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/8026487224685667117/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2006/10/become-little-uncle.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8026487224685667117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/8026487224685667117'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2006/10/become-little-uncle.html' title='小叔出世'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-5238425795892614241</id><published>2006-10-24T01:26:00.000+08:00</published><updated>2010-07-23T02:38:59.652+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='御宅'/><title type='text'>近期玩过的几个PS2游戏</title><summary type='text'>古堡迷踪ICO

叫好不叫座的一个游戏，玩之前就抱着几分好奇，想知道究竟是怎么一回事。

几年前的画面拿到今天来看，不消说是简陋了些。不过气氛还是营造得很不错的，广阔而又空旷的古堡，逃命的少年。操纵着ICO在悬崖和高墙上移动和跳跃时，我忍不住有些发怵。于是对这个游戏我有了自己的理解，ICO之所以一见到少女就决定带她一起走，未必是出于英雄救美的心态，也许仅仅是害怕孤单而已。

可惜除此以外，整个游戏就乏善可陈了。动作解谜的游戏是否好玩，很大程度上取决于谜题的设计。这方面该游戏的表现一般，堪堪及格，没有什么特别吸引人的。而且故事的交待也很有缺陷，玩过之后脑子里有一大堆的“为什么”、“怎么会”，十分有损代入感。

《旺达与巨像》我也没玩过，据说跟这个游戏一脉相承。虽然口碑也非常好，可打过这个游戏之后，我对《旺达与巨像》的期待还是减了几分。

Monster Hunter

</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/5238425795892614241/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2006/10/played-some-ps2-games-recently.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5238425795892614241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5238425795892614241'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2006/10/played-some-ps2-games-recently.html' title='近期玩过的几个PS2游戏'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-5656965199468273743</id><published>2006-08-05T16:23:00.000+08:00</published><updated>2010-07-23T02:39:02.816+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>Opera字体问题的一篇笔记</title><summary type='text'>首先需要在opera:config中关闭core X fonts支持，并确认打开了xft fonts支持。opera的字体选用机制已经很莫名其妙了，没必要还跟core X fonts纠缠。之后在高级设置的国际字体中，针对简繁体中文选择你喜欢的字体。如果运气足够好的话，你已经拥有了不输firefox的字体描绘品质，不过事情一般都不会这么顺利就是。

假如你发现采用gbk/gb2312编码的网页表现良好，但utf8编码的网页却很糟糕，那很有可能是你使用了utf8的locale，例如zh_CN.utf8。opera并不认为zh_CN代表间体中文，虽然有些怪异，可看起来就是这样。解决的办法是在非utf8的locale下启动opera，例如zh_CN.gbk或zh_CN.gb2312。

你可以每次都在term中敲LANG=zh_CN.gbk opera &amp;启动程序，可以写一个脚本完成这件事，</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/5656965199468273743/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2006/08/opera-font-config-in-linux.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5656965199468273743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/5656965199468273743'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2006/08/opera-font-config-in-linux.html' title='Opera字体问题的一篇笔记'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-1576339249712671844</id><published>2005-12-17T13:43:00.000+08:00</published><updated>2010-07-23T02:39:04.524+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>VIM全角标点的宽度问题</title><summary type='text'>

当使用GVIM且set encoding=utf8时，某些中文字符（如双引号）的宽度不正常——明明是全角字符，但却按照半角字符的宽度来显示。

这个问题困扰了我蛮久，在网上也搜不到解决办法。后来逼不得已，钻进VIM的源码里逛了一圈，才找到了答案。有兴趣知道细节的请去看mbyte.c中的utf_char2cells函数，这里只说结果。

原来在Unicode中，有一部分字符是“不定宽度”的。如全角的引号、破折号，在中文系统中应该占两个字符的位置，而在西欧语系的系统中则只占一个字符的位置。至于那些个白人明明已经有ASCII范围内的引号和减号用了，为什么还来掺和全角标点，我就不知道了。

GVIM中，对于“不定宽度”的字符，默认情况下是按照半角显示，这就是问题的由来。只要set ambiwidth=double，就可以使这些这些字符正常显示了。</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/1576339249712671844/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2005/12/ambiwidth-chars-in-vim.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1576339249712671844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1576339249712671844'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2005/12/ambiwidth-chars-in-vim.html' title='VIM全角标点的宽度问题'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_WDffCNVga7A/SW2yYvDWMMI/AAAAAAAABBs/e1wTErq3oYU/s72-c/vim_ambiwidth.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-898049633712407853.post-1488294192047601245</id><published>2004-04-02T06:23:00.000+08:00</published><updated>2010-07-23T02:39:06.555+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='程序'/><title type='text'>愚人节乱谈</title><summary type='text'>去年愚人节，因为心情原因，我在网上疯了好一阵子。一年过去，也不知道好多事情是变了还是没变。反正是想要做点什么事情留下来就对了。下面这些东西花了我好几个小时，可惜因为脑子不清楚，也只好切题乱谈了。



小小追忆一下革命历史。我刚开始接触Linux似乎是很久以前的事了，具体有多久我自己也不记不清楚了，依稀记得那个时候红帽和蔓德拉草都只要1张光盘。对了，那个时候Xterm Linux还没正式推出。根据这个线索Google了一下，大概是恐怖大王就要降临的时候。

那时我给机器升了一级，余下一块1.2G的硬盘。用又嫌太小，卖又卖不了几个钱，于是就打算让他来发挥余热。

刚开始接触Linux的回忆可不怎么美好。安装时间远比我想像的长，至少比Windows95要长。体积也颇为惊人，1.2G也只是勉强够装下系统而已。而且好几次装完后，遇到Li问题。再来就是没完没了的硬件支持和中文支持问题。

</summary><link rel='replies' type='application/atom+xml' href='http://otnth.blogspot.com/feeds/1488294192047601245/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://otnth.blogspot.com/2004/04/talking-in-april-fools-day-of-04.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1488294192047601245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/898049633712407853/posts/default/1488294192047601245'/><link rel='alternate' type='text/html' href='http://otnth.blogspot.com/2004/04/talking-in-april-fools-day-of-04.html' title='愚人节乱谈'/><author><name>oCameLo</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
