search the request vars for a particular item

@return {Object}       a search of the window.location.search vars
553019
function() {
    
    // the following is taken from https://developer.mozilla.org/en-US/docs/Web/API/window.location
    var oGetVars = new (function (sSearch) {
      if (sSearch.length > 1) {
        for (var aItKey, nKeyId = 0, aCouples = sSearch.substr(1).split("&"); nKeyId < aCouples.length; nKeyId++) {
          aItKey = aCouples[nKeyId].split("=");
          this[unescape(aItKey[0])] = aItKey.length > 1 ? unescape(aItKey[1]) : "";
        }
      }
    })(window.location.search);
    
    return oGetVars;
    
  }
1304510
function search(term = _noSearchTermError()) {
	const url = `${API}/devrant/search`;
	const params = {
		app: 3,
		term
	};

	return http
		.GET(url, params)
		.then(data => data.results);
}
112962
function QueryString(search) {
        "use strict";
    
        if (search.substr(0, 1) === '?') {
            search = search.substr(1);
        }
    
        search = search.split('&')
    
        if (search == "") return {};
    
        for (var i = 0; i < search.length; ++i) {
    
            var param = search[i].split('=', 2);
            if (param.length != 2) {
                continue;
            }
    
            this[param[0]] = decodeURIComponent(param[1].replace(/\+/g, " "));
    
        }
    
    }
1333824
function getUrlParameters() {
        var params = [ "allume" ];
        location.search.substr(1).split("&").forEach(function (part) {
            if (!part) return;
            var item = part.split("=");
            params.push(decodeURIComponent(item[0]));
        });
        return params;
    }
619664
function () {
            if ($location.path() === "/") {
                return pagesConfig["overview"];
            }
            var match;
            angular.forEach(pagesConfig, function (item) {
                if (item.path === $location.path()) {
                    match = item;
                }
            });
            return match;
        }
