- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 717 for srand (0.09 sec)
-
src/testing/quick/quick.go
Values func([]reflect.Value, *rand.Rand) } var defaultConfig Config // getRand returns the *rand.Rand to use for a given Config. func (c *Config) getRand() *rand.Rand { if c.Rand == nil { return rand.New(rand.NewSource(time.Now().UnixNano())) } return c.Rand } // getMaxCount returns the maximum number of iterations to run for a given // Config.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 17:55:47 UTC 2023 - 10.1K bytes - Viewed (0) -
platforms/jvm/code-quality/src/integTest/groovy/org/gradle/api/plugins/quality/checkstyle/CheckstylePluginMultiProjectTest.groovy
settingsFile << "include 'child:grand'" file('child/grand/build.gradle') << javaProjectUsingCheckstyle() file('child/grand/src/main/java/Dummy.java') << javaClassWithNewLineAtEnd() file('config/checkstyle/checkstyle.xml') << simpleCheckStyleConfig() expect: succeeds(':child:grand:checkstyleMain') checkStyleReportFile(file('child/grand')).assertExists() }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Mar 25 13:39:06 UTC 2024 - 6.1K bytes - Viewed (0) -
api/go1.22.txt
pkg math/rand/v2, method (*Rand) Int32() int32 #61716 pkg math/rand/v2, method (*Rand) Int32N(int32) int32 #61716 pkg math/rand/v2, method (*Rand) Int64() int64 #61716 pkg math/rand/v2, method (*Rand) Int64N(int64) int64 #61716 pkg math/rand/v2, method (*Rand) IntN(int) int #61716 pkg math/rand/v2, method (*Rand) NormFloat64() float64 #61716 pkg math/rand/v2, method (*Rand) Perm(int) []int #61716
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 20:54:27 UTC 2024 - 7.7K bytes - Viewed (0) -
src/math/big/alias_test.go
package big_test import ( cryptorand "crypto/rand" "math/big" "math/rand" "reflect" "testing" "testing/quick" ) func equal(z, x *big.Int) bool { return z.Cmp(x) == 0 } type bigInt struct { *big.Int } func generatePositiveInt(rand *rand.Rand, size int) *big.Int { n := big.NewInt(1) n.Lsh(n, uint(rand.Intn(size*8))) n.Rand(rand, n) return n }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 19 15:49:05 UTC 2022 - 8.8K bytes - Viewed (0) -
src/crypto/rand/util_test.go
// license that can be found in the LICENSE file. package rand_test import ( "bytes" "crypto/rand" "fmt" "io" "math/big" mathrand "math/rand" "testing" "time" ) // https://golang.org/issue/6849. func TestPrimeSmall(t *testing.T) { for n := 2; n < 10; n++ { p, err := rand.Prime(rand.Reader, n) if err != nil { t.Fatalf("Can't generate %d-bit prime: %v", n, err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 05 01:35:39 UTC 2022 - 3.5K bytes - Viewed (0) -
src/internal/fuzz/mutators_byteslice.go
return nil } src := m.rand(len(b)) dst := m.rand(len(b)) for dst == src { dst = m.rand(len(b)) } b[src], b[dst] = b[dst], b[src] return b } // byteSliceArithmeticUint8 adds/subtracts from a random byte in b. func byteSliceArithmeticUint8(m *mutator, b []byte) []byte { if len(b) == 0 { return nil } pos := m.rand(len(b)) v := byte(m.rand(35) + 1) if m.r.bool() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 19 18:23:43 UTC 2021 - 7.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/filters/goaway.go
limitations under the License. */ package filters import ( "math/rand" "net/http" "sync" ) // GoawayDecider decides if server should send a GOAWAY type GoawayDecider interface { Goaway(r *http.Request) bool } var ( // randPool used to get a rand.Rand and generate a random number thread-safely, // which improve the performance of using rand.Rand with a locker randPool = &sync.Pool{ New: func() interface{} {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Jun 28 20:27:28 UTC 2020 - 2.4K bytes - Viewed (0) -
src/math/rand/v2/example_test.go
} func ExamplePerm() { for _, value := range rand.Perm(3) { fmt.Println(value) } // Unordered output: 1 // 2 // 0 } func ExampleN() { // Print an int64 in the half-open interval [0, 100). fmt.Println(rand.N(int64(100))) // Sleep for a random duration between 0 and 100 milliseconds. time.Sleep(rand.N(100 * time.Millisecond)) } func ExampleShuffle() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 30 17:09:26 UTC 2023 - 4.4K bytes - Viewed (0) -
platforms/ide/ide/src/test/groovy/org/gradle/plugins/ide/internal/tooling/BuildInvocationsBuilderTest.groovy
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Sep 26 14:49:12 UTC 2023 - 5.5K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa_test.go
case elliptic.P224().Params(): _, _, err := randomPoint(p224(), rand) return err case elliptic.P256().Params(): _, _, err := randomPoint(p256(), rand) return err case elliptic.P384().Params(): _, _, err := randomPoint(p384(), rand) return err case elliptic.P521().Params(): _, _, err := randomPoint(p521(), rand) return err default: panic("unknown curve") } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:33:58 UTC 2024 - 13.5K bytes - Viewed (0)