Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for Rnd (0.02 sec)

  1. src/internal/trace/mud_test.go

    	"testing"
    )
    
    func TestMUD(t *testing.T) {
    	// Insert random uniforms and check histogram mass and
    	// cumulative sum approximations.
    	rnd := rand.New(rand.NewSource(42))
    	mass := 0.0
    	var mud mud
    	for i := 0; i < 100; i++ {
    		area, l, r := rnd.Float64(), rnd.Float64(), rnd.Float64()
    		if rnd.Intn(10) == 0 {
    			r = l
    		}
    		t.Log(l, r, area)
    		mud.add(l, r, area)
    		mass += area
    
    		// Check total histogram weight.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. src/image/jpeg/writer_test.go

    	imgYCbCr := image.NewYCbCr(bo, image.YCbCrSubsampleRatio444)
    	rnd := rand.New(rand.NewSource(123))
    	// Create identical rgba and ycbcr images.
    	for y := bo.Min.Y; y < bo.Max.Y; y++ {
    		for x := bo.Min.X; x < bo.Max.X; x++ {
    			col := color.RGBA{
    				uint8(rnd.Intn(256)),
    				uint8(rnd.Intn(256)),
    				uint8(rnd.Intn(256)),
    				255,
    			}
    			imgRGBA.SetRGBA(x, y, col)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:30 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  3. platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/excludes/simple/DefaultCompositeExcludeTest.groovy

        }
    
        ExcludeSpec next() {
            try {
                int rnd = random.nextInt(9)
                if (depth++ == MAX_DEPTH) {
                    // avoid too deep levels
                    rnd = rnd % 6
                }
                if (cached.size() >= MAX_CACHED) {
                    rnd = 0 // always use a cached value
                }
                switch (rnd) {
                    case 0:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/server/filters/goaway.go

    	return &goaway{
    		handler: inner,
    		decider: &probabilisticGoawayDecider{
    			chance: chance,
    			next: func() float64 {
    				rnd := randPool.Get().(*rand.Rand)
    				ret := rnd.Float64()
    				randPool.Put(rnd)
    				return ret
    			},
    		},
    	}
    }
    
    // goaway send a GOAWAY to client according to decider for HTTP2 requests
    type goaway struct {
    	handler http.Handler
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jun 28 20:27:28 UTC 2020
    - 2.4K bytes
    - Viewed (0)
  5. src/cmd/link/internal/amd64/obj.go

    			*ld.FlagRound = 0x200000
    		}
    		if *ld.FlagTextAddr == -1 {
    			*ld.FlagTextAddr = ld.Rnd(0x200000, *ld.FlagRound) + int64(ld.HEADR)
    		}
    
    	case objabi.Hdarwin: /* apple MACH */
    		ld.HEADR = ld.INITIAL_MACHO_HEADR
    		if *ld.FlagRound == -1 {
    			*ld.FlagRound = 4096
    		}
    		if *ld.FlagTextAddr == -1 {
    			*ld.FlagTextAddr = ld.Rnd(0x1000000, *ld.FlagRound) + int64(ld.HEADR)
    		}
    
    	case objabi.Hlinux, /* elf64 executable */
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 19:32:19 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  6. src/cmd/link/internal/arm64/obj.go

    		}
    		if *ld.FlagTextAddr == -1 {
    			*ld.FlagTextAddr = ld.Rnd(4096, *ld.FlagRound) + int64(ld.HEADR)
    		}
    
    	case objabi.Hlinux, /* arm64 elf */
    		objabi.Hfreebsd,
    		objabi.Hnetbsd,
    		objabi.Hopenbsd:
    		ld.Elfinit(ctxt)
    		ld.HEADR = ld.ELFRESERVE
    		if *ld.FlagRound == -1 {
    			*ld.FlagRound = 0x10000
    		}
    		if *ld.FlagTextAddr == -1 {
    			*ld.FlagTextAddr = ld.Rnd(0x10000, *ld.FlagRound) + int64(ld.HEADR)
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 19:32:19 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  7. src/cmd/link/internal/arm/obj.go

    		ld.Exitf("unknown -H option: %v", ctxt.HeadType)
    
    	case objabi.Hplan9: /* plan 9 */
    		ld.HEADR = 32
    		if *ld.FlagRound == -1 {
    			*ld.FlagRound = 4096
    		}
    		if *ld.FlagTextAddr == -1 {
    			*ld.FlagTextAddr = ld.Rnd(4096, *ld.FlagRound) + int64(ld.HEADR)
    		}
    
    	case objabi.Hlinux, /* arm elf */
    		objabi.Hfreebsd,
    		objabi.Hnetbsd,
    		objabi.Hopenbsd:
    		*ld.FlagD = false
    		// with dynamic linking
    		ld.Elfinit(ctxt)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 19:32:19 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  8. src/cmd/link/internal/x86/obj.go

    		if *ld.FlagTextAddr == -1 {
    			*ld.FlagTextAddr = ld.Rnd(4096, *ld.FlagRound) + int64(ld.HEADR)
    		}
    
    	case objabi.Hlinux, /* elf32 executable */
    		objabi.Hfreebsd,
    		objabi.Hnetbsd,
    		objabi.Hopenbsd:
    		ld.Elfinit(ctxt)
    
    		ld.HEADR = ld.ELFRESERVE
    		if *ld.FlagRound == -1 {
    			*ld.FlagRound = 4096
    		}
    		if *ld.FlagTextAddr == -1 {
    			*ld.FlagTextAddr = ld.Rnd(0x08048000, *ld.FlagRound) + int64(ld.HEADR)
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 19:32:19 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

      public void testLexicographicalComparatorLongInputs() {
        Random rnd = new Random();
        for (Comparator<byte[]> comparator :
            Arrays.asList(
                UnsignedBytes.lexicographicalComparator(),
                UnsignedBytes.lexicographicalComparatorJavaImpl())) {
          for (int trials = 10; trials-- > 0; ) {
            byte[] left = new byte[1 + rnd.nextInt(32)];
            rnd.nextBytes(left);
            byte[] right = left.clone();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java

      public void testLexicographicalComparatorLongInputs() {
        Random rnd = new Random();
        for (Comparator<byte[]> comparator :
            Arrays.asList(
                UnsignedBytes.lexicographicalComparator(),
                UnsignedBytes.lexicographicalComparatorJavaImpl())) {
          for (int trials = 10; trials-- > 0; ) {
            byte[] left = new byte[1 + rnd.nextInt(32)];
            rnd.nextBytes(left);
            byte[] right = left.clone();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 20 17:00:05 UTC 2024
    - 13.4K bytes
    - Viewed (0)
Back to top