Returns the querystring base for parameters allowed to be passed through.
PLEASE NOTE: The method is nearly duplicated in `runtime/params.ts`.
@name getQueryStringFromArgv
@param {Object} argv
@param {SkyPagesConfig} skyPagesConfig
@returns {string}
351747
function getQueryStringFromArgv(argv, skyPagesConfig) {

  const configParams = skyPagesConfig.skyux.params;

  let params;

  if (Array.isArray(configParams)) {
    params = configParams;
  } else {
    // Get the params that have truthy values, since false/undefined indicates
    // the parameter should not be added.
    params = Object.keys(configParams)
      .filter(configParam => configParams[configParam]);
  }

  let found = [];
  params.forEach(param => {
    if (argv[param]) {
      found.push(`${param}=${encodeURIComponent(argv[param])}`);
    }
  });

  if (found.length) {
    return `?${found.join('&')}`;
  }

  return '';
}
1210727
function getWebpackConfig(skyPagesConfig, argv) {
  const common = require('./common.webpack.config');

  return webpackMerge(common.getWebpackConfig(skyPagesConfig, argv), {
    devtool: 'source-map',
    module: {
      rules: [
        {
          test: /\.ts$/,
          use: [
            {
              loader: 'awesome-typescript-loader',
              options: {
                // Ignore the "Cannot find module" error that occurs when referencing
                // an aliased file.  Webpack will still throw an error when a module
                // cannot be resolved via a file path or alias.
                ignoreDiagnostics: [2307],
                transpileOnly: true
              }
            },
            {
              loader: 'angular2-template-loader'
            }
          ]
        }
      ]
    },
    plugins: [
      SaveMetadata,
      new webpack.optimize.UglifyJsPlugin({
        beautify: false,
        comments: false,
        mangle: { screw_ie8: true, keep_fnames: true },
        sourceMap: true
      })
    ]
  });
}
1185285
function (pageNum) {
            var textPath = util.template(config.template.html, { page: pageNum });
            return config.url + textPath + config.queryString;
        }
784149
def gql(query_string, *args, **kwds):
  
  qry = _gql(query_string)
  if args or kwds:
    qry = qry._bind(args, kwds)
  return qry
1314186
function getQueryString(url){
	if(url.indexOf('%')!==-1)  url = decodeURIComponent(url);
	return parse_info(url.substr(url.indexOf('?')+1,url.length-url.indexOf('?')-1));
}
908096
def get_querystring(self):
        
        to_remove = self.get_querystring_parameter_to_remove()
        query_string = urlparse(self.request.get_full_path()).query
        query_dict = parse_qs(query_string.encode('utf-8'))
        for arg in to_remove:
            if arg in query_dict:
                del query_dict[arg]
        clean_query_string = urlencode(query_dict, doseq=True)
        return clean_query_string
