1. He made a mistake at work and his boss punished him to set an example.2. Apple sued Samsung to make an example out of Samsung that stealing other people's idea is not cool.
 set an example make an example out of somebody
In contrast to the rugged impression of denim, the carefully selected flannel fabric features a delicate, soft txture. Flannel brings out a city woman's delicate taste in clothes.