Initialize defaults
439825
function () {
    this._ = {};
    this.listen();

    engines(this);
    helpers.methods(this);
    lookup(this);

    // temporary.
    this.define('errors', {
      compile: {
        engine: 'cannot find an engine for: ',
        method: 'expects engines to have a compile method',
      },
      render: {
        callback: 'is async and expects a callback function: ',
        engine: 'cannot find an engine for: ',
        method: 'expects engines to have a render method',
      }
    });

    this.loaders = {};
    this.cache = {};
    this.cache.data = {};

    this.cache.context = {};
    this.views = {};

    this.define('Base', require('./lib/base'));
    this.define('Collection', require('./lib/collection'));
    this.define('Item', require('./lib/item'));
    this.define('List', require('./lib/list'));
    this.define('View', require('./lib/view'));
    this.define('Views', require('./lib/views'));

    this.viewTypes = {
      layout: [],
      renderable: [],
      partial: []
    };

    this.inflections = {};
    this.handlers(utils.methods);
    this.delegateLoaders([
      'loader',
      'resolve',
      'compose',
      'iterator',
    ]);

    // initialize iterators and loaders
    loaders.iterators(this);
    loaders.base(this);
    loaders.data(this);
  }
706872
function initOptions(options, defaults) {
        options || (options = {});
        if (!defaults) {
            return options;
        }
        for (var i in defaults) {
            if (typeof options[i] === 'undefined') {
                options[i] = defaults[i];
            }
        }
        return options;
    }
402511
public function initDefaults() {
        /**
         * @var Tree $this
         */
        $module = Yii::$app->controller->module;
        $iconTypeAttribute = null;
        extract($module->dataStructure);
        $this->setDefault($iconTypeAttribute, TreeView::ICON_CSS);
        foreach (static::$boolAttribs as $attr) {
            $val = in_array($attr, static::$falseAttribs) ? false : true;
            $this->setDefault($attr, $val);
        }
    }
313451
function defaults (target, src) {
      each(src, function (prop) {
        if (typeof target[prop] === 'undefined') {
          target[prop] = src[prop];
        }
      });
    }
1119519
def init_config(self, app):
        """"""
        app.config.setdefault(
            'LOGGING_FS_LEVEL',
            'DEBUG' if app.debug else 'WARNING'
        )
        for k in dir(config):
            if k.startswith('LOGGING_FS'):
                app.config.setdefault(k, getattr(config, k))

        # Support injecting instance path and/or sys.prefix
        if app.config['LOGGING_FS_LOGFILE'] is not None:
            app.config['LOGGING_FS_LOGFILE'] = \
                app.config['LOGGING_FS_LOGFILE'].format(
                    instance_path=app.instance_path,
                    sys_prefix=sys.prefix,
                )
49930
static void initDefaultHandlers() {
		if (config != null && config.getDefaultHandlers() != null) {
			defaultHandlers = getHandlersFromExecList(config.getDefaultHandlers());
			handlerListById.put("defaultHandlers", defaultHandlers);
		}
	}
1291734
def _set_defaults(self):
        
        for field_name in self._fields:
            if field_name in self._init_fields:
                continue
            field = self.get_field(field_name)
            if hasattr(field, "default"):
                field.proxy_set(field.default)
1341558
def set_defaults(object, filter = method(:skip_default?))
      each do |attribute|
        next if filter.call(object, attribute)
        attribute.set_default_value(object)
      end
    end
811399
function setDefaults(scope, defaults) {
        if (!defaults) { return; }

        // store defaults for use in generateRemodel
        scope.defaults = defaults;

        for (var name in defaults) {
            if (defaults.hasOwnProperty(name) && scope[name] === undefined) {
                scope[name] = defaults[name];
            }
        }
    }
1297404
function assignDefaults(defaults, options) {
  var keys = Object.keys(defaults),
      i = keys.length,
      k;

  options = options || {};

  while (i--) {
    k = keys[i];
    if (!(k in options)) {
      options[k] = defaults[k];
    }
  }

  return options;
}
60515
def set_defaults(self):
        """"""

        for const_name, c in file_classes.items():
            if c.multiplicity == '1':
                f = self.file(const_name)
                if not f.record.unpacked_contents:
                    f.setcontent(f.default)
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);
            }
        }
    }
510788
protected function _initSettings()
    {
        parent::_initSettings();
        $this->_emptyIfSingleEntry = $menuLevel = Kwc_Abstract::getSetting($this->_class, 'emptyIfSingleEntry');
    }
247738
function addDefaultOptions(options, defaultOptions) {

    _.defaults(options, defaultOptions);
    options.currentRetries = 0;
    return options;

}
1000762
def apply_defaults(self):
        """"""
        self.emit('will_apply_defaults')
        self.schema.apply_defaults(self)
        self.emit('did_apply_defaults')
910926
function default_init(user, password) {
  this.defaults.username = user;
  this.defaults.password = password;

  this.defaults.headers = {
    Accept: 'application/json'
  };
  this.defaults.headers['Content-Type'] = 'application/json';
}
1111625
private function _setDefaults()
    {
        if (!isset(self::$_template))
            self::_initializeDefaults();
        foreach (self::$_template as $k=>$v) {
            if ($k[0] != '_')
                $this->$k = $v;
        }
        return $this;
    }