adds offline mode from system property
332261
private Settings enrichWithOfflineMode(Settings settings) {

        String goOffline = SecurityActions.getProperty(ALT_MAVEN_OFFLINE);
        if (goOffline != null && goOffline.length() > 0) {
            settings.setOffline(Boolean.valueOf(goOffline));
        }

        return settings;
    }
497624
def enable(self, cmd="sudo su", pattern="ssword", re_flags=re.IGNORECASE):
        """"""
        delay_factor = self.select_delay_factor(delay_factor=0)
        output = ""
        if not self.check_enable_mode():
            self.write_channel(self.normalize_cmd(cmd))
            time.sleep(0.3 * delay_factor)
            try:
                output += self.read_channel()
                if re.search(pattern, output, flags=re_flags):
                    self.write_channel(self.normalize_cmd(self.secret))
                self.set_base_prompt()
            except socket.timeout:
                raise NetMikoTimeoutException(
                    "Timed-out reading channel, data not available."
                )
            if not self.check_enable_mode():
                msg = (
                    "Failed to enter enable mode. Please ensure you pass "
                    "the 'secret' argument to ConnectHandler."
                )
                raise ValueError(msg)
        return output
1315851
def enable(name):
    '''
    
    '''
    cmd = 'systemctl enable systemd-nspawn@{0}'.format(name)
    if __salt__['cmd.retcode'](cmd, python_shell=False) != 0:
        __context__['retcode'] = salt.defaults.exitcodes.EX_UNAVAILABLE
        return False
    return True
791351
def get_wake_on_modem():
    '''
    
    '''
    ret = salt.utils.mac_utils.execute_return_result(
        'systemsetup -getwakeonmodem')
    return salt.utils.mac_utils.validate_enabled(
        salt.utils.mac_utils.parse_return(ret)) == 'on'
1336609
def _create_hidden_port(self, context, network_id, device_id, fixed_ips,
                            port_type=DEVICE_OWNER_ROUTER_INTF):
        """"""
        port = {'port': {
            'tenant_id': '',  # intentionally not set
            'network_id': network_id,
            'mac_address': ATTR_NOT_SPECIFIED,
            'fixed_ips': fixed_ips,
            'device_id': device_id,
            'device_owner': port_type,
            'admin_state_up': True,
            'name': ''}}
        if extensions.is_extension_supported(self._core_plugin,
                                             "dns-integration"):
                port['port'].update(dns_name='')
        core_plugin = bc.get_plugin()
        return core_plugin.create_port(context, port)
36750
def power(dev, mode):
    '''
    
    '''
    if dev not in address_():
        raise CommandExecutionError('Invalid dev passed to bluetooth.power')

    if mode == 'on' or mode is True:
        state = 'up'
        mode = 'on'
    else:
        state = 'down'
        mode = 'off'
    cmd = 'hciconfig {0} {1}'.format(dev, state)
    __salt__['cmd.run'](cmd).splitlines()
    info = address_()
    if info[dev]['power'] == mode:
        return True
    return False
744548
public void cancelDownload(OfflineDownloadOptions offlineDownload) {
    Intent intent = new Intent(context, OfflineDownloadService.class);
    intent.setAction(OfflineConstants.ACTION_CANCEL_DOWNLOAD);
    intent.putExtra(KEY_BUNDLE, offlineDownload);
    context.startService(intent);
  }
131663
def make_offline():
    
    dir_path = Path(os.getcwd()).absolute()

    css_path = dir_path / "site" / "assets" / "stylesheets"
    material_css = css_path / "material-style.css"
    if not material_css.exists():
        file_path = Path(__file__).resolve().parent
        copyfile(file_path / "material-style.css", material_css)
        copyfile(file_path / "material-icons.woff2", css_path / "material-icons.woff2")

    indexes = []
    for root, _, filenames in os.walk(dir_path / "site"):
        for filename in fnmatch.filter(filenames, "index.html"):
            indexes.append(os.path.join(root, filename))
    for index_file in indexes:
        update_index_to_offline(index_file)
453946
protected function controlMaintenanceMode()
    {
        $allowed_path = $this->is_install
            || $this->is_backend
            || in_array($this->path, array('login', 'logout', 'forgot'));

        if ($this->is_maintenance && !$allowed_path) {

            if (!$this->isFront()) {
                $this->redirect('/');
            }

            $this->outputMaintenance();
        }
    }
159965
public void startDownload(OfflineDownloadOptions options) {
    Intent intent = new Intent(context, OfflineDownloadService.class);
    intent.setAction(OfflineConstants.ACTION_START_DOWNLOAD);
    intent.putExtra(KEY_BUNDLE, options);
    context.startService(intent);
  }
745465
public void setSystemPropertiesMode(String pMode) {
        systemPropertyMode = SystemPropertyMode.fromMode(pMode);
        if (systemPropertyMode == null) {
            systemPropertyMode = SystemPropertyMode.MODE_NEVER;
        }
    }
524801
def enable(iface):
    '''
    
    '''
    if is_enabled(iface):
        return True
    cmd = ['netsh', 'interface', 'set', 'interface',
           'name={0}'.format(iface),
           'admin=ENABLED']
    __salt__['cmd.run'](cmd, python_shell=False)
    return is_enabled(iface)
949423
function (mode) {
            var debug = this.isDebug();
            if (debug !== mode && (mode === true || mode === false)) {
                ariaCoreAppEnvironment.setEnvironment({
                    "appSettings" : {
                        "debug" : mode
                    }
                }, null, true);
            }
        }
747511
def activate_comfort(self):
        """"""
        value = struct.pack('B', PROP_COMFORT)
        self._conn.make_request(PROP_WRITE_HANDLE, value)
1031546
def offline(f):
    

    @click.pass_context
    @verbose
    def new_func(ctx, *args, **kwargs):
        ctx.obj["offline"] = True
        ctx.bitshares = BitShares(**ctx.obj)
        ctx.blockchain = ctx.bitshares
        ctx.bitshares.set_shared_instance()
        return ctx.invoke(f, *args, **kwargs)

    return update_wrapper(new_func, f)
590705
def set_status(self, status):
        

        text = ""
        colour = "#FFFFFF"
        if status == 0:
            text = "OFFLINE"
            colour = "#EF9A9A"
        elif status == 1:
            text = "STARTING"
            colour = "#FFE082"
        elif status == 2:
            text = "ONLINE"
            colour = "#A5D6A7"

        self.status.set(text)
        self.statusbar.config(background=colour)
1233115
function getOfflineContext(numOfChannels, length, sampleRate) {
    if (offlineCtx) {
        return offlineCtx;
    }
    numOfChannels = numOfChannels || 2;
    sampleRate = sampleRate || 44100;
    length = sampleRate || numOfChannels;

    const OfflineCtx = window.OfflineAudioContext || window.webkitOfflineAudioContext;

    offlineCtx = (OfflineCtx ? new OfflineCtx(numOfChannels, length, sampleRate) : null);

    return offlineCtx;
}