Extracts code and state from Map object. This method is supposed to be used in AWS lambda functions.
See also {@link com.github.seratch.jslack.app_backend.vendor.aws.lambda.request.ApiGatewayRequest}
499688
public static VerificationCodePayload from(Map<String, String> queryStringParameters) {
        VerificationCodePayload payload = new VerificationCodePayload();
        payload.setCode(queryStringParameters.get("code"));
        payload.setState(queryStringParameters.get("state"));
        payload.setError(queryStringParameters.get("error"));
        return payload;
    }
899000
def _extract_params(self):
        
        # Because in this endpoint we handle both GET
        # and POST request.
        query_dict = (self.request.POST if self.request.method == 'POST'
                      else self.request.GET)

        self.params['client_id'] = query_dict.get('client_id', '')
        self.params['redirect_uri'] = query_dict.get('redirect_uri', '')
        self.params['response_type'] = query_dict.get('response_type', '')
        self.params['scope'] = query_dict.get('scope', '').split()
        self.params['state'] = query_dict.get('state', '')
        self.params['nonce'] = query_dict.get('nonce', '')

        self.params['prompt'] = self._allowed_prompt_params.intersection(
            set(query_dict.get('prompt', '').split()))

        self.params['code_challenge'] = query_dict.get('code_challenge', '')
        self.params['code_challenge_method'] = query_dict.get('code_challenge_method', '')
816168
String getQueryString(Map<String, String> params) {
		StringBuilder builder = new StringBuilder();
		try {
			boolean first = true;
			for (Map.Entry<String,String> entry : params.entrySet()) {
				if (first) {
					first = false;
				} else {
					builder.append("&");
				}
				builder.append(URLEncoder.encode(entry.getKey(), "UTF-8"));
				builder.append("=");
				builder.append(URLEncoder.encode(entry.getValue(), "UTF-8"));
			}
		} catch (UnsupportedEncodingException e) {
			throw new RuntimeException(
					"Your Java version does not support UTF-8 encoding.");
		}

		return builder.toString();
	}
491641
function getSourceMapsForCapture(capture, onFailure, onSuccess) {
  const urls = new Set();
  const sourcemaps = new Map();
  for (const id in capture.refs) {
    const ref = capture.refs[id];
    if ((ref.type === 'ScriptExecutable' ||
        ref.type === 'EvalExecutable' ||
        ref.type === 'ProgramExecutable' ||
        ref.type === 'FunctionExecutable') && ref.value.url) {
      urls.add(ref.value.url);
    }
  }
  urls.forEach((url) => {
    getSourceMapForUrl(url, onFailure, (sourcemap) => {
      sourcemaps.set(url, sourcemap);
      urls.delete(url);
      if (urls.size === 0) {
        onSuccess(sourcemaps);
      }
    });
  });
  if (urls.size === 0) {
    console.warn('No source information found in capture');
    onSuccess(sourcemaps);
  }
}
545766
@Override
    public StateContract getStateFromName(String countryAlternateCode, String stateName) {
        CountryContract country = getCountryFromCode(countryAlternateCode);

        return getKcStateService().getState(country.getCode(), stateName);
    }
1027193
ByteString getState(String channelId, String txId, String collection, String key) {
        return invokeChaincodeSupport(newGetStateEventMessage(channelId, txId, collection, key));
    }
1036105
function extractPropertyChunks (stateObject, chunkNames) {
      var extractedValues = {};
      var currentChunkName, chunkNamesLength = chunkNames.length;

      for (var i = 0; i < chunkNamesLength; i++) {
        currentChunkName = chunkNames[i];
        extractedValues[currentChunkName] = stateObject[currentChunkName];
        delete stateObject[currentChunkName];
      }

      return extractedValues;
    }
