Fool's Garden

Talking about Windows Mobile and Embedded gadgets...Web counter
posts - 58, comments - 98, trackbacks - 0, articles - 4

2007年3月15日

前几天,Google管Search的老大Matts Cutts接受ReadWrite Web的访问,在谈到语义识别在下一代互联网中的应用是,他是这么说的:

Richard: What do you think about semantic technologies (like for example Hakia)? How important is natural language understanding for search and is Google doing anything in this direction?

Matt: We do pay a lot of attention to a lot of different technologies, so I would define Google's approach as very pragmatic. And we keep an eye on the entire space and we try to say, ‘ok what are the areas that are most promising for users?’ Historically it's always interesting to view the progress of semantic technologies. For example if you do a search like: 'how many states are in America?'. Some search engines that claim to be semantic won't do a good job in delivering the right results, whereas Google can do a very good job - even if you think, ‘ok how can they handle natural language, or how can they handle the semantics of that search.’ And I think what Google benefits from is the sheer size of the Web and the sheer amount of data, and it really does help us understand the meanings of words and synonyms. So we do have a pragmatic approach and we don't necessarily place all our bets on one particular way of doing things. We are exploring a lot of different things all at once.

红字那部分,大概是这么说的,“举例来讲,如果你搜索‘美国有多少个州’,有些号称可以处理语义的搜索引擎返回的结果并不好,然而Google却可以做得很棒,即便你会想,‘他们是如何处理自然语言的,或者他们是如果处理搜索语义的呢?’

结果,有人真的做了这个实验,把"how many states are in Aemerica"作为搜索关键字,下面是Google和Windows Live Search得到的结果:

 

这样鲜明的对比,让我不禁想起,当年百度的那个广告,“我知道你不知道我知道你不知道我知道你不知道”。

posted @ 2007-03-15 16:12 Levins Dai 阅读(1194) | 评论 (2)编辑

2006年5月13日

In general, PocketPC supports high-DPI and Low-DPI (192 and 96 respectively) display modes. As you know, image with fixed resolution will be displayed in a smaller size on Higher DPI screen. For example, images on 192 DPI screen will have as 1/2 size as on 96 DPI's. To maintain a consistent image size in both High and Low DPI mode, PocketIE introduces Pixel Doubling, which simply doubles the pixels used in High-DPI display. Just like an auto zoom out on every image pIE is browsing.

Pixel Doubling also affects address bar and status bar. The heights are doubled accordingly in the High-DPI display.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mobilesdk5/html/wce51conpixeldoubling.asp

posted @ 2006-05-13 08:46 Levins Dai 阅读(519) | 评论 (1)编辑

2006年2月24日

We know that WinCE 5.0 supports 32 processes running simultaneously at most. Each process resides in a continuous 32M virtual memory space, namely Slot. The 32 processes slots range from Slot 2 - 33, plus a specific one: Slot 97 for NK.exe. And we also know that Slot zero is special enough to be occupied by the process context that current thread is executing. But why? Why this design choice was made?

The answer is quite simple. We use the same PE format for both desktop and device applications. But because every desktop process gets a 4GB memory space which always counts from 0. So any process running in WinCE is designedly mapped to Slot 0 and then they can share the same memory architecture with desktop couterparts and achieve the compatibility in PE.

posted @ 2006-02-24 19:46 Levins Dai 阅读(539) | 评论 (1)编辑

2006年1月22日

星期六的晚上,我捧着一盒爆米花,坐在电影院里面,看着金刚为了爱咆哮,追逐,死亡。在回来的路上,我问同行的朋友,金刚对Ann究竟是什么样的爱?像慈父?像挚友?像情人?

在现实世界里面,知道自己爱上一个人并不困难,难的是区分出自己的爱,哪一样更多一些。这也就是为什么那么多人在爱面前犹豫、徘徊、退缩。就像电影里面那位话剧女演员说的那样,"他总是不肯说出那三个字,他认为一切尽在不言中。男人们自认为足够强大,可以征服世界,但却任凭真爱从指尖溜过..."

