Sa Id Number Generator
While both of those mods are great, I thought I would offer up a third alternative. I took heavy inspiration from TheCrazyScotsman's water improvement mod on CivFanatics and Napstablook's Fish Farms mod here on Steam. Coastal cities typically have less food and production than inland cities, making it difficult for them to grow. Civ 6 coastal cities. This mod alters the Harbor district and its buildings to improve water tiles and make coastal cities better.
South African ID number. The first six digits (YYMMDD) are based on your date of birth – 23 January 1988 is 880123. The next four digits (SSSS) are used to define your gender – females are assigned numbers in the range 0000-4999 and males from 5000-9999. The next digit (C) shows if you are an SA citizen – 0 – or a permanent resident – 1. Employer Identification Number validator. IMEI number generator Get International Mobile Station Equipment Identity (IMEI) number for testing! Model, and serial number of the device.The generator will gives you IMEI numbers for testing only. Here is an IMEI validator to validate the result. If you have any questions.
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:
Mat6 Answers
Washington Id Number Generator
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
daz-fullerdaz-fullerWhy 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.
TomTomNot the answer you're looking for? Browse other questions tagged c#asp.net.netuniqueidentifier or ask your own question.
[South African Specific]
SAIDValidator Webservice
SAIDValidator is an ASP.NET webservice to validate South African Person ID numbers. It provides validation of a person ID by calculating the check-digit (digit-13), and extracts the date-of-birth, gender, citizenship, sequence and other information. The following links are available:
- SAIDValidator Test Page : Input an ID number and see if it is valid!
- SAIDValidator Webservice
South African Department of Home Affairs
If you would like to check your SA Passport or ID application status, or your current official marital status, please click on the link below:
How to validate SA Identity Numbers
Here's my interpretation and short code-excerpt for validating 'digit-13', the so-called 'check' digit:
Format:
{YYMMDD}{G}{SSS}{C}{A}{Z}
YYMMDD : Date of birth.
G : Gender. 0-4 Female; 5-9 Male.
SSS : Sequence No. for DOB/G combination.
C : Citizenship. 0 SA; 1 Other.
A : Usually 8, or 9 [can be other values]
Z : Control digit calculated in the following section:
Formula to calculate the check digit for a 13 digit identity number:
According to the provisions of the Identification Amendment Act, 2000 (Act No. 28 of 2000,
which was promulgated on 13 October 2000) all forms of identity documents other than the
green bar-coded identity document are invalid. [my observation: the following algorithm appears to work for the older 'blue'-book id numbers as well]. In accordance with the legislation,
the control figure which is the 13th digit of all identity numbers which have 08 and 09 is
calculated as follows using ID Number 800101 5009 087 as an example:
- Add all the digits in the odd positions (excluding last digit).
8 + 0 + 0 + 5 + 0 + 0 = 13..........[1] - Move the even positions into a field and multiply the number by 2.
011098 x 2 = 22196 - Add the digits of the result in b).
2 + 2 + 1 + 9 + 6 = 20.............[2] - Add the answer in [2] to the answer in [1].
13 + 20 = 33 - Subtract the second digit (i.e. 3) from 10. The number must tally with the last number in the ID Number. If the result is 2 digits, the last digit is used to compare against the last number in the ID Number. If the answer differs, the ID number is invalid.
Here's the digit-13 check C# code
[Check below for a validator using a working version of this code]:
Comments are closed.