670647
public Map<String, Object> jsonToMap(String json) {

        /*
         * This if block treats the /v2/accounts/exists response. Currently the endpoint returns the status
         * code on its response body, breaking the JSON conversion.
         */
        if ("200".equals(json)) {
            this.responseBody.put("code", 200);
            return this.responseBody;
        }

        if ("400".equals(json)) {
            this.responseBody.put("code", 400);
            return this.responseBody;
        }

        if ("404".equals(json)) {
            this.responseBody.put("code", 404);
            return this.responseBody;
        }

        if (!json.equals("")) {
            ObjectMapper mapper = new ObjectMapper();
            try {
                this.responseBody = mapper.readValue(json, new TypeReference<Map<String, Object>>(){});
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return this.responseBody;
    }
745790
public Map<String, String> getPathParametersEncoded(String requestUri) {
        
        Matcher m = regex.matcher(requestUri);
        
        return mapParametersFromPath(requestUri, parameters, m);
    }
625003
def _get_code(self, key):
        

        data = self.grid.code_array(key)
        self.grid.code_array.result_cache.clear()

        return data
202898
function parseQueryMap(query) {
  var map = {};
  parseQueryString(query, function(key, value) {
    map[key] = value;
  });
  return map;
}
1275914
private static String getGateway(DiscordApiImpl api) {
        gatewayReadLock.lock();
        if (gateway == null) {
            gatewayReadLock.unlock();
            gatewayWriteLock.lock();
            try {
                if (gateway == null) {
                    gateway = new RestRequest<String>(api, RestMethod.GET, RestEndpoint.GATEWAY)
                            .includeAuthorizationHeader(false)
                            .execute(result -> result.getJsonBody().get("url").asText())
                            .join();
                }
                gatewayReadLock.lock();
            } finally {
                gatewayWriteLock.unlock();
            }
        }

        try {
            return gateway;
        } finally {
            gatewayReadLock.unlock();
        }
    }
183406
public Map<String, Object> asMap() {
        Map<String, Object> map = new LinkedHashMap<>();
        map.put("statusCode", statusCode);
        map.put("statusMessage", statusMessage);
        map.put("requestMethod", requestMethod);
        map.put("requestUri", requestUri);

        if (!StringUtils.isNullOrEmpty(message)) {
            map.put("message", message);
        }
        if (!StringUtils.isNullOrEmpty(stacktrace)) {
            map.put("stacktrace", stacktrace);
        }

        return map;
    }
651030
function (key) {
            var self = this, _queryMap;
            parseQuery(self);
            _queryMap = self._queryMap;
            if (key) {
                return key in _queryMap;
            } else {
                return !S.isEmptyObject(_queryMap);
            }
        }
989270
function API(method, url, data, callback) {
    if (typeof callback === 'undefined') {
        callback  = data;
        data  = {};
    }

    url             = this.prepareUrl(url);
    this.callback   = callback || noop;
    this.data       = data;

    this.options          = extend({}, requestOptions);
    this.options.encoding = this.options.encoding || 'utf-8';

    // these particular set of options should be immutable
    this.options.method         = method;
    this.options.uri            = url;
    this.options.followRedirect = false;

    this[method.toLowerCase()]();

    return this;
}
828550
@GET
    @Produces(MediaType.APPLICATION_JSON)
    @Path("/help")
    public Map<String, List<? extends Object>> help() {
        Map<String, List<?>> result = new LinkedHashMap<>();
        List<EndpointHelpDto> endpoints = describeEndpoints(getEndpoints());

        if (endpoints != null && !endpoints.isEmpty()) {
            result.put("endpoints", endpoints);
        }

        List<MethodHelpDto> methods = describeMethods();

        if (methods != null && !methods.isEmpty()) {
            result.put("methods", methods);
        }
        return result;
    }
1028382
Map<String, Object> getUnderlyingMap()
    {
        StateHelper stateHelper = _component.getStateHelper(false);
        Map<String, Object> attributes = null;
        if (stateHelper != null)
        {
            attributes = (Map<String, Object>) stateHelper.get(UIComponentBase.PropertyKeys.attributesMap);
        }
        return attributes == null ? Collections.EMPTY_MAP : attributes;
    }