- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 115 for shuffled (0.17 sec)
-
src/math/rand/example_test.go
words := strings.Fields("ink runs from the corners of my mouth") rand.Shuffle(len(words), func(i, j int) { words[i], words[j] = words[j], words[i] }) fmt.Println(words) } func ExampleShuffle_slicesInUnison() { numbers := []byte("12345") letters := []byte("ABCDE") // Shuffle numbers, swapping corresponding entries in letters at the same time. rand.Shuffle(len(numbers), func(i, j int) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 16:24:57 UTC 2022 - 4.2K bytes - Viewed (0) -
src/math/rand/rand_test.go
if !bytes.Equal(b1, b2) { t.Errorf("mismatch after re-seed:\n%x\n%x", b1, b2) } } func TestShuffleSmall(t *testing.T) { // Check that Shuffle allows n=0 and n=1, but that swap is never called for them. r := New(NewSource(1)) for n := 0; n <= 1; n++ { r.Shuffle(n, func(i, j int) { t.Fatalf("swap called, n=%d i=%d j=%d", n, i, j) }) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 16.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/CollectionBenchmarkSampleData.java
Collections.shuffle(tmp, random); queryList.addAll(tmp.subList(0, extras)); } // now add bad queries while (queryList.size() < numQueries) { Element candidate = newElement(); if (!elementsInSet.contains(candidate)) { queryList.add(candidate); } } Collections.shuffle(queryList, random); return queryList.toArray(new Element[0]);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 17 15:49:06 UTC 2023 - 4.2K bytes - Viewed (0) -
src/internal/fuzz/mutators_byteslice.go
return nil } dst := m.rand(len(b)) n := m.chooseLen(len(b) - dst) rb := byte(m.rand(256)) for i := dst; i < dst+n; i++ { b[i] = rb } return b } // byteSliceShuffleBytes shuffles a chunk of bytes in b. func byteSliceShuffleBytes(m *mutator, b []byte) []byte { if len(b) <= 1 { return nil } dst := m.rand(len(b)) n := m.chooseLen(len(b) - dst) if n <= 2 { return nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 19 18:23:43 UTC 2021 - 7.7K bytes - Viewed (0) -
src/math/rand/v2/rand_test.go
p := make([]int, n) // re-usable slice for Shuffle generator tests := [...]struct { name string fn func() int }{ {name: "Int32N", fn: func() int { return int(r.Int32N(int32(nfact))) }}, {name: "Perm", fn: func() int { return encodePerm(r.Perm(n)) }}, {name: "Shuffle", fn: func() int { // Generate permutation using Shuffle. for i := range p { p[i] = i }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 17.4K bytes - Viewed (0) -
platforms/software/security/src/main/java/org/gradle/security/internal/PublicKeyDownloadService.java
Collections.shuffle(servers); tryDownloadKeyFromServer(toLongIdHexString(keyId), servers, builder, keyring -> findMatchingKey(keyId, keyring, builder)); } @Override public void findByFingerprint(byte[] fingerprint, PublicKeyResultBuilder builder) { List<URI> servers = new ArrayList<>(keyServers); Collections.shuffle(servers);
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 12 08:49:35 UTC 2024 - 6.9K bytes - Viewed (0) -
src/cmd/go/internal/test/flagdefs.go
"mutexprofile": true, "mutexprofilefraction": true, "outputdir": true, "parallel": true, "run": true, "short": true, "shuffle": true, "skip": true, "timeout": true, "trace": true, "v": true, } var passAnalyzersToVet = map[string]bool{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 01:02:40 UTC 2024 - 2.2K bytes - Viewed (0) -
maven-model-builder/src/test/java/org/apache/maven/model/building/GraphTest.java
Registered: Wed Jun 12 09:55:16 UTC 2024 - Last Modified: Mon Jan 15 16:49:26 UTC 2024 - 2.1K bytes - Viewed (0) -
src/crypto/sha1/sha1block_amd64.s
MIX(a, b, c, d, e, 0x5A827999) #define ROUND1x(a, b, c, d, e, index) \ SHUFFLE(index); \ FUNC1(a, b, c, d, e); \ MIX(a, b, c, d, e, 0x5A827999) #define ROUND2(a, b, c, d, e, index) \ SHUFFLE(index); \ FUNC2(a, b, c, d, e); \ MIX(a, b, c, d, e, 0x6ED9EBA1) #define ROUND3(a, b, c, d, e, index) \ SHUFFLE(index); \ FUNC3(a, b, c, d, e); \ MIX(a, b, c, d, e, 0x8F1BBCDC)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:29:44 UTC 2024 - 31.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/interface.go
// StartRequest begins the process of handling a request. If the // request gets queued and the number of queues is greater than 1 // then StartRequest uses the given hashValue as the source of // entropy as it shuffle-shards the request into a queue. The // descr1 and descr2 values play no role in the logic but appear // in log messages. This method always returns quickly (without // waiting for the request to be dequeued). If this method
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Sep 26 12:55:23 UTC 2023 - 6.4K bytes - Viewed (0)