Consider the following unit test:
[TestMethod]
public void TestByteToString()
{
var guid = new Guid("61772f3ae5de5f4a8577eb1003c5c054");
var guidString = guid.ToString("n");
var byteString = ToHexString(guid.ToByteArray());
Assert.AreEqual(guidString, byteString);
}
private String To...
Here's a simplified example.
UserDetails (UserID INT UserGUID UNIQUEIDENTIFIER Name VARCHAR(50) Age INT)
UserRatings (UserID INT Rating INT Date DATETIME)
UserVotes (UserID INT Votes INT Date DATETIME)
The UserGUID only exists in the main table.
In the application layer only GUID's are parsed around, never INTS. This is to prevent ...
Hey guys, as seen in this post, GUIDs are not supported by the FilterDescriptorts FilterOperator. Has anyone encountered this problem? Is there a workaround? Because, well it pretty much sucks (no filtering by foreign keys and so on... which is quite common).
...
I would like to use the GUID in the Assembly Information of my Microsoft Visual C# 2008 Express Edition project for use in a Mutex that is used to verify that only one instance of the application is running. How can the GUID be accessed? I only need to use it in the Program.Main(...) function. Thanks.
...
I have a table that i use for current semesters (currentSemester) with an id that is an identity. I have a table I archive to called pastSemester with an id that is an identity and a legacyID column that carries the key to currentSemester when I archive.
The problem is that I have to report on both current and past records simultaneousl...
What is the purpose of GUIDs in COM?
Is it only to avoid name conflicts?
...
Hi Guys,
Here's my method:
public void SomeQuery(string email = "", Guid userId = Guid.Empty)
{
// do some query
}
userId is giving me an error as it must be a compile-time constant, which i understand. But even when i declare a const:
private const emptyGuid = Guid.Empty;
then change the method signature to:
public void SomeQ...
I'm building an Android application that needs to communicate with a MySQL database. The application isn't meant to be published, and I want the application to be the only thing allowed to interface with the web service I'll create for DB access.
I've been thinking how I can secure the system, and this is the idea I've come up with. I'd...
I'm currently developing an ASP.NET MVC application with a ton of PK-FK relationships in the database. In the beginning of development, the team I WAS working with voted against my recommendation to use INTs for all PKs... they decided to use GUIDs.
Long story long... the team has split ways, and now I have control to change things... ...
How do I convert guid to string in javascript. I am getting guid from the querystring, and m not able to process it as is. I have tried the following ways to do it but it doesnt seem to work.
var guid = {<%=Request.QueryString["Guid"]%>}.toString();
var guid = <%=Request.QueryString["Guid"]%>.toString();
var guid = (string)<%=Request.Qu...
I've been looking at the code in this tutorial, and I found that it uses My.Computer.Name to save settings that shouldn't roam between computers. It's entirely possible, however, for a user to have two identically named PCs. If they wanted to have the same username on each PC, for example, they may very well end up with two PCs named Use...
I have inherited a LinqToSql application which is making use of GUID keys for objects.
I'd rather use conventional identity fields - much easier for people to use, understand and communicate. However there is some business logic that requires the application to identify unique objects before they're persisted to the DB which is why GUID...
I'm trying to understand how sequential guid performs better than a regular guid.
Is it because with regular guid, the index use the last byte of the guid to sort? Since it's random it will cause alot of fragmentation and page splits since it will often move data to another page to insert new data?
Sequential guid sine it is sequentia...
I have an abstract base class that many classes extend. I'd like all these classes to define a unique value for a specific property that is originally defined in the base class (similar to the serialVersionUID property that causes a warning when not defined in classes that inherit from Serializable).
Is there a way for me, within my ab...
I read an answer about guid and it was fairly interesting. It seems that GUID is based on time and v1 uses a MAC address with v4 using a RNG.
From the wiki
Cryptanalysis of the WinAPI GUID
generator shows that, since the
sequence of V4 GUIDs is pseudo-random;
given full knowledge of the internal
state, it is possible to pre...
Is there any way to get the UID of a Blackberry device using Javascript requests?
...
I have installed some MSI with GUID (0733556C-37E8-4123-A801-D3E6C5151617).
The program registered in the registry:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall \ ()
Value
UninstallString = MsiExec.exe / I (0733556C-37E8-4123-A801-D3E6C5151617)
My question is: how utility MsiExec.exe knows the name ...
I am writing an asp.net MVC app that drives an IPhone application.
I want the Iphone to send me its UUID looks like this:
2b6f0cc904d137be2e1730235f5664094b831186
On the server I want to generate a Guid:
466853EB-157D-4795-B4D4-32658D85A0E0
On both the Iphone and the Server I need a simple aglorithm to combine these 2 values ...
Question: When you have a .NET GUID for inserting in a database, it's structure is like this:
60 bits of timestamp,
48 bits of computer identifier,
14 bits of uniquifier, and
6 bits are fixed,
----
128 bits total
Now I have problem with a GUID, because it's a 128 bit number, and some of the DBs I'm using only support 64 bit numbers...
I'm attempting to create an order number for customers to use. I will have multiple machines that do not have access to the same database (so can't use primary keys and generate a unique ID).
I will have a unique string that I could use for a seed for some algorithm that will generate a unique looking alphanumeric ID # for the order ...