Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 1,497 for first (0.25 sec)

  1. guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java

        @Override
        public int compare(@Nullable String first, @Nullable String second) {
          if (first == second) {
            return 0;
          } else if (first == null) {
            return -1;
          } else if (second == null) {
            return 1;
          } else if (first.length() != second.length()) {
            return first.length() - second.length();
          } else {
            return first.compareTo(second);
          }
        }
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/MoreObjects.java

       *
       * <p><b>Note:</b> if {@code first} is represented as an {@link Optional}, this can be
       * accomplished with {@link Optional#or(Object) first.or(second)}. That approach also allows for
       * lazy evaluation of the fallback instance, using {@link Optional#or(Supplier)
       * first.or(supplier)}.
       *
       * <p><b>Java 9 users:</b> use {@code java.util.Objects.requireNonNullElse(first, second)}
       * instead.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 13 14:11:58 GMT 2023
    - 15.4K bytes
    - Viewed (0)
  3. tests/create_test.go

    	}
    
    	var result2 User
    	if err := DB.Where("name = ?", "create_from_map_2").First(&result2).Error; err != nil || result2.Age != 19 {
    		t.Fatalf("failed to query data after create from slice of map, got error %v", err)
    	}
    
    	var result3 User
    	if err := DB.Where("name = ?", "create_from_map_3").First(&result3).Error; err != nil || result3.Age != 20 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        checkMessage(
            expected, "OtherOrder.FIRST -> MyOrder.THIRD", "MyOrder.THIRD -> OtherOrder.FIRST");
        lockA.lock();
        lock01.unlock();
        lockB.lock();
        lockA.unlock();
    
        expected = assertThrows(PotentialDeadlockException.class, () -> lock01.lock());
        checkMessage(
            expected, "LockB -> OtherOrder.FIRST", "LockA -> LockB", "OtherOrder.FIRST -> LockA");
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (1)
  5. guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        checkMessage(
            expected, "OtherOrder.FIRST -> MyOrder.THIRD", "MyOrder.THIRD -> OtherOrder.FIRST");
        lockA.lock();
        lock01.unlock();
        lockB.lock();
        lockA.unlock();
    
        expected = assertThrows(PotentialDeadlockException.class, () -> lock01.lock());
        checkMessage(
            expected, "LockB -> OtherOrder.FIRST", "LockA -> LockB", "OtherOrder.FIRST -> LockA");
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (0)
  6. tests/associations_test.go

    		t.Fatalf("Should delete member, got error: %v, affected: %v", r.Error, r.RowsAffected)
    	}
    
    	var result Member
    	if err := DB.First(&result, member.ID).Error; err == nil {
    		t.Fatalf("Should not find deleted member")
    	}
    
    	if err := DB.First(&profile2, profile.ID).Error; err == nil {
    		t.Fatalf("Should not find deleted profile")
    	}
    }
    
    func TestForeignKeyConstraintsBelongsTo(t *testing.T) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Feb 08 08:29:09 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  7. tests/update_test.go

    		}
    		lastUpdatedAt = n
    	}
    
    	checkOtherData := func(name string) {
    		var first, last User
    		if err := DB.Where("id = ?", users[0].ID).First(&first).Error; err != nil {
    			t.Errorf("errors happened when query before user: %v", err)
    		}
    		CheckUser(t, first, *users[0])
    
    		if err := DB.Where("id = ?", users[2].ID).First(&last).Error; err != nil {
    			t.Errorf("errors happened when query after user: %v", err)
    		}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Dec 04 03:50:58 GMT 2023
    - 30.3K bytes
    - Viewed (0)
  8. tests/gorm_test.go

    		}
    
    		got := user{}
    		results := DB.First(&got, "id = ?", u1.ID)
    		if results.Error != nil {
    			t.Fatalf("errors happened on first: %v", results.Error)
    		} else if results.RowsAffected != 1 {
    			t.Fatalf("rows affected expects: %v, got %v", 1, results.RowsAffected)
    		} else if got.ID != u1.ID {
    			t.Fatalf("first expects: %v, got %v", u1, got)
    		}
    
    		results = DB.Select("id, name").Find(&got)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jun 01 07:22:21 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  9. tests/test_forms_from_non_typing_sequences.py

        response = client.post(
            "/form/python-list", data={"items": ["first", "second", "third"]}
        )
        assert response.status_code == 200, response.text
        assert response.json() == ["first", "second", "third"]
    
    
    def test_python_set_param_as_form():
        response = client.post(
            "/form/python-set", data={"items": ["first", "second", "third"]}
        )
        assert response.status_code == 200, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  10. tests/soft_delete_test.go

    	if !regexp.MustCompile(`SELECT .name. FROM user u WHERE .u.\..deleted_at. IS NULL`).MatchString(sql) {
    		t.Errorf("Table with escape character, got %v", sql)
    	}
    
    	if DB.First(&User{}, "name = ?", user.Name).Error == nil {
    		t.Errorf("Can't find a soft deleted record")
    	}
    
    	count = 0
    	if DB.Model(&User{}).Where("name = ?", user.Name).Count(&count).Error != nil || count != 0 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 5.7K bytes
    - Viewed (0)
Back to top