Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 947 for asSlice (0.19 sec)

  1. 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)
  2. 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)
  3. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/NamedDomainObjectContainerExtensionsTest.kt

                on { register("doc") } doReturn doc
                on { getByName(eq("alice"), any<Action<DomainObject>>()) } doReturn alice
                on { create(eq("bob"), any<Action<DomainObject>>()) } doReturn bob
            }
    
            // regular syntax
            container.getByName("alice") {
                foo = "alice-foo"
            }
            container.create("bob") {
                foo = "bob-foo"
            }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jan 18 22:58:28 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  4. src/internal/trace/traceviewer/static/trace_viewer_full.html

    index++;oldIndex++;break;case EDIT_UPDATE:if(!splice)
    splice=newSplice(index,[],0);splice.addedCount++;index++;splice.removed.push(old[oldIndex]);oldIndex++;break;case EDIT_ADD:if(!splice)
    splice=newSplice(index,[],0);splice.addedCount++;index++;break;case EDIT_DELETE:if(!splice)
    splice=newSplice(index,[],0);splice.removed.push(old[oldIndex]);oldIndex++;break;}}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 20:45:06 UTC 2023
    - 2.5M bytes
    - Viewed (2)
  5. src/cmd/compile/internal/ssa/critical.go

    				// splitting occasionally leads to a phi having
    				// a single argument (occurs with -N)
    				// Don't increment i in this case because we moved
    				// an unprocessed predecessor down into slot i.
    			} else {
    				// splice it in
    				p.Succs[pi] = Edge{d, 0}
    				b.Preds[i] = Edge{d, 0}
    				d.Preds = append(d.Preds, Edge{p, pi})
    				d.Succs = append(d.Succs, Edge{b, i})
    				i++
    			}
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 16 21:40:11 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/assign.go

    	nif.Cond = ir.NewBinaryExpr(base.Pos, ir.OLE, nuint, scapuint)
    	nif.Likely = true
    
    	// then { s = s[:newLen] }
    	slice := ir.NewSliceExpr(base.Pos, ir.OSLICE, s, nil, newLen, nil)
    	slice.SetBounded(true)
    	nif.Body = []ir.Node{ir.NewAssignStmt(base.Pos, s, slice)}
    
    	// else { s = growslice(oldPtr, newLen, oldCap, num, T) }
    	call := walkGrowslice(s, nif.PtrInit(), oldPtr, newLen, oldCap, num)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  7. pkg/kubelet/cm/dra/plugin/noderesources.go

    			// like this in an existing slice.
    			continue
    		}
    
    		if numObsoleteSlices > 0 {
    			// Update one existing slice.
    			slice := obsoleteSlices[numObsoleteSlices-1]
    			numObsoleteSlices--
    			slice = slice.DeepCopy()
    			slice.ResourceModel = *resource
    			logger.V(5).Info("Reusing existing node resource slice", "slice", klog.KObj(slice))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 20:12:53 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/util/errors/errors_test.go

    	if err != nil {
    		t.Errorf("expected nil, got %#v", err)
    	}
    
    	// Append a non-nil error
    	slice = append(slice, fmt.Errorf("err"))
    	agg = NewAggregate(slice)
    	if agg == nil {
    		t.Errorf("expected non-nil")
    	}
    	if s := agg.Error(); s != "err" {
    		t.Errorf("expected 'err', got %q", s)
    	}
    	if s := agg.Errors(); len(s) != 1 {
    		t.Errorf("expected one-element slice, got %#v", s)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jul 24 13:16:21 UTC 2022
    - 12.7K bytes
    - Viewed (0)
  9. operator/pkg/tpath/struct.go

    func Set(val, out any) error {
    	// Special case: map out type must be set through map ptr.
    	if util.IsMap(val) && util.IsMapPtr(out) {
    		reflect.ValueOf(out).Elem().Set(reflect.ValueOf(val))
    		return nil
    	}
    	if util.IsSlice(val) && util.IsSlicePtr(out) {
    		reflect.ValueOf(out).Elem().Set(reflect.ValueOf(val))
    		return nil
    	}
    
    	if reflect.TypeOf(val) != reflect.TypeOf(out) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 4.4K 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...
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 26 20:34:28 UTC 2024
    - 326 bytes
    - Viewed (0)
Back to top