1183539
function () {

      // helper method to assert if a given url is local
      function isLocal(url) {
        var loc = document.location,
            reg = new RegExp("^\\.|^\/(?!\/)|^[\\w]((?!://).)*$|" + loc.protocol + "//" + loc.host);
        return url.match(reg);
      }

      // gather all resources
      var scripts = document.getElementsByTagName("script"),
          links = document.getElementsByTagName("link"),
          uris = [];

      // track local js urls
      for (var i = 0; i < scripts.length; i++) {
        var script = scripts[i], src = script.getAttribute("src");
        if (src && isLocal(src))
          uris.push(src);
        if (src && src.match(/\blive.js#/)) {
          for (var type in active)
            active[type] = src.match("[#,|]" + type) != null
          if (src.match("notify")) 
            alert("Live.js is loaded.");
        }
      }
      if (!active.js) uris = [];
      if (active.html) uris.push(document.location.href);

      // track local css urls
      for (var i = 0; i < links.length && active.css; i++) {
        var link = links[i], rel = link.getAttribute("rel"), href = link.getAttribute("href", 2);
        if (href && rel && rel.match(new RegExp("stylesheet", "i")) && isLocal(href)) {
          uris.push(href);
          currentLinkElements[href] = link;
        }
      }

      // initialize the resources info
      for (var i = 0; i < uris.length; i++) {
        var url = uris[i];
        Live.getHead(url, function (url, info) {
          resources[url] = info;
        });
      }

      // add rule for morphing between old and new css files
      var head = document.getElementsByTagName("head")[0],
          style = document.createElement("style"),
          rule = "transition: all .3s ease-out;"
      css = [".livejs-loading * { ", rule, " -webkit-", rule, "-moz-", rule, "-o-", rule, "}"].join('');
      style.setAttribute("type", "text/css");
      head.appendChild(style);
      style.styleSheet ? style.styleSheet.cssText = css : style.appendChild(document.createTextNode(css));

      // yep
      loaded = true;
    }
808719
def lookup(var_name, contexts=(), start=0):
    
    start = len(contexts) if start >=0 else start
    for context in reversed(contexts[:start]):
        try:
            if var_name in context:
                return context[var_name]
        except TypeError as te:
            # we may put variable on the context, skip it
            continue
    return None
176094
function search(req, res, next) {
  var projectForms = req.appformsResultPayload.data || [];
  //Only Want The Project Ids
  projectForms = _.map(projectForms, function(form) {
    if (_.isObject(form)) {
      return form._id;
    } else {
      return form;
    }
  });

  var formsToFind = req.body || [];

  formsToFind = _.filter(projectForms, function(projFormId) {
    return formsToFind.indexOf(projFormId) > -1;
  });

  logger.debug("Middleware: search forms: ", {connection: req.connectionOptions, projectForms: projectForms});

  forms.findForms(req.connectionOptions, formsToFind, function(err, formsList) {
    if (err) {
      return next(err);
    }

    async.map(formsList, function(foundForm, cb) {
      var getParams = {
        "_id": foundForm._id,
        "showAdminFields": false
      };
      forms.getForm(_.extend(_.clone(req.connectionOptions), getParams), cb);
    }, formsResultHandlers(constants.resultTypes.forms, req, next));
  });
}
411872
function findVariable(variables, name) {
  let i;
  let len;

  for (i = 0, len = variables.length; i < len; i++) { // eslint-disable-line no-plusplus
    if (variables[i].name === name) {
      return true;
    }
  }

  return false;
}
914056
def lookup_variable(var, prefix=nil)

      var, prefix = split_prefix(var, prefix)

      if prefix == '//'
        return @context.storage.get_engine_variable(var)
      end

      if prefix == '/' && par = parent
        return par.lookup_variable(var, prefix)
      end

      if h.variables and Ruote.has_key?(h.variables, var)
        return Ruote.lookup(h.variables, var)
      end

      if h.parent_id && h.parent_id['engine_id'] == @context.engine_id
        #
        # do not lookup variables in a remote engine ...

        (return parent.lookup_variable(var, prefix)) rescue nil
          # if the lookup fails (parent gone) then rescue and let go
      end

      k = var.split('.').first
      vars = { k => @context.storage.get_engine_variable(k) }
        #
        # engine var lookup might be expensive, only lookup the var we need

      Ruote.lookup(vars, var)
    end
1051479
function (key) {
        var variable = this.values.oneNormalizedVariable(key),
            i,
            ii;

        // if a variable does not exist in local scope, we search all the layers and return the first occurrence.
        if (!(variable || !this._layers)) {
            for (i = 0, ii = this._layers.length; i < ii; i++) {
                variable = this._layers[i].oneNormalizedVariable(key);
                if (variable && !variable.disabled) { break; }
            }
        }

        return (variable && !variable.disabled) ? variable.valueOf() : undefined;
    }
681775
function ( value ) {
            if ( $B.isObject(value) ) {
                var str = location.search;
    
                str = ( /^\?[^\?\=]+\=/.test(str) )? str + '&' : '?' + str;
    
                for ( var key in value ) {
                    str += key + '=' + value[key] + '&';
                }
    
                return str.replace( /\&$/, '' );
            } else {
                var result = {};
                location.search.replace( /(\w*)\=([^&]*)/g, $B.bind(function ( str, prop, val ) {
                    if ( prop ) result[prop] = $B.string.convertDataType( val );
                }, this));
    
                if ( typeof value === 'string' ) {
                    if ( result[value] ) {
                        result = result[value];
                    } else {
                        result = '';
                    }
                }
    
                return result;
            }
        }
284257
function lookupVariable(context, variableName) {
	const { frames, importantScope } = context

	return tree.Variable.prototype.find(frames, frame => {
		const { value, important } = frame.variable(variableName) || {}

		if (value === undefined)
			return

		if (important && importantScope[importantScope.length - 1])
			importantScope[importantScope.length - 1].important = important

		return value.eval(context)
	})
}
422043
function(){
    var args = Array.prototype.slice.apply(arguments);
    return this.reqres.request.apply(this.reqres, args);
  }
804745
function (req, bucket) {
                var location = getLocation(req),
                    href = location.origin;

                // Since we are getting a link for an item the href must end with slash
                if (href.substr(-1) !== '/') {
                    href += '/';
                }
                
                // Add the bucket and search
                href += bucket + location.search;

                return href;
            }
54406
def get_vars(self):
		
		if self.method() != 'GET':
			raise RuntimeError('Unable to return get vars for non-get method')
		re_search = WWebRequestProto.get_vars_re.search(self.path())
		if re_search is not None:
			return urllib.parse.parse_qs(re_search.group(1), keep_blank_values=1)
136569
function(event, ui) {
        search.val('');
        window.location = ui.item.value.url.replace('_gh_pages', '');
        return false;
      }