What do you want to save?
Add Code snippet
New code examples
-
C# 2022-01-23 06:41:06
how to generate random letters in C#
private static Random random = new Random(); public static string RandomString(int length) { const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; return new string(Enumerable.Repeat(chars, length) .Select(s => s[random.N... Add solution -
Java 2021-11-11 02:26:18
how to create an array with unique values
import java.util.Random; public class GenRandArray { //Recommend reseeding within methods static Random rand = new Random(); public static void fillInt( int[] fillArray ) { //seeds the random for a new random each method call ... Add solution -
C# 2021-11-01 23:57:14
how to generate random unique id in c#
public Random a = new Random(); // replace from new Random(DateTime.Now.Ticks.GetHashCode()); // Since similar code is done in default constructor internally public List<int> randomList = new List<int>(); int My... Add solution -
Java 2021-10-23 23:24:07
java generate secure random password
public class PasswordUtils { static char[] SYMBOLS = "^$*.[]{}()?-\"!@#%&/\\,><':;|_~`".toCharArray(); static char[] LOWERCASE = "abcdefghijklmnopqrstuvwxyz".toCharArray(); static char[] UPPERCASE = "AB... Add solution -
Go 2021-10-02 00:23:02
select a random number between 1 and 5 in golang
package main import ( "fmt" "math/rand" "time" #ADDED ) func main() { // Seed should be set once, better spot is func init() rand.Seed(time.Now().UTC().UnixNano()) #ADDED fmt.Println(randInt(1, 1... Add solution
Best helpers
A. Pettit
+5
Moo-Juice
+5
Jeff Ava
+5
Pharma
+5
Seige
+5
Parallax
+5
PixelZerg
+5
Akiman Barwa
+5
Andrew Lowe
+5
JohnDoe
+5
Meaning
+5
Mahnaz
+5
Silver Rain
+5
Tralston
+5
Rahul Ramesh
+5
Jcjr
+5
Thruston
+5
Alec Cook
+5
Catimann
+5
PeterBocan
+5