773599
function (baseUrl, method, handler, example, callback) {
    baseUrl = baseUrl || 'http://localhost';

    var client = null;
    var results = {
      failed: [],
      passed: []
    };
    var self = this;
    var testUrl = url.parse(String(baseUrl));
    testUrl.pathname = normalizePath(self.path, testUrl.pathname);
    testUrl = url.parse(url.format(testUrl));
    switch (testUrl.protocol) {
      case 'https:':
        client = https;
        break;
      case 'http:':
        client = http;
        break;
      default:
        var error = new Error('Invalid base site: ' + baseUrl +
          ' (should start with "http://" or "https://")');
        callback(error, results);
        return;
    }

    var beforeEachTest = self.beforeEachTest || function (next) { next(); };
    if (typeof beforeEachTest !== 'function') {
      callback(new Error('"beforeEachTest" should be a function'), results);
      return;
    }

    var afterEachTest = self.afterEachTest || function (next) { next(); };
    if (typeof afterEachTest !== 'function') {
      callback(new Error('"afterEachTest" should be a function'), results);
      return;
    }

    var requestOptions = {
      hostname: testUrl.hostname,
      port: testUrl.port,
      path: testUrl.pathname,
      method: method
    };

    var exampleRequest = example.request || {};
    var exampleResponse = example.response || {};

    if (exampleRequest.urlParameters) {
      requestOptions.path = replaceUrlParameters(requestOptions.path,
        exampleRequest.urlParameters);
    }

    if (exampleRequest.queryParameters) {
      var queryPairs = [];
      for (var queryParameter in exampleRequest.queryParameters) {
        var queryValue = exampleRequest.queryParameters[queryParameter];
        queryPairs.push(encodeURIComponent(queryParameter) +
          (queryValue ? '=' + encodeURIComponent(queryValue) : ''));
      }
      requestOptions.path += '?' + queryPairs.join('&');
    }

    if (exampleRequest.headers) {
      requestOptions.headers = exampleRequest.headers;
    }

    var summary = {
      handler: handler.title || '(no title)',
      method: requestOptions.method,
      uri: requestOptions.path,
      request: exampleRequest
    };

    beforeEachTest(function (error) {
      if (error) {
        callback(error, results);
        return;
      }

      var request = client.request(requestOptions, function (response) {
        var success = true;

        var expectedStatusCode = (typeof exampleResponse.status === 'function'
          ? exampleResponse.status
          : function (statusCode) {
            return statusCode === (exampleResponse.status || 200);
          });
        if (!expectedStatusCode(response.statusCode)) {
          success = false;
        }

        var expectedHeaders = null;
        if (exampleResponse.headers) {
          expectedHeaders = exampleResponse.headers;
          for (var header in expectedHeaders) {
            var headerValue = expectedHeaders[header];
            var expectedHeaderValue = (typeof headerValue === 'function'
              ? headerValue
              : function (value) {
                return value === headerValue;
              });
            if (!expectedHeaderValue(response.headers[header.toLowerCase()])) {
              success = false;
              break;
            }
          }
        }

        var expectedBody = null;
        if ('body' in exampleResponse) {
          var exampleBody = exampleResponse.body;
          expectedBody = (typeof exampleBody === 'function'
            ? exampleBody
            : function (body) {
              return body === jsonStringifyIfObject(exampleBody).trim();
            });
        }

        var body = '';
        response.on('data', function (chunk) {
          body += String(chunk);
        });

        response.on('end', function () {
          clearTimeout(timeout);
          body = body.trim();
          if (expectedBody !== null && !expectedBody(body)) {
            success = false;
          }
          if (success) {
            summary.response = exampleResponse;
            results.passed.push(summary);
            afterEachTest(function (error) {
              callback(error, results);
            });
            return;
          }
          summary.expectedResponse = exampleResponse;
          summary.actualResponse = {
            status: response.statusCode
          };
          if (expectedHeaders !== null) {
            summary.actualResponse.headers = response.headers;
          }
          if (expectedBody !== null) {
            summary.actualResponse.body = body;
          }
          results.failed.push(summary);
          afterEachTest(function (error) {
            callback(error, results);
          });
        });
      });

      request.on('error', function (error) {
        clearTimeout(timeout);
        summary.expectedResponse = exampleResponse;
        summary.actualResponse = {
          error: error.message || String(error)
        };
        results.failed.push(summary);
        afterEachTest(function (error) {
          callback(error, results);
        });
      });

      // Abort requests that take longer than 10 seconds.
      var timeout = setTimeout(function () {
        request.emit('error', new Error('timed out'));
      }, 10000);

      if ('body' in exampleRequest) {
        request.write(jsonStringifyIfObject(exampleRequest.body));
      }
      request.end();
    });
  }
1182954
def handle_jmespath_query(self, args):
        
        continue_flag = False
        query_symbol = SELECT_SYMBOL['query']
        symbol_len = len(query_symbol)
        try:
            if len(args) == 1:
                # if arguments start with query_symbol, just print query result
                if args[0] == query_symbol:
                    result = self.last.result
                elif args[0].startswith(query_symbol):
                    result = jmespath.search(args[0][symbol_len:], self.last.result)
                print(json.dumps(result, sort_keys=True, indent=2), file=self.output)
            elif args[0].startswith(query_symbol):
                # print error message, user unsure of query shortcut usage
                print(("Usage Error: " + os.linesep +
                       "1. Use {0} stand-alone to display previous result with optional filtering "
                       "(Ex: {0}[jmespath query])" +
                       os.linesep + "OR:" + os.linesep +
                       "2. Use {0} to query the previous result for argument values "
                       "(Ex: group show --name {0}[jmespath query])").format(query_symbol), file=self.output)
            else:
                # query, inject into cmd
                def jmespath_query(match):
                    if match.group(0) == query_symbol:
                        return str(self.last.result)
                    query_result = jmespath.search(match.group(0)[symbol_len:], self.last.result)
                    return str(query_result)

                def sub_result(arg):
                    escaped_symbol = re.escape(query_symbol)
                    # regex captures query symbol and all characters following it in the argument
                    return json.dumps(re.sub(r'%s.*' % escaped_symbol, jmespath_query, arg))
                cmd_base = ' '.join(map(sub_result, args))
                self.cli_execute(cmd_base)
            continue_flag = True
        except (jmespath.exceptions.ParseError, CLIError) as e:
            print("Invalid Query Input: " + str(e), file=self.output)
            continue_flag = True
        return continue_flag
