Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 1,698 for switch3 (0.25 sec)

  1. src/regexp/find_test.go

    	for _, test := range findTests {
    		re := MustCompile(test.pat)
    		if re.String() != test.pat {
    			t.Errorf("String() = `%s`; should be `%s`", re.String(), test.pat)
    		}
    		result := re.Find([]byte(test.text))
    		switch {
    		case len(test.matches) == 0 && len(result) == 0:
    			// ok
    		case test.matches == nil && result != nil:
    			t.Errorf("expected no match; got one: %s", test)
    		case test.matches != nil && result == nil:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 11 15:28:50 UTC 2021
    - 16.3K bytes
    - Viewed (0)
  2. internal/s3select/sql/funceval.go

    	}
    }
    
    func boolCast(v *Value) (b bool, _ error) {
    	sToB := func(s string) (bool, error) {
    		switch s {
    		case "true":
    			return true, nil
    		case "false":
    			return false, nil
    		default:
    			return false, errCastFailure("cannot cast to Bool")
    		}
    	}
    	switch x := v.value.(type) {
    	case bool:
    		return x, nil
    	case string:
    		return sToB(strings.ToLower(x))
    	case []byte:
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 13.2K bytes
    - Viewed (0)
  3. src/text/template/funcs.go

    			switch {
    			case k1 == intKind && k2 == uintKind:
    				truth = arg1.Int() >= 0 && uint64(arg1.Int()) == arg.Uint()
    			case k1 == uintKind && k2 == intKind:
    				truth = arg.Int() >= 0 && arg1.Uint() == uint64(arg.Int())
    			default:
    				if arg1.IsValid() && arg.IsValid() {
    					return false, errBadComparison
    				}
    			}
    		} else {
    			switch k1 {
    			case boolKind:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

        rewriter.replaceOpWithNewOp<tf_executor::SwitchOp>(
            op, new_types, new_operands, op->getAttrs());
        return success();
      }
    };
    
    class ConvertSwitchNOp : public ConversionPattern {
     public:
      explicit ConvertSwitchNOp(MLIRContext *context)
          : ConversionPattern("tfg.SwitchN", PatternBenefit(1), context) {}
    
      LogicalResult matchAndRewrite(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go

    		children = append(children, tok(n.Switch, len("switch")))
    
    	case *ast.TypeAssertExpr:
    		children = append(children,
    			tok(n.Lparen-1, len(".")),
    			tok(n.Lparen, len("(")),
    			tok(n.Rparen, len(")")))
    
    	case *ast.TypeSpec:
    		// TODO(adonovan): TypeSpec.{Doc,Comment}?
    
    	case *ast.TypeSwitchStmt:
    		children = append(children, tok(n.Switch, len("switch")))
    
    	case *ast.UnaryExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  6. schema/field.go

    		field.GORMDataType = field.DataType
    	}
    
    	if val, ok := field.TagSettings["TYPE"]; ok {
    		switch DataType(strings.ToLower(val)) {
    		case Bool, Int, Uint, Float, String, Time, Bytes:
    			field.DataType = DataType(strings.ToLower(val))
    		default:
    			field.DataType = DataType(val)
    		}
    	}
    
    	if field.Size == 0 {
    		switch reflect.Indirect(fieldValue).Kind() {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  7. cmd/bucket-replication-metrics_gen.go

    	if err != nil {
    		err = msgp.WrapError(err)
    		return
    	}
    	for zb0001 > 0 {
    		zb0001--
    		field, err = dc.ReadMapKeyPtr()
    		if err != nil {
    			err = msgp.WrapError(err)
    			return
    		}
    		switch msgp.UnsafeString(field) {
    		case "Curr":
    			z.Curr, err = dc.ReadInt()
    			if err != nil {
    				err = msgp.WrapError(err, "Curr")
    				return
    			}
    		case "Avg":
    			z.Avg, err = dc.ReadFloat32()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Mar 21 17:21:35 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/const.go

    	switch ct := v.Kind(); ct {
    	case constant.Bool:
    		if t.IsBoolean() {
    			return v
    		}
    
    	case constant.String:
    		if t.IsString() {
    			return v
    		}
    
    	case constant.Int:
    		if explicit && t.IsString() {
    			return tostr(v)
    		}
    		fallthrough
    	case constant.Float, constant.Complex:
    		switch {
    		case t.IsInteger():
    			v = toint(v)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/gnu.go

    				buf.WriteString(str)
    				startArg = 3
    			}
    		}
    
    	case "mtspr":
    		opcode := inst.Op.String()
    		buf.WriteString(opcode[0:2])
    		switch spr := inst.Args[0].(type) {
    		case SpReg:
    			switch spr {
    			case 1:
    				buf.WriteString("xer")
    				startArg = 1
    			case 8:
    				buf.WriteString("lr")
    				startArg = 1
    			case 9:
    				buf.WriteString("ctr")
    				startArg = 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  10. src/net/cgo_unix.go

    	for _, addr := range addrs {
    		hosts = append(hosts, addr.String())
    	}
    	return hosts, nil
    }
    
    func cgoLookupPort(ctx context.Context, network, service string) (port int, err error) {
    	var hints _C_struct_addrinfo
    	switch network {
    	case "ip": // no hints
    	case "tcp", "tcp4", "tcp6":
    		*_C_ai_socktype(&hints) = _C_SOCK_STREAM
    		*_C_ai_protocol(&hints) = _C_IPPROTO_TCP
    	case "udp", "udp4", "udp6":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 11.4K bytes
    - Viewed (0)
Back to top