Created
July 24, 2014 21:32
-
-
Save vladholubiev/b7b9862e2db534dd52b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PrintWriter pw = new PrintWriter("uids.txt", "UTF-8"); | |
| BigInteger i = new BigInteger("0"); | |
| String uidPrefix = "20"; | |
| String uid = ""; | |
| while (!uid.equals("219999999999999999999")) { | |
| i = i.add(BigInteger.valueOf(1)); | |
| uid = uidPrefix; | |
| if (String.valueOf(i).length() < 19) { | |
| for (int a = 0; a < 19 - String.valueOf(i).length(); a++) { | |
| uid += "0"; | |
| } | |
| } | |
| uid += i; | |
| if (uid.equals("209999999999999999999")) { | |
| i = BigInteger.valueOf(0); | |
| uidPrefix = "21"; | |
| } | |
| pw.println(uid); | |
| } | |
| pw.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment