Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 61 for value_or (0.38 sec)

  1. src/database/sql/convert.go

    	if dpv.Kind() != reflect.Pointer {
    		return errors.New("destination not a pointer")
    	}
    	if dpv.IsNil() {
    		return errNilPtr
    	}
    
    	if !sv.IsValid() {
    		sv = reflect.ValueOf(src)
    	}
    
    	dv := reflect.Indirect(dpv)
    	if sv.IsValid() && sv.Type().AssignableTo(dv.Type()) {
    		switch b := src.(type) {
    		case []byte:
    			dv.Set(reflect.ValueOf(bytes.Clone(b)))
    		default:
    			dv.Set(sv)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  2. schema/schema.go

    		return nil, fmt.Errorf("%w: %+v", ErrUnsupportedDataType, dest)
    	}
    
    	value := reflect.ValueOf(dest)
    	if value.Kind() == reflect.Ptr && value.IsNil() {
    		value = reflect.New(value.Type().Elem())
    	}
    	modelType := reflect.Indirect(value).Type()
    
    	if modelType.Kind() == reflect.Interface {
    		modelType = reflect.Indirect(reflect.ValueOf(dest)).Elem().Type()
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:52:33 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  3. association.go

    		if association.Relationship == nil {
    			association.Error = fmt.Errorf("%w: %s", ErrUnsupportedRelation, column)
    		}
    
    		db.Statement.ReflectValue = reflect.ValueOf(db.Statement.Model)
    		for db.Statement.ReflectValue.Kind() == reflect.Ptr {
    			db.Statement.ReflectValue = db.Statement.ReflectValue.Elem()
    		}
    	} else {
    		association.Error = err
    	}
    
    	return association
    }
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/net/InetAddressesTest.java

        checkBigIntegerConversion("0.0.0.1", BigInteger.ONE);
        checkBigIntegerConversion("127.255.255.255", BigInteger.valueOf(Integer.MAX_VALUE));
        checkBigIntegerConversion(
            "255.255.255.254", BigInteger.valueOf(Integer.MAX_VALUE).multiply(BigInteger.valueOf(2)));
        checkBigIntegerConversion(
            "255.255.255.255", BigInteger.ONE.shiftLeft(32).subtract(BigInteger.ONE));
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 24 16:44:05 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  5. src/reflect/type_test.go

    		{new(mystring), reflect.TypeFor[mystring]()},
    		{new(any), reflect.TypeFor[any]()},
    		{new(myiface), reflect.TypeFor[myiface]()},
    	}
    	for _, tc := range testcases {
    		want := reflect.ValueOf(tc.wantFrom).Elem().Type()
    		if want != tc.got {
    			t.Errorf("unexpected reflect.Type: got %v; want %v", tc.got, want)
    		}
    	}
    }
    
    func TestStructOfEmbeddedIfaceMethodCall(t *testing.T) {
    	type Named interface {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 23:39:44 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  6. platforms/ide/tooling-api/src/crossVersionTest/groovy/org/gradle/integtests/tooling/r51/TransformProgressEventCrossVersionSpec.groovy

                    void transform(TransformOutputs outputs) {
                        def input = inputArtifact.get().asFile
                        def output = outputs.file(input.name + ".txt")
                        output.text = String.valueOf(input.length())
                    }
                }
            """
        }
    
        def getFileNamer() {
            """
                abstract class FileNamer implements TransformAction<TransformParameters.None> {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 16 10:10:39 UTC 2024
    - 9K bytes
    - Viewed (0)
  7. src/internal/fmtsort/sort.go

    				return c
    			}
    		}
    		return 0
    	case reflect.Interface:
    		if c, ok := nilCompare(aVal, bVal); ok {
    			return c
    		}
    		c := compare(reflect.ValueOf(aVal.Elem().Type()), reflect.ValueOf(bVal.Elem().Type()))
    		if c != 0 {
    			return c
    		}
    		return compare(aVal.Elem(), bVal.Elem())
    	default:
    		// Certain types cannot appear as keys (maps, funcs, slices), but be explicit.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:31:45 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  8. src/go/doc/example.go

    	// imports from that group.
    	groupStarts := findImportGroupStarts(file.Imports)
    	groupStart := func(s *ast.ImportSpec) token.Pos {
    		for i, start := range groupStarts {
    			if s.Path.ValuePos < start {
    				return groupStarts[i-1]
    			}
    		}
    		return groupStarts[len(groupStarts)-1]
    	}
    
    	for _, s := range file.Imports {
    		p, err := strconv.Unquote(s.Path.Value)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  9. platforms/extensibility/plugin-development/src/integTest/groovy/org/gradle/plugin/devel/tasks/ValidatePluginsPart2IntegrationTest.groovy

            'Integer'  | ''                 | 'Integer.valueOf(1)'                                                | 'java.lang.Integer'
            'String'   | ''                 | 'new String()'                                                      | 'java.lang.String'
            'Iterable' | '<Integer>'        | 'Arrays.asList(Integer.valueOf(1), Integer.valueOf(2))'             | 'java.lang.Integer'
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 09:03:53 UTC 2024
    - 40K bytes
    - Viewed (0)
  10. analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/resolver/AbstractResolveDanglingFileReferenceTest.kt

        }
    
        private object Directives : SimpleDirectivesContainer() {
            val COPY_RESOLUTION_MODE by enumDirective(description = "Dangling file resolution mode for a copy") {
                DanglingFileResolutionMode.valueOf(it)
            }
        }
    Registered: Wed Jun 12 09:53:16 UTC 2024
    - Last Modified: Tue Jun 04 19:03:01 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top