- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 596 for elem1 (0.06 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/cache/lruexpirecache_test.go
expectNotEntry(t, c, "elem2") expectEntry(t, c, "elem1", "1") expectEntry(t, c, "elem3", "3") expectEntry(t, c, "elem4", "4") expectEntry(t, c, "elem5", "5") } func TestLRUKeys(t *testing.T) { c := NewLRUExpireCache(4) c.Add("elem1", "1", 10*time.Hour) c.Add("elem2", "2", 10*time.Hour) c.Add("elem3", "3", 10*time.Hour) c.Add("elem4", "4", 10*time.Hour)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 03 18:40:48 UTC 2023 - 4.3K bytes - Viewed (0) -
test/typeparam/sliceimp.dir/a.go
} // Reduce reduces a []Elem1 to a single value of type Elem2 using // a reduction function. func Reduce[Elem1, Elem2 any](s []Elem1, initializer Elem2, f func(Elem2, Elem1) Elem2) Elem2 { r := initializer for _, v := range s { r = f(r, v) } return r } // Filter filters values from a slice using a filter function. func Filter[Elem any](s []Elem, f func(Elem) bool) []Elem { var r []Elem for _, v := range s {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 30 01:55:58 UTC 2021 - 3.3K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue44799.go
// license that can be found in the LICENSE file. package main func Map[F, T any](s []F, f func(F) T) []T { return nil } func Reduce[Elem1, Elem2 any](s []Elem1, initializer Elem2, f func(Elem2, Elem1) Elem2) Elem2 { var x Elem2; return x } func main() { var s []int var f1 func(int) float64 var f2 func(float64, int) float64 _ = Map[int](s, f1) _ = Map(s, f1) _ = Reduce[int](s, 0, f2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 02:58:32 UTC 2022 - 530 bytes - Viewed (0) -
test/typeparam/slices.go
return r } // _Reduce reduces a []Elem1 to a single value of type Elem2 using // a reduction function. func _Reduce[Elem1, Elem2 any](s []Elem1, initializer Elem2, f func(Elem2, Elem1) Elem2) Elem2 { r := initializer for _, v := range s { r = f(r, v) } return r } // _Filter filters values from a slice using a filter function. func _Filter[Elem any](s []Elem, f func(Elem) bool) []Elem { var r []Elem for _, v := range s {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 7.8K bytes - Viewed (0) -
test/escape_reflect.go
v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Slice(1, 2).Bytes() } func elem1(x *int) int { // ERROR "x does not escape" v := reflect.ValueOf(x) return int(v.Elem().Int()) } func elem2(x *string) string { // ERROR "leaking param: x to result ~r0 level=1" v := reflect.ValueOf(x) return string(v.Elem().String()) } type S struct { A int B *int C string }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 18:50:24 UTC 2023 - 13.1K bytes - Viewed (0) -
src/fmt/doc.go
pointer: %p For compound objects, the elements are printed using these rules, recursively, laid out like this: struct: {field0 field1 ...} array, slice: [elem0 elem1 ...] maps: map[key1:value1 key2:value2 ...] pointer to above: &{}, &[], &map[] Width is specified by an optional decimal number immediately preceding the verb.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:56:20 UTC 2024 - 14.6K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Sets.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Sun Jun 02 13:36:19 UTC 2024 - 77.3K bytes - Viewed (0) -
guava/src/com/google/common/collect/Sets.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 78.8K bytes - Viewed (0) -
src/encoding/gob/encoder_test.go
type Bug1Elem struct { Name string Id int } type Bug1StructMap map[string]Bug1Elem func TestMapBug1(t *testing.T) { in := make(Bug1StructMap) in["val1"] = Bug1Elem{"elem1", 1} in["val2"] = Bug1Elem{"elem2", 2} b := new(bytes.Buffer) enc := NewEncoder(b) err := enc.Encode(in) if err != nil { t.Fatal("encode:", err) } dec := NewDecoder(b) out := make(Bug1StructMap)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 29.7K bytes - Viewed (0) -
test/fixedbugs/issue17449.go
package master type PriorityList struct { elems []interface{} } func (x *PriorityList) Len() int { return len(x.elems) } func (l *PriorityList) remove(i int) interface{} { elem := l.elems[i] l.elems = append(l.elems[:i], l.elems[i+1:]...) return elem } func (l *PriorityList) Next() interface{} { return l.remove(l.Len() - 1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 1K bytes - Viewed (0)