108902
function getQueryParameterValue(url, parameterName) {
        var parts;
        var query = (url || '').split('?');
        if (query && query.length > 0) {
            parts = query[1];
        }
        else {
            parts = '';
        }
        var vars = parts.split('&');
        for (var i = 0; i < vars.length; i++) {
            var pair = vars[i].split('=');
            if (decodeURIComponent(pair[0]) == parameterName) {
                return decodeURIComponent(pair[1]);
            }
        }
        // not found
        return null;
    }
982178
def query_params(*es_query_params):
    

    def _wrapper(func):
        @wraps(func)
        def _wrapped(*args, **kwargs):
            params = {}
            if "params" in kwargs:
                params = kwargs.pop("params").copy()
            for p in es_query_params + GLOBAL_PARAMS:
                if p in kwargs:
                    v = kwargs.pop(p)
                    if v is not None:
                        params[p] = _escape(v)

            # don't treat ignore and request_timeout as other params to avoid escaping
            for p in ("ignore", "request_timeout"):
                if p in kwargs:
                    params[p] = kwargs.pop(p)
            return func(*args, params=params, **kwargs)

        return _wrapped

    return _wrapper
311745
function getArgs(){

    var params, args = [], wasFlag, posIndex;
    if(!hasWindow && hasProcess){
        params = process.argv.slice(2);

        if(!params.length) return [];

        if((posIndex = params.indexOf('--')) !== -1){
            return params.slice(posIndex + 1);
        }

        for(var i=0; i<params.length; i++){

            if(isFlag(params[i])){
                wasFlag = params[i];
                if(hasEqual(params[i])){
                    if(i+1 < params.length - 1 && !isFlag(params[i+1])){
                        i++;
                        args.push(toJSValue(params[i]));
                        wasFlag = false;
                    }
                }
            }else{

                if(!wasFlag){
                    args.push(toJSValue(params[i]));
                }
                wasFlag = false;
            }
        }

        return args;
    }else if(hasWindow){
        return window.location.pathname.split('/');
    }

    return [];
}
334175
function getHandler (method, getArgs) {
  return service => {
    return function (req, res, next) {
      const { query } = req;
      const route = omit(req.params, '__feathersId');

      res.setHeader('Allow', allowedMethods(service).join(','));

      // Check if the method exists on the service at all. Send 405 (Method not allowed) if not
      if (typeof service[method] !== 'function') {
        debug(`Method '${method}' not allowed on '${req.url}'`);
        res.status(statusCodes.methodNotAllowed);

        return next(new errors.MethodNotAllowed(`Method \`${method}\` is not supported by this endpoint.`));
      }

      // Grab the service parameters. Use req.feathers
      // and set the query to req.query merged with req.params
      const params = Object.assign({
        query, route
      }, req.feathers);

      Object.defineProperty(params, '__returnHook', {
        value: true
      });

      // Run the getArgs callback, if available, for additional parameters
      const args = getArgs(req, params);

      debug(`REST handler calling \`${method}\` from \`${req.url}\``);

      service[method](...args, true)
        .then(hook => {
          const data = hook.dispatch !== undefined ? hook.dispatch : hook.result;

          res.data = data;
          res.hook = hook;

          if (hook.statusCode) {
            res.status(hook.statusCode);
          } else if (!data) {
            debug(`No content returned for '${req.url}'`);
            res.status(statusCodes.noContent);
          } else if (method === 'create') {
            res.status(statusCodes.created);
          }

          return next();
        })
        .catch(hook => {
          const { error } = hook;

          debug(`Error in handler: \`${error.message}\``);
          res.hook = hook;

          return next(hook.error);
        });
    };
  };
}
400946
function (args, callback) {
        var query =
          {
            type: "lint",  //$NON-NLS-1$
            file: args.meta.location,
            config: args.config
          };
        ternserver.request(
          {
            query: query,
            files: args.files
          },
          function (error, problems) {
            if (error) {
              callback({request: 'lint', error: error.message, message: Messages['failedToComputeProblems']}); //$NON-NLS-1$
            } else if (problems && Array.isArray(problems)) {
              callback({request: 'lint', problems: problems}); //$NON-NLS-1$
            } else {
              callback({request: 'lint', problems: []}); //$NON-NLS-1$
            }
          });
      }