反过来,Ann对金刚的爱再一次说明了,样貌不是问题,身高不是障碍,女人要的可能也就是安全感这么简单。

posted @ 2006-01-22 13:26 Levins Dai 阅读(301) | 评论 (4)编辑

2006年1月15日

In Win32, every single thread has a priority ranging from 0 (lowest priority) to 31 (highest priority). The priority value is determined by both thread priority level and process priority class. GetThreadPriority returns priority level only, you still need to call GetPriorityClass before figuring out the thread priority.

But things are quite different on device side. WinCE 5.0 is designed to support 256 thread priorities but no priority class any more. Both CeGetThreadPriority and GetThreadPriority can be called directly to retrieve a thread priority. Depending on which thread that being queried, the return value of CeGetThreadPriority could range from 0 to 255. Nevertheless, GetThreadPriority only supports application thread with priorities from 248 to 255.

GetThreadPriority is preserved for backward (before WinCE 3.0) compatibility reason. You can safely forget the legacy function and use CeGetThreadPriority instead unless you are porting the applications to desktop, or vice versa.

posted @ 2006-01-15 16:45 Levins Dai 阅读(539) | 评论 (0)编辑

2006年1月6日

According to GSM Spec, Class 0 SMS is defined as text messages that display on MS immediately when arrive and do not have to be saved in MS or SIM. Windows Mobile 5.0 supports sending and receving class 0 SMS, but unfortunately you can only do it programmatically.

There is a managed method Microsoft.WindowsMobile.PocketOutlook.SmsMessage.Send() that can be used to send out SMS in a really convenient way. But again, it does not give a way for you to specify the message class you are going to use.

To send SMS with given message class, you should call Cellcore function: SmsSendMessage():

HRESULT SmsSendMessage (
const SMS_HANDLE smshHandle,
const SMS_ADDRESS * const psmsaSMSCAddress,
const SMS_ADDRESS * const psmsaDestinationAddress,
const SYSTEMTIME * const pstValidityPeriod,
const BYTE * const pbData,
const DWORD dwDataSize,
const BYTE * const pbProviderSpecificData,
const DWORD dwProviderSpecificDataSize,
const SMS_DATA_ENCODING smsdeDataEncoding,
const DWORD dwOptions,
SMS_MESSAGE_ID * psmsmidMessageID);

The 7th parameter is a provider-specific structure you can use to customize a couple of SMS options and flags. For general text provider data, the message class can be set throught the struct member: psMessageClass.

That's the way to go! A little bit tedious actually, but it works, :)

posted @ 2006-01-06 22:21 Levins Dai 阅读(1306) | 评论 (0)编辑

2005年12月31日

我最近已经养成习惯,每个星期一和星期四的晚上9点左右,都会到楼下健身房跑上15分钟。连续几个礼拜,在我跑步的时候,刚好都碰到了CCTV10在播放新年音乐会历年回顾,于是有好几次,我都是伴着蓝色的多瑙河和拉德斯基进行曲,在滚动的橡皮胶带上奔跑。

前天晚上放的是2004年穆蒂指挥的那场,刚好我到的时候又是在放蓝色多瑙河。Muti也算是金色大厅的常客,2004年已经是他第四次在新年音乐会里担任指挥。我家里有一张93年的他指挥的现场,时隔11年,多瑙河的旋律就像他本人一样的容颜一样,似乎没有任何的变化,谁能想到这位一头乌发、留着中分头的帅哥已经63岁了。

2005年的最后一天,北京终于下了场不大不小的雪,我特意跑到公司的露天天台上,仔细观察这些纷纷落落的小雪片,这样的场景让我觉得既熟悉又陌生。突然之间,又开始想念起远方的亲人和朋友,在这里请接受我的祝福,就像每年新年音乐会上都会说的一句,

