Bookmarklet writing guide

Bookmarklet writing guide Original author: Ruan Yifeng Date: June 11, 2011 A few days ago, I wrote two Bookmarklets-” Short URL Generation ” and ” Short URL Restoration “. They are very convenient to use, besides myself, other friends are also using them. The first time Bookmarklet is released, there will be users. I am… Continue reading Bookmarklet writing guide

Design Ideas of Javascript Inheritance Mechanism

Design Ideas of Javascript Inheritance Mechanism Original author: Ruan Yifeng Date: June 5, 2011 I have always had a hard time understanding the inheritance mechanism of the Javascript language. It does not have the concept of “subclass” and “parent class”, nor the distinction between “class” and “instance”. It relies on a very peculiar “prototype chain”… Continue reading Design Ideas of Javascript Inheritance Mechanism

How to determine whether a Javascript object exists

How to determine whether a Javascript object exists Original author: Ruan Yifeng Date: May 13, 2011 The design of the Javascript language is not rigorous enough, and errors will occur in many places if you are not careful. For example, consider the following situation. Now, we have to determine whether a global object myObj exists,… Continue reading How to determine whether a Javascript object exists

Javascript implementation of Quicksort

Javascript implementation of Quicksort Original author: Ruan Yifeng Date: April 4, 2011 Norahiko, a Japanese programmer, wrote an animated demonstration of the sorting algorithm , which is very interesting. This weekend, I used it as a textbook and studied various sorting algorithms. Sorting algorithms (Sorting algorithm) is one of the oldest computer science, the basic… Continue reading Javascript implementation of Quicksort