Questions tagged [uuid]

-1

votes
0

answer
16

Views

how to get ubuntu machine id using python

I want the get the machine id from my system by using python code. My machine id is stored in "/var/lib/dbus/machine-id" . The machine id was "556b837c93cd4b8dbd3a1c01f468d9f5" How to get the number from the file and assign it to a variable using python. Any code suggestions..
Paul Steven
1

votes
1

answer
190

Views

Why can't an email confirmation code be a UUID?

From reading Stackoverflow it seems that simply using a UUID for confirming registration via email is bad. Why is that? Why do I need to fancily generate some less random code from a user's data? The suggested ways seem to be a variant of users data + salt -> hash. When a UUID is used, it always get...
Mörkö
1

votes
1

answer
4.6k

Views

Generating a random UUID and getting the version

I am trying to generate a UUID to a string, so that when I enter uuidcreaterandom, it will create a random UUID. I have pasted below what I tried, and am I missing something ? Any pointers much appreciated. Thank you.. public UUID uuidCreateRandom() { return UUID.randomUUID(); } public UUID uuidCrea...
William Chang
1

votes
1

answer
273

Views

Can't store byte array in google's datastore

I'm using Google's datastore in my Go app. I have a Song struct, which has a uuid.UUID field. type Song struct { ID: uuid.UUID Title: string ... } This UUID is taken from github.com/satori/go.uuid and is defined as type UUID [16]byte It seems that datastore can't handle byte arrays but in this use...
Lawrence Benson
1

votes
1

answer
61

Views

Create a unique id for a whole SPARQL query

I need a unique id (uuid) for a whole query independent of the number of matches. Consider the following Data @prefix ex: ex:John ex:knows ex:Kathrin. ex:John ex:knows ex:Peter. ex:John ex:worksAt ex:coolShop. The data tells us that John knows some people and works at coolShop. Now we have an INSER...
SNaidra
1

votes
2

answer
2.9k

Views

Forgot Password Request (Java) [closed]

Quite a common subject for most of you guys. I'm building a webapp in Java, using Spring + Spring Security + Hibernate + MySQL + etc... I'm in the process of implementing the "reset password" module. I already know the process flow and have all the forms and corresponding controllers. I just would...
CountD
1

votes
0

answer
24

Views

Django: How to catch a ValueError from URL?

I'm writing a single API function (as I don't need rest in this case). Basically it's a URL with UUID4 as api-key. The function goes as follow: def jsonapi(request, apikey): try: test = get_object_or_404(ProfileDetails, apikey=apikey) if ProfileDetails.objects.filter(apikey=apikey).exists(): details...
Ronald Langeveld
0

votes
0

answer
17

Views

Check for UUID version in swift

Is there a way to check for UUID version? I know the UUID().uuidString is version 4. and I have a variable that comes from the server and it is in UUID version 1. now I want to check for the version of UUID and decide for my actions.
tara tandel
1

votes
2

answer
3.6k

Views

Store UUID of discover peripheral in CoreBluetooth LE iOS

I tried below code to store UUID of discovered devices to Array and then select UUID in this array to connect but it not run. - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSS...
user3125692
1

votes
1

answer
2.2k

Views

Base32 encode UUID in Java

What is the most time efficient way to create and Base32 encode a random UUID in Java? I would like to use Base32 encoding to store globally unique IDs that are usable in URLs.
Mafuba
1

votes
2

answer
198

Views

Adding Uniqe ID (UUID) to an object [closed]

In order to create a client object with a unique ID i was thinking of doing this (see below). Will this newly created object be assigned with a randomly generetad String and added to the object, and then the List? Will I be able to access it later? (Sorry for the incompetence). Have no way of testin...
Andorius
1

votes
2

answer
8.8k

Views

Can an emulator have a unique device ID? And can you use that ID?

I am making a web app using HTML5 and PhoneGap, and I am using the uuid as a one-time login instead of the standard username/password combination. Instead of having the client manually type in the uuid, I want to automatically grab the uuid from the device and login using that information. There is...
mrbobjrsrv
1

votes
1

answer
2.5k

Views

What is a uuid for in AngularJS?

I came across the term uuid in articles about Angular directives, factories, etc. For example there is also this package on Github I can't find any explanation about what it is or what it is used for. Can someone explain what uuid's are when it comes to AngularJS?
CodyBugstein
1

votes
1

answer
2.5k

Views

Waterline UUID type and validation

I would like to create a "Customer" models which has a uuid field as a primary key. It seems to be simple but it is not as Waterline doesn't include any native validator for this. How to edit this code so that I can have an uuid as a unique primary key for this model ? module.exports = { identity: '...
Charaf
1

