Here are some code segments I collected.