code demos for Xiaoming.js