Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 72 for Slice (0.17 sec)

  1. src/builtin/builtin.go

    // it has sufficient capacity, the destination is resliced to accommodate the
    // new elements. If it does not, a new underlying array will be allocated.
    // Append returns the updated slice. It is therefore necessary to store the
    // result of append, often in the variable holding the slice itself:
    //
    //	slice = append(slice, elem1, elem2)
    //	slice = append(slice, anotherSlice...)
    //
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  2. cmd/erasure-metadata-utils.go

    	// Shuffle slice xl metadata for expected distribution.
    	for index := range partsMetadata {
    		blockIndex := distribution[index]
    		shuffledPartsMetadata[blockIndex-1] = partsMetadata[index]
    	}
    	return shuffledPartsMetadata
    }
    
    // shuffleDisks - shuffle input disks slice depending on the
    // erasure distribution. Return shuffled slice of disks with
    // their expected distribution.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  3. doc/next/6-stdlib/99-minor/slices/65238.md

    The [Repeat] function returns a new slice that repeats the
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 101 bytes
    - Viewed (0)
  4. errors.go

    	// ErrEmptySlice empty slice found
    	ErrEmptySlice = errors.New("empty slice found")
    	// ErrDryRunModeUnsupported dry run mode unsupported
    	ErrDryRunModeUnsupported = errors.New("dry run mode unsupported")
    	// ErrInvalidDB invalid db
    	ErrInvalidDB = errors.New("invalid db")
    	// ErrInvalidValue invalid value
    	ErrInvalidValue = errors.New("invalid value, should be pointer to struct or slice")
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 02:53:17 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  5. tests/preload_test.go

    	DB.Preload("Pets.Toy").Find(&user4, "id = ?", user.ID)
    	CheckUser(t, *user4, user)
    }
    
    func TestNestedPreloadForSlice(t *testing.T) {
    	users := []User{
    		*GetUser("slice_nested_preload_1", Config{Pets: 2}),
    		*GetUser("slice_nested_preload_2", Config{Pets: 0}),
    		*GetUser("slice_nested_preload_3", Config{Pets: 3}),
    	}
    
    	for _, user := range users {
    		for idx, pet := range user.Pets {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  6. doc/go_spec.html

    The <i>capacity</i> is a measure of that extent: it is the sum of
    the length of the slice and the length of the array beyond the slice;
    a slice of length up to that capacity can be created by
    <a href="#Slice_expressions"><i>slicing</i></a> a new one from the original slice.
    The capacity of a slice <code>a</code> can be discovered using the
    built-in function <a href="#Length_and_capacity"><code>cap(a)</code></a>.
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 00:39:16 GMT 2024
    - 279.6K bytes
    - Viewed (0)
  7. internal/grid/types.go

    // When sent as a parameter, the caller gives up ownership of the byte slice.
    // When returned as response, the handler also gives up ownership of the byte slice.
    func NewBytesWith(b []byte) *Bytes {
    	bb := Bytes(b)
    	return &bb
    }
    
    // NewBytesWithCopyOf returns a new byte slice with a copy of the provided content.
    func NewBytesWithCopyOf(b []byte) *Bytes {
    	if b == nil {
    		bb := Bytes(nil)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 01 23:42:09 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  8. scan.go

    		}
    
    		switch reflectValue.Kind() {
    		case reflect.Slice, reflect.Array:
    			var (
    				elem        reflect.Value
    				isArrayKind = reflectValue.Kind() == reflect.Array
    			)
    
    			if !update || reflectValue.Len() == 0 {
    				update = false
    				if isArrayKind {
    					db.Statement.ReflectValue.Set(reflect.Zero(reflectValue.Type()))
    				} else {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Apr 26 09:53:11 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  9. cni/pkg/nodeagent/podcgroupns_test.go

    			expectContainerID: "",
    		},
    		{
    			name: "no container ID in cgroups",
    			cgroupPaths: []string{
    				"/user.slice",
    			},
    			expectPodUID:      "",
    			expectContainerID: "",
    		},
    		{
    			name: "one container ID in cgroups",
    			cgroupPaths: []string{
    				"/user.slice",
    				"/kubepods/pod2c48913c-b29f-11e7-9350-020968147796/9bca8d63d5fa610783847915bcff0ecac1273e5b4bed3f6fa1b07350e0135961",
    			},
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  10. cni/pkg/nodeagent/podcgroupns.go

    	// - /kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod2c48913c-b29f-11e7-9350-020968147796.slice/docker-9bca8d63d5fa610783847915bcff0ecac1273e5b4bed3f6fa1b07350e0135961.scope
    	// - /kubepods-besteffort-pod72f7f152_440c_66ac_9084_e0fc1d8a910c.slice:cri-containerd:b2a102854b4969b2ce98dc329c86b4fb2b06e4ad2cc8da9d8a7578c9cd2004a2"
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 11K bytes
    - Viewed (0)
Back to top