Set important defaults.
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);
    }
240131
def setdefault (self, key, *args):
        """"""
        assert isinstance(key, basestring)
        return dict.setdefault(self, key.lower(), *args)
1319978
public function set_defaults() {
		// General attributes.
		$this->set_tags_to_ignore();
		$this->set_classes_to_ignore();
		$this->set_ids_to_ignore();

		// Smart characters.
		$this->set_smart_quotes();
		$this->set_smart_quotes_primary();
		$this->set_smart_quotes_secondary();
		$this->set_smart_quotes_exceptions();
		$this->set_smart_dashes();
		$this->set_smart_dashes_style();
		$this->set_smart_ellipses();
		$this->set_smart_diacritics();
		$this->set_diacritic_language();
		$this->set_diacritic_custom_replacements();
		$this->set_smart_marks();
		$this->set_smart_ordinal_suffix();
		$this->set_smart_ordinal_suffix_match_roman_numerals();
		$this->set_smart_math();
		$this->set_smart_fractions();
		$this->set_smart_exponents();

		// Smart spacing.
		$this->set_single_character_word_spacing();
		$this->set_fraction_spacing();
		$this->set_unit_spacing();
		$this->set_french_punctuation_spacing();
		$this->set_units();
		$this->set_dash_spacing();
		$this->set_dewidow();
		$this->set_max_dewidow_length();
		$this->set_max_dewidow_pull();
		$this->set_dewidow_word_number();
		$this->set_wrap_hard_hyphens();
		$this->set_url_wrap();
		$this->set_email_wrap();
		$this->set_min_after_url_wrap();
		$this->set_space_collapse();
		$this->set_true_no_break_narrow_space();

		// Character styling.
		$this->set_style_ampersands();
		$this->set_style_caps();
		$this->set_style_initial_quotes();
		$this->set_style_numbers();
		$this->set_style_hanging_punctuation();
		$this->set_initial_quote_tags();

		// Hyphenation.
		$this->set_hyphenation();
		$this->set_hyphenation_language();
		$this->set_min_length_hyphenation();
		$this->set_min_before_hyphenation();
		$this->set_min_after_hyphenation();
		$this->set_hyphenate_headings();
		$this->set_hyphenate_all_caps();
		$this->set_hyphenate_title_case();
		$this->set_hyphenate_compounds();
		$this->set_hyphenation_exceptions();

		// Parser error handling.
		$this->set_ignore_parser_errors();
	}
896232
protected function _setDefault()
    {
        if ($this->_default === null) {
            $this->_table->alter(
                sprintf('ALTER COLUMN %s DROP DEFAULT', $this->_database->prepareIdentifier($this->_name))
            );
        } else {
            $this->_table->alter(
                sprintf(
                    'ALTER COLUMN %s SET DEFAULT %s',
                    $this->_database->prepareIdentifier($this->_name),
                    $this->_database->prepareValue($this->_default, $this->_datatype)
                )
            );
        }
    }
1181829
private function setDefaults()
    {
        $this->options = [
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_FOLLOWLOCATION => true,
            CURLOPT_HEADER => true,
            CURLINFO_HEADER_OUT => true
        ];
    }
1205890
public void applyDefaults() {
		if (fillColor == null) {
			fillColor = "#ffffff"; // white
		}
		if (strokeColor == null) {
			strokeColor = "#000000"; // black
		}
		if (strokeOpacity == -1) {
			strokeOpacity = 1; // fully opaque by default
		}
		if (fillOpacity == -1) {
			fillOpacity = .5f; // 50% transparent by default
		}
		if (strokeWidth == -1) {
			strokeWidth = 1; // white
		}
	}
881800
protected function setDefaultOptions() : void
    {
        $type = $this->getType();
        if (! empty($this->defaultOptions[$type])) {
            $this->options = $this->defaultOptions[$type];
        }
    }
596497
def hide_defaults(self):
        """"""
        for k in list(self.fields.keys()):
            if k in self.default_fields:
                if self.default_fields[k] == self.fields[k]:
                    del(self.fields[k])
        self.payload.hide_defaults()
