Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 159 for random (0.18 sec)

  1. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapTest.java

    import java.util.Map;
    import java.util.Random;
    import java.util.Set;
    import junit.framework.TestCase;
    
    /**
     * Tests for {@link AtomicLongMap}.
     *
     * @author mike nonemacher
     */
    @GwtCompatible(emulated = true)
    public class AtomicLongMapTest extends TestCase {
      private static final int ITERATIONS = 100;
      private static final int MAX_ADDEND = 100;
    
      private final Random random = new Random(301);
    
      @J2ktIncompatible
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 17.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        long seed = new Random().nextLong();
        Random random = new Random(seed);
        insertRandomly(elements, q, random);
        return seed;
      }
    
      private static void insertRandomly(
          ArrayList<Integer> elements, MinMaxPriorityQueue<Integer> q, Random random) {
        while (!elements.isEmpty()) {
          int selectedIndex = random.nextInt(elements.size());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/cache/Striped64.java

       * class-unloading when ThreadLocals are not removed.
       */
      static final ThreadLocal<int @Nullable []> threadHashCode = new ThreadLocal<>();
    
      /** Generator of new random hash codes */
      static final Random rng = new Random();
    
      /** Number of CPUS, to place bound on table size */
      static final int NCPU = Runtime.getRuntime().availableProcessors();
    
      /** Table of cells. When non-null, size is a power of 2. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/graph/NetworkMutationTest.java

      @Test
      public void undirectedNetwork() {
        testNetworkMutation(NetworkBuilder.undirected());
      }
    
      private static void testNetworkMutation(NetworkBuilder<? super Integer, Object> networkBuilder) {
        Random gen = new Random(42); // Fixed seed so test results are deterministic.
    
        for (int trial = 0; trial < NUM_TRIALS; ++trial) {
          MutableNetwork<Integer, Object> network =
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 10 19:42:18 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  5. internal/crypto/key.go

    // (crypto/rand) is used.
    func GenerateIV(random io.Reader) (iv [32]byte) {
    	if random == nil {
    		random = rand.Reader
    	}
    	if _, err := io.ReadFull(random, iv[:]); err != nil {
    		logger.CriticalIf(context.Background(), errOutOfEntropy)
    	}
    	return iv
    }
    
    // SealedKey represents a sealed object key. It can be stored
    // at an untrusted location.
    type SealedKey struct {
    	Key       [64]byte // The encrypted and authenticated object-key.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 19 20:28:10 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  6. 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) {
    Java
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/collect/MultipleSetContainsBenchmark.java

      @BeforeExperiment
      void setUp() {
        if (emptySetProportion + singletonSetProportion > 1.01) {
          throw new SkipThisScenarioException();
        }
    
        Random rng = new Random();
        for (int i = 0; i < 0x1000; i++) {
          double setSize = rng.nextDouble();
          if (setSize < emptySetProportion) {
            sets[i] = ImmutableSet.of();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  8. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

      TF_SetFilesystemVersionMetadata(ops);
      ops->scheme = strdup(uri);
    
      ops->random_access_file_ops = static_cast<TF_RandomAccessFileOps*>(
          plugin_memory_allocate(TF_RANDOM_ACCESS_FILE_OPS_SIZE));
      ops->random_access_file_ops->cleanup = tf_random_access_file::Cleanup;
      ops->random_access_file_ops->read = tf_random_access_file::Read;
    
      ops->writable_file_ops = static_cast<TF_WritableFileOps*>(
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sun Mar 24 20:08:23 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  9. internal/auth/credentials.go

    // GenerateAccessKey returns a new access key generated randomly using
    // the given io.Reader. If random is nil, crypto/rand.Reader is used.
    // If length <= 0, the access key length is chosen automatically.
    //
    // GenerateAccessKey returns an error if length is too small for a valid
    // access key.
    func GenerateAccessKey(length int, random io.Reader) (string, error) {
    	if random == nil {
    		random = rand.Reader
    	}
    	if length <= 0 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/MinMaxPriorityQueueTest.java

        long seed = new Random().nextLong();
        Random random = new Random(seed);
        insertRandomly(elements, q, random);
        return seed;
      }
    
      private static void insertRandomly(
          ArrayList<Integer> elements, MinMaxPriorityQueue<Integer> q, Random random) {
        while (!elements.isEmpty()) {
          int selectedIndex = random.nextInt(elements.size());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 36.1K bytes
    - Viewed (0)
Back to top