Too clever by half

To be very confident of your own intelligence but in a way that irritates other people.

My friend is too clever by half. He thinks that he knows everything which is very annoying.