Set the global app prefix and separator.
14716
def set_db_application_prefix(prefix, sep=None):
    """"""
    global _APPLICATION_PREFIX, _APPLICATION_SEP
    _APPLICATION_PREFIX = prefix
    if (sep is not None):
        _APPLICATION_SEP = sep
163873
function(prefix) {
    jst.global          = true;
    jst.globalTagPrefix = prefix || jst.tagPrefix;
    for (let tag of jst.tags) {
      let name = jst.globalTagPrefix + tag;
      let g = typeof global !== 'undefined' ? global : window;
      g[name] = function() {
        return jst[name].apply(this, arguments);
      };
    }
  }
620524
public void setPrefix(@Nonnull String prefixName, @Nonnull String prefix) {
        if (!isUsingDefaultShortFormProvider()) {
            resetShortFormProvider();
        }
        ((DefaultPrefixManager) shortFormProvider).setPrefix(prefixName, prefix);
    }
620826
def init_app(self, app):
        """"""
        app.config.setdefault('SSLIFY_AGE', self.defaults['age'])
        app.config.setdefault('SSLIFY_SUBDOMAINS', self.defaults['subdomains'])
        app.config.setdefault('SSLIFY_PERMANENT', self.defaults['permanent'])
        app.config.setdefault('SSLIFY_SKIPS', self.defaults['skips'])

        app.before_request(self.redirect_to_ssl)
        app.after_request(self.set_hsts_header)
54817
protected function applyPrefix()
    {
        if (is_callable($this->prefix)) {
            $prefix = call_user_func($this->prefix, $this);
        } else {
            $prefix = $this->prefix;
        }
        if ($prefix && strpos($this->_slug, $prefix) === false) {
            $this->_slug = $prefix . $this->_slug;
        }
    }
1353385
function (root_path, default_prefix) {
		var arr = SR.Settings.SR_PATH.split(SR.path.sep);
		var prefix = arr[arr.length-1] + '-';
		var dirs = UTIL.getDirectoriesSync(root_path);

		if (default_prefix)
			prefix = default_prefix;
		
		//LOG.warn('default_prefix: ' + default_prefix + ' prefix: ' + prefix + ' paths to check:');
		for (var i in dirs) {
			//LOG.warn(dirs[i]);
			if (dirs[i].startsWith(prefix)) { 
				SR.Settings.MOD_PATHS.push(SR.path.resolve(root_path, dirs[i]));
			}
		}
	}
10243
public function setPrefix($prefix = null)
    {
        $prefix = trim($prefix, '/');

        $this->prefix = ($prefix) ? trim($prefix, '/') . '/' : '';
    }
974176
public void setNamespace(String prefix, String uri) {

    this.prefix2namespace.put(prefix, uri);
    this.namespace2prefix.put(uri, prefix);
  }
222816
def set_progress_brackets(self, start, end):
        """"""
        self.sep_start = start
        self.sep_end = end
459181
function mount(_prefix, _app) {
  const app = _app || _prefix;
  const prefix = util.isString(_prefix) ? _prefix : '/';

  assert(prefix[0] === '/', 'mount path must begin with "/"');

  const downstream = app.middleware ? compose(app.middleware) : app;

  if (prefix === '/') {
    return downstream;
  }

  const trailingSlash = prefix.slice(-1) === '/';
  const name = app.name || 'unnamed';

  debug('mount %s %s', prefix, name);


  /**
   * [match description]
   * @param  {[type]} path [description]
   * @return {[type]}         [description]
   */
  function match(path) {
    if (path.indexOf(prefix) !== 0) {
      return false;
    }

    const newPath = path.replace(prefix, '') || '/';
    if (trailingSlash) {
      return newPath;
    }

    if (newPath[0] !== '/') {
      return false;
    }

    return newPath;
  }

  return (ctx, next) => {
    const prev = ctx.path;
    const newPath = match(prev);
    debug('mount %s %s -> %s', prefix, name, newPath);

    if (!newPath) {
      return next();
    }
    /* eslint no-param-reassign:0 */
    ctx.mountPath = prefix;
    ctx.path = newPath;
    debug('enter %s -> %s', prev, ctx.path);
    const goNext = () => {
      debug('leave %s -> %s', ctx.path, prev);
      ctx.path = prev;
      return next();
    };
    if (app.middleware) {
      return downstream(ctx).then(goNext);
    }
    return downstream(ctx, goNext);
  };
}
854487
def init_app(self, app):
        """"""
        app.config.from_pyfile('{0}.cfg'.format(app.name), silent=True)
152431
protected function setAppDirectoryNamespace()
	{
		$files = Finder::create()
                            ->in($this->laravel['path'])
                            ->name('*.php');

		foreach ($files as $file)
		{
			$this->replaceNamespace($file->getRealPath());
		}
	}
55799
def init_app(self, app, env_file=None, verbose_mode=False):
        """"""
        if self.app is None:
            self.app = app
        self.verbose_mode = verbose_mode

        if env_file is None:
            env_file = os.path.join(os.getcwd(), ".env")
        if not os.path.exists(env_file):
            warnings.warn("can't read {0} - it doesn't exist".format(env_file))
        else:
            self.__import_vars(env_file)
297218
protected function setAppConfigNamespaces()
    {
        $search = [
            $this->currentRoot.'\\Providers',
            $this->currentRoot.'\\Http\\Controllers\\',
        ];

        $replace = [
            $this->argument('name').'\\Providers',
            $this->argument('name').'\\Http\\Controllers\\',
        ];

        $this->replaceIn($this->getConfigPath('app'), $search, $replace);
    }
636797
def set_root_prefix(self, prefix=None):
        
        if prefix:
            self.ROOT_PREFIX = prefix
        else:
            # Find some conda instance, and then use info to get 'root_prefix'
            worker = self._call_and_parse(['info', '--json'], abspath=False)
            info = worker.communicate()[0]
            self.ROOT_PREFIX = info['root_prefix']
463811
def init_app(self, app):
        """"""

        self.app = app
        self.app.apscheduler = self

        self._load_config()
        self._load_jobs()

        if self.api_enabled:
            self._load_api()
103845
def init_app(self, app):
        
        app.config.setdefault('FEDORA_BASE_URL', 'http://localhost:8080')
        if hasattr(app, 'teardown_appcontext'):
            app.teardown_appcontext(self.teardown)
        else:
            app.teardown_request(self.teardown)