Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 335 for SLICE (0.11 sec)

  1. src/go/types/slice.go

    // Source: ../../cmd/compile/internal/types2/slice.go
    
    // Copyright 2011 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package types
    
    // A Slice represents a slice type.
    type Slice struct {
    	elem Type
    }
    
    // NewSlice returns a new slice type for the given element type.
    func NewSlice(elem Type) *Slice { return &Slice{elem: elem} }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 701 bytes
    - Viewed (0)
  2. src/sort/slice.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package sort
    
    import (
    	"internal/reflectlite"
    	"math/bits"
    )
    
    // Slice sorts the slice x given the provided less function.
    // It panics if x is not a slice.
    //
    // The sort is not guaranteed to be stable: equal elements
    // may be reversed from their original order.
    // For a stable sort, use [SliceStable].
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 28 16:40:32 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  3. pkg/apis/resource/validation/validation_resourceslice_test.go

    				return slice
    			}(),
    		},
    		"resource-version": {
    			slice: func() *resource.ResourceSlice {
    				slice := testResourceSlice(goodName, goodName, driverName)
    				slice.ResourceVersion = "1"
    				return slice
    			}(),
    		},
    		"generation": {
    			slice: func() *resource.ResourceSlice {
    				slice := testResourceSlice(goodName, goodName, driverName)
    				slice.Generation = 100
    				return slice
    			}(),
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 14 17:07:36 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  4. src/slices/iter.go

    // returns the extended slice.
    func AppendSeq[Slice ~[]E, E any](s Slice, seq iter.Seq[E]) Slice {
    	for v := range seq {
    		s = append(s, v)
    	}
    	return s
    }
    
    // Collect collects values from seq into a new slice and returns it.
    func Collect[E any](seq iter.Seq[E]) []E {
    	return AppendSeq([]E(nil), seq)
    }
    
    // Sorted collects values from seq into a new slice, sorts the slice,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:40:32 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  5. src/encoding/gob/decgen.go

    		if state.b.Len() == 0 {
    			errorf("decoding %[1]s array or slice: length exceeds input size (%%d elements)", length)
    		}
    		if i >= len(slice) {
    			// This is a slice that we only partially allocated.
    			growSlice(v, &slice, length)
    		}
    		%[3]s
    	}
    	return true
    }
    `
    
    const trailer = `
    // growSlice is called for a slice that we only partially allocated,
    // to grow it up to length.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 14:15:38 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  6. pkg/registry/resource/resourceslice/strategy_test.go

    	ctx := genericapirequest.NewDefaultContext()
    	slice := slice.DeepCopy()
    
    	Strategy.PrepareForCreate(ctx, slice)
    	errs := Strategy.Validate(ctx, slice)
    	if len(errs) != 0 {
    		t.Errorf("unexpected error validating for create %v", errs)
    	}
    }
    
    func TestClassStrategyUpdate(t *testing.T) {
    	t.Run("no-changes-okay", func(t *testing.T) {
    		ctx := genericapirequest.NewDefaultContext()
    		slice := slice.DeepCopy()
    		newClass := slice.DeepCopy()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 14 17:07:36 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. 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...
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 26 20:34:28 UTC 2024
    - 326 bytes
    - Viewed (0)
  8. src/internal/reflectlite/swapper.go

    // slice.
    //
    // Swapper panics if the provided interface is not a slice.
    func Swapper(slice any) func(i, j int) {
    	v := ValueOf(slice)
    	if v.Kind() != Slice {
    		panic(&ValueError{Method: "Swapper", Kind: v.Kind()})
    	}
    	// Fast path for slices of size 0 and 1. Nothing to swap.
    	switch v.Len() {
    	case 0:
    		return func(i, j int) { panic("reflect: slice index out of range") }
    	case 1:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:30 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. doc/next/6-stdlib/3-iter.md

    - [All](/pkg/slices#All) returns an iterator over slice indexes and values.
    - [Values](/pkg/slices#Values) returns an iterator over slice elements.
    - [Backward](/pkg/slices#Backward) returns an iterator that loops over
      a slice backward.
    - [Collect](/pkg/slices#Collect) collects values from an iterator into
      a new slice.
    - [AppendSeq](/pkg/slices#AppendSeq) appends values from an iterator to
      an existing slice.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:13 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  10. src/crypto/internal/bigmod/nat_noasm.go

    func addMulVVW1024(z, x *uint, y uint) (c uint) {
    	return addMulVVW(unsafe.Slice(z, 1024/_W), unsafe.Slice(x, 1024/_W), y)
    }
    
    func addMulVVW1536(z, x *uint, y uint) (c uint) {
    	return addMulVVW(unsafe.Slice(z, 1536/_W), unsafe.Slice(x, 1536/_W), y)
    }
    
    func addMulVVW2048(z, x *uint, y uint) (c uint) {
    	return addMulVVW(unsafe.Slice(z, 2048/_W), unsafe.Slice(x, 2048/_W), y)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 15 07:52:41 UTC 2023
    - 664 bytes
    - Viewed (0)
Back to top