Set default rule of parameterize route.
333771
protected function setDefaultRule()
    {
        if (Yii::$app->getAuthManager()->getRule(RouteRule::RULE_NAME) === null) {
            Yii::$app->getAuthManager()->add(new RouteRule());
        }
    }
254142
public static void setParamDefault(
            final Multimap<String, String> params, final String key, final String value) {
        if (!params.containsKey(key)) {
            params.put(key, value);
        }
    }
382635
def run(self):
        """"""
        function_cfgs = list()
        for _ in self.cfg_list:
            function_cfgs.extend(self.find_route_functions_taint_args())
        self.cfg_list.extend(function_cfgs)
327828
def _add_url_rule(url_or_urls):
    """"""
    old = current_app._got_first_request
    # This is bit of cheating to overcome @flask.app.setupmethod decorator.
    current_app._got_first_request = False
    if isinstance(url_or_urls, six.string_types):
        url_or_urls = [url_or_urls]
    map(lambda url: current_app.add_url_rule(url, 'invenio_pages.view', view),
        url_or_urls)
    current_app._got_first_request = old
393758
function RouteRule_createUrl(route, params) {
        var escape = [], i, len, c, url;

        if (this.route !== route) {
            if (!this.routeRule) {
                return false;
            }
            escape = this.match(this.routeRule, this.trim(route, '/'));
            if (!escape.length) {
                return false;
            }
            escape.forEach(function (item) {
                if (item.key.indexOf('<') === -1) {
                    item.key = '<' + item.key + '>';
                }
            });
        }

        len = this.paramRules.length;

        for (i = 0; i < len; ++i) {
            c = this.paramRules[i];
            if (params.hasOwnProperty(c.key) && (c.value === '' || (Type.isRegExp(c.value) && c.value.test(params[c.key])) || this.match(c.value, params[c.key].toString()).length > 0)) {
                escape.push({
                    key: '<' + c.key + '>',
                    value: params[c.key].toString()
                });
                delete params[c.key];
            } else if (Type.isUndefined(params[c.key])) {
                return false;
            }
        }

        url = this.trim(this.escape(this.template, escape), '/');

        if (this.match(this.pattern.regex, url).length === 0) {
            return false;
        }

        if (Object.keys(params).length > 0) {
            url += "?" + this.buildQuery(params);
        }
        return url;
    }
731948
function adaptForRouter(val, key) {
  key = key.split(/\s+/);
  if (typeof val === 'string' || typeof val === 'function' || Array.isArray(val)) {
    val = {
      path: key[0],
      method: key[1],
      controller: val
    };
  } else if (typeof val === 'object') {
    if (!val.path) {
      val.path = key[0];
    }
    if (!val.method) {
      val.method = key[1];
    }
  } else {
    throw new Error(`Problem with route "${key}"`);
  }
  return val;
}
632597
def p_route_io(self, p):
        """"""
        if len(p) > 6:
            p[0] = (p[2], p[4], p[6])
        else:
            p[0] = (p[2], p[4], None)
691176
def set_config_parameter(self, param, value):
        '''

        '''
        with self._mutex:
            if self._obj.set_configuration(param, value) != RTC.RTC_OK:
                raise exceptions.FailedToSetConfigurationError(param, value)
            # Force a reparse of the configuration
            self._configuration = None
139576
def _normalize_params(self, *paths, **query_kwargs):
        """"""
        kwargs = {}

        if paths:
            fragment = paths[-1]
            if fragment:
                if fragment.startswith("#"):
                    kwargs["fragment"] = fragment
                    paths.pop(-1)

            kwargs["path"] = "/".join(self.normalize_paths(*paths))

        kwargs["query_kwargs"] = query_kwargs
        return kwargs
1011583
def _setDefault(self, **kwargs):
        
        for param, value in kwargs.items():
            p = getattr(self, param)
            if value is not None and not isinstance(value, JavaObject):
                try:
                    value = p.typeConverter(value)
                except TypeError as e:
                    raise TypeError('Invalid default param value given for param "%s". %s'
                                    % (p.name, e))
            self._defaultParamMap[p] = value
        return self
1226584
function RouteConfigurator(opt_routesFilepath) {
  if (opt_routesFilepath) {
    this.setRoutesFilepath(opt_routesFilepath);
    this.parse(fs.readFileSync(this.routesFilepath).toString());
  }
}
71759
def _set_params(self, x):
        """"""
        assert x.size == self.num_params
        self.varianceU = x[0]
        self.varianceY = x[1]
        self.lengthscaleU = x[2]
        self.lengthscaleY = x[3]
338912
function() {
                    if (!can.route.currentBinding) {
                        can.route._call("bind");
                        can.route.bind("change", onRouteDataChange);
                        can.route.currentBinding = can.route.defaultBinding;
                    }
                }
684591
private function runRouteBinding(): void
    {
        // calculated depend of language
        $pathway = $this->getPathInfo();
        /** @var array $routing */
        $routing = App::$Properties->getAll('Routing');

        // try to work with static aliases
        if (Any::isArray($routing) && isset($routing['Alias'], $routing['Alias'][env_name])) {
            $pathway = $this->findStaticAliases($routing['Alias'][env_name], $pathway);
        }

        $this->setPathdata(explode('/', trim($pathway, '/')));

        // set default controller and action for undefined data
        if (!$this->action) {
            $this->action = 'Index';
        }

        // empty or contains backslashes? set to main
        if (!$this->controller || Str::contains('\\', $this->controller)) {
            $this->controller = 'Main';
        }

        // find callback injection in routing configs (calculated in App::run())
        if (Any::isArray($routing) && isset($routing['Callback'], $routing['Callback'][env_name])) {
            $this->findDynamicCallbacks($routing['Callback'][env_name], $this->controller);
        }
    }
895796
public function setRoute($route, array $params = array())
    {
        $this->route = $route;
        $this->routeParams = $params;

        return $this;
    }
1225595
function startAtRoute( routeName, optionalContext = {} ) {
      return flowController.loadFlow( 'mainz' )
         .then( routerMock.awaitRegisterRoutes )
         .then( () => routerMock.triggerRouteHandler( routeName, optionalContext ) )
         .then( awaitDidNavigate );
   }
640416
function defineRoute (server, opts) {

    server.route({
        method: 'GET',
        path: '/bomb',
        handler: handler,
        config: {
            jsonp: 'callback',
            validate: {
                query: {
                    count: Hapi.types.Number()
                },
                payload: false
            }
        }
    });

    function handler (req) {
        var count = (req.query.count || opts.defaultBombCount);
        var res = {};
        res[opts.plural] = _.sample(opts.things, count);
        req.reply(res);
    }

}