Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 100 for Biscardi (0.23 sec)

  1. internal/ioutil/discard.go

    import (
    	"io"
    )
    
    // Discard is just like io.Discard without the io.ReaderFrom compatible
    // implementation which is buggy on NUMA systems, we have to use a simpler
    // io.Writer implementation alone avoids also unnecessary buffer copies,
    // and as such incurred latencies.
    var Discard io.Writer = discard{}
    
    // discard is /dev/null for Golang.
    type discard struct{}
    
    func (discard) Write(p []byte) (int, error) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Nov 06 22:26:08 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  2. src/bufio/bufio.go

    			err = ErrBufferFull
    		}
    	}
    	return b.buf[b.r : b.r+n], err
    }
    
    // Discard skips the next n bytes, returning the number of bytes discarded.
    //
    // If Discard skips fewer than n bytes, it also returns an error.
    // If 0 <= n <= b.Buffered(), Discard is guaranteed to succeed without
    // reading from the underlying io.Reader.
    func (b *Reader) Discard(n int) (discarded int, err error) {
    	if n < 0 {
    		return 0, ErrNegativeCount
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  3. build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/HtmlToXmlJavadocLexerTest.groovy

     * limitations under the License.
     */
    
    package gradlebuild.docs.dsl.docbook
    
    import spock.lang.Specification
    
    class HtmlToXmlJavadocLexerTest extends Specification {
        def "discards whitespace around block elements"() {
            expect:
            parse(source) == transformed
    
            where:
            source                                             | transformed
    Groovy
    - Registered: Wed Apr 17 11:36:08 GMT 2024
    - Last Modified: Wed Dec 09 08:14:05 GMT 2020
    - 6.5K bytes
    - Viewed (0)
  4. src/bytes/reader_test.go

    		n   int64
    		err error
    	}
    	type justReader struct {
    		io.Reader
    	}
    	type justWriter struct {
    		io.Writer
    	}
    	discard := justWriter{io.Discard} // hide ReadFrom
    
    	var with, withOut nErr
    	with.n, with.err = io.Copy(discard, NewReader(nil))
    	withOut.n, withOut.err = io.Copy(discard, justReader{NewReader(nil)})
    	if with != withOut {
    		t.Errorf("behavior differs: with = %#v; without: %#v", with, withOut)
    	}
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        val request = Request(server.url("/"))
        val response1 = client.newCall(request).execute()
        val response2 = client.newCall(request).execute()
        response1.body.string() // Discard the response body.
        response2.body.string() // Discard the response body.
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(1)
      }
    
      @Test
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  6. logger/logger.go

    	Error(context.Context, string, ...interface{})
    	Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error)
    }
    
    var (
    	// Discard logger will print any log to io.Discard
    	Discard = New(log.New(io.Discard, "", log.LstdFlags), Config{})
    	// Default Default logger
    	Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), Config{
    		SlowThreshold:             200 * time.Millisecond,
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Tue Nov 07 02:19:41 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  7. src/bufio/bufio_test.go

    	br.ReadRune()
    	br.Discard(1)
    	if err := br.UnreadRune(); err == nil {
    		t.Error("UnreadRune didn't fail after Discard")
    	}
    }
    
    func TestNoUnreadByteAfterDiscard(t *testing.T) {
    	br := NewReader(strings.NewReader("example"))
    	br.ReadByte()
    	br.Discard(1)
    	if err := br.UnreadByte(); err == nil {
    		t.Error("UnreadByte didn't fail after Discard")
    	}
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  8. cmd/storage-datatypes_test.go

    		MountPath: "/tmp/drive1",
    		ID:        "uuid",
    		Error:     "",
    	}
    
    	b.SetBytes(1)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		err := msgp.Encode(io.Discard, &v)
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    }
    
    func BenchmarkEncodeDiskInfoGOB(b *testing.B) {
    	v := DiskInfo{
    		Total:     1000,
    		Free:      1000,
    		Used:      1000,
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 9.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/CharStreams.java

        while ((line = lineReader.readLine()) != null) {
          if (!processor.processLine(line)) {
            break;
          }
        }
        return processor.getResult();
      }
    
      /**
       * Reads and discards data from the given {@code Readable} until the end of the stream is reached.
       * Returns the total number of chars read. Does not close the stream.
       *
       * @since 20.0
       */
      @CanIgnoreReturnValue
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

            responseBodyComplete()
          }
          return read
        }
    
        override fun close() {
          if (closed) return
    
          if (bytesRemaining != 0L &&
            !discard(ExchangeCodec.DISCARD_STREAM_TIMEOUT_MILLIS, MILLISECONDS)
          ) {
            carrier.noNewExchanges() // Unread bytes remain on the stream.
            responseBodyComplete()
          }
    
          closed = true
        }
      }
    
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
Back to top