- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for Clip (0.23 sec)
-
src/slices/example_test.go
// Output: // 4 // [0 42 -10 8] // 4 // 8 } func ExampleClip() { a := [...]int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} s := a[:4:10] clip := slices.Clip(s) fmt.Println(cap(s)) fmt.Println(clip) fmt.Println(len(clip)) fmt.Println(cap(clip)) // Output: // 10 // [0 1 2 3] // 4 // 4 } func ExampleConcat() { s1 := []int{0, 1, 2, 3} s2 := []int{4, 5, 6}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:28:50 UTC 2024 - 8.1K bytes - Viewed (0) -
src/slices/slices.go
if n < 0 { panic("cannot be negative") } if n -= cap(s) - len(s); n > 0 { s = append(s[:cap(s)], make([]E, n)...)[:len(s)] } return s } // Clip removes unused capacity from the slice, returning s[:len(s):len(s)]. func Clip[S ~[]E, E any](s S) S { return s[:len(s):len(s)] } // TODO: There are other rotate algorithms.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 29 14:01:59 UTC 2024 - 13.6K bytes - Viewed (0) -
src/slices/slices_test.go
t.Errorf("len(%v) = %d, want 3", s1, len(s1)) } if cap(s1) < 6 { t.Errorf("cap(%v[:3]) = %d, want >= 6", orig, cap(s1)) } s2 := Clip(s1) if !Equal(s1, s2) { t.Errorf("Clip(%v) = %v, want %v", s1, s2, s1) } if cap(s2) != 3 { t.Errorf("cap(Clip(%v)) = %d, want 3", orig, cap(s2)) } } func TestReverse(t *testing.T) { even := []int{3, 1, 4, 1, 5, 9} // len = 6 Reverse(even)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:32:06 UTC 2024 - 33.2K bytes - Viewed (0) -
src/cmd/go/main.go
telemetry.Inc("go/subcommand:" + strings.ReplaceAll(cfg.CmdName, " ", "-") + "-" + strings.Join(args[used:], "-")) help.Help(os.Stdout, append(slices.Clip(args[:used]), args[used+1:]...)) base.Exit() } helpArg := "" if used > 0 { helpArg += " " + strings.Join(args[:used], " ") } cmdName := cfg.CmdName if cmdName == "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:09:11 UTC 2024 - 10K bytes - Viewed (0) -
samples/bookinfo/src/productpage/templates/productpage.html
</svg> {% endfor %} {% for n in range(5 - review.rating.stars) %}
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jun 03 19:54:05 UTC 2024 - 10.9K bytes - Viewed (0) -
src/cmd/go/internal/load/test.go
ptest.EmbedFiles = str.StringList(p.EmbedFiles, p.TestEmbedFiles) ptest.Internal.OrigImportPath = p.Internal.OrigImportPath ptest.Internal.PGOProfile = p.Internal.PGOProfile ptest.Internal.Build.Directives = append(slices.Clip(p.Internal.Build.Directives), p.Internal.Build.TestDirectives...) } else { ptest = p } // External test package. if len(p.XTestGoFiles) > 0 { pxtest = &Package{ PackagePublic: PackagePublic{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 14:01:23 UTC 2024 - 28.2K bytes - Viewed (0) -
samples/bookinfo/src/productpage/static/tailwind/tailwind.css
hment":"fixed"},".bg-local":{"background-attachment":"local"},".bg-scroll":{"background-attachment":"scroll"}})},backgroundClip:({addUtilities:i})=>{i({".bg-clip-border":{"background-clip":"border-box"},".bg-clip-padding":{"background-clip":"padding-box"},".bg-clip-content":{"background-clip":"content-box"},".bg-clip-text":{"background-clip":"text"}})},backgroundPosition:P("backgroundPosition",[["bg",["background-position"]]],{type:["lookup",["position",{preferOnConflict:!0}]]}),backgroundRepeat...
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 28 14:48:01 UTC 2024 - 357.1K bytes - Viewed (1) -
src/image/jpeg/scan.go
case 3: dst, stride = d.blackPix[8*(by*d.blackStride+bx):], d.blackStride default: return UnsupportedError("too many components") } } // Level shift by +128, clip to [0, 255], and write to dst. for y := 0; y < 8; y++ { y8 := y * 8 yStride := y * stride for x := 0; x < 8; x++ { c := b[y8+x] if c < -128 { c = 0 } else if c > 127 { c = 255
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 25 00:46:29 UTC 2024 - 15.7K bytes - Viewed (0) -
platforms/documentation/docs/src/docs/css/base.css
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Sat May 25 05:15:02 UTC 2024 - 30.5K bytes - Viewed (0) -
pkg/registry/core/service/storage/storage_test.go
t.Errorf("%s: expected clusterIP == clusterIPs[0]: %q != %q", callName(before, after), sing, plur) } for _, clip := range after.Spec.ClusterIPs { if !ipIsAllocated(t, storage.alloc.serviceIPAllocatorsByFamily[familyOf(clip)], clip) { t.Errorf("%s: expected clusterIP to be allocated: %q", callName(before, after), clip) } } if lc, lf := len(after.Spec.ClusterIPs), len(after.Spec.IPFamilies); lc != lf {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 440.2K bytes - Viewed (0)