1.Java development generate UUID or GUID method
// 36-bit, with dash // 32-bit, remove the middle dash Java.util.UUID.randomUUID (). toString (). ReplaceAll ("-", "" ");
2.Javascript development generate UUID or GUID method
/*parameter Middle_line true: with an underscore false without an underscore*/function NewGuid (middle_line) {var length= 32; var result= ""; for(var i = 1; I <= length; i++) {var n= Math.floor (Math.random () * 16.0); if(N < 10) {result+=N; } Else if(n = = 10) {result+ = "a"; } Else if(n = = 11) {result+ = "B"; } Else if(n = = 12) {result+ = "C"; } Else if(n = = 13) {result+ = "D"; } Else if(n = = 14) {result+ = "E"; } Else if(n = = 15) {result+ = "F"; } if(Middle_line && (i = = 8) | | (i = = 12) | | (i = = 16) | | (i = = 20)) {result+= "-"; } } returnresult; };
View Code
3.Oracle development generate UUID or GUID method
Select from
java,javascript,oracle development generate UUID or GUID method summary