Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 580 for rend (0.03 sec)

  1. src/internal/fuzz/mutator.go

    }
    
    func (m *mutator) rand(n int) int {
    	return m.r.intn(n)
    }
    
    func (m *mutator) randByteOrder() binary.ByteOrder {
    	if m.r.bool() {
    		return binary.LittleEndian
    	}
    	return binary.BigEndian
    }
    
    // chooseLen chooses length of range mutation in range [1,n]. It gives
    // preference to shorter ranges.
    func (m *mutator) chooseLen(n int) int {
    	switch x := m.rand(100); {
    	case x < 90:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 20:01:34 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  2. src/io/pipe_test.go

    	}
    	c <- 0
    }
    
    // Test a single read/write pair.
    func TestPipe1(t *testing.T) {
    	c := make(chan int)
    	r, w := Pipe()
    	var buf = make([]byte, 64)
    	go checkWrite(t, w, []byte("hello, world"), c)
    	n, err := r.Read(buf)
    	if err != nil {
    		t.Errorf("read: %v", err)
    	} else if n != 12 || string(buf[0:12]) != "hello, world" {
    		t.Errorf("bad read: got %q", buf[0:n])
    	}
    	<-c
    	r.Close()
    	w.Close()
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9K bytes
    - Viewed (0)
  3. platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/store/DefaultBinaryStoreTest.groovy

            then:
            data1.read({ it.readInt() } as BinaryStore.ReadAction) == 10
            data1.read({ it.readString() } as BinaryStore.ReadAction) == "x"
            data1.close()
    
            data2.read({ it.readString() } as BinaryStore.ReadAction) == "y"
            data2.close()
    
            cleanup:
            store.close()
        }
    
        def "data can be re-read"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  4. platforms/jvm/language-java/src/test/groovy/org/gradle/api/internal/tasks/compile/incremental/deps/ClassSetAnalysisDataSerializerTest.groovy

            serializer.write(e, data)
            ClassSetAnalysisData read = serializer.read(new InputStreamBackedDecoder(new ByteArrayInputStream(os.toByteArray())))
    
            then:
            read.dependents.keySet() == data.dependents.keySet()
    
            ["A", "B", "C"].each {
                assert read.dependents[it].privateDependentClasses == data.dependents[it].privateDependentClasses
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Feb 24 12:57:52 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/CountingInputStreamTest.java

        assertEquals(-1, counter.read());
        assertEquals(20, counter.getCount());
      }
    
      public void testReadArrayEOF() throws IOException {
        assertEquals(20, counter.read(new byte[30]));
        assertEquals(20, counter.getCount());
        assertEquals(-1, counter.read(new byte[30]));
        assertEquals(20, counter.getCount());
      }
    
      @SuppressWarnings("CheckReturnValue") // calling read() to skip a byte
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  6. src/math/rand/v2/example_test.go

    }
    
    func ExamplePerm() {
    	for _, value := range rand.Perm(3) {
    		fmt.Println(value)
    	}
    
    	// Unordered output: 1
    	// 2
    	// 0
    }
    
    func ExampleN() {
    	// Print an int64 in the half-open interval [0, 100).
    	fmt.Println(rand.N(int64(100)))
    
    	// Sleep for a random duration between 0 and 100 milliseconds.
    	time.Sleep(rand.N(100 * time.Millisecond))
    }
    
    func ExampleShuffle() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 30 17:09:26 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  7. testing/internal-testing/src/main/groovy/org/gradle/testing/internal/util/GradlewRunner.java

                    int bufferSize = 4096;
                    byte[] buffer = new byte[bufferSize];
    
                    int read = 0;
                    try {
                        read = input.read(buffer);
                        while(read != -1) {
                            output.write(buffer, 0, read);
                            read = input.read(buffer);
                        }
                    } catch (IOException e) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sun May 12 10:33:12 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  8. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/streams/DefaultValueStore.java

                if (toRead == 0) {
                    return 0;
                }
                int read = file.read(buffer, offset, toRead);
                if (read < 0) {
                    throw new IllegalStateException("Unexpected file length.");
                }
                remaining -= read;
                return read;
            }
        }
    
        private static class Source<T> implements Closeable {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:08:47 UTC 2023
    - 8K bytes
    - Viewed (0)
  9. fess-crawler/src/main/java/org/codelibs/fess/crawler/util/IgnoreCloseInputStream.java

        }
    
        @Override
        public int read() throws IOException {
            return inputStream.read();
        }
    
        @Override
        public int read(final byte[] b, final int off, final int len) throws IOException {
            return inputStream.read(b, off, len);
        }
    
        @Override
        public int read(final byte[] b) throws IOException {
            return inputStream.read(b);
        }
    
        @Override
    Registered: Wed Jun 12 15:17:51 UTC 2024
    - Last Modified: Thu Feb 22 01:36:27 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  10. platforms/core-runtime/messaging/src/test/groovy/org/gradle/internal/stream/EncodedStreamTest.groovy

            def inputStream = new ByteArrayInputStream(outputStream.toByteArray())
            def decoder = new EncodedStream.EncodedInput(inputStream)
            decoder.read() == 0
            decoder.read() == 127
            decoder.read() == 128
            decoder.read() == 255
            decoder.read() < 0
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:59:22 UTC 2023
    - 2.2K bytes
    - Viewed (0)
Back to top