English 中文(简体)
• 如何在沙捞中产生长类的UIDD(由java方案消费)?
原标题:How to generate a UUID of type long (to be consumed by a java program) in Python?

• 如何利用沙捞法生成长度(64比拉方案消费)的UIDD?

我读到UUID模块。 因此,我做了以下工作:

>>> import uuid
>>> uuid.uuid1().int
315596929882403038588122750660996915734L

为什么在1.uuid(1.int)制造的ger化结束时有一个“<>L>/strong>。 如果它有愤怒的话,它就应该由纯数组成?

另外,根据文件汇编(uuid.1)。 固定会产生128倍的ger。 我需要一种长类的分类(java方案),这意味着它需要64个轨道。 是否可能产生64个轨道而不是128个轨道的统一评价?

另一个问题是,根据未限定精度 “未限定精度的含义是什么? 我需要64个远线——什么是灰色?

EDIT: Thanks for everyone s replies. Looks like UUID s are by definition 128 bits. In that case I probably shouldn t be using the term UUID. What I want to do is to generate a unique ID that is of type long (64 bits). I thought UUID would do the job, but it looks like it can t.

我需要将ID作为Solr搜索引擎的文件。 I m, using a realtime indexing Solr plugin Zoie。 根据这些文件,“Zoie”的每个记录都必须有unique keylong

因此,鉴于我需要什么,你是否知道我能做些什么来产生独特的类型识别?

谢谢!

最佳回答
问题回答

<代码>L表示其具有长期惯性价值(大于32比方)。

标准统一调查总有128个轨道;如果你只想出64个轨道的东西,那么你要么只使用统一调查的分部分,要么使用统一调查以外的东西。

UUID的存量定义是128个参照点。

我说,64个轨道不足以保证非同步的独特性。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...