Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 148 for Repeat (0.26 sec)

  1. guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java

    /**
     * Microbenchmark for {@link com.google.common.base.Strings#repeat}
     *
     * @author Mike Cripps
     */
    public class StringsRepeatBenchmark {
      @Param({"1", "5", "25", "125"})
      int count;
    
      @Param({"1", "10"})
      int length;
    
      private String originalString;
    
      @BeforeExperiment
      void setUp() {
        originalString = Strings.repeat("x", length);
      }
    
      @Benchmark
      void oldRepeat(long reps) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Sep 17 20:24:24 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/DispatcherCleanupTest.kt

              e: IOException,
            ) {}
    
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              response.close()
            }
          }
        repeat(10_000) {
          okhttp.newCall(Request.Builder().url(server.url("/")).build()).enqueue(callback)
        }
        okhttp.dispatcher.executorService.shutdown()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  3. src/bytes/bytes_test.go

    func TestRepeat(t *testing.T) {
    	for _, tt := range RepeatTests {
    		tin := []byte(tt.in)
    		tout := []byte(tt.out)
    		a := Repeat(tin, tt.count)
    		if !Equal(a, tout) {
    			t.Errorf("Repeat(%q, %d) = %q; want %q", tin, tt.count, a, tout)
    			continue
    		}
    	}
    }
    
    func repeat(b []byte, count int) (err error) {
    	defer func() {
    		if r := recover(); r != nil {
    			switch v := r.(type) {
    			case error:
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/base/StringsRepeatBenchmark.java

    /**
     * Microbenchmark for {@link com.google.common.base.Strings#repeat}
     *
     * @author Mike Cripps
     */
    public class StringsRepeatBenchmark {
      @Param({"1", "5", "25", "125"})
      int count;
    
      @Param({"1", "10"})
      int length;
    
      private String originalString;
    
      @BeforeExperiment
      void setUp() {
        originalString = Strings.repeat("x", length);
      }
    
      @Benchmark
      void oldRepeat(long reps) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Sep 17 20:24:24 GMT 2021
    - 3.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

        assertEquals(8581389452482819506L, fingerprint("test".getBytes(UTF_8)));
        // 32 characters long
        assertEquals(-4196240717365766262L, fingerprint(Strings.repeat("test", 8).getBytes(UTF_8)));
        // 256 characters long
        assertEquals(3500507768004279527L, fingerprint(Strings.repeat("test", 64).getBytes(UTF_8)));
      }
    
      public void testStringsConsistency() {
        for (String s : Arrays.asList("", "some", "test", "strings", "to", "try")) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jul 19 14:00:24 GMT 2016
    - 6.2K bytes
    - Viewed (0)
  6. api/next/65238.txt

    pkg slices, func Repeat[$0 interface{ ~[]$1 }, $1 interface{}]($0, int) $0 #65238...
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Tue Mar 19 21:38:37 GMT 2024
    - 82 bytes
    - Viewed (0)
  7. src/archive/zip/zip_test.go

    		return part.off+part.n > off
    	})
    	parts := r.buf[skipParts:]
    	if len(parts) > 0 {
    		skipBytes := off - parts[0].off
    		for _, part := range parts {
    			repeat := int(min(part.n-skipBytes, int64(len(p)-n)))
    			memset(p[n:n+repeat], part.b)
    			n += repeat
    			if n == len(p) {
    				return
    			}
    			skipBytes = 0
    		}
    	}
    	if n != len(p) {
    		err = io.ErrUnexpectedEOF
    	}
    	return
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  8. guava/src/com/google/common/base/Strings.java

       * example, {@code repeat("hey", 3)} returns the string {@code "heyheyhey"}.
       *
       * <p><b>Java 11+ users:</b> use {@code string.repeat(count)} instead.
       *
       * @param string any non-null string
       * @param count the number of times to repeat it; a nonnegative integer
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Sep 17 20:47:03 GMT 2021
    - 12.6K bytes
    - Viewed (0)
  9. cmd/xl-storage_windows_test.go

    func TestUNCPaths(t *testing.T) {
    	testCases := []struct {
    		objName string
    		pass    bool
    	}{
    		{"/abcdef", true},
    		{"/a/b/c/d/e/f/g", true},
    		{string(bytes.Repeat([]byte("界"), 85)), true},
    		// Each path component must be <= 255 bytes long.
    		{string(bytes.Repeat([]byte("界"), 280)), false},
    		{`/p/q/r/s/t`, true},
    	}
    	dir := t.TempDir()
    
    	// Instantiate posix object to manage a disk
    	fs, err := newLocalXLStorage(dir)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Nov 29 06:35:16 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

        assertEquals(8473225671271759044L, fingerprint("test".getBytes(UTF_8)));
        // 32 characters long
        assertEquals(7345148637025587076L, fingerprint(Strings.repeat("test", 8).getBytes(UTF_8)));
        // 256 characters long
        assertEquals(4904844928629814570L, fingerprint(Strings.repeat("test", 64).getBytes(UTF_8)));
      }
    
      public void testStringsConsistency() {
        for (String s : Arrays.asList("", "some", "test", "strings", "to", "try")) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Dec 29 14:55:25 GMT 2021
    - 7.6K bytes
    - Viewed (0)
Back to top