Search Options

Results per page
Sort
Preferred Languages
Advance

Results 201 - 210 of 1,072 for Str (0.09 sec)

  1. android/guava-tests/test/com/google/common/collect/CollectSpliteratorsTest.java

        SpliteratorTester.of(
                () ->
                    CollectSpliterators.flatMap(
                        Arrays.spliterator(new String[] {"abc", "", "de", "f", "g", ""}),
                        (String str) -> str.isEmpty() ? null : charactersOf(str).spliterator(),
                        Spliterator.SIZED | Spliterator.DISTINCT | Spliterator.NONNULL,
                        7))
            .expect('a', 'b', 'c', 'd', 'e', 'f', 'g');
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. docs_src/body_multiple_params/tutorial001_an.py

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)],
        q: Union[str, None] = None,
        item: Union[Item, None] = None,
    ):
        results = {"item_id": item_id}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 639 bytes
    - Viewed (0)
  3. docs_src/path_operation_configuration/tutorial003.py

    from typing import Set, Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
    
    
    @app.post(
        "/items/",
        response_model=Item,
        summary="Create an item",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 517 bytes
    - Viewed (0)
  4. tests/test_annotated.py

    app = FastAPI()
    
    
    @app.get("/default")
    async def default(foo: Annotated[str, Query()] = "foo"):
        return {"foo": foo}
    
    
    @app.get("/required")
    async def required(foo: Annotated[str, Query(min_length=1)]):
        return {"foo": foo}
    
    
    @app.get("/multiple")
    async def multiple(foo: Annotated[str, object(), Query(min_length=1)]):
        return {"foo": foo}
    
    
    @app.get("/unrelated")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. docs_src/path_operation_configuration/tutorial004_py39.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: set[str] = set()
    
    
    @app.post("/items/", response_model=Item, summary="Create an item")
    async def create_item(item: Item):
        """
        Create an item with all the information:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 676 bytes
    - Viewed (0)
  6. docs_src/path_operation_configuration/tutorial002_py39.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: set[str] = set()
    
    
    @app.post("/items/", response_model=Item, tags=["items"])
    async def create_item(item: Item):
        return item
    
    
    @app.get("/items/", tags=["items"])
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 575 bytes
    - Viewed (0)
  7. docs/pt/docs/python-types.md

    ```Python hl_lines="1 4"
    {!../../docs_src/python_types/tutorial009.py!}
    ```
    
    O uso de `Optional[str]` em vez de apenas `str` permitirá que o editor o ajude a detectar erros, onde você pode estar assumindo que um valor é sempre um `str`, quando na verdade também pode ser `None`.
    
    `Optional[Something]` é na verdade um atalho para `Union[Something, None]`, eles são equivalentes.
    
    Isso também significa que no Python 3.10, você pode utilizar `Something | None`:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 15 12:32:27 UTC 2024
    - 18K bytes
    - Viewed (0)
  8. src/main/java/jcifs/dcerpc/DcerpcHandle.java

                        String server = str.substring(mark, si).trim();
                        if ( server.length() == 0 ) {
                            // this can also be a v6 address within brackets, look ahead required
                            int nexts = str.indexOf('[', si + 1);
                            int nexte = str.indexOf(']', si);
                            if ( nexts >= 0 && nexte >= 0 && nexte == nexts - 1 ) {
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jun 30 10:11:57 UTC 2019
    - 12.9K bytes
    - Viewed (0)
  9. docs_src/body_multiple_params/tutorial001_an_py310.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)],
        q: str | None = None,
        item: Item | None = None,
    ):
        results = {"item_id": item_id}
        if q:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 579 bytes
    - Viewed (0)
  10. tests/test_repeated_cookie_headers.py

        response.set_cookie("cookie-name", "cookie-value")
        return {}
    
    
    def set_indirect_cookie(*, dep: str = Depends(set_cookie)):
        return dep
    
    
    @app.get("/directCookie")
    def get_direct_cookie(dep: str = Depends(set_cookie)):
        return {"dep": dep}
    
    
    @app.get("/indirectCookie")
    def get_indirect_cookie(dep: str = Depends(set_indirect_cookie)):
        return {"dep": dep}
    
    
    client = TestClient(app)
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Jun 13 12:44:51 UTC 2020
    - 792 bytes
    - Viewed (0)
Back to top