Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for str1 (0.11 sec)

  1. src/database/sql/sql_test.go

    		t.Fatal("exec insert", err)
    	}
    	var (
    		str1 string
    		dec1 decimalInt
    		arr1 []int64
    	)
    	err = db.QueryRowContext(ctx, "SELECT|keys|dec1,str1,array1|").Scan(&dec1, &str1, &arr1)
    	if err != nil {
    		t.Fatal("select", err)
    	}
    
    	list := []struct{ got, want any }{
    		{o1, "from-server"},
    		{dec1, decimalInt{123}},
    		{str1, "hello"},
    		{arr1, []int64{42, 128, 707}},
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go

    			obj: map[string]interface{}{
    				"str": "this is a 123 string 456",
    			},
    			schema: objectTypePtr(map[string]schema.Structural{
    				"str": stringType,
    			}),
    			valid: []string{
    				"self.str.find('[0-9]+') == '123'",
    				"self.str.find('[0-9]+') != '456'",
    				"self.str.find('xyz') == ''",
    
    				"self.str.findAll('[0-9]+') == ['123', '456']",
    				"self.str.findAll('[0-9]+', 0) == []",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 17:14:10 UTC 2024
    - 159.9K bytes
    - Viewed (0)
  3. cmd/utils.go

    func lcpSuffix(strs []string) string {
    	return lcp(strs, false)
    }
    
    func lcp(strs []string, pre bool) string {
    	// short-circuit empty list
    	if len(strs) == 0 {
    		return ""
    	}
    	xfix := strs[0]
    	// short-circuit single-element list
    	if len(strs) == 1 {
    		return xfix
    	}
    	// compare first to rest
    	for _, str := range strs[1:] {
    		xfixl := len(xfix)
    		strl := len(str)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 22:00:34 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  4. src/internal/coverage/cfile/ts_test.go

    	}
    
    	// Look for the expected things in the coverage profile.
    	contents, err := os.ReadFile(textfile)
    	strc := string(contents)
    	if err != nil {
    		t.Fatalf("problems reading text file %s: %v", textfile, err)
    	}
    	if !strings.Contains(strc, token) {
    		t.Logf("content: %s\n", string(contents))
    		t.Fatalf("cov profile does not contain aux meta content %q", token)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:58:07 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  5. security/pkg/k8s/chiron/utils_test.go

    }
    
    // Get the server port from server.URL (e.g., https://127.0.0.1:36253)
    func getServerPort(server *httptest.Server) (int, error) {
    	strs := strings.Split(server.URL, ":")
    	if len(strs) < 2 {
    		return 0, fmt.Errorf("server.URL is invalid: %v", server.URL)
    	}
    	port, err := strconv.Atoi(strs[len(strs)-1])
    	if err != nil {
    		return 0, fmt.Errorf("error to extract port from URL: %v", server.URL)
    	}
    	return port, nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 03:58:11 UTC 2024
    - 13K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/query-params-str-validations.md

        ```
    
    The query parameter `q` is of type `Union[str, None]` (or `str | None` in Python 3.10), that means that it's of type `str` but could also be `None`, and indeed, the default value is `None`, so FastAPI will know it's not required.
    
    !!! note
        FastAPI will know that the value of `q` is not required because of the default value `= None`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri May 31 02:38:05 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Sets.java

            return new AbstractIterator<E>() {
              final Iterator<? extends E> itr1 = set1.iterator();
              final Iterator<? extends E> itr2 = set2.iterator();
    
              @Override
              @CheckForNull
              protected E computeNext() {
                if (itr1.hasNext()) {
                  return itr1.next();
                }
                while (itr2.hasNext()) {
                  E e = itr2.next();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sun Jun 02 13:36:19 UTC 2024
    - 77.3K bytes
    - Viewed (0)
  8. src/internal/fmtsort/sort_test.go

    // problematic types such as pointers. Note that it only does special handling
    // for the troublesome types used in the test cases; it is not a general
    // printer.
    func sprintKey(key reflect.Value) string {
    	switch str := key.Type().String(); str {
    	case "*int":
    		ptr := key.Interface().(*int)
    		for i := range ints {
    			if ptr == &ints[i] {
    				return fmt.Sprintf("PTR%d", i)
    			}
    		}
    		return "PTR???"
    	case "unsafe.Pointer":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  9. src/encoding/json/encode_test.go

    	Bo bool `json:"bo,omitempty"`
    
    	Ur uint `json:"ur"`
    	Uo uint `json:"uo,omitempty"`
    
    	Str struct{} `json:"str"`
    	Sto struct{} `json:"sto,omitempty"`
    }
    
    func TestOmitEmpty(t *testing.T) {
    	var want = `{
     "sr": "",
     "omitempty": 0,
     "slr": null,
     "mr": {},
     "fr": 0,
     "br": false,
     "ur": 0,
     "str": {},
     "sto": {}
    }`
    	var o Optionals
    	o.Sw = "something"
    	o.Mr = map[string]any{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 29.4K bytes
    - Viewed (0)
  10. src/reflect/all_test.go

    	c *string
    	d map[float64]float64
    }
    
    func TestDeepEqualComplexStruct(t *testing.T) {
    	m := make(map[float64]float64)
    	stra, strb := "hello", "hello"
    	a, b := new(_Complex), new(_Complex)
    	*a = _Complex{5, [3]*_Complex{a, b, a}, &stra, m}
    	*b = _Complex{5, [3]*_Complex{b, a, a}, &strb, m}
    	if !DeepEqual(a, b) {
    		t.Error("DeepEqual(complex same) = false, want true")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top