Callback that is used whenever --config is passed.
439113
def read_config(ctx, param, config_path):
    """"""
    if sys.argv[1] == 'init':
        return
    cfg = ctx.ensure_object(Config)
    if config_path is None:
        config_path = path.join(sys.path[0], 'v2ex_config.json')
    if not path.exists(config_path):
        sys.exit("Can't find config file at {0}.\nPlease read "
                 "https://github.com/lord63/v2ex_daily_mission "
                 "to follow the guide.".format(config_path))
    cfg.load_config(config_path)
    return config_path
700157
def on_any_event(self, event):
        """"""
        if os.path.isfile(event.src_path):
            self.callback(event.src_path, **self.kwargs)
53457
function callbackOnce(err, arg) {
            var cb = callback;
            callback = null;
            if (cb) { cb(err, arg); }
        }
1158544
def on_change(self, *callbacks):
        ''' 

        '''
        for callback in callbacks:

            if callback in self._callbacks: continue

            _check_callback(callback, ('event',))

            self._callbacks[callback] = callback
241242
private function getConfigMapWatchCallback()
    {
        return function ($event, $watch) {
            //$this->controller->logEvent($event);
            switch ($event['type']) {
                case 'ADDED':
                case 'MODIFIED':
                    if (!empty($event['object']['data'])) {
                        array_walk($event['object']['data'], function (&$item, $key) {
                            $item = json_decode($item, true);
                        });
                    }
                    $this->data = $event['object']['data'];
                    break;
                case 'DELETED':
                    $this->data = null;
                    break;
            }
        };
    }
418309
def on_config_value_changed(self, config_m, prop_name, info):
        
        config_key = info['args'][1]
        if "LOGGING" in config_key:
            self.update_log_button_state()
143873
function ( key, value ) {
            YAHOO.log("Firing Config event: " + key + "=" + value, "info", "Config");
            var property = this.config[key];
        
            if (property && property.event) {
                property.event.fire(value);
            } 
        }
374987
function when(condition, configSetters) {
  assertConfigSetters(configSetters)

  if (condition) {
    return group(configSetters)
  } else {
    return () => config => config
  }
}
1293900
def _build_callback(self, config):
        '''  '''
        wrapped = config['callback']
        plugins = self.plugins + config['apply']
        skip    = config['skip']
        try:
            for plugin in reversed(plugins):
                if True in skip: break
                if plugin in skip or type(plugin) in skip: continue
                if getattr(plugin, 'name', True) in skip: continue
                if hasattr(plugin, 'apply'):
                    wrapped = plugin.apply(wrapped, config)
                else:
                    wrapped = plugin(wrapped)
                if not wrapped: break
                functools.update_wrapper(wrapped, config['callback'])
            return wrapped
        except RouteReset: # A plugin may have changed the config dict inplace.
            return self._build_callback(config)
661770
function(suppliedConfig) {
    // Handle config and defaults
    try {
      config.parseAndUpdate(suppliedConfig);
    } catch (e) {
      render.triggerError(e);
      return this
    }

    utils.logDebug(['Final config:', getConfig()]);

    try {
      return startRender();
    } catch (e) {
      render.triggerError(e);
      return this
    }
  }
369444
function _use(config) {
    var _config = this._config;

    Object.keys(config).forEach(function(key) {
      _config[key] = config[key];
    });

    return this;
  }
414574
def _handle_changed_config(self, change):
        """"""

        key, value = change.get("key"), change.get("value")
        self.room.config.update({key: value})
        self.conn.enqueue_data("config", self.room.config)
16788
function (config) {
    config = config || {};
    Appender.call(this, config);

    /**
     * True to log strings instead of objects
     */
    this.appendStrings = (typeof config.appendStrings !== 'undefined') ?
      config.appendStrings :
      true;
  }
807566
private function checkCallback() : void
    {
        if (isset($this->onload) && !$this->is_loaded) {
            $this->is_loaded = true;
            call_user_func($this->onload, $this);
        }
    }
1180941
function config(options) {
    var current = config.current
    Object.assign(current, options)
    api._init(current)
}
155578
def configure_callbacks(app):
    

    @app.before_request
    def before_request():
        """ Retrieve menu configuration before every request (this will return
            cached version if possible, else reload from database. """

        from flask import session

        #g.menusystem = helper.generate_menusystem()
        session['menusystem'] = helper.generate_menusystem()
        print session['menusystem']
1191791
function checkOpts(config, cb) {
  // jshint eqnull: true

  var prefix = "ragents.createSession(): "

  if (config == null) throw Error(prefix + "config is null")

  if (config.url == null) throw Error(prefix + "config.url is null")
  if (config.key == null) throw Error(prefix + "config.key is null")

  if (null == cb)        throw Error(prefix + "callback is null")
  if (!_.isFunction(cb)) throw Error(prefix + "callback is not a function")
}