1308963
function (requestV1) {
        var queryParams = [],
            pathVariables = [],
            traversedVars = {},
            queryParamAltered,
            traversedQueryParams = {},
            parsed = util.urlparse(requestV1.url),
            retainEmpty = this.options.retainEmptyValues;

        // Merge query params
        _.forEach(requestV1.queryParams, function (queryParam) {
            (queryParam.enabled === false) && (queryParam.disabled = true);

            delete queryParam.enabled;

            util.cleanEmptyValue(queryParam, 'description', retainEmpty);

            if (_.has(queryParam, 'equals')) {
                if (queryParam.equals) {
                    (queryParam.value === null) && (queryParam.value = '');
                    queryParamAltered = true;
                }
                else {
                    // = is not appended when the value is null
                    (queryParam.value === '') && (queryParam.value = null);
                    queryParamAltered = true;
                }
                delete queryParam.equals;
            }

            queryParams.push(queryParam);
            traversedQueryParams[queryParam.key] = true;
        });
        // parsed query params are taken from the url, so no descriptions are available from them
        _.forEach(parsed.query, function (queryParam) {
            !traversedQueryParams[queryParam.key] && queryParams.push(queryParam);
        });

        // Merge path variables
        _.forEach(requestV1.pathVariableData, function (pathVariable) {
            pathVariable = _.clone(pathVariable);
            util.cleanEmptyValue(pathVariable, 'description', retainEmpty);

            pathVariables.push(pathVariable);
            traversedVars[pathVariable.key] = true;
        });
        // pathVariables in v1 are of the form  {foo: bar}, so no descriptions can be obtained from them
        _.forEach(requestV1.pathVariables, function (value, id) {
            !traversedVars[id] && pathVariables.push({
                value: value,
                id: id
            });
        });

        !_.isEmpty(queryParams) && (parsed.query = queryParams);
        !_.isEmpty(pathVariables) && (parsed.variable = pathVariables);

        // If the query params have been altered, update the raw stringified URL
        queryParamAltered && (parsed.raw = util.urlunparse(parsed));

        // return the objectified URL only if query param or path variable descriptions are present, string otherwise
        return (parsed.query || parsed.variable) ? parsed : (parsed.raw || requestV1.url);
    }
1205239
def query_args(self, name):
        
        sql = 'select type, id from code_items ' \
              'where kind = 22 and name = ?'
        logging.debug('%s %s', sql, (name,))
        self.cursor.execute(sql, (name,))
        func = self.cursor.fetchone()
        if func:
            sql = 'select param_number, type, name ' \
                  'from code_items where parent_id = ?'
            logging.debug('%s %s', sql, (func[1],))
            self.cursor.execute(sql, (func[1],))
            args = self.cursor.fetchall()
            ret_type = clean_ret_type(func[0])
            args = [
                (arg_number, sanitize_type(arg_type), arg_name)
                for arg_number, arg_type, arg_name in args
            ]
            return ret_type, name, args
        return None
1171155
function getUrlGETparams() {
    var vars = {}, hash;
    var hashes = window.location.href.slice( window.location.href.indexOf('?') + 1 ).split('&');
    for( var i = 0; i < hashes.length; i++ ) {
        hash = hashes[i].split('=');
        vars[ hash[0] ] = hash[1];
        // switch on console logging
        if ( hash[0] == 'info') { logInfo = true  }
        if ( hash[0] == 'info' && hash[1] && hash[1] != '') { logInfoStr = hash[1] }
    }
    //alert( JSON.stringify( vars )  );
    return vars;
}
646737
function getWebpackConfig(skyPagesConfig, argv) {
  const common = require('./common.webpack.config');

  // Webpackmege will attempt to merge each entries array, so we need to delete it
  let commonConfig = common.getWebpackConfig(skyPagesConfig, argv);
  commonConfig.entry = null;

  // Since the preloader is executed against the file system during an AoT build,
  // we need to remove it from the webpack config, otherwise it will get executed twice.
  commonConfig.module.rules = commonConfig.module.rules
    .filter((rule) => {
      const isPreloader = /(\/|\\)sky-processor(\/|\\)/.test(rule.loader);
      return (!isPreloader);
    });

  return webpackMerge(commonConfig, {
    entry: {
      polyfills: [skyPagesConfigUtil.spaPathTempSrc('polyfills.ts')],
      vendor: [skyPagesConfigUtil.spaPathTempSrc('vendor.ts')],
      skyux: [skyPagesConfigUtil.spaPathTempSrc('skyux.ts')],
      app: [skyPagesConfigUtil.spaPathTempSrc('main-internal.aot.ts')]
    },
    
    // Disable sourcemaps for production:
    // https://webpack.js.org/configuration/devtool/#production
    devtool: undefined,
    
    module: {
      rules: [
        {
          test: /\.ts$/,
          loader: '@ngtools/webpack'
        }
      ]
    },
    plugins: [
      new ngtools.AotPlugin({
        tsConfigPath: skyPagesConfigUtil.spaPathTempSrc('tsconfig.json'),
        entryModule: skyPagesConfigUtil.spaPathTempSrc('app', 'app.module') + '#AppModule',
        // Type checking handled by Builder's ts-linter utility.
        typeChecking: false
      }),
      SaveMetadata,
      new webpack.optimize.UglifyJsPlugin({
        beautify: false,
        comments: false,
        compress: { warnings: false },
        mangle: { screw_ie8: true, keep_fnames: true }
      })
    ]
  });
}