uuid

How to get uuid or mac address from client in Java?

时间秒杀一切 提交于 2019-11-30 07:31:53
I'm looking for a solution for a Java based webapplication to uniquely identify the client. The server is in the same network as the clients and I thought that using the MAC address would be a good solution. The problem is I can't work with cookies because they can be deleted client-side and I can't use the IP because they could just issue a new DHCP lease renewal. So I would like to fallback to the MAC address of the clients. I'm aware that there is no java built in feature to get the MAC address. Is there a library that can handle the output of every OS? (primary Windows and Mac) since my

PHP/MySQL: Storing and retrieving UUIDS

时光毁灭记忆、已成空白 提交于 2019-11-30 07:25:10
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 ignorance, but is there an easy way to this with PHP and then turn it back to a string, when needed, for readability? Also, would it make much difference if I used this as a primary key instead of auto_increment? EDIT: Found part of the answer: $bin = pack("h*", str

How to solve uuid in jasper report

廉价感情. 提交于 2019-11-30 05:45:01
问题 I have some jasper report files, which I make them in iReport 3.7.5 version. It worked before, but after i decided to use iReport 5.0.0 version and made some changes into it, then it had a problem. I checked what the problem was and it said this Attribute 'uuid' is not allowed to appear in element 'jasperReport' It made me confused because there're many attributes of uuid on my report files. I guess it was built while the old version transformed to a new ones. I tried to delete all of uuid

How to generate UUID in angular 6

那年仲夏 提交于 2019-11-30 05:15:03
问题 I will try to add some packages related to UUID, i.e, https://www.npmjs.com/package/uuid-generator-ts and https://www.npmjs.com/package/@types/uuid. But I am getting an error, if i install these packages, tell me how generate UUID in angular 6. 回答1: Nothing to do with Angular itself, you can get uuid from one of the popular npm package such as this: https://www.npmjs.com/package/uuid The code looks like this: import * as uuid from 'uuid'; const myId = uuid.v4(); 回答2: I know that this might

16 bytes binary form of canonical uuid representation in php

邮差的信 提交于 2019-11-30 05:03:01
问题 how can I get 16 bytes binary form of the uuid from its string/canonical representation: ex: 1968ec4a-2a73-11df-9aca-00012e27a270 cheers, /Marcin 回答1: $bin = pack("h*", str_replace('-', '', $guid)); pack 回答2: If you read accurately the chapter about the format and string representation of a UUID as defined by DCE then you can't naively treat the UUID string as a hex string, see String Representation of UUIDs (which is referenced from the Microsoft Developer Network). I.e. because the first

PostgreSQL GIN index on array of uuid

这一生的挚爱 提交于 2019-11-30 04:56:23
I would like to use a GIN index on uuid[] (to have efficient membership tests for arrays of uuids). However when I try it PostgreSQL gives me an error: mydb=> CREATE TABLE foo (val uuid[]); CREATE TABLE mydb=> CREATE INDEX foo_idx ON foo USING GIN(val); ERROR: data type uuid[] has no default operator class for access method "gin" HINT: You must specify an operator class for the index or define a default operator class for the data type. How can I add the necessary operator class so that it works? Note that this is a similar question for the type citext but the provided answer doesn't work.

Store UUID v4 in MySQL

淺唱寂寞╮ 提交于 2019-11-30 04:50:46
I'm generating UUIDs using PHP, per the function found here Now I want to store that in a MySQL database. What is the best/most efficient MySQL field format for storing UUID v4? I currently have varchar(256), but I'm pretty sure that's much larger than necessary. I've found lots of almost-answers, but they're generally ambiguous about what form of UUID they're referring to, so I'm asking for the specific format. Store it as VARCHAR(36) if you're looking to have an exact fit, or VARCHAR(255) which is going to work out with the same storage cost anyway. There's no reason to fuss over bytes here.

Android Bluetooth - Can't connect out

强颜欢笑 提交于 2019-11-30 04:05:01
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 equivalent of PuTTY (The only exception to this is the "Bluetooth File Transfer" app from the Marketplace seems to work, but I don't think that uses RFCOM/SPP...). I keep seeing this message in my LogCat logs: ERROR/BluetoothService.cpp(78): stopDiscoveryNative: D

What are the project GUIDs in a Visual Studio solution file used for?

纵饮孤独 提交于 2019-11-30 02:39:39
I have multiple projects in a single Visual Studio (2008) solution. I just discovered that each of these projects uses a same GUID, so in the solution file it looks like this: Project("{FAE04EC0-F103-D311-BF4B-00C04FCBFE97}") = "Pro1", "Pro1\Pro1.csproj", "{...}" Project("{FAE04EC0-F103-D311-BF4B-00C04FCBFE97}") = "Pro2", "Pro2\Pro2.csproj", "{...}" Do I have to change these GUIDs so they're unique and what are they used for? Project persistence block in a solution file has the following format: Project("{project type GUID}") = "<Project name>", "<project file location>", "{<Unique project

PostgreSQL UUID type performance

瘦欲@ 提交于 2019-11-30 01:40:33
问题 I'm not trying to restart the UUID vs serial integer key debate. I know there are valid points to either side. I'm using UUID's as the primary key in several of my tables. Column type: "uuidKey" text NOT NULL Index: CREATE UNIQUE INDEX grand_pkey ON grand USING btree ("uuidKey") Primary Key Constraint: ADD CONSTRAINT grand_pkey PRIMARY KEY ("uuidKey"); Here is my first question; with PostgreSQL 9.4 is there any performance benefit to setting the column type to UUID? The documentation http:/