Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 166 for elem1 (0.11 sec)

  1. test/typeparam/list2.go

    		l.insertValue(e.Value, &l.root)
    	}
    }
    
    // Transform runs a transform function on a list returning a new list.
    func _Transform[TElem1, TElem2 any](lst *_List[TElem1], f func(TElem1) TElem2) *_List[TElem2] {
    	ret := _New[TElem2]()
    	for p := lst.Front(); p != nil; p = p.Next() {
    		ret.PushBack(f(p.Value))
    	}
    	return ret
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  2. src/cmd/vendor/github.com/google/pprof/internal/driver/config.go

    func (cfg *config) fieldPtr(f configField) interface{} {
    	// reflect.ValueOf: converts to reflect.Value
    	// Elem: dereferences cfg to make *cfg
    	// FieldByIndex: fetches the field
    	// Addr: takes address of field
    	// Interface: converts back from reflect.Value to a regular value
    	return reflect.ValueOf(cfg).Elem().FieldByIndex(f.field.Index).Addr().Interface()
    }
    
    // get returns the value of field f in cfg.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 15:19:53 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  3. pkg/api/testing/unstructured_test.go

    		return
    	}
    
    	data, err = json.Marshal(unstr)
    	if err != nil {
    		t.Errorf("Error when marshaling unstructured: %v", err)
    		return
    	}
    	unmarshalledObj := reflect.New(reflect.TypeOf(item).Elem()).Interface()
    	err = json.Unmarshal(data, &unmarshalledObj)
    	if err != nil {
    		t.Errorf("Error when unmarshaling to object: %v", err)
    		return
    	}
    	if !apiequality.Semantic.DeepEqual(item, unmarshalledObj) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  4. src/go/types/operand.go

    	// type, x's type V and T have identical element types,
    	// and at least one of V or T is not a named type.
    	if Vc, ok := Vu.(*Chan); ok && Vc.dir == SendRecv {
    		if Tc, ok := Tu.(*Chan); ok && Identical(Vc.elem, Tc.elem) {
    			return !hasName(V) || !hasName(T), InvalidChanAssign
    		}
    	}
    
    	// optimization: if we don't have type parameters, we're done
    	if Vp == nil && Tp == nil {
    		return false, IncompatibleAssign
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  5. src/encoding/binary/binary.go

    		if decodeFast(bs, order, data) {
    			return nil
    		}
    	}
    
    	// Fallback to reflect-based decoding.
    	v := reflect.ValueOf(data)
    	size := -1
    	switch v.Kind() {
    	case reflect.Pointer:
    		v = v.Elem()
    		size = dataSize(v)
    	case reflect.Slice:
    		size = dataSize(v)
    	}
    	if size < 0 {
    		return errors.New("binary.Read: invalid type " + reflect.TypeOf(data).String())
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 17:29:31 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/operand.go

    	// type, x's type V and T have identical element types,
    	// and at least one of V or T is not a named type.
    	if Vc, ok := Vu.(*Chan); ok && Vc.dir == SendRecv {
    		if Tc, ok := Tu.(*Chan); ok && Identical(Vc.elem, Tc.elem) {
    			return !hasName(V) || !hasName(T), InvalidChanAssign
    		}
    	}
    
    	// optimization: if we don't have type parameters, we're done
    	if Vp == nil && Tp == nil {
    		return false, IncompatibleAssign
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. src/encoding/asn1/marshal.go

    	if v.Kind() == reflect.Interface && v.Type().NumMethod() == 0 {
    		return makeField(v.Elem(), params)
    	}
    
    	if v.Kind() == reflect.Slice && v.Len() == 0 && params.omitEmpty {
    		return bytesEncoder(nil), nil
    	}
    
    	if params.optional && params.defaultValue != nil && canHaveDefaultValue(v.Kind()) {
    		defaultValue := reflect.New(v.Type()).Elem()
    		defaultValue.SetInt(*params.defaultValue)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/liveness/intervals.go

    // inconsistencies or problems.
    func check(is Intervals) error {
    	for i := 0; i < len(is); i++ {
    		st := is[i].st
    		en := is[i].en
    		if en <= st {
    			return fmt.Errorf("bad range elem %d:%d, en<=st", st, en)
    		}
    		if i == 0 {
    			continue
    		}
    		// check for badly ordered starts
    		pst := is[i-1].st
    		pen := is[i-1].en
    		if pst >= st {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 21:55:27 UTC 2024
    - 10K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/etcd3/store.go

    				return &unstructured.Unstructured{Object: map[string]interface{}{"apiVersion": apiVersion}}
    			}
    		}
    	}
    
    	// Otherwise just instantiate an empty item
    	elem := v.Type().Elem()
    	return func() runtime.Object {
    		return reflect.New(elem).Interface().(runtime.Object)
    	}
    }
    
    func (s *store) Count(key string) (int64, error) {
    	preparedKey, err := s.prepareKey(key)
    	if err != nil {
    		return 0, err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 11:56:42 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/signature.go

    	for i, field := range list {
    		ftype := field.Type
    		// type-check type of grouped fields only once
    		if ftype != prev {
    			prev = ftype
    			if t, _ := ftype.(*syntax.DotsType); t != nil {
    				ftype = t.Elem
    				if variadicOk && i == len(list)-1 {
    					variadic = true
    				} else {
    					check.softErrorf(t, MisplacedDotDotDot, "can only use ... with final parameter in list")
    					// ignore ... and continue
    				}
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:33:05 UTC 2024
    - 12.6K bytes
    - Viewed (0)
Back to top