uuid

UUIDs in CouchDB

I am wondering about the format UUIDs are by default represented in CouchDB. While the RFC 4122 describes UUIDs like 550e8400-e29b-11d4-a716-446655440000, CouchDB uses continuously chars like 3069197232055d39bc5bc39348a36417. I've searched some time in both their wiki and their documentation what this actually is, however without any res...

PHP UUID extension DLL file for windows

When i tried to connect to Apache Cassandra server using the php code i got an error "Fatal error: Call to undefined function uuid_make()". I can find that PHP UUID extension was missing in PHP installation. Can anyone please suggest from where i can download the DLL file for PHP installation in my Windows 7 Machine. ...

Python multiprocessing doesn't play nicely with uuid.uuid4().

I'm trying to generate a uuid for a filename, and I'm also using the multiprocessing module. Unpleasantly, all of my uuids end up exactly the same. Here is a small example: import multiprocessing import uuid def get_uuid( a ): ## Doesn't help to cycle through a bunch. #for i in xrange(10): uuid.uuid4() ## Doesn't help to...

PHP/MySQL: Storing and retrieving UUIDS

I'm trying to add UUIDs to a couple of tables, but I'm not sure what the best way to store/retrieve these would be. I understand it's far more efficient to use BINARY(16) instead of VARCHAR(36). After doing a bit of research, I also found that you can convert a UUID string to binary with: UNHEX(REPLACE(UUID(),'-','')) Pardon my ignor...

Generate UUID for transactions - keeps giving wrong input

I am creating an online enrollment form. When a user advances to page 2, I generate a 'unique' ID for that user with the following PHP command: $_SESSION['ConfirmationNo'] = rand(100000000, 999999999); however, later in the process, when a user can actually view their confirm number, they can simply 'refresh' the page once and a new c...

Is it possible to bundle a unique file for each copy of iPhone app downloaded from App Store?

Hi, I would like to verify the identity of each instance of the iPhone application that a user might use to connect to my service. To that end, I would like each instance of the iPhone app downloaded to include a certificate that I generate, or even some sort of UUID that I have generated. Does the App Store support the inclusion of uni...

GUID to ByteArray

I just wrote this code to convert a GUID into a byte array. Can anyone shoot any holes in it or suggest something better? public static byte[] getGuidAsByteArray(){ UUID uuid = UUID.randomUUID(); long longOne = uuid.getMostSignificantBits(); long longTwo = uuid.getLeastSignificantBits(); return new byte[] { (byte)(longOne ...

REST - get a random number GET or POST?

How should a random number generator properly be implemented in REST? GET RANDOM/ or.. POST RANDOM/ The server returns a different random number each time. I can see arguments for both ways. ...

MySQL PHP | "SELECT FROM table" using "alphanumeric"-UUID. Speed vs. Indexed Integer / Indexed Char

At the moment, I select rows from 'table01 and table02' using: SELECT t1.*,t2.* FROM table01 AS t1 INNER JOIN table02 AS t2 ON (t1.ID = t2.t1ID) WHERE t1.UUID = 'whatever'; The UUID column is a unique index, type: char(15), with alphanumeric input. I know this isn't the fastest way to select data from the database, but the UUID is ...

UUID collision risk using different algorithms

Hi Guys, 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 SQLServer's NEWID(), other might want...

Android Bluetooth - Can't connect out

I am developing an application which uses Bluetooth to connect to a device and send/receive data. I am doing all of my testing with a Nexus One phone. I have never been able to establish a SPP (serial port) connection from my phone to any device. However, I have been able to connect from a device (my laptop) to my phone using a Mac equi...

How to use UUIDs but remain compatible to existing DB ids?

Hi, we are currently designing an API for our product. The API offers access to a graph consisting of relations between types, such as users, posts or the like. Now, those objects are referenced by primary key id in our database, but since every object is in a different table, those ids collide without the information of the type of ob...

DRM over SD Cards safe?

I'm trying to implement a DRM based around SDCard's serial number in Windows CE. There are a few question I'm concerning. Is SDCards' serial numbers unique like the MAC address ? In Windows CE 6 (as some source codes are available, can someone make a SDCard Reader driver that reports wrong serial number. (A number that is not coming fr...

Simple random string generation function in C, please. Show me your art!

Hi folks, I'm working on a little (not so little actually) project in C (ref. this question) , and I need a little function in C that'd generate a unique and random string. I need a small one that I can include as a utility function in a .c file. Please help me with your brains, and show me how smart this could be done! Thanks and a v...

Generate UUID for Cassandra in Python

Heh, I'm using cf.insert(uuid.uuid1().bytes_le, {'column1': 'val1'}) (pycassa) to create a TimeUUID for Cassandra, but getting the error InvalidRequestException: InvalidRequestException(why='UUIDs must be exactly 16 bytes') It doesn't work with uuid.uuid1() uuid.uuid1().bytes str(uuid.uuid1()) either. What's the best way...

JAVASCRIPT - dateobj.getTime for a UID - Is the length not fixed?

Hello, I'm using the following 2 lines of JS to create a UID: var UID = dateobj.getTime(); UID = String(UID).substr(4); It appears that sometimes it generates a number like: 564929300 other times like: 56492930 Problem is the length isn't consistent which is messing things up. Any ideas how that's possible and if there is a way to ...

Example of UUID generation in c++

Hi everyone, I'm quite a newbie in c++ and I want to generate just random UUID's, as it is just important for instances in my program to have unique identifiers. I looked into Boost UUID, but I can't manage to generate the UUID because I don't understand which class and method to use. In Java it is as simple as java.util.UUID.randomUU...

How to use UUID as primary key for Hibernate Entity?

I am trying to use UUID in Hibernate. Have the following Entity base-class description (with @MappedSuperclass annotation): @Id @Column(name="id") private UUID id; public UUID getId() { return id; } For test, I am trying to read all entities of my class from database (database exists, records exist). My database is PostgreSQL 8...

Generating unique identifiers mostly like UUID but with namespace checking

Hello: I am working on the design of a database which will potentially hold millions of records. Each record will have only a few pieces of data (say, about fifteen fifty-character strings). The different records belong to the same class of object, but from a different "source"; a namespace would capture this relationship. For instance...

Connecting a WiiMote to an android device.

Does anyone know the UUID to connect an android 2.2 device to a WiiMote? The wiimote will not pair, as the wiimote does not require a PIN #. ...