avatar
第二代iPad# Stock
b*5
1
twitter streaming api, status json里的ID 是
64 bit long。 我现在要换成cassandra里的 uuid, 怎么convert?
avatar
v*e
2
几月出来?
avatar
w*z
3
why do you want to do that?
UUID is an auto generated ID, mostly based on time
http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/utils
/UUIDs.html
If the ID from twitter is unique and random, use that as partition key

【在 b**********5 的大作中提到】
: twitter streaming api, status json里的ID 是
: 64 bit long。 我现在要换成cassandra里的 uuid, 怎么convert?

avatar
C*i
4
谣言说二月 Iphone5 可能在五月
avatar
b*5
5
yes, i know. but i still want to convert that twitter ID to a uuid.
actually, there are various version of uuid, time based, name based, random.
twitter gives u the time based unique ID, the first 53 bits or so defines
the time lapsed. But let's say we have a cassandra schema table whose
primary key is uuid (or timeuuid). how can I convert the twitter ID to that
cassandra uuid?

【在 w**z 的大作中提到】
: why do you want to do that?
: UUID is an auto generated ID, mostly based on time
: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/utils
: /UUIDs.html
: If the ID from twitter is unique and random, use that as partition key

avatar
v*e
6
好,吃素,攒钱。

【在 C*******i 的大作中提到】
: 谣言说二月 Iphone5 可能在五月
avatar
w*z
7
convert long to byte array, then construct UUID from the byte array?
From Java Source code:
/**
* Static factory to retrieve a type 3 (name based) [email protected]/* */ UUID} based
on
* the specified byte array.
*
* @param name
* A byte array to be used to construct a [email protected]/* */ UUID}
*
* @return A [email protected]/* */ UUID} generated from the specified array
*/
public static UUID nameUUIDFromBytes(byte[] name) {
MessageDigest md;
try {
md = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException nsae) {
throw new InternalError("MD5 not supported", nsae);
}
byte[] md5Bytes = md.digest(name);
md5Bytes[6] &= 0x0f; /* clear version */
md5Bytes[6] |= 0x30; /* set to version 3 */
md5Bytes[8] &= 0x3f; /* clear variant */
md5Bytes[8] |= 0x80; /* set to IETF variant */
return new UUID(md5Bytes);
}

random.
defines
that

【在 b**********5 的大作中提到】
: yes, i know. but i still want to convert that twitter ID to a uuid.
: actually, there are various version of uuid, time based, name based, random.
: twitter gives u the time based unique ID, the first 53 bits or so defines
: the time lapsed. But let's say we have a cassandra schema table whose
: primary key is uuid (or timeuuid). how can I convert the twitter ID to that
: cassandra uuid?

avatar
C*i
8
同攒

【在 v****e 的大作中提到】
: 好,吃素,攒钱。
avatar
b*e
9
好像是6月

【在 v****e 的大作中提到】
: 几月出来?
avatar
k*n
10
那一代的要不要扔?
avatar
i*e
11
好, 不吃, 攒钱

【在 v****e 的大作中提到】
: 好,吃素,攒钱。
avatar
v*e
12
回国转悠的时候扔给随便哪个陪游就好了

【在 k********n 的大作中提到】
: 那一代的要不要扔?
avatar
b*e
13
只给陪油太贵了吧?

【在 v****e 的大作中提到】
: 回国转悠的时候扔给随便哪个陪游就好了
avatar
C*i
14
这么晚?
本来传言圣诞节要出的

【在 b*******e 的大作中提到】
: 好像是6月
avatar
b*e
15
现在都是谣言,但是我的是从APPL一个朋友那里流出来的。
呵呵,无所谓了,AAPL是指标股,会有表现的。

【在 C*******i 的大作中提到】
: 这么晚?
: 本来传言圣诞节要出的

avatar
v*e
16
古人有诗云:人生若只如初见。说的就是和陪游小MM那种萍水相逢,两情相悦,转眼又
天各一方,留下无尽浪漫遐思的境界。跟这种因为浅尝辄止而分外隽永的美丽相比,一
个iPad又算得了什么。

【在 b*******e 的大作中提到】
: 只给陪油太贵了吧?
avatar
b*e
17
我记得上次dreamer版有个哥们就是回国一个月,在上海high了一个三陪,结果还发生
感情了。 这样的估计一个iPad还好了。 呵呵

【在 v****e 的大作中提到】
: 古人有诗云:人生若只如初见。说的就是和陪游小MM那种萍水相逢,两情相悦,转眼又
: 天各一方,留下无尽浪漫遐思的境界。跟这种因为浅尝辄止而分外隽永的美丽相比,一
: 个iPad又算得了什么。

avatar
v*e
18
上海的性价比太低了。这种一定得去重庆之类的地方找好,然后往西双版纳、西藏这种
野地方带。

【在 b*******e 的大作中提到】
: 我记得上次dreamer版有个哥们就是回国一个月,在上海high了一个三陪,结果还发生
: 感情了。 这样的估计一个iPad还好了。 呵呵

avatar
b*e
19
等有空的时候兄弟你展开说说 Orz hehe

【在 v****e 的大作中提到】
: 上海的性价比太低了。这种一定得去重庆之类的地方找好,然后往西双版纳、西藏这种
: 野地方带。

avatar
k*n
20
完少,北美猥琐男大多重口味,
你这种素炒豌豆苗估计不解恨
avatar
s*r
21
MM对你日夜思念,在ipad上放一张你的黑白照片,放在床头。

【在 v****e 的大作中提到】
: 古人有诗云:人生若只如初见。说的就是和陪游小MM那种萍水相逢,两情相悦,转眼又
: 天各一方,留下无尽浪漫遐思的境界。跟这种因为浅尝辄止而分外隽永的美丽相比,一
: 个iPad又算得了什么。

avatar
l*o
22
准备买个二代ipad给女儿玩耍。唯一就怕她斗鸡眼。
avatar
w*k
23
近视更容易一些。

【在 l**********o 的大作中提到】
: 准备买个二代ipad给女儿玩耍。唯一就怕她斗鸡眼。
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。