Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,011 for replace (0.23 sec)

  1. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

          """
          |--simple boundary
          |
          |abcd
          |--simple boundary
          |
          |efgh
          |--simple boundary--
          """.trimMargin()
            .replace("\n", "\r\n")
            .replace(Regex("(?m)abcd\r\n"), "abcd\n")
    
        val parts =
          MultipartReader(
            boundary = "simple boundary",
            source = Buffer().writeUtf8(multipart),
          )
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapReplaceTester.java

      public void testReplace_supportedPresent() {
        assertEquals(v0(), getMap().replace(k0(), v3()));
        expectReplacement(entry(k0(), v3()));
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      @CollectionSize.Require(absent = ZERO)
      public void testReplace_supportedPresentNoChange() {
        assertEquals(v0(), getMap().replace(k0(), v0()));
        expectUnchanged();
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/escape/Escapers.java

        /**
         * Adds a replacement string for the given input character. The specified character will be
         * replaced by the given string whenever it occurs in the input, irrespective of whether it lies
         * inside or outside the 'safe' range.
         *
         * @param c the character to be replaced
         * @param replacement the string to replace the given character
         * @return the builder instance
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.5K bytes
    - Viewed (0)
  4. tests/multi_primary_keys_test.go

    		t.Fatalf("Preload many2many relations")
    	}
    
    	// Replace
    	tag5 := &Tag{Locale: "ZH", Value: "tag5"}
    	tag6 := &Tag{Locale: "ZH", Value: "tag6"}
    	DB.Model(&blog).Association("Tags").Replace(tag5, tag6)
    	var tags2 []Tag
    	DB.Model(&blog).Association("Tags").Find(&tags2)
    	if !compareTags(tags2, []string{"tag5", "tag6"}) {
    		t.Fatalf("Should find 2 tags after Replace")
    	}
    
    	if DB.Model(&blog).Association("Tags").Count() != 2 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 12.8K bytes
    - Viewed (0)
  5. tests/named_polymorphic_test.go

    	}
    
    	if DB.Model(&hamster2).Association("OtherToy").Count() != 1 {
    		t.Errorf("Hamster's toys count should be 1 after Append")
    	}
    
    	// Replace
    	DB.Model(&hamster).Association("PreferredToy").Replace(&Toy{
    		Name: "bike 3",
    	})
    
    	DB.Model(&hamster).Association("OtherToy").Replace(&Toy{
    		Name: "treadmill 3",
    	})
    
    	hamsterToy = Toy{}
    	DB.Model(&hamster).Association("PreferredToy").Find(&hamsterToy)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Jul 08 09:59:40 GMT 2020
    - 4.2K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/collect/testing/testers/ConcurrentMapReplaceEntryTester.java

      public void testReplaceEntry_supportedPresent() {
        assertTrue(getMap().replace(k0(), v0(), v3()));
        expectReplacement(entry(k0(), v3()));
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
      @CollectionSize.Require(absent = ZERO)
      public void testReplaceEntry_supportedPresentUnchanged() {
        assertTrue(getMap().replace(k0(), v0(), v0()));
        expectUnchanged();
      }
    
      @MapFeature.Require(SUPPORTS_PUT)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/collect/ForwardingConcurrentMapTest.java

        assertEquals(Integer.valueOf(1), map.replace("foo", 2));
        assertNull(map.replace("bar", 3));
        assertEquals(Integer.valueOf(2), map.get("foo"));
        assertFalse(map.containsKey("bar"));
      }
    
      public void testReplaceConditional() {
        TestMap map = new TestMap();
        map.put("foo", 1);
        assertFalse(map.replace("foo", 2, 3));
        assertFalse(map.replace("bar", 1, 2));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/ForwardingConcurrentMapTest.java

        assertEquals(Integer.valueOf(1), map.replace("foo", 2));
        assertNull(map.replace("bar", 3));
        assertEquals(Integer.valueOf(2), map.get("foo"));
        assertFalse(map.containsKey("bar"));
      }
    
      public void testReplaceConditional() {
        TestMap map = new TestMap();
        map.put("foo", 1);
        assertFalse(map.replace("foo", 2, 3));
        assertFalse(map.replace("bar", 1, 2));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.4K bytes
    - Viewed (0)
  9. samples/guide/src/test/kotlin/okhttp3/AllMainsTest.kt

        val mainFiles = mainFiles()
        return mainFiles.map {
          val suffix = it.path.replace("${prefix}samples/guide/src/main/java/", "")
          suffix.replace("(.*)\\.java".toRegex()) { mr ->
            mr.groupValues[1].replace('/', '.')
          }.replace("(.*)\\.kt".toRegex()) { mr ->
            mr.groupValues[1].replace('/', '.') + "Kt"
          }
        }.sorted()
      }
    }
    
    @Disabled("Don't run by default")
    @Tag("Slow")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  10. tests/associations_belongs_to_test.go

    	AssertAssociationCount(t, user2, "Manager", 1, "AfterAppend")
    
    	// Replace
    	company2 := Company{Name: "company-belongs-to-replace"}
    	manager2 := GetUser("manager-belongs-to-replace", Config{})
    
    	if err := DB.Model(&user2).Association("Company").Replace(&company2); err != nil {
    		t.Fatalf("Error happened when replace Company, got %v", err)
    	}
    
    	if company2.ID == 0 {
    		t.Fatalf("Company's ID should be created")
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 9.3K bytes
    - Viewed (0)
Back to top