Process view is executed before the view function, here we get the
        function name add set it as the span name.
170857
def process_view(self, request, view_func, *args, **kwargs):
        

        # Do not trace if the url is blacklisted
        if utils.disable_tracing_url(request.path, self.blacklist_paths):
            return

        try:
            # Get the current span and set the span name to the current
            # function name of the request.
            tracer = _get_current_tracer()
            span = tracer.current_span()
            span.name = utils.get_func_name(view_func)
        except Exception:  # pragma: NO COVER
            log.error('Failed to trace request', exc_info=True)
8074
def resolve_name(view):
    
    if inspect.isfunction(view):
        return view.__name__
    if hasattr(view, 'url_name'):
        return view.url_name
    if isinstance(view, six.string_types):
        return view.split('.')[-1]
    return None
1298565
public function on_before_render()
    {
        $pageTitle = $this->get('pageTitle');
        if (!$pageTitle) {
            $this->set('pageTitle', t($this->c->getCollectionName()));
        }
        $dbConfig = $this->app->make('config/database');
        $this->set('showPrivacyPolicyNotice', !$dbConfig->get('app.privacy_policy_accepted'));
        $this->set('token', $this->token);
        $this->set('error', $this->error);
    }
1133037
function (view) {
            return function () {
                if (
                    view === 'structure' && this.exists('.cms-toolbar-item-cms-mode-switcher .cms-btn-active') ||
                    view === 'content' && !this.exists('.cms-toolbar-item-cms-mode-switcher .cms-btn-active')
                ) {
                    return this.wait(100);
                }

                return this.waitForSelector('.cms-toolbar-expanded')
                    .then(function () {
                        return this.click('.cms-toolbar-item-cms-mode-switcher .cms-btn');
                    })
                    .then(function () {
                        if (view === 'structure') {
                            return this.waitForSelector('.cms-structure-content .cms-dragarea');
                        } else if (view === 'content') {
                            return this.waitWhileSelector('.cms-structure-mode-structure');
                        }

                        throw new Error(
                            'Invalid arguments passed to cms.switchTo, should be either "structure" or "content"'
                        );
                    });
            };
        }
1245062
function registerView(view) {
  var name = view.getDebugName();
  var wrapped = new RegistryWrapper(view, 'views');
  flatRegistry.views[name] = wrapped;
  if (!view.parentView && !view.isComponentView) {
    nestedRegistry.views[name] = wrapped;
  }
  if (typeof view.destroy === 'function') {
    wrapped.destroy = _.bind(view.destroy, view);
    view.destroy = _.bind(function() {
      var name = this.obj.getDebugName();
      delete nestedRegistry.views[name];
      delete flatRegistry.views[name];
      updateNestedModels();
      triggerChange();
      this.destroy();
    }, wrapped);
  }
  updateNestedModels();
  triggerChange();
}
877083
function(config, view, container) {

		this._config = config;
		this._view = view;
		this._container = container;

		if (config.get_start_element_callback) {

			this._getStartElement = config.get_start_element_callback;

		}

		if (config.get_end_element_callback) {

			this._getEndElement = config.get_end_element_callback;

		}

	}
222007
function(view)
	{
		if (arguments.length > 1)
		{
			conbo.forEach(arguments, function(view, index, list) 
			{
				this.prependView(view);
			}, 
			this);
			
			return this;
		}
	
		if (typeof view === 'function')
		{
			view = new view(this.context);
		}
		
		if (!(view instanceof conbo.View))
		{
			throw new Error('Parameter must be conbo.View class or instance of it');
		}
		
		var firstChild = this.body.firstChild;
		
		firstChild
			? this.body.insertBefore(view.el, firstChild)
			: this.appendView(view);
		
		return this;
	}
988058
public void processEvent(SystemEvent event)
    {
        Map<String, Object> scope = null;
        
        if (event instanceof PreDestroyViewMapEvent)
        {
            UIViewRoot viewRoot = (UIViewRoot) ((PreDestroyViewMapEvent) event).getComponent();
            scope = viewRoot.getViewMap(false);
            if (scope == null)
            {
                // view map does not exist --> nothing to destroy
                return;
            }
        }
        else if (event instanceof PreDestroyCustomScopeEvent)
        {
            ScopeContext scopeContext = ((PreDestroyCustomScopeEvent) event).getContext();
            scope = scopeContext.getScope();
        }
        else
        {
            // wrong event
            return;
        }
        
        if (!scope.isEmpty())
        {
            Set<String> keySet = scope.keySet();
            String[] keys = keySet.toArray(new String[keySet.size()]);
            
            for (String key : keys)
            {
                Object value = scope.get(key);
                this.destroy(key, value);
            }
        }
    }
