Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 323 for Compare (0.19 sec)

  1. src/bytes/compare_test.go

    			copy(shiftedB, tt.b)
    			cmp := Compare(tt.a, shiftedB)
    			if cmp != tt.i {
    				t.Errorf(`Compare(%q, %q), offset %d = %v; want %v`, tt.a, tt.b, offset, cmp, tt.i)
    			}
    		}
    	}
    }
    
    func TestCompareIdenticalSlice(t *testing.T) {
    	var b = []byte("Hello Gophers!")
    	if Compare(b, b) != 0 {
    		t.Error("b != b")
    	}
    	if Compare(b, b[:1]) != 1 {
    		t.Error("b > b[:1] failed")
    	}
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jul 13 23:11:42 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/ComparisonChainTest.java

                    .compare("b", "a")
                    .compare(DONT_COMPARE_ME, DONT_COMPARE_ME)
                    .result())
            .isGreaterThan(0);
      }
    
      public void testShortCircuitSecondStep() {
        assertThat(
                ComparisonChain.start()
                    .compare("a", "a")
                    .compare("a", "b")
                    .compare(DONT_COMPARE_ME, DONT_COMPARE_ME)
                    .result())
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/ComparisonChainTest.java

                    .compare("b", "a")
                    .compare(DONT_COMPARE_ME, DONT_COMPARE_ME)
                    .result())
            .isGreaterThan(0);
      }
    
      public void testShortCircuitSecondStep() {
        assertThat(
                ComparisonChain.start()
                    .compare("a", "a")
                    .compare("a", "b")
                    .compare(DONT_COMPARE_ME, DONT_COMPARE_ME)
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 27 13:27:08 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  4. docs/en/docs/advanced/security/http-basic-auth.md

    #### Fix it with `secrets.compare_digest()`
    
    But in our code we are actually using `secrets.compare_digest()`.
    
    In short, it will take the same time to compare `stanleyjobsox` to `stanleyjobson` than it takes to compare `johndoe` to `stanleyjobson`. And the same for the password.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 14:33:05 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Ordering.java

       * instead (but note that it does not guarantee which tied minimum element is returned).
       *
       * @param a value to compare, returned if less than or equal to the rest.
       * @param b value to compare
       * @param c value to compare
       * @param rest values to compare
       * @throws ClassCastException if the parameters are not <i>mutually comparable</i> under this
       *     ordering.
       */
      @ParametricNullness
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 24 19:38:27 GMT 2024
    - 39.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/GeneralRangeTest.java

            assertEquals(
                ORDERING.compare(i, 3) < 0 || (ORDERING.compare(i, 3) == 0 && lBoundType == CLOSED),
                range.contains(i));
            assertEquals(
                ORDERING.compare(i, 3) > 0 || (ORDERING.compare(i, 3) == 0 && lBoundType == OPEN),
                range.tooHigh(i));
            assertFalse(range.tooLow(i));
          }
        }
      }
    
      public void testDoublyBoundedAgainstRange() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  7. operator/cmd/mesh/manifest-diff.go

    	"istio.io/istio/operator/pkg/compare"
    	"istio.io/istio/operator/pkg/util"
    )
    
    // YAMLSuffix is the suffix of a YAML file.
    const YAMLSuffix = ".yaml"
    
    type manifestDiffArgs struct {
    	// compareDir indicates comparison between directory.
    	compareDir bool
    	// verbose generates verbose output.
    	verbose bool
    	// selectResources constrains the list of resources to compare to only the ones in this list, ignoring all others.
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 01:18:49 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/SortedLists.java

      /**
       * A specification for which index to return if the list contains at least one element that
       * compares as equal to the key.
       */
      enum KeyPresentBehavior {
        /**
         * Return the index of any list element that compares as equal to the key. No guarantees are
         * made as to which index is returned, if more than one element compares as equal to the key.
         */
        ANY_PRESENT {
          @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/Comparators.java

       * @param b second value to compare.
       * @throws ClassCastException if the parameters are not <i>mutually comparable</i> using the given
       *     comparator.
       * @since 30.0
       */
      @ParametricNullness
      public static <T extends @Nullable Object> T max(
          @ParametricNullness T a, @ParametricNullness T b, Comparator<T> comparator) {
        return (comparator.compare(a, b) >= 0) ? a : b;
      }
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

      public void testCompare() {
        // max value
        assertThat(UnsignedLongs.compare(0, 0xffffffffffffffffL)).isLessThan(0);
        assertThat(UnsignedLongs.compare(0xffffffffffffffffL, 0)).isGreaterThan(0);
    
        // both with high bit set
        assertThat(UnsignedLongs.compare(0xff1a618b7f65ea12L, 0xffffffffffffffffL)).isLessThan(0);
        assertThat(UnsignedLongs.compare(0xffffffffffffffffL, 0xff1a618b7f65ea12L)).isGreaterThan(0);
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
Back to top