Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 91 - 100 of 1,598 for yield (0.03 seconds)

  1. fastapi/.agents/skills/fastapi/SKILL.md

    from fastapi import Body, FastAPI
    from pydantic import Field
    
    app = FastAPI()
    
    
    @app.post("/items/")
    async def create_items(items: Annotated[list[int], Field(min_length=1), Body()]):
        return items
    ```
    
    instead of:
    
    ```python
    # DO NOT DO THIS
    from typing import Annotated
    
    from fastapi import FastAPI
    from pydantic import Field, RootModel
    
    app = FastAPI()
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 10:05:57 GMT 2026
    - 10.1K bytes
    - Click Count (0)
  2. docs/zh-hant/docs/tutorial/middleware.md

    - 它會攔截進到應用程式的每個**請求**。
    - 然後可以對該**請求**做一些處理或執行所需的程式碼。
    - 接著把**請求**傳遞給應用程式的其餘部分(某個*路徑操作*)處理。
    - 之後再接收應用程式(某個*路徑操作*)所產生的**回應**。
    - 可以對該**回應**做一些處理或執行所需的程式碼。
    - 然後回傳**回應**。
    
    /// note | 技術細節
    
    如果你有使用帶有 `yield` 的相依性,其釋放階段的程式碼會在中介軟體之後執行。
    
    若有背景工作(在[背景工作](background-tasks.md)一節會介紹,你稍後會看到),它們會在所有中介軟體之後執行。
    
    ///
    
    ## 建立中介軟體 { #create-a-middleware }
    
    要建立中介軟體,將裝飾器 `@app.middleware("http")` 加在函式上方。
    
    中介軟體函式會接收:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  3. src/test/java/jcifs/smb/WinErrorTest.java

        @DisplayName("Unknown codes: lookup returns empty Optional")
        void lookup_returns_empty_for_unknown_codes(int unknownCode) {
            // Invalid inputs: codes not present should yield no message
            // Guard to ensure test remains valid if constants change in future
            for (int c : WinError.WINERR_CODES) {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 8.4K bytes
    - Click Count (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/HttpHeaders.kt

    }
    
    /**
     * Returns true if the response headers and status indicate that this response has a (possibly
     * 0-length) body. See RFC 7231.
     */
    fun Response.promisesBody(): Boolean {
      // HEAD requests never yield a body regardless of the response headers.
      if (request.method == "HEAD") {
        return false
      }
    
      val responseCode = code
      if ((responseCode < HTTP_CONTINUE || responseCode >= 200) &&
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 7.2K bytes
    - Click Count (0)
  5. src/main/java/jcifs/smb/NtlmPasswordAuthenticator.java

                log.warn("NTLMv1 NTLM response is deprecated and insecure. Consider using NTLMv2.");
                yield NtlmUtil.getNTLMResponse(getPasswordAsCharArray(), chlng);
            }
            case 3, 4, 5 -> {
                // NTLMv2 - returns empty for unicode hash as NTLMv2 doesn't use it
                yield new byte[0];
            }
            default -> {
                // Default to NTLMv2 behavior (empty response)
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sun Aug 31 08:00:57 GMT 2025
    - 30.3K bytes
    - Click Count (0)
  6. fastapi/param_functions.py

        scope: Annotated[
            Literal["function", "request"] | None,
            Doc(
                """
                Mainly for dependencies with `yield`, define when the dependency function
                should start (the code before `yield`) and when it should end (the code
                after `yield`).
    
                * `"function"`: start the dependency before the *path operation function*
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 68K bytes
    - Click Count (0)
  7. src/main/java/jcifs/smb/SID.java

     * A Windows SID is a numeric identifier used to represent Windows
     * accounts. SIDs are commonly represented using a textual format such as
     * {@code S-1-5-21-1496946806-2192648263-3843101252-1029} but they may
     * also be resolved to yield the name of the associated Windows account
     * such as {@code Administrators} or {@code MYDOM\alice}.
     * <p>
     * Consider the following output of {@code examples/SidLookup.java}:
     *
     * <pre>
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 16K bytes
    - Click Count (0)
  8. src/main/java/jcifs/SID.java

     * accounts. SIDs are commonly represented using a textual format such as
     * <code>S-1-5-21-1496946806-2192648263-3843101252-1029</code> but they may
     * also be resolved to yield the name of the associated Windows account
     * such as <code>Administrators</code> or <code>MYDOM\alice</code>.
     * <p>
     * Consider the following output of <code>examples/SidLookup.java</code>:
     *
     * <pre>
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 5.4K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

          afe.initCause(t);
          throw afe;
        }
      }
    
      /**
       * Delays, via Thread.sleep, for the given millisecond delay, but if the sleep is shorter than
       * specified, may re-sleep or yield until time elapses.
       */
      @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait?
      static void delay(long millis) throws InterruptedException {
        long startTime = System.nanoTime();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 02:20:33 GMT 2026
    - 8.8K bytes
    - Click Count (0)
  10. android/guava/src/com/google/common/eventbus/Dispatcher.java

        // a multithreaded environment for a couple of reasons:
        //
        // 1. Subscribers to events posted on different threads can be interleaved with each other
        //    freely. (A event on one thread, B event on another could yield any of
        //    [a1, a2, a3, b1, b2], [a1, b2, a2, a3, b2], [a1, b2, b3, a2, a3], etc.)
        // 2. It's possible for subscribers to actually be dispatched to in a different order than they
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 7.4K bytes
    - Click Count (0)
Back to Top