Search Options

Results per page
Sort
Preferred Languages
Advance

Results 971 - 980 of 1,080 for Str (0.03 sec)

  1. docs/ja/docs/tutorial/response-model.md

    ## レスポンスモデルのエンコーディングパラメータ
    
    レスポンスモデルにはデフォルト値を設定することができます:
    
    ```Python hl_lines="11 13 14"
    {!../../docs_src/response_model/tutorial004.py!}
    ```
    
    * `description: str = None`は`None`がデフォルト値です。
    * `tax: float = 10.5`は`10.5`がデフォルト値です。
    * `tags: List[str] = []` は空のリスト(`[]`)がデフォルト値です。
    
    しかし、実際に保存されていない場合には結果からそれらを省略した方が良いかもしれません。
    
    例えば、NoSQLデータベースに多くのオプション属性を持つモデルがあるが、デフォルト値でいっぱいの非常に長いJSONレスポンスを送信したくない場合です。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  2. docs/fr/docs/tutorial/path-params.md

    ### Création d'un `Enum`
    
    Importez `Enum` et créez une sous-classe qui hérite de `str` et `Enum`.
    
    En héritant de `str` la documentation sera capable de savoir que les valeurs doivent être de type `string` et pourra donc afficher cette `Enum` correctement.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/path-params-numeric-validations.md

    /// tip | "Подсказка"
    
    Это не имеет большого значения, если вы используете `Annotated`.
    
    ///
    
    Допустим, вы хотите объявить query-параметр `q` как обязательный параметр типа `str`.
    
    И если вам больше ничего не нужно указывать для этого параметра, то нет необходимости использовать `Query`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  4. cmd/utils.go

    	if len(strs) == 0 {
    		return ""
    	}
    	xfix := strs[0]
    	// short-circuit single-element list
    	if len(strs) == 1 {
    		return xfix
    	}
    	// compare first to rest
    	for _, str := range strs[1:] {
    		xfixl := len(xfix)
    		strl := len(str)
    		// short-circuit empty strings
    		if xfixl == 0 || strl == 0 {
    			return ""
    		}
    		// maximum possible length
    		maxl := xfixl
    		if strl < maxl {
    			maxl = strl
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 13 22:22:04 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  5. cmd/erasure-server-pool.go

    func (hr HealthResult) String() string {
    	var str strings.Builder
    	for i, es := range hr.ESHealth {
    		str.WriteString("(Pool: ")
    		str.WriteString(strconv.Itoa(es.PoolID))
    		str.WriteString(" Set: ")
    		str.WriteString(strconv.Itoa(es.SetID))
    		str.WriteString(" Healthy: ")
    		str.WriteString(strconv.FormatBool(es.Healthy))
    		if i == 0 {
    			str.WriteString(")")
    		} else {
    			str.WriteString(") | ")
    		}
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 29 22:40:36 UTC 2024
    - 89.8K bytes
    - Viewed (0)
  6. docs/zh/docs/advanced/settings.md

    #### `lru_cache` 技术细节
    
    `@lru_cache` 修改了它所装饰的函数,以返回第一次返回的相同值,而不是再次计算它,每次都执行函数的代码。
    
    因此,下面的函数将对每个参数组合执行一次。然后,每个参数组合返回的值将在使用完全相同的参数组合调用函数时再次使用。
    
    例如,如果您有一个函数:
    ```Python
    @lru_cache
    def say_hi(name: str, salutation: str = "Ms."):
        return f"Hello {salutation} {name}"
    ```
    
    您的程序可以像这样执行:
    
    ```mermaid
    sequenceDiagram
    
    participant code as Code
    participant function as say_hi()
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  7. tests/test_multi_body_errors.py

    from dirty_equals import IsDict, IsOneOf
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, condecimal
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        age: condecimal(gt=Decimal(0.0))  # type: ignore
    
    
    @app.post("/items/")
    def save_item_no_body(item: List[Item]):
        return {"item": item}
    
    
    client = TestClient(app)
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  8. docs/pt/docs/advanced/settings.md

    Por exemplo, se você definir uma função:
    
    ```Python
    @lru_cache
    def say_hi(name: str, salutation: str = "Ms."):
        return f"Hello {salutation} {name}"
    ```
    
    Seu programa poderia executar dessa forma:
    
    ```mermaid
    sequenceDiagram
    
    participant code as Código
    participant function as say_hi()
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 17K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/es/user/allcommon/EsAbstractBehavior.java

                return ((List<?>) value).stream().map(v -> v.toString()).toArray(n -> new String[n]);
            }
            String str = DfTypeUtil.toString(value);
            if (str == null) {
                return null;
            }
            return new String[] { str };
        }
    
        protected LocalDateTime toLocalDateTime(Object value) {
            return DfTypeUtil.toLocalDateTime(value);
        }
    
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/security/http-basic-auth.md

    `secrets.compare_digest()` benötigt `bytes` oder einen `str`, welcher nur ASCII-Zeichen (solche der englischen Sprache) enthalten darf, das bedeutet, dass es nicht mit Zeichen wie `á`, wie in `Sebastián`, funktionieren würde.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 15:25:54 UTC 2024
    - 5.8K bytes
    - Viewed (0)
Back to top