For the purpose of this chapter, the following definition shall apply unless the context clearly indicates or requires a different meaning.
OFFENSE. The doing of any act or thing which, by this chapter or any ordinance of the city is prohibited, forbidden or declared to be unlawful, or the failure or refusal to do any act or perform any duty which, by any provision of this chapter or by any ordinance of the city is commanded or required to be done.