Search Options

Results per page
Sort
Preferred Languages
Advance

Results 241 - 250 of 566 for float (0.02 sec)

  1. docs/zh/docs/tutorial/body-nested-models.md

    其他有用的场景是当你想要接收其他类型的键时,例如 `int`。
    
    这也是我们在接下来将看到的。
    
    在下面的例子中,你将接受任意键为 `int` 类型并且值为 `float` 类型的 `dict`:
    
    {* ../../docs_src/body_nested_models/tutorial009_py39.py hl[7] *}
    
    /// tip
    
    请记住 JSON 仅支持将 `str` 作为键。
    
    但是 Pydantic 具有自动转换数据的功能。
    
    这意味着,即使你的 API 客户端只能将字符串作为键发送,只要这些字符串内容仅包含整数,Pydantic 就会对其进行转换并校验。
    
    然后你接收的名为 `weights` 的 `dict` 实际上将具有 `int` 类型的键和 `float` 类型的值。
    
    ///
    
    ## 总结
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/base/PredicatesTest.java

        assertTrue(isNumber.apply(Float.class));
      }
    
      @J2ktIncompatible
      @GwtIncompatible // Predicates.subtypeOf
      public void testSubtypeOf_interface() {
        Predicate<Class<?>> isComparable = Predicates.subtypeOf(Comparable.class);
    
        assertTrue(isComparable.apply(Integer.class));
        assertTrue(isComparable.apply(Float.class));
      }
    
      @J2ktIncompatible
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Oct 28 16:03:47 UTC 2025
    - 32.3K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/fess/query/BoostQueryCommand.java

        @Override
        protected String getQueryClassName() {
            return BoostQuery.class.getSimpleName();
        }
    
        @Override
        public QueryBuilder execute(final QueryContext context, final Query query, final float boost) {
            if (query instanceof final BoostQuery boostQuery) {
                if (logger.isDebugEnabled()) {
                    logger.debug("BoostQuery: query={}, boost={}", query, boost);
                }
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Fri Nov 28 16:29:12 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  4. docs_src/openapi_callbacks/tutorial001_py39.py

    from fastapi import APIRouter, FastAPI
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Invoice(BaseModel):
        id: str
        title: Union[str, None] = None
        customer: str
        total: float
    
    
    class InvoiceEvent(BaseModel):
        description: str
        paid: bool
    
    
    class InvoiceEventReceived(BaseModel):
        ok: bool
    
    
    invoices_callback_router = APIRouter()
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.3K bytes
    - Viewed (0)
  5. src/main/webapp/WEB-INF/view/common/admin/crud/breadcrumb.jsp

    <%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
    <ol class="breadcrumb float-sm-right">
    	<c:if test="${crudMode == null}">
    		<li class="breadcrumb-item active"><la:message key="labels.crud_link_list" /></li>
    	</c:if>
    	<c:if test="${crudMode != null}">
    		<li class="breadcrumb-item"><la:link href="../list">
    				<la:message key="labels.crud_link_list" />
    			</la:link></li>
    	</c:if>
    	<c:if test="${crudMode == 1}">
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Fri Feb 07 10:28:50 UTC 2020
    - 919 bytes
    - Viewed (0)
  6. tests/test_path.py

                    "input": "True",
                }
            ]
        }
    
    
    def test_path_float_42():
        response = client.get("/path/float/42")
        assert response.status_code == 200
        assert response.json() == 42
    
    
    def test_path_float_42_5():
        response = client.get("/path/float/42.5")
        assert response.status_code == 200
        assert response.json() == 42.5
    
    
    def test_path_bool_foobar():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 20.5K bytes
    - Viewed (2)
  7. android/guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

        // The values here look like 111...11101...010 in binary, where the initial 111...1110 takes
        // up exactly as many bits as can be represented in the significand (24 for float, 53 for
        // double). That final 0 should be rounded up to 1 because the remaining bits make that number
        // slightly nearer.
        long floatConversionTest = 0xfffffe8000000002L;
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Dec 11 20:45:32 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  8. src/main/webapp/WEB-INF/view/admin/dict/protwords/admin_dict_protwords.jsp

                                <la:message key="labels.dict_protwords_title"/>
                            </h1>
                        </div>
                        <div class="col-sm-6">
                            <ol class="breadcrumb float-sm-right">
                                <li class="breadcrumb-item"><la:link href="/admin/dict">
                                    <la:message key="labels.dict_list_link"/>
                                </la:link></li>
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Thu Nov 13 05:54:52 UTC 2025
    - 10.1K bytes
    - Viewed (0)
  9. tests/test_sub_callbacks.py

    from fastapi.testclient import TestClient
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Invoice(BaseModel):
        id: str
        title: Optional[str] = None
        customer: str
        total: float
    
    
    class InvoiceEvent(BaseModel):
        description: str
        paid: bool
    
    
    class InvoiceEventReceived(BaseModel):
        ok: bool
    
    
    invoices_callback_router = APIRouter()
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 12.9K bytes
    - Viewed (0)
  10. tests/test_validate_response.py

    from fastapi.exceptions import ResponseValidationError
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: Optional[float] = None
        owner_ids: Optional[list[int]] = None
    
    
    @app.get("/items/invalid", response_model=Item)
    def get_invalid():
        return {"name": "invalid", "price": "foo"}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 2K bytes
    - Viewed (0)
Back to top