Four sample codes, by Shining Sun.