Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 147 for encodeArg (0.2 sec)

  1. src/cmd/go/internal/work/exec.go

    	isBuilder := os.Getenv("GO_BUILDER_NAME") != ""
    	if isBuilder && rand.Intn(10) == 0 {
    		return true
    	}
    
    	return false
    }
    
    // encodeArg encodes an argument for response file writing.
    func encodeArg(arg string) string {
    	// If there aren't any characters we need to reencode, fastpath out.
    	if !strings.ContainsAny(arg, "\\\n") {
    		return arg
    	}
    	var b strings.Builder
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 14:46:37 UTC 2024
    - 105.6K bytes
    - Viewed (0)
  2. fastapi/encoders.py

        if isinstance(obj, BaseModel):
            # TODO: remove when deprecating Pydantic v1
            encoders: Dict[Any, Any] = {}
            if not PYDANTIC_V2:
                encoders = getattr(obj.__config__, "json_encoders", {})  # type: ignore[attr-defined]
                if custom_encoder:
                    encoders.update(custom_encoder)
            obj_dict = _model_dump(
                obj,
                mode="json",
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 21:56:59 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  3. docs/uk/docs/tutorial/encoder.md

    === "Python 3.10+"
    
        ```Python hl_lines="4  21"
        {!> ../../../docs_src/encoder/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="5  22"
        {!> ../../../docs_src/encoder/tutorial001.py!}
        ```
    
    У цьому прикладі вона конвертує Pydantic model у `dict`, а `datetime` у `str`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  4. platforms/core-runtime/serialization/src/main/java/org/gradle/internal/serialize/Encoder.java

    import java.io.OutputStream;
    
    /**
     * Provides a way to encode structured data to a backing byte stream. Implementations may buffer outgoing encoded bytes prior
     * to writing to the backing byte stream.
     */
    public interface Encoder {
        /**
         * Returns an {@link OutputStream} that can be used to write raw bytes to the stream.
         */
        OutputStream getOutputStream();
    
        /**
         * Writes a raw byte value to the stream.
         */
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/encoder.md

    === "Python 3.10+"
    
        ```Python hl_lines="4  21"
        {!> ../../../docs_src/encoder/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="5  22"
        {!> ../../../docs_src/encoder/tutorial001.py!}
        ```
    
    Neste exemplo, ele converteria o modelo Pydantic em um `dict`, e o `datetime` em um `str`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  6. src/encoding/gob/encoder_test.go

    // See Issue 16204.
    func TestCatchInvalidNilValue(t *testing.T) {
    	encodeErr, panicErr := encodeAndRecover(nil)
    	if panicErr != nil {
    		t.Fatalf("panicErr=%v, should not panic encoding untyped nil", panicErr)
    	}
    	if encodeErr == nil {
    		t.Errorf("got err=nil, want non-nil error when encoding untyped nil value")
    	} else if !strings.Contains(encodeErr.Error(), "nil value") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  7. platforms/core-configuration/graph-serialization/src/main/kotlin/org/gradle/internal/serialize/graph/package-info.java

     *      The WriteContext keeps track (among other things) of the low level binary stream (actually, a Gradle serialization {@link org.gradle.internal.serialize.Encoder Encoder}) and the codec to be used.
     *  </p>
     *  <p>
     *      Object serialization is a graph-walking process, and as such, it has a recursive nature.
     *  </p>
     *  <p></p>
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:30 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  8. platforms/core-runtime/wrapper-shared/src/main/java/org/gradle/wrapper/Download.java

                Object encoder = getEncoderMethod.invoke(null);
                return (String) encodeMethod.invoke(encoder, new Object[]{userInfo.getBytes("UTF-8")});
            } catch (Exception java7OrEarlier) {
                try {
                    Method encodeMethod = loader.loadClass("javax.xml.bind.DatatypeConverter").getMethod("printBase64Binary", byte[].class);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 13:09:37 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  9. src/encoding/gob/encode.go

    		return nil
    	}
    	info.encInit.Lock()
    	defer info.encInit.Unlock()
    	enc := info.encoder.Load()
    	if enc == nil {
    		if building == nil {
    			building = make(map[*typeInfo]bool)
    		}
    		building[info] = true
    		enc = compileEnc(ut, building)
    		info.encoder.Store(enc)
    	}
    	return enc
    }
    
    func (enc *Encoder) encode(b *encBuffer, value reflect.Value, ut *userTypeInfo) {
    	defer catchError(&enc.err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 19K bytes
    - Viewed (0)
  10. platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/kryo/KryoBackedCodecTest.groovy

            when:
            def bytes = encode { Encoder encoder ->
                encoder.encodeChunked { Encoder nested ->
                    nested.writeSmallInt(1)
                    nested.writeString("chunked")
                }
                encoder.encodeChunked { Encoder nested ->
                }
                encoder.encodeChunked { Encoder nested ->
                    nested.writeSmallInt(2)
                }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Apr 15 16:06:56 UTC 2024
    - 5.2K bytes
    - Viewed (0)
Back to top