- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 42 for nextInt (0.17 sec)
-
guava-tests/test/com/google/common/base/Utf8Test.java
Random rnd = new Random(); for (int trial = 0; trial < 100; trial++) { sb.setLength(0); int utf8Length = 0; for (int i = 0; i < 6; i++) { Integer randomCodePoint = codePoints[rnd.nextInt(codePoints.length)]; sb.appendCodePoint(randomCodePoint); utf8Length += utf8Lengths.get(randomCodePoint); if (utf8Length != Utf8.encodedLength(sb)) { StringBuilder repro = new StringBuilder();
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Fri Feb 09 15:49:48 GMT 2024 - 12.7K bytes - Viewed (0) -
guava/src/com/google/common/cache/Striped64.java
*/ final void retryUpdate(long x, @CheckForNull int[] hc, boolean wasUncontended) { int h; if (hc == null) { threadHashCode.set(hc = new int[1]); // Initialize randomly int r = rng.nextInt(); // Avoid zero to allow xorShift rehash h = hc[0] = (r == 0) ? 1 : r; } else h = hc[0]; boolean collide = false; // True if last slot nonempty for (; ; ) { Cell[] as; Cell a;
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 11.5K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/Striped64.java
*/ final void retryUpdate(long x, @CheckForNull int[] hc, boolean wasUncontended) { int h; if (hc == null) { threadHashCode.set(hc = new int[1]); // Initialize randomly int r = rng.nextInt(); // Avoid zero to allow xorShift rehash h = hc[0] = (r == 0) ? 1 : r; } else h = hc[0]; boolean collide = false; // True if last slot nonempty for (; ; ) { Cell[] as; Cell a;
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 11.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/Utf8Test.java
Random rnd = new Random(); for (int trial = 0; trial < 100; trial++) { sb.setLength(0); int utf8Length = 0; for (int i = 0; i < 6; i++) { Integer randomCodePoint = codePoints[rnd.nextInt(codePoints.length)]; sb.appendCodePoint(randomCodePoint); utf8Length += utf8Lengths.get(randomCodePoint); if (utf8Length != Utf8.encodedLength(sb)) { StringBuilder repro = new StringBuilder();
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Fri Feb 09 15:49:48 GMT 2024 - 12.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt
return state.policy.backoffDelayMillis.jitterBy(state.policy.backoffJitterMillis) * 1_000_000 } } private fun Long.jitterBy(amount: Int): Long { return this + ThreadLocalRandom.current().nextInt(amount * -1, amount) } class AddressState( val address: Address, val queue: TaskQueue, var policy: ConnectionPool.AddressPolicy, ) { /**
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 16.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/IntMathTest.java
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 24.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 24.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/primitives/ShortsTest.java
Random r = new Random(5); byte[] b = new byte[Shorts.BYTES]; // total overkill, but, it takes 0.1 sec so why not... for (int i = 0; i < 10000; i++) { short num = (short) r.nextInt(); assertThat(Shorts.fromByteArray(Shorts.toByteArray(num))).isEqualTo(num); r.nextBytes(b); assertThat(Shorts.toByteArray(Shorts.fromByteArray(b))).isEqualTo(b); } }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 29 15:43:06 GMT 2024 - 26.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/ShortsTest.java
Random r = new Random(5); byte[] b = new byte[Shorts.BYTES]; // total overkill, but, it takes 0.1 sec so why not... for (int i = 0; i < 10000; i++) { short num = (short) r.nextInt(); assertThat(Shorts.fromByteArray(Shorts.toByteArray(num))).isEqualTo(num); r.nextBytes(b); assertThat(Shorts.toByteArray(Shorts.fromByteArray(b))).isEqualTo(b); } }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 29 15:43:06 GMT 2024 - 26.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/IntsTest.java
Random r = new Random(5); byte[] b = new byte[Ints.BYTES]; // total overkill, but, it takes 0.1 sec so why not... for (int i = 0; i < 10000; i++) { int num = r.nextInt(); assertThat(Ints.fromByteArray(Ints.toByteArray(num))).isEqualTo(num); r.nextBytes(b); assertThat(Ints.toByteArray(Ints.fromByteArray(b))).isEqualTo(b); } }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 06 16:10:08 GMT 2024 - 28.4K bytes - Viewed (0)