Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for IntN (0.14 sec)

  1. src/bytes/buffer_test.go

    	var buf Buffer
    	s := ""
    	for i := 0; i < 50; i++ {
    		wlen := rand.Intn(len(testString))
    		if i%2 == 0 {
    			s = fillString(t, "TestMixedReadsAndWrites (1)", &buf, s, 1, testString[0:wlen])
    		} else {
    			s = fillBytes(t, "TestMixedReadsAndWrites (1)", &buf, s, 1, testBytes[0:wlen])
    		}
    
    		rlen := rand.Intn(len(testString))
    		fub := make([]byte, rlen)
    		n, _ := buf.Read(fub)
    		s = s[n:]
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  2. src/bufio/bufio_test.go

    		}
    
    		// While not recommended, it is valid to append to a shifted buffer.
    		// This forces Write to copy the input.
    		if rn.Intn(8) == 0 && cap(b) > 0 {
    			b = b[1:1:cap(b)]
    		}
    
    		// Append a random integer of varying width.
    		n := int64(rn.Intn(1 << rn.Intn(30)))
    		want = append(strconv.AppendInt(want, n, 10), ' ')
    		b = append(strconv.AppendInt(b, n, 10), ' ')
    		w.Write(b)
    	}
    	w.Flush()
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  3. api/go1.22.txt

    pkg math/rand/v2, func Int32() int32 #61716
    pkg math/rand/v2, func Int32N(int32) int32 #61716
    pkg math/rand/v2, func Int64() int64 #61716
    pkg math/rand/v2, func Int64N(int64) int64 #61716
    pkg math/rand/v2, func IntN(int) int #61716
    pkg math/rand/v2, func N[$0 intType]($0) $0 #61716
    pkg math/rand/v2, func New(Source) *Rand #61716
    pkg math/rand/v2, func NewChaCha8([32]uint8) *ChaCha8 #61716
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Wed Jan 24 20:54:27 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  4. src/bytes/bytes_test.go

    		}
    	}
    }
    
    var makeFieldsInput = func() []byte {
    	x := make([]byte, 1<<20)
    	// Input is ~10% space, ~10% 2-byte UTF-8, rest ASCII non-space.
    	for i := range x {
    		switch rand.Intn(10) {
    		case 0:
    			x[i] = ' '
    		case 1:
    			if i > 0 && x[i-1] == 'x' {
    				copy(x[i-1:], "χ")
    				break
    			}
    			fallthrough
    		default:
    			x[i] = 'x'
    		}
    	}
    	return x
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  5. api/go1.txt

    pkg math/rand, func Int() int
    pkg math/rand, func Int31() int32
    pkg math/rand, func Int31n(int32) int32
    pkg math/rand, func Int63() int64
    pkg math/rand, func Int63n(int64) int64
    pkg math/rand, func Intn(int) int
    pkg math/rand, func New(Source) *Rand
    pkg math/rand, func NewSource(int64) Source
    pkg math/rand, func NewZipf(*Rand, float64, float64, uint64) *Zipf
    pkg math/rand, func NormFloat64() float64
    Plain Text
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Wed Aug 14 18:58:28 GMT 2013
    - 1.7M bytes
    - Viewed (1)
Back to top