Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of about 10,000 for i$ (0.03 sec)

  1. src/maps/maps_test.go

    	}
    	for i := 0; i < 8; i++ {
    		if m2[i] != m[i] {
    			t.Errorf("m2[%d] = %d, want %d", i, m2[i], m[i])
    		}
    	}
    }
    
    func TestCloneWithMapAssign(t *testing.T) {
    	var m = make(map[int]int)
    	const N = 25
    	for i := 0; i < N; i++ {
    		m[i] = i
    	}
    	m2 := Clone(m)
    	if len(m2) != N {
    		t.Errorf("len2(m2) = %d, want %d", len(m2), N)
    	}
    	for i := 0; i < N; i++ {
    		if m2[i] != m[i] {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 17:05:56 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  2. src/fmt/format.go

    		switch base {
    		case 2:
    			// Add a leading 0b.
    			i--
    			buf[i] = 'b'
    			i--
    			buf[i] = '0'
    		case 8:
    			if buf[i] != '0' {
    				i--
    				buf[i] = '0'
    			}
    		case 16:
    			// Add a leading 0x or 0X.
    			i--
    			buf[i] = digits[16]
    			i--
    			buf[i] = '0'
    		}
    	}
    	if verb == 'O' {
    		i--
    		buf[i] = 'o'
    		i--
    		buf[i] = '0'
    	}
    
    	if negative {
    		i--
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:31:55 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  3. src/internal/fuzz/queue_test.go

    	}
    
    	// As we add elements, len should grow.
    	N := 32
    	for i := 0; i < N; i++ {
    		q.enqueue(i)
    		if n := q.len; n != i+1 {
    			t.Fatalf("after adding %d elements, queue has len %d", i, n)
    		}
    		if v, ok := q.peek(); !ok {
    			t.Fatalf("couldn't peek after adding %d elements", i)
    		} else if v.(int) != 0 {
    			t.Fatalf("after adding %d elements, peek is %d; want 0", i, v)
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 02 17:58:51 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  4. internal/bucket/bandwidth/monitor_gen_test.go

    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsgBucketBandwidthReport(b *testing.B) {
    	v := BucketBandwidthReport{}
    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 19 22:54:46 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  5. cmd/tier-last-day-stats_gen_test.go

    	v := DailyAllTierStats{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsgDailyAllTierStats(b *testing.B) {
    	v := DailyAllTierStats{}
    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		bts, _ = v.MarshalMsg(bts[0:0])
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 19 22:54:46 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  6. src/encoding/gob/dec_helpers.go

    		return false
    	}
    	for i := 0; i < length; i++ {
    		if state.b.Len() == 0 {
    			errorf("decoding bool array or slice: length exceeds input size (%d elements)", length)
    		}
    		if i >= len(slice) {
    			// This is a slice that we only partially allocated.
    			growSlice(v, &slice, length)
    		}
    		slice[i] = state.decodeUint() != 0
    	}
    	return true
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 24 19:28:46 UTC 2023
    - 15.4K bytes
    - Viewed (0)
  7. src/regexp/syntax/prog.go

    }
    
    // skipNop follows any no-op or capturing instructions.
    func (p *Prog) skipNop(pc uint32) *Inst {
    	i := &p.Inst[pc]
    	for i.Op == InstNop || i.Op == InstCapture {
    		i = &p.Inst[i.Out]
    	}
    	return i
    }
    
    // op returns i.Op but merges all the Rune special cases into InstRune
    func (i *Inst) op() InstOp {
    	op := i.Op
    	switch op {
    	case InstRune1, InstRuneAny, InstRuneAnyNotNL:
    		op = InstRune
    	}
    	return op
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:50:01 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  8. pkg/test/framework/components/echo/match/matcher.go

    }
    
    // Any indicates whether any echo.Instance matches this matcher.
    func (m Matcher) Any(i echo.Instances) bool {
    	for _, i := range i {
    		if m(i) {
    			return true
    		}
    	}
    	return false
    }
    
    func (m Matcher) All(i echo.Instances) bool {
    	for _, i := range i {
    		if !m(i) {
    			return false
    		}
    	}
    
    	return true
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 21 20:45:12 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  9. pkg/kube/krt/index.go

    // Index maintains a simple index over an informer
    type Index[I any, K comparable] struct {
    	mu      sync.RWMutex
    	objects map[K]sets.Set[Key[I]]
    	c       Collection[I]
    	extract func(o I) []K
    }
    
    // Lookup finds all objects matching a given key
    func (i *Index[I, K]) Lookup(k K) []I {
    	i.mu.RLock()
    	defer i.mu.RUnlock()
    	var res []I
    	for obj := range i.objects[k] {
    		item := i.c.GetKey(obj)
    		if item == nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 04:53:45 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  10. pilot/pkg/serviceregistry/util/workloadinstances/index.go

    	if wi.Endpoint.Address != "" {
    		i.ipToKeys.Insert(wi.Endpoint.Address, key)
    	}
    	return previous
    }
    
    // Delete implements Index.
    func (i *index) Delete(wi *model.WorkloadInstance) *model.WorkloadInstance {
    	i.mu.Lock()
    	defer i.mu.Unlock()
    
    	key := i.keyFunc(wi)
    	previous := i.keyToInstance[key]
    	if previous != nil {
    		i.ipToKeys.Delete(previous.Endpoint.Address, key)
    	}
    	i.ipToKeys.Delete(wi.Endpoint.Address, key)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 16 05:45:36 UTC 2023
    - 4.1K bytes
    - Viewed (0)
Back to top