Recent posts

Exception handling particulars in C#

4 minute read

Background Exception handling appears in most .NET applications, this post is trying to describe some  Exception handling particulars in C# which might not take enough awareness from C# developers.  Differences between throw and throw ex  I guess every C# developer has seen code snippet below: try {     // Do some work, exception occurs } catch (IOException ex) {     // Exception caught, re-throw it to bubble up     throw ex; } In the catch block, we can rethrow the caught exception instance of IOException to higher level, an...

IE6真该死了

less than 1 minute read

http://ie6countdown.com 微软官方劝退IE6网站,其页面上希望您告诉朋友不要用IE6了,而且可以获取一段脚本挂在您的网站上, 并且列出了各个国家的地区的IE6份额,我天朝当然高居榜首。   我们是否应该为“世界第一”感到羞愧??实际上几个有关衙门是不是更应该脸上无光? 尊重知识产权!否则在这个星球上处处遭人鄙视,而且扼杀了自己的创新能力及公平竞争土壤! 正常点吃,经济点开,少贪一点,少抽一点,把属于人民的财富还给人民! 第二条能够改善会使更多的人买得起正版,而用盗版归根结底是官方对知识产权重视不够!几年前胡哥访问Biil Gates老家,以及今年初买波音的飞机,实际上都是承认错误,钱可以送,但就是不改!实际上,恶果就是这样的土壤上难有世界级企业,为啥?刚有点好的态势就被Copy了,还没法通过法律手段起诉。 PS, wayneye.com从第一天开始就不支持IE6,您可以试试拿IE6访问是个啥情况:)

帮助这些被遗弃的孩子 - 从身边微小的事做起

1 minute read

上个周六,我陪老婆去参加一个公益活动,感触颇多,谨以短文一篇记录下所见,所思,所想。 Shanghai Healing Home由一群工作上在上海的老外们创建,他们从各种途径(一般是医院)收养被遗弃的患有先天性唇腭裂的孩子们,起初自己出资,慢慢地呼吁有爱心的人资助,逐渐地发展到一定规模,目前一共大概收养了25个孩子,他们中的一部分已经通过好心人的捐赠以及组员的沟通与努力成功实施了手术,跟正常的孩子无异,并且有些孩子已经提交相关组织申请领养。 我们的工作是帮助搬家,下午2:30约在广兰路地铁站集合,然后帮忙把东西从广兰路的一幢房子搬到巨峰路,大概一共来了快20个人,我和老婆是这次唯二的中国人。。人齐了后,组织者Lauren开始分工,我和老婆被分到照顾小孩,(照顾小孩的都是女人,就我一公的。。我估计一来我们第一次参加跟他们不太熟,不好意思让我们干重活,也可能考虑到英美鬼畜力气大些,我想起了敢死队里杰森·斯坦森对李连杰说的:“Four and a half??”),anyway,我只想多多了解下。 初到孩子们的“家”,立刻感觉到温馨与仁爱,同时又觉得有些心酸,坦白说我也非常愤怒,可谓是百感交集,。但是在3个多小时跟这些可爱的孩子们一起的时间里,一个最简单的词可以概括:开心! @可爱的小光头他妈和一个可爱的孩子(已经做过手...

HTML5 Web Socket in Essence

14 minute read

HTML5 WebSocket defines a bi-directional, full-duplex communication channel operates through a single TCP connection, this article discusses its fantastic performance, the WebSocket protocol principle and its handshake mechanism, and develop a WebSocket application in action (Team Poker). </embed> Embeded youku video link because Youtube is outside of the largest "intranet" in the entire universe!! Table of Content Introduction Background WebSocket In Essence Experimental Demos Browser Support WebSocket JavaScript API Develop WebSocket In Action - Team Poker Open Issues Conclusio...

AJAX Cross-Origin HTTP request

3 minute read

Background Cross-Origin Request Sharing - CORS (A.K.A. Cross-Domain AJAX request) is an issue that most web developers might encounter, according to Same-Origin-Policy, browsers restrict client JavaScript in a security sandbox, usually JS cannot directly communicate with a remote server from a different domain. In the past developers created many tricky ways to achieve Cross-Domain resource request, most commonly using ways are: Use Flash/Silverlight or server side as a "proxy" to communicate with remote. JSON With Padding (JSONP). Embeds remote server in an iframe and communicate th...

HTML5 Web Storage in Essence

12 minute read

Background Web Storage (also named Dom storage) is a brand new mechanism of storing temporary/permanent data introduced in HTML5 to replace cookie, it contains two new DOM objects: sessionStoragy and localStorage), in Web Storage Spec, Ian Hickson documented that Web Storage are intended to solve two cases that "not handled well by Cookie", they are: The first is designed for scenarios where the user is carrying out a single transaction, but could be carrying out multiple transactions in different windows at the same time. The second storage mechanism is designed fo...

