category : 计算机那些事

Design Pattern: Decorator & Proxy

I think it is better to master 23 Design Patterns as a Java developer. After I have a brief study, I find design pattern is not a new concept, and I have already used some of them in my daily projects unconsciously. Here I will describe some details about Decorator and Proxy, as I find they share something in common.

grunt-gh-pages: Deploy Your Website into GitHub Pages

Recently, I am learning AngularJS, and I “believe” I have some progress, so that I cannot wait to puslish my work to the public. This is the repository for the AngularJS demo I write in GitHub. And I publish this work at this link:, which is a static page hosted in GitHub Pages.

Responsive Table to List View With CSS

This post is related to how to make a responsive table into a List view when the browser width is pretty small. Table collapses into a “list” on small screens. Headers are pulled from data attributes. You can find the origin post here: And you can download the ZIP package with this link:

PhoneGap: QRCode Example

With PhoneGap, we can use HTML+CSS+JS to build the mobile apps. But how could we call hardware of iPhone, such as camera, in our code with PhoneGap? Good news is that there are many plugins already existed, with which we can interact with hardware.Now let’s do a app for QRCode sanner:

Web Compatibility Test of different IE Versions in One Computer

I have tried almost every browser, and my favorite one is Google Chrome: Fast Easy to sync everything I need Easy for web developing … more … But this is not the execuse that I can never care about IE. In my daily life, I have many web related projects. Even I use Chrome, I must care for the users who use IE to visit my works.

Tomcat7: Change Port to 80

I have many servers, which run Java Web applications. For development, I like Jetty, but for production, I prefer Tomcat7 now. In ubuntu, you need root permission to use ports under 1024.