Extract items
@param {string} qs Query string
@param {any} options Parser options
@returns {array<any>} Extracted items
978042
function (qs, options) {

            debug('Extracting items...');

            qs = qs + '';

            debug('Separator: %s', options.separator);

            // split query string parameters on separator (default is: '&')
            const items = qs.split(options.separator, Number.MAX_SAFE_INTEGER);
            debug('Items: %o', items);

            return items;
        }
120179
def extract_options!(array)
      if array.last.is_a?(Hash) && array.last.instance_of?(Hash)
        array.pop
      else
        {}
      end
    end
809235
protected function extractQueryParameters(array $params)
    {
        $availableParams = ['extract-archive'];
        $query = [];

        foreach ($params as $key => $value) {
            if (in_array($key, $availableParams)) {
                $query[$key] = $value;
            }
        }

        return $query;
    }
329734
def qs_get(self, key, default=None):
        ''''''
        return self.query.get(key, default=default)
354766
function(query) {
        var queryObj = {q: ''};
        if(!query) {
            return queryObj;
        }

        var qArray = query.split('&');
        var qObj = qs.parse(query);
        for(var i = 0, len = qArray.length; i < len; i++) {
            var queryItem = decodeURIComponent(qArray[i]).replace('=', '');
            if(/^\?/g.test(queryItem)) {
                debug('matched query: %s', queryItem) ;
                queryObj.q = queryItem;
                break;
            }
        }

        queryObj.m = qObj._mcss == 'true' || qObj._mcss == 'y';
        return queryObj;
    }
862095
function Extractor(ac , options) {
    EventEmitter.call(this);
    var self = this;
    self.matchers = [];
    self.vars = ac || {};
    self.options = options || {};
    self.watchers = [];
    self._listen = function (car, file) {
        car.once('end', function () {
            self.emit('end', self.vars);
        });
        car.on('line', function (line) {
            var i;
            var firstMatch = true;
            for (i = 0; i < self.matchers.length; i++) {
                var matcher = self.matchers[i];
                var m;
                while(matcher.handler && (m = matcher.re.exec(line)) !== null){
                    matcher.handler(m, self.vars, file , firstMatch);
                    firstMatch = false;
                    if(!self.options.successive){
                        i = self.matchers.length;
                        break;
                    }
                }
            }
        });
        return self;
    };
}
1374273
def querystring(self):
        
        return {key: value for (key, value) in self.qs.items()
                if key.startswith(self.MANAGED_KEYS) or self._get_key_values('filter[')}
430552
function process(sources, options) {
		sources = explodeall(sources);
		if (!grunt.fail.errorcount) {
			var content = extract(sources, options);
			return enclose(content.join(SPACER));
		}
	}
1185662
private void extractItemsets(DBIDs[] idx, int start, int minsupp, List<Itemset> solution) {
    int[] buf = new int[idx.length];
    DBIDs iset = idx[start];
    if(iset == null || iset.size() < minsupp) {
      return;
    }
    if(minlength <= 1) {
      solution.add(new OneItemset(start, iset.size()));
    }
    if(maxlength > 1) {
      buf[0] = start;
      extractItemsets(iset, idx, buf, 1, start + 1, minsupp, solution);
    }
  }
934908
function collectQueryParams(req, paramNames) {
    var result = {
        query: {},
        fields: {},
        options: {},
        params: {}
    };
    paramNames.forEach(function (paramName) {
        var paramValue = req.anyParam(paramName);
        if (paramValue) {
            paramValue = paramValue.trim();
            if (paramValue && paramValue !== '*') {
                if (paramValue.charAt(paramValue.length - 1) === '*') {
                    // regexp to match prefix
                    paramValue = new RegExp('^' + paramValue.substring(0, paramValue.length - 1));
                }
                result.query[paramName] = paramValue;
            }
            result.params[paramName] = paramValue;
        }
    });
    var fields = req.anyParam('fields');
    if (fields) {
        result.fields = {};
        fields.split(',').forEach(function (field) {
            field = field.trim();
            if (field) {
                var select = 1;
                switch (field.charAt(0)) {
                    case '-':
                        field = field.substring(1);
                        select = 0;
                        break;
                    case '+':
                        field = field.substring(1);
                        break;
                }
                result.fields[field] = select;
            }
        });
    }
    var sort = req.anyParam('sort');
    if (sort) {
        result.options.sort = {};
        sort.split(',').forEach(function (field) {
            field = field.trim();
            if (field) {
                var order = 1;
                switch (field.charAt(0)) {
                    case '-':
                        field = field.substring(1);
                        order = -1;
                        break;
                    case '+':
                        field = field.substring(1);
                        break;
                }
                result.options.sort[field] = order;
            }
        });
        result.params.sort = sort;
    }
    var skip = req.anyParam('skip') || req.anyParam('offset');
    if (skip) {
        result.options.skip = parseInt(skip, 10);
        result.params.skip = skip;
    }
    var limit = req.anyParam('limit');
    if (limit) {
        result.options.limit = parseInt(limit, 10);
        result.params.limit = limit;
    }
    return result;
}
1107747
def _ExtractGoogleDocsSearchQuery(self, url):
    
    if 'q=' not in url:
      return None

    line = self._GetBetweenQEqualsAndAmpersand(url)
    if not line:
      return None

    return line.replace('+', ' ')
