Enables and disables the gyroscope, accelerometer and/or magnetometer
        input to the orientation functions
767031
def set_imu_config(self, compass_enabled, gyro_enabled, accel_enabled):
        

        # If the consuming code always calls this just before reading the IMU
        # the IMU consistently fails to read. So prevent unnecessary calls to
        # IMU config functions using state variables

        self._init_imu()  # Ensure imu is initialised

        if (not isinstance(compass_enabled, bool)
        or not isinstance(gyro_enabled, bool)
        or not isinstance(accel_enabled, bool)):
            raise TypeError('All set_imu_config parameters must be of boolean type')

        if self._compass_enabled != compass_enabled:
            self._compass_enabled = compass_enabled
            self._imu.setCompassEnable(self._compass_enabled)

        if self._gyro_enabled != gyro_enabled:
            self._gyro_enabled = gyro_enabled
            self._imu.setGyroEnable(self._gyro_enabled)

        if self._accel_enabled != accel_enabled:
            self._accel_enabled = accel_enabled
            self._imu.setAccelEnable(self._accel_enabled)
508941
function devicemotion(mx,my,mz) {
    gra.x = mx;
    gra.y = my;
    gra.z = mz;
}
450184
function(sensorInfo, options) {
  var gpioNum;

  if (sensorInfo.model) {
    this.model = sensorInfo.model;
  } else {
    if (options) {
      this.model = options.model;
    }
  }
  if (!options) { options = {}; }

  options.gpioPort = SWITCH_GPIO_NUM;
  gpioNum = Number(sensorInfo.device.address, 10);

  if (!_.isNaN(gpioNum)) {
    options.gpioPort = gpioNum;
  } else {
    console.warn('MotionDetector sensor address is not provided');
  }

  this.savedValue = 0;

  OnOff.call(this, sensorInfo, options, 'motion');
}
1127492
public static function disable()
    {

        if (self::isEnabled()) {
            // stop any timers still on stack (those might be stopped after calculation otherwise)
            $stackCopy = self::$stack;
            while ($timerName = array_pop($stackCopy)) {
                self::stop($timerName);
            }
        }
        self::$_enabled = false;

        self::calculate();
    }
1344422
public static boolean isRotationEnabled(Context context) {
        return android.provider.Settings.System.getInt(context.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, 0) == 1;
    }
469111
def enableAccelerometer(self):
        
        logger.debug("Enabling acceleration sensor")
        self.fifoSensorMask |= self.enableAccelerometerMask
        self._accelEnabled = True
        self._setSampleSizeBytes()
165096
function() {
            graph.off('changed', onGraphChanged);
            for (var i=0;i<physicsSimulators.length; i++) {
                physicsSimulators[i].off('stable', onStableChanged);
            }
        }
206079
function () {
        var dom = this.domElement;

        vendor.removeEventListener(dom, 'touchstart', this._mouseDownHandler);
        vendor.removeEventListener(dom, 'touchmove', this._mouseMoveHandler);
        vendor.removeEventListener(dom, 'touchend', this._mouseUpHandler);

        vendor.removeEventListener(dom, 'mousedown', this._mouseDownHandler);
        vendor.removeEventListener(dom, 'mousemove', this._mouseMoveHandler);
        vendor.removeEventListener(dom, 'mouseup', this._mouseUpHandler);
        vendor.removeEventListener(dom, 'wheel', this._mouseWheelHandler);
        vendor.removeEventListener(dom, 'mouseout', this._mouseUpHandler);

        if (this.timeline) {
            this.timeline.off('frame', this.update);
        }
        this.stopAllAnimation();
    }
401349
function() {
			var self = this;
			self.$input.prop('disabled', false);
			self.$control_input.prop('disabled', false).prop('tabindex', self.tabIndex);
			self.isDisabled = false;
			self.unlock();
		}
584799
def setOrientation( self, orientation ):
        
        super(XToolBar, self).setOrientation(orientation)
        self.refreshButton()
