- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for buf1 (0.04 sec)
-
src/bufio/bufio_test.go
} func TestWriterReset(t *testing.T) { var buf1, buf2, buf3, buf4, buf5 strings.Builder w := NewWriter(&buf1) w.WriteString("foo") w.Reset(&buf2) // and not flushed w.WriteString("bar") w.Flush() if buf1.String() != "" { t.Errorf("buf1 = %q; want empty", buf1.String()) } if buf2.String() != "bar" { t.Errorf("buf2 = %q; want bar", buf2.String()) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
src/bytes/bytes_test.go
for i := 0; i < b.N; i++ { j := IndexRune(buf, needle) if j != n { b.Fatal("bad index", j) } } for i := range buf { buf[i] = '\x00' } } } func BenchmarkEqual(b *testing.B) { b.Run("0", func(b *testing.B) { var buf [4]byte buf1 := buf[0:0] buf2 := buf[1:1] for i := 0; i < b.N; i++ { eq := Equal(buf1, buf2) if !eq { b.Fatal("bad equal") }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Aug 19 19:09:04 UTC 2024 - 61.2K bytes - Viewed (0) -
cmd/xl-storage.go
stat, err := f.Stat() if err != nil { buf, err = io.ReadAll(f) return buf, dmTime, osErrToFileErr(err) } if stat.IsDir() { return nil, dmTime, errFileNotFound } // Read into appropriate buffer. sz := stat.Size() if sz <= metaDataReadDefault { buf = metaDataPoolGet() buf = buf[:sz] } else { buf = make([]byte, sz) } // Read file...
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:58:27 UTC 2024 - 91.3K bytes - Viewed (0) -
cmd/erasure-object.go
// We use 2 buffers, so we always have a full buffer of input. pool := globalBytePoolCap.Load() bufA := pool.Get() bufB := pool.Get() defer pool.Put(bufA) defer pool.Put(bufB) ra, err := readahead.NewReaderBuffer(data, [][]byte{bufA[:fi.Erasure.BlockSize], bufB[:fi.Erasure.BlockSize]}) if err == nil { toEncode = ra defer ra.Close() } bugLogIf(ctx, err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 78.8K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/api/json/SearchApiManager.java
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 12 01:54:46 UTC 2024 - 50.3K bytes - Viewed (0) -
cmd/xl-storage-format-v2.go
} } func decodeXLHeaders(buf []byte) (versions int, headerV, metaV uint8, b []byte, err error) { hdrVer, buf, err := msgp.ReadUint8Bytes(buf) if err != nil { return 0, 0, 0, buf, err } metaVer, buf, err := msgp.ReadUint8Bytes(buf) if err != nil { return 0, 0, 0, buf, err } if hdrVer > xlHeaderVersion {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 15:30:50 UTC 2024 - 64K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/mylasta/direction/FessProp.java
default String getLdapAdminUserSecurityPrincipal(final String name) { final StringBuilder buf = new StringBuilder(100); buf.append(String.format(getLdapAdminUserFilter(), name)); if (StringUtil.isNotBlank(getLdapAdminUserBaseDn())) { buf.append(',').append(getLdapAdminUserBaseDn()); } return buf.toString(); } String getLdapAdminRoleObjectClasses();
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 12 01:54:15 UTC 2024 - 87.2K bytes - Viewed (0) -
compat/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 76.8K bytes - Viewed (0) -
cmd/batch-handlers.go
if endpoint == "" { return nil } buf, err := json.Marshal(ri) if err != nil { return err } ctx, cancel := context.WithTimeout(ctx, 10*time.Second) defer cancel() req, err := http.NewRequestWithContext(ctx, http.MethodPost, endpoint, bytes.NewReader(buf)) if err != nil { return err } if token != "" { req.Header.Set("Authorization", token)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 18 15:32:09 UTC 2024 - 62.2K bytes - Viewed (0) -
cmd/peer-rest-server.go
// We have however a dynamic downstream buffer (ch). buf := bytes.NewBuffer(grid.GetByteBuffer()) enc := json.NewEncoder(buf) tmpEvt := struct{ Records []event.Event }{[]event.Event{{}}} for { select { case <-ctx.Done(): grid.PutByteBuffer(buf.Bytes()) return nil case ev := <-ch: buf.Reset() tmpEvt.Records[0] = ev if err := enc.Encode(tmpEvt); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 11:32:32 UTC 2024 - 53.2K bytes - Viewed (0)