generate a next unique ID for user TODO: use SR.DS for l_states instead
497503
function (onDone) {

	l_validateUID();
	var uid = ++l_states['uid_count'];

	l_states.sync(function (err) {
		if (err) {
			return onDone(err);
		}
		LOG.warn('uid generated: ' + uid);
		onDone(null, uid);
	});
}
442771
def run_id(self):
        '''
        '''
        s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', self.__class__.__name__)
        return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
588955
def nextId(self):
        
        if self._next_id is False:
            # Request the next urn
            self._prev_id, self._next_id = self.getPrevNextUrn(reference=self.urn.reference)
        return self._next_id
1145802
def sequential_id(k, identifier):
    """"""
    key = _key(k)
    return int(monotonic_zadd(keys=[key], args=[identifier]))
52896
def generate_subid(self, token=None, return_user=False):
    '''
    '''    
    from expfactory.database.models import Participant
    if not token:
        p = Participant()
    else:
        p = Participant(token=token)
    self.session.add(p)
    self.session.commit()
    if return_user is True:
        return p
    return p.id
1056893
def generate_uid():
    
    # first must be a letter
    first = random.choice(string.ascii_letters)
    # rest must be letters or numbers
    rest = ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(10))
    return first + rest
700805
public void createUniqueData()
    {
        LoginGenerator.LoginRecord unique_login;
        unique_login = random_login_generator.createUniqueLogin("voltdb", true);
        doLogin(unique_login);
        unique_login = random_login_generator.createUniqueLogin("voltdb2", false);
        doLogin(unique_login);
    }
160745
def update_id_counter(self):
        

        if not self.__entries:
            self.__next_id = 1
        else:
            self.__next_id = max(self.__entries.keys()) + 1
221054
public static byte[] nextID() {
        byte[] ID = new byte[15];
        synchronized (LOCK) {
            long timestamp = System.currentTimeMillis();
            if (timestamp != LAST_TIMESTAMP) {
                LAST_TIMESTAMP = timestamp;
                LAST_SEQUENCE = 0;
                TIMESTAMP_BUFFER[0] = (byte)(timestamp >>> 48);
                TIMESTAMP_BUFFER[1] = (byte)(timestamp >>> 40);
                TIMESTAMP_BUFFER[2] = (byte)(timestamp >>> 32);
                TIMESTAMP_BUFFER[3] = (byte)(timestamp >>> 24);
                TIMESTAMP_BUFFER[4] = (byte)(timestamp >>> 16);
                TIMESTAMP_BUFFER[5] = (byte)(timestamp >>>  8);
                TIMESTAMP_BUFFER[6] = (byte)(timestamp >>>  0);
            } else if (++LAST_SEQUENCE == 0) {
                throw new RuntimeException("Same ID generated in a single milliscond!");
            }
            ByteBuffer bb = ByteBuffer.wrap(ID);
            bb.put(TIMESTAMP_BUFFER);
            bb.put(MAC);
            bb.putShort(LAST_SEQUENCE);
        }
        return ID;
    }
1159326
def gen_unique_id(serialized_name, args, kwargs):
    
    return hashlib.sha256(json.dumps({
        'func': serialized_name,
        'args': args,
        'kwargs': kwargs,
    }, sort_keys=True).encode('utf8')).hexdigest()
62331
function getNextId() {
    var dataIds = Object.keys(idIndexData)

    dataIds.sort(function (a, b) {
      return b - a
    })

    if (dataIds && dataIds[0]) {
      var id = _.parseInt(dataIds[0]) + 1
      return id
    } else {
      return 1
    }
  }
348334
def getid(self, idtype):
        '''
        
        '''
        memorable_id = None
        while memorable_id in self._ids:
            l=[]
            for _ in range(4):
                l.append(str(randint(0, 19)))
            memorable_id = ''.join(l)
        self._ids.append(memorable_id)
        return idtype + '-' + memorable_id
355024
def _generate_state(self, trans):
        
        state = PDAState()
        state.id = self.nextstate()
        state.type = 2
        state.sym = state.id
        state.trans = trans.copy()
        self.toadd.append(state)
        return state.id
239685
function makeId(length = RANDOM_CHARACTER_LENGTH) {
    let text = "";
    for (let i = 0; i < length; i++) {
        text += RANDOM_CHARACTER_SOURCE.charAt(Math.floor(Math.random() * RANDOM_CHARACTER_SOURCE.length));
    }

    return text;
}
269978
def _construct_unique_id(self, id_prefix, lines):
        
        text = []
        for line in lines:
            if isinstance(line, str):
                text.append(line)
            elif isinstance(line, CodeAnswer):
                text.append(line.dump())
        return id_prefix + '\n' + '\n'.join(text)
278167
function (prefix, obj) {
            if (!obj.attr('id')) {
                var generated_id;
                do {
                    generated_id = prefix + '_' + randomNumber();
                } while ($('#' + generated_id).length > 0);
                obj.attr('id', generated_id);
            }
            return obj.attr('id');
        }
60903
def _get_next_id(self):
        """"""
        if self.sensors:
            next_id = max(self.sensors.keys()) + 1
        else:
            next_id = 1
        if next_id <= self.const.MAX_NODE_ID:
            return next_id
        return None