Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 487 for Slice3 (0.15 sec)

  1. test/fixedbugs/issue52590.dir/a.go

    func Print() {
    	print(ints())
    }
    
    func Println() {
    	println(ints())
    }
    
    func Complex() {
    	_ = complex(float64s())
    }
    
    func Copy() {
    	copy(slices())
    }
    
    func UnsafeAdd() {
    	_ = unsafe.Add(unsafeAdd())
    }
    
    func UnsafeSlice() {
    	_ = unsafe.Slice(unsafeSlice())
    }
    
    func appendArgs() ([]int, int) {
    	return []int{}, 0
    }
    
    func deleteArgs() (map[int]int, int) {
    	return map[int]int{}, 0
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 28 18:02:40 UTC 2022
    - 933 bytes
    - Viewed (0)
  2. src/crypto/subtle/constant_time.go

    // code but require careful thought to use correctly.
    package subtle
    
    // ConstantTimeCompare returns 1 if the two slices, x and y, have equal contents
    // and 0 otherwise. The time taken is a function of the length of the slices and
    // is independent of the contents. If the lengths of x and y do not match it
    // returns 0 immediately.
    func ConstantTimeCompare(x, y []byte) int {
    	if len(x) != len(y) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 01:54:27 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json/json_limit_test.go

    		}
    	}
    
    	return []testcase{
    		{
    			name:     "3MB of deeply nested slices",
    			checkErr: successOrMaxDepthError,
    			data:     []byte(`{"a":` + strings.Repeat(`[`, 3*1024*1024/2) + strings.Repeat(`]`, 3*1024*1024/2) + "}"),
    		},
    		{
    			name:     "3MB of unbalanced nested slices",
    			checkErr: nonNilError,
    			data:     []byte(`{"a":` + strings.Repeat(`[`, 3*1024*1024)),
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 20 16:49:23 UTC 2021
    - 4.5K bytes
    - Viewed (0)
  4. pkg/collateral/metrics/otel.go

    import (
    	"strings"
    
    	"istio.io/istio/pkg/monitoring"
    	"istio.io/istio/pkg/slices"
    )
    
    var charReplacer = strings.NewReplacer("/", "_", ".", "_", " ", "_", "-", "")
    
    func promName(metricName string) string {
    	s := strings.TrimPrefix(metricName, "/")
    	return charReplacer.Replace(s)
    }
    
    func ExportedMetrics() []monitoring.MetricDefinition {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  5. src/net/http/routing_tree_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package http
    
    import (
    	"fmt"
    	"io"
    	"strings"
    	"testing"
    
    	"slices"
    )
    
    func TestRoutingFirstSegment(t *testing.T) {
    	for _, test := range []struct {
    		in   string
    		want []string
    	}{
    		{"/a/b/c", []string{"a", "b", "c"}},
    		{"/a/b/", []string{"a", "b", "/"}},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 30 15:43:24 UTC 2024
    - 7K bytes
    - Viewed (0)
  6. pkg/registry/rbac/clusterrole/policybased/storage_test.go

    		nil,
    		nil,
    		[]*rbacv1.ClusterRole{{ObjectMeta: metav1.ObjectMeta{Name: "alice-role"}, Rules: []rbacv1.PolicyRule{{APIGroups: []string{"*"}, Resources: []string{"*"}, Verbs: []string{"*"}}}}},
    		[]*rbacv1.ClusterRoleBinding{{RoleRef: rbacv1.RoleRef{Name: "alice-role", APIGroup: "rbac.authorization.k8s.io", Kind: "ClusterRole"}, Subjects: []rbacv1.Subject{{Name: "alice", Kind: "User", APIGroup: "rbac.authorization.k8s.io"}}}},
    	)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 09 13:47:19 UTC 2021
    - 6.2K bytes
    - Viewed (0)
  7. src/crypto/tls/defaults.go

    	PKCS1WithSHA1,
    	ECDSAWithSHA1,
    }
    
    var tlsrsakex = godebug.New("tlsrsakex")
    var tls3des = godebug.New("tls3des")
    
    func defaultCipherSuites() []uint16 {
    	suites := slices.Clone(cipherSuitesPreferenceOrder)
    	return slices.DeleteFunc(suites, func(c uint16) bool {
    		return disabledCipherSuites[c] ||
    			tlsrsakex.Value() != "1" && rsaKexCiphers[c] ||
    			tls3des.Value() != "1" && tdesCiphers[c]
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  8. src/syscall/wtf8_windows_test.go

    			want := utf16.Encode([]rune(b))
    			if !slices.Equal(got, want) {
    				t.Errorf("got:\n%v\nwant:\n%v", got, want)
    			}
    		}
    	})
    }
    
    func FuzzDecodeWTF16(f *testing.F) {
    	for _, tt := range wtf8tests {
    		b := unsafe.Slice((*uint8)(unsafe.Pointer(unsafe.SliceData(tt.wstr))), len(tt.wstr)*2)
    		f.Add(b)
    	}
    	f.Fuzz(func(t *testing.T, b []byte) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 15 09:26:16 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  9. pkg/proxy/endpointslicecache_test.go

    					&BaseEndpointInfo{ip: "10.0.2.3", port: 80, endpoint: "10.0.2.3:80", isLocal: false, ready: true, serving: true, terminating: false},
    				},
    			},
    		},
    		// 2 slices, with some overlapping endpoints, result should be a union
    		// of the 2.
    		"2 overlapping slices, same port": {
    			namespacedName: types.NamespacedName{Name: "svc1", Namespace: "ns1"},
    			endpointSlices: []*discovery.EndpointSlice{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 21:07:21 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  10. pkg/kube/krt/join_test.go

    	c1.Set(&Named{"c1", "b"})
    	assert.EventuallyEqual(t, last.Load, "c1/b")
    	// ordered by c1, c2, c3
    	sortf := func(a Named) string {
    		return a.ResourceName()
    	}
    	assert.Equal(
    		t,
    		slices.SortBy(j.List(), sortf),
    		slices.SortBy([]Named{
    			{"c1", "b"},
    			{"c2", "a"},
    			{"c3", "a"},
    		}, sortf),
    	)
    }
    
    func TestCollectionJoin(t *testing.T) {
    	c := kube.NewFakeClient()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 09 19:55:53 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top