Questions tagged [uniqueidentifier]

With reference to a given (possibly implicit) set of objects, a unique identifier is any identifier which is guaranteed to be unique among all identifiers used for those objects and for a specific purpose.

Overview

When dealing with a set of objects, a unique identifier is any identifier that is designed to be unique among all identifiers used for those objects within a given range, scope or purpose.

1464 questions
70
votes
4 answers

Directive template unique IDs for elements in AngularJS

I have a directive that can be used multiple times on a page. In the template of this directive, I need to use IDs for an input-Element so I can "bind" a Label to it like so: Now…
NoRyb
  • 1,368
  • 1
  • 13
  • 30
70
votes
7 answers

Generate a unique id

I am a student at university and our task is to create a search engine. I am having difficulty generating a unique id to assign to each url when added into the frontier. I have attempted using the SHA-256 hashing algorithm as well as Guid. Here is…
strange_developer
  • 957
  • 1
  • 8
  • 15
69
votes
4 answers

How to generate unique id in Dart

I write websocket chat. How to generate unique id for user? now i use this code: id = new DateTime.now().millisecondsSinceEpoch; is there any more neat solution?
Sergey Karasev
  • 3,243
  • 2
  • 21
  • 24
68
votes
5 answers

C# guid and SQL uniqueidentifier

I want to create a GUID and store it in the DB. In C# a guid can be created using Guid.NewGuid(). This creates a 128 bit integer. SQL Server has a uniqueidentifier column which holds a huge hexidecimal number. Is there a good/preferred way to…
Daniel
  • 15,492
  • 18
  • 62
  • 83
66
votes
8 answers

How are hash functions like MD5 unique?

I'm aware that MD5 has had some collisions but this is more of a high-level question about hashing functions. If MD5 hashes any arbitrary string into a 32-digit hex value, then according to the Pigeonhole Principle surely this can not be unique, as…
Aly
  • 14,299
  • 42
  • 109
  • 181
65
votes
11 answers

How to get a unique computer identifier in Java (like disk ID or motherboard ID)?

I'd like to get an id unique to a computer with Java, on Windows, MacOS and, if possible, Linux. It could be a disk UUID, motherboard S/N... Runtime.getRuntime().exec can be used (it is not an applet). Ideas?
Gohu
  • 1,836
  • 2
  • 16
  • 16
60
votes
15 answers

What's a good way to uniquely identify a computer?

I'm developing some desktop software for a client to resell. The client wants to restrict the software so that the registration code will be specific to one and only one computer. Besides using the MAC from the network card, does anyone have any…
Paul Lefebvre
  • 5,958
  • 3
  • 26
  • 36
53
votes
4 answers

Android Unique Serial Number

I am developing an android application that targets Android 4.0 (API 14) and above. I am looking for a serial number that is unique per device and that persists for ever (dies with the device, does not change after factory resets). I have found lots…
Leeeeeeelo
  • 4,143
  • 3
  • 30
  • 43
49
votes
2 answers

What is a Git commit ID?

How are the Git commit IDs generated to uniquely identify the commits? Example: 521747298a3790fde1710f3aa2d03b55020575aa How does it work? Are they only unique for each project? Or for the Git repositories globally?
Ankur Loriya
  • 2,858
  • 8
  • 27
  • 57
48
votes
5 answers

Aggregate Function on Uniqueidentifier (GUID)

Let's say I have the following table: category | guid ---------+----------------------- A | 5BC2... A | 6A1C... B | 92A2... Basically, I want to do the following SQL: SELECT category, MIN(guid) FROM myTable GROUP BY…
Heinzi
  • 151,145
  • 51
  • 326
  • 481
48
votes
16 answers

Short unique id in php

I want to create a unique id but uniqid() is giving something like '492607b0ee414'. What i would like is something similar to what tinyurl gives: '64k8ra'. The shorter, the better. The only requirements are that it should not have an obvious order…
Antti
  • 2,909
  • 2
  • 22
  • 22
45
votes
14 answers

App rejected, but I don't use UDID

Today we received a feedback about our submission and we do not understand the reported problem: "Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate…
Tiago
  • 451
  • 1
  • 4
  • 4
43
votes
10 answers

Any way to identify browser tab in JavaScript?

I need to be able to identify what tab I am in within the browser. Isn't there some bit of information I can get from the browser to identify the tab? I don't need to know anything about any other tabs, I just need an id for the tab I am in. It…
user1588877
  • 565
  • 1
  • 4
  • 8
42
votes
9 answers

NSFileManager unique file names

I need a quick and easy way to store files with unique file names on iOS. I need to prefix the file with a string, and then append the generated unique identifier to the end. I was hoping NSFileManager had some convenient method to do this, but I…
spentak
  • 4,277
  • 15
  • 59
  • 90
40
votes
8 answers

Auto increment in MongoDB to store sequence of Unique User ID

I am making a analytics system, the API call would provide a Unique User ID, but it's not in sequence and too sparse. I need to give each Unique User ID an auto increment id to mark a analytics datapoint in a bitarray/bitset. So the first user…
est
  • 10,087
  • 10
  • 63
  • 112
1
2
3
97 98