- 授权协议: GPL
- 开发语言: C/C++ PHP
- 操作系统: 跨平台
- 软件首页: https://github.com/liexusong/unid
- 软件文档: https://github.com/liexusong/unid/blob/master/README.md
软件介绍
unid是一个可以生成唯一ID的php扩展,此扩展基于 Twitter Snowflake 算法。有兴趣可以了解一下这个算法: https://github.com/twitter/snowflake
功能列表:
// 1) Get the next unique ID. string unid_next_id(void); // 2) Change unique ID to time stamp. int unid_get_time(string id); // 3) Change unique ID to worker id. array unid_get_worker_id(string id);
示例:
<?php
$id = unid_next_id();
echo $id;
$time = unid_get_time($id);
echo 'date time is: ' . date('Y-m-d H:i:s', $time);
$worker_id = unid_get_worker_id();
echo 'worker id is: ' . $worker_id;
?>$ cd ./unid $ phpize $ ./configure $ make $ sudo make install
php.ini 配置项:
[unid] unid.datacenter = int unid.twepoch = uint64
JavaScript语言精髓与编程实践
周爱民 / 电子工业出版社 / 2012-3 / 79.00元
《JavaScript语言精髓与编程实践(第2版)》详细讲述JavaScript作为一种混合式语言的各方面特性,包括过程式、面向对象、函数式和动态语言特性等,在动态函数式语言特性方面有着尤为细致的讲述。《JavaScript语言精髓与编程实践(第2版)》的主要努力之一,就是分解出这些语言原子,并重现将它们混合在一起的过程与方法。通过从复杂性到单一语言特性的还原过程,读者可了解到语言的本质,以及“层......一起来看看 《JavaScript语言精髓与编程实践》 这本书的介绍吧!
