Search Options

Results per page
Sort
Preferred Languages
Advance

Results 481 - 490 of 1,074 for Str (0.02 sec)

  1. internal/bucket/versioning/versioning_test.go

    	v := Versioning{
    		Status: Enabled,
    	}
    	buf, err := xml.Marshal(v)
    	if err != nil {
    		t.Fatalf("Failed to marshal %v: %v", v, err)
    	}
    
    	str := string(buf)
    	if strings.Contains(str, "ExcludedPrefixes") {
    		t.Fatalf("XML shouldn't contain ExcludedPrefixes tag - %s", str)
    	}
    }
    
    func TestVersioningZero(t *testing.T) {
    	var v Versioning
    	if v.Enabled() {
    		t.Fatalf("Expected to be disabled but got enabled")
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun May 08 05:06:44 UTC 2022
    - 8.8K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/encoder.md

    ////
    
    В данном примере она преобразует Pydantic модель в `dict`, а `datetime` - в `str`.
    
    Результатом её вызова является объект, который может быть закодирован с помощью функции из стандартной библиотеки Python – <a href="https://docs.python.org/3/library/json.html#json.dumps" class="external-link" target="_blank">`json.dumps()`</a>.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  3. docs_src/websockets/tutorial003_py39.py

        def disconnect(self, websocket: WebSocket):
            self.active_connections.remove(websocket)
    
        async def send_personal_message(self, message: str, websocket: WebSocket):
            await websocket.send_text(message)
    
        async def broadcast(self, message: str):
            for connection in self.active_connections:
                await connection.send_text(message)
    
    
    manager = ConnectionManager()
    
    
    @app.get("/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  4. tests/test_param_include_in_schema.py

    app = FastAPI()
    
    
    @app.get("/hidden_cookie")
    async def hidden_cookie(
        hidden_cookie: Optional[str] = Cookie(default=None, include_in_schema=False),
    ):
        return {"hidden_cookie": hidden_cookie}
    
    
    @app.get("/hidden_header")
    async def hidden_header(
        hidden_header: Optional[str] = Header(default=None, include_in_schema=False),
    ):
        return {"hidden_header": hidden_header}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  5. docs/ja/docs/python-types.md

    #### `Optional`
    
    また、`Optional`を使用して、変数が`str`のような型を持つことを宣言することもできますが、それは「オプション」であり、`None`にすることもできます。
    
    ```Python hl_lines="1 4"
    {!../../docs_src/python_types/tutorial009.py!}
    ```
    
    ただの`str`の代わりに`Optional[str]`を使用することで、エディタは値が常に`str`であると仮定している場合に実際には`None`である可能性があるエラーを検出するのに役立ちます。
    
    #### ジェネリック型
    
    以下のように角括弧で型パラメータを取る型を:
    
    * `List`
    * `Tuple`
    * `Set`
    * `Dict`
    * `Optional`
    * ...など
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  6. docs/pl/docs/index.md

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: Union[bool, None] = None
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  7. src/main/webapp/js/suggestor.js

                      $liEle = $("<li/>");
                      $liEle.html(str);
                      $liEle.click(function() {
                        var str = $(this).html();
                        suggestor.fixList();
                        $textArea.val(str);
                        if (typeof $settingSearchForm !== "undefined") {
                          $settingSearchForm.submit();
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Mar 30 05:45:24 UTC 2023
    - 13.3K bytes
    - Viewed (0)
  8. docs/zh/docs/python-types.md

    ### 添加类型
    
    让我们来修改上面例子的一行代码。
    
    我们将把下面这段代码中的函数参数从:
    
    ```Python
        first_name, last_name
    ```
    
    改成:
    
    ```Python
        first_name: str, last_name: str
    ```
    
    就是这样。
    
    这些就是"类型提示":
    
    ```Python hl_lines="1"
    {!../../docs_src/python_types/tutorial002.py!}
    ```
    
    这和声明默认值是不同的,例如:
    
    ```Python
        first_name="john", last_name="doe"
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  9. tests/test_security_oauth2_optional.py

                "scopes": {"read:users": "Read the users", "write:users": "Create users"},
            }
        },
        auto_error=False,
    )
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: Optional[str] = Security(reusable_oauth2)):
        if oauth_header is None:
            return None
        user = User(username=oauth_header)
        return user
    
    
    @app.post("/login")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  10. lib/wasm/wasm_exec.js

    						sp >>>= 0;
    						const str = encoder.encode(String(loadValue(sp + 8)));
    						storeValue(sp + 16, str);
    						setInt64(sp + 24, str.length);
    					},
    
    					// valueLoadString(v ref, b []byte)
    					"syscall/js.valueLoadString": (sp) => {
    						sp >>>= 0;
    						const str = loadValue(sp + 8);
    						loadSlice(sp + 16).set(str);
    					},
    
    					// func valueInstanceOf(v ref, t ref) bool
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Aug 30 19:15:21 UTC 2024
    - 16.5K bytes
    - Viewed (0)
Back to top