- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 68 for SLICE (1.27 sec)
-
src/slices/iter.go
// returns the extended slice. func AppendSeq[Slice ~[]E, E any](s Slice, seq iter.Seq[E]) Slice { for v := range seq { s = append(s, v) } return s } // Collect collects values from seq into a new slice and returns it. func Collect[E any](seq iter.Seq[E]) []E { return AppendSeq([]E(nil), seq) } // Sorted collects values from seq into a new slice, sorts the slice,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:40:32 UTC 2024 - 2.9K bytes - Viewed (0) -
doc/next/6-stdlib/3-iter.md
- [All](/pkg/slices#All) returns an iterator over slice indexes and values. - [Values](/pkg/slices#Values) returns an iterator over slice elements. - [Backward](/pkg/slices#Backward) returns an iterator that loops over a slice backward. - [Collect](/pkg/slices#Collect) collects values from an iterator into a new slice. - [AppendSeq](/pkg/slices#AppendSeq) appends values from an iterator to an existing slice.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 18:34:13 UTC 2024 - 1.4K bytes - Viewed (0) -
pkg/slices/slices.go
} // SortFunc sorts the slice x in ascending order as determined by the less function. // This sort is not guaranteed to be stable. // The slice is modified in place but returned. func SortFunc[E any](x []E, less func(a, b E) int) []E { if len(x) <= 1 { return x } slices.SortFunc(x, less) return x } // SortStableFunc sorts the slice x while keeping the original order of equal element.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 15 06:28:11 UTC 2024 - 7.9K bytes - Viewed (0) -
src/os/dir.go
// Readdirnames returns an empty slice, it will return a non-nil error // explaining why. At the end of a directory, the error is [io.EOF]. // // If n <= 0, Readdirnames returns all the names from the directory in // a single slice. In this case, if Readdirnames succeeds (reads all // the way to the end of the directory), it returns the slice and a // nil error. If it encounters an error before the end of the
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 6.1K bytes - Viewed (0) -
tests/associations_has_one_test.go
t.Errorf("account's number should not be saved") } } func TestHasOneAssociationForSlice(t *testing.T) { users := []User{ *GetUser("slice-hasone-1", Config{Account: true}), *GetUser("slice-hasone-2", Config{Account: false}), *GetUser("slice-hasone-3", Config{Account: true}), } DB.Create(&users) // Count AssertAssociationCount(t, users, "Account", 2, "") // Find
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 7.1K bytes - Viewed (0) -
src/syscall/dir_plan9.go
// returning the remaining slice of b.. func pstring(b []byte, s string) []byte { b = pbit16(b, uint16(len(s))) n := copy(b, s) return b[n:] } // gbit8 reads an 8-bit number from b and returns it with the remaining slice of b. func gbit8(b []byte) (uint8, []byte) { return uint8(b[0]), b[1:] } // gbit16 reads a 16-bit number in little-endian order from b and returns it with the remaining slice of b. // //go:nosplit
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 19:32:38 UTC 2024 - 5.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfrt/tests/ifrt/lower_to_ifrt_restore_variable.mlir
// single variable // CHECK-LABEL: func.func @restore_single() { // CHECK-NEXT: [[PREFIX:%.*]] = "tf.Const"() <{value = dense<"restore_ariables"> : tensor<!tf_type.string>}> : () -> tensor<!tf_type.string> // CHECK-NEXT: [[SLICE:%.*]] = "tf.Const"() <{value = dense<""> : tensor<1x!tf_type.string>}> : () -> tensor<1x!tf_type.string> // CHECK-NEXT: [[NAME:%.*]] = "tf.Const"() <{value = dense<"y"> : tensor<1x!tf_type.string>}> : () -> tensor<1x!tf_type.string>
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 31 20:44:15 UTC 2024 - 8.8K bytes - Viewed (0) -
doc/next/6-stdlib/99-minor/encoding/binary/60023.md
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 18:58:26 UTC 2024 - 157 bytes - Viewed (0) -
src/go/types/conversions.go
return true } // "and vice versa" if isUnsafePointer(Vu) && (isPointer(Tu) || isUintptr(Tu)) { return true } // "V is a slice, T is an array or pointer-to-array type, // and the slice and array types have identical element types." if s, _ := Vu.(*Slice); s != nil { switch a := Tu.(type) { case *Array: if Identical(s.Elem(), a.Elem()) { if check == nil || check.allowVersion(x, go1_20) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 18:51:00 UTC 2024 - 9.1K bytes - Viewed (0) -
src/reflect/iter.go
// If v's kind is Pointer, the pointer element type must have kind Array. // Otherwise v's kind must be Int, Int8, Int16, Int32, Int64, // Uint, Uint8, Uint16, Uint32, Uint64, Uintptr, // Array, Chan, Map, Slice, or String. func (v Value) Seq() iter.Seq[Value] { if canRangeFunc(v.typ()) { return func(yield func(Value) bool) { rf := MakeFunc(v.Type().In(0), func(in []Value) []Value { return []Value{ValueOf(yield(in[0]))}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 13:40:11 UTC 2024 - 3.9K bytes - Viewed (0)