Set the default configuration for the user model.
515370
private function setUserModelConfig()
    {
        if (config('defender.user_model') == '') {
            if (str_contains($this->app->version(), '5.1')) {
                return config(['defender.user_model' => $this->app['auth']->getProvider()->getModel()]);
            }

            return config(['defender.user_model' => $this->app['auth']->guard()->getProvider()->getModel()]);
        }
    }
1022804
def set_default(self, key, value):
        
        k = self._real_key(key.lower())
        self._defaults[k] = value
302991
def set_defaults(self, **defaults):
        
        try:
            defaults_items = defaults.iteritems()
        except AttributeError:
            defaults_items = defaults.items()
        for key, val in defaults_items:
            if key not in self.args.keys():
                self.args[key] = val
602302
protected function setupDefaultOptions()
    {
        $defaults = [
            'overwriteInitial'     => false,
            'initialPreviewAsData' => true,
            'browseLabel'          => trans('admin.browse'),
            'cancelLabel'          => trans('admin.cancel'),
            'showRemove'           => false,
            'showUpload'           => false,
            'dropZoneEnabled'      => false,
            'deleteExtraData'      => [
                $this->formatName($this->column) => static::FILE_DELETE_FLAG,
                static::FILE_DELETE_FLAG         => '',
                '_token'                         => csrf_token(),
                '_method'                        => 'PUT',
            ],
        ];

        if ($this->form instanceof Form) {
            $defaults['deleteUrl'] = $this->form->resource().'/'.$this->form->model()->getKey();
        }

        $defaults = array_merge($defaults, ['fileActionSettings' => $this->fileActionSettings]);

        $this->options($defaults);
    }
767566
def set_default(self, name, value):
        
        if self.vars is None:
            self.vars = {}
        if name not in self.vars:
            self.vars[name] = value
829670
protected function _setDefaults()
    {
        $defaults = [
            'authenticate' => [
                'Form' => [
                    'finder'    => 'auth',
                    'userModel' => 'Community.Users',
                    'fields'    => [
                        'username' => 'login',
                        'password' => 'password'
                    ],
                ]
            ],
            'flash' => [
                'key'       => 'auth',
                'element'   => 'error',
                'params'    => ['class' => 'error']
            ],
            'loginAction' => [
                'controller' => 'Users',
                'action'     => 'login',
                'plugin'     => 'Community'
            ],
            'unauthorizedRedirect' => [
                'action'     => 'login',
                'controller' => 'Users',
                'plugin'     => 'Community'
            ],
            'authorize'      => ['Community.Base'],
            'loginRedirect'  => $this->_getLoginRedirect(),
            'logoutRedirect' => $this->_config['loginAction'],
            'authError'      => __d('community', 'You are not authorized to access that location.')
        ];

        $config = $this->getConfig();
        foreach ($config as $key => $value) {
            if ($value !== null) {
                unset($defaults[$key]);
            }
        }

        $this->setConfig($defaults);
    }
1004715
def set_defaults(defaults, kwargs):
    
    for key, value in defaults.items():
        if key not in kwargs and value is not None:
            kwargs[key] = value
        elif isinstance(value, list) and isinstance(kwargs[key], list):
            kwargs[key] = list(value) + kwargs[key]
        elif isinstance(value, dict) and isinstance(kwargs[key], dict):
            set_defaults(value, kwargs[key])
        elif key in kwargs and value is None:
            kwargs[key] = None
854209
def reset
      self.user_agent         = DEFAULT_USER_AGENT
      self.api_version        = DEFAULT_API_VERSION
      self.server_url         = DEFAULT_SERVER_URL
      self.client_name        = DEFAULT_CLIENT_NAME
      self.client_key         = DEFAULT_CLIENT_KEY
      self.connection_options = DEFAULT_CONNECTION_OPTIONS
      self.middleware         = DEFAULT_MIDDLEWARE
      self
    end
30673
private void setDefaultUserAgent() {
        setUserAgent(
                MwsUtl.escapeAppName(applicationName),
                MwsUtl.escapeAppVersion(applicationVersion),
                MwsUtl.escapeAttributeValue("Java/"
                        + System.getProperty("java.version") + "/"
                        + System.getProperty("java.class.version") + "/"
                        + System.getProperty("java.vendor")),

                MwsUtl.escapeAttributeName("Platform"),
                MwsUtl.escapeAttributeValue("" + System.getProperty("os.name")
                        + "/" + System.getProperty("os.arch") + "/"
                        + System.getProperty("os.version")),

                MwsUtl.escapeAttributeName("MWSClientVersion"),
                MwsUtl.escapeAttributeValue(libraryVersion));
    }