167017
def query(cls, select, qb=None):
        
        if not qb:
            qb = QuickBooks()

        json_data = qb.query(select)

        obj_list = []

        if cls.qbo_object_name in json_data["QueryResponse"]:
            for item_json in json_data["QueryResponse"][cls.qbo_object_name]:
                obj_list.append(cls.from_json(item_json))

        return obj_list
418565
def from_query_string(cls, schema, qs=None):
        
        dct = load_query_string_data(schema, qs)
        return cls.from_dict(dct)
103236
private static String extractTopItem(String searchString, String schema, int startIdx) {
		String extracted = null;
		int propIdx = schema.indexOf("\"properties\"", startIdx);
		if (propIdx == -1) {
			propIdx = Integer.MAX_VALUE;
		}
		// check for second
		int idIdx = schema.indexOf("\"" + searchString + "\"", startIdx);
		int secondIdIdx = schema.indexOf("\"" + searchString + "\"", idIdx + 1);
		if (secondIdIdx != -1 && propIdx > secondIdIdx) {
			idIdx = secondIdIdx;
		}
		if (idIdx != -1 && propIdx > idIdx) { // make sure we're not in a nested
												// id
			// find the 1st and second " after the idx
			int valueStartIdx = schema.indexOf("\"", idIdx + (searchString.length() + 2));
			int valueEndIdx = schema.indexOf("\"", valueStartIdx + 1);
			extracted = schema.substring(valueStartIdx + 1, valueEndIdx);
		}
		return extracted;
	}
285469
def extract_hcurves(dstore, what):
    
    info = get_info(dstore)
    if what == '':  # npz exports for QGIS
        sitecol = dstore['sitecol']
        mesh = get_mesh(sitecol, complete=False)
        dic = _get_dict(dstore, 'hcurves-stats', info['imtls'], info['stats'])
        yield from hazard_items(
            dic, mesh, investigation_time=info['investigation_time'])
        return
    params = parse(what, info)
    if 'imt' in params:
        [imt] = params['imt']
        slc = info['imtls'](imt)
    else:
        slc = ALL
    sids = params.get('site_id', ALL)
    if params['rlzs']:
        dset = dstore['hcurves-rlzs']
        for k in params['k']:
            yield 'rlz-%03d' % k, hdf5.extract(dset, sids, k, slc)[:, 0]
    else:
        dset = dstore['hcurves-stats']
        stats = list(info['stats'])
        for k in params['k']:
            yield stats[k], hdf5.extract(dset, sids, k, slc)[:, 0]
    yield from params.items()
305749
protected function _extractFinder($options)
    {
        $type = !empty($options['finder']) ? $options['finder'] : 'all';
        unset($options['finder'], $options['maxLimit']);

        if (is_array($type)) {
            $options = (array)current($type) + $options;
            $type = key($type);
        }

        return [$type, $options];
    }
1294311
function _extract(keyStr, dataObj) {
	var altkey,
		_subKey,
		_splitPoint,
		_found = false,
		dataValue = null,
		_queryParts = [];

	if (dataObj && typeof dataObj === 'object') {
		dataValue = Object.create(dataObj);
		_queryParts = keyStr.split(/[\-\_\.]/);

		//console.warn("INIT:", keyStr, _queryParts);

		// test whole query first
		if (keyStr in dataValue) {
			dataValue = dataValue[keyStr];
			_queryParts.length = 0;
			_found = true;
		}

		// search from smallest to largest possible keys
 		while(_queryParts.length) {
			_splitPoint = _queryParts.shift();
			_subKey = keyStr.split(new RegExp('('+_splitPoint+')')).slice(0,2).join("");
			if (_subKey in dataValue) {
				dataValue = dataValue[_subKey];
				keyStr = keyStr.split(new RegExp('('+_subKey+'[\-\_\.])')).slice(2).join("");
				_found = true;
			} else {
				_found = false;
			}
			//console.warn(_found, _subKey, dataValue);
		}

		if (!_found) {
			// alternate support for delimiters in place of spaces as a key
			altkey = keyStr.replace(/[\-\_\.]/,' ');
			if (altkey in dataObj) {
				dataValue = dataObj[altkey];
				_found = true;
			}
		}
	}

	return _found ? dataValue : NaN;
}