Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 251 - 260 of 808 for encodes (0.1 seconds)

  1. cmd/mrf_gen_test.go

    	v := PartialOperation{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodePartialOperation(b *testing.B) {
    	v := PartialOperation{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 2.4K bytes
    - Click Count (0)
  2. cmd/site-replication-utils_gen_test.go

    	v := SiteResyncStatus{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeSiteResyncStatus(b *testing.B) {
    	v := SiteResyncStatus{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 2.4K bytes
    - Click Count (0)
  3. src/test/java/jcifs/internal/smb2/ServerMessageBlock2RequestTest.java

        class EncodingTests {
    
            @Test
            @DisplayName("encode should validate size calculation")
            void testEncodeValidSize() {
                byte[] buffer = new byte[1024];
                testRequest.setTestSize(64);
                testRequest.setTestLength(64);
    
                int result = testRequest.encode(buffer, 0);
    
                assertEquals(64, result);
            }
    
            @Test
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 15.7K bytes
    - Click Count (0)
  4. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackRoundTripTest.kt

    import org.junit.jupiter.params.provider.ArgumentsSource
    
    /**
     * Tests for round-tripping headers through hpack.
     *
     * TODO: update hpack-test-case with the output of our encoder.
     * This test will hide complementary bugs in the encoder and decoder,
     * We should test that the encoder is producing responses that are
     */
    class HpackRoundTripTest : HpackDecodeTestBase() {
      internal class StoriesTestProvider : SimpleProvider() {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Click Count (0)
  5. docs_src/stream_data/tutorial001_py310.py

    async def stream_story_bytes() -> AsyncIterable[bytes]:
        for line in message.splitlines():
            yield line.encode("utf-8")
    
    
    @app.get("/story/stream-no-async-bytes", response_class=StreamingResponse)
    def stream_story_no_async_bytes() -> Iterable[bytes]:
        for line in message.splitlines():
            yield line.encode("utf-8")
    
    
    @app.get("/story/stream-no-annotation-bytes", response_class=StreamingResponse)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 27 18:56:47 GMT 2026
    - 2.2K bytes
    - Click Count (0)
  6. docs/ja/docs/advanced/additional-status-codes.md

    # 追加のステータスコード { #additional-status-codes }
    
    デフォルトでは、 **FastAPI** は `JSONResponse` を使ってレスポンスを返し、*path operation* から返した内容をその `JSONResponse` の中に入れます。
    
    デフォルトのステータスコード、または *path operation* で設定したステータスコードが使用されます。
    
    ## 追加のステータスコード { #additional-status-codes_1 }
    
    メインのステータスコードとは別に追加のステータスコードを返したい場合は、`JSONResponse` のような `Response` を直接返し、追加のステータスコードを直接設定できます。
    
    たとえば、item を更新でき、成功時に HTTP ステータスコード 200 "OK" を返す *path operation* を作りたいとします。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 2.4K bytes
    - Click Count (0)
  7. docs/zh-hant/docs/advanced/additional-status-codes.md

    # 額外的狀態碼 { #additional-status-codes }
    
    在預設情況下,**FastAPI** 會使用 `JSONResponse` 傳回回應,並把你從你的「路徑操作(path operation)」回傳的內容放進該 `JSONResponse` 中。
    
    它會使用預設的狀態碼,或你在路徑操作中設定的狀態碼。
    
    ## 額外的狀態碼 { #additional-status-codes_1 }
    
    如果你想在主要狀態碼之外再回傳其他狀態碼,可以直接回傳一個 `Response`(例如 `JSONResponse`),並直接設定你想要的額外狀態碼。
    
    例如,你想要有一個允許更新項目的路徑操作,成功時回傳 HTTP 狀態碼 200 "OK"。
    
    但你也希望它能接受新項目;當項目先前不存在時就建立它們,並回傳 HTTP 狀態碼 201 "Created"。
    
    要達成這點,匯入 `JSONResponse`,直接在那裡回傳內容,並設定你想要的 `status_code`:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 1.8K bytes
    - Click Count (0)
  8. src/test/java/jcifs/internal/smb2/ioctl/Smb2IoctlRequestTest.java

            when(mockInputData.encode(any(byte[].class), anyInt())).thenReturn(100);
            request.setInputData(mockInputData);
            byte[] buffer = new byte[1024];
    
            int written = request.writeBytesWireFormat(buffer, 0);
    
            assertTrue(written > 57);
            verify(mockInputData).encode(any(byte[].class), anyInt());
        }
    
        @Test
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 14.3K bytes
    - Click Count (0)
  9. src/main/java/jcifs/smb1/dcerpc/msrpc/srvsvc.java

             */
            public ShareInfo0() {
            }
    
            /**
             * The network name of the share.
             */
            public String netname;
    
            @Override
            public void encode(NdrBuffer _dst) throws NdrException {
                _dst.align(4);
                _dst.enc_ndr_referent(netname, 1);
    
                if (netname != null) {
                    _dst = _dst.deferred;
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 26.3K bytes
    - Click Count (0)
  10. src/test/java/jcifs/http/NtlmHttpFilterTest.java

            byte[] type1Message = new byte[] { 0x4E, 0x54, 0x4C, 0x4D, 0x53, 0x53, 0x50, 0x00, 0x01, 0x00, 0x00, 0x00 };
            String authHeader = "NTLM " + new String(org.bouncycastle.util.encoders.Base64.encode(type1Message));
    
            when(request.getHeader("Authorization")).thenReturn(authHeader);
            when(httpSession.getAttribute("NtlmHttpAuth")).thenReturn(null);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 21 04:51:33 GMT 2025
    - 12.8K bytes
    - Click Count (0)
Back to Top