Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 278 for Slice (0.17 sec)

  1. 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)
  2. src/bytes/buffer.go

    // Bytes returns a slice of length b.Len() holding the unread portion of the buffer.
    // The slice is valid for use only until the next buffer modification (that is,
    // only until the next call to a method like [Buffer.Read], [Buffer.Write], [Buffer.Reset], or [Buffer.Truncate]).
    // The slice aliases the buffer content at least until the next buffer modification,
    // so immediate changes to the slice will affect the result of future reads.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  3. tests/associations_has_one_test.go

    		t.Errorf("account's number should not be saved")
    	}
    }
    
    func TestHasOneAssociationForSlice(t *testing.T) {
    	users := []User{
    		*GetUser("slice-hasone-1", Config{Account: true}),
    		*GetUser("slice-hasone-2", Config{Account: false}),
    		*GetUser("slice-hasone-3", Config{Account: true}),
    	}
    
    	DB.Create(&users)
    
    	// Count
    	AssertAssociationCount(t, users, "Account", 2, "")
    
    	// Find
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 6.8K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. src/main/webapp/js/admin/plugins/form-validator/sepa.js

    ="Z".charCodeAt(0)?b-"A".charCodeAt(0)+10:a}).join("");for(var b,c=a;c.length>2;)b=c.slice(0,9),c=(parseInt(b,10)%97).toString()+c.slice(b.length);return parseInt(c,10)%97===1},d=function(a){a=a.toUpperCase(),a=a.replace(/\s+/g,"");var c=a.slice(0,2),d=0,e="";for(d=0;d<b.length;++d)if(b[d][0]===c){e=b[d][2];break}if(""===e)return!1;var f=e.match(/(.{3})/g).map(function(a){var b,c=a.slice(0,1),d=parseInt(a.slice(1),10);switch(c){case"A":b="0-9A-Za-z";break;case"B":b="0-9A-Z";break;case"C":b="A-Za...
    JavaScript
    - Registered: Mon Apr 29 08:04:11 GMT 2024
    - Last Modified: Mon Jan 01 05:12:47 GMT 2018
    - 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. src/arena/arena.go

    //go:linkname runtime_arena_arena_New
    func runtime_arena_arena_New(arena unsafe.Pointer, typ any) any
    
    // Mark as noescape to avoid escaping the slice header.
    //
    //go:noescape
    //go:linkname runtime_arena_arena_Slice
    func runtime_arena_arena_Slice(arena unsafe.Pointer, slice any, cap int)
    
    //go:linkname runtime_arena_arena_Free
    func runtime_arena_arena_Free(arena unsafe.Pointer)
    
    //go:linkname runtime_arena_heapify
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Oct 12 20:23:36 GMT 2022
    - 4.3K bytes
    - Viewed (0)
  10. 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)
Back to top