- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for Intn (0.03 sec)
-
src/bufio/bufio_test.go
} // While not recommended, it is valid to append to a shifted buffer. // This forces Write to copy the input. if rn.Intn(8) == 0 && cap(b) > 0 { b = b[1:1:cap(b)] } // Append a random integer of varying width. n := int64(rn.Intn(1 << rn.Intn(30))) want = append(strconv.AppendInt(want, n, 10), ' ') b = append(strconv.AppendInt(b, n, 10), ' ') w.Write(b) } w.Flush()
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
src/bytes/bytes_test.go
} } } var makeFieldsInput = func() []byte { x := make([]byte, 1<<20) // Input is ~10% space, ~10% 2-byte UTF-8, rest ASCII non-space. for i := range x { switch rand.Intn(10) { case 0: x[i] = ' ' case 1: if i > 0 && x[i-1] == 'x' { copy(x[i-1:], "χ") break } fallthrough default: x[i] = 'x' } } return x
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Aug 19 19:09:04 UTC 2024 - 61.2K bytes - Viewed (0) -
cmd/test-utils_test.go
// fetches a random number between range min-max. func getRandomRange(min, max int, seed int64) int { // special value -1 means no explicit seeding. if seed != -1 { rand.Seed(seed) } return rand.Intn(max-min) + min } // Randomizes the order of bytes in the byte array // using Knuth Fisher-Yates shuffle algorithm. func randomizeBytes(s []byte, seed int64) []byte {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 77K bytes - Viewed (0) -
cmd/object-api-multipart_test.go
t.Fatalf("%s : %s", instanceType, err.Error()) } z := obj.(*erasureServerPools) er := z.serverPools[0].sets[0] erasureDisks := er.getDisks() ridx := rand.Intn(len(erasureDisks)) z.serverPools[0].erasureDisksMu.Lock() er.getDisks = func() []StorageAPI { erasureDisks[ridx] = newNaughtyDisk(erasureDisks[ridx], nil, errFaultyDisk) return erasureDisks }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 09:42:21 UTC 2024 - 88.8K bytes - Viewed (0)