Recent posts

URL Rewrite Rules used by WayneYe.com

4 minute read

I've successfully transferred my website to winhost, now the architecture is IIS 7.5 + ASP.NET 4.0 + SQL Server 2008 R2 + HTML5, this blog post is a summary about URL Rewrite Rules used by WayneYe.com. RESTful URL for blogs Blog posts are absolutely the soul of a blog website, comparing with blog URL format: "/yyyy/MM/{Blog_Title}", I actually prefer "/Blog/{Blog_Title}", more simpler/shorter, in additional and more important, generally speacking,valuable content is valuable no matter when it was posted, for example, a developer is searching C# covariance & contravariance articles,...

WayneYe.com成功搬至米国服务器

less than 1 minute read

目前的架构:ASP.NET 4.0 + IIS 7.0 + SQL Server 2008 R2, oh yeah! 弄好之后嘛,第一件事: DNS重定向: 服务器地址在加州Pasadena。 日后会更加努力Blogging,Page Rank早上4, +U!

Experiencing Windows 8 Tablet

1 minute read

This week is a Tablet week for me, Shilpa told me the Ipad2 I won in the Codeproject HTML5 & CSS3 competition had just arrived at Cupertino office, and my boss notified me he had successfully helped me bought an HP Touchpad - $99,  and my colleague Jun Yi participated Winndows Builld event hosted on Sep 13th in Anaheim, CA, no doubt, he got a free Windows 8 Tablet, I envy him, absolutely; however this afternoon, he kindly borrowed it to me for the entire China National Day, I appreciate him. My Ipad2 and HP Touchpad will be brought by Mr.X who will visit Shanghai office recently, I...

Print partial web content

1 minute read

Per project needs we need print part of a web page, which I have no idea when I saw this requirement, I googled and I read this post: http://www.huntingground.freeserve.co.uk/main/mainfram.htm?../scripts/printing.htm, it basically use document.write to write the content you want to print to a new window by window.open, it works, however I really don't like the opened window. Occasionally I tried to find out whether CSS can achieve such function, seemed I was on the right way: CSS media types is to control different display settings on different "media", controled completely b...

HTML5 WebMessaging In Essence

6 minute read

Download HTML5_Cross-Domain_WebMessaging_Demo.zip - 2.97 KB As a web developer, sometimes we are easy to encounter one problem: Cross-Domain communication, conforming Same-Origin-Policy, JavaScript code cannot access code stay in different domain(or sub-domain) or protocol (HTTP/HTTPs) or port, so there was no direct (or I can say: simple) way to achieve Cross-Domain Communication. However, those kinds of requirements does happen: page A and page B are in different domain,  B is "embedded" in A, i.e., there is an "iframe" in page A whose "src" is page B's URL, now page A want...

nodejs+express+jade+socket.io on Ubuntu 11.04

1 minute read

Introduction socket.io is a brilliant project which perfectly supports HTML5 WebSocket, in additional, it can fall back to flash or long polling when the client web browser does not support WebSocket, I explored it today on Ubuntu, I summarized the process in this post.   Install nodejs I used nodejs v0.4.11, the latest stable version, by mannually compile/make/install. sudo curl http://nodejs.org/dist/node-v0.4.11.tar.gz -o ~/Desktop/WayneDevLab/node.tar sudo tar -xf node.tar cd node-v0.4.11 ./configure make sudo make install In the "./configure" step above if it prompted "lib...

写代码写累了,DIY pizza玩

less than 1 minute read