324642
def init_model(self, model, value):
        
        if value is None and self.default is not None:
            value = self.default() if callable(self.default) else self.default

        self.set_value(model, value)
671407
def set_default_config(
    *,
    style=_UNSET_SENTINEL,
    max_seq_len=_UNSET_SENTINEL,
    width=_UNSET_SENTINEL,
    ribbon_width=_UNSET_SENTINEL,
    depth=_UNSET_SENTINEL,
    sort_dict_keys=_UNSET_SENTINEL
):
    
    global _default_config

    if style is not _UNSET_SENTINEL:
        set_default_style(style)

    new_defaults = {**_default_config}

    if max_seq_len is not _UNSET_SENTINEL:
        new_defaults['max_seq_len'] = max_seq_len

    if width is not _UNSET_SENTINEL:
        new_defaults['width'] = width

    if ribbon_width is not _UNSET_SENTINEL:
        new_defaults['ribbon_width'] = ribbon_width

    if depth is not _UNSET_SENTINEL:
        new_defaults['depth'] = depth

    if sort_dict_keys is not _UNSET_SENTINEL:
        new_defaults['sort_dict_keys'] = sort_dict_keys

    _default_config = new_defaults
    return new_defaults
1087343
private void resetConfigToDefault() {
    isUseWebservice = true;
    isUpdateAutomatic = true;
    isUseExternalMonomers = false;
    isUseExternalNucleotides = false;
    setUseExternalAttachments(false);
    webserviceMonomersURL = "http://localhost:8080/HELM2MonomerService/rest";
    webserviceMonomersPath = "monomer/";
    webserviceMonomersPutPath = "monomer/";
    webserviceEditorCategorizationURL = "http://localhost:8080";
    webserviceEditorCategorizationPath = "";
    externalNucleotidesPath = "";
    externalMonomersPath = "";
    setExternalAttachmentsPath("");
  }
120527
public function setDefaultUserAgent()
    {
        $user_agent = 'PHP-Curl-Class/' . self::VERSION . ' (+https://github.com/php-curl-class/php-curl-class)';
        $user_agent .= ' PHP/' . PHP_VERSION;
        $curl_version = curl_version();
        $user_agent .= ' curl/' . $curl_version['version'];
        $this->setUserAgent($user_agent);
    }
402900
def set_default(self):
        
        req = self.request(self.mist_client.uri+'/keys/'+self.id)
        req.post()
        self.is_default = True
        self.mist_client.update_keys()
792112
def setdefault(self, key, value):
        
        try:
            super(FlaskConfigStorage, self).setdefault(key, value)
        except RuntimeError:
            self._defaults.__setitem__(key, value)
386740
protected function setupDefaults()
    {
        $defaults = (isset($this->config['defaults'])) ?
            $this->config['defaults'] :
            [];

        foreach ($defaults as $key => $value) {
            if ($key == 'images') {
                if (empty($this->images)) {
                    $this->images = $value;
                }
            } elseif ($key == 'url' && $value === null) {
                $this->setUrl(app('url')->current());
            } elseif (! empty($value) && ! array_key_exists($key, $this->properties)) {
                $this->addProperty($key, $value);
            }
        }
    }
1094038
protected function setupDefaultOptions()
    {
        $defaultOptions = [
            'overwriteInitial' => false,
            'initialPreviewAsData' => true,
            'browseLabel' => trans('admin.browse'),
            'showRemove' => false,
            'showUpload' => false,
//            'initialCaption'       => $this->initialCaption($this->value),
            'deleteExtraData' => [
                $this->formatName($this->column) => static::FILE_DELETE_FLAG,
                static::FILE_DELETE_FLAG => '',
                '_token' => csrf_token(),
                '_method' => 'PUT',
            ],
        ];

        if ($this->form instanceof Form) {
            $defaultOptions['deleteUrl'] = $this->form->resource().'/'.$this->form->model()->getKey();
        }

        $this->options($defaultOptions);
    }