Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 523 for randPod (0.15 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers_test.go

    func randIP(s *string, r *rand.Rand) {
    	*s = fmt.Sprintf("10.20.%d.%d", r.Int31n(256), r.Int31n(256))
    }
    
    // randPod changes fields in pod to mimic another pod from the same replicaset.
    // The list fields here has been generated by picking two pods in the same replicaset
    // and checking diff of their jsons.
    func randPod(b *testing.B, pod *v1.Pod, r *rand.Rand) {
    	pod.Name = fmt.Sprintf("%s-%x", pod.GenerateName, r.Int63n(1000))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. src/math/rand/v2/rand.go

    type Source interface {
    	Uint64() uint64
    }
    
    // A Rand is a source of random numbers.
    type Rand struct {
    	src Source
    }
    
    // New returns a new Rand that uses random values from src
    // to generate other random values.
    func New(src Source) *Rand {
    	return &Rand{src: src}
    }
    
    // Int64 returns a non-negative pseudo-random 63-bit integer as an int64.
    func (r *Rand) Int64() int64 { return int64(r.src.Uint64() &^ (1 << 63)) }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 02:25:49 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  3. operator/pkg/object/testdata/well-formed-with-comments.yaml

    # some random comments
     # some random comments
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: myconfigmap
      namespace: default # some random comments should be deleted
    data:
      mydata: |-
        First line of data # some random comments should not be deleted
        Second line of data
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jul 25 19:39:36 UTC 2023
    - 304 bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/helper/AccessTokenHelper.java

    public class AccessTokenHelper {
    
        protected static final String BEARER = "Bearer";
    
        protected Random random = new SecureRandom();
    
        public String generateAccessToken() {
            return RandomStringUtils.random(ComponentUtil.getFessConfig().getApiAccessTokenLengthAsInteger(), 0, 0, true, true, null, random);
        }
    
        public String getAccessTokenFromRequest(final HttpServletRequest request) {
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  5. src/math/rand/rand.go

    	}
    
    	r.src.Seed(seed)
    	r.readPos = 0
    }
    
    // Int63 returns a non-negative pseudo-random 63-bit integer as an int64.
    func (r *Rand) Int63() int64 { return r.src.Int63() }
    
    // Uint32 returns a pseudo-random 32-bit value as a uint32.
    func (r *Rand) Uint32() uint32 { return uint32(r.Int63() >> 31) }
    
    // Uint64 returns a pseudo-random 64-bit value as a uint64.
    func (r *Rand) Uint64() uint64 {
    	if r.s64 != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:09:08 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  6. internal/crypto/key_test.go

    	}
    }
    
    var generateKeyTests = []struct {
    	ExtKey     [32]byte
    	Random     io.Reader
    	ShouldPass bool
    }{
    	{ExtKey: [32]byte{}, Random: nil, ShouldPass: true},              // 0
    	{ExtKey: [32]byte{}, Random: rand.Reader, ShouldPass: true},      // 1
    	{ExtKey: [32]byte{}, Random: shortRandom(32), ShouldPass: true},  // 2
    	{ExtKey: [32]byte{}, Random: shortRandom(31), ShouldPass: false}, // 3
    }
    
    func TestGenerateKey(t *testing.T) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Feb 02 00:13:57 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  7. platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/excludes/simple/DefaultCompositeExcludeTest.groovy

        private static final Long SEED = Long.getLong("org.gradle.internal.test.excludes.seed", 58745094L)
        private static final int MAX_DEPTH = 3
        private static final int MAX_CACHED = 10_000
    
        private final Random random = new Random(SEED)
        private final Set<ExcludeSpec> cached = new HashSet<>()
        private final List<ExcludeSpec> cachedLinear = new ArrayList<>(MAX_CACHED)
        private int depth
    
        /**
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

        sink.assertBytes(new byte[] {1, 2, 0, 0}); // padded with zeros
      }
    
      public void testString() {
        Random random = new Random();
        for (int i = 0; i < 100; i++) {
          byte[] bytes = new byte[64];
          random.nextBytes(bytes);
          String s = new String(bytes, UTF_16LE); // so all random strings are valid
          assertEquals(
              new Sink(4).putUnencodedChars(s).hash(),
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  9. src/crypto/rsa/pkcs1v15.go

    	return valid, em, index, nil
    }
    
    // nonZeroRandomBytes fills the given slice with non-zero random octets.
    func nonZeroRandomBytes(s []byte, random io.Reader) (err error) {
    	_, err = io.ReadFull(random, s)
    	if err != nil {
    		return
    	}
    
    	for i := 0; i < len(s); i++ {
    		for s[i] == 0 {
    			_, err = io.ReadFull(random, s[i:i+1])
    			if err != nil {
    				return
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:21 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  10. platforms/core-runtime/base-services/src/jmh/java/org/gradle/internal/reflect/CachedConstructorsBenchmark.java

    import java.util.LinkedList;
    import java.util.Random;
    
    @Fork(4)
    @Threads(2)
    @Warmup(iterations = 10)
    @State(Scope.Benchmark)
    public class CachedConstructorsBenchmark {
    
        private final static Class<?>[] CLAZZ_ARRAY = new Class<?>[]{ArrayList.class, LinkedList.class, String.class, HashMap.class};
        private final static int ARR_LEN = 1024;
        private final static Random RANDOM = new Random();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 1.9K bytes
    - Viewed (0)
Back to top