Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 414 for elem4 (0.1 sec)

  1. 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)
  2. 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)
  3. utils/utils_test.go

    		name  string
    		elems []string
    		elem  string
    		out   bool
    	}{
    		{"exists", []string{"1", "2", "3"}, "1", true},
    		{"not exists", []string{"1", "2", "3"}, "4", false},
    	}
    	for _, test := range containsTests {
    		t.Run(test.name, func(t *testing.T) {
    			if out := Contains(test.elems, test.elem); test.out != out {
    				t.Errorf("Contains(%v, %s) want: %t, got: %t", test.elems, test.elem, test.out, out)
    			}
    		})
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Feb 19 03:42:25 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. src/internal/abi/map.go

    const (
    	// Maximum number of key/elem pairs a bucket can hold.
    	MapBucketCountBits = 3 // log2 of number of elements in a bucket.
    	MapBucketCount     = 1 << MapBucketCountBits
    
    	// Maximum key or elem size to keep inline (instead of mallocing per element).
    	// Must fit in a uint8.
    	// Note: fast map functions cannot handle big elems (bigger than MapMaxElemBytes).
    	MapMaxKeyBytes  = 128
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 20:09:01 UTC 2024
    - 719 bytes
    - Viewed (0)
  5. utils/utils.go

    			if vv.IsValid() && !vv.IsZero() {
    				results[idx] = fmt.Sprint(reflect.Indirect(vv).Interface())
    			}
    		}
    	}
    
    	return strings.Join(results, "_")
    }
    
    func Contains(elems []string, elem string) bool {
    	for _, e := range elems {
    		if elem == e {
    			return true
    		}
    	}
    	return false
    }
    
    func AssertEqual(x, y interface{}) bool {
    	if reflect.DeepEqual(x, y) {
    		return true
    	}
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 22 06:43:02 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  6. src/cmd/vendor/github.com/google/pprof/internal/driver/html/stacks.js

      function addElem(src, elem) {
        let list = elems.get(src);
        if (!list) {
          list = [];
          elems.set(src, list);
        }
        list.push(elem);
        elem.classList.toggle('hilite', matches.has(src));
      }
    
      // Adds or removes cl from classList of all elements for the specified source.
      function toggleClass(src, cl, value) {
        const list = elems.get(src);
        if (list) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/iexport.go

    //
    //     type PointerType struct {
    //         Tag  itag // pointerType
    //         Elem typeOff
    //     }
    //
    //     type SliceType struct {
    //         Tag  itag // sliceType
    //         Elem typeOff
    //     }
    //
    //     type ArrayType struct {
    //         Tag  itag // arrayType
    //         Len  uint64
    //         Elem typeOff
    //     }
    //
    //     type ChanType struct {
    //         Tag  itag   // chanType
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 21 02:40:02 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  8. 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)
  9. src/go/types/mono.go

    	// parameters that it's implicitly parameterized by.
    	for scope := obj.Parent(); scope != root; scope = scope.Parent() {
    		for _, elem := range scope.elems {
    			if elem, ok := elem.(*TypeName); ok && !elem.IsAlias() && cmpPos(elem.Pos(), obj.Pos()) < 0 {
    				if tpar, ok := elem.Type().(*TypeParam); ok {
    					if idx < 0 {
    						idx = len(w.vertices)
    						w.vertices = append(w.vertices, monoVertex{obj: obj})
    					}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/mono.go

    	// parameters that it's implicitly parameterized by.
    	for scope := obj.Parent(); scope != root; scope = scope.Parent() {
    		for _, elem := range scope.elems {
    			if elem, ok := elem.(*TypeName); ok && !elem.IsAlias() && cmpPos(elem.Pos(), obj.Pos()) < 0 {
    				if tpar, ok := elem.Type().(*TypeParam); ok {
    					if idx < 0 {
    						idx = len(w.vertices)
    						w.vertices = append(w.vertices, monoVertex{obj: obj})
    					}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 00:05:29 UTC 2024
    - 9.1K bytes
    - Viewed (0)
Back to top