votes
1

answer
853

Views

Python: UUID in a list

I have a list with a uuid4 in it. I also have a string. For example: list = [UUID('79d8f4b7-06a0-41d1-99d6-dd8c5308875f'), 'example1', 'example2'] string = 79d8f4b7-06a0-41d1-99d6-dd8c5308875f But when I try: if string in list: print("It's in!") else: print("It's not!") The output is always "it's no...
tester
1

votes
2

answer
1k

Views

Python How to Create UUID Based on File Contents

I was looking at the documentation and in the example section, I don't see how to create a UUID based on File Contents. Google did not help me either. I've tried this: >>> import uuid >>> data = open('/media/emmc/DCIM/100ABC06/00059.JPG','rb') >>> contents = data.read() >>> len(contents) 9155 >>> uu...
PhilBot
1

votes
1

answer
510

Views

wmic csproduct get UUID equivalent for Unix and Mac?

is there an equivalent command for: "wmic csproduct get UUID" from Windows on Unix and Mac Systems?
Opa114
1

votes
3

answer
1k

Views

How to generate migration with uuid primary key

How can a model be generated from the rails generate command, specifying uuid as the column type for the primary key? My goal is to issue some command like the following: rails g model widget id{uuid} To generate a migration like create_table :widgets, id: :uuid do |t| t.timestamps null: false end...
BoosterStage
1

votes
1

answer
748

Views

Swift - time based UUID - how to sort them

