Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 565 for setString (0.22 sec)

  1. src/math/big/int_test.go

    	}
    }
    
    func TestGcd(t *testing.T) {
    	for _, test := range gcdTests {
    		d, _ := new(Int).SetString(test.d, 0)
    		x, _ := new(Int).SetString(test.x, 0)
    		y, _ := new(Int).SetString(test.y, 0)
    		a, _ := new(Int).SetString(test.a, 0)
    		b, _ := new(Int).SetString(test.b, 0)
    
    		testGcd(t, d, nil, nil, a, b)
    		testGcd(t, d, x, nil, a, b)
    		testGcd(t, d, nil, y, a, b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        setUp(parameters.first, parameters.second)
        val k1Creator = cache.edit("k1")!!
        k1Creator.setString(0, "AB")
        k1Creator.setString(1, "C")
        k1Creator.commit()
        val k2Creator = cache.edit("k2")!!
        k2Creator.setString(0, "DEF")
        k2Creator.setString(1, "G")
        k2Creator.commit()
        val k1Snapshot = cache["k1"]!!
        k1Snapshot.close()
        cache.close()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 15 14:55:09 UTC 2024
    - 75.8K bytes
    - Viewed (0)
  3. src/crypto/x509/oid.go

    	}
    	secondNum, oid, nextComponentExists = strings.Cut(oid, ".")
    
    	var (
    		first  = big.NewInt(0)
    		second = big.NewInt(0)
    	)
    
    	if _, ok := first.SetString(firstNum, 10); !ok {
    		return errInvalidOID
    	}
    	if _, ok := second.SetString(secondNum, 10); !ok {
    		return errInvalidOID
    	}
    
    	if first.Cmp(big.NewInt(2)) > 0 || (first.Cmp(big.NewInt(2)) < 0 && second.Cmp(big.NewInt(40)) >= 0) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 19:10:38 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  4. src/math/big/ratmarsh.go

    	return x.marshal(), nil
    }
    
    // UnmarshalText implements the [encoding.TextUnmarshaler] interface.
    func (z *Rat) UnmarshalText(text []byte) error {
    	// TODO(gri): get rid of the []byte/string conversion
    	if _, ok := z.SetString(string(text)); !ok {
    		return fmt.Errorf("math/big: cannot unmarshal %q into a *big.Rat", text)
    	}
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:31:58 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  5. istioctl/pkg/writer/ztunnel/configdump/certificates.go

    			for i, ca := range secret.CertChain {
    				t := "Intermediate"
    				if i == 0 {
    					t = "Leaf"
    				} else if i == len(secret.CertChain)-1 {
    					t = "Root"
    				}
    				n := new(big.Int)
    				n, _ = n.SetString(ca.SerialNumber, 10)
    				fmt.Fprintf(w, "%v\t%v\t%v\t%v\t%x\t%v\t%v\n",
    					secret.Identity, t, secret.State, certNotExpired(ca), n, valueOrNA(ca.ExpirationTime), valueOrNA(ca.ValidFrom))
    			}
    		}
    	}
    	return w.Flush()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 16:38:16 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  6. schema/field.go

    				if data != nil && *data != nil {
    					field.ReflectValueOf(ctx, value).SetString(**data)
    				}
    			case string:
    				field.ReflectValueOf(ctx, value).SetString(data)
    			case []byte:
    				field.ReflectValueOf(ctx, value).SetString(string(data))
    			case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64:
    				field.ReflectValueOf(ctx, value).SetString(utils.ToString(data))
    			case float64, float32:
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  7. src/database/sql/convert.go

    		return nil
    	case reflect.String:
    		if src == nil {
    			return fmt.Errorf("converting NULL to %s is unsupported", dv.Kind())
    		}
    		switch v := src.(type) {
    		case string:
    			dv.SetString(v)
    			return nil
    		case []byte:
    			dv.SetString(string(v))
    			return nil
    		}
    	}
    
    	return fmt.Errorf("unsupported Scan, storing driver.Value type %T into type %T", src, dest)
    }
    
    func strconvErr(err error) error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  8. src/crypto/rsa/pss_test.go

    		t.Fatal(err)
    	}
    	err = VerifyPSS(&key.PublicKey, crypto.SHA256, digest[:], signature, nil)
    	if err != nil {
    		t.Error(err)
    	}
    }
    
    func bigFromHex(hex string) *big.Int {
    	n, ok := new(big.Int).SetString(hex, 16)
    	if !ok {
    		panic("bad hex: " + hex)
    	}
    	return n
    }
    
    func intFromHex(hex string) int {
    	i, err := strconv.ParseInt(hex, 16, 32)
    	if err != nil {
    		panic(err)
    	}
    	return int(i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  9. src/encoding/json/decode.go

    				if err := d.literalStore(item, kv, true); err != nil {
    					return err
    				}
    				kv = kv.Elem()
    			} else {
    				switch kt.Kind() {
    				case reflect.String:
    					kv = reflect.New(kt).Elem()
    					kv.SetString(string(key))
    				case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    					s := string(key)
    					n, err := strconv.ParseInt(s, 10, 64)
    					if err != nil || kt.OverflowInt(n) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

    					}
    				}
    				return Quantity{i: int64Amount{value: result, scale: Scale(scale)}, Format: format}, nil
    			}
    		}
    	}
    
    	amount := new(inf.Dec)
    	if _, ok := amount.SetString(value); !ok {
    		return Quantity{}, ErrNumeric
    	}
    
    	// So that no one but us has to think about suffixes, remove it.
    	if base == 10 {
    		amount.SetScale(amount.Scale() + Scale(exponent).infScale())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 23.8K bytes
    - Viewed (0)
Back to top