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.

1591 questions
85
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
  • 1,327
  • 2
  • 12
  • 17
80
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
  • 16,026
  • 18
  • 65
  • 89
73
votes
8 answers

How to preserve identifierForVendor in ios after uninstalling ios app on device?

I am developing an iOS app which calls web-service for login and at that time i send login credentials to web server along with vendor identifier (identifierForVendor),to identify device uniquely for those credentials.So user can have only one…
Harshavardhan
  • 1,266
  • 2
  • 14
  • 25
72
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
  • 15,865
  • 47
  • 119
  • 191
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,472
  • 1
  • 14
  • 35
69
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
  • 2,050
  • 2
  • 18
  • 17
66
votes
14 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
  • 6,253
  • 3
  • 28
  • 36
66
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
  • 3,276
  • 8
  • 31
  • 58
64
votes
12 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
  • 775
  • 1
  • 5
  • 9
59
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
  • 3,119
  • 3
  • 24
  • 22
56
votes
5 answers

How to generate unique 64 bits integers from Python?

I need to generate unique 64 bits integers from Python. I've checked out the UUID module. But the UUID it generates are 128 bits integers. So that wouldn't work. Do you know of any way to generate 64 bits unique integers within Python? Thanks.
Continuation
  • 12,722
  • 20
  • 82
  • 106
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,333
  • 3
  • 34
  • 44
51
votes
9 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
  • 11,429
  • 14
  • 70
  • 118
50
votes
6 answers

JavaScript Unique Browser Id

is there anyway to create a unique ID for a browser within javascript? Im not talking about an ID that is random everytime it is generated but an ID that is unique to the browser it is generated in but also takes into account the computer its…
Ozzy
  • 10,285
  • 26
  • 94
  • 138
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
  • 167,459
  • 57
  • 363
  • 519