530057
function() {
				// Remove keydown event listeners
				this.handle1.removeEventListener("keydown", this.handle1Keydown, false);
				this.handle2.removeEventListener("keydown", this.handle2Keydown, false);

				if (this.showTooltip) {
					this.handle1.removeEventListener("focus", this.showTooltip, false);
					this.handle2.removeEventListener("focus", this.showTooltip, false);
				}
				if (this.hideTooltip) {
					this.handle1.removeEventListener("blur", this.hideTooltip, false);
					this.handle2.removeEventListener("blur", this.hideTooltip, false);
				}

				// Remove event listeners from sliderElem
				if (this.showTooltip) {
					this.sliderElem.removeEventListener("mouseenter", this.showTooltip, false);
				}
				if (this.hideTooltip) {
					this.sliderElem.removeEventListener("mouseleave", this.hideTooltip, false);
				}
				this.sliderElem.removeEventListener("touchstart", this.mousedown, false);
				this.sliderElem.removeEventListener("mousedown", this.mousedown, false);
			}
1024815
public static synchronized void disable() {
        if (!enabled) {
            return;
        }
        RxJavaPlugins.setOnObservableAssembly(oldOnObservableAssembly);
        oldOnObservableAssembly = null;
        RxJavaPlugins.setOnConnectableObservableAssembly(oldOnConnectableObservableAssembly);
        oldOnConnectableObservableAssembly = null;
        RxJavaPlugins.setOnCompletableAssembly(oldOnCompletableAssembly);
        oldOnCompletableAssembly = null;
        RxJavaPlugins.setOnSingleAssembly(oldOnSingleAssembly);
        oldOnSingleAssembly = null;
        RxJavaPlugins.setOnMaybeAssembly(oldOnMaybeAssembly);
        oldOnMaybeAssembly = null;
        RxJavaPlugins.setOnFlowableAssembly(oldOnFlowableAssembly);
        oldOnFlowableAssembly = null;
        RxJavaPlugins.setOnConnectableFlowableAssembly(oldOnConnectableFlowableAssembly);
        oldOnConnectableFlowableAssembly = null;
        RxJavaPlugins.setOnParallelAssembly(oldOnParallelAssembly);
        oldOnParallelAssembly = null;
        enabled = false;
    }
473656
function(){		
		var endHours = this.inputs[2];
		var endMinutes = this.inputs[3];
		
		if( endHours.getValue() == '24' ){ endMinutes.setValue("00"); endMinutes.disable();}
		else{ endMinutes.enable(); }		
	}
765178
function () {
    if (!this._collectorsStarted) { return; }

    if (window.removeEventListener) {
      window.removeEventListener("load", this._eventListener.loadTimeCollector, false);
      window.removeEventListener("mousemove", this._eventListener.mouseCollector, false);
      window.removeEventListener("keypress", this._eventListener.keyboardCollector, false);
      window.removeEventListener("devicemotion", this._eventListener.accelerometerCollector, false);
      window.removeEventListener("touchmove", this._eventListener.touchCollector, false);
    } else if (document.detachEvent) {
      document.detachEvent("onload", this._eventListener.loadTimeCollector);
      document.detachEvent("onmousemove", this._eventListener.mouseCollector);
      document.detachEvent("keypress", this._eventListener.keyboardCollector);
    }

    this._collectorsStarted = false;
  }
344677
def enable_events(self):
        
        if self.annot is not None and self.parent.channels.groups:
            self.action['spindle'].setEnabled(True)
            self.action['slow_wave'].setEnabled(True)
            self.action['analyze'].setEnabled(True)
        else:
            self.action['spindle'].setEnabled(False)
            self.action['slow_wave'].setEnabled(False)
            self.action['analyze'].setEnabled(False)
1348504
function () {
    // Remove events listners
    this.rl.removeListener('SIGINT', this.forceClose)
    this.rl.removeListener('line', this.onLine)
    this.rl.input.removeListener('keypress', this.onKeypress)
    process.removeListener('exit', this.forceClose)
    
    // Restore prompt functionnalities
    this.rl.output.unmute()
    this.rl.output.write("\x1B[?25h") // show cursor

    // Close the readline
    this.rl.output.end()
    this.rl.pause()
    this.rl.close()
    this.rl = null
  }
1212482
def disable_gui(self):
        
        gui = self._current_gui
        if gui in self.apps:
            self.apps[gui]._in_event_loop = False
        return self.clear_inputhook()