Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,493 for i$ (0.54 sec)

  1. src/reflect/iter_test.go

    		{"func", ValueOf(func(f func(int, int) bool) {
    			for i := range 4 {
    				f(i, i+1)
    			}
    		}), func(t *testing.T, s iter.Seq2[Value, Value]) {
    			i := int64(0)
    			for v1, v2 := range s {
    				if v1.Int() != i {
    					t.Fatalf("got %d, want %d", v1.Int(), i)
    				}
    				i++
    				if v2.Int() != i {
    					t.Fatalf("got %d, want %d", v2.Int(), i)
    				}
    			}
    			if i != 4 {
    				t.Fatalf("should loop four times")
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 14:27:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  2. src/strconv/itoa.go

    		return append(dst, small(int(i))...)
    	}
    	dst, _ = formatBits(dst, i, base, false, true)
    	return dst
    }
    
    // small returns the string for an i with 0 <= i < nSmalls.
    func small(i int) string {
    	if i < 10 {
    		return digits[i : i+1]
    	}
    	return smallsString[i*2 : i*2+2]
    }
    
    const nSmalls = 100
    
    const smallsString = "00010203040506070809" +
    	"10111213141516171819" +
    	"20212223242526272829" +
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. src/crypto/tls/common_string.go

    )
    
    var (
    	_CurveID_index_0 = [...]uint8{0, 9, 18, 27}
    )
    
    func (i CurveID) String() string {
    	switch {
    	case 23 <= i && i <= 25:
    		i -= 23
    		return _CurveID_name_0[_CurveID_index_0[i]:_CurveID_index_0[i+1]]
    	case i == 29:
    		return _CurveID_name_1
    	case i == 25497:
    		return _CurveID_name_2
    	default:
    		return "CurveID(" + strconv.FormatInt(int64(i), 10) + ")"
    	}
    }
    func _() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 14:56:25 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  4. src/internal/runtime/atomic/atomic_andor_test.go

    	done := make(chan bool)
    	for i := 0; i < 32; i++ {
    		m := ^uint32(1 << i)
    		go func() {
    			for i := range a {
    				atomic.And(&a[i], m)
    			}
    			done <- true
    		}()
    	}
    	for i := 0; i < 32; i++ {
    		<-done
    	}
    
    	// Check that the array has been totally cleared.
    	for i, v := range a {
    		if v != 0 {
    			t.Fatalf("a[%v] not cleared: want %#x, got %#x", i, uint32(0), v)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Apr 27 20:49:32 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. src/reflect/swapper.go

    			return func(i, j int) { ps[i], ps[j] = ps[j], ps[i] }
    		}
    		if typ.Kind() == abi.String {
    			ss := *(*[]string)(v.ptr)
    			return func(i, j int) { ss[i], ss[j] = ss[j], ss[i] }
    		}
    	} else {
    		switch size {
    		case 8:
    			is := *(*[]int64)(v.ptr)
    			return func(i, j int) { is[i], is[j] = is[j], is[i] }
    		case 4:
    			is := *(*[]int32)(v.ptr)
    			return func(i, j int) { is[i], is[j] = is[j], is[i] }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:30 UTC 2024
    - 2K bytes
    - Viewed (0)
  6. src/internal/trace/batchcursor.go

    }
    
    func heapSiftUp(heap []*batchCursor, i int) int {
    	for i > 0 && heap[(i-1)/2].ev.time > heap[i].ev.time {
    		heap[(i-1)/2], heap[i] = heap[i], heap[(i-1)/2]
    		i = (i - 1) / 2
    	}
    	return i
    }
    
    func heapSiftDown(heap []*batchCursor, i int) int {
    	for {
    		m := min3(heap, i, 2*i+1, 2*i+2)
    		if m == i {
    			// Heap invariant already applies.
    			break
    		}
    		heap[i], heap[m] = heap[m], heap[i]
    		i = m
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  7. pkg/test/framework/components/echo/instances.go

    }
    
    func (i Instances) NamespacedName() NamespacedName {
    	return i.Config().NamespacedName()
    }
    
    func (i Instances) PortForName(name string) Port {
    	return i.Config().Ports.MustForName(name)
    }
    
    func (i Instances) Config() Config {
    	return i.mustGetFirst().Config()
    }
    
    func (i Instances) Instances() Instances {
    	return i
    }
    
    func (i Instances) mustGetFirst() Instance {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 25 18:26:17 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  8. src/internal/stringslite/strings.go

    			return i
    		}
    		i++
    		fails++
    		if fails >= 4+i>>4 && i < t {
    			// See comment in ../bytes/bytes.go.
    			j := bytealg.IndexRabinKarp(s[i:], substr)
    			if j < 0 {
    				return -1
    			}
    			return i + j
    		}
    	}
    	return -1
    }
    
    func Cut(s, sep string) (before, after string, found bool) {
    	if i := Index(s, sep); i >= 0 {
    		return s[:i], s[i+len(sep):], true
    	}
    	return s, "", false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 04 01:23:42 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  9. src/sync/example_test.go

    		sum := 0
    		for i := 0; i < 1000; i++ {
    			sum += i
    		}
    		fmt.Println("Computed once:", sum)
    		return sum
    	})
    	done := make(chan bool)
    	for i := 0; i < 10; i++ {
    		go func() {
    			const want = 499500
    			got := once()
    			if got != want {
    				fmt.Println("want", want, "got", got)
    			}
    			done <- true
    		}()
    	}
    	for i := 0; i < 10; i++ {
    		<-done
    	}
    	// Output:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 23 17:45:47 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  10. src/internal/weak/pointer_test.go

    	wt := make([]weak.Pointer[T], 10)
    	for i := range bt {
    		bt[i] = new(T)
    		wt[i] = weak.Make(bt[i])
    	}
    	for i := range bt {
    		st := wt[i].Strong()
    		if st != bt[i] {
    			t.Fatalf("weak pointer is not the same as strong pointer: %p vs. %p", st, bt[i])
    		}
    		if wp := weak.Make(st); wp != wt[i] {
    			t.Fatalf("new weak pointer not equal to existing weak pointer: %v vs. %v", wp, wt[i])
    		}
    		if i == 0 {
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 21:25:11 UTC 2024
    - 3.1K bytes
    - Viewed (0)
Back to top