Recent posts

12306,你能再操蛋一点吗?

less than 1 minute read

#12306#,在此“非常时刻”,请你把页面顶端的flash banner去掉,把形式主义的flash“站车风采”去掉,请你把服务器端人为设置的登录人数和订单数量限制改得“合理”一些,请多部署几台服务器。毕竟,这关系到千千万万个家庭的幸福,HXSH的基本组成单元!

Resolving mouseover/mouseout multi-trigger problem

4 minute read

Background While I was developing my blog's comments function, I hope reader can write down their Gravatar email address, and my preferable UI was an "hint icon" dispolayed desides the Email textbox, so that while reader mouse overs it an overlay box will show the reason why Email is required, in additional, I want to add a little bit fancier animation: When user's mouse hovers on the icon, show the div box from small to large, once reaches predefined size, fades in the hint sentente. When mouse out the icon, fades out the hint sentence and then hides the div from large to small. My ...

Modify proxy settings using Powershell

3 minute read

To use Live Messenger in the office, I always need to firstly disable my proxy settings, after Live Messenger launched, I need turn it back. Thus everytime I need to change that from "Internet Options -> Connections -> Lan Settings ->", check/uncheck the checkboxes, well, this task I need to do at least one time a day, I as a developer should achieve this in a more efficient and convenient way. By overcoming one problem I wrote a snippet of Powershell cmdlet which does the job perfectly, the steps are: Update proxy settings to "Automatically detect settings". Launch Live Messenger...

慈父形象

less than 1 minute read

老爸粉有爱心,儿子粉可爱.

Windows 8 - Far from perfect

2 minute read

Recently I spent a few days in investigating Metro App (AKA immersive UI) development, I downloaded & installed VS 2011 Ultimate, watched couple of videos talking about WinRT, Metro App life cycle, Living tiles & Notifications, etc. So far, I've encountered many many issues... I had to say: Windows 8 - Long Way to go. Below are few examples. Metro App failed to got suspended This happened when Ben Srour was doing the demo at Build conference, I encountered, too. His walking arround was killing explorer process and relaunch it manually, I copied that and my app successfully...

Honored to Win CodeProject HTML5 competition

less than 1 minute read

Three months ago, my article <HTML5 WebSocket In Essence> was honored to be named first prize in CodeProject HTML5 & CSS3 competion, the award was an Ipad2. To be very honest I was expecting to win a T-Shirt or a CP Mug, if I could get either on I would be really excited, so when I received the email congratulating me I was the winner, you can image how excited and happy I was at that time. However, the editor from CodeProject told me they were unable to ship the Ipad2 to China, they could give me equivalent money - $499.99, however after a very short consideration I decided to ta...

Rooted my HTC Sensation (G14)

less than 1 minute read

Where there is an Android phone, there are reasons to root it. Here I took a note how I rootedmy HTC Sensation (A.K.A G14): Find the S/N on battery, and find HBoot version by holding "Volumn down" and long press power down.  Install modified HTC drive from: http://downloads.unrevoked.com/HTCDriver3.0.0.007.exe Go to http://revolutionary.io/, get the beta key, run it. S-Off OK Put PG58IMG.zip under the root location of the SD card. Reboot to bootloader/HBOOT screen In bootloader it will prompt to update, press "Volumn Up" to select update  Refer more detailed information: How to ...

Make your HTML5 Video support all browsers

2 minute read

Introduction HTML5 video tag gave us the following advantages: No plugin required, directly play. Visible & controllable for Browser and search engine, not a "black box" such as Flash or SilverLight. Cross-platform, in theory all PC/mobile browsers as well as Ipad/Windows 8/Android tablet PC.  Downward compatibility. Which is very important, but W3C had made it simple and works, we can smoothly fall back to flash if the user agent does not recognize "<video>" tag. So it is simple and pretty cool! However, there is still issues within a not short period: the browser support ...

Atomic Operation in C#.Net

7 minute read

Introduction Atomic Operation is named academic to Linearizability, Atomicity is a guarantee of isolation from concurrent processes, it can be enfored by hardware level build on Cache Coherence protocol, or software level exclusive lock. In this blog post, I am going to explore a few number of mechanisms to achieve atomic operation in .Net. What are Atomic operations and what are not? In C# Specification, the stamement about atomic operation is: “Reads and writes of the following data types shall be atomic: bool, char, byte, sbyte, short, ushort, uint, int, float, and refere...

2011年10月17日 - 应该被定为国耻日

less than 1 minute read

视频地址 我不知道在这个蓝色的生命星球上,有几种动物会无视自己受伤的同胞,然而,我天朝佛山的这帮渣滓做到了,彻彻底底地做到了! 今天,作为一个中国人,我感到耻辱到极点,为有如此禽兽不如的同胞,为活在这个伟大的“河蟹射会”,为了无处发泄胸中不满,为了太多太多的不公平,不公正! 倘使今日有一强权国家侵略我中华,我华夏儿女团结一致,奋勇抗敌,则不会有任何可耻之处。然而,这段视频给予鄙人心灵上的创伤,已远超肉体上的伤痛! 鄙人以为:对于交通肇事伤人并逃逸的罪犯,最终造成被害人死亡的,肇事人应被判处故意杀人罪。 网上查了下:目前刑法的有关法律条文如下: 根据刑法第133条的规定,犯交通肇事罪的,处3年以下有期徒刑或者拘役;交通运输肇事后逃逸或者有其他特别恶劣情节的,处3年以上7年以下有期徒刑 因逃逸致人死亡的,处7年以上有期徒刑。 更新:今天(10月24日),看到新闻 - 小悦悦已经死亡,无尽的悲痛。。。哀莫大于心死!我对某些人,某些事,已彻底心死!  贴几条网友评论,可以代表鄙人观点: "最近一周以来,我的脑海里每时每刻都有那个孩子的视频,我的孩子也是2岁多,也和悦悦一样是那么可爱的年龄,我都不敢完整看完视频,只一个镜头就已经让我心碎了。仿佛自己就是那个孩子,无助,痛苦;也仿佛自己就是那些冷血过客之一,愧对我们的孩子啊。这个世界到底怎么了,一条...