Serials on NFC Tags – truly unique? cloneable?

Are serial numbers of NFC tags truely unique? That depends on the tag product and what you consider truely unique. E.g.: ISO 14443 Type A tags with 4 byte serial numbers: There certainly exist duplicates (mainly because there is no clear scheme to divide the available range of serial numbers among the various manufacturers) and … Read more

NSFileManager unique file names

Create your own file name: CFUUIDRef uuid = CFUUIDCreate(NULL); CFStringRef uuidString = CFUUIDCreateString(NULL, uuid); CFRelease(uuid); NSString *uniqueFileName = [NSString stringWithFormat:@”%@%@”, prefixString, (NSString *)uuidString]; CFRelease(uuidString); A simpler alternative proposed by @darrinm in the comments: NSString *prefixString = @”MyFilename”; NSString *guid = [[NSProcessInfo processInfo] globallyUniqueString] ; NSString *uniqueFileName = [NSString stringWithFormat:@”%@_%@”, prefixString, guid]; NSLog(@”uniqueFileName: ‘%@'”, uniqueFileName); NSLog … Read more

Android Unique Serial Number

Taking into consideration that my application targets Android 4.0 (API 14) and above, is the android.os.Build.SERIAL number for the android devices unique for each device ? According to this useful article in the Android Developers blog, android.os.Build.SERIAL should be unique if it is available. From the article: Devices without telephony are required to report a … Read more

How to generate unique 64 bits integers from Python?

just mask the 128bit int >>> import uuid >>> uuid.uuid4().int & (1<<64)-1 9518405196747027403L >>> uuid.uuid4().int & (1<<64)-1 12558137269921983654L These are more or less random, so you have a tiny chance of a collision Perhaps the first 64 bits of uuid1 is safer to use >>> uuid.uuid1().int>>64 9392468011745350111L >>> uuid.uuid1().int>>64 9407757923520418271L >>> uuid.uuid1().int>>64 9418928317413528031L These are … Read more

Short unique id in php

Make a small function that returns random letters for a given length: <?php function generate_random_letters($length) { $random = ”; for ($i = 0; $i < $length; $i++) { $random .= chr(rand(ord(‘a’), ord(‘z’))); } return $random; } Then you’ll want to call that until it’s unique, in pseudo-code depending on where you’d store that information: do … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)