Set code type