Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for ALGO (0.08 sec)

  1. cmd/bitrot.go

    func bitrotShardFileSize(size int64, shardSize int64, algo BitrotAlgorithm) int64 {
    	if algo != HighwayHash256S {
    		return size
    	}
    	return ceilFrac(size, shardSize)*int64(algo.New().Size()) + size
    }
    
    // bitrotVerify a single stream of data.
    func bitrotVerify(r io.Reader, wantSize, partSize int64, algo BitrotAlgorithm, want []byte, shardSize int64) error {
    	if algo != HighwayHash256S {
    		h := algo.New()
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Wed Feb 26 19:26:13 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  2. cmd/erasure-coding.go

    	for i := range testData {
    		testData[i] = byte(i)
    	}
    	ok := true
    	for algo := invalidErasureAlgo + 1; algo < lastErasureAlgo; algo++ {
    		for _, conf := range testConfigs {
    			failOnErr := func(err error) {
    				if err != nil {
    					logger.Fatal(errSelfTestFailure, "%v: error on self-test [d:%d,p:%d]: %v. Unsafe to start server.\n", algo, conf[0], conf[1], err)
    				}
    			}
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  3. cmd/bitrot-streaming.go

    func newStreamingBitrotWriterBuffer(w io.Writer, algo BitrotAlgorithm, shardSize int64) io.Writer {
    	return &streamingBitrotWriter{iow: ioutil.NopCloser(w), h: algo.New(), shardSize: shardSize, canClose: nil, closeWithErr: func(err error) {}}
    }
    
    // Returns streaming bitrot writer implementation.
    func newStreamingBitrotWriter(disk StorageAPI, origvolume, volume, filePath string, length int64, algo BitrotAlgorithm, shardSize int64) io.Writer {
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Fri Jan 17 19:19:30 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  4. cmd/bitrot-whole.go

    func (b *wholeBitrotWriter) Close() error {
    	return nil
    }
    
    // Returns whole-file bitrot writer.
    func newWholeBitrotWriter(disk StorageAPI, volume, filePath string, algo BitrotAlgorithm, shardSize int64) io.WriteCloser {
    	return &wholeBitrotWriter{disk, volume, filePath, shardSize, algo.New()}
    }
    
    // Implementation to verify bitrot for the whole file.
    type wholeBitrotReader struct {
    	disk       StorageAPI
    	volume     string
    	filePath   string
    Registered: Sun Sep 07 19:28:11 UTC 2025
    - Last Modified: Wed Jan 31 02:11:45 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  5. docs/pt/docs/advanced/events.md

    ### Gerenciador de Contexto Assíncrono
    
    Se você verificar, a função está decorada com um `@asynccontextmanager`.
    
    Que converte a função em algo chamado de "**Gerenciador de Contexto Assíncrono**".
    
    {* ../../docs_src/events/tutorial003.py hl[1,13] *}
    
    Um **gerenciador de contexto** em Python é algo que você pode usar em uma declaração `with`, por exemplo, `open()` pode ser usado como um gerenciador de contexto:
    
    ```Python
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  6. src/cmd/api/testdata/src/issue21181/p/p.go

    package p
    
    import (
    	"dep"
    )
    
    type algo struct {
    	indrt func(dep.Interface)
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Fri Oct 05 17:53:43 UTC 2018
    - 78 bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/smb2/nego/CompressionNegotiateContext.java

         */
        public boolean supportsAlgorithm(int algorithm) {
            if (this.compressionAlgorithms == null) {
                return false;
            }
            for (int algo : this.compressionAlgorithms) {
                if (algo == algorithm) {
                    return true;
                }
            }
            return false;
        }
    
        @Override
        public int encode(byte[] dst, int dstIndex) {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  8. docs/es/docs/tutorial/encoder.md

    # JSON Compatible Encoder
    
    Hay algunos casos en los que podrías necesitar convertir un tipo de dato (como un modelo de Pydantic) a algo compatible con JSON (como un `dict`, `list`, etc).
    
    Por ejemplo, si necesitas almacenarlo en una base de datos.
    
    Para eso, **FastAPI** proporciona una función `jsonable_encoder()`.
    
    ## Usando el `jsonable_encoder`
    
    Imaginemos que tienes una base de datos `fake_db` que solo recibe datos compatibles con JSON.
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Dec 30 18:26:57 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  9. docs/es/docs/advanced/events.md

    ### Async Context Manager
    
    Si revisas, la función está decorada con un `@asynccontextmanager`.
    
    Eso convierte a la función en algo llamado un "**async context manager**".
    
    {* ../../docs_src/events/tutorial003.py hl[1,13] *}
    
    Un **context manager** en Python es algo que puedes usar en una declaración `with`, por ejemplo, `open()` puede ser usado como un context manager:
    
    ```Python
    with open("file.txt") as file:
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Dec 30 18:26:57 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  10. docs/pt/docs/advanced/security/http-basic-auth.md

    Vamos imaginar que alguns invasores estão tentando adivinhar o usuário e a senha.
    
    E eles enviam uma requisição com um usuário `johndoe` e uma senha `love123`.
    
    Então o código Python em sua aplicação seria equivalente a algo como:
    
    ```Python
    if "johndoe" == "stanleyjobson" and "love123" == "swordfish":
        ...
    ```
    
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 5.1K bytes
    - Viewed (0)
Back to top