Significant Enhancement in Internet Explorer 9

6 minute read

Background Microsoft announced Internet Explorer 9 Release Candidate on  Feb 10th, 2011, RC indicates except bug fixing, there would not have big changes before the final RTM. Since I've been keeping a watchful eye on IE9 from its very first preview version, I would like to write a post about its significant enhancement from a developer's point of view, I intend to summarize most significant enhancement points of IE9 listed below: Enhanced performance The New Chakra JavaScript Engine Hardware Acceleration Enhanced Web Standard Support HTML5 (hu...

初为人父 - 人生中那些最重要的时刻

less than 1 minute read

2011年1月25日晚7点36分,在经历了八个多月的期待之后(第一个月不知道),我和老婆一起见证了一个新生命的诞生:一个小男孩,“虎尾巴”,也有一个他爸爸给他的名字:叶皓宇。 谨以这篇Blog随笔记录这样一个我人生中最重要的时刻。 前期准备 我和老婆在准备期间做个很多功课,包括网上线下课程及请教身边朋友,同事等等,除了妈妈和宝宝的衣服、奶瓶,尿不湿等一些必备物品,一些辅助生产的东西包括一次性床垫,巧克力,野山参,喝水用的吸管等也都进行了采购。然后我们早已商量好并决定使用家庭化产房,我希望能够全程陪同亲爱的老婆,支持她,鼓励她,我相信能够在心理上很大程度上给她自信与勇气去面对这重要的、未知的第一次(事后老婆跟我说我的全程陪伴在很大程度上帮助了她),并且我们的目标是顺产,当时痛苦,但过后恢复快,身材恢复也快,而且不会在肚皮上留下难看的手术痕迹,总之,顺产是绿色的,是上帝赋予的能力,不到万不得已,我们都希望顺产。 分娩过程 25号早上起床时,老婆确实有说她晚上睡觉时感觉肚子里感觉跟平时不太一样,不过根据当时的情况我们两都不认为当天会发动,我照常去上班,大概在上午11点多,我们项目组正在开会,我接到老婆电话,说有见红,我于是赶紧驱车回家,回到家老婆正在洗澡,这个是她之前就盘算好了的--一旦有反应,马上洗澡,因为可能有段时间没法洗了。等她洗完,她说没有感觉疼痛,于是我么就...

初为人母 - 我家小虎顺产记

less than 1 minute read

今天是顺产后的第12天了,月子里的事情稍微理顺了些,在公公婆婆和老公的悉心照料下,人也恢复有精神,该是时候交作业去记录生命中那最重要的一天,作为对自己生命中一个重要里程碑的纪念^_^。 2011年1月25日,预产期前一天,终于盼来了宝宝发动的信号。从上午11:00见红到晚上7:36宝宝出生,整个生产过程(PS:医学上分娩过程的三个产程:第一产程,从规律性宫缩至宫口全开;第二产程,胎儿娩出;第三产程,胎盘娩出;)共计历时八个多小时,外加产后二十多分钟的缝针和产后2个小时的观察时间,这些对我来讲按照痛苦指数可分为以下四个阶段: 一、谈笑风生阶段 11:00 我还赖在床上,由于前一晚肚子一直硬邦邦的,外加些微的腰酸,没有休息好,所以平日里尽量陪老公起床吃早餐的我真的是懒得动了,外加宝宝一夜几乎没有胎动,我很是担心,用胎心仪听完宝宝咚咚有力的心跳后,还是不放心地晃晃肚子,以此希望宝宝动一动来抚平我那颗悬着的心。这一晃不要紧,宝宝不但没动,并且下身哗哗的流出一小股微红的液体。我不确定到底是见红了,还是羊水破了。没关系,平时看的一些理论知识现在派上用场了,我很镇定地先等了等,去分辨到底是哪一种,以便采取不一样的措施。我先用纸巾擦干净下身,坐立一会,看看是否还有液体流出,结果等了一会儿没见再流出来,便断定不是羊水破了,只是见红而已。于是喊来婆婆,告之了一下情况,然后得出一致结论是见红...

HTML is the new HTML5

less than 1 minute read

Few days ago Ian Hickson wrote a blog: HTML is the new HTML5, he referred "we moved to a new development model", and comes with two major changes: The HTML specification will henceforth just be known as "HTML", with the URL http://whatwg.org/html. The WHATWG HTML spec now became "living standard", "It's more mature than any version of the HTML specification". I took a screenshot below: In a simple sentence: HTML is going to "unversioned model", according to this there is definitely a concern: OK, living standard? Does this mean the standard could be changed/updated/revised at anytime?...