the smallest value, of all values inside the array, only work when all values are numeric

@param array
@return the smallest value
@throws PageException
766461
public static double min(Array array) throws PageException {
	if (array.getDimension() > 1) throw new ExpressionException("can only get max value from 1 dimensional arrays");
	if (array.size() == 0) return 0;

	double rtn = _toDoubleValue(array, 1);
	int len = array.size();
	try {
	    for (int i = 2; i <= len; i++) {
		double v = _toDoubleValue(array, i);
		if (rtn > v) rtn = v;

	    }
	}
	catch (PageException e) {
	    throw new ExpressionException("exception while execute array operation: " + e.getMessage());
	}
	return rtn;
    }
102456
function min(array) {
  var length = array.length;

  if (length === 0) {
    return 0;
  }

  var index = -1;
  var result = array[++index];

  while (++index < length) {
    if (array[index] < result) {
      result = array[index];
    }
  }

  return result;
}
147071
function (page) {
        if (!lang.isNumber(page)) {
            page = this.getCurrentPage();
        }

        var perPage = this.get('rowsPerPage'),
            records = this.get('totalRecords'),
            start, end;

        if (!page || !perPage) {
            return null;
        }

        start = (page - 1) * perPage;
        if (records !== Paginator.VALUE_UNLIMITED) {
            if (start >= records) {
                return null;
            }
            end = Math.min(start + perPage, records) - 1;
        } else {
            end = start + perPage - 1;
        }

        return [start,end];
    }
507199
private int lowestNonNullIndex(int iTargetPosition)
    {
        Object bookmark = null;
        int iBookmarkIndex = iTargetPosition;
        while (bookmark == null)
        {
            int iArrayIndex = m_gridList.listToArrayIndex(iBookmarkIndex);
            iBookmarkIndex =  m_gridList.arrayToListIndex(iArrayIndex);   // Lowest valid bookmark
            bookmark = m_gridList.elementAt(iBookmarkIndex);
            if (bookmark == null)
            {
                if (iBookmarkIndex == 0)
                    return -1;  // None found
                iBookmarkIndex--;
                if (m_gridBuffer != null)
                    bookmark = m_gridBuffer.elementAt(iBookmarkIndex);  // Check to see if it's in this list
            }
        }
        return iBookmarkIndex;  // Valid bookmark, return it.
    }
625119
public static <E> E first(E[] array) {
        return new FirstElement<E>().apply(new ArrayIterator<>(array));
    }
1211205
public static <E extends Comparable<E>> void sort(E[] array) {
        boolean swapped = true;
        
        while(swapped) {
            swapped = false;
            
            for(int i = 0; i < (array.length - 1 ); i++) {
                if(array[i].compareTo(array[i + 1]) > 0) {
                    TrivialSwap.swap(array, i, i + 1);
                    
                    swapped = true;
                }
            }            
        }
    }
628624
public static float searchMin(float[] floatArray) {
        if(floatArray.length == 0) {
            throw new IllegalArgumentException("The array you provided does not have any elements");
        }

        float min = floatArray[0];

        for(int i = 1; i < floatArray.length; i++) {
            if(floatArray[i] < min) {
                min = floatArray[i];
            }
        }

        return min;
    }
28280
public static boolean allJSONArrays(JSONArray array) throws JSONException {
        for (int i = 0; i < array.length(); ++i) {
            if (!(array.get(i) instanceof JSONArray)) {
                return false;
            }
        }
        return true;
    }
180053
public static <T> int indexOf(T[] array, T value) {
        for (int i = 0; i < array.length; i++) {
            if (array[i] == null) {
                if (value == null) return i;
            } else {
                if (value != null && array[i].equals(value)) return i;
            }
        }
        return -1;
    }
793430
@SafeVarargs
    public static byte min(final byte... a) {
        N.checkArgNotNullOrEmpty(a, "The spcified array 'a' can not be null or empty");

        return min(a, 0, a.length);
    }
456911
public static String arrayToList(Array array, String delimiter) throws PageException {
	if (array.size() == 0) return "";
	StringBuilder sb = new StringBuilder(Caster.toString(array.get(1, "")));
	int len = array.size();

	for (int i = 2; i <= len; i++) {
	    sb.append(delimiter);
	    sb.append(Caster.toString(array.get(i, "")));
	}
	return sb.toString();
    }
76876
public static <T> T getFirst(T array[]){
        return array!=null && array.length>0 ? array[0] : null;
    }
666708
public static String[] toStringArrayTrim(Array array) throws PageException {
	String[] arr = new String[array.size()];
	for (int i = 0; i < arr.length; i++) {
	    arr[i] = Caster.toString(array.get(i + 1, "")).trim();
	}

	return arr;
    }
188293
public static double min(DoubleArrayND array)
    {
        return array.stream().parallel().reduce(
            Double.POSITIVE_INFINITY, Math::min);
    }
32911
public void binds(Object... array)
	{
		if(name2Index==null){
			throw new RuntimeException("html标签没有定义绑定变量,但标签实现中试图绑定"+Arrays.asList(array));
		}
		
		Iterator<Integer> it = name2Index.values().iterator();
		for (int i = 0; i < array.length; i++)
		{
			int index = it.next();
			ctx.vars[index] = array[i];
		}
	}
736491
public static function array_page(array $array, $page=1, $pageSize=10)
    {
        if (!is_array($array)) {
            return array();
        }
        //总数量
        $totalCount = count($array);
        $page       = max(intval($page), 1);
        $pageSize   = max(intval($pageSize), 0);
        $start      = ($page-1) * $pageSize;
        $tmp        = array_slice($array, $start, $pageSize);
        $tmp ? $tmp : $tmp=array();
        return $tmp;
    }
437997
public int getMaxValueIndex(double[] array) {

        int index = 0;
        double max = Integer.MIN_VALUE;

        for (int i = 0; i < array.length; i++) {
            if (array[i] > max) {
                max = array[i];
                index = i;
            }
        }

        return index;
    }