- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 199 for random (0.17 sec)
-
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) -
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) -
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) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt
private val serverWriter = WebSocketWriter( isClient = false, sink = data, random = random, perMessageDeflate = false, noContextTakeover = false, minimumDeflateSize = 0L, ) private val clientWriter = WebSocketWriter( isClient = true, sink = data, random = random, perMessageDeflate = false, noContextTakeover = false, minimumDeflateSize = 0L,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 9.3K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
guava-tests/test/com/google/common/hash/BloomFilterTest.java
private static final int NUM_PUTS = 100_000; private static final ThreadLocal<Random> random = new ThreadLocal<Random>() { @Override protected Random initialValue() { return new Random(); } }; private static final int GOLDEN_PRESENT_KEY = random.get().nextInt(); @AndroidIncompatible // OutOfMemoryError
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Nov 09 22:49:56 GMT 2023 - 21.3K bytes - Viewed (0) -
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) {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Fri Feb 02 00:13:57 GMT 2024 - 6.8K bytes - Viewed (0)