Frohliches Neues Jahr!

posted @ 2005-12-31 22:05 Levins Dai 阅读(179) | 评论 (0)编辑

2005年11月25日

前面提到过,GSM SMS可以采用7 bits的编码方式,从而在1120 bits的长度里可以容纳160个字符。但有一点没有说清楚(或者说得不正确),理论上ASCII字符集的前127个字符都可以采用这种方式编码,但事实却不是如此。最明显的一个例子是[,ASCII编码为0x5B,但在GSM SMS中却是用两个7 bits来表示。所以当你编辑短信输入[(或者])的时候,就会很奇怪的发现,短信的长度多了14个bits,相当于是两个普通字符的长度。所以,GSM SMS的文字编码和ASCII编码并不是一一对应的,这里有一张完整的列表。

这些奇怪的字符被称之为GSM Extension Characters,更多的情况是,不少的手机根本没有对它们进行特别的处理,而是一看得这些字符,就统统转成UCS2,这也算是一个偷懒省事的做法。

posted @ 2005-11-25 23:41 Levins Dai 阅读(1506) | 评论 (0)编辑

2005年11月10日

在Windows Mobile里面,可以很方便的编辑长度无限制的文字信息,pOutlook会自动把它分割成若干条短信(SMS),再把它们发送出去。但可能很多人也注意到了,在短信编辑窗口的最下面,有类似这样的一串字:"5/160"。很多人直观地认为160是一条短信的最大长度,5是当前输入文字的长度,但随后慢慢地可能发现,这个数字并不是想象的那么直观:

首先,对于不少老式的简体中文手机(比如Noika 8250),短信最大长度通常显示70,而为什么Windows Mobile会是160呢?难道文字短信的长度不应该是统一的标准吗?

其次,更有意思的是,当尝试在Windows Mobile短信编辑窗口里写入汉字的时候,数字160马上变成了70。这又是怎么回事?

产生所有这些令人困惑的问题的原因在于,160这个数字代表的是短信容纳的最多字符个数,而不是其最大长度。按照GSM 900/1800/1900的标准,文字短信的最大长度是140个字节,也就是1120个比特。然而,对于字符本身由于采用不同的编码方式,最后导致了字符个数的不同。显然,如果以每个字符7 bits进行编码(可以支持0-127的ASCII码),那么就是160个字符,这也就是Window Mobile缺省使用的方式。然而,对于双字节汉字而言,一个字符需要2个字节进行编码,因此,当短信内容包含汉字字符时,系统自动采用UCS-2编码,最大长度仅能达到70个字符。

最后,对于某些老式手机(比如上面提到的Nokia 8250),由于目标面对的是中国市场,可能忽略了这些差别,统统采用UCS-2编码,于是,即便你编写纯英文短信,仍然无法超过70字符的限制。

posted @ 2005-11-10 22:10 Levins Dai 阅读(1184) | 评论 (4)编辑

2005年11月8日

War of the Worlds, Spielberg 2005年的科幻电影新作。有人把它翻译成“世界大战”,我觉得这种翻译是错的,因为电影讲述的是外星人入侵地球的故事,是两个不同世界的战争,因此“世界之战”会显得合适一些。

刚看完电影的时候,我对老皮的想象力失望透顶,和我所期待构思精巧、逻辑合理的科幻片实在是有太大差距。但后来,看了一些影评才知道,Spielberg的这一部电影是按照100多年前威尔斯的同名科幻小说改编而成,在故事情节、线索发展,甚至于某些细节上面,都完全忠实于原著。拿现代人的眼光审视19世界末年科幻小说的情景设定,当然会觉得它是有些蹩脚幼稚。

然而,抛开故事背景不谈,Spielberg对于大灾难面前表现出的人性的自私和懦弱、尊严和勇气却刻画得相当的生动。其中,有几幕令我印象深刻:逃难的人群争抢一部汽车;码头上争先恐后的登船场面;Tom Crusie在女儿的呢喃声中杀死神经质的逃难者。不过,拍过“大白鲨”和“辛特勒的名单”的Spielberg,对这一切想来也已是驾轻就熟了,如果把Tom Crusie父女换成是逃难的犹太人,把外星人换成是希特勒的党卫军,这仍然会是一部好电影。

看这类灾难片或者战争片最大的好处是,你不会再有理由抱怨平淡的生活。虽然,每天朝9晚9,毫无新意,但至少不会被长着三只脚的外星怪物追杀,也不用光着膀子和人拼刺刀,基本上,也可以满足了。

posted @ 2005-11-08 22:59 Levins Dai 阅读(244) | 评论 (0)编辑

2005年10月16日

中国国家地理杂志10月份,出了一辑特刊,对中国的高山、湖泊、草原、森林等等进行评选,分别选出最美的几个地方,称之为“选美中国”。本来一个地方美不美,实际上已经是非常主观的东西,国家地理杂志推出这样的专辑和它一贯理性严谨的作风格格不入,未免有些哗众取宠之嫌。难而更另人受不了的是,中国地理起的那些个副标题:

1、南迦巴瓦:云中的天堂
4、梅里:雪神的仪仗队
5、黄山:上帝的盆景
7、乔戈里:遥远的秘境
8、冈仁波齐:众神的居所
9、泰山:华夏的图腾
10、峨眉山:从盆地升向天庭
2、喀纳斯湖:上帝的调色板
3、纳木错:与神耳语的地方
1、巴丹吉林沙漠腹地:上帝画下的曲线
……

如果说,偶而一处两处如此命名,还有一些浪漫主义的味道,但若是通篇充斥着“天”、“神”、“上帝”、“秘境”等等这类的字眼,就不免让人怀疑编辑是否有些媚俗和幼稚。对待大自然,就像对待我们的父亲一样,保持一定的敬畏是正确的,但这并不代表我们应该把一切自然的伟力归功到神灵或是其它超自然的东西上面。我很喜欢一位同事EMail签名档(摘自于《科学的美国人》):

In fact, there is no paranormal or supernatural; there are only the normal and the natural -- and mysteries yet to be explained.

不过话又说回来,550页的全彩特刊才卖16大元,虽然盛传印刷质量低下,但也绝对算是超值了。也难怪在我得到消息之后,跑了几个报刊亭,都被告知已售罄……

posted @ 2005-10-16 20:28 Levins Dai 阅读(702) | 评论 (2)编辑

2005年10月10日

坝上,原为一地理名词,指的是草原和高原交界处形成的丘陵高地地形。我们通常说的坝上指的是河北省与内蒙古交界的塞罕森林公园,它还有一个很好听的名字:"木兰围场"。据说,在清朝时候,每年秋天,皇家都会到此围捕、狩猎,于是就有"木兰秋猎"这样的说法。

今年的国庆,我和几个同学朋友也去了趟坝上,当然打猎是犯法的,我们只是赶在冬天来临之前,欣赏坝上秋天的风光。虽然去得有点晚,很多树木的叶子都已经快掉光了,颜色也有些单调,但是关于秋天的所有象征符号,还是都可以在这找到:枯黄的落叶、光秃秃的树干、金灿灿的黄叶、秋收劳作的农民,等等等。当我来到坝上,面对这样的场景时,心里面只有一个念想:我终于见到了真正的秋天,那些在明信片上,在百科全书里,在幼儿看图识字的画片上一遍遍描述过的场景。

风景是美丽的,但遗憾的是公园的管理却有些混乱。特别是坝上公共交通车超载严重,而私人出租吉普车又良莠不齐,甚至怀疑某些司机是否具备上路的资格。在游玩的最后一天,我们的车从路上直接冲到了旁边的土沟里,幸运的是大家人品不错,只受了点轻伤,不过想起来还是蛮后怕的。

如果问我,还去不去坝上,我想在那该死交通没整治好之前,我是绝不敢再去的了。

posted @ 2005-10-10 20:17 Levins Dai 阅读(398) | 评论 (3)编辑

2005年9月24日

30 years ago, two young men Bill Gates and Paul Allen kicked off a small software company named Microsoft. From 1975 to 2005, Microsoft has shipped thousands of software products which improve people’s work and life dramatically. 30 years later, Microsoft is possibly not the coolest rock star under spotlight, but definitely the one who makes an old dream come true: “A PC on every desktop and in every home”!

 

Though Microsoft’s vision has been changed a lot today, something will not change by any means: to ship more powerful and securer software for making life easier, to connect people, systems, devices and data, to help people and businesses throughout the world realize their full potential. “At the end of the day, the true measure of our success is not the power of our software, but the power it unlashed from you”.

 

I love this company.


(This is how the premier edition of Windows looked when it booted up.)

posted @ 2005-09-24 21:30 Levins Dai 阅读(255) | 评论 (0)编辑

2005年9月17日

Off Site Meeting回来,邮箱里面塞满了上百封未读邮件,再加上订阅的几十个RSS Feed push过来的内容,花了我足足一个晚上,才慢慢将它们处理完。离开北京短短几天还是发生了不少有趣的事情:

1. 随着PDC 2005的临近,Microsoft下一代的技术和产品轮廓慢慢地显露出来,包括:Office 12IE 7 Beta 2SparkleWindows Vista等等。另外,还有一个全新的framework LINQ (Language Integration Query),允许开发人员以统一的接口查询.NET 对象,XML数据,以及关系数据库内容,从而make developer's life easier。另一个有趣的东西是Max,一个基于WinFX的图片存储和共享工具,只要拥有一个.NET Passport就可以通过Max和朋友分享照片,并且时时保持更新状态。目前,Max只是共享图片,我想在不久的将来,可以用它来share更多有趣的东西。

2. Google和Microsoft的官司有了初步的判决,援引路透社的说法,"A Washington judge on Tuesday cleared the way for a former Microsoft executive to work for Google in China but placed tough restrictions on confidential information he had gleaned while working at Microsoft. ",在我看来,这是没有赢家的官司。

3. IT业界收购之风,愈演愈烈,继eBay收购Skype之后,Oracle又将收购Siebel。据说是Siebel中国区首任总经理,写了一篇“论Siebel之倒掉”的文章。

4. 钱来得容易,去的也容易,高盛分析师对百度的一番评论,其市值顿时在一夜之间缩水1/3……其实,百度股价被高估早是不争的事实,这本不出人意料,然而更大的麻烦是,国际唱片巨头联手起诉百度MP3搜索侵犯版权,看来,“不是不报,时辰未到”啊。

贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。

posted @ 2005-09-17 22:37 Levins Dai 阅读(530) | 评论 (2)编辑

2005年8月20日

摄影是表现也是再现,摄影是艺术也需要技术,摄影是记录也是创作……正是这看似矛盾却又紧密相连的各种特质,使得它本身具备一种特别的魔力,吸引了大批的信徒。幸运的是,这又几乎是一个门槛最低的创作活动,你不需要象画家一样有高超的技巧,也不需要像乐器演奏者一样经历漫长的练习过程,你所要的只是一部相机,一颗敏感的心,富于观察力的双眼,还有最重要的,对生活的热情。

我已经记不起是什么时候喜欢上摄影了,但我还清楚地记得一年前差不多这个时候,我拥有了自己的第一台相机:Canon PowerShot S1 IS,从此之后的一年时间里,我开始用另一个全新的视觉来观察和记录这个世界,并试图把我看到的,我感受到的瞬间,永恒地重新呈现在这个世界的面前。


墙与行人

posted @ 2005-08-20 00:16 Levins Dai 阅读(711) | 评论 (4)编辑