I write those code when i was a student in the tongji university.