569163
function addChangeListenerIfRelevant(view) {
	if (view.nodeName === 'INPUT' ||
		view.nodeName === 'SELECT' ||
		view.nodeName === 'TEXTAREA') {
		view.addEventListener('change', changeListener);
	}
}
775531
function nameFunction(handler) {
  var scope = handler.scope ? handler.scope.constructor.name + '.' : '';
  var name = handler.func.name;
  if (name) {
    return scope + name;
  }
  for (var prop in handler.scope) {
    if (handler.scope[prop] === handler.func) {
      return scope + prop;
    }
  }
  return scope + handler.func;
}
693003
function process( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace )
    {
        $undef = ( $functionName == eZTemplateDefFunction::UNDEF_FUNCTION_NAME ) ? true : false;

        if ( $undef && !count( $functionParameters ) ) // if {undef} called w/o arguments
        {
            // destroy all variables defined in the current template using {def}
            $tpl->unsetLocalVariables();
        }

        foreach ( array_keys( $functionParameters ) as $key )
        {
            $varName  = $key;
            $param    = $functionParameters[$varName];
            $varValue = $tpl->elementValue( $param, $rootNamespace, $currentNamespace, $functionPlacement );


            if ( $undef ) // {undef}
            {
                if ( !$tpl->hasLocalVariable( $varName, $rootNamespace ) )
                    $tpl->warning( eZTemplateDefFunction::UNDEF_FUNCTION_NAME, "Variable '$varName' is not defined with {def}.", $functionPlacement );
                else
                    $tpl->unsetLocalVariable( $varName, $rootNamespace );

            }
            else // {def}
            {
                if ( $tpl->hasVariable( $varName, $rootNamespace ) ) // if the variable already exists
                {
                    // we don't create new variable but just assign value to the existing one.
                    $tpl->warning( eZTemplateDefFunction::DEF_FUNCTION_NAME, "Variable '$varName' is already defined.", $functionPlacement );
                    $tpl->setVariable( $varName, $varValue, $rootNamespace );
                }
                else
                    // create a new local variable and assign a value to it.
                    $tpl->setLocalVariable( $varName, $varValue, $rootNamespace );

            }
        }
    }
819494
function initViews (args) {
    // create views register for model indexed by view name - these names
    // are not required to be the same as global view names
    this.views = {}
    // validate each defined view, get view model if needed
    _.each(args.views, (spec, name) => {
        // get list of model views
        var views = Array.isArray(spec) ? spec : [spec]
        // validate that all model views can be loaded
        _.each(views, view => requireValidModelView(view, args.views, true))
        // add to views
        this.views[name] = views
    })
}
1362996
function()
		{
			this.appendView
			(
				new ns.MyLoadedView(this.context.addTo({templateUrl:'template-2.html'})),
				new ns.MyOtherView(this.context.addTo({template:'This is an internal template using <b>options.template</b> that hates <span cb-style="favoriteColor:color">{{favoriteColor}}</span>'}))
			);
		}
1177035
def process_view(self, request, view_func, view_args, view_kwargs):
        

        if view_func == login:
            return cas_login(request, *view_args, **view_kwargs)
        elif view_func == logout:
            return cas_logout(request, *view_args, **view_kwargs)

        if settings.CAS_ADMIN_PREFIX:
            if not request.path.startswith(settings.CAS_ADMIN_PREFIX):
                return None
        elif not view_func.__module__.startswith('django.contrib.admin.'):
            return None

        try:
            # use callable for pre-django 2.0
            is_authenticated = request.user.is_authenticated()
        except TypeError:
            is_authenticated = request.user.is_authenticated

        if is_authenticated:
            if request.user.is_staff:
                return None
            else:
                error = ('<h1>Forbidden</h1><p>You do not have staff '
                         'privileges.</p>')
                return HttpResponseForbidden(error)

        params = urlencode({REDIRECT_FIELD_NAME: request.get_full_path()})
        return HttpResponseRedirect(reverse(cas_login) + '?' + params)
118785
function namespace() {
  var args = Array.prototype.slice.call(arguments);
  var setComponents = function(context, first, rest) {
    if(!context[first]) {
      context[first] = {
        models: {},
        collections: {},
        views: {},
      };
    }
    if(rest.length) {
      setComponents(context[first], _.first(rest), _.rest(rest));
    }
  };
  setComponents(window, _.first(args), _.rest(args));
}
1331442
def _before_request(self):
        
        # Do not trace if the url is blacklisted
        if utils.disable_tracing_url(flask.request.url, self.blacklist_paths):
            return

        try:
            span_context = self.propagator.from_headers(flask.request.headers)

            tracer = tracer_module.Tracer(
                span_context=span_context,
                sampler=self.sampler,
                exporter=self.exporter,
                propagator=self.propagator)

            span = tracer.start_span()
            span.span_kind = span_module.SpanKind.SERVER
            # Set the span name as the name of the current module name
            span.name = '[{}]{}'.format(
                flask.request.method,
                flask.request.url)
            tracer.add_attribute_to_current_span(
                HTTP_METHOD, flask.request.method)
            tracer.add_attribute_to_current_span(
                HTTP_URL, str(flask.request.url))
            execution_context.set_opencensus_attr(
                'blacklist_hostnames',
                self.blacklist_hostnames)
        except Exception:  # pragma: NO COVER
            log.error('Failed to trace request', exc_info=True)
255841
function() {
      var t = this;
      t.$el.append(template.apply({}));

      t.editor = t.$('.nm-cs-source-edit');
      t.sourceButton = t.$('.nm-cs-view-source');

      // Get bindings to 'name=' attributes before custom views are rendered
      t.componentBindings = Backbone.ModelBinder.createDefaultBindings(t.$el, 'name');
    }