r16948: Sync the exmaples code from trunk.