I am creating and using time base UUID for items. I am using this function: class func timeBasedUUID() -> NSUUID { let uuidSize = sizeof(uuid_t) let uuidPointer = UnsafeMutablePointer.alloc(uuidSize) uuid_generate_time(uuidPointer) let uuid = NSUUID(UUIDBytes: uuidPointer) uuidPointer.dealloc(uuidSi...
Libor Zapletal
1

votes
3

answer
897

Views

Is RandomStringUtils.randomAlphanumeric(30) a valid GUID strategy?

I need a random string generator that generates an alpha-numeric string to use as an unique key in a distributed system that is 30 characters or less. It cannot contain any special characters. Will RandomStringUtils#randomAlphanumeric work for this? The underlying implementation uses java.util.Rando...
cosbor11
1

votes
1

answer
604

Views

Should UUID be passed in or generated on construction of POJO?

When creating a POJO it is bad practice to set any attributes in the constructor without passing them in because of dependency injection. If you are setting one of the fields to a UUID value is this acceptable to be generated and set on construction? Or should it be passed in through the constructo...
perkss
1

votes
2

answer
899

Views

Should I be using node-uuid or uuid?

On npmjs.com there are packages for both node-uuid and uuid. Which should I be using? They're the same API, one is forked from the other, and divergent in commits.
Kyle Kelley
0

votes
0

answer
7

Views

How to generate Universally Unique IDentifier, UUID from LoadRunner in Linux environment

I have experienced the need of generating UUID in LoadRunner several times while scripting but there is no in-build function to do so. Therefore, I had to use a custom function to satisfy my need. A universally unique identifier (UUID) is a 128-bit number used to identify information in computer sy...
Barun
1

votes
2

answer
695

Views

How can I convert a UUID from binary format to string format in Lua?

I have a UUID in binary format in my Lua program (just 16 bytes in string). I need to convert it to string format, for example 550e8400-e29b-41d4-a716-446655440000. How can I convert it?
Sandro
1

votes
1

answer
1.5k

Views

Understanding long and short form of UUID

I am trying to learn some bluetooth programming in android I have been able to make a rudimentary program that discovers and connects to a (currently just a single) development board with Bluetooth features built in I want to be able to send commands to the board as well as receive messages from it...
user13267
1

votes
2

answer
313

Views

Possible to preserve UUID case when created from String?

From this code: String in = "E5D552ED-03AB-4AFA-B484-0D2C4FD64432"; UUID uuid = UUID.fromString(in); String out = uuid.toString(); I get this output: > in: E5D552ED-03AB-4AFA-B484-0D2C4FD64432 > out: e5d552ed-03ab-4afa-b484-0d2c4fd64432 The issue is we use the String as the primary key on a row we...
Matt Felzani
1

votes
1

answer
520

Views

How to pass UniqueID as constructor args to a spring bean

I am a new to spring. I have a bean class with a constructor having single parameter, a uniqueId. void Sample(String uniqueId){ this.uniqueId = uniqueId; } the bean doesn't have any default constructor. I require this id for some bussiness logic. this uniqueID needs to be UUID.randomUUID().toStrin...
arvin_v_s
2

votes
3

answer
1.2k

Views

DB2 BIGINT id generator

I have the following class loaded into DB2 9.7.4 Express-C for generating ids for rows public class Int64UUID { public static final long dx = 30*386*12*30*24*3600*1000; // starting at 2000 year public static long lastUUID = System.currentTimeMillis() - dx; public static synchronized long random(){...
Troydm
2

votes
1

answer
258

Views

How to handle python django rest-framework-api malformed UUID instead of 500?

When using a malformed UUID in django-rest-framework the server throws an exception and returns status-code 500. The exception ValueError 'badly formed hexadecimal UUID string' isn't handled. It makes more sense to handle it properly and return a status code 400. I managed to do that with a custom e...
Yaniv Peer
0

votes
0

answer
8

Views

Db Seeding with UUID: Column not found: 1054 Unknown column 'client_id' in 'field list'

My top-level table is "clients". Table "users" belongs to "clients". This is the error I get when trying to seed the users table. Illuminate\Database\QueryException : SQLSTATE[42S22]: Column not found: 1054 Unknown column 'client_id' in 'field list' (SQL: insert into users (client_id, name, email,...
Colin M
2

votes
2

answer
2.1k

Views

How to convert value back from “%02x” in Java?

I have a byte array that is converted to a string in a known way. public String getValueString(byte[] data) { StringBuilder result = ""; for(int i = 0; i < data.length; i++) { result.append(String.format("%02X", data[i])); } return result.toString; } I am looking for the way to convert String to byt...
bgplaya
2

votes
1

answer
550

Views

what are the smallest and largest valid type-1 UUIDs?

i have been reading the UUID RFC at http://www.ietf.org/rfc/rfc4122.txt and experimenting using the python uuid module. for ease of explanation, here is the UUID diagram lifted from the spec. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2...
Michael Frank
16

votes
5

answer
11.6k

Views

How do I identify a blank uniqueidentifier in SQL Server 2005?

I'm getting a uniqueidentifier into a Stored Procedure that looks like this 00000000-0000-0000-0000-000000000000. This seems like a simple thing, but how can identify that this is a blank uniqueidentifier? If I get a value like this DDB72E0C-FC43-4C34-A924-741445153021 I want to do X If I get a va...
codingguy3000
17

votes
1

answer
9.8k

Views

Best practices for SessionId/Authentication Token generation

I have seen people using UUID for authentication token generation. However, in RFC 4122 it is stated that Do not assume that UUIDs are hard to guess; they should not be used as security capabilities (identifiers whose mere possession grants access), for example. I was wondering, what algorithms are...
oldbam
0

votes
1

answer
20

Views

iOS Best approach to uniquely identifying user device

After some researches i have come up with two possible solutions for uniquely identifying user device Through the use of the Device Framework, identify the user device by using two bits as explained in this blog post which will be maintained through App deletion, reinstall, wipe out (erasing all con...
decimal
17

votes
2

answer
14.3k

Views

UUID collision risk using different algorithms

I have a database where 2 (or maybe 3 or 4) different applications are inserting information. The new information has IDs of the type GUID/UUID, but each application is using a different algorithm to generate the IDs. For example, one is using the NHibernate's "guid.comb", other is using the SQLServ...
Diego Jancic
1

votes
3

answer
259

Views

Easy to remember guid

Is there a block of Java UUID that won't automatically generated? I would like to define an easy to remember guid inside of my code that will act as a constant. Something like a null?
Jake Pearson
17

votes
1

answer
12.1k

Views

How to efficient insert and fetch UUID in Core Data

I am looking for an efficient way to store and search UUID in Core Data. Those UUID are generated by many iOS devices in a distributed system. Each of those devices may store about 20-50k UUIDs. It is obvious that storing UUID as String in Core Data will hurt the efficiency of indexing on it. But...
Cable W
1

votes
1

answer
2.2k

Views

Generate persistent application UUID in Android upon app installation

I need to distinguish my app's installations so I generate a UUID in my app via java.util.UUID.randomUUID() then save it as a String in the shared preferences. However, when I go to the phone's Settings, manage the applications, click on my app, and press "Clear Data," the next time my app runs, a n...
Matt Quiros
1

votes
4

answer
8.4k

Views

Get Major and Minor from UUID of Estimote iBeacon

I just got my pack of Estimote iBeacons and I am trying to do something that sounds like it would be pretty simple. I would like to get the "major" and "minor" id from the beacon that triggered the didEnterRegion method. The method is below: -(void)beaconManager:(ESTBeaconManager *)manager didEnterR...
user2492064

View additional questions

Смотреть фильмы онлайн бабушка легкого поведения 2 фильм бесплатно