Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 156 for Slice (0.16 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. tests/associations_has_many_test.go

    		&Pet{Name: "pet-slice-append-1"},
    		[]*Pet{{Name: "pet-slice-append-2-1"}, {Name: "pet-slice-append-2-2"}},
    		&Pet{Name: "pet-slice-append-3"},
    	)
    
    	AssertAssociationCount(t, users, "Pets", 10, "After Append")
    
    	// Replace -> same as append
    	DB.Model(&users).Association("Pets").Replace(
    		[]*Pet{{Name: "pet-slice-replace-1-1"}, {Name: "pet-slice-replace-1-2"}},
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 15.6K bytes
    - Viewed (0)
  3. src/bytes/bytes.go

    // Fields interprets s as a sequence of UTF-8-encoded code points.
    // It splits the slice s around each instance of one or more consecutive white space
    // characters, as defined by unicode.IsSpace, returning a slice of subslices of s or an
    // empty slice if s contains only white space.
    func Fields(s []byte) [][]byte {
    	// First count the fields.
    	// This is an exact count if s is ASCII, otherwise it is an approximation.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  4. tests/helper_test.go

    		if len(user.Pets) != len(expect.Pets) {
    			t.Fatalf("pets should equal, expect: %v, got %v", len(expect.Pets), len(user.Pets))
    		}
    
    		sort.Slice(user.Pets, func(i, j int) bool {
    			return user.Pets[i].ID > user.Pets[j].ID
    		})
    
    		sort.Slice(expect.Pets, func(i, j int) bool {
    			return expect.Pets[i].ID > expect.Pets[j].ID
    		})
    
    		for idx, pet := range user.Pets {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 8K bytes
    - Viewed (0)
  5. tests/create_test.go

    		CheckPet(t, pet2, pet)
    	})
    
    	t.Run("Slice", func(t *testing.T) {
    		pets := []Pet{{
    			Name: "PolymorphicHasOne-Slice-1",
    			Toy:  Toy{Name: "Toy-PolymorphicHasOne-Slice-1"},
    		}, {
    			Name: "PolymorphicHasOne-Slice-2",
    			Toy:  Toy{Name: "Toy-PolymorphicHasOne-Slice-2"},
    		}, {
    			Name: "PolymorphicHasOne-Slice-3",
    			Toy:  Toy{Name: "Toy-PolymorphicHasOne-Slice-3"},
    		}}
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  6. callbacks/helper_test.go

    		expect clause.Values
    	}{
    		{
    			name: "Test convert slice of string value",
    			input: []map[string]interface{}{
    				{"name": "my name"},
    			},
    			expect: clause.Values{
    				Columns: []clause.Column{{Name: "name"}},
    				Values:  [][]interface{}{{"my name"}},
    			},
    		},
    		{
    			name: "Test convert slice of int value",
    			input: []map[string]interface{}{
    				{"age": 18},
    			},
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 05 02:22:57 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. cni/pkg/nodeagent/testdata/cgroupns/1/cgroup

    0::/system.slice/docker-8445c3ca20fac1d8e74854d84a7e6a57297ffb22809098b2816b31a428f2b777.scope/kubelet.slice/kubelet-kubepods.slice/kubelet-kubepods-besteffort.slice/kubelet-kubepods-besteffort-pod863b91d4_4b68_4efa_917f_4b560e3e86aa.slice/cri-containerd-75c7fe7ad0df679971e755bd97b84dd68a32e1eba8e8f99b01ab3c07196a3e4a.scope...
    Plain Text
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 326 bytes
    - Viewed (0)
  10. 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)
Back to top