Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 554 for int (0.15 sec)

  1. schema/relationship_test.go

    	type Toy struct {
    		ID        int
    		Name      string
    		OwnerID   int
    		OwnerType string
    	}
    	type User struct {
    		ID  int
    		Cat struct {
    			Name string
    			Toy  Toy   `gorm:"polymorphic:Owner;"`
    			Toys []Toy `gorm:"polymorphic:Owner;"`
    		} `gorm:"embedded;embeddedPrefix:cat_"`
    		Dog struct {
    			ID     int
    			Name   string
    			UserID int
    			Toy    Toy   `gorm:"polymorphic:Owner;"`
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  2. docs/debugging/hash-set/main.go

    // in the slices returned.
    func hashOrder(key string, cardinality int) []int {
    	if cardinality <= 0 {
    		// Returns an empty int slice for cardinality < 0.
    		return nil
    	}
    
    	nums := make([]int, cardinality)
    	keyCrc := crc32.Checksum([]byte(key), crc32.IEEETable)
    
    	start := int(keyCrc % uint32(cardinality))
    	for i := 1; i <= cardinality; i++ {
    		nums[i-1] = 1 + ((start + i) % cardinality)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  3. cmd/erasure-server-pool-decom.go

    func (p *poolMeta) DecommissionComplete(idx int) bool {
    	if p.Pools[idx].Decommission != nil && !p.Pools[idx].Decommission.Complete {
    		p.Pools[idx].LastUpdate = UTCNow()
    		p.Pools[idx].Decommission.Complete = true
    		p.Pools[idx].Decommission.Failed = false
    		p.Pools[idx].Decommission.Canceled = false
    		return true
    	}
    	return false
    }
    
    func (p *poolMeta) DecommissionFailed(idx int) bool {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 41.3K bytes
    - Viewed (1)
  4. cmd/peer-s3-client.go

    	GetHost() string
    	SetPools([]int)
    	GetPools() []int
    }
    
    type localPeerS3Client struct {
    	node  Node
    	pools []int
    }
    
    func (l *localPeerS3Client) GetHost() string {
    	return l.node.Host
    }
    
    func (l *localPeerS3Client) SetPools(p []int) {
    	l.pools = make([]int, len(p))
    	copy(l.pools, p)
    }
    
    func (l localPeerS3Client) GetPools() []int {
    	return l.pools
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.8K bytes
    - Viewed (0)
  5. cmd/erasure_test.go

    // Setup for erasureCreateFile and erasureReadFile tests.
    type erasureTestSetup struct {
    	dataBlocks   int
    	parityBlocks int
    	blockSize    int64
    	diskPaths    []string
    	disks        []StorageAPI
    }
    
    // Returns an initialized setup for erasure tests.
    func newErasureTestSetup(tb testing.TB, dataBlocks int, parityBlocks int, blockSize int64) (*erasureTestSetup, error) {
    	diskPaths := make([]string, dataBlocks+parityBlocks)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Jul 25 19:37:26 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  6. cmd/benchmark-utils_test.go

    func generateBytesData(size int) []byte {
    	// repeat the random character chosen size
    	return bytes.Repeat(getRandomByte(), size)
    }
    
    // Parallel benchmark utility functions for ObjectLayer.PutObject().
    // Creates Object layer setup ( MakeBucket ) and then runs the PutObject benchmark.
    func runPutObjectBenchmarkParallel(b *testing.B, obj ObjectLayer, objSize int) {
    	// obtains random bucket name.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  7. schema/serializer.go

    	rv := reflect.ValueOf(fieldValue)
    	switch v := fieldValue.(type) {
    	case int64, int, uint, uint64, int32, uint32, int16, uint16:
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	case *int64, *int, *uint, *uint64, *int32, *uint32, *int16, *uint16:
    		if rv.IsZero() {
    			return nil, nil
    		}
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	default:
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Mar 18 08:28:46 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  8. internal/s3select/sql/record.go

    		v, err := iter.Float()
    		if err != nil {
    			return nil, err
    		}
    		return v, nil
    	case simdjson.TypeInt:
    		v, err := iter.Int()
    		if err != nil {
    			return nil, err
    		}
    		return v, nil
    	case simdjson.TypeUint:
    		v, err := iter.Int()
    		if err != nil {
    			// Can't fit into int, convert to float.
    			v, err := iter.Float()
    			return v, err
    		}
    		return v, nil
    	case simdjson.TypeBool:
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.4K bytes
    - Viewed (0)
  9. misc/cgo/gmp/gmp.go

    func (z *Int) Mod(x, y *Int) *Int {
    	x.doinit()
    	y.doinit()
    	z.doinit()
    	C.mpz_tdiv_r(&z.i[0], &x.i[0], &y.i[0])
    	return z
    }
    
    // Lsh sets z = x << s and returns z.
    func (z *Int) Lsh(x *Int, s uint) *Int {
    	x.doinit()
    	z.doinit()
    	C._mpz_mul_2exp(&z.i[0], &x.i[0], C.ulong(s))
    	return z
    }
    
    // Rsh sets z = x >> s and returns z.
    func (z *Int) Rsh(x *Int, s uint) *Int {
    	x.doinit()
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 9.5K bytes
    - Viewed (0)
  10. internal/http/request-recorder.go

    	buf bytes.Buffer
    	// total bytes read including header size
    	bytesRead int
    }
    
    // Close is a no operation closer
    func (r *RequestRecorder) Close() error {
    	// no-op
    	return nil
    }
    
    // Read reads from the internal reader and counts/save the body in the memory
    func (r *RequestRecorder) Read(p []byte) (n int, err error) {
    	n, err = r.Reader.Read(p)
    	r.bytesRead += n
    
    	if r.LogBody {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Apr 12 21:37:19 GMT 2023
    - 1.8K bytes
    - Viewed (0)
Back to top