- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for str1 (0.09 sec)
-
src/expvar/expvar_test.go
m.Set("map1", &m1) m1.Add("a", 1) m1.Add("z", 2) m.Set("map2", &m2) for i := 0; i < 9; i++ { m2.Add(strconv.Itoa(i), int64(i)) } var s1, s2 String m.Set("str1", &s1) s1.Set("hello, world!") m.Set("str2", &s2) s2.Set("fizz buzz") b.ResetTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { _ = m.String() } } func BenchmarkRealworldExpvarUsage(b *testing.B) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:46:19 UTC 2024 - 13.4K bytes - Viewed (0) -
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 Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Jun 05 22:00:34 UTC 2024 - 31.9K bytes - Viewed (0) -
security/pkg/k8s/chiron/utils_test.go
} // Get the server port from server.URL (e.g., https://127.0.0.1:36253) func getServerPort(server *httptest.Server) (int, error) { strs := strings.Split(server.URL, ":") if len(strs) < 2 { return 0, fmt.Errorf("server.URL is invalid: %v", server.URL) } port, err := strconv.Atoi(strs[len(strs)-1]) if err != nil { return 0, fmt.Errorf("error to extract port from URL: %v", server.URL) } return port, nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 15 03:58:11 UTC 2024 - 13K bytes - Viewed (0) -
pkg/registry/core/pod/storage/storage_test.go
query: "foo:12345", location: expectedIP + ":12345", }, { pod: api.Pod{ ObjectMeta: metav1.ObjectMeta{Name: "foo"}, Spec: api.PodSpec{ Containers: []api.Container{ {Name: "ctr1"}, {Name: "ctr2", Ports: []api.ContainerPort{{ContainerPort: 9376}}}, }, }, Status: api.PodStatus{PodIPs: []api.PodIP{{IP: expectedIP}}}, }, query: "foo",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Feb 29 07:18:44 UTC 2024 - 38.8K 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`.
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri May 31 02:38:05 UTC 2024 - 25.8K bytes - Viewed (0) -
src/cmd/compile/internal/staticinit/sched.go
need++ } } if need == len(s) { return n } if need == 1 { var strs []string for _, c := range s { strs = append(strs, ir.StringVal(c)) } return ir.NewConstExpr(constant.MakeString(strings.Join(strs, "")), n) } newList := make([]ir.Node, 0, need) for i := 0; i < len(s); i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 17:16:14 UTC 2024 - 30.7K bytes - Viewed (0) -
src/cmd/compile/internal/walk/assign.go
slice.SetType(s.Type()) slice.SetBounded(true) ptr1, len1 := backingArrayPtrLen(cheapExpr(slice, &nodes)) ptr2, len2 := backingArrayPtrLen(l2) fn := typecheck.LookupRuntime("slicecopy", ptr1.Type().Elem(), ptr2.Type().Elem()) ncopy = mkcall1(fn, types.Types[types.TINT], &nodes, ptr1, len1, ptr2, len2, ir.NewInt(base.Pos, elemtype.Size())) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 17:09:06 UTC 2024 - 20.3K bytes - Viewed (0) -
docs/em/docs/tutorial/query-params-str-validations.md
{!> ../../../docs_src/query_params_str_validations/tutorial001_py310.py!} ``` π’ π’ `q` π `Union[str, None]` (βοΈ `str | None` π 3οΈβ£.1οΈβ£0οΈβ£), π β π β«οΈ π `str` βοΈ πͺ `None`, & π, π’ π² `None`, FastAPI π π β«οΈ π« β. !!! note FastAPI π π π π² `q` π« β β©οΈ π’ π² `= None`. `Union` `Union[str, None]` π β π π¨βπ¨ π€ π π πβπ¦Ί & π β. ## π π¬
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Mar 22 01:42:11 UTC 2024 - 11.9K bytes - Viewed (0) -
docs/ru/docs/tutorial/query-params-str-validations.md
=== "Python 3.10+" ```Python q: str | None = None ``` === "Python 3.8+" ```Python q: Union[str, None] = None ``` ΠΠΎΡ ΡΡΠΎ ΠΌΡ ΠΏΠΎΠ»ΡΡΠΈΠΌ, Π΅ΡΠ»ΠΈ ΠΎΠ±Π΅ΡΠ½ΡΠΌ ΡΡΠΎ Π² `Annotated`: === "Python 3.10+" ```Python q: Annotated[str | None] = None ``` === "Python 3.8+" ```Python q: Annotated[Union[str, None]] = None ```
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Mar 22 01:42:11 UTC 2024 - 38K bytes - Viewed (0) -
docs/de/docs/tutorial/query-params-str-validations.md
``` Der Query-Parameter `q` hat den Typ `Union[str, None]` (oder `str | None` in Python 3.10), was bedeutet, er ist entweder ein `str` oder `None`. Der Defaultwert ist `None`, also weiΓ FastAPI, der Parameter ist nicht erforderlich. !!! note "Hinweis" FastAPI weiΓ nur dank des definierten Defaultwertes `=None`, dass der Wert von `q` nicht erforderlich ist
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat Mar 30 17:58:59 UTC 2024 - 27.7K bytes - Viewed (0)