guid

Passing a NULL value to a GUID

♀尐吖头ヾ 提交于 2019-12-11 08:18:17
问题 I am a total beginner at VB.NET so you may need to bear with me but I need to edit this code behind so that a null value is passed to my database for the 'imageurl' field. The front end is a web form where a user can enter details of a book, with the option of uploading a book cover. I want to change my code so that if the file upload dialog does not fulfil hasFile, the GUID string generated in the database will be a NULL value (this is so I can have a 'no image available' image using the

Swashbuckle Swagger generate an actual guid

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 06:47:12
问题 I am using Swashbuckle to generate Swagger in my .Net Core WebAPI project. As you can see below, it generates a GUID of type string. I would like to generate a random Guid and replace "string" with "" or an empty guid "00000000-0000-0000-0000-000000000000". This would allow my example to actually work when I post it. { "payload": [ { "GUID": "string", "status": "string" } ] } while I am at it, would it be possible to the same with any string so that JSON is different each time? 回答1: Decorate

How to DELETE a row with a GUID Value in SQLite

99封情书 提交于 2019-12-11 05:56:27
问题 I have a column in SQLite of GUID type, I have tried a query like this, and it returns no error, but the row is not deleted DELETE FROM MyTable WHERE Id='4ffbd580-b17d-4731-b162-ede8d698e026'; In SQLite Browser the Id values look like binary values, they have strange characters. I also have tried this, but still does not work DELETE FROM MyTable WHERE Id='{4ffbd580-b17d-4731-b162-ede8d698e026}'; 回答1: Try this command. Id is a probably a binary blob field DELETE FROM MyTable WHERE Id= X

How unique and random are javascript generated uuids?

大城市里の小女人 提交于 2019-12-11 05:49:27
问题 I'm considering generating unique identifiers for data in javascript using one of the uuid methods discussed here. Most likely something along the lines of this one since it uses window.crypto if it's available. These id's don't need to be globally unique, only unique per user. Will this generate sufficiently unique ids for a large scale application? Is there any reason to think this will result in id collisions? Can javascript generate a sufficiently random uuid for this to work? It looks

Wix component GUID “*” is not valid for this component

孤人 提交于 2019-12-11 05:39:38
问题 I'm trying to solve my issue with autogerating GUID for multiple components in same folder installed under AppData (per-user installation) . Before edit I had one component with 3 files. Then I've decided to use auto GUID for this component, so I have divided it into 3 component (each with one file). I thought that now I can use Component GUID with * and registry value with KeyPath=yes but it's not working. Any advice is very appreciated. Here is code snippet: <Directory Id='INSTALLDIR' Name=

Problem with UUID and GUID

蓝咒 提交于 2019-12-11 05:01:29
问题 Please don't mark this as duplicate. I have gone through all posts on this topic but couldn't solve my problem. I have an application in J2ME that searches for bluetooth services with a particular UUID: UUID[] uuidSet = { new UID("100000",true) }; int[] attrSet = {0x0100, 0x0003, 0x0004}; int transID = agent.searchServices(attrSet,uuidSet,remoteDevice,this); I have a desktop application in VB.NET using 32feet.NET library that creates a new bluetooth service with a particular GUID. Sub

What does “clock sequence” mean?

与世无争的帅哥 提交于 2019-12-11 04:30:59
问题 RFC 4122 ( A Universally Unique IDentifier (UUID) URN Namespace ) uses the term "clock sequence": 4.1.5. Clock Sequence For UUID version 1, the clock sequence is used to help avoid duplicates that could arise when the clock is set backwards in time or if the node ID changes. If the clock is set backwards, or might have been set backwards (e.g., while the system was powered off), and the UUID generator can not be sure that no UUIDs were generated with timestamps larger than the value to which

Unique serial number in a java web application

旧时模样 提交于 2019-12-11 03:48:50
问题 I've been wondering what's the correct practice for generating unique ids? The thing is in my web app I'll have a plugin system, when a user registers a plugin I want to generate a unique serial ID for it. I've been thinking about storing all numbers in a DB or a file on the server, generating a random number and checking whether it already exists in the DB/file, but that doesn't seem that good. Are there other ways to do it? Would using the UUID be the preferred way to go? 回答1: If the ids

ASP.NET MVC 2 HiddenField is empty?

天大地大妈咪最大 提交于 2019-12-11 03:32:52
问题 Hi, I have a ViewClass that contains a CI property (Guid), to keep track of this CI property I have added a hidden value for it like this : <%: Html.HiddenFor(model => model.CI)%> This does however render an empty hidden field, i have also tried : <%: Html.Hidden("CI", Model.CI)%> But with the same result. When just typing : <%: Model.CI %> The Guid is printed for example like this : 5f7a1f53-9f90-4b77-aad4-64e835662efc So why is this not working? Edit1 : This workes fine, but I do not see

Creating different GUID for same lowercase and upper case strings

。_饼干妹妹 提交于 2019-12-11 03:15:20
问题 When I try to create GUIDs like this Guid guid1 = Guid.Parse("aaaaaaaa-bbbb-cccc-eeee-ffffffffffff"); Guid guid2 = Guid.Parse("AAAAAAAA-BBBB-CCCC-EEEE-FFFFFFFFFFFF"); Both are creating same GUID object. Is it possible to create unique GUIDs for lower case and upper case version of same string? Any ideas are welcome. 回答1: GUIDs are actually bytes parsed from hexadecimal. That is not possible. You should not use GUIDs to store arbitrary data. 回答2: Your strings are hexadecimal representations of