Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 2,632 for i$ (0.08 sec)

  1. src/reflect/iter.go

    			v = v.Elem()
    			for i := range v.Len() {
    				if !yield(ValueOf(i), v.Index(i)) {
    					return
    				}
    			}
    		}
    	case Array, Slice:
    		return func(yield func(Value, Value) bool) {
    			for i := range v.Len() {
    				if !yield(ValueOf(i), v.Index(i)) {
    					return
    				}
    			}
    		}
    	case String:
    		return func(yield func(Value, Value) bool) {
    			for i, v := range v.String() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 13:40:11 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  2. src/crypto/rc4/rc4.go

    func NewCipher(key []byte) (*Cipher, error) {
    	k := len(key)
    	if k < 1 || k > 256 {
    		return nil, KeySizeError(k)
    	}
    	var c Cipher
    	for i := 0; i < 256; i++ {
    		c.s[i] = uint32(i)
    	}
    	var j uint8 = 0
    	for i := 0; i < 256; i++ {
    		j += uint8(c.s[i]) + key[i%k]
    		c.s[i], c.s[j] = c.s[j], c.s[i]
    	}
    	return &c, nil
    }
    
    // Reset zeros the key data and makes the [Cipher] unusable.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  3. src/reflect/benchmark_test.go

    	for i := 0; i < b.N; i++ {
    		sinkAll.RawBytes = sourceAll.NamedBytes.Bytes()
    	}
    }
    
    func BenchmarkBytesArray(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		sinkAll.RawBytes = sourceAll.BytesArray.Bytes()
    	}
    }
    
    func BenchmarkSliceLen(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		sinkAll.RawInt = sourceAll.SliceAny.Len()
    	}
    }
    
    func BenchmarkMapLen(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Nov 19 17:09:03 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  4. src/os/path_unix.go

    		path = path[1:]
    	}
    
    	i := len(path) - 1
    
    	// Remove trailing slashes.
    	for ; i > 0 && path[i] == '/'; i-- {
    		path = path[:i]
    	}
    
    	// if no slashes in path, base is path
    	basename := path
    
    	// Remove leading directory path
    	for i--; i >= 0; i-- {
    		if path[i] == '/' {
    			if i == 0 {
    				dirname = path[:1]
    			} else {
    				dirname = path[:i]
    			}
    			basename = path[i+1:]
    			break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:44:48 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  5. cmd/metrics-v2_gen_test.go

    	v := MetricDescription{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsgMetricDescription(b *testing.B) {
    	v := MetricDescription{}
    	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: Sun Mar 10 09:15:15 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/test/testdata/pgo/devirtualize/mult.pkg/mult.go

    func MultFn(a, b int64) int64 {
    	for i := 0; i < 1000; i++ {
    		sink++
    	}
    	return a * b
    }
    
    func NegMultFn(a, b int64) int64 {
    	for i := 0; i < 1000; i++ {
    		sink++
    	}
    	return -1 * a * b
    }
    
    //go:noinline
    func MultClosure() MultFunc {
    	// Explicit closure to differentiate from AddClosure.
    	c := 1
    	return func(a, b int64) int64 {
    		for i := 0; i < 1000; i++ {
    			sink++
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 13 18:17:57 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. src/strings/reader.go

    	if r.i >= int64(len(r.s)) {
    		r.prevRune = -1
    		return 0, 0, io.EOF
    	}
    	r.prevRune = int(r.i)
    	if c := r.s[r.i]; c < utf8.RuneSelf {
    		r.i++
    		return rune(c), 1, nil
    	}
    	ch, size = utf8.DecodeRuneInString(r.s[r.i:])
    	r.i += int64(size)
    	return
    }
    
    // UnreadRune implements the [io.RuneScanner] interface.
    func (r *Reader) UnreadRune() error {
    	if r.i <= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:10:31 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  8. src/image/jpeg/huffman.go

    	vals [maxNCodes]uint8
    	// minCodes[i] is the minimum code of length i, or -1 if there are no
    	// codes of that length.
    	minCodes [maxCodeLength]int32
    	// maxCodes[i] is the maximum code of length i, or -1 if there are no
    	// codes of that length.
    	maxCodes [maxCodeLength]int32
    	// valsIndices[i] is the index into vals of minCodes[i].
    	valsIndices [maxCodeLength]int32
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:08:05 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  9. test/escape_slice.go

    var sink interface{}
    
    func slice0() {
    	var s []*int
    	// BAD: i should not escape
    	i := 0 // ERROR "moved to heap: i"
    	s = append(s, &i)
    	_ = s
    }
    
    func slice1() *int {
    	var s []*int
    	i := 0 // ERROR "moved to heap: i"
    	s = append(s, &i)
    	return s[0]
    }
    
    func slice2() []*int {
    	var s []*int
    	i := 0 // ERROR "moved to heap: i"
    	s = append(s, &i)
    	return s
    }
    
    func slice3() *int {
    	var s []*int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 18:50:24 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  10. testing/performance/src/templates/native-dependents-resources/googleTest/libs/googleTest/1.7.0/include/gtest/internal/gtest-type-util.h.pump

    // Types template.
    
    $range i 1..n
    template <$for i, [[typename T$i = internal::None]]>
    struct Types {
      typedef internal::Types$n<$for i, [[T$i]]> type;
    };
    
    template <>
    struct Types<$for i, [[internal::None]]> {
      typedef internal::Types0 type;
    };
    
    $range i 1..n-1
    $for i [[
    $range j 1..i
    $range k i+1..n
    template <$for j, [[typename T$j]]>
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 9.1K bytes
    - Viewed (0)
Back to top