If we have a profile including default, but the users default in config is that the default
    is other, we have to change the include
180972
def patch_default_base_profile(conan_api, profile_abs_path):
    """"""
    text = tools.load(profile_abs_path)
    if "include(default)" in text:  # User didn't specified a custom profile
        if Version(conan_version) < Version("1.12.0"):
            cache = conan_api._client_cache
        else:
            cache = conan_api._cache

        default_profile_name = os.path.basename(cache.default_profile_path)
        if not os.path.exists(cache.default_profile_path):
            conan_api.create_profile(default_profile_name, detect=True)

        if default_profile_name != "default":  # User have a different default profile name
            # https://github.com/conan-io/conan-package-tools/issues/121
            text = text.replace("include(default)", "include(%s)" % default_profile_name)
            tools.save(profile_abs_path, text)
62908
def config_absent(name):
    '''
    

    '''
    name = name.lower()
    ret = {'name': name,
           'changes': {},
           'result': None,
           'comment': ''}

    # load configuration
    config = _load_config()

    if name in config:
        # delete property
        ret['result'] = True
        ret['comment'] = 'property {0} deleted'.format(name)
        ret['changes'][name] = None
        del config[name]
    else:
        # we're good
        ret['result'] = True
        ret['comment'] = 'property {0} is absent'.format(name)

    # apply change if needed
    if not __opts__['test'] and ret['changes']:
        ret['result'] = _write_config(config)

    return ret
429224
protected function _setProfile() {
        $projectName = basename(dirname(realpath(APPLICATION_PATH)));
        $profileName = $projectName . '_' . APPLICATION_ENV;

        $this->_profile = $profileName;
    }
241427
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_EXCEPTION_DEPTH        => 10,
                                   self::CFG_LOG_EXCEPTION_LOCATION => true];
            }
        }
786807
public function actionChangeSettings()
    {
        $params = Yii::$app->request->bodyParams;
        
        foreach ($params as $param => $value) {
            Yii::$app->adminuser->identity->setting->set($param, $value);
        }
        
        return true;
    }
234025
private function setDefaultConfig()
    {
        $defaults = $this->configRepo->get('laravelPnotify');

        foreach($defaults as $key => $value){
            $this->config[$key] = $value;
        }
    }
1335212
def includeme(config):
    """"""
    config.add_route('references', '/references')
    _add_referencer(config.registry)
    config.add_view_deriver(protected_resources.protected_view)
    config.add_renderer('json_item', json_renderer)
    config.scan()
426590
protected function _setDefaults()
    {
        $this->setConfigParam('sTheme', 'azure');

        if (is_null($this->getConfigParam('sDefaultLang'))) {
            $this->setConfigParam('sDefaultLang', 0);
        }

        if (is_null($this->getConfigParam('blLogChangesInAdmin'))) {
            $this->setConfigParam('blLogChangesInAdmin', false);
        }

        if (is_null($this->getConfigParam('blCheckTemplates'))) {
            $this->setConfigParam('blCheckTemplates', false);
        }

        if (is_null($this->getConfigParam('blAllowArticlesubclass'))) {
            $this->setConfigParam('blAllowArticlesubclass', false);
        }

        if (is_null($this->getConfigParam('iAdminListSize'))) {
            $this->setConfigParam('iAdminListSize', 9);
        }

        // #1173M  for EE - not all pic are deleted
        if (is_null($this->getConfigParam('iPicCount'))) {
            $this->setConfigParam('iPicCount', 12);
        }

        if (is_null($this->getConfigParam('iZoomPicCount'))) {
            $this->setConfigParam('iZoomPicCount', 4);
        }

        if (is_null($this->getConfigParam('iDebug'))) {
            $this->setConfigParam('iDebug', $this->isProductiveMode() ? 0 : -1);
        }

        $this->setConfigParam('sCoreDir', __DIR__ . DIRECTORY_SEPARATOR);
    }
1252579
private void configureStateAuth() {
        setIsControlEnable(authButton, false);
        if(isAuthenticated()) {
            authStatusLabel.setText(I18nLabelsLoader.ADDON_LOGIN_STATUS_OK);
            setDefaultButton(nextButtonName, true);
            if(userPasswordText.getText() != null && userPasswordText.getText().length() == 0) {
                userPasswordText.setText("********");
            }            
            setDefaultButton(authButton, false);
            setDefaultButton(cancelButtonName, false);
            setDefaultButton(nextButtonName, true);
        } else if (gotCommunicationError) {
            // leave previous state
            setIsControlEnable(authButton, true);
            setDefaultButton(cancelButtonName, true);
        }
    }
1016747
def configure_default(self, **_options):
        '''
        
        '''
        language, voice, voiceinfo, options = self._configure(**_options)
        self.languages_options[language] = (voice, options)
        self.default_language = language
        self.default_options = options
395112
private static function setDefaultConfig() {
            if (!self::$defaults) {
                self::$defaults = [self::CFG_ERROR_LEVEL        => error_reporting(),
                                   self::CFG_LOG_ERROR_LOCATION => true];
            }
        }
468742
def set_missing_defaults(self):
        
        if 'pub_options' not in self.config:
            self.config['pub_options'] = {
                'acknowledge': True,
                'retain': True
            }

        if 'sub_options' not in self.config:
            self.config['sub_options'] = {
                'get_retained': False
            }

        if 'subscribed_topics' not in self.config:
            self.config['subscribed_topics'] = None

        if 'replay_events' not in self.config:
            self.config['replay_events'] = False

        if 'max_reconnect_retries' not in self.config:
            self.config['max_reconnect_retries'] = 10
1138412
def delete_default_profiles(apps, schema_editor):
    
    Profile = apps.get_model("edxval", "Profile")
    Profile.objects.filter(profile_name__in=DEFAULT_PROFILES).delete()
888383
def default=(value)
      value = value.to_sym
      unless config.accounts.include?(value)
        raise NoSuchAccount
      end

      config[:default] = value
      config.save!
    end
1245453
protected function _applyDefaults()
    {
        if (isset($this->_config['all']))
        {
            $this->_has_action = $this->_config['all']['action'];
            $this->_search     = $this->_config['all']['search'];
        }
    }
679772
public function defaultFileChanger()
    {
        $files = [
            base_path('config/auth.php'),
            base_path('config/services.php'),
        ];

        foreach ($files as $file) {
            $contents = file_get_contents($file);
            $contents = str_replace('App\User::class', 'App\Models\User::class', $contents);
            file_put_contents($file, $contents);
        }
    }
866100
function setDefaultUser (kontx, next) {
        var a = _.clone(kontx.args);

        if (a.length === 0) { //No args are sent in, set first to be user id
            a[0] = kontx.user._id;
        }
        else if (_.has(a[0], 'include') || _.has(a[0], 'exclude')) { // If first arg is options then reassign
            a[0] = kontx.user._id;
            a[1] = kontx.args[0];
        }

        kontx.args = a;
        next();
    }