For most ordinary keys, the "keysym" is the same as the
        corresponding ASCII value.  Other common keys are shown in the
        KEY_ constants.
439910
def send_KeyEvent(self, key, down):
        
        self.sendMessage(struct.pack('!BBxxI', 4, down, key))
178567
function toKey(value) {
  if (typeof value == 'string' || isSymbol_1(value)) {
    return value;
  }
  var result = (value + '');
  return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
}
721622
private int keyColumnStart()
  {
    int offset = 0;
    
    for (int i = 0; i < _columns.length; i++) {
      if (offset == _keyStart) {
        return i;
      }
      
      offset += _columns[i].length();
    }
    
    throw new IllegalStateException();
  }
515201
function processPartitionKeys(keys){
    var result = "(",
        j,
        len,
        keyGroup;

    if(typeof keys === 'string'){
        return result += keys + ")";
    }

    len = keys.length;
    for(j = 0; j< keys.length; j++){
        keyGroup = keys[j];
        if(keyGroup instanceof Array){
            result += "(";
            result += keyGroup.join(", ");
            result += ")";
        }else{
            result += keyGroup;
        }
        result += (j < len-1) ? ", " : "";
    }
    result += ")";

    return result;
}
871173
def _extract_key_val(kv, delimiter='='):
    '''
    '''
    pieces = kv.split(delimiter)
    key = pieces[0]
    val = delimiter.join(pieces[1:])
    return key, val
155477
def []=(key, value)
      normalized_key = normalized_key(key)

      if key.is_a?(SymbolOperator)
        operator = :"$#{key.operator}"
        normalized_value = normalized_value(normalized_key, operator, value)
        @source[normalized_key] ||= {}
        @source[normalized_key][operator] = normalized_value
      else
        if key == :conditions
          value.each { |k, v| self[k] = v }
        else
          normalized_value = normalized_value(normalized_key, normalized_key, value)
          @source[normalized_key] = normalized_value
        end
      end
    end
1012493
def make_keys_safe(dct):
    """"""
    result = {}
    for key, val in dct.items():
        key = key.replace('-', '_')
        if key in keyword.kwlist:
            key = key + '_'
        result[key] = val
    return result
1348043
private boolean checkForMapKey(TabularType pType) {
        List<String> indexNames = pType.getIndexNames();
        return
                // Single index named "key"
                indexNames.size() == 1 && indexNames.contains(TD_KEY_KEY) &&
                // Only convert to map for simple types for all others use normal conversion. See #105 for details.
                pType.getRowType().getType(TD_KEY_KEY) instanceof SimpleType;
    }
905312
function validateIdenticialTypedKeys (keyA, keyB) {
    if (keyA && typeof keyA === 'string' && keyB && typeof keyB === 'string') {
        const keyA_CNS = (keyA.charAt(0) === COMPOSITEKEY_NS);
        const keyB_CNS = (keyB.charAt(0) === COMPOSITEKEY_NS);
        if (keyA_CNS !== keyB_CNS) {
            throw new Error(`Keys are not of the same type (composite or simple) [${keyA}] [${keyB}]`);
        }
    }
}
601766
def _clean_key_type(key_name, escape_char=ESCAPE_SEQ):
    

    for i in (2, 1):

        if len(key_name) < i:
            return None, key_name

        type_v = key_name[-i:]

        if type_v in _KEY_SPLIT:
            if len(key_name) <= i:
                return _KEY_SPLIT[type_v], ''

            esc_cnt = 0
            for pos in range(-i - 1, -len(key_name) - 1, -1):
                if key_name[pos] == escape_char:
                    esc_cnt += 1
                else:
                    break

            if esc_cnt % 2 == 0:
                return _KEY_SPLIT[type_v], key_name[:-i]
            else:
                return None, key_name

    return None, key_name
310701
function toKey(value) {
  if (typeof value == 'string' || isSymbol(value)) {
    return value;
  }
  var result = (value + '');
  return (result == '0' && (1 / value) == -INFINITY$2) ? '-0' : result;
}
91143
public String keyValueList() {
		String separator = "";
		StringBuilder buffer = new StringBuilder();

		for (int i = 0; i < names.size(); i++) {
			buffer.append(separator + "?");
			separator = ", ";
		}

		return buffer.toString();
	}
82826
def common(self):
        
        res = {"kty": self.kty}
        if self.use:
            res["use"] = self.use
        if self.kid:
            res["kid"] = self.kid
        if self.alg:
            res["alg"] = self.alg
        return res
730504
def key=(key)
      raise(ArgumentError, "keys must be convertible to Symbol; was: #{type.class.name}.") unless type.respond_to?(:to_sym)

      unless bibliography.nil?
        bibliography.strings.delete(@key)
        bibliography.strings[key.to_sym] = self
      end

      @key = key.to_sym
    end
1123364
private static int parseIntKey(CharSequence key) {
        int numSpaces = 0;
        StringBuilder digits = new StringBuilder();

        // build a string from the numerical characters
        for (int i=0; i<key.length(); i++) {
            char c = key.charAt(i);
            if (' ' == c) {
                numSpaces++;
            } else if (Character.isDigit(c)) {
                digits.append(c);
            }
        }

        String s = digits.toString();
        // This may be greater than the max value for signed integers
        long n = Long.parseLong(s);

        // result is the numerical value divided by the number of spaces
        return (int) (n / numSpaces);
    }
498957
def _brace_key(self, key):
        
        if isinstance(key, six.integer_types):
            t = str
            key = t(key)
        else:
            t = type(key)
        return t(u'{') + key + t(u'}')
495174
def get_key(s):
    '''
    
    '''
    start = s.find("[")
    end = s.find("]")
    if start == -1 or end == -1:
        return None
    if s[start + 1] == "'":
        start += 1
    if s[end - 1] == "'":
        end -= 1
    return s[start + 1:end]