- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 544 for strl (0.02 sec)
-
cmd/utils.go
func lcpSuffix(strs []string) string { return lcp(strs, false) } func lcp(strs []string, pre bool) string { // short-circuit empty list if len(strs) == 0 { return "" } xfix := strs[0] // short-circuit single-element list if len(strs) == 1 { return xfix } // compare first to rest for _, str := range strs[1:] { xfixl := len(xfix) strl := len(str)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 13 22:22:04 UTC 2024 - 31.9K bytes - Viewed (0) -
docs/en/docs/tutorial/query-params-str-validations.md
``` //// The query parameter `q` is of type `Union[str, None]` (or `str | None` in Python 3.10), that means that it's of type `str` but could also be `None`, and indeed, the default value is `None`, so FastAPI will know it's not required. /// note FastAPI will know that the value of `q` is not required because of the default value `= None`. The `Union` in `Union[str, None]` will allow your editor to give you better support and detect errors.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 25.4K bytes - Viewed (0) -
docs/zh/docs/tutorial/query-params-str-validations.md
``` 由于我们必须用 `Query(default=None)` 替换默认值 `None`,`Query` 的第一个参数同样也是用于定义默认值。 所以: ```Python q: Union[str, None] = Query(default=None) ``` ...使得参数可选,等同于: ```Python q: str = None ``` 但是 `Query` 显式地将其声明为查询参数。 然后,我们可以将更多的参数传递给 `Query`。在本例中,适用于字符串的 `max_length` 参数: ```Python q: Union[str, None] = Query(default=None, max_length=50) ``` 将会校验数据,在数据无效时展示清晰的错误信息,并在 OpenAPI 模式的*路径操作*中记录该参数。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.2K bytes - Viewed (0) -
docs/fr/docs/tutorial/query-params-str-validations.md
Le paramètre de requête `q` a pour type `Union[str, None]` (ou `str | None` en Python 3.10), signifiant qu'il est de type `str` mais pourrait aussi être égal à `None`, et bien sûr, la valeur par défaut est `None`, donc **FastAPI** saura qu'il n'est pas requis. /// note **FastAPI** saura que la valeur de `q` n'est pas requise grâce à la valeur par défaut `= None`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 17:14:38 UTC 2024 - 9.5K bytes - Viewed (0) -
docs/ko/docs/tutorial/query-params-str-validations.md
```Python hl_lines="9" {!../../docs_src/query_params_str_validations/tutorial001.py!} ``` 쿼리 매개변수 `q`는 `Optional[str]` 자료형입니다. 즉, `str` 자료형이지만 `None` 역시 될 수 있음을 뜻하고, 실제로 기본값은 `None`이기 때문에 FastAPI는 이 매개변수가 필수가 아니라는 것을 압니다. /// note | "참고" FastAPI는 `q`의 기본값이 `= None`이기 때문에 필수가 아님을 압니다. `Optional[str]`에 있는 `Optional`은 FastAPI가 사용하는게 아니지만, 편집기에게 더 나은 지원과 오류 탐지를 제공하게 해줍니다. /// ## 추가 검증
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.5K bytes - Viewed (0) -
docs/ja/docs/tutorial/query-params-str-validations.md
以下のアプリケーションを例にしてみましょう: ```Python hl_lines="9" {!../../docs_src/query_params_str_validations/tutorial001.py!} ``` クエリパラメータ `q` は `Optional[str]` 型で、`None` を許容する `str` 型を意味しており、デフォルトは `None` です。そのため、FastAPIはそれが必須ではないと理解します。 /// note | "備考" FastAPIは、 `q` はデフォルト値が `=None` であるため、必須ではないと理解します。 `Optional[str]` における `Optional` はFastAPIには利用されませんが、エディターによるより良いサポートとエラー検出を可能にします。 /// ## バリデーションの追加
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.5K bytes - Viewed (0) -
docs/nl/docs/python-types.md
```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial009.py!} ``` Door `Optional[str]` te gebruiken in plaats van alleen `str`, kan de editor je helpen fouten te detecteren waarbij je ervan uit zou kunnen gaan dat een waarde altijd een `str` is, terwijl het in werkelijkheid ook `None` zou kunnen zijn. `Optional[EenType]` is eigenlijk een snelkoppeling voor `Union[EenType, None]`, ze zijn equivalent.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 18.3K bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/execution/DefaultBuildResumptionDataRepository.java
String str1 = request.getResumeFrom(); if (properties.containsKey(REMAINING_PROJECTS) && !(str1 != null && !str1.isEmpty())) { String propertyValue = properties.getProperty(REMAINING_PROJECTS); Stream.of(propertyValue.split(PROPERTY_DELIMITER)) .filter(str -> str != null && !str.isEmpty())
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 4.9K bytes - Viewed (0) -
docs/ru/docs/python-types.md
{!../../docs_src/python_types/tutorial009.py!} ``` Использование `Optional[str]` вместо просто `str` позволит редактору помочь вам в обнаружении ошибок, в которых вы могли бы предположить, что значение всегда является `str`, хотя на самом деле это может быть и `None`. #### Generic-типы Эти типы принимают параметры в квадратных скобках: * `List` * `Tuple` * `Set` * `Dict` * `Optional` * ...и др.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 14.6K bytes - Viewed (0) -
callbacks.go
c.processor.callbacks = append(c.processor.callbacks, c) return c.processor.compile() } // getRIndex get right index from string slice func getRIndex(strs []string, str string) int { for i := len(strs) - 1; i >= 0; i-- { if strs[i] == str { return i } } return -1 } func sortCallbacks(cs []*callback) (fns []func(*DB), err error) { var ( names, sorted []string
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 26 03:33:36 UTC 2024 - 8.6K bytes - Viewed (0)