508461
public static void setDefaults() {

        lineColor = Color.BLACK;
        fontColor=Color.WHITE;
        backgroundColor=Color.BLACK;
        lineWidth = 1f;
        fontSizeDp=32;
        DEBUG=false;
        DEBUG2=false;
    }
302313
def _update_defaults(self, defaults, old_version, verbose=False):
        """"""
        old_defaults = self._load_old_defaults(old_version)
        for section, options in defaults:
            for option in options:
                new_value = options[ option ]
                try:
                    old_value = old_defaults.get(section, option)
                except (cp.NoSectionError, cp.NoOptionError):
                    old_value = None
                if old_value is None or \
                  to_text_string(new_value) != old_value:
                    self._set(section, option, new_value, verbose)
767813
def setDictDefaults (d, defaults):
  
  for key, val in defaults.items():
    d.setdefault(key, val)

  return d
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
1239304
def setdefault(self, name: str, default: Any=None) -> Any:
        """"""
        return self.__dict__.setdefault(name, default)
845714
def defaults(current: dict, *args: AnyMapping) -> dict:
    
    """
    for data in args:
        for key, value in data.items():
            current.setdefault(key, value)
    return current
1232103
protected void setDefaults() {
    // map.put("tsd.network.port", ""); // does not have a default, required
    // map.put("tsd.http.cachedir", ""); // does not have a default, required
    // map.put("tsd.http.staticroot", ""); // does not have a default, required
    default_map.put("tsd.mode", "rw");
    default_map.put("tsd.no_diediedie", "false");
    default_map.put("tsd.network.bind", "0.0.0.0");
    default_map.put("tsd.network.worker_threads", "");
    default_map.put("tsd.network.async_io", "true");
    default_map.put("tsd.network.tcp_no_delay", "true");
    default_map.put("tsd.network.keep_alive", "true");
    default_map.put("tsd.network.reuse_address", "true");
    default_map.put("tsd.core.authentication.enable", "false");
    default_map.put("tsd.core.authentication.plugin", "");
    default_map.put("tsd.core.auto_create_metrics", "false");
    default_map.put("tsd.core.auto_create_tagks", "true");
    default_map.put("tsd.core.auto_create_tagvs", "true");
    default_map.put("tsd.core.connections.limit", "0");
    default_map.put("tsd.core.enable_api", "true");
    default_map.put("tsd.core.enable_ui", "true");
    default_map.put("tsd.core.meta.enable_realtime_ts", "false");
    default_map.put("tsd.core.meta.enable_realtime_uid", "false");
    default_map.put("tsd.core.meta.enable_tsuid_incrementing", "false");
    default_map.put("tsd.core.meta.enable_tsuid_tracking", "false");
    default_map.put("tsd.core.meta.cache.enable", "false");
    default_map.put("tsd.core.plugin_path", "");
    default_map.put("tsd.core.socket.timeout", "0");
    default_map.put("tsd.core.tree.enable_processing", "false");
    default_map.put("tsd.core.preload_uid_cache", "false");
    default_map.put("tsd.core.preload_uid_cache.max_entries", "300000");
    default_map.put("tsd.core.storage_exception_handler.enable", "false");
    default_map.put("tsd.core.uid.random_metrics", "false");
    default_map.put("tsd.core.bulk.allow_out_of_order_timestamps", "false");
    default_map.put("tsd.query.filter.expansion_limit", "4096");
    default_map.put("tsd.query.skip_unresolved_tagvs", "false");
    default_map.put("tsd.query.allow_simultaneous_duplicates", "true");
    default_map.put("tsd.query.enable_fuzzy_filter", "true");
    default_map.put("tsd.query.limits.bytes.default", "0");
    default_map.put("tsd.query.limits.bytes.allow_override", "false");
    default_map.put("tsd.query.limits.data_points.default", "0");
    default_map.put("tsd.query.limits.data_points.allow_override", "false");
    default_map.put("tsd.query.limits.overrides.interval", "60000");
    default_map.put("tsd.query.multi_get.enable", "false");
    default_map.put("tsd.query.multi_get.limit", "131072");
    default_map.put("tsd.query.multi_get.batch_size", "1024");
    default_map.put("tsd.query.multi_get.concurrent", "20");
    default_map.put("tsd.query.multi_get.get_all_salts", "false");
    default_map.put("tsd.rpc.telnet.return_errors", "true");
    // Rollup related settings
    default_map.put("tsd.rollups.enable", "false");
    default_map.put("tsd.rollups.tag_raw", "false");
    default_map.put("tsd.rollups.agg_tag_key", "_aggregate");
    default_map.put("tsd.rollups.raw_agg_tag_value", "RAW");
    default_map.put("tsd.rollups.block_derived", "true");
    default_map.put("tsd.rtpublisher.enable", "false");
    default_map.put("tsd.rtpublisher.plugin", "");
    default_map.put("tsd.search.enable", "false");
    default_map.put("tsd.search.plugin", "");
    default_map.put("tsd.stats.canonical", "false");
    default_map.put("tsd.startup.enable", "false");
    default_map.put("tsd.startup.plugin", "");
    default_map.put("tsd.storage.hbase.scanner.maxNumRows", "128");
    default_map.put("tsd.storage.fix_duplicates", "false");
    default_map.put("tsd.storage.flush_interval", "1000");
    default_map.put("tsd.storage.hbase.data_table", "tsdb");
    default_map.put("tsd.storage.hbase.uid_table", "tsdb-uid");
    default_map.put("tsd.storage.hbase.tree_table", "tsdb-tree");
    default_map.put("tsd.storage.hbase.meta_table", "tsdb-meta");
    default_map.put("tsd.storage.hbase.zk_quorum", "localhost");
    default_map.put("tsd.storage.hbase.zk_basedir", "/hbase");
    default_map.put("tsd.storage.hbase.prefetch_meta", "false");
    default_map.put("tsd.storage.enable_appends", "false");
    default_map.put("tsd.storage.repair_appends", "false");
    default_map.put("tsd.storage.enable_compaction", "true");
    default_map.put("tsd.storage.compaction.flush_interval", "10");
    default_map.put("tsd.storage.compaction.min_flush_threshold", "100");
    default_map.put("tsd.storage.compaction.max_concurrent_flushes", "10000");
    default_map.put("tsd.storage.compaction.flush_speed", "2");
    default_map.put("tsd.timeseriesfilter.enable", "false");
    default_map.put("tsd.uid.use_mode", "false");
    default_map.put("tsd.uid.lru.enable", "false");
    default_map.put("tsd.uid.lru.name.size", "5000000");
    default_map.put("tsd.uid.lru.id.size", "5000000");
    default_map.put("tsd.uidfilter.enable", "false");
    default_map.put("tsd.core.stats_with_port", "false");
    default_map.put("tsd.http.show_stack_trace", "true");
    default_map.put("tsd.http.query.allow_delete", "false");
    default_map.put("tsd.http.header_tag", "");
    default_map.put("tsd.http.request.enable_chunked", "false");
    default_map.put("tsd.http.request.max_chunk", "4096");
    default_map.put("tsd.http.request.cors_domains", "");
    default_map.put("tsd.http.request.cors_headers", "Authorization, "
      + "Content-Type, Accept, Origin, User-Agent, DNT, Cache-Control, "
      + "X-Mx-ReqToken, Keep-Alive, X-Requested-With, If-Modified-Since");
    default_map.put("tsd.query.timeout", "0");
    default_map.put("tsd.storage.use_otsdb_timestamp", "false");
    default_map.put("tsd.storage.use_max_value", "true");
    default_map.put("tsd.storage.get_date_tiered_compaction_start", "0");

    for (Map.Entry<String, String> entry : default_map.entrySet()) {
      if (!properties.containsKey(entry.getKey()))
        properties.put(entry.getKey(), entry.getValue());
    }

    loadStaticVariables();
  }
1272316
def setdefault(self, name, value):
        ''' '''
        if name in self:
            return self[name]
        self[name] = value
        return self[name]
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);
            }
        }
    }