detect view name from environ
554268
def detect_view_name(self, environ: Dict[str, Any]) -> str:
        
        script_name = environ.get('SCRIPT_NAME', '')
        path_info = environ.get('PATH_INFO', '')
        match = self.urlmapper.lookup(path_info)
        if match is None:
            return None

        splited = match.split_path_info(path_info)
        extra_path_info = splited[1]
        pos_args = []  # type: List[str]

        routing_args = environ.get('wsgiorg.routing_args', ((), {}))
        (cur_pos, cur_named) = routing_args
        new_pos = list(cur_pos) + list(pos_args)
        new_named = match.new_named_args(cur_named)
        environ['wsgiorg.routing_args'] = (new_pos, new_named)
        environ['webdispatch.urlmapper'] = self.urlmapper
        urlgenerator = URLGenerator(environ, self.urlmapper)
        environ['webdispatch.urlgenerator'] = urlgenerator
        environ['SCRIPT_NAME'] = script_name + splited[0]
        environ['PATH_INFO'] = extra_path_info

        return match.name
1211301
def _view(self, filepath, format):
        """"""
        methodnames = [
            '_view_%s_%s' % (format, backend.PLATFORM),
            '_view_%s' % backend.PLATFORM,
        ]
        for name in methodnames:
            view_method = getattr(self, name, None)
            if view_method is not None:
                break
        else:
            raise RuntimeError('%r has no built-in viewer support for %r '
                'on %r platform' % (self.__class__, format, backend.PLATFORM))
        view_method(filepath)
702034
@SuppressWarnings("unused") // expose utility check method to subclasses
    protected FormValidation checkDisplayName(@Nonnull View view, @CheckForNull String value) {
        if (StringUtils.isBlank(value)) {
            // no custom name, no need to check
            return FormValidation.ok();
        }
        for (View v: view.owner.getViews()) {
            if (v.getViewName().equals(view.getViewName())) {
                continue;
            }
            if (StringUtils.equals(v.getDisplayName(), value)) {
                return FormValidation.warning(Messages.View_DisplayNameNotUniqueWarning(value));
            }
        }
        return FormValidation.ok();
    }
257995
def view_name_from(path):
    ""
    try:
        return CACHED_VIEWS[path]
        
    except KeyError:
        view = resolve(path)
        module = path
        name = ''
        if hasattr(view.func, '__module__'):
            module = resolve(path).func.__module__
        if hasattr(view.func, '__name__'):
            name = resolve(path).func.__name__
        
        view =  "%s.%s" % (module, name)
        CACHED_VIEWS[path] = view
        return view
512210
def scene_name(frames):
        """"""
        # "scene.name" <scene_id> <config>
        reader = MessageReader(frames)
        results = reader.string("command").uint32("scene_id").string("name").assert_end().get()
        if results.command != "scene.name":
            raise MessageParserError("Command is not 'scene.name'")
        return (results.scene_id, results.name)
188602
def namespaced_view_name(view_name, metric_prefix):
    
    metric_prefix = metric_prefix or "custom.googleapis.com/opencensus"
    return os.path.join(metric_prefix, view_name).replace('\\', '/')
1114212
def get_view_name(self):
        
        func = self.settings.VIEW_NAME_FUNCTION
        return func(self.__class__, getattr(self, 'suffix', None))
685800
function detectChangesInternal(hostView, hostNode, component) {
    var oldView = enterView(hostView, hostNode);
    var hostTView = hostView[TVIEW];
    var template = hostTView.template;
    var viewQuery = hostTView.viewQuery;
    try {
        namespaceHTML();
        createViewQuery(viewQuery, hostView[FLAGS], component);
        template(getRenderFlags(hostView), component);
        refreshView();
        updateViewQuery(viewQuery, component);
    }
    finally {
        leaveView(oldView);
    }
}
1153006
protected function getViewName()
    {
        $name = $this->request->getAttribute(self::VIEW);
        return $this->prefix . $name;
    }
133684
function view(options) {
			var name = options.name,
				locals = options.locals,
				callback = options.callback;

			this.render(path.join(this._viewRoot, '/views/' + name), locals, callback);
		}
688606
def get_view_name(view_cls, suffix=None):
    
    name = view_cls.__name__
    name = formatting.remove_trailing_string(name, 'View')
    name = formatting.remove_trailing_string(name, 'ViewSet')
    name = formatting.camelcase_to_spaces(name)
    if suffix:
        name += ' ' + suffix

    return name
600077
def OnViewTypeTool( self, event ):
        """"""
        new = self.viewTypeTool.GetStringSelection()
        if new != self.viewType:
            self.viewType = new
            self.OnRootView( event )
17464
function ___GET_ENV_HOSTNAME() {
	try {
		if ( HAS_NODE_BUFFER ) {
			return require( 'os' ).hostname;
		}
		else
		if ( typeof window !== "undefined" ) {
			return window.location.hostname;
		}
		else {
			throw new Error("");
		}
	}
	catch(e) {
		return 'unknown.' + DumpHexStringLE(RandomBytes(32));
	}
}
742499
def _get_callback_context(env):
    """"""
    if env.model is not None and env.cvfolds is None:
        context = 'train'
    elif env.model is None and env.cvfolds is not None:
        context = 'cv'
    return context
693967
def locate_endpoint_function(self, name=None):
        ''
        if name is not None:
            ep = "%s_%s" %(self._base_pathname,
                           name)
        else:
            ep = self._base_pathname
        return self._notflask.endpoints[ep]['view_func']
68557
def render_view(view_name, **args):
    ''''''
    try:
        root_xml = get_view_root(view_name)
        return render(root_xml, **args)
    except CoreError as error:
        error.add_view_info(ViewInfo(view_name, None))
        raise
    except:
        info = exc_info()
        error = ViewError('Unknown error occured during rendering', ViewInfo(view_name, None))
        error.add_cause(info[1])
        raise error from info[1]
950454
def getDisplayName(self):
        """"""
        displayName = self.name
        if self.arguments:
            displayName += "(" + ", ".join(self.arguments) + ")"
        return displayName