存档

作者存档

OpenInkpot 0.2 rc5和rc6试用手记

2009年12月6日 没有评论

OpenInkpot 今天推出了rc6版本(下载)。RC6的主要还是以修复bug为主,增加了两个新功能,一个是增加了djvu格式的支持,另一个是支持在书架视图当中显示书籍的元数据信息,例如作者等。

连同之前推出的rc5版本,rc6已经基本上具有了可以发布的质量,尤其是rc5开始的对PDF阅读器LocolPDF的优化,使得PDF的阅读速度大大提升,虽然尚不足以和官方固件媲美,但是速度已经可以接受了。而rc5新添加的PDF“匹配文字宽度”模式,更是达到了官方固件切白边相同的效果。比起官方固件只有三级放大,OI可以支持在按文字宽度匹配的基础上微调文字大小,可以实现更加细致的手工切白边,典型的是一些具有页眉的PDF文件,例如下面这张图,在书籍的右上角因为有页眉,如果使用官方固件,则右侧会有大片空白,效果如下:

自动切白边的效果

自动切白边的效果

但是使用OI,则可以按阅读器右侧的放大按钮,使得文字充满页面(见下图):

手工切白边的效果

手工切白边的效果

而RC6的新功能:在书架模式下面显示文件的元信息则给我带来了点小麻烦。因为我的PDF文件当中的元信息大部分都是不对的,一部分是因为我没有认真的设置它们,另外有些网络上下载到的PDF当中的元信息也没有很好的设置。而且,对于具有中文的元信息,有时候会有乱码。这个新功能是最近才加入的,因此可能有很多问题,作为绕过方案,dottedmag建议SSH到设备上,然后删除 /usr/lib/extractor-mini/*-pdf.so。

这个做法并不能彻底解决问题,尤其是乱码。考虑找一个合适的PDF文件,给开发者提一个bug。

标签: ,

招商银行专业版的几个问题和解决方案

2009年11月23日 1 条评论

用招行专业版有一段时间了,其间遇到的问题无数,而且每个问题都让我这个计算机专业人员极其困扰,客服电话也打了无数,每个平均半个小时,大多数问题都是在客服的启发下自己一个个尝试出来的,希望直接一个客服电话搞定也不太可能。

好在大多数问题都是兼容性问题,因为招行专业版本质上就是一个IE的壳,因此IE的版本和配置对于招行专业版有很大的影响。而且和国内的其他银行一样,为了保证密码的安全性,招行专业版使用了ActiveX控件来处理密码输入,这个ActiveX甚至会直接操作键盘驱动,因此,和其他软件常有冲突。这些问题大部分可以通过修改IE配置的方法绕过。考虑到未来有人会遇到类似的问题,整理一下放在这里吧。

明明网络已经连接,但是登录的时候还是报“通讯错误”,或者“xxxx不是有效的日期”之类的诡异问题

这个通常出现在安装了IE8的机器上,因为专业版貌似用了很多山寨的方式来包装IE,导致IE升级到IE8之后有众多冲突,两个冲突的大头是IE8的内存保护(DEP)和https证书验证。

首先是内存保护(DEP),这是个很有用的功能,可以极大增强计算机的安全性,防止很多导致中毒的恶意网页,但是偏偏和专业版有冲突,所以,使用专业版的时候,临时禁用它吧。方法是在IE的Internet选项当中的高级下面,将“启用内存保护减少联机攻击”前面的勾去掉。

另一个就是https证书验证。IE8开始检查证书吊销列表,这样可以保护用户免受一些被泄露的https证书的伤害。同样专业版和它冲突,(并不是说专业版的证书泄露了,只是功能不兼容)。方法是在IE的Internet选项的高级下面,将“检查服务器证书吊销”前面的勾去掉。

在转账、汇款等需要输入密码的地方,遇到“通讯环境内存操作失败”

这个很可能是和机器上其他的密码控件的冲突,例如QQ的登录框当中的控件,360保险箱等等。正常情况下关闭QQ,禁用保险箱再重新登录即可。

-2009年11月30日更新-
今天升级了360安全卫士之后发现又不能用了,发现是专业版和360安全卫士的主动防御模块冲突。暂时关闭360安全卫士(同时会禁用主动防御)就可以了。

其它问题,持续整理中。

标签: ,

从电子书分发网络书仓网说说电子书阅读

2009年11月19日 2 条评论

今天偶尔在twitter上看到了@zheng(非墙版),一位从事电子出版工作的同仁。跟踪他的Bio发现了网站epubsys,以及其旗下的三个子站:面向阅读者的电子书分享和分发网络书仓网,面向企业的出版物分发网络企业铺,和其核心产品虚拟印务。看得出来这个公司对于电子阅读有他们自己的一套 看法,试用了一下书仓,感觉还不错。可以用多种格式下载电子书,可以自己在线制作电子书。假以时日,希望这里会变成我的主要阅读来源。

对于电子书阅读方式来说,通常可以归结为几种媒介:PC,手机和其他便携设备,电子书阅读器。本人有幸同时使用这三种媒介阅读电子书,下面就我的看法说说这几种不同的媒介的特点。

其中PC具有良好的带宽和运算能力,在线阅读和下载阅读都可以有很好的体验,弱点是无法随时随地阅读,同时这也是个优势:更加适合大块时间来阅读。但是PC的液晶屏对眼睛的损伤导致阅读体验并不非常好。

手机具有便携性和较好的网络访问能力,但是手机的屏幕较小,电池续航能力有限,不适合长时间阅读;手机的优势也是显而易见的,可以随时随地访问到实时内容。因此手机比较适合阅读新闻或小品文,不太适合逻辑缜密需要仔细思考的长文章的阅读。

电子书阅读器(特指基于e-ink的专用电子书阅读器),根据不同的厂商,可能有网络访问也可能没有,便携性尚可。其卖点是电池的续航能力和e-ink类似纸张的显示方式。这个更像是在手机和PC的中间层当中寻找市场,提供便携的大段时间的阅读,例如飞机和地铁。同时这一类阅读体验更加受Geek的欢迎。

因此,一个优秀的电子书阅读器分发网络必须同时考虑这三个途径,Amazon从基于eInk的Kindle开始,然后推出手机(iPhone)的阅读客户端和PC客户端,就是走这样一条道路。这一点书仓网做的不错。唯一不足的是,电子书阅读器尚且没有很方便的支持。实际上这个不能怨书仓,因为电子书阅读器现在尚且年轻,系统相对专用和封闭。不过随着其发展,OpenInkpot这种开源的固件和NOOK这种基于Android的阅读器应该会更受欢迎。

考虑到手机和电子书阅读器这种设备的时候,有另一个需要考虑的问题就是书籍同步。由于厂商的差异,有的设备是无法实时访问网络的,因此需要一个PC端的软件进行管理。这个可以参考Apple的iTune + iPod的模式。PC端软件专注管理,设备专注阅读。

可惜的是,国内的设备制造商们并不看好这个电子书分发网络的建立,翰林不必说,一个校办工厂可能觉得,能够做到OEM/ODM很多产品已经不错了;而国内另外一家汉王,则认为预装才是硬道理。而他们的完全基于目录的书籍管理方式,则明显看出来并无意关注书籍管理方面。

对于我们的需求和厂商的思路这对矛盾,可以选择两种:选择Kindle或NOOK这种基于某个厂商的设备,或者自己动手,丰衣足食。如果选择后者,依赖OpenInkpot改造设备,再依赖书仓进行书籍分发和发现,足够。

但是OpenInkpot现在缺少一个优秀的客户端。这就是我最近在做的东西:liboi – Computer side OpenInkpot management library.

[转] 我们没有时间失败——德国总理默克尔在美国国会的演讲全文

2009年11月12日 1 条评论

来自: http://jianchengdaizi.blog.sohu.com/136426926.html

估计被和谐就是时间问题。

背景知识:

2009年11月3日,德国总理默克尔在美国国会作了题为《我们没有时间失败》的演讲,国会全体议员在演讲中多次起立为她的演讲鼓掌。同日,新华社的新闻,演讲内容变成了《 德国总理呼吁为保护自然环境开展国际合作》,演讲内容变为以下简短的三段内容 (参见这里):

新华网华盛顿11月3日电(记者赵毅 蒋国鹏)德国总理默克尔3日在美国国会发表演讲,呼吁国际社会采取一致行动,消除气候变暖给人类造成的危害。

默克尔在讲话中表示希望通过12月在哥本哈根举行的联合国气候变化会议,能够为实现地球温度的上升不超过2摄氏度这样一个目标而达成共识。她强调,保护人类生存环境的机会不容错过。克服全球性挑战只能通过国际社会的合作才能实现。

默克尔在演讲中还呼吁世界各国共同打击国际恐怖主义和极端势力。她表示,德国准备在国际反恐领域承担自己的责任。

默克尔究竟讲了些什么呢?这里是演讲全文。汉语翻译只有前面部分,后面的大多谈到的德国的政策,没有翻译。

We Have No Time To Lose
我们没有时间失败

Madam Speaker, Mr. Vice President, Distinguished Members of Congress,

议长女士,副总统先生,尊敬的议员,

I would like to thank you for the great honor and privilege to address you today, shortly before the 20th anniversary of the fall of the Berlin Wall.I am the second German Chancellor on whom this honor has been bestowed. The first was Konrad Adenauer when he addressed both Houses of Congress in 1957, albeit one after the other.Our lives could not have been more different. In 1957 I was just a small child of three years. I lived with my parents in Brandenburg, a region that belonged to the German Democratic Republic (GDR), the part of Germany that was not free. My father was a Protestant pastor. My mother, who had studied English and Latin to become a teacher, was not allowed to work in her chosen profession in the GDR.

今天,在柏林墙倒塌20周年的前夕,我要感谢你们给我的巨大荣殊荣对你们演讲。我是第二个获此殊荣的德国总理。第一位是克拉得-阿登诺,他在1957年先后对参众两院发表演讲。我们的命运大不一样。1957年我只是一个三岁的小孩,和我的父母住在布兰登堡,这是一个属于民主德国的地区,也是德国没有自由的那部分。我父亲是一个新教牧师。我妈妈学习过英语和拉丁语,好作一名教师,却不获允许在民主德国从事她选择的职业。

In 1957 Konrad Adenauer was already 81 years old. He had lived through the German Empire, the First World War, the Weimar Republic and the Second World War. The National Socialists ousted him from his position as mayor of the city of Cologne. After the war, he was among the men and women who helped build up the free, democratic Federal Republic of Germany.

1957年,阿登那总理已经81岁。他经历过德意志帝国,第一次世界大战,威玛共和国,和第二次世界大战。国家社会主义党把他从科龙市长的位置赶走。战后,他和所有人一起帮助建立一个自由、民主的联邦德国。

Nothing is more symbolic of the Federal Republic of Germany than its constitution, the Basic Law, or “Grundgesetz”. It was adopted exactly 60 years ago. Article 1 of the Grundgesetz proclaims, and I quote, “Human dignity shall be inviolable”. This short, simple sentence – “Human dignity shall be inviolable” – was the answer to the catastrophe that was the Second World War, to the murder of six million Jews in the Holocaust, to the hate, destruction and annihilation that Germany brought upon Europe and the world.

没有什么比联邦德国宪法更有标志性了,就是基本法,或者“Grundgesetz(宪法)”。宪法采用刚好60年。宪法第一章宣称,我引用,“人的尊严不可侵犯”。 这个简短的句子–“人的尊严不可侵犯” — 解答了德国带给欧洲和世界的二战灾难,对600万犹太人的大屠杀,仇恨,破坏和灭绝。

November 9th is just a few days away. It was on November 9, 1989 that the Berlin Wall fell and it was also on November 9 in 1938 that an indelible mark was branded into Germany’s memory and Europe’s history. On that day the National Socialists destroyed synagogues, setting them on fire, and murdered countless people. It was the beginning of what led to the break with civilization, the Shoah. I cannot stand before you today without remembering the victims of this day and of the Shoah.

11月9好只有几天了。正是1989年11 月9号, 柏林墙倒下,也正是1938年 11 月 9号,成为德国记忆和欧洲历史不可磨灭的一个标志。在那一天,纳粹破坏教堂,并付之一炬,杀害无数的人。那一天是文明破碎的开端,是大灾难。我站在你们面前,不能不回忆起那一天和大灾难中的受害者。

And I cannot stand before you today without mentioning how grateful I am for the presence of one guest, who personally experienced the horror of National Socialism in Germany and whom I recently met personally: Professor Fritz Stern.

站在你们面前,我也不能不提对作为贵宾的Fritz Stern教授的感激,他经历过德国纳粹的恐怖,我最近刚与他见过面。

He was born in 1926 in what was then the German city of Breslau and today is the Polish city of Wroclaw. He and his family were able to escape the Nazi regime in 1938 and flee to the United States. In his autobiography, published in 2006 under the title “Five Germanys I Have Known”, Fritz Stern describes the moment of his arrival in New York’s harbor in 1938, a haven of freedom and security.

他生于1926年的德国城市不乐斯洛,现在的波兰城市容克罗。他和他的家人在1938年逃出纳粹政权到了美国。他的自传《我所知道的五个德国》在2006年出版,Fritz Stern描述了他在1938年抵达纽约港的时刻,一个自由与安全的天堂。

Ladies and gentlemen, it is wonderful that history willed that we should both – the twelve-year-old boy who was driven out of Germany and me, the Chancellor of reunited Germany who was born in the GDR – be here in this distinguished House. This fills me with great joy and deep gratitude.

女士们先生们,是历史的安排,我们两人–一个20岁被赶出的德国的小伙子,和我,一个出生在民主德国,统一后的德国的总理– 现在在这令人尊敬的国会。这让我满怀巨大的喜悦和深深的感激。

Not even in my wildest dreams could I have imagined, twenty years ago before the Wall fell, that this would happen. It was beyond imagination then to even think about traveling to the United States of America let alone standing here today.

在柏林墙倒下的20年前,即使最大胆的想象,我也想不到发生这些事情。甚至到美国旅行都超出我的想象,更不用说今天站在这里。

The land of unlimited opportunity – for a long time it was impossible for me to reach. The Wall, barbed wire and the order to shoot those who tried to leave limited my access to the free world. So I had to create my own picture of the United States from films and books, some of which were smuggled in from the West by relatives. What did I see and what did I read? What was I passionate about?

一个有无限机会的的国家–我长久以来不可能到达的地方。带着铁蒺藜柏林墙,那些向任何尝试离开使我接触自由世界的限制命令。 我不得不自己电影和书籍里想象美国的图像,这些电影书籍都是从西柏林通过亲戚悄悄带过去的。我看到了什么?我读到了什么?我渴望什么?

I was passionate about the American dream – the opportunity for everyone to be successful, to make it in life through their own personal effort.

我渴望美国梦–让每一个人成功的机会,通过每个人的个人努力而得以实现。

I, like many other teenagers, was passionate about a certain brand of jeans that were not available in the GDR and which my aunt in West Germany regularly sent to me.

我,像许多年轻人一样,非常喜欢在民主德国没有的某个牌子的牛仔裤,我在西德的姑姑定期给我。

I was passionate about the vast American landscape which seemed to breathe the very spirit of freedom and independence. Immediately in 1990 my husband and I traveled for the first time in our lives to America, to California. We will never forget our first glimpse of the Pacific Ocean. It was simply gorgeous.

我渴望美国的疆界,那里好像呼吸着自由与独立精神气息。1990年初,我丈夫和我平生第一次访问了美国的加州。我们永远不会忘记看到太平洋的第一眼。太美了。

I was passionate about all of these things and much more, even though until 1989 America was simply out of reach for me. And then, on November 9, 1989, the Berlin Wall came down. The border that for decades had divided a nation into two worlds was now open.

我渴望所有这些事情,甚至更多,但一直到1989年之前,美国对我远不可及。接着,1989年11 月9日,柏林墙倒下,把一个国家分离成两个世界几十年的边界打开了。

And that is why for me today is, first of all, the time to say thank you.

这就是为什么今天我能够站在这里的原因。首先,我感谢你们。

I thank the American and Allied pilots who heard and heeded the desperate call of Berlin’s mayor Ernst Reuter as he said “People of the world, … look upon this city.”

For months, these pilots delivered food by airlift and saved Berlin from starvation. Many of these soldiers risked their lives doing this. Dozens lost their lives. We will remember and honor them forever.

我感谢美国和同盟国飞行员们,他们听到和关注过绝望的柏林市长恩斯特-的呼救”全世界的人们……..看顾这个城市。” 数月间,这些飞行员们空运食物,拯救了饥饿的柏林。许多飞行员冒着生民危险做这件事,几十个飞行员牺牲了。我们永远铭记和荣耀他们。

I thank the 16 million Americans who have been stationed in Germany over the past decades. Without their support as soldiers, diplomats and generally as facilitators it never would have been possible to overcome the division of Europe. We are happy to have American soldiers in Germany, today and in the future. They are ambassadors of their country in our country, just as many Americans with German roots today act as ambassadors of my country here.

感谢过去几十年,1千6百万曾经驻扎在德国的美国人,没有他们这些士兵,外交官和所有工作人员,永远不可能克服欧洲的分裂。我们很高兴美国士兵驻扎德国,今天直到未来。他们是他们国家在我国的大使,就像许多有德国血统的美国人一样,是我国在这里的大使。

I think of John F. Kennedy, who won the hearts of despairing Berliners during his 1963 visit after the construction of the Berlin Wall when he called out to them: “Ich bin ein Berliner.”

Ronald Reagan far earlier than others saw and recognized the sign of the times when, standing before the Brandenburg Gate in 1987, he demanded: “Mr. Gorbachev, open this gate … Mr. Gorbachev, tear down this wall.” This appeal is something that will never be forgotten.

我想到约翰-肯尼迪,他在1963年柏林墙树立起来后访问柏林,赢得了绝望的柏林人的心,他对他们大声说:“Ich bin ein Berliner.”( 我是柏林人)。 罗纳德-里根比别人更早看到和意识到时代的启示。1987年他站在布兰登堡大门口,他呼求:“ 戈尔巴乔夫先生,打开这道门吧…戈尔巴乔夫先生,推到这堵墙吧。 ” 这是永远不会被忘记的召唤。

I thank George Herbert Walker Bush for placing his trust in Germany and then Federal Chancellor Helmut Kohl and presenting us Germans with an offer of immeasurable value in May 1989: “Partnership in leadership.” What a generous offer, 40 years after the end of World War II. Just last Saturday we saw each other again in Berlin, along with Mikhail Gorbachev. We also owe him a debt of gratitude.

感谢布什对德国和当时的联邦总理科尔的信任,并在1989年5月给我们德国人一个无法估量的应许:“领导伙伴。” 二战结束40年后的一个多么慷慨的应许。 就在上周六,我们在柏林又见了面,米哈伊尔-格尔巴乔夫也在。我们也欠他一个感激的债。

Ladies and gentlemen, to sum it up in one sentence: I know, we Germans know, how much we owe to you, our American friends. We as a nation, and I personally, will never forget that.

女士们,先生们,一句话:我知道,我们德国人知道,我们欠你们很多,我们的美国朋友。我们最为一个国家,和我个人,永远不会忘记。

All over Europe the common quest for freedom released an incredible power: in the trade union Solidarno in Poland, amongst the reformers surrounding Václav Havel in Czechoslovakia, at the first opening of the Iron Curtain in Hungary and at the demonstrations that took place every Monday in the GDR.

全欧洲对自由的普遍追求释放了不可估量的力量:在波兰的Soldarno的贸易联盟,在捷克斯洛伐克围绕在瓦克拉夫 哈维尔周围的改革者们,在第一个打开铁幕的匈牙利,在民主德国每周一举行的示威人群。

Where there was once only a dark wall, a door suddenly opened and we all walked through it: onto the streets, into the churches, across the borders. Everyone was given the chance to build something new, to make a difference, to venture a new beginning.

曾经只有一堵幽暗的墙的地方,一道门突然打开,我们都走过去了:走上大街,走进教堂,穿越边界。每个人都有机会建设新的事物,创造不同,开始新的冒险。

I also started anew. I left my job as a physicist at the Academy of Sciences in East Berlin behind me and went into politics. Because I finally had the chance to make a difference. Because I had the impression that now it was possible to change things. It was possible for me to do something.

我开始了新生活,我离开了我在东柏林科学院的物理学家的工作,踏入政治生涯。因为我最后有了机会创造不同,因为我有印象,现在可能改变一些事情,我有可能做一些事情了。

Ladies and gentlemen, twenty years have passed since we were given this incredible gift of freedom. But there is still nothing that inspires me more, nothing that spurns me on more, nothing that fills me more with positive feelings than the power of freedom.

女士们先生们,20年过去了,我们获得难以置信的自由的礼物。但是没有比自由更能用积极的感情鼓舞我,激励我,充满我。

A person who has experienced such a positive surprise in life believes that much is possible. Or, to put it in the words of Bill Clinton in Berlin in 1994: “Nothing will stop us. All things are possible.”

一个经历过生命中这样积极的惊喜的人,相信有更多的可能性。或者,用比尔-克林顿在1994年,在柏林的话说:“ 没有什么可以阻挡我们,一切皆有可能 。”

Yes, all things are possible. Like the fact that a woman like me can stand before you today. That a man like Arnold Vaatz, who spent time in prison because he was a dissident during the GDR regime in Dresden, can be here today as a Member of the German Bundestag and of my delegation.

是的,一切皆有可能。就像像我这样一个女人今天能够站在你们面前一样的事实,就像阿诺德-瓦兹那样的男人,他在民主德国政权的Dresden监狱里呆过,因为他是一个不同政见者,但他今天也在这里,作为德国议会代表,我的代表团成员。

All things are possible, also in the 21 st century, in the age of globalization. We back home in Germany know just as well as you do in America that many people are afraid of globalization. We do not just brush these concerns aside. We recognize the difficulties. And yet it is our duty to convince people that globalization is an immense global opportunity, for each and every continent, because it forces us to act together with others. The alternative to globalization would be shutting ourselves off from others, but this is not a viable alternative. It would lead only to isolation and therefore misery. Thinking in terms of alliances and partnerships on the other hand, is what will take us into a good future.

一切皆有可能,即使在21世纪,在全球化的时代。在德国,我们知道,就像你们美国人所知道的那样,许多人害怕全球化。我们不会把担忧置之一旁。我们意识到了困难。我们有责任去说服人民,全球化是每一大洲的巨大的全球性机会,因为它迫使我们一起行动。非全球化会把我们与别人分割开,因而不是可行的选项,那会导致孤立,乃至苦难。相反,以同盟和伙伴的角度来思考则会把我们引向美好未来。

Ladies and gentlemen, it is true that America and Europe have had their share of disagreements. One may feel the other is sometimes too hesitant and fearful, or from the opposite perspective, too headstrong and pushy. And nevertheless, I am deeply convinced that there is no better partner for Europe than America and no better partner for America than Europe.

女士们先生们,美国与欧洲有不同意见,这是现实。人们可以感受到别人在某些时候过度犹豫和害怕,或者从反面角度看,过度刚愎自用和莽撞。但是无论如何,我深深地感到,欧洲没有比美国更好的合作伙伴,美国也没有比欧洲更好的伙伴。

Because what brings Europeans and Americans together and keeps them together is not just a shared history. What brings and keeps Europeans and Americans together are not just shared interests and the common global challenges that all regions of the world face. That alone would not be sufficient to explain the very special partnership between Europe and America and make it last. It is more than that. That which brings Europeans and Americans closer together and keeps them close is a common basis of shared values. It is a common idea of the individual and his inviolable dignity. It is a common understanding of freedom in responsibility. This is what we stand for in the unique transatlantic partnership and in the community of shared values that is NATO. This is what fills “Partnership in Leadership” with life, ladies and gentlemen.

This basis of values was what ended the Cold War, and it is this basis of values that will enable us to stand the tests of our times- and these tests we must stand.

因为把欧洲和美国带到一起并连系在一起的不只是共同的历史,也不仅仅是共同的利益,而是共同面对的全球挑战—全世界都遇到的挑战。这还不够解释欧洲与美国之间的特殊关系,和为什么这种关系能够持续。有更多的原因。把欧美紧密联系和保持紧密联系的是共同价值基础。个人以及个人不受侵犯是普遍理念,是对自由与责任的普遍理解。这是我们所代表的独特的穿越大西洋的伙伴关系,是北大西洋公约组织的共同价值。这就是”领导伙伴关系”的实质,女士们先生们。这个价值基础结束了冷战,是我们经受我们时代考验的价值基础, 而我们必须经受得起这些考验。

Germany is united, Europe is united. That is what we have achieved. Now, today, our political generation must prove that it is able to meet the challenges of the 21 st century, and that in a sense it is able to tear down today’s walls.

德国统一了,欧洲统一了。这是我们已取得的成就。现在,今天,我们政治家必须证明能迎接21世界的挑战,有能力推到今天各种的墙。

What does that mean? First it means building peace and security, second, achieving prosperity and justice, and third, protecting our planet. Here, too, America and Europe are called upon in a very special way.

这是什么意思? 首先,意味着建立和平与安全;其次,实现繁荣和正义;最后,保护地球。这里,美国和欧洲被以特别的方式召唤出来。

Even after the end of the Cold War we are thus faced with the task of tearing down the walls between different concepts of life, in other words the walls in people’s minds that make it difficult time and again to understand one another in this world of ours. This is why the ability to show tolerance is so important. While, for us, our way of life is the best possible way, others do not necessarily feel that way. There are different ways to create peaceful coexistence. Tolerance means showing respect for other people’s history, traditions, religion and cultural identity.

即使在冷战后,我们面对着推到不同生活观念只记得的阻隔,换句话说,人们从心底很难在我们的这个世界里互相沟通。这就是为什么宽容如此重要。对我们而言,我们的生活方式是最好的方式,对别人而言,他们不一定有那样的感受。有不同的方式创造和平共存。宽容意味着尊重其他人的历史,传统,信仰和文化认同。

But let there be no misunderstanding: Tolerance does not mean “anything goes”. There must be zero tolerance towards all those who show no respect for the inalienable rights of the individual and who violate human rights. Zero tolerance must also be shown if, for example, weapons of mass destruction fall into the hands of Iran and possibly threaten our security!

但是不要误会:宽容不是“随他去”的意思。对那些不尊重个人不可剥夺的权利,侵犯人权,必须零忍耐! 在一定条件之下,零忍耐必须彰显,比如,大规模杀伤武器落入伊朗,可能危及我们的安全!

Iran must be aware of this. Iran knows our offer, but Iran also knows where we draw the line: A nuclear bomb in the hands of an Iranian President who denies the Holocaust, threatens Israel and denies Israel the right to exist, is not acceptable!

伊朗必须意识到这一点。伊朗知道我们的应许,但是伊朗也知道我们的底线:否认大屠杀,威胁了以色列,否认以色列的生存的伊朗总统手里的原子弹,是无法被接受的!

For me, Israel’s security will never be open to negotiation. Not only Israel is threatened but the entire free world. Whoever threatens Israel also threatens us! This is why the free world meets this threat headon, if necessary with tough economic sanctions. Ladies and gentlemen, Germany will therefore provide staunch support to the peace process with the aim of realizing a twostate solution, a Jewish State of Israel and a Palestinian state.

对我而言,以色列的安全永远不可谈判。不但夜色列被威胁,整个自由世界也被威胁。谁威胁以色列也在威胁我们!这就是为什么自由世界要面对这个令人头疼的威胁,如有必要,必须有严厉的经济制裁。女士们先生们,德国因此将坚决提供支持旨在实现犹太国家和巴勒斯坦国家的两国方案的和平进程。

We also stand up to the threat of international terrorism. We are aware that no country, no matter how strong, can do this alone. We all need partners. We are only strong if we are part of a community of partners.

我们还要抵御国际恐怖主义。我们意识到无论哪个国家,无论国家多么强大,不能单独抵御威胁。我们都需要伙伴,我们只有成为伙伴中的一员,我们就会强大。

Since we shared the view of the then President George W. Bush, after 9/11, that we had to do everything we could to prevent Afghanistan from ever again harboring a threat to security, Germany has since 2002 been present on the ground with the third-largest troop contingent. We want to make the concept of networked security successful. This means that civilian and military engagement are inextricably linked.

The international community’s commitment in Afghanistan is undoubtedly a tough one. It places great demands on all of us, and it must be taken into the next phase as soon as the new Afghan government is in office. Our objective must be to develop a strategy to transfer responsibility, which we want to do early next year at a joint UN conference. We will be successful if, as we have done up to now, we continue travel this road together in the Alliance, every step of the way. Germany is ready to shoulder that responsibility.

There is no doubt that NATO is and will continue to be the crucial corner-stone of our collective defense. Its Security Concept is being constantly developed and adapted to new challenges. Its foundation and clear compass for peace and freedom will, however, remain unchanged.

It is my firm belief that we Europeans can contribute even more in the future. For we Europeans are currently working towards giving our European Union a new contractual basis. The final signature has just been added. This will make the EU stronger and more capable of action, and thus make it a strong and reliable partner for the United States.

On this basis we can build stable partnerships with others, first and foremost with Russia, China and India. This is because our world is freer and more networked than ever. The fall of the Berlin Wall, the revolution in information and communication technology, the rise of China, India and other countries to become dynamic economies – all this has made the 21st century world a different place from the world we knew in the 20th century. That’s a good thing, because freedom is the very essence of our economy and society. Without freedom the human mind is prevented from unleashing its creative force.

But what is also clear is that this freedom does not stand alone. It is freedom in responsibility and freedom to exercise responsibility. For that reason the world needs order. The near-collapse of the international financial markets showed what happens when there is no such order.

If there is one lesson the world has learned from last year’s financial crisis, it is that there is no alternative to a global framework for a globalized economy. Without universally-binding rules for transparency and supervision there can be no greater freedom but rather we risk the abuse of freedom and thus instability. In a way this is a second wall that has to fall: A wall standing in the way of a truly global economic order, a wall of regional and exclusively national thinking.

The key to cooperation between the major industrialized countries and emerging economies lies in the G20.Here again cooperation between America and Europe is a crucial corner-stone. It is a cooperation that is not exclusive but rather inclusive.

The G20 has shown that it can take action. We need to resist the pressure of those who almost led the nations of this world into the abyss. That means no more and no less than that international economic policy must become more sustainable. This crisis was also an expression of too much short-term thinking. Millions of people all over the world might lose their jobs or even suffer poverty and starvation because of this. To achieve prosperity and justice we must do all we can to prevent such a crisis in the future.

That also means not giving in to the temptation of protectionism. This is why the WTO Doha negotiations are so important. The success of the Doha Round would send a valuable message of the openness of the world economy, particularly in the current crisis.

Equally, the Transatlantic Economic Council can also fulfill an important task. We can use it to prevent competing subsidies and give incentives to reduce trade barriers between Europe and America. I appeal to you: Let us jointly work towards a world economic order which is in the interests of both America and Europe!

Ladies and gentlemen,

the fact that global challenges can only be met by comprehensive international cooperation is also shown by a third great challenge of the 21st century, by a wall, so to speak, separating the present from the future. That wall prevents us from seeing the needs of future generations, it prevents us from taking the measures urgently needed to protect the very basis of our life and climate.

We can already see where this wasteful attitude towards our future leads: In the Arctic icebergs are melting, in Africa people are becoming refugees due to environmental damage, and global sea levels are rising. I am pleased that you in your work together with President Obama attach such significance to protecting our climate. For we all know: We have no time to lose! We need an agreement at the climate conference in Copenhagen in December. We have to agree on one objective – global warming must not exceed two degrees Celsius.

To achieve this we need the readiness of all nations to assume internationally binding obligations. We cannot afford failure with regard to achieving the climate protection objectives scientists tell us are crucial. That would not only be irresponsible from an ecological point of view, but would also be technologically short-sighted, for the development of new technologies in the energy sector offers major opportunities for growth and jobs in the future.

No doubt about it – in December the world will look to us, to Europe and America. It is true that there can be no agreement without China and India accepting obligations, but I am convinced that if we in Europe and America show that we are ready to accept binding obligations, we will also be able to persuade China and India to join in. And then, in Copenhagen, we will be able to tear down the wall between the present and the future – in the interests of our children and grandchildren and of sustainable development worldwide.

Ladies and gentlemen,

I am convinced that, just as we found the strength in the 20th century to tear down a wall made of barbed wire and concrete, today we have the strength to overcome the walls of the 21st century, walls in our minds, walls of short-sighted self-interest, walls between the present and the future.

女士们先生们,
我坚信,正如我们在20世纪找到力量推倒一座铁丝网和水泥的墙,今天我们也有力量克服21世纪的各种墙,在我们心底的各种墙,短视自私的墙,现在与未来的各种墙。

Ladies and gentlemen, my confidence is inspired by a very special sound – that of the Freedom Bell in the Schöneberg Town Hall in Berlin. Since 1950 a copy of the original American Liberty Bell has hung there. A gift from American citizens, it is a symbol of the promise of freedom, a promise that has been fulfilled. On October 3, 1990 the Freedom Bell rang to mark the reunification of Germany, the greatest moment of joy for the German people. On September 13, 2001, two days after 9/11, it tolled again, to mark America’s darkest hour.

女士们先生们,我的信心受到一个非常特被别的声音的鼓励 —- 在柏林Schöneberg市政厅的自由钟的声音。从1950年起,美国自由钟的复制品就一直挂在那里,那是一个美国公民的礼物,是自由承诺的象征,一个已经实现的承诺。1990å¹´10 月3日,自由钟敲响,纪念德国重新统一,那是德国人民欢乐的最伟大的时刻。2001å¹´9 月13日,911后的两天,它又响起,纪念美国最暗淡的日子。

The Freedom Bell in Berlin is, like the Liberty Bell in Philadelphia, a symbol which reminds us that freedom does not come about of itself. It must be struggled for and then defended anew every day of our lives. In this endeavor Germany and Europe will also in future remain strong and dependable partners for America. That I promise you.

Thank you very much.

柏林自由钟,如同费城的自由钟,是提醒我们自由不会自己到来的标志。自由必须由斗争而来,自由必须保护,更新我们生命的每一天。德国和欧洲在这努力过程里,在未来保持与美国的强大而可靠的伙伴关系。 我这样承诺。
非常感谢诸位。

标签: ,

Python multiprocessing 使用手记[1] – 进程模型

2009年11月10日 没有评论

首先从multiprocessing的进程模型开始看。

multiprocessing的目的是创建一个接口和python.threading类似接口的库,用多进程的方式来并发处理。因此创建一个新的进程的的方法也和python.threading很像:

import multiprocessing
 
def dosomething(a,b,c): pass
 
p = multiprocessing.Process(target=dosomething, args=(1,2,3))
p.start()
p.join()

创建的这个新的进程在*nix上面使用的是fork,这意味着子进程开始执行的时候具有与父进程相同的全部内容。请记住这点,这个将是下面我们讨论基于继承的对象共享的基础。所谓基于继承的对象共享,是说在创建子进程之前由父进程初始化的某些对象可以在子进程当中直接访问到。在Windows平台上,因为没有fork语义的系统调用,基于继承的共享对象比*nix有更多的限制,最主要就是体现在要求Process的__init__当中的参数必须可以Pickle。

但是,并不是所有的对象都是可以通过继承来共享,只有multiprocessing库当中的某些对象才可以。例如Queue,同步对象,共享变量,Manager等等。

在一个multiprocessing库的典型使用场景下,所有的子进程都是由一个父进程启动起来的,这个父进程称为master进程。这个父进程非常重要,它会管理一系列的对象状态,一旦这个进程退出,子进程很可能会处于一个很不稳定的状态,因为它们共享的状态也许已经被损坏掉了。因此,这个进程最好尽可能做最少的事情,以便保持其稳定性。

OpenInkpot 2.0-rc4 新界面

2009年11月9日 没有评论

开源e-ink电子阅读器固件 OpenInkpot 前两天发布了 rc4 版本,该版本最大的可见改变是在选择列表当中将原来作为背景显示的数字单独抽出来作为一列显示。不过我还是觉得,以前那种作为背景显示的方式更好。

rc3之前的OpenInkpot界面

rc3之前的列表界面

rc4之后的列表界面

rc4之后的列表界面

标签:

Python multiprocessing库使用手记(引子)

2009年11月9日 2 条评论

前段时间在做的一个Python项目,需要实现一个后台服务程序,程序流程比较复杂,而且可能经常变动,但是如果把整个流程切分成一些步骤,每个步骤有自己的输入输出和处理。只要将他们的输入输出接在一起,进行不同的组合就可以实现常见的流程变动。

使用多进程的原因是考虑到Python的全局解释器锁(Global Interceptor Lock, GIL)。由于GIL的存在,在CPU密集型的程序当中,使用多线程并不能有效地利用多核CPU的优势,因为一个解释器在同一时刻只会有一个线程在执行。要想尽可能利用多核CPU并发,多进程是必需的。

引入多进程就带来几个问题:首先是这种设计方案需要一个类似于UNIX Pipe的底层结构,说的更确切一点就是message queue,操作类似于Python的Queue.Queue。另一个问题就是需要一个进程间信息共享的基础设施。

先说Queue,这个Queue需要满足下面一些需求,优先级递减:

  • 轻量 – 不需要依赖数据库等比较重型的程序。代价就是丢点东西没关系;
  • 跨进程 – 读端和写端可以不在一个进程当中;
  • 支持多进多出 – 读端和写端都要支持多个进程;
  • 稳定和高效 – 这个就不用多说了吧;
  • 有Pythonçš„API,再不济要有Cçš„API可以让我写Pythonçš„binding。

另外是进程间共享的设施,系统shm是迫不得已使用的,因为要自己处理Pickling和Unpickling,以及一些杂七杂八的竞争条件问题。有建构在上面的现成的库最好。

最终出于轻量的考虑,选定了Python的multiprocessing库,而没有用IPC MQ 或 RabbitMQ。这个库在Python2.6被引入到标准库当中,有为2.5提供的backport。因为我们的系统使用的是2.5版本,因此我们使用的其实是2.5的backport。这个实现除了一些细枝末节的地方之外,核心实现和2.6标准库当中是完全一样的。

在使用过程当中,遇到了挺多的问题,在这里一一记录。

Firefox更新了一把

2009年10月18日 1 条评论
标签: ,

OpenInkpot 0.2 中文化进度

2009年10月4日 没有评论

最近OpenInkpot已经发布了官方0.2预发布版本20091001(算是给国庆献礼么?:P),这个版本第一次把中文本地化的内容包含在内,也就是说将来大家使用OpenInkpot的时候就可以看到中文的界面了。大家可以在首次刷机之后选择语言为“简体中文”,或者到设置/Setup里面更改。注意选择语言界面里面9,0两个键不能用来翻页的,小心选中了希腊语。:P

目前中文化的部分仍然在进行当中,已经完成的部分包括:

1. 新的中文字体,使用文泉驿中文字体替换掉了以前的老字体,中文显示漂亮了很多。
2. Wiki页面的中文化,包括用户手册(http://openinkpot.org/wiki/0.2/UsersGuide/zh)和安装指南(http://openinkpot.org/wiki/0.2/InstallationGuide/zh)。
3. 大部分程序界面的中文化。包括书架、非PDF阅读器的大部分。PDF阅读器(LocoPDF)当中的字符串现在还没有抽出来,因此暂时还只有英文界面。中文化进度可以到http://l10n.openinkpot.org查看,有兴趣的也可以注册上去参与翻译和查看翻译进度。

正在进行的工作包括:
1. 随机帮助文档的翻译。这个功能在最近才刚刚加入到OI当中,翻译工作也刚刚开始进行。有兴趣的可以参见http://groups.google.com/group/openinkpot-l10n/browse_thread/thread/ac83e60784869903
2. 应用程序名的翻译。现在还没有好的名字想出来,因此暂时没有提交。征求大家的意见,下面这些应用程序名怎么翻译比较合适:

* FBReader: 默认的非PDF阅读器
* CoolReader: 可选的非PDF阅读器
* LocoPDF: 默认的PDF阅读器
* MadEye: 默认的图片查看器
* 小游戏们:Bridges Puzzle, Fifteen Puzzle, Flip Puzzle, Pegs Puzzle, Solo (Suduko like) Puzzle, Twiddle Puzzle。都是一些益智小游戏,介绍可以参见http://www.chiark.greenend.org.uk/~sgtatham/puzzles/

3. 一些杂七杂八的东西,例如存储器名字,“Internal Storage”和”SD Card”这种,还没翻译。

如果有什么本地化相关的建议,可以直接联系我 (ftofficer@ftofficer.com)

标签:

一个有趣的东西:MIT Personas

2009年10月1日 没有评论

http://personas.media.mit.edu/

简单的说,这个东西就是告诉你“在互联网上,你看起来具有什么样的人格”,也就是说,因姐姐怎么看你呢?。

Personas 是MIT媒体实验室 (Media Lab) 研究员Aaron Zinman和他的伙伴们做的一个数据挖掘系统,利用了很多先进的理论和算法,来构造一个人在互联网上的全局视角。有点好玩。

ftofficerçš„personas

ftofficerçš„personas

不过由于重名的人很多,不可避免会有很大的误差,而且貌似只能理解英文?还好我的ID全球唯一一份,结果应该还算比较靠谱吧。不过结果使用一条长长的条状图来表示,但是每个项目的解释并没有找到,有几个项目,例如genealogy就不知道代表什么。另外,我的legal和illegal竟然一样大小,而religion (宗教) 如此的长。我可是一个行为上遵纪守法的无神论者,难道只是因为我说的太多了……

附:

Personas of Mao Zedong

Personas of Mao Zedong

Personas of Barack Obama

Personas of Barack Obama

因此,因姐姐认为,奥巴马是位政治家、管理者和社会活动者,而毛主席是位教育家、体育爱好者和作家。

标签: