You can go further and tell your friends to call you with the new name from the fake ID name generator for an evening or several days. Get a new random identity with Fake ID, complete with a SSN generator, and credit card generator with zip code.
I am a student at university and our task is to create a search engine. I am having difficulty generating a unique id to assign to each url when added into the frontier. I have attempted using the SHA-256 hashing algorithm as well as Guid. Here is the code that i used to implement the guid:
6 Answers
Why not just use ToString?
If you would like it to be based on a URL, you could simply do the following:
If you want to hide the URL, you could use some form of SHA1 on the sourceURL, but I'm not sure what that might achieve.
Here is a 'YouTube-video-id' like id generator e.g. 'UcBKmq2XE5a'
It creates random ids of size 11 characters. You can increase/decrease that as well, just change the parameter of Take method.
0.001% duplicates in 100 million.
If you want to use sha-256 (guid would be faster) then you would need to do something like
Of course, it doesn't have to ascii and it can be any other kind of hashing algorithm as well
![Sa Id Number Generator Sa Id Number Generator](https://i2.wp.com/riggaroo.co.za/wp-content/uploads/2014/03/Screenshot_2014-03-28-12-47-11.png?ssl=1)
Why can't we make a unique id as below.
We can use DateTime.Now.Ticks and Guid.NewGuid().ToString() to combine together and make a unique id.
As the DateTime.Now.Ticks is added, we can find out the Date and Time in seconds at which the unique id is created.
Please see the code.
We can even take the part of ticks in unique id and check for the date and time later for future reference.
This question seems to be answered, however for completeness, I would add another approach.
You can use a unique ID number generator which is based on Twitter's Snowflake id generator. C# implementation can be found here.
Note that one of very nice features of that approach is possibility to have multiple generators on independent nodes (probably something useful for a search engine) generating real time, globally unique identifiers.