Recent posts

Honored to be CodeProject MVP 2012

It is a huge honor for me, I appreciate the recognition from the CodeProject team, and I believe this is not only a recognition but also a kind of encourage, I will definitely try my best to work harder in the coming 2012:)

12306,你能再操蛋一点吗?

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

Resolving mouseover/mouseout multi-trigger problem

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

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...

Windows 8 - Far from perfect

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

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)

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

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

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...