Toggle the recording.
17027
function toggleRecording() {
            mockService.toggleRecord({}, function (response) {
                vm.record = response.record;
                if (vm.record) {
                    interval = $interval(refreshMocks, 5000);
                } else {
                    $interval.cancel(interval);
                    refreshMocks();
                }
            });
        }
669115
def switch_toggle(self, device):
        """"""
        state = self.get_state(device)
        if(state == '1'):
            return self.switch_off(device)

        elif(state == '0'):
            return self.switch_on(device)
        else:
            return state
70814
def _record_offset(self):
        """"""
        offset = self.blob_file.tell()
        self.event_offsets.append(offset)
423758
def maybe_start_recording(tokens, index):
        """"""
        if tokens[index].type == TokenType.BeginRSTComment:
            return _RSTCommentBlockRecorder(index, tokens[index].line)

        return None
364924
def startRecording(self, url, **options):
        
        self._steps.append(StartRecording(url, **options).obj)
255923
def on_toggle_autoplay_key(self):
        
        if self.autoplay_manager.is_running():
            self.autoplay_manager.stop_autoplay()
            self.view.set_autoplay(False)
        else:
            self.autoplay_manager.start_autoplay()
            self.view.set_autoplay(True)
228300
def record(self):
        

        while True:
            frames = []
            self.stream.start_stream()
            for i in range(self.num_frames):
                data = self.stream.read(self.config.FRAMES_PER_BUFFER)
                frames.append(data)
            self.output.seek(0)
            w = wave.open(self.output, 'wb')
            w.setnchannels(self.config.CHANNELS)
            w.setsampwidth(self.audio.get_sample_size(self.config.FORMAT))
            w.setframerate(self.config.RATE)
            w.writeframes(b''.join(frames))
            w.close()
            yield
1154524
function () {
      this.clear();
      this.stop();
      this.state = 'recording';
      this.controller.connection.protocol = this.recordProtocol;
      this.setGraphic('connect');
      this.controller.emit('playback.record', this)
    }
333449
def toggle(self, section, option):
  """"""
  self.set(section, option, not self.get(section, option))
112200
def ontop_toggled(self, settings, key, user_data):
        
        self.guake.window.set_keep_above(settings.get_boolean(key))
882262
def stop(self):
        """"""
        self.state = False
        with display_manager(self.display) as d:
            d.record_disable_context(self.ctx)
            d.ungrab_keyboard(X.CurrentTime)
        with display_manager(self.display2):
            d.record_disable_context(self.ctx)
            d.ungrab_keyboard(X.CurrentTime)
358393
def on_pause(self):
        """"""
        self.engine.commit()
        self.strings.save()
        self.funcs.save()
        self.config.write()
1215021
def evt_toggle_pause(self, *args):  # pylint: disable=unused-argument
        """"""
        if self.event_source._timer is None:  # noqa: e501 pylint: disable=protected-access
            self.event_source.start()
        else:
            self.event_source.stop()
1344934
def is_recording():
    
    curr = ctypes.c_bool()
    check_call(_LIB.MXAutogradIsRecording(ctypes.byref(curr)))
    return curr.value
948176
function () {
      this.idle();

      delete this.recording;

      this.recording = new Recording({
        timeBetweenLoops:       this.options.timeBetweenLoops,
        loop:                   this.options.loop,
        requestProtocolVersion: this.controller.connection.opts.requestProtocolVersion,
        serviceVersion:         this.controller.connection.protocol.serviceVersion
      });

      this.controller.emit('playback.stop', this);
    }
420510
public void toggleState()
    {
        if (m_iCurrentState == ON)
            m_iCurrentState = NULL;
        else if (m_iCurrentState == OFF)
            m_iCurrentState = ON;
        else
            m_iCurrentState = OFF;
        this.updateImage();
    }
316776
def record(button=RIGHT, target_types=(DOWN,)):
    
    recorded = []
    hook(recorded.append)
    wait(button=button, target_types=target_types)
    unhook(recorded.append)
    return recorded