反转数组，会变更原数组

@param array 数组，会变更
@param startIndexInclusive 其实位置（包含）
@param endIndexExclusive 结束位置（不包含）
@return 变更后的原数组
@since 3.0.9
354678
public static double[] reverse(final double[] array, final int startIndexInclusive, final int endIndexExclusive) {
		if (isEmpty(array)) {
			return array;
		}
		int i = startIndexInclusive < 0 ? 0 : startIndexInclusive;
		int j = Math.min(array.length, endIndexExclusive) - 1;
		double tmp;
		while (j > i) {
			tmp = array[j];
			array[j] = array[i];
			array[i] = tmp;
			j--;
			i++;
		}
		return array;
	}
1105309
public static <E> E at(long index, E[] array) {
        final Iterator<E> filtered = new FilteringIterator<E>(new ArrayIterator<E>(array), new AtIndex<E>(index));
        return new FirstElement<E>().apply(filtered);
    }
1241305
function arraySlice (array, startIndex, endIndex) {
  var result = []
  if (array) {
    for (startIndex = startIndex || 0, endIndex = endIndex || array.length; startIndex < endIndex; startIndex++) {
      result.push(array[startIndex])
    }
  }
  return result
}
467206
function findIndexInArray(array, callback) {
        var _length = array.length;
        for (var i = 0; i < _length; i++) {
            if (callback(array[i])) return i;
        }
        return -1;
    }
343970
private int startIndex(Date start) {
        int lastIndex = ranges.size();

        for (int i = 0; i < ranges.size(); i++) {
            Range r = ranges.get(i);
            if (start.before(r.start)) {
                break;
            }
            lastIndex = i;
        }
        return lastIndex;
    }
275363
private static void reverse(int[] array, int start, int end) {
		for (int i = start, j = end; i < --j; ++i) {
			int t = array[i];
			array[i] = array[j];
			array[j] = t;
		}
	}
99505
public static int find(int[] arr, int start, int end, int valueToFind) {
    assert arr != null;
    assert end >= 0;
    assert end <= arr.length;


    for (int i = start; i < end; i++) {
      if (arr[i] == valueToFind) {
        return i;
      }
    }

    return NOT_FOUND;
  }
1144530
public static void sort(long[] longArray) {
        int index = 0;
        long value = 0;
        
        for(int i = 1; i < longArray.length; i++) {
            index = i;
            value = longArray[index];
            
            while(index > 0 && value < longArray[index - 1]) {
                longArray[index] = longArray[index - 1];
                
                index--;
            }
            
            longArray[index] = value;
        }
    }
621173
public static byte hashByteArray(byte[] array, int startInclusive, int endExclusive) {
        if (array == null) {
            return 0;
        }

        int range = endExclusive - startInclusive;
        if (range < 0) {
            throw new IllegalArgumentException(startInclusive + " > " + endExclusive);
        }

        int result = 1;
        for (int i=startInclusive; i<endExclusive; i++){
            result = 31 * result + array[i];
        }

        return (byte)result;
    }
671687
private void selectionSort(final T[] array, int start, int end, Comparator<T> lt) {
    int i;
    int j;
    int bestI;
    T tmp;
    for (i = start; i < end; i++) {
      bestI = i;
      for (j = i + 1; j < end; j++) {
        if (lt.compare(array[j], array[bestI]) < 0)
          bestI = j;
      }
      tmp = array[i];
      array[i] = array[bestI];
      array[bestI] = tmp;
    }
  }
1205581
public static INDArray lastIndex(INDArray array, Condition condition) {
        if (!(condition instanceof BaseCondition))
            throw new UnsupportedOperationException("Only static Conditions are supported");

        LastIndex idx = new LastIndex(array, condition);
        Nd4j.getExecutioner().exec(idx);
        return Nd4j.scalar(DataType.LONG, idx.getFinalResult().longValue());
    }
1339055
public static <E> Optional<E> maybeLast(E[] array) {
        return new MaybeLastElement<E>().apply(new ArrayIterator<>(array));
    }
345899
public static void intIndexesToBooleanArray(int[] arra, boolean[] arrb) {

        for (int i = 0; i < arra.length; i++) {
            if (arra[i] < arrb.length) {
                arrb[arra[i]] = true;
            }
        }
    }
91844
public function slice($start_index, $end_index = NULL) {
    if ($start_index < 0) {
      $start_index = $this->count() + $start_index;
    }
    if ($end_index < 0) {
      $end_index = $this->count() + $end_index;
    }
    $last_index = $this->count() - 1;
    if ($start_index > $last_index) {
      $start_index = $last_index;
    }
    if ($end_index !== NULL) {
      if ($end_index > $last_index) {
        $end_index = $last_index;
      }
      if ($start_index > $end_index) {
        $start_index = $end_index;
      }
      $length = $end_index - $start_index;
    }
    else {
      $length = $this->count() - $start_index;
    }
    return new NodeCollection(array_slice($this->nodes, $start_index, $length));
  }
47207
public static INDArrayIndex interval(int begin, int stride, int end, boolean inclusive) {
        Preconditions.checkArgument(begin <= end, "Beginning index (%s) in range must be less than or equal to end (%s)", begin, end);
        INDArrayIndex index = new IntervalIndex(inclusive, stride);
        index.init(begin, end);
        return index;
    }
1175238
static function Rotate(array $array, $startIndex)
    {
        $startArray = array_slice($array, 0, $startIndex, true);
        $endArray = array_slice($array, $startIndex, null, true);
        //die('end array count:' . count($endArray));
        return array_merge($endArray, $startArray);
    }
881635
@Override
    public Object[][] getDataByIndex(int[] indexes) {
        validateResourceParams(resource);
        Preconditions.checkArgument((indexes.length != 0), "Indexes cannot be empty");
        logger.entering(indexes);
        Object[][] requestedData = null;
        Class<?> arrayType;
        JsonReader reader = null;
        try {

            requestedData = new Object[indexes.length][1];
            reader = new JsonReader(getReader(resource));
            arrayType = Array.newInstance(resource.getCls(), 0).getClass();
            logger.log(Level.FINE, "The Json Data is mapped as", arrayType);
            Object[][] mappedData = mapJsonData(reader, arrayType);
            int i = 0;
            for (int indexVal : indexes) {
                indexVal--;
                requestedData[i] = mappedData[indexVal];
                i++;
            }
        } catch (IOException e) {
            throw new DataProviderException("Error while getting the data by index from Json file", e);
        } finally {
            IOUtils.closeQuietly(reader);
        }
        logger.exiting((Object[]) requestedData);
        return requestedData;
    }