Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 43 for printslice (0.14 sec)

  1. staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceSlice.json

          {
            "name": "nameValue",
            "attributes": [
              {
                "name": "nameValue",
                "quantity": "0",
                "bool": true,
                "int": 7,
                "intSlice": {
                  "ints": [
                    1
                  ]
                },
                "string": "stringValue",
                "stringSlice": {
                  "strings": [
                    "stringsValue"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 08:52:25 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. src/net/textproto/writer_test.go

    package textproto
    
    import (
    	"bufio"
    	"strings"
    	"testing"
    )
    
    func TestPrintfLine(t *testing.T) {
    	var buf strings.Builder
    	w := NewWriter(bufio.NewWriter(&buf))
    	err := w.PrintfLine("foo %d", 123)
    	if s := buf.String(); s != "foo 123\r\n" || err != nil {
    		t.Fatalf("s=%q; err=%s", s, err)
    	}
    }
    
    func TestDotWriter(t *testing.T) {
    	var buf strings.Builder
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 13:55:46 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  3. src/sort/sort_slices_benchmark_test.go

    	}
    	Strings(x)
    	return x
    }
    
    const N = 100_000
    
    func BenchmarkSortInts(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		b.StopTimer()
    		ints := makeRandomInts(N)
    		b.StartTimer()
    		Sort(IntSlice(ints))
    	}
    }
    
    func BenchmarkSlicesSortInts(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		b.StopTimer()
    		ints := makeRandomInts(N)
    		b.StartTimer()
    		slices.Sort(ints)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 22:59:40 UTC 2024
    - 4K bytes
    - Viewed (0)
  4. staging/src/k8s.io/api/resource/v1alpha2/namedresources.go

    	// IntValue is a 64-bit integer.
    	IntValue *int64 `json:"int,omitempty" protobuf:"varint,7,opt,name=int"`
    	// IntSliceValue is an array of 64-bit integers.
    	IntSliceValue *NamedResourcesIntSlice `json:"intSlice,omitempty" protobuf:"varint,8,rep,name=intSlice"`
    	// StringValue is a string.
    	StringValue *string `json:"string,omitempty" protobuf:"bytes,5,opt,name=string"`
    	// StringSliceValue is an array of strings.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 12:18:45 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/test/issue50182_test.go

    	n := data.Len()
    	for i := n - 1; i > 0; i-- {
    		if data.Less(i, i-1) {
    			return false
    		}
    	}
    	return true
    }
    func TestGenericSorted(t *testing.T) {
    	var data = sort.IntSlice{-10, -5, 0, 1, 2, 3, 5, 7, 11, 100, 100, 100, 1000, 10000}
    	f := func() {
    		genericSorted(data)
    	}
    	if n := testing.AllocsPerRun(10, f); n > 0 {
    		t.Errorf("got %f allocs, want 0", n)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 13 23:35:37 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  6. src/internal/types/testdata/examples/functions.go

    // so type inference should be able to handle these cases well.
    
    func g1[T any]([]T) {}
    func g2[T any]([]T, T) {}
    func g3[T any](*T, ...T) {}
    
    func _() {
    	type intSlice []int
    	g1([]int{})
    	g1(intSlice{})
    	g2(nil, 0)
    
    	type myString string
    	var s1 string
    	g3(nil, "1", myString("2"), "3")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 30 20:19:38 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  7. pkg/apis/resource/structured/namedresources/validation/validation_test.go

    		},
    		"bool": {
    			selector: `attributes.bool["name"]`,
    		},
    		"int": {
    			selector: `attributes.int["name"] > 0`,
    		},
    		"intslice": {
    			selector: `attributes.intslice["name"].isSorted()`,
    		},
    		"string": {
    			selector: `attributes.string["name"] == "fish"`,
    		},
    		"stringslice": {
    			selector: `attributes.stringslice["name"].isSorted()`,
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:13 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. src/sort/example_test.go

    	fmt.Println(sort.Float64sAreSorted(s))
    
    	// Output: true
    	// false
    	// false
    }
    
    func ExampleReverse() {
    	s := []int{5, 2, 6, 3, 1, 4} // unsorted
    	sort.Sort(sort.Reverse(sort.IntSlice(s)))
    	fmt.Println(s)
    	// Output: [6 5 4 3 2 1]
    }
    
    func ExampleSlice() {
    	people := []struct {
    		Name string
    		Age  int
    	}{
    		{"Gopher", 7},
    		{"Alice", 55},
    		{"Vera", 24},
    		{"Bob", 75},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 17:29:29 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  9. src/net/smtp/smtp_test.go

    			return
    		}
    		defer conn.Close()
    
    		tc := textproto.NewConn(conn)
    		for i := 0; i < len(data) && data[i] != ""; i++ {
    			tc.PrintfLine("%s", data[i])
    			for len(data[i]) >= 4 && data[i][3] == '-' {
    				i++
    				tc.PrintfLine("%s", data[i])
    			}
    			if data[i] == "221 Goodbye" {
    				return
    			}
    			read := false
    			for !read || data[i] == "354 Go ahead" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  10. src/cmd/vet/testdata/print/print.go

    	fmt.Println("foo\n")  // ERROR "Println arg list ends with redundant newline"
    	fmt.Println("foo\\n") // not an error
    	fmt.Println(`foo\n`)  // not an error
    
    	intSlice := []int{3, 4}
    	fmt.Printf("%s", intSlice) // ERROR "Printf format %s has arg intSlice of wrong type \[\]int"
    	nonStringerArray := [1]unexportedStringer{{}}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 27.5K bytes
    - Viewed (0)
Back to top