Checks that key and location are set.
17958
boolean checkCredentials() {


		if(!httpPut)
		{
			if (token.equals(CONFIG_TOKEN) || token.equals(""))
			{
				//Check if set in an environment variable, used with PaaS providers
				String envToken = getEnvVar( CONFIG_TOKEN);

				if (envToken == ""){
					dbg(INVALID_TOKEN);
					return false;
				}

				this.setToken(envToken);
			}

			return checkValidUUID(this.getToken());
		}else{
			if ( !checkValidUUID(this.getKey()) || this.getLocation().equals(""))
				return false;

			return true;
		}
	}
927130
def _ensure_field(self, key):
        """"""
        if self._has_field:
            self._size += 2  # comma, space
        self._has_field = True

        self._size += len(key) + 4
1061026
function checkKeyCodes (
  eventKeyCode,
  key,
  builtInAlias
) {
  var keyCodes = config.keyCodes[key] || builtInAlias;
  if (Array.isArray(keyCodes)) {
    return keyCodes.indexOf(eventKeyCode) === -1
  } else {
    return keyCodes !== eventKeyCode
  }
}
143038
def check(self, url_data):
        """"""
        location = get_location(url_data.host)
        if location:
            url_data.add_info(_("URL is located in %(location)s.") %
            {"location": _(location)})
225492
def has_key(self, key):
        
        if key in self._dict:
            try: 
                self[key]
                return True
            except ValueError:
                return False
            except KeyError:
                return False
        return False
1122898
public function checkMandatoryKey()
    {
        foreach ($this->mandatoryKeys as $key) {
            if (!array_key_exists($key, $this)) {
                return $key;
            }
        }

        return true;
    }
359109
function checkKeyExists(key) {
    var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'fallback';
    // get the current language from the store
    var locale = store.state[moduleName].locale;
    var fallback = store.state[moduleName].fallback;
    var translations = store.state[moduleName].translations; // check the current translation

    if (translations.hasOwnProperty(locale) && translations[locale].hasOwnProperty(key)) {
      return true;
    }

    if (scope == 'strict') {
      return false;
    } // check any localized translations


    var localeRegional = locale.split('-');

    if (localeRegional.length > 1 && translations.hasOwnProperty(localeRegional[0]) && translations[localeRegional[0]].hasOwnProperty(key)) {
      return true;
    }

    if (scope == 'locale') {
      return false;
    } // check if a fallback locale exists


    if (translations.hasOwnProperty(fallback) && translations[fallback].hasOwnProperty(key)) {
      return true;
    } // key does not exist in the store


    return false;
  }
482944
def key_exists(self, key):
        
        assert isinstance(key, str)
        cursor = self.conn.cursor()
        with contextlib.closing(cursor):
            cursor.execute('SELECT COUNT(*) FROM events WHERE uuid=?', (key,))
            res = cursor.fetchone()
            count = res[0]
        if count == 0:
            return False
        else:
            assert count in (0, 1), \
                "Duplicate event ids detected: {0}".format(count)
            return True
270690
def contains(self, key):
    '''
    '''
    path = self.object_path(key)
    return os.path.exists(path) and os.path.isfile(path)
1328207
private boolean keyAlreadyExists(String newKey) {

        Collection<?> itemIds = m_table.getItemIds();
        for (Object itemId : itemIds) {
            if (m_table.getItem(itemId).getItemProperty(TableProperty.KEY).getValue().equals(newKey)) {
                return true;
            }
        }
        return false;
    }
819887
def check_hash_key(query_on, key):
    """"""
    return (
        isinstance(key, BaseCondition) and
        (key.operation == "==") and
        (key.column is query_on.hash_key)
    )
1335367
def _has(self, key, exact=0):
        """"""
        if not exact:
            key = self.getfullkey(key,new=1)
        return key in self.data
651574
private int checkKey(Object key) {
	if (key == null) {
	    throw new NullPointerException("key cannot be null");
	} else if (!(key instanceof Integer)) {
	    throw new IllegalArgumentException("key must be an Integer");
	}
	else {
	    return ((Integer)key).intValue();
	}
    }
635248
public boolean containsKey(Object key) {
	int k = checkKey(key);
	int index = Arrays.binarySearch(keyIndices, k);
	return index >= 0;
    }
700344
public function __isset($key)
    {
        switch (true) {
            case isset($this->_params[$key]):
                return true;
            case isset($_GET[$key]):
                return true;
            case isset($_POST[$key]):
                return true;
            case isset($_COOKIE[$key]):
                return true;
            case isset($_SERVER[$key]):
                return true;
            case isset($_ENV[$key]):
                return true;
            default:
                return false;
        }
    }
566978
public boolean containsKey(Object key) {
        Object k = maskNull(key);
        Object[] tab = table;
        int len = tab.length;
        int i = hash(k, len);
        while (true) {
            Object item = tab[i];
            if (item == k)
                return true;
            if (item == null)
                return false;
            i = nextKeyIndex(i, len);
        }
    }
26886
private void checkKey(final byte[] key) {
		if (theBinaryKey.get() != null) {
			verifyKey(key);
		} else {
			boolean success = theBinaryKey.compareAndSet(null, key);
			if (!success) {
				// someone already beat us to it. that's fine, just verify
				// that the key is the same
				verifyKey(key);
			} else {
				pipelined(key);
			}
		}
	}