- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 333 for splice (0.04 sec)
-
docs/debugging/hash-set/main.go
} // hashOrder - hashes input key to return consistent // hashed integer slice. Returned integer order is salted // with an input key. This results in consistent order. // NOTE: collisions are fine, we are not looking for uniqueness // in the slices returned. func hashOrder(key string, cardinality int) []int { if cardinality <= 0 { // Returns an empty int slice for cardinality < 0. return nil } nums := make([]int, cardinality)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 3.7K bytes - Viewed (0) -
doc/go1.17_spec.html
a slice of length up to that capacity can be created by <a href="#Slice_expressions"><i>slicing</i></a> a new one from the original slice. The capacity of a slice <code>a</code> can be discovered using the built-in function <a href="#Length_and_capacity"><code>cap(a)</code></a>. </p> <p> A new, initialized slice value for a given element type <code>T</code> is
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 10 18:25:45 UTC 2024 - 211.6K bytes - Viewed (0) -
utils/utils.go
return strings.Join(relationNames, nestedRelationSplit) } // RTrimSlice Right trims the given slice by given length func RTrimSlice[T any](v []T, trimLen int) []T { if trimLen >= len(v) { // trimLen greater than slice len means fully sliced return v[:0] } if trimLen < 0 { // negative trimLen is ignored return v[:] } return v[:len(v)-trimLen]
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 4.1K bytes - Viewed (0) -
doc/go_spec.html
The <i>capacity</i> is a measure of that extent: it is the sum of the length of the slice and the length of the array beyond the slice; a slice of length up to that capacity can be created by <a href="#Slice_expressions"><i>slicing</i></a> a new one from the original slice. The capacity of a slice <code>a</code> can be discovered using the built-in function <a href="#Length_and_capacity"><code>cap(a)</code></a>. </p>
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Oct 02 00:58:01 UTC 2024 - 282.5K bytes - Viewed (0) -
callbacks/preload.go
return err } } else if rel := relationships.Relations[name]; rel != nil { if joined, nestedJoins := isJoined(name); joined { switch rv := db.Statement.ReflectValue; rv.Kind() { case reflect.Slice, reflect.Array: if rv.Len() > 0 { reflectValue := rel.FieldSchema.MakeSlice().Elem() for i := 0; i < rv.Len(); i++ { frv := rel.Field.ReflectValueOf(db.Statement.Context, rv.Index(i))
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:52:33 UTC 2024 - 11.6K bytes - Viewed (0) -
cmd/xl-storage-format-utils_test.go
return false } } return true } if !chkNumVersions(fivs.Versions) { t.Fatalf("Expected all versions to have the same NumVersions") } sort.Slice(versions, func(i, j int) bool { if versions[i].IsLatest { return true } if versions[j].IsLatest { return false } return versions[i].ModTime.After(versions[j].ModTime) })
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 7.1K bytes - Viewed (0) -
src/bytes/example_test.go
// U+0068 'h' // U+0065 'e' // U+0072 'r' } func ExampleSplit() { fmt.Printf("%q\n", bytes.Split([]byte("a,b,c"), []byte(","))) fmt.Printf("%q\n", bytes.Split([]byte("a man a plan a canal panama"), []byte("a "))) fmt.Printf("%q\n", bytes.Split([]byte(" xyz "), []byte(""))) fmt.Printf("%q\n", bytes.Split([]byte(""), []byte("Bernardo O'Higgins"))) // Output: // ["a" "b" "c"] // ["" "man " "plan " "canal panama"]
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/endpoint.go
} } for _, e := range dump.GetStaticEndpointConfigs() { cla, epCount := retrieveEndpoint(e.EndpointConfig, filter) if epCount != 0 { endpoints = append(endpoints, cla) } } sort.Slice(endpoints, func(i, j int) bool { iDirection, iSubset, iName, iPort := safelyParseSubsetKey(endpoints[i].ClusterName) jDirection, jSubset, jName, jPort := safelyParseSubsetKey(endpoints[j].ClusterName) if iName == jName {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Jul 22 09:57:29 UTC 2024 - 6.1K bytes - Viewed (0) -
istioctl/pkg/injector/injector-list.go
if err != nil { return []corev1.Namespace{}, err } filtered := filterSystemNamespaces(nsList.Items, istioNamespace) filtered = slices.Filter(filtered, func(namespace corev1.Namespace) bool { return !ambient.InAmbient(&namespace) }) sort.Slice(filtered, func(i, j int) bool { return filtered[i].Name < filtered[j].Name }) return filtered, nil }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Oct 18 11:39:52 UTC 2024 - 10.6K bytes - Viewed (0) -
istioctl/pkg/multixds/gather.go
return nil, fmt.Errorf("`ResourceNames` must have one element when `all` flag is turned on") } slice := strings.SplitN(dr.ResourceNames[0], ".", 2) if len(slice) != 2 { return nil, fmt.Errorf("invalid resource name format: %v", slice) } podName := slice[0] ns := slice[1] pod, err := kubeClient.Kube().CoreV1().Pods(ns).Get(context.TODO(), podName, metav1.GetOptions{}) if err != nil {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Oct 09 16:05:45 UTC 2024 - 13.6K bytes - Viewed (0)