Set default theme name based in config file.
540465
def set_default_theme(theme):
    
    pref_init()  # make sure config files exist
    parser = cp.ConfigParser()
    parser.read(PREFS_FILE)
    # Do we need to create a section?
    if not parser.has_section("theme"):
        parser.add_section("theme")
    parser.set("theme", "default", theme)
    # best way to make sure no file truncation?
    with open("%s.2" % PREFS_FILE, "w") as fp:
        parser.write(fp)
    copy("%s.2" % PREFS_FILE, PREFS_FILE)
    unlink("%s.2" % PREFS_FILE,)
1344062
def set_name(self, name):
        """"""
        if not name:
            name = ''
        self._client['config']['name'] = name
        yield from self._server.client_name(self.identifier, name)
1240295
function set_theme_option() {

		// Load settings
        $optionsframework_settings = get_option( 'optionsframework' );

        // Updates the unique option id in the database if it has changed
        if ( function_exists( 'optionsframework_option_name' ) ) {
			optionsframework_option_name();
        }
        elseif ( has_action( 'optionsframework_option_name' ) ) {
			do_action( 'optionsframework_option_name' );
        }
        // If the developer hasn't explicitly set an option id, we'll use a default
        else {
            $default_themename = get_option( 'stylesheet' );
            $default_themename = preg_replace( "/\W/", "_", strtolower($default_themename ) );
            $default_themename = 'optionsframework_' . $default_themename;
            if ( isset( $optionsframework_settings['id'] ) ) {
				if ( $optionsframework_settings['id'] == $default_themename ) {
					// All good, using default theme id
				} else {
					$optionsframework_settings['id'] = $default_themename;
					update_option( 'optionsframework', $optionsframework_settings );
				}
            }
            else {
				$optionsframework_settings['id'] = $default_themename;
				update_option( 'optionsframework', $optionsframework_settings );
            }
        }

	}
471696
private function setDefaultConfiguration(): void
    {
        $this->parameterBag->set('app.devmode', false);
        $this->parameterBag->set('container.dumper.inline_class_loader', true);

        $this->config->addPass($this->parameterBag);
    }
621412
private void initializeThemePreference() {
        Preference themePreference = findPreference(getString(R.string.theme_preference_key));
        themePreference.setOnPreferenceChangeListener(createThemeChangeListener());
    }
393375
def _set_default_namespace(self, default_namespace):
        """"""
        if default_namespace is not None:
            default_namespace = default_namespace.strip('/')
        else:
            default_namespace = DEFAULT_NAMESPACE
        self._default_namespace = _ensure_unicode(default_namespace)
910718
def infer_theme():
    
    themes = [os.path.basename(theme).replace('.less', '')
                  for theme in glob('{0}/*.less'.format(styles_dir))]
    if os.path.exists(theme_name_file):
        with open(theme_name_file) as f:
            theme = f.readlines()[0]
        if theme not in themes:
            theme = 'default'
    else:
        theme = 'default'

    return theme
241427
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_EXCEPTION_DEPTH        => 10,
                                   self::CFG_LOG_EXCEPTION_LOCATION => true];
            }
        }
625619
def override_config(self, options):
        """"""

        for k, v in options.items():
            # Reject names not in the default configuration
            if k not in self.config:
                raise KeyError("'{}' is not a valid option for '{}'".format(k, self.__class__.__name__))
            self.validate_options(k, v)
            self.config[k] = v
176258
function configureImageNames() {
    for (let i = 0; i < this.appsFolders.length; i++) {
        const originalImageName = this.appConfigs[i].baseName.toLowerCase();
        const targetImageName = this.dockerRepositoryName ? `${this.dockerRepositoryName}/${originalImageName}` : originalImageName;
        this.appConfigs[i].targetImageName = targetImageName;
    }
}
395112
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_ERROR_LEVEL        => error_reporting(),
                                   self::CFG_LOG_ERROR_LOCATION => true];
            }
        }
601290
protected function setThemeAutoloading()
    {
        foreach ($this->config->get('theme.autoloading', []) as $ns => $path) {
            $path = $this->dirPath.'/'.trim($path, '\/');
            $this->loader->addPsr4($ns, $path);
        }

        $this->loader->register();
    }
863829
def set_default(cls, name):
        """"""
        if name not in cls._depots:
            raise RuntimeError('%s depot has not been configured' % (name,))
        cls._default_depot = name
921316
def pick_theme(manual):
    
    if manual:
        return manual
    pref_init()
    parser = cp.ConfigParser()
    parser.read(PREFS_FILE)
    try:
        theme = parser.get("theme", "default")
    except (cp.NoSectionError, cp.NoOptionError):
        theme = "plain"
    return theme
57816
private function set_field_names()
    {
        foreach ( $this->config->fields as $field )
        {
            $field->init_name = $field->name;
        }
    }
1017773
public function _setActiveTheme()
    {
        if (empty($this->config['theme'])) {
            return;
        }

        if (!is_array($this->config['theme'])) {
            $template   = $this->config['theme'];
            $stylesheet = $this->config['theme'];
        } else {
            $template   = reset($this->config['theme']);
            $stylesheet = end($this->config['theme']);
        }

        $GLOBALS['wp_tests_options']['template']   = $template;
        $GLOBALS['wp_tests_options']['stylesheet'] = $stylesheet;

        codecept_debug('Set template to [' . $template . '] and stylesheet to [' . $stylesheet . ']');
    }
459529
def init_config(self, app):
        
        _vars = ['BASE_TEMPLATE', 'COVER_TEMPLATE', 'SETTINGS_TEMPLATE']

        # Sets RequireJS config and SASS binary as well if not already set.
        for k in dir(config):
            if k.startswith('THEME_') or k in [
                    'REQUIREJS_CONFIG', 'SASS_BIN'] + _vars:
                app.config.setdefault(k, getattr(config, k))

        # Set THEME_<name>_TEMPLATE from <name>_TEMPLATE variables if not
        # already set.
        for varname in _vars:
            theme_varname = 'THEME_{}'.format(varname)
            if app.config[theme_varname] is None:
                app.config[theme_varname] = app.config[varname]

        app.config.setdefault(
            'ADMIN_BASE_TEMPLATE', config.ADMIN_BASE_TEMPLATE)