Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 174 for Weights (0.05 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. impl/maven-core/src/test/java/org/apache/maven/lifecycle/internal/builder/multithreaded/SmartProjectComparatorTest.java

            long weightC = comparator.getProjectWeight(projectC);
            long weightX = comparator.getProjectWeight(projectX);
    
            // Project A should have the highest weight as it's at the root
            assertTrue(weightA > weightB, "Project A should have weight > Project B");
            assertTrue(weightA > weightC, "Project A should have weight > Project C");
            assertTrue(weightB > weightX, "Project B should have weight > Project X");
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Aug 06 12:03:40 GMT 2025
    - 8.9K bytes
    - Click Count (0)
  2. docs_src/body_nested_models/tutorial009_py39.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.post("/index-weights/")
    async def create_index_weights(weights: dict[int, float]):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 154 bytes
    - Click Count (0)
  3. tests/test_tutorial/test_body_nested_models/test_tutorial009.py

    def test_post_body(client: TestClient):
        data = {"2": 2.2, "3": 3.3}
        response = client.post("/index-weights/", json=data)
        assert response.status_code == 200, response.text
        assert response.json() == data
    
    
    def test_post_invalid_body(client: TestClient):
        data = {"foo": 2.2, "3": 3.3}
        response = client.post("/index-weights/", json=data)
        assert response.status_code == 422, response.text
        assert response.json() == {
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 4K bytes
    - Click Count (0)
  4. docs_src/extra_models/tutorial005_py39.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/keyword-weights/", response_model=dict[str, float])
    async def read_keyword_weights():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 180 bytes
    - Click Count (0)
  5. impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/builder/multithreaded/SmartProjectComparator.java

     * <ul>
     * <li>Project D: weight = 1 (no downstream dependencies)</li>
     * <li>Project B: weight = 2 (1 + max(D=1))</li>
     * <li>Project C: weight = 2 (1 + max(D=1))</li>
     * <li>Project A: weight = 3 (1 + max(B=2, C=2))</li>
     * </ul>
     * <p>Build order: A (weight=3), then B and C (weight=2, ordered by project ID), then D (weight=1)
     * <p>If projects have identical weights and IDs, the order is deterministic but may not preserve
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Aug 06 12:03:40 GMT 2025
    - 4.6K bytes
    - Click Count (0)
  6. fess-crawler/src/test/java/org/codelibs/fess/crawler/entity/RequestDataTest.java

            data.setUrl(null);
            assertNull(data.getUrl());
        }
    
        public void test_weightGetterSetter() {
            // Test weight getter/setter
            RequestData data = new RequestData();
    
            // Default weight should be 1.0
            assertEquals(1.0f, data.getWeight(), 0.001f);
    
            data.setWeight(0.5f);
            assertEquals(0.5f, data.getWeight(), 0.001f);
    
    Created: Sat Dec 20 11:21:39 GMT 2025
    - Last Modified: Thu Nov 13 13:29:22 GMT 2025
    - 8.2K bytes
    - Click Count (0)
  7. docs/de/docs/tutorial/body-nested-models.md

    Das bedeutet, dass Ihre API-Clients nur Strings senden können, aber solange diese Strings nur Zahlen enthalten, wird Pydantic sie konvertieren und validieren.
    
    Und das `dict`, welches Sie als `weights` erhalten, wird `int`-Schlüssel und `float`-Werte haben.
    
    ///
    
    ## Zusammenfassung { #recap }
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 7.6K bytes
    - Click Count (0)
  8. docs/es/docs/tutorial/body-nested-models.md

    Esto significa que, aunque tus clientes de API solo pueden enviar strings como claves, mientras esos strings contengan enteros puros, Pydantic los convertirá y validará.
    
    Y el `dict` que recibas como `weights` tendrá realmente claves `int` y valores `float`.
    
    ///
    
    ## Resumen { #recap }
    
    Con **FastAPI** tienes la máxima flexibilidad proporcionada por los modelos Pydantic, manteniendo tu código simple, corto y elegante.
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 7.2K bytes
    - Click Count (0)
  9. docs/en/docs/tutorial/body-nested-models.md

    This means that, even though your API clients can only send strings as keys, as long as those strings contain pure integers, Pydantic will convert them and validate them.
    
    And the `dict` you receive as `weights` will actually have `int` keys and `float` values.
    
    ///
    
    ## Recap { #recap }
    
    With **FastAPI** you have the maximum flexibility provided by Pydantic models, while keeping your code simple, short and elegant.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 6.7K bytes
    - Click Count (0)
  10. docs/ko/docs/tutorial/body-nested-models.md

    /// tip | 팁
    
    JSON은 오직 `str`형 키만 지원한다는 것을 염두에 두세요.
    
    하지만 Pydantic은 자동 데이터 변환이 있습니다.
    
    즉, API 클라이언트가 문자열을 키로 보내더라도 해당 문자열이 순수한 정수를 포함하는한 Pydantic은 이를 변환하고 검증합니다.
    
    그러므로 `weights`로 받은 `dict`는 실제로 `int` 키와 `float` 값을 가집니다.
    
    ///
    
    ## 요약
    
    **FastAPI**를 사용하면 Pydantic 모델이 제공하는 최대 유연성을 확보하면서 코드를 간단하고 짧게, 그리고 우아하게 유지할 수 있습니다.
    
    물론 아래의 이점도 있습니다:
    
    * 편집기 지원 (자동완성이 어디서나!)
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 7.3K bytes
    - Click Count (0)
Back to Top