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: