Returns True if we have a client with a certain integer identifier
197394
def has_client_id(self, id):
    """"""

    return self.query(Client).filter(Client.id==id).count() != 0
135981
def id(self):
        """"""
        id = ''
        if (self.server_and_prefix is not None and
                self.server_and_prefix != ''):
            id += self.server_and_prefix + '/'
        if (self.identifier is not None):
            id += self.identifier
        return id
638894
function containsOnlyIdentifiers(node) {
            if (node.type === "Identifier") {
                return true;
            }

            if (node.type === "MemberExpression") {
                if (node.object.type === "Identifier") {
                    return true;
                }
                if (node.object.type === "MemberExpression") {
                    return containsOnlyIdentifiers(node.object);
                }
            }

            return false;
        }
597711
def is_python2_identifier(possible_identifier):
    
    match = _python2_identifier_re.match(possible_identifier)
    return bool(match) and not iskeyword(possible_identifier)
277729
def is_python3_identifier(possible_identifier):
    
    possible_identifier = unicodedata.normalize('NFKC', possible_identifier)
    return (
        bool(possible_identifier) and
        _is_in_id_start(possible_identifier[0]) and
        all(map(_is_in_id_continue, possible_identifier[1:]))
    ) and not iskeyword(possible_identifier)
114502
def _isNewTxn(self, identifier, reply, txnId) -> bool:
        
        return (identifier not in self.processedRequests or
                reply.reqId not in self.processedRequests[identifier]) and \
            txnId is not None
883649
public function isDoiAuthenticatedClients($doiValue, $client_id = null)
    {
        if ($client_id === null) {
            return false;
        }

        $client = $this->getAuthenticatedClient();

        if ($client->client_id != $client_id) {
            return false;
        }

        // everyone has access to test prefix
        if (strpos($doiValue, DOIServiceProvider::$globalTestPrefix) === 0) {
            return true;
        }

        // check if the client owns the prefix
        foreach ($client->prefixes as $clientPrefix) {
            if (strpos($doiValue, $clientPrefix->prefix->prefix_value) === 0) {
                return true;
            }
        }

        return false;
    }
201936
def getClientUID(self):
        
        request = self.getRequest()
        if request:
            client = request.getClient()
            if client:
                return client.UID()
755045
def _is_valid_id(self, inpt):
        """"""
        from dlkit.abstract_osid.id.primitives import Id as abc_id
        if isinstance(inpt, abc_id):
            return True
        else:
            return False
473045
def client(self, id):
    """"""

    return self.query(Client).filter(Client.id==id).one()
1080202
def is_acquired(self):
        """"""
        values = self.client.get(self.key)
        return six.b(self._uuid) in values
640177
def id(self, value):
        """"""
        i = value.rfind('/')
        if (i > 0):
            self.server_and_prefix = value[:i]
            self.identifier = value[(i + 1):]
        elif (i == 0):
            self.server_and_prefix = ''
            self.identifier = value[(i + 1):]
        else:
            self.server_and_prefix = ''
            self.identifier = value
832638
def get_int_id(self, str_id):
        """"""
        if not str_id in self.mapping:
            if self.curr_id == IdRemapper.INT_MAX:
                return None # No more 32 bits signed integers available
            self.mapping[str_id] = self.curr_id
            self.r_mapping[self.curr_id] = str_id
            self.curr_id += 1
        return self.mapping[str_id]
1183962
def __int(value):
    ''''''
    valid, _value = False, value
    try:
        _value = int(value)
        valid = True
    except ValueError:
        pass
    return (valid, _value, 'integer')
799697
def _client_allowed(self):
    """"""
    client_ip = self._client_address[0]
    if not client_ip in self._settings.allowed_clients and \
       not 'ALL' in self._settings.allowed_clients:
      content = 'Access from host {} forbidden.'.format(client_ip).encode('utf-8')
      self._send_content(content, 'text/html')
      return False
    return True
914607
def search_client_by_id(self, clientID) -> Client:
        
        for c in self.clients:
            if c.id == clientID:
                return c
        return None
1370734
function checkId(id) {
  id = id || "";
  id = id.toString();
  return _.isString(id) && id.length === 24;
}