Top "Slice" questions

A slice is a representation of a part of a sequence, usually defined by a reference to the underlying sequence, an index giving the starting position, a length or end position, and optionally a "stride" or "step" value.

Slice unicode/ascii strings in golang?

I need to slice a string in Go. Possible values can contain Latin chars and/or Arabic/Chinese chars. In …

go unicode utf-8 slice rune
MDX: Filtering and slicing on different members of the same dimension

I am using icCube's Sales cube to learn MDX. I would like to write an MDX query to show the …

filter mdx slice iccube
Use slice notation with collections.deque

How would you extract items 3..6 efficiently, elegantly and pythonically from the following deque without altering it: from collections import deque …

python slice deque
How to calculate space between dicom slices for MPR?

Due to showing MPR view based on Dicoms. I've made a 3D array from series of dicom files. And I …

dicom slice
Append not thread-safe?

I noticed that if I tried appending to a slice using goroutines inside a for loop, there would be instances …

go concurrency append slice goroutine
good tool to slice PSD to CSS+HTML output

Is there any tool to slice PSD design that generates CSS+HTML (not excellent, but as a starting point). I …

html css slice psd
Slicing a list into n nearly-equal-length partitions

I'm looking for a fast, clean, pythonic way to divide a list into exactly n nearly-equal partitions. partition([1,2,3,4,5],5)->[[1],[2],[3],[4],[5]] …

python list slice
Return last item of strings.Split() slice in Golang

I am splitting file names in Go to get at the file extension (e.g. import ("strings") ; strings.Split("example.…

go split slice file-extension
How to slice NSMutableArray

I have a NSMutableArray and need objects [0:5] only. Is there a simple way to slice? Can I drop all objects …

objective-c nsmutablearray slice
What does extended slice syntax actually do for negative steps?

The extended slice syntax in python has been explained to me as "a[n:m:k] returns every kth element …

python list slice syntactic-sugar