Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 3,055 for REFLECT (0.13 sec)

  1. test/fixedbugs/issue57184.go

    package main
    
    import (
    	"log"
    	"reflect"
    	"sort"
    )
    
    func main() {
    	const length = 257
    	x := make([]int64, length)
    	for i := 0; i < length; i++ {
    		x[i] = int64(i) * 27644437 % int64(length)
    	}
    
    	isLessStatic := func(i, j int) bool {
    		return x[i] < x[j]
    	}
    
    	isLessReflect := reflect.MakeFunc(reflect.TypeOf(isLessStatic), func(args []reflect.Value) []reflect.Value {
    		i := args[0].Int()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 09 21:38:33 UTC 2022
    - 851 bytes
    - Viewed (0)
  2. test/fixedbugs/issue26335.go

    // reflect.Value.Call.
    
    package main
    
    import (
    	"reflect"
    )
    
    type Empty struct {
    	f1, f2 *byte
    	empty struct{}
    }
    
    func F(e Empty, s []string) {
    	if len(s) != 1 || s[0] != "hi" {
    		panic("bad slice")
    	}
    }
    
    func main() {
    	reflect.ValueOf(F).Call([]reflect.Value{
    		reflect.ValueOf(Empty{}),
    		reflect.ValueOf([]string{"hi"}),
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 11 18:14:35 UTC 2018
    - 563 bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testsanitizers/testdata/msan5.go

    	Go2(a);
    	if (a[0] != 42) {
    		abort();
    	}
    }
    */
    import "C"
    
    import (
    	"reflect"
    	"unsafe"
    )
    
    //export Go1
    func Go1(p *C.int) {
    	reflect.ValueOf(p).Elem().Set(reflect.ValueOf(C.int(42)))
    }
    
    //export Go2
    func Go2(p *C.char) {
    	a := (*[2]byte)(unsafe.Pointer(p))
    	reflect.Copy(reflect.ValueOf(a[:1]), reflect.ValueOf(a[1:]))
    }
    
    func main() {
    	C.C1()
    	C.C2()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 904 bytes
    - Viewed (0)
  4. test/fixedbugs/issue49110.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import "reflect"
    
    func main() {
    	_ = reflect.StructOf([]reflect.StructField{
    		{Name: "_", PkgPath: "main", Type: reflect.TypeOf(int(0))},
    		{Name: "_", PkgPath: "main", Type: reflect.TypeOf(int(0))},
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 27 21:35:48 UTC 2021
    - 389 bytes
    - Viewed (0)
  5. callbacks/callmethod.go

    package callbacks
    
    import (
    	"reflect"
    
    	"gorm.io/gorm"
    )
    
    func callMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool) {
    	tx := db.Session(&gorm.Session{NewDB: true})
    	if called := fc(db.Statement.ReflectValue.Interface(), tx); !called {
    		switch db.Statement.ReflectValue.Kind() {
    		case reflect.Slice, reflect.Array:
    			db.Statement.CurDestIndex = 0
    			for i := 0; i < db.Statement.ReflectValue.Len(); i++ {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Feb 18 01:20:29 UTC 2023
    - 846 bytes
    - Viewed (0)
  6. src/crypto/tls/handshake_messages_test.go

    	m := &certificateStatusMsg{}
    	m.response = randomBytes(rand.Intn(10)+1, rand)
    	return reflect.ValueOf(m)
    }
    
    func (*clientKeyExchangeMsg) Generate(rand *rand.Rand, size int) reflect.Value {
    	m := &clientKeyExchangeMsg{}
    	m.ciphertext = randomBytes(rand.Intn(1000)+1, rand)
    	return reflect.ValueOf(m)
    }
    
    func (*finishedMsg) Generate(rand *rand.Rand, size int) reflect.Value {
    	m := &finishedMsg{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  7. pkg/config/schema/collections/collections.agent.gen.go

    		VersionAliases: []string{
    			"v1",
    		},
    		Proto: "istio.security.v1beta1.AuthorizationPolicy", StatusProto: "istio.meta.v1alpha1.IstioStatus",
    		ReflectType: reflect.TypeOf(&istioioapisecurityv1beta1.AuthorizationPolicy{}).Elem(), StatusType: reflect.TypeOf(&istioioapimetav1alpha1.IstioStatus{}).Elem(),
    		ProtoPackage: "istio.io/api/security/v1beta1", StatusPackage: "istio.io/api/meta/v1alpha1",
    		ClusterScoped: false,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  8. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/provider/ScriptApiTest.kt

    import org.junit.Test
    import kotlin.reflect.KCallable
    import kotlin.reflect.KClass
    import kotlin.reflect.KFunction
    import kotlin.reflect.KMutableProperty
    import kotlin.reflect.KParameter
    import kotlin.reflect.KProperty
    import kotlin.reflect.KType
    import kotlin.reflect.KTypeProjection
    import kotlin.reflect.KVariance
    import kotlin.reflect.KVisibility
    import kotlin.reflect.full.createType
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/authorization/cel/compile_test.go

    	return nil
    }
    
    func nativeTypeToCELType(t *testing.T, nativeType reflect.Type, field func(name string, declType *apiservercel.DeclType, required bool) *apiservercel.DeclField, fields func(fields ...*apiservercel.DeclField) map[string]*apiservercel.DeclField) *apiservercel.DeclType {
    	switch nativeType {
    	case reflect.TypeOf(""):
    		return apiservercel.StringType
    	case reflect.TypeOf([]string{}):
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  10. test/fixedbugs/issue16331.go

    package main
    
    import "reflect"
    
    type T struct{}
    
    func (T) M() {
    }
    
    func F(args []reflect.Value) (results []reflect.Value) {
    	return nil
    }
    
    func main() {
    	done := make(chan bool)
    	go func() {
    		// Test reflect.makeFuncStub.
    		t := reflect.TypeOf((func())(nil))
    		f := reflect.MakeFunc(t, F).Interface().(func())
    		defer f()
    		growstack(10000)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 17 18:57:01 UTC 2016
    - 839 bytes
    - Viewed (0)
Back to top