Faster than invoking arr.slice().
170510
function cp(arr) {
	var len = arr.length
	var ret = new Array(len)
	for (var i=0; i<len; i++) {ret[i] = arr[i]}
	return ret
}
333234
public static <T extends Comparable<? super T>> void quicksort( T[] arr )
    {
        quicksort( arr, 0, arr.length - 1 );
    }
223708
function slice(from, to, a)
{
	if (from < 0)
	{
		from += length(a);
	}
	if (to < 0)
	{
		to += length(a);
	}
	return sliceLeft(from, sliceRight(to, a));
}
1025720
public static Slice wrappedShortArray(short[] array, int offset, int length)
    {
        if (length == 0) {
            return EMPTY_SLICE;
        }
        return new Slice(array, offset, length);
    }
499157
function (arr, val) {
    if (!arr || arr.length === 0) return {}

    let o = {}
    let v = val || null

    if (arr.length > 1)
      v = this.fromArray(arr.slice(1), v)

    o[arr[0]] = v
    return o
  }
262401
function () {
		if ( server || ( !client.ie || client.version > 8 ) ) {
			return function ( obj, key ) {
				key = ( key === true );
				var o = [];

				if ( !isNaN( obj.length ) ) {
					o = slice.call( obj );
				}
				else if ( key ) {
					o = array.keys( obj );
				}
				else {
					utility.iterate( obj, function ( i ) {
						o.push( i );
					});
				}

				return o;
			};
		}
		else {
			return function ( obj, key ) {
				key   = ( key === true );
				var o = [];

				if ( !isNaN( obj.length ) ) {
					try {
						o = slice.call( obj );
					}
					catch ( e ) {
						utility.iterate( obj, function ( i, idx ) {
							if ( idx !== "length" ) {
								o.push( i );
							}
						});
					}
				}
				else if ( key ) {
					o = array.keys( obj );
				}
				else {
					utility.iterate( obj, function ( i ) {
						o.push( i );
					});
				}

				return o;
			};
		}
	}
268075
function sliceOf(ars, i, parts) {
  return ars.slice(
    Math.floor(i/parts*ars.length),
    Math.floor((i+1)/parts*ars.length));
}
974341
def _slice_required_len(slice_obj):
    
    if slice_obj.step and slice_obj.step != 1:
        return None
    # (None, None, *) requires the entire list
    if slice_obj.start is None and slice_obj.stop is None:
        return None

    # Negative indexes are hard without knowing the collection length
    if slice_obj.start and slice_obj.start < 0:
        return None
    if slice_obj.stop and slice_obj.stop < 0:
        return None

    if slice_obj.stop:
        if slice_obj.start and slice_obj.start > slice_obj.stop:
            return 0
        return slice_obj.stop
    return slice_obj.start + 1
831930
function slice(array) {
  const newArray = new Array(array.length);

  let i,
      l;

  for (i = 0, l = array.length; i < l; i++)
    newArray[i] = array[i];

  return newArray;
}
1210953
def process_slice(self, b_rot90=None):
        '''
        
        '''
        if b_rot90:
            self._Mnp_2Dslice = np.rot90(self._Mnp_2Dslice)
        if self.func == 'invertIntensities':
            self.invert_slice_intensities()
1049552
function pop(arr) {
    return {
        array: arr.slice(0, arr.length - 1),
        val: last(arr)
    };
}
1041294
public static Slice wrappedLongArray(long[] array, int offset, int length)
    {
        if (length == 0) {
            return EMPTY_SLICE;
        }
        return new Slice(array, offset, length);
    }
574856
def _split_arrs(array_2d, slices):
    
    if len(array_2d) == 0:
        return np.empty(0, dtype=np.object)

    rtn = np.empty(len(slices) + 1, dtype=np.object)
    start = 0
    for i, s in enumerate(slices):
        rtn[i] = array_2d[start:s]
        start = s
    rtn[-1] = array_2d[start:]
    return rtn
557288
function(arr) {
    var key = 0;
    var max = arr[0];
    for(var i = 1, len = arr.length; i < len; i++) {
      if(arr[i] > max) {
        key = i;
        max = arr[i];
      }
    }
    return key;
  }
114159
def get_true_slice(dims, data_len):
    '''
    
    '''
    rangeLen = non_str_len_no_throw(dims)

    # Get the range qualifier for length
    if isinstance(dims, slice):
        start = get_restricted_index(int(dims.start), data_len) if dims.start != None else dims.start
        stop = get_restricted_index(int(dims.stop), data_len) if dims.stop != None else dims.stop
        step = get_restricted_index(int(dims.step), data_len) if dims.step != None else dims.step
    elif rangeLen > 3:
        raise AttributeError(str(dims)+' length is > 3')
    elif rangeLen == 3:
        start = get_restricted_index(int(dims[0]), data_len) if dims[0] != None else dims[0]
        stop = get_restricted_index(int(dims[1]), data_len) if dims[1] != None else dims[1]
        step = get_restricted_index(int(dims[2]), data_len) if dims[2] != None else dims[2]
    elif rangeLen == 2:
        start = get_restricted_index(int(dims[0]), data_len) if dims[0] != None else dims[0]
        stop = get_restricted_index(int(dims[1]), data_len) if dims[1] != None else dims[1]
        step = None
    elif rangeLen == 1:
        start = get_restricted_index(int(dims[0]), data_len) if dims[0] != None else dims[0]
        stop = get_restricted_index(int(dims[0]), data_len)+1 if dims[0] != None else dims[0]
        step = None
    elif dims != None:
        start = get_restricted_index(int(dims), data_len) if dims != None else dims
        stop = get_restricted_index(int(dims), data_len)+1 if dims != None else dims
        step = None
    else:
        start = None
        stop = None
        step = None

    return slice(start, stop, step)
1351585
function slice(start, end) {
    var index = -1,
        object = Object(this),
        length = object.length >>> 0,
        result = [];

    start = toInteger(start);
    start = start < 0 ? max(length + start, 0) : min(start, length);
    start--;
    end = end == null ? length : toInteger(end);
    end = end < 0 ? max(length + end, 0) : min(end, length);

    while ((++index, ++start) < end) {
      if (start in object) {
        result[index] = object[start];
      }
    }
    return result;
  }
630615
function slice (args, start, end) {
  var len = args.length;
  start = start > 0 ? start : 0;
  end = end >= 0 && end < len ? end : len;

  var n = end - start;
  if (n <= 0) return [];

  var ret = new Array(n);
  for (var i = 0; i < n; ++i) {
    ret[i] = args[i + start];
  }
  return ret;
}