周中写Code写累了,偶尔看到微博上有人发自制Pizza的教程,觉得很有兴趣,于是周末自己搞了一下,成果如下: 第一锅 - 什锦pizza (金枪鱼+火腿+香菇+青椒 = Wayne荤食天地): 第二锅 - 依然Wayne荤食天地,but double cheese: 从2点钟去金桥家乐福买食材,到晚上8点半,我忙活了6个伴小时,就弄出来这2锅,我负责80%的工作,感谢@可爱的小光头他妈和@痒痒兔爪爪的帮忙 。 Have a slice day^_^ 我整理的做法: 面饼1.低筋面粉300g2.酵母粉1小匙 3.盐少许(约2-5g) 4.砂糖15g 5.奶油20g 6.温开水170 ㏄(冬天温水,夏天凉水) 7.半个蛋(蛋打散与温水混合,约180 ㏄~200 ㏄)1.和面,揉至扩展阶段,发酵至2倍大2.发酵好的面团,以塑胶袋包覆,松弛15min3.杆平4.用叉子均匀地在底部刺小洞,放置温度稍高的地方,发酵20min左右Pizza酱1. 准备好西红柿丁,洋葱丁,蒜蓉2. 热锅,放入黄油块(3-4 块), 橄榄油亦可3. 黄油融化后放入洋葱丁和蒜蓉, 炒一分钟4. 洋葱爆香以后,放入西红柿丁,大火翻炒5. 当看到西红柿炒出汁水以后,放进糖、黑胡椒粉、牛至叶(Oregano),罗勒(Basil),翻炒均匀,然后盖上锅盖,转小火煮20分钟左右。煮的过程中不时打开锅盖翻炒一下,...

HTML5 WebSocket in Essence技术分享

less than 1 minute read

今天下午,我非常荣幸受邀参加HTML5兴趣小组每月一次的沙龙活动,我给大家分享了HTML5 WebSocket的特性,协议本质,以及我的Team Poker demo。 第一次做技术分享,表面“淡定“,内心紧张,因语速较快原本打算持续1个小时左右的分享,大约40分钟就结束了,囧 现场照片 在谈各种comet技巧 PPT HTML5 WebSocket in Essence on Prezi 现场视频 摄影帅哥貌似对焦不实的说 下一次,希望更好!+U!

这是个TMD奇迹的国度

less than 1 minute read

原文地址:http://society.people.com.cn/GB/223276/15251568.html。(这链接不会HX的) 白岩松:一个人心脏功能是好的,肝脾胃什么都是好的,但他是个弱智,你能说他是健康的人么?!   做了6年了,方知自己是#无证程序员#。。 【装】无证程序员、临时工、温州动车事故及其他 刚刚听说,温州动车事故的调查有了新进展:铁路调度程序出现bug(漏洞)是本次事故的主要原因,警方已经拘留了两名无证程序员。 上海的大火,我们懂得了无证电焊工,中华的脊梁,我们懂得了盖章临时工。温州动车事故的“无证程序员 "的横空出世,着实让人感到科学发展观的巨大威力。这是九十年来活学活用马克思列宁主义并将之与中国实际相结合的典范啊。本来我正在纳闷,铁道部的智商虽然不济,但怎么也不会想不起“无证临时工 "这样的惯例,没想到人家还能翻出花样来。想想也是,总不能说司机请的是临时工吧,把程序员这种陌生的名目请出来,只能让你干瞪眼。但是这么个涉及千万人命、亿万家庭的交通工程,核心的调度程序却是请无证程序员搞出来的,这尼玛的太后现代了,到底是想说明无能者无证,还是用人者无能,着实混乱 几十条鲜活的生命毕竟是逝去了。我们也许不知道真实的数目,但我们知道,他们是某人的子女,某人的丈夫,某人的妻子,某人的父母&...

JavaScript - Foundation of the Language

13 minute read

Introduction JavaScript "was born under the shadow of Java" - Brenden Eich, it is "the most misunderstood programming language in the world" - Douglas Crockford. JavaScript was used so widely nowadays, nearly everywhere as long as you are using a web browser and surfing the internet, most of the websites have JS inside, and even server side - nodejs, according to http://langpop.com/, JavaScript is the fourth popular programming language in the world.  In this post I am trying to use refined language to cover some foundation of JavaScript (many of which con...