Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 371 - 380 of 808 for encodes (0.09 seconds)

  1. docs/uk/docs/advanced/response-directly.md

    Якщо ви не оголошуєте модель відповіді, **FastAPI** використає `jsonable_encoder`, описаний у [Сумісному з JSON кодері](../tutorial/encoder.md), і помістить результат у `JSONResponse`.
    
    Ви також можете створити `JSONResponse` безпосередньо і повернути його.
    
    /// tip | Порада
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 6.7K bytes
    - Click Count (0)
  2. docs_src/body_updates/tutorial001_py310.py

    from fastapi import FastAPI
    from fastapi.encoders import jsonable_encoder
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str | None = None
        description: str | None = None
        price: float | None = None
        tax: float = 10.5
        tags: list[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 856 bytes
    - Click Count (0)
  3. internal/logger/logrotate.go

    			stdErrEnc.Encode(&log.Entry{
    				Level:   ErrorKind,
    				Message: msg,
    				Time:    time.Now().UTC(),
    				Trace:   &log.Trace{Message: msg},
    			})
    		}
    		if err := w.rotate(); err != nil {
    			msg := fmt.Sprintf("unable to rotate log file %v: %v", w.f.Name(), err)
    			stdErrEnc.Encode(&log.Entry{
    				Level:   ErrorKind,
    				Message: msg,
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Mar 30 00:56:02 GMT 2025
    - 5.8K bytes
    - Click Count (0)
  4. docs/tr/docs/tutorial/request-files.md

    /// note | Teknik Detaylar
    
    Formlardan gelen veri, dosya içermiyorsa normalde "media type" olarak `application/x-www-form-urlencoded` ile encode edilir.
    
    Ancak form dosya içeriyorsa `multipart/form-data` olarak encode edilir. `File` kullanırsanız, **FastAPI** dosyaları body’nin doğru kısmından alması gerektiğini bilir.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 7.5K bytes
    - Click Count (0)
  5. internal/s3select/jstream/scratch.go

    	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()
    	}
    
    	n := utf8.EncodeRune(s.data[s.fill:], r)
    	s.fill += n
    	return n
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Mon Sep 23 19:35:41 GMT 2024
    - 758 bytes
    - Click Count (0)
  6. src/test/java/jcifs/internal/CommonServerMessageBlockResponseTest.java

            assertEquals(expectedDecodeLength, response.decode(buffer, bufferIndex));
    
            // Test encode method
            byte[] dst = new byte[512];
            int dstIndex = 0;
            int expectedEncodeLength = 64;
            when(response.encode(dst, dstIndex)).thenReturn(expectedEncodeLength);
            assertEquals(expectedEncodeLength, response.encode(dst, dstIndex));
    
            // Test digest methods
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 20.3K bytes
    - Click Count (0)
  7. cmd/storage-datatypes_gen.go

    				return
    			}
    		}
    	}
    	return
    }
    
    // EncodeMsg implements msgp.Encodable
    func (z *RenameDataInlineHandlerParams) EncodeMsg(en *msgp.Writer) (err error) {
    	// map header, size 1
    	// write "p"
    	err = en.Append(0x81, 0xa1, 0x70)
    	if err != nil {
    		return
    	}
    	err = z.RenameDataHandlerParams.EncodeMsg(en)
    	if err != nil {
    		err = msgp.WrapError(err, "RenameDataHandlerParams")
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 151.7K bytes
    - Click Count (0)
  8. src/test/java/jcifs/internal/smb1/trans2/Trans2GetDfsReferralTest.java

            assertEquals(SmbComTransaction.TRANS2_GET_DFS_REFERRAL, dst[5]);
            assertEquals((byte) 0x00, dst[6]);
        }
    
        @Test
        @DisplayName("writeParametersWireFormat should encode request buffer")
        void testWriteParametersWireFormat() throws Exception {
            // Given
            String filename = "\\\\server\\share";
            trans2GetDfsReferral = new Trans2GetDfsReferral(mockConfig, filename);
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 11K bytes
    - Click Count (0)
  9. src/test/java/jcifs/internal/smb2/lease/Smb2LeaseKeyTest.java

            assertThrows(IllegalArgumentException.class, () -> new Smb2LeaseKey(new byte[17]));
            assertThrows(IllegalArgumentException.class, () -> new Smb2LeaseKey(new byte[0]));
        }
    
        @Test
        @DisplayName("Should encode lease key to buffer")
        void testEncode() {
            byte[] testBytes = new byte[] { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB,
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 21 00:16:17 GMT 2025
    - 6K bytes
    - Click Count (0)
  10. src/main/java/jcifs/internal/smb2/create/LeaseV1CreateContextRequest.java

            // Name: 4 bytes ("RqLs")
            // Padding: 4 bytes (to align data to 8-byte boundary)
            // Data: 32 bytes (lease V1 structure)
            return 16 + 4 + 4 + 32;
        }
    
        @Override
        public int encode(byte[] dst, int dstIndex) {
            int start = dstIndex;
    
            // Write context header
            SMBUtil.writeInt4(0, dst, dstIndex); // Next (offset to next context, 0 for last)
            dstIndex += 4;
    
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 23 02:21:31 GMT 2025
    - 4.6K bytes
    - Click Count (0)
Back to Top