display sample code on event