Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 392 for asSlice (0.11 sec)

  1. test/fixedbugs/issue5515.go

    package main
    
    type T uint32
    
    func main() {
            b := make([]T, 8)
            b[0] = 0xdeadbeef
            rs := Slice(b)
            sort(rs)
    }
    
    type Slice []T
    
    func (s Slice) Swap(i, j int) {
            tmp := s[i]
            s[i] = s[j]
            s[j] = tmp
    }
    
    type Interface interface {
            Swap(i, j int)
    }
    
    func sort(data Interface) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 12 03:23:21 UTC 2013
    - 597 bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/util/shufflesharding/shufflesharding_test.go

    		hand         []int
    		expectedSize int
    	}{
    		{
    			"nil slice",
    			nil,
    			6,
    		},
    		{
    			"empty slice",
    			make([]int, 0),
    			6,
    		},
    		{
    			"size: 6 cap: 6 slice",
    			make([]int, 6),
    			6,
    		},
    		{
    			"size: 6 cap: 12 slice",
    			make([]int, 6, 12),
    			6,
    		},
    		{
    			"size: 4 cap: 4 slice",
    			make([]int, 4),
    			6,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 25 06:44:08 UTC 2021
    - 6.7K bytes
    - Viewed (0)
  3. test/typeparam/issue47896.go

    package main
    
    import (
    	"database/sql"
    )
    
    // Collection generic interface which things can be added to.
    type Collection[T any] interface {
    	Add(T)
    }
    
    // Slice generic slice implementation of a Collection
    type Slice[T any] []*T
    
    func (s *Slice[T]) Add(t *T) {
    	*s = append(*s, t)
    }
    
    type Scanner interface {
    	Scan(...interface{}) error
    }
    
    type Mapper[T any] func(s Scanner, t T) error
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/tests/tf_data_fuse_map_and_batch.mlir

      // CHECK: %[[NPC:.*]] = "tf.Const"() <{value = dense<1> : tensor<i64>}>
      // CHECK: %[[TSLICE:.*]] = "tf.TensorSliceDataset"
      %3 = "tf.TensorSliceDataset"(%2) {device = "", output_shapes = [#tf_type.shape<>], metadata = ""} : (tensor<3xi32>) -> tensor<*x!tf_type.variant>
      // CHECK: "tf.MapAndBatchDataset"(%[[TSLICE]], %[[BSIZE:.*]], %[[NPC]]
      // CHECK-SAME: f = @"__inference_Dataset_map_<lambda>_80",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_security/test_tutorial003_an.py

        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_inactive_user():
        response = client.get("/users/me", headers={"Authorization": "Bearer alice"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Inactive user"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/authentication/request/x509/verify_options.go

    	}
    
    	return StaticVerifierFn(opts), nil
    }
    
    // StringSliceProvider is a way to get a string slice value.  It is heavily used for authentication headers among other places.
    type StringSliceProvider interface {
    	// Value returns the current string slice.  Callers should never mutate the returned value.
    	Value() []string
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 07 19:48:24 UTC 2019
    - 2.2K bytes
    - Viewed (0)
  7. tests/associations_belongs_to_test.go

    		&Company{Name: "company-slice-append-1"},
    		&Company{Name: "company-slice-append-2"},
    		&Company{Name: "company-slice-append-3"},
    	)
    
    	AssertAssociationCount(t, users, "Company", 3, "After Append")
    
    	DB.Model(&users).Association("Manager").Append(
    		GetUser("manager-slice-belongs-to-1", Config{}),
    		GetUser("manager-slice-belongs-to-2", Config{}),
    		GetUser("manager-slice-belongs-to-3", Config{}),
    	)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  8. src/go/doc/comment/testdata/doclink2.txt

    -- input --
    We use [io.Reader] a lot, and also a few map[io.Reader]string.
    
    Never [io.Reader]int or Slice[io.Reader] though.
    -- markdown --
    We use [io.Reader](/io#Reader) a lot, and also a few map\[io.Reader]string.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:31:42 UTC 2022
    - 268 bytes
    - Viewed (0)
  9. src/internal/types/testdata/check/go1_19_20.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Check Go language version-specific errors.
    
    //go:build go1.20
    
    package p
    
    type Slice []byte
    type Array [8]byte
    
    var s Slice
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 16:08:31 UTC 2023
    - 332 bytes
    - Viewed (0)
  10. test/typeparam/issue52117.dir/a.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    func Compare[T int | uint](a, b T) int {
    	return 0
    }
    
    type Slice[T int | uint] struct{}
    
    func (l Slice[T]) Comparator() func(v1, v2 T) int {
    	return Compare[T]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 28 20:14:34 UTC 2022
    - 333 bytes
    - Viewed (0)
Back to top