Stores a navigator in the identity map for the current
        api. Can take a link or a bare uri
964972
def cache(self, link, nav):
        ''''''
        if link is None:
            return  # We don't cache navigators without a Link
        elif hasattr(link, 'uri'):
            self.id_map[link.uri] = nav
        else:
            self.id_map[link] = nav
874509
function(container){
    // Navigate to route for any link with a relative href
    $(container).on('click', 'a', (e) => {
      var path = e.target.getAttribute('href');

      // If the path is a remote URL, allow the browser to navigate normally.
      // Otherwise, prevent default so we can handle the route event.
      if(IS_REMOTE_URL.test(path) || path === '#'){ return void 0; }
      e.preventDefault();

      // If this is not our current route, navigate to the new route
      if(path !== '/'+Backbone.history.fragment){
        this.navigate(path, {trigger: true});
      }
    });
  }
709664
def create_apirack(self):
        """"""
        return ApiRack(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
545404
function(typeName, id, snapshot) {
        // FIXME If there is a record, try and look up the self link
        // - Need to use the function from the serializer to build the self key
        // TODO: this basically only works in the simplest of scenarios
        var route = this.getRoute(typeName, id, snapshot);
        if(!route) {
          return this._super(typeName, id, snapshot);
        }

        var url = [];
        var host = get(this, 'host');
        var prefix = this.urlPrefix();
        var param = /\{(.*?)\}/g;

        if (id) {
          if (param.test(route)) {
            url.push(route.replace(param, id));
          } else {
            url.push(route);
          }
        } else {
          url.push(route.replace(param, ''));
        }

        if (prefix) {
          url.unshift(prefix);
        }

        url = url.join('/');

        if (!host && url) {
          url = '/' + url;
        }

        return url;
      }
1282379
function (oEvt) {
				// navigate to entity
				var sType = oEvt.getSource().data("type");
				this.getRouter().navTo("entity", {id: sType}, false);
			}
457923
def get_port_map(self, id_or_uri):
        
        uri = self._client.build_uri(id_or_uri) + self.PORT_MAP_PATH
        return self._client.get(id_or_uri=uri)
334191
def map_view(self, request):
        
        self.update_urls(request)
        resource_info = {
            "resources": [{
                "id": index + 1,
                "href": "{}/{}".format(self.api_url, resource_name),
            } for index, (resource_name, resource) in enumerate(
                sorted(self.resource_map.items()))
                if not resource.Meta.authenticators or
                resource.authenticate(request) is not None
            ]
        }
        response = json.dumps(resource_info)
        return HttpResponse(response, content_type="application/vnd.api+json")
318041
def add(self, anchor):
        
        anchor_id = uuid.uuid4().hex
        anchor_path = self._anchor_path(anchor_id)
        with anchor_path.open(mode='wt') as f:
            save_anchor(f, anchor, self.root)

        return anchor_id
90853
def _update_from_api_repr(self, resource):
        """"""
        self.destination = resource["destination"]
        self.filter_ = resource.get("filter")
        self._writer_identity = resource.get("writerIdentity")
806282
function Store (state: ?any, id: ?string) {
  if (state === undefined || state === null) {
    state = {}
  }
  state = {
    state: state,
    computed: {},
    action: { type: null, payload: null }
  }

  /**
   * @private
   */

  /*
   * TODO: Document members
   */

  this._id = null
  if (id != null && isString(id)) {
    id = id.trim()
    if (id !== '') {
      this._id = id
    }
  }

  /**
   * Stream
   */
  this._stream = u.createStream(state)

  /**
   * Reducers
   */
  this._reducerRelations = null

  /**
   * Middlewares
   */
  this._middlewareRelations = null

  /**
   * Subscriptions
   */
  this._subscriptionRelations = null

  this._computedProperty = {}

  reducerRelation.constructParent(this)
  middlewareRelation.constructParent(this)
  subscriptionRelation.constructParent(this)
  computedPropertyRelation.constructParent(this)
}
100669
function deserializeNavState()
   {
      var navID = $('.navigation .nav-accordion-menu').data('nav-id');

      if (sessionStorage)
      {
         var checkboxMap = sessionStorage.getItem(navID + '-accordion-state');

         // If there is no data in session storage then create an empty map.
         if (checkboxMap == null) { checkboxMap = '{}'; }

         checkboxMap = JSON.parse(checkboxMap);

         $('.navigation .nav-accordion-menu').find('input[type="checkbox"]').each(function()
         {
            var checkboxValue = checkboxMap[$(this).attr('name')];
            if (typeof checkboxValue === 'boolean') { $(this).prop('checked', checkboxValue); }
         });
      }

      // Set navigation menu visible
      $('.navigation .nav-accordion-menu').removeClass('hidden');

      // Set navigation menu scroll bar from session state.
      if (sessionStorage)
      {
         var navScrollTop = sessionStorage.getItem(navID + '-scrolltop');
         if (typeof navScrollTop === 'string') { $('.navigation').prop('scrollTop', navScrollTop); }
      }
   }
1228910
def get_navigation(self, request, **kwargs):
        

        if self.navigation == self.parent_attr:
            if self.parent:
                return self.parent.get_navigation(request, **kwargs)
            return ()
        else:
            return self._nav_from_tuple(request, self.navigation,
                                **kwargs)
1046855
protected function storeIntendedUrl()
    {
        // Do not store the URL if it was the login itself
        $previousUrl = url()->previous();
        $loginUrl    = url()->route($this->core->prefixRoute(NamedRoute::AUTH_LOGIN));

        if ($previousUrl == $loginUrl) return;

        session()->put('url.intended', $previousUrl);
    }
987312
function mapIdentifiableArtefact (node) {
    var result = {
      id: getAttrValue(node, 'id'),
      urn: getAttrValue(node, 'urn'),
      uri: getAttrValue(node, 'uri'),
      package: getAttrValue(node, 'package'),
      class: getAttrValue(node, 'class'),
      annotations: mapAnnotations(node)
    };

    if (result.package === undefined && result.urn !== undefined) {
      var fields = result.urn.split('=')[0].split('.');
      result.package = fields[3];
      result.class = fields[4];
    }

    return result;
  }
40025
private void navigateTo(String pageKey, String urlToOpen, String windowHandle) {
        Context.addWindow(pageKey, windowHandle);
        Context.setMainWindow(pageKey);
        Context.getDriver().navigate().to(urlToOpen);
    }
1155219
function(url, data, type) {
		assert(Login.app, "You must set Login.app = my-app-name-as-registered-with-you-again");
		data.app = Login.app;
		data.withCredentials = true; // let the server know this is a with-credentials call
		data.caller = ""+document.location; // provide some extra info
		// add in local cookie auth
		const cookies = Cookies.get();
		let cbase = cookieBase();
		for(let c in cookies) {			
			if (c.substr(0, cbase.length)===cbase) {
				let cv = Cookies.get(c);
				data[c] = cv;
			}
		}

		return $.ajax({
			dataType: "json", // not really needed but harmless
			url: url,
			data: data,
			type: type || 'GET',
			xhrFields: {withCredentials: true}
		});
	}
742755
function(api, id, key) {
  // get storage object
  var rval = _getStorageObject(api, id);
  if(rval !== null) {
    // return data at key
    rval = (key in rval) ? rval[key] : null;
  }

  return rval;
}