- Sort Score
- Result 10 results
- Languages All
Results 151 - 160 of 334 for randomOp (0.13 sec)
-
docs/features/events.md
The `EventListener.Factory` also makes it possible to limit metrics to a subset of calls. This one captures metrics on a random 10%: ```java class MetricsEventListener extends EventListener { private static final Factory FACTORY = new Factory() { @Override public EventListener create(Call call) { if (Math.random() < 0.10) { return new MetricsEventListener(call); } else { return EventListener.NONE;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 7.7K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java
ArbitraryInstances.get(Stopwatch.class).start(); assertNotNull(ArbitraryInstances.get(Ticker.class)); assertFreshInstanceReturned(Random.class); assertEquals( ArbitraryInstances.get(Random.class).nextInt(), ArbitraryInstances.get(Random.class).nextInt()); } public void testGet_concurrent() { assertTrue(ArbitraryInstances.get(BlockingDeque.class).isEmpty());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 21.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
// Check the first 100,000 integers for (int i = 0; i < 100000; i++) { assertEquals(LongMath.isPrime(i), IntMath.isPrime(i)); } // Then check 1000 deterministic pseudo-random int values. Random rand = new Random(1); for (int i = 0; i < 1000; i++) { int n = rand.nextInt(Integer.MAX_VALUE); assertEquals(LongMath.isPrime(n), IntMath.isPrime(n)); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 23.1K bytes - Viewed (0) -
docs/sts/web-identity.py
app = Flask(__name__) @app.route('/') def homepage(): text = '<a href="%s">Authenticate with keycloak</a>' return text % make_authorization_url() def make_authorization_url(): # Generate a random string for the state parameter # Save it for use later to prevent xsrf attacks state = str(uuid4()) params = {"client_id": client_id, "response_type": "code", "state": state,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 28 01:37:51 UTC 2021 - 2.9K bytes - Viewed (0) -
src/main/java/jcifs/SmbRandomAccess.java
*/ package jcifs; import java.io.DataInput; import java.io.DataOutput; import jcifs.smb.SmbException; /** * File access that exposes random access semantics * * @author mbechler * */ public interface SmbRandomAccess extends DataOutput, DataInput, AutoCloseable { /** * Close the file * * @throws SmbException
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 2.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache2/FileOperator.kt
/** * Read and write a target file. Unlike Okio's built-in `Okio.source(java.io.File file)` and `Okio.sink(java.io.File file)` * this class offers: * * * **Read/write:** read and write using the same operator. * * **Random access:** access any position within the file. * * **Shared channels:** read and write a file channel that's shared between * multiple operators. Note that although the underlying [FileChannel] may be shared,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.4K bytes - Viewed (0) -
src/test/java/jcifs/tests/FileAttributesTest.java
if ( ( getContext().getConfig().getCapabilities() & SmbConstants.CAP_NT_SMBS ) == 0 ) { // only have second precision // there seems to be some random factor (adding one second) int diff = Math.abs((int) ( ( time / 1000 ) - ( f.lastModified() / 1000 ) )); Assert.assertTrue("Have set time correctly", diff < 2); }
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Thu Jan 05 13:09:03 UTC 2023 - 12.3K bytes - Viewed (0) -
cmd/erasure-heal_test.go
if err != nil { t.Fatalf("Test %d: failed to create ErasureStorage: %v", i, err) } data := make([]byte, test.size) if _, err = io.ReadFull(rand.Reader, data); err != nil { t.Fatalf("Test %d: failed to create random test data: %v", i, err) } buffer := make([]byte, test.blocksize, 2*test.blocksize) writers := make([]io.Writer, len(disks)) for i, disk := range disks {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.9K bytes - Viewed (0) -
src/main/java/jcifs/smb1/smb1/TestLocking.java
synchronized (this) { ltime = System.currentTimeMillis(); wait(); } try { double r = Math.random(); if (r < 0.333) { f.exists(); // System.out.print('e'); } else if (r < 0.667) { d.listFiles();
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Fri Mar 22 21:10:40 UTC 2019 - 3.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/CharMatcherTest.java
assertTrue(len4.matches('b')); assertTrue(len4.matches('c')); assertTrue(len4.matches('d')); for (char c = 'e'; c < 'z'; c++) { assertFalse(len4.matches(c)); } Random rand = new Random(1234); for (int testCase = 0; testCase < 100; testCase++) { char[] chars = randomChars(rand, rand.nextInt(63) + 1); CharMatcher m = SmallCharMatcher.from(bitSet(chars), new String(chars));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 21 18:32:41 UTC 2024 - 30.1K bytes - Viewed (0)