Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 128 for Hawaii (0.16 sec)

  1. tests/test_http_connection_injection.py

        return value
    
    
    @app.websocket("/ws")
    async def get_value_by_ws(
        websocket: WebSocket, value: int = Depends(extract_value_from_http_connection)
    ):
        await websocket.accept()
        await websocket.send_json(value)
        await websocket.close()
    
    
    client = TestClient(app)
    
    
    def test_value_extracting_by_http():
        response = client.get("/http")
        assert response.status_code == 200
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 13:56:41 GMT 2020
    - 972 bytes
    - Viewed (0)
  2. docs_src/websockets/tutorial001.py

    </html>
    """
    
    
    @app.get("/")
    async def get():
        return HTMLResponse(html)
    
    
    @app.websocket("/ws")
    async def websocket_endpoint(websocket: WebSocket):
        await websocket.accept()
        while True:
            data = await websocket.receive_text()
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java

        // Now give the get() thread time to finish:
        assertTrue(earlyListener.wasRun.await(1, SECONDS));
    
        // Now test an additional addListener call, which will be run in-thread:
        RecordingRunnable lateListener = new RecordingRunnable();
        listenable.addListener(lateListener, directExecutor());
        assertTrue(lateListener.wasRun.await(1, SECONDS));
      }
    
      public void testAdapters_nullChecks() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  4. docs/ko/docs/tutorial/request-files.md

    * `seek(offset)`: 파일 내 `offset`(`int`) 위치의 바이트로 이동합니다.
        * 예) `await myfile.seek(0)` 를 사용하면 파일의 시작부분으로 이동합니다.
        * `await myfile.read()` 를 사용한 후 내용을 다시 읽을 때 유용합니다.
    * `close()`: 파일을 닫습니다.
    
    상기 모든 메소드들이 `async` 메소드이기 때문에 “await”을 사용하여야 합니다.
    
    예를들어, `async` *경로 작동 함수*의 내부에서 다음과 같은 방식으로 내용을 가져올 수 있습니다:
    
    ```Python
    contents = await myfile.read()
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java

        // Now give the get() thread time to finish:
        assertTrue(earlyListener.wasRun.await(1, SECONDS));
    
        // Now test an additional addListener call, which will be run in-thread:
        RecordingRunnable lateListener = new RecordingRunnable();
        listenable.addListener(lateListener, directExecutor());
        assertTrue(lateListener.wasRun.await(1, SECONDS));
      }
    
      public void testAdapters_nullChecks() throws Exception {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

                })
            .start();
    
        future.cancel(true);
    
        assertTrue(future.isCancelled());
        assertTrue(future.isDone());
    
        assertTrue(successLatch.await(200, MILLISECONDS));
        assertTrue(listenerLatch.await(200, MILLISECONDS));
    
        latch.countDown();
    
        exec.shutdown();
        exec.awaitTermination(100, MILLISECONDS);
      }
    
      /**
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

       */
      public void assertSuccess(Object expectedData) throws Throwable {
        // Verify that the listener executed in a reasonable amount of time.
        Assert.assertTrue(countDownLatch.await(1L, SECONDS));
    
        try {
          Assert.assertEquals(expectedData, future.get());
        } catch (ExecutionException e) {
          throw e.getCause();
        }
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

                })
            .start();
    
        future.cancel(true);
    
        assertTrue(future.isCancelled());
        assertTrue(future.isDone());
    
        assertTrue(successLatch.await(200, MILLISECONDS));
        assertTrue(listenerLatch.await(200, MILLISECONDS));
    
        latch.countDown();
    
        exec.shutdown();
        exec.awaitTermination(100, MILLISECONDS);
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  9. fastapi/exceptions.py

        ):
            if session is None:
                raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION)
            await websocket.accept()
            while True:
                data = await websocket.receive_text()
                await websocket.send_text(f"Session cookie is: {session}")
                await websocket.send_text(f"Message text was: {data}, for item ID: {item_id}")
        ```
        """
    
        def __init__(
            self,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  10. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

            new Object() {
              @Override
              protected void finalize() {
                latch.countDown();
              }
            };
        x = null; // Hint to the JIT that x is unreachable
        GcFinalization.await(latch);
        assertEquals(0, latch.getCount());
      }
    
      public void testAwaitDone_Future() {
        final SettableFuture<@Nullable Void> future = SettableFuture.create();
        Object x =
            new Object() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 7.4K bytes
    - Viewed (0)
Back to top