compare a key with a new dynamically generated one
359053
public static function compare($key=null, $mixed=null) {
		// if no key is provided
		if(!$key || strlen($key) != 20) {
			// return false
			return(false);	
		}
		// if keys do match
		return(self::generate($mixed) == $key ?: false);
	}
1152661
function hasAtLeastOneKey(target, attrs) {
    var attrsLen = attrs.length;
    var i = 0;
    var counter = 0;
    for (; i < attrsLen; i++) {
      if (target[attrs[i]] !== undefined) {
        counter++;
      }
    }
    return !!counter;
  }
909506
def diff(var, key):
    ''''''
    global last_diff
    ret = 0
    if not key in last_diff:
        last_diff[key] = var
        return 0
    ret = var - last_diff[key]
    last_diff[key] = var
    return ret
631216
def compare(dn, key, value)
      log_dispatch(:compare, dn, key, value)
      adapter.compare(dn, Ldaptic.encode(key), Ldaptic.encode(value))
    end
655376
function getMappedKey (key, create) {
        allKeyMap = getAllKeys();

        if (create && !(key in allKeyMap)) {
            var newKey = ("uD" + _UNIQUE_ID++);
            setMappedKey(newKey, key);

            return newKey;
        } else {
            return allKeyMap[key];
        }
    }
523526
function changedKeys(props, newProps) {
  return Object.keys(props).filter(key => {
    return props[key] !== newProps[key];
  });
}
761385
function(obj, stringKey) {
            var parts           = stringKey.split('.'),
                returnCurrent   = null,
                current         = '',
                i               = 0;

            if (!stringKey) {
                return obj;
            }

            returnCurrent = function(obj) {
                if (!obj) {
                    return null;
                } else {
                    return obj[current];
                }
            };

            while (i < parts.length) {
                current = parts[i];

                obj = returnCurrent(obj);

                i++;
            }

            if (typeof obj !== 'undefined') {
                return obj;
            } else {
                return null;
            }
        }
1324305
function(key){
                            /* check if null */
                            if ($scope.json[key] === null);

                            /* check if undefined or "" */
                            else if ($scope.json[key] === undefined || $scope.json[key] === '') $scope.json[key] = null;

                            /* try to convert string to number */
                            else if (!isNaN(+$scope.json[key]) && isFinite($scope.json[key]))
                                $scope.json[key] = +$scope.json[key];

                            /* try parse to function */
                            else if ($scope.utils.tryGetFunction($scope.json[key])){
                                $scope.json[key] = $scope.utils.tryGetFunction($scope.json[key]);
                                $scope.utils.textarea.init(key);
                            }

                            /* try to parse string to json */
                            else {
                                if ($scope.node.isHighEditLevel){ /* if high editable level */
                                    try {
                                        var json = JSON.parse($scope.json[key]);
                                        $scope.json[key] = json;
                                        $scope.refresh();
                                    } catch (e){}
                                } else { /* if low editable level */
                                    /* check if boolean input -> then refresh */
                                    if ($scope.json[key] === "true" || $scope.json[key] === "false") {
                                        $scope.json[key] = JSON.parse($scope.json[key]);
                                        $scope.refresh();
                                    }
                                }
                            }
                        }
145373
function equalForKeys(a, b, keys) {
        if (!angular.isArray(keys) && angular.isObject(keys)) {
          keys = protoKeys(keys, ["$$keys", "$$values", "$$equals", "$$validates", "$$new", "$$parent"]);
        }
        if (!keys) {
          keys = [];
          for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility
        }

        for (var i = 0; i < keys.length; i++) {
          var k = keys[i];
          if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized
        }
        return true;
      }
72347
def checkAndCreate(self, key, payload):
        
        if key not in self:
            self[key] = payload
        return self[key]['id']
1353064
public function generateDiff($key, $oldValue, $newValue)
    {
        $this->diff[$key] = [
            self::OLD_VALUE => $oldValue,
            self::NEW_VALUE => $newValue
        ];
    }
182789
def [](key, src = name.to_sym)
      attr =
        if count_index[key].equal?(1)
          name_index[key]
        else
          source_index[src][key]
        end

      unless attr
        raise(KeyError, "#{key.inspect} attribute doesn't exist in #{src} schema")
      end

      attr
    end
382927
private int compare(Object key1, Object key2) {
        if (comparator == null)
            return ((Comparable) key1).compareTo(key2);
        else
            return comparator.compare(key1, key2);
    }
157228
function distinctUntilKeyChanged(key, compare) {
    return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
}
319064
def exists(self, key, fresh=False):
        
        key = key.upper()
        if key in self._deleted:
            return False
        return self.get(key, fresh=fresh, default=missing) is not missing
1151221
def update(key, value):
    '''
    
    '''
    store = load()
    store[key] = value
    dump(store)
    return True
626188
function (key, value) {
        assertNotNull(key);

        var index = binarySearch(this.slot.keys, 0, this.slot.size, key, this.slot.comparer.compare);

        if (index >= 0) {
            error(ERROR_DUPLICATE_KEY);
        }

        this.insert(~index, key, value);
    }