Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 664 for convert (0.58 sec)

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

            println("internal fun $CONVERT_ARGUMENT(argument: Any?, analysisSession: KtFirAnalysisSession): Any? {")
            withIndent {
                println("return $CONVERT_ARGUMENT(argument, analysisSession.firSymbolBuilder)")
            }
            println("}")
            println()
    
            println("private fun $CONVERT_ARGUMENT(argument: Any?, firSymbolBuilder: KtSymbolByFirBuilder): Any? {")
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Wed Oct 25 13:04:15 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/response-directly.md

    For example, you cannot put a Pydantic model in a `JSONResponse` without first converting it to a `dict` with all the data types (like `datetime`, `UUID`, etc) converted to JSON-compatible types.
    
    For those cases, you can use the `jsonable_encoder` to convert your data before passing it to a response:
    
    ```Python hl_lines="6-7  21-22"
    {!../../../docs_src/response_directly/tutorial001.py!}
    ```
    
    !!! note "Technical Details"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 3K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/encoder.md

    # JSON Compatible Encoder
    
    There are some cases where you might need to convert a data type (like a Pydantic model) to something compatible with JSON (like a `dict`, `list`, etc).
    
    For example, if you need to store it in a database.
    
    For that, **FastAPI** provides a `jsonable_encoder()` function.
    
    ## Using the `jsonable_encoder`
    
    Let's imagine that you have a database `fake_db` that only receives JSON compatible data.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  4. analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/contracts/descriptorContractUtils.kt

                            BooleanConstantReference.FALSE -> KtContractConstantType.FALSE
                            else -> error("Can't convert $value to the Analysis API")
                        },
                        analysisContext.token
                    )
                )
                else -> error("Can't convert $returnsEffect to the Analysis API")
            }
    
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Thu Dec 01 13:42:49 GMT 2022
    - 5.7K bytes
    - Viewed (0)
  5. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/contracts/firContractUtils.kt

                            else -> errorWithAttachment("Can't convert ${value::class} to the Analysis API") {
                                withEntry("value", value) { value.toString() }
                            }
                        },
                        builder.token
                    )
                )
                else -> errorWithAttachment("Can't convert ${returnsEffect::class} to the Analysis API")  {
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Wed Jul 26 14:29:20 GMT 2023
    - 7K bytes
    - Viewed (0)
  6. .github/ISSUE_TEMPLATE/tflite-converter-issue.md

    2)  Reference [TensorFlow Lite Model Colab](https://colab.research.google.com/gist/ymodak/0dfeb28255e189c5c48d9093f296e9a8/tensorflow-lite-debugger-colab.ipynb): Demonstrate how to convert your TF model to a TF Lite model (with quantization, if used) and run TFLite Inference (if possible).
    
    ```
    (You can paste links or attach files by dragging & dropping them below)
    Plain Text
    - Registered: Tue May 07 12:40:20 GMT 2024
    - Last Modified: Wed Jun 15 03:35:58 GMT 2022
    - 2.1K bytes
    - Viewed (0)
  7. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

        throttlePeriodUnit = unit
      }
    
      fun getThrottlePeriod(unit: TimeUnit): Long = unit.convert(throttlePeriodAmount, throttlePeriodUnit)
    
      fun setBodyDelay(
        delay: Long,
        unit: TimeUnit,
      ) = apply {
        bodyDelayAmount = delay
        bodyDelayUnit = unit
      }
    
      fun getBodyDelay(unit: TimeUnit): Long = unit.convert(bodyDelayAmount, bodyDelayUnit)
    
      fun setHeadersDelay(
        delay: Long,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/response-change-status-code.md

    But if the data didn't exist, you want to create it, and return an HTTP status code of "CREATED" `201`.
    
    But you still want to be able to filter and convert the data you return with a `response_model`.
    
    For those cases, you can use a `Response` parameter.
    
    ## Use a `Response` parameter
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/FormBodyTest.kt

        assertThat(formEncode(8)).isEqualTo("%08")
        assertThat(formEncode(9)).isEqualTo("%09")
        // Browsers convert '\n' to '\r\n'
        assertThat(formEncode(10)).isEqualTo("%0A")
        assertThat(formEncode(11)).isEqualTo("%0B")
        assertThat(formEncode(12)).isEqualTo("%0C")
        // Browsers convert '\r' to '\r\n'
        assertThat(formEncode(13)).isEqualTo("%0D")
        assertThat(formEncode(14)).isEqualTo("%0E")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/header-params.md

    Most of the standard headers are separated by a "hyphen" character, also known as the "minus symbol" (`-`).
    
    But a variable like `user-agent` is invalid in Python.
    
    So, by default, `Header` will convert the parameter names characters from underscore (`_`) to hyphen (`-`) to extract and document the headers.
    
    Also, HTTP headers are case-insensitive, so, you can declare them with standard Python style (also known as "snake_case").
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 5.8K bytes
    - Viewed (0)
Back to top