Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 285 for Random (0.21 sec)

  1. tests/submodel_test.go

    func (m *Man) BeforeUpdate(tx *gorm.DB) (err error) {
    	if !tx.Statement.Changed("age") {
    		return nil
    	}
    	return nil
    }
    
    func TestSubModel(t *testing.T) {
    	man := Man{Age: 18, Name: "random-name"}
    	if err := DB.Create(&man).Error; err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    
    	if err := DB.Model(&man).Where("id = ?", man.ID).Updates(struct {
    		Age int
    	}{Age: 20}).Error; err != nil {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Aug 20 04:51:17 UTC 2025
    - 944 bytes
    - Viewed (0)
  2. docs/smb3-features/03-multi-channel-design.md

            }
            
            // Weighted random selection
            int random = ThreadLocalRandom.current().nextInt(totalWeight);
            int currentWeight = 0;
            
            for (ChannelInfo channel : channels) {
                currentWeight += channel.getScore();
                if (random < currentWeight) {
                    return channel;
                }
            }
            
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 02:53:50 UTC 2025
    - 39.6K bytes
    - Viewed (0)
  3. src/main/java/jcifs/smb1/smb1/TestLocking.java

                    synchronized (this) {
                        ltime = System.currentTimeMillis();
                        wait();
                    }
    
                    try {
                        final double r = Math.random();
                        if (r < 0.333) {
                            f.exists();
                            //                      System.out.print('e');
                        } else if (r < 0.667) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  4. .teamcity/src/main/kotlin/configurations/FunctionalTest.kt

            failureConditions {
                // JavaExecDebugIntegrationTest.debug session fails without debugger might cause JVM crash
                // Some soak tests produce OOM exceptions
                // There are also random worker crashes for some tests.
                // We have test-retry to handle the crash in tests
                javaCrash = false
            }
        })
    
    private fun determineFlakyTestStrategy(stage: Stage): String {
    Registered: Wed Sep 10 11:36:15 UTC 2025
    - Last Modified: Wed Feb 12 09:12:03 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketHttpTest.kt

      private val handshakeCertificates = platform.localhostHandshakeCertificates()
      private val clientListener = WebSocketRecorder("client")
      private val serverListener = WebSocketRecorder("server")
      private val random = Random(0)
      private var client =
        clientTestRule
          .newClientBuilder()
          .writeTimeout(Duration.ofMillis(500))
          .readTimeout(Duration.ofMillis(500))
          .addInterceptor(
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 35.5K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/smb2/multichannel/LoadBalancingStrategy.java

         * Round-robin selection through available channels
         */
        ROUND_ROBIN,
    
        /**
         * Select the least busy channel based on pending operations
         */
        LEAST_LOADED,
    
        /**
         * Weighted random selection based on channel scores
         */
        WEIGHTED_RANDOM,
    
        /**
         * Affinity-based selection for related operations
         */
        AFFINITY_BASED,
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 11:13:46 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/MonitorTestCase.java

     * limitations under the License.
     */
    
    package com.google.common.util.concurrent;
    
    import com.google.common.testing.NullPointerTester;
    import com.google.common.testing.TearDownStack;
    import java.util.Random;
    import junit.framework.TestCase;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Tests for {@link Monitor}, either interruptible or uninterruptible.
     *
     * @author Justin T. Sampson
     */
    @NullUnmarked
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 8K bytes
    - Viewed (0)
  8. 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 Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 22.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/base/Utf8Test.java

        utf8Lengths.put(MIN_SUPPLEMENTARY_CODE_POINT, 4);
        utf8Lengths.put(MAX_CODE_POINT, 4);
    
        Integer[] codePoints = utf8Lengths.keySet().toArray(new Integer[] {});
        StringBuilder sb = new StringBuilder();
        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)];
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBenchmark.java

        queue = (BlockingQueue<String>) constructor.newInstance(capacity);
    
        strings = new String[capacity];
        for (int i = 0; i < capacity; i++) {
          strings[i] = String.valueOf(Math.random());
        }
      }
    
      @Benchmark
      void addsAndRemoves(int reps) {
        int capacity = this.capacity;
        BlockingQueue<String> queue = this.queue;
        String[] strings = this.strings;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 2.1K bytes
    - Viewed (0)
Back to top