Introduction to Guid ( globally unique identifier )
什么是 GUID?
- 全球唯一标识符 (GUID) 是一个字母数字标识符,用于指示产品的唯一性安装。
- 在许多流行软件应用程序(例如 Web 浏览器和媒体播放器)中,都使用 GUID。
- GUID 的格式为“xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”,其中每个 x 是 0-9 或 a-f 范围内的一个十六进制的数字。
- 例如:6F9619FF-8B86-D011-B42D-00C04FC964FF 即为有效的 GUID 值。
- 为什么要用GUID?
- 世界上的任何两台计算机都不会生成重复的 GUID 值。
- GUID 主要用于在拥有多个节点、多台计算机的网络或系统中,分配必须具有唯一性的标识符。
- 在 Windows 平台上,GUID 应用非常广泛:注册表、类及接口标识、数据库、甚至自动生成的机器名、目录名等。
例子:
string str = System.Guid.NewGuid().ToString("N") + "|"
+ System.Guid.NewGuid().ToString("D") + "|"
+ System.Guid.NewGuid().ToString("B") + "|"
+ System.Guid.NewGuid().ToString("P"); Response.Write(str);
返回的结果:
- ece4f4a60b764339b94a07c84e338a27|
- 5bf99df1-dc49-4023-a34a-7bd80a42d6bb|
- {2280f8d7-fd18-4c72-a9ab-405de3fcfbc9}|
- (25e6e09f-fb66-4cab-b4cd-bfb429566549)
说明符
- 返回值的格式
- N 32 位: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- D 由连字符分隔的 32 位数字: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- B 括在大括号中、由连字符分隔的 32 位数字: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
- P 括在圆括号中、由连字符分隔的 32 位数字: (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
Introduction to Guid ( globally unique identifier )的更多相关文章
- GUID(Globally Unique Identifier)全局唯一标识符
最近有大量数据存入数据库时,因为主键为一个nvarchar类型,起初想着用int 类型,每次打开表的时候,获取最后一行的ID,然后让其++. 但发现由于字段是char类型,数据库对其进行了排序.再次插 ...
- 全局唯一标识符(GUID,Globally Unique Identifier)
全局唯一标识符(GUID,Globally Unique Identifier)是一种由算法生成的二进制长度为128位的数字标识符.GUID主要用于在拥有多个节点.多台计算机的网络或系统中.在理想情况 ...
- A Universally Unique IDentifier (UUID) URN Namespace
w Network Working Group P. Leach Request for Comments: 4122 Microsoft Category: Standards Track M. M ...
- Atitit 深入了解UUID含义是通用唯一识别码 (Universally Unique Identifier),
Atitit 深入了解UUID含义是通用唯一识别码 (Universally Unique Identifier), UUID1 作用1 组成1 全球唯一标识符(GUID)2 UUID 编辑 UUID ...
- java生成UUID通用唯一识别码 (Universally Unique Identifier)
转自:http://blog.csdn.net/carefree31441/article/details/3998553 UUID含义是通用唯一识别码 (Universally Unique Ide ...
- (转)java生成UUID通用唯一识别码 (Universally Unique Identifier)
(原文链接:http://blog.csdn.net/carefree31441/article/details/3998553) UUID含义是通用唯一识别码 (Universally Uniq ...
- java生成UUID通用唯一识别码 (Universally Unique Identifier) 分类: B1_JAVA 2014-08-22 16:09 331人阅读 评论(0) 收藏
转自:http://blog.csdn.net/carefree31441/article/details/3998553 UUID含义是通用唯一识别码 (Universally Unique Ide ...
- android unique identifier
android get device mac address programmatically http://android-developers.blogspot.jp/2011/03/identi ...
- Choosing a fast unique identifier (UUID) for Lucene——有时间再看下
Most search applications using Apache Lucene assign a unique id, or primary key, to each indexed doc ...
随机推荐
- 注册UBER(优步)司机常见问题,如何注册uber(优步)司机
如何注册uber(优步)司机,怎么注册UBER(优步)司机 此链接为优步内部人员推荐,优先审核,基本当天就能收到短信,注意上传证件照清晰点. https://uber.avosapps.com/ref ...
- poj 2228 Naptime dp
这个题目的状态还是比较好想的,dp[i][j]表示已经睡了i个时段,最后睡在j时段的最优值,但是需要处理环的情况,我的做法是算两次,第一次不处理环,第二次强制性要求第一个时段需要睡,然后查看dp[m] ...
- 【c语言】推断一个数是不是2的n次方
// 推断一个数是不是2的n次方 #include <stdio.h> void judge_n(int a) { int b = a - 1; if ((a & b) == 0) ...
- GDB调试之core文件(如何定位到Segment fault)
core dump又叫核心转储,当程序运行过程中发生异常,程序异常退出时,由操作系统把程序当前的内存状况存储在一个core文件中,叫core dump.(内部实现是:linux系统中内存越界会收到SI ...
- URAL 1297 Palindrome 后缀数组
D - Palindrome Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Subm ...
- Matlab中的取整-floor,ceil,fix,round
FLOOR Round towards minus infinity. FLOOR(X) rounds the elements of X to the nearest integers toward ...
- 【Web】十步教你搭建完整免费的个人网站(花生壳+XAMPP+WordPress)
1.从花生壳官网(http://www.oray.com/peanuthull/download.php)下载最新版本的客户端. 下载完成后安装,注册护照(需手机验证码验证),注册完成后获取免费域名并 ...
- 表单验证插件 jquery.validata 使用方法
参考资料:http://www.runoob.com/jquery/jquery-plugin-validate.html 下载地址 jquery.validate插件的文档地址http://docs ...
- 浅谈JDBC(二)
JDBC中的事务 简单来说,事务就是要保证一组DAO方法的操作,要么一起成功要么一起失败. 1.事务控制的位置 在Service中的业务方法内进行事务控制. 2.事务控制的代码 a.注意:JDBC会自 ...
- Integer Inquiry(大数相加)
Description One of the first users of BIT's new supercomputer was Chip Diller. He extended his explo ...