guid

Is there a method to generate a standard 128bit GUID (UUID) on the Mac?

和自甴很熟 提交于 2019-11-29 21:33:47
Is there a built in function equivalent to .NET's Guid.NewGuid(); in Cocoa? My desire is to produce a string along the lines of 550e8400-e29b-41d4-a716-446655440000 which represents a unique identifier. UUIDs are handled in Core Foundation, by the CFUUID library. The function you are looking for is CFUUIDCreate . FYI for further searches: these are most commonly known as UUIDs, the term GUID isn't used very often outside of the Microsoft world. You might have more luck with that search term. Some code: For a string UUID, the following class method should do the trick: +(NSString*)UUIDString {

FreeSql (十七)联表查询

丶灬走出姿态 提交于 2019-11-29 20:37:27
FreeSql在查询数据下足了功能,链式查询语法、多表查询、表达式函数支持得非常到位。 IFreeSql fsql = new FreeSql.FreeSqlBuilder() .UseConnectionString(FreeSql.DataType.MySql, "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=cccddd;Charset=utf8;SslMode=none;Max pool size=10") .Build(); [Table(Name = "tb_topic")] class Topic { [Column(IsIdentity = true, IsPrimary = true)] public int Id { get; set; } public int Clicks { get; set; } public int TestTypeInfoGuid { get; set; } public TestTypeInfo Type { get; set; } public string Title { get; set; } public DateTime CreateTime { get; set; } } class TestTypeInfo {

How to generate short uid like “aX4j9Z” (in JS)

走远了吗. 提交于 2019-11-29 19:57:06
For my web application (in JavaScript) I want to generate short guids (for different objects - that are actually different types - strings and arrays of strings) I want something like "aX4j9Z" for my uids (guids). So these uids should be lightweight enough for web transfer and js string processing and quite unique for not a huge structure (not more than 10k elements). By saying "quite unique" I mean that after the generation of the uid I could check whether this uid does already exist in the structure and regenerate it if it does. kennytm See @Mohamed's answer for a pre-packaged solution (the

【转】Windows7硬盘安装Linux

我们两清 提交于 2019-11-29 14:45:12
此方法适用于原来电脑上安装有windows7,然后再硬盘安装Linux系统。这种情况可能也是大部分人的情况。 (其实这个方法还 适用于其他的系统安装,这个教程仅仅是抛砖引玉。) 一,安装 Windows 7 Windows 7已经在中国大陆销售,可以购买正版win 7系统安装。我这里使用的Windows 7是联想旗舰版本。安装方法不再介绍。 二,设置 启动项。 接下来进入最为关键的一个环节,修改启动项。添加 grub 启动项。 1 、下载最新版本的 Grub4DOS 下载地址: http://www.oschina.net/p/grub4dos 下载并解压缩后, 将目录中的grldr , grldr.mbr, grub.exe三个文件复制到C盘根目录下。 2 、在下载好的Linux系统iso文件中,casper 文件夹目录下,找到vmlinuz、initrd.lz解压,并复制到C盘根目录下(无需解压整个casper文件夹,整个casper文件夹很大)。 ps : Fedora需要把image文件夹全部复制到 C盘根目录下. 3 、 C 盘根目录下建立menu.lst文件,内容为: color black/cyan yellow/cyan timeout 30 default /default title Microsoft Windows 7 root (hd0,0)

Configure Hibernate to use Oracle's SYS_GUID() for Primary Key

匆匆过客 提交于 2019-11-29 13:44:35
I am looking for a way to get hibernate to use oracle's SYS_GUID() function when inserting new rows. Currently my DB tables have SYS_GUID() as the default so if hibernate simply generated SQL that omited the value it should work. I have everything working, but it is currently generating the UUID/GUID in code using the system-uuid generator: @Id @GeneratedValue(generator = "system-uuid") @GenericGenerator(name = "system-uuid", strategy = "uuid") @Column(name = "PRODUCT_ID", unique = true, nullable = false) public String getId() { return this.productId; } This is fine, but I would prefer that

How evenly spread are the first four bytes of a Guid created in .NET?

爷,独闯天下 提交于 2019-11-29 11:44:19
There is a good deal of info on GUIDs on the net and StackOverflow. Indeed endless questions about uniqueness. This is not a question about 2^128 uniqueness . My question is to determine just how random the first section , secifically the first four bytes of the GUID is in .NET . Based on research, it is supposedly the least significant 32 bits of timestamp. But how is timestamp converted? Just how random is this? Does anybody know how the first section is constructed by .NET and if is truly evenly spread in 4 bytes ? How is the timestamp used to construct the first 32 bits ? How does clock

Command line GUID for Unix and Windows?

霸气de小男生 提交于 2019-11-29 11:24:09
问题 Is there a command line tool for Unix and Windows that uses the same algorithm to create GUIDs for both platforms? 回答1: 'e2fsprogs' project maintain uuidgen utility. http://e2fsprogs.sourceforge.net/ It is already available on any Linux/BSD* distros. For Windows I recommend install Cygwin, 'e2fsprogs' package available from there! As report j4y this utility is available under MAC OS. Just run: $ uuidgen -r # random based UUID/GUID $ uuidgen -t # time based UUID/GUID 回答2: I don't know if there

Is Microsoft's GUID generator cryptographically secure

落花浮王杯 提交于 2019-11-29 10:41:31
I have searched multiple resources online, but so far have been unable to find a definitive answer to the question of whether Microsoft's GUID generation mechanism is secure enough to warrant it's use as a unique ID across an application. To clarify, by 'secure enough', I mean to ask whether the algorithm used to generate the GUID has any known weaknesses or vulnerability that could reduce the effective randomness of the GUID i.e. result in a non-negligible number of collisions . If no, does this mean the GUID is completely unguessable, and if yes, is there some way to seed the GUID generator

How do you initialise a const array of TGUID from Interface type data, in Delphi?

北城以北 提交于 2019-11-29 10:25:11
I want to initialise an array like this - Const MyArray : Array[0..0] Of TGUID = (IInterface); But it results in - [DCC Error] Test.pas(10): E2010 Incompatible types: 'TGUID' and 'string' So to see what would happen I tried this - Const MyArray : Array[0..0] Of String = (IInterface); Which results in this! [DCC Error] Test.pas(10): E2010 Incompatible types: 'string' and 'TGUID' How strange! Surely IInterface is one or the other, but it seems to stubbornly transform into the wrong type. You can pull the GUIDs from the interface declarations and declare them as (string) constants. You can then

使用ABAP代码创建新的product category

雨燕双飞 提交于 2019-11-29 09:47:19
Created by Wang, Jerry on Sep 21, 2016 CALL FUNCTION 'COM_PRODCAT_API_CREATE_CAT' EXPORTING iv_category_id = lv_category_id iv_hierarchy_guid = iv_hierarchy_guid iv_parent_guid = iv_root_cat_guid iv_product_type = lv_product_type "initial it_categoryt = lt_categoryt "initial iv_logsys = iv_logsys iv_non_assignable = off IMPORTING ev_category_guid = lv_category_guid 然后保存: CALL FUNCTION 'COM_PRODUCT_CATEGORY_SAVE_ALL' EXPORTING iv_update_task = ' ' iv_update_pme = ' ' iv_hierarchy_guid = lv_hierarchy_guid EXCEPTIONS internal_error = 1 OTHERS = 2. ```要获取更多Jerry的原创文章,请关注公众号"汪子熙": <img src="https:/