- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 99 for cap (0.02 sec)
-
src/bytes/example_test.go
} os.Stdout.Write(buf.Bytes()) // Output: 0 1 2 3 } func ExampleBuffer_Cap() { buf1 := bytes.NewBuffer(make([]byte, 10)) buf2 := bytes.NewBuffer(make([]byte, 0, 10)) fmt.Println(buf1.Cap()) fmt.Println(buf2.Cap()) // Output: // 10 // 10 } func ExampleBuffer_Grow() { var b bytes.Buffer b.Grow(64) bb := b.Bytes() b.Write([]byte("64 bytes or fewer")) fmt.Printf("%q", bb[:b.Len()])
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
internal/grid/muxserver.go
if debugPrint { fmt.Printf("muxServer: received message %d, length %d\n", msg.Seq, len(msg.Payload)) } if !m.checkSeq(msg.Seq) { return } m.recvMu.Lock() defer m.recvMu.Unlock() if cap(m.inbound) == 0 { m.disconnect("did not expect inbound message", true) return } // Note, on EOF no value can be sent. if msg.Flags&FlagEOF != 0 { if len(msg.Payload) > 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 9.7K bytes - Viewed (0) -
cmd/batch-replicate_gen.go
return } case "Tags": var zb0002 uint32 zb0002, err = dc.ReadArrayHeader() if err != nil { err = msgp.WrapError(err, "Tags") return } if cap(z.Tags) >= int(zb0002) { z.Tags = (z.Tags)[:zb0002] } else { z.Tags = make([]BatchJobKV, zb0002) } for za0001 := range z.Tags { err = z.Tags[za0001].DecodeMsg(dc) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 01 12:53:30 UTC 2024 - 40.7K bytes - Viewed (0) -
cmd/bucket-stats_gen.go
case "Nodes": var zb0003 uint32 zb0003, err = dc.ReadArrayHeader() if err != nil { err = msgp.WrapError(err, "QueueStats", "Nodes") return } if cap(z.QueueStats.Nodes) >= int(zb0003) { z.QueueStats.Nodes = (z.QueueStats.Nodes)[:zb0003] } else { z.QueueStats.Nodes = make([]ReplQNodeStats, zb0003) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Feb 06 06:00:45 UTC 2024 - 57.5K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/FuturesGetChecked.java
/* * It's very unlikely that any loaded Futures class will see getChecked called with more * than a handful of exceptions. But it seems prudent to set a cap on how many we'll cache. * This avoids out-of-control memory consumption, and it keeps the cache from growing so * large that doing the lookup is noticeably slower than redoing the work would be. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 22 17:40:56 UTC 2024 - 11.9K bytes - Viewed (0) -
cmd/batch-handlers_gen.go
func (z *BatchJobPrefix) DecodeMsg(dc *msgp.Reader) (err error) { var zb0002 uint32 zb0002, err = dc.ReadArrayHeader() if err != nil { err = msgp.WrapError(err) return } if cap((*z)) >= int(zb0002) { (*z) = (*z)[:zb0002] } else { (*z) = make(BatchJobPrefix, zb0002) } for zb0001 := range *z { (*z)[zb0001], err = dc.ReadString() if err != nil { err = msgp.WrapError(err, zb0001)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 01 12:53:30 UTC 2024 - 20.4K bytes - Viewed (0) -
cmd/xl-storage-format-v2.go
func metaDataPoolGet() []byte { return metaDataPool.Get().([]byte)[:0] } // metaDataPoolPut will put an unused small buffer back into the pool. func metaDataPoolPut(buf []byte) { if cap(buf) >= metaDataReadDefault && cap(buf) < metaDataReadDefault*4 { //nolint:staticcheck // SA6002 we are fine with the tiny alloc metaDataPool.Put(buf) } } // readXLMetaNoData will load the metadata, but skip data segments.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 15:30:50 UTC 2024 - 64K bytes - Viewed (1) -
android/guava-tests/test/com/google/common/collect/ImmutableSetTest.java
assertEquals(8, ImmutableSet.chooseTableSize(4)); assertEquals(1 << 29, ImmutableSet.chooseTableSize(1 << 28)); assertEquals(1 << 29, ImmutableSet.chooseTableSize((1 << 29) * 3 / 5)); // Now we hit the cap assertEquals(1 << 30, ImmutableSet.chooseTableSize(1 << 29)); assertEquals(1 << 30, ImmutableSet.chooseTableSize((1 << 30) - 1)); // Now we've gone too far
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 13.7K bytes - Viewed (0) -
src/bytes/bytes_test.go
if !slices.Equal(result, b) { t.Errorf("Split disagrees withSplitN(%q, %q, %d) = %v; want %v", tt.s, tt.sep, tt.n, b, a) } } if len(a) > 0 { in, out := a[0], s if cap(in) == cap(out) && &in[:1][0] == &out[:1][0] { t.Errorf("Join(%#v, %q) didn't copy", a, tt.sep) } } } } var splitaftertests = []SplitTest{ {abcd, "a", -1, []string{"a", "bcd"}},
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Aug 19 19:09:04 UTC 2024 - 61.2K bytes - Viewed (0) -
docs/vi/docs/python-types.md
Đa phần đều không thể đạt được nếu không có các kiểu dữ liệu. Chú ý rằng, biến `item` là một trong các phần tử trong danh sách `items`. Và do vậy, trình soạn thảo biết nó là một `str`, và cung cấp sự hỗ trợ cho nó. #### Tuple and Set Bạn sẽ làm điều tương tự để khai báo các `tuple` và các `set`: //// tab | Python 3.9+ ```Python hl_lines="1"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 21.6K bytes - Viewed (0)