Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 177 for function (0.2 sec)

  1. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/FirSyntheticFunctionInterfaceSourceProvider.kt

                else -> null
            }
        }
    
        private fun provideSourceForInvokeFunction(function: FirSimpleFunction): PsiElement? {
            val classId = function.containingClassLookupTag()?.classId ?: return null
            val classOrObject = classByClassId(classId, function.llFirSession.ktModule) ?: return null
            return classOrObject.declarations.singleOrNull()
        }
    
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Fri Jun 02 14:27:26 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  2. docs/en/docs/how-to/nosql-databases-couchbase.md

    ## Get the user
    
    Now create a function that will:
    
    * Take a username.
    * Generate a document ID from it.
    * Get the document with that ID.
    * Put the contents of the document in a `UserInDB` model.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 6K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/first-steps.md

    ### Step 4: define the **path operation function**
    
    This is our "**path operation function**":
    
    * **path**: is `/`.
    * **operation**: is `get`.
    * **function**: is the function below the "decorator" (below `@app.get("/")`).
    
    ```Python hl_lines="7"
    {!../../../docs_src/first_steps/tutorial001.py!}
    ```
    
    This is a Python function.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/middleware.md

    ## Create a middleware
    
    To create a middleware you use the decorator `@app.middleware("http")` on top of a function.
    
    The middleware function receives:
    
    * The `request`.
    * A function `call_next` that will receive the `request` as a parameter.
        * This function will pass the `request` to the corresponding *path operation*.
        * Then it returns the `response` generated by the corresponding *path operation*.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  5. docs/en/docs/reference/background.md

    # Background Tasks - `BackgroundTasks`
    
    You can declare a parameter in a *path operation function* or dependency function with the type `BackgroundTasks`, and then you can use it to schedule the execution of background tasks after the response is sent.
    
    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import BackgroundTasks
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 377 bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/SuppressSignatureCheck.kt

    import kotlin.annotation.AnnotationRetention.BINARY
    import kotlin.annotation.AnnotationTarget.CLASS
    import kotlin.annotation.AnnotationTarget.CONSTRUCTOR
    import kotlin.annotation.AnnotationTarget.FUNCTION
    
    @Retention(BINARY)
    @Documented
    @Target(CONSTRUCTOR, CLASS, FUNCTION)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 990 bytes
    - Viewed (0)
  7. docs/en/docs/how-to/custom-request-and-route.md

    Next, we create a custom subclass of `fastapi.routing.APIRoute` that will make use of the `GzipRequest`.
    
    This time, it will overwrite the method `APIRoute.get_route_handler()`.
    
    This method returns a function. And that function is what will receive a request and return a response.
    
    Here we use it to create a `GzipRequest` from the original request.
    
    ```Python hl_lines="18-26"
    {!../../../docs_src/custom_request_and_route/tutorial001.py!}
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/security/get-current-user.md

    # Get Current User
    
    In the previous chapter the security system (which is based on the dependency injection system) was giving the *path operation function* a `token` as a `str`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="12"
        {!> ../../../docs_src/security/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="11"
        {!> ../../../docs_src/security/tutorial001_an.py!}
        ```
    
    === "Python 3.8+ non-Annotated"
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  9. .teamcity/src/main/kotlin/model/bucket-extensions.kt

     *
     * @param list the list to split, must be ordered by size desc
     * @param toIntFunction the function used to map the element to its "size"
     * @param largeElementSplitFunction the function used to further split the large element into smaller pieces
     * @param smallElementAggregateFunction the function used to aggregate tiny elements into a large bucket
    Plain Text
    - Registered: Wed Apr 24 11:36:11 GMT 2024
    - Last Modified: Thu Nov 17 05:17:44 GMT 2022
    - 4K bytes
    - Viewed (0)
  10. docs/en/docs/how-to/async-sql-encode-databases.md

    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    
    ## Read notes
    
    Create the *path operation function* to read notes:
    
    ```Python hl_lines="55-58"
    {!../../../docs_src/async_sql_databases/tutorial001.py!}
    ```
    
    !!! note
        Notice that as we communicate with the database using `await`, the *path operation function* is declared with `async`.
    
    ### Notice the `response_model=List[Note]`
    
    It uses `typing.List`.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.3K bytes
    - Viewed (0)
Back to top