- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 61 for cap (0.04 sec)
-
internal/bpool/bpool_test.go
} // Check with width cap if bp.WidthCap() != capWidth { t.Fatalf("bytepool capWidth invalid: got %v want %v", bp.WidthCap(), capWidth) } // Check that retrieved buffer are of the expected width b := bp.Get() if len(b) != width { t.Fatalf("bytepool length invalid: got %v want %v", len(b), width) } if cap(b) != capWidth { t.Fatalf("bytepool cap invalid: got %v want %v", cap(b), capWidth) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 29 01:40:52 UTC 2024 - 2.8K bytes - Viewed (0) -
internal/grid/grid.go
var PutByteBuffer = func(b []byte) { if cap(b) >= biggerBufMin && cap(b) < biggerBufMax { internal32KByteBuffer.Put(&b) return } if cap(b) >= minBufferSize && cap(b) < biggerBufMin { internalByteBuffer.Put(&b) return } } // readAllInto reads from r and appends to b until an error or EOF and returns the data it read.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 6.9K bytes - Viewed (0) -
internal/s3select/jstream/scratch.go
func (s *scratch) grow() { ndata := make([]byte, cap(s.data)*2) copy(ndata, s.data) s.data = ndata } // append single byte to scratch buffer func (s *scratch) add(c byte) { if s.fill+1 >= cap(s.data) { s.grow() } s.data[s.fill] = c s.fill++ } // append encoded rune to scratch buffer func (s *scratch) addRune(r rune) int { if s.fill+utf8.UTFMax >= cap(s.data) { s.grow() }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 758 bytes - Viewed (0) -
docs/vi/docs/index.md
### Tài liệu API thay thế Và bây giờ, hãy truy cập tới <a href="http://127.0.0.1:8000/redoc" class="external-link" target="_blank">http://127.0.0.1:8000/redoc</a>. Bạn sẽ thấy tài liệu được thay thế (cung cấp bởi <a href="https://github.com/Rebilly/ReDoc" class="external-link" target="_blank">ReDoc</a>): ![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png) ## Nâng cấp ví dụ
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 21.9K bytes - Viewed (0) -
internal/bpool/bpool.go
w: width, wcap: capwidth, } } // Populate - populates and pre-warms the byte pool, this function is non-blocking. func (bp *BytePoolCap) Populate() { for _, buf := range reedsolomon.AllocAligned(cap(bp.c), bp.wcap) { bp.Put(buf[:bp.w]) } } // Get gets a []byte from the BytePool, or creates a new one if none are // available in the pool. func (bp *BytePoolCap) Get() (b []byte) { if bp == nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 29 01:40:52 UTC 2024 - 3K bytes - Viewed (0) -
src/bytes/buffer_test.go
var cap0 int for i := 0; i < 5<<10; i++ { b.Write(buf) b.Read(buf) if i == 0 { cap0 = b.Cap() } } cap1 := b.Cap() // (*Buffer).grow allows for 2x capacity slop before sliding, // so set our error threshold at 3x. if cap1 > cap0*3 { t.Errorf("buffer cap = %d; too big (grew from %d)", cap1, cap0) } } func BenchmarkWriteByte(b *testing.B) { const n = 4 << 10
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
docs/vi/docs/tutorial/first-steps.md
{"message": "Hello World"} ``` ### Tài liệu tương tác API Bây giờ tới <a href="http://127.0.0.1:8000/docs" class="external-link" target="_blank">http://127.0.0.1:8000/docs</a>. Bạn sẽ thấy một tài liệu tương tác API (cung cấp bởi <a href="https://github.com/swagger-api/swagger-ui" class="external-link" target="_blank">Swagger UI</a>): ![Swagger UI](https://fastapi.tiangolo.com/img/index/index-01-swagger-ui-simple.png)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 11.1K bytes - Viewed (0) -
cmd/batch-expire_gen.go
return } case "Rules": var zb0002 uint32 zb0002, err = dc.ReadArrayHeader() if err != nil { err = msgp.WrapError(err, "Rules") return } if cap(z.Rules) >= int(zb0002) { z.Rules = (z.Rules)[:zb0002] } else { z.Rules = make([]BatchJobExpireFilter, zb0002) } for za0001 := range z.Rules { err = z.Rules[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 - 19.9K bytes - Viewed (0) -
src/bytes/buffer.go
func (b *Buffer) Len() int { return len(b.buf) - b.off } // Cap returns the capacity of the buffer's underlying byte slice, that is, the // total space allocated for the buffer's data. func (b *Buffer) Cap() int { return cap(b.buf) } // Available returns how many bytes are unused in the buffer. func (b *Buffer) Available() int { return cap(b.buf) - len(b.buf) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
cmd/handler-api.go
} if tc, ok := r.Context().Value(mcontext.ContextTraceKey).(*mcontext.TraceCtxt); ok { tc.FuncName = "s3.MaxClients" } w.Header().Set("X-RateLimit-Limit", strconv.Itoa(cap(pool))) w.Header().Set("X-RateLimit-Remaining", strconv.Itoa(cap(pool)-len(pool))) ctx := r.Context() select { case pool <- struct{}{}: defer func() { <-pool }() globalHTTPStats.addRequestsInQueue(-1)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 26 17:07:10 UTC 2024 - 10.4K bytes - Viewed (0)