Man gets 'memory back' in court, apologies for conduct