Find the biggest value from given expression
@param callable|string|null $max
@return numeric
429929
public function max($max=null)
    {
        $max = LambdaUtils::toSelectCallable($max);
        $temp = $this->select($max)->toArray();
        return max($temp);
    }
209097
public static function ruleLenRange($min, $max)
    {
        return function ($input) use ($min, $max) {
            return strlen($input) >= $min && strlen($input) <= $max;
        };
    }
1183785
public function max($key = null)
    {
        return $this->reduce(function ($result, $item) use ($key) {
            $value = ArrayHelper::getValue($item, $key);

            return is_null($result) || $value > $result ? $value : $result;
        });
    }
1170667
public function max(float $max, string $error = 'not at most %d') : Real
    {
        return $this->pipe(
            self::predicate(
                function (float $value) use ($max) : bool {
                    return $value <= $max;
                },
                sprintf($error, $max)
            )
        );
    }
1341303
public function limitSize($max) {
		// if the maximum is not numeric
		if(is_numeric($max)) {
			// set maximum
			$this->Limits->Size = intval($max);
		}
		// return self
		return($this);
	}
334164
public function setMax($max)
    {
        if (is_array($max) and isset($max['max'])) {
            $max = $max['max'];
        }

        if (!is_string($max) and !is_numeric($max)) {
            // require_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception ('Invalid options to validator provided');
        }

        $max = (integer) $max;
        if (($this->_min !== null) && ($max < $this->_min)) {
            // require_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception("The maximum must be greater than or equal to the minimum file count, but "
                                            . "$max < {$this->_min}");
        }

        $this->_max = $max;
        return $this;
    }
648164
public static function max($value, $max = 0, $equal = true)
    {
        return $equal ? $value <= $max : $value < $max;
    }
1309982
def get_max(array):
    
    largest = -np.inf
    for i in array:
        try:
            if i > largest:
                largest = i
        except:
            pass
    if np.isinf(largest):
        raise ValueError("there's no numeric value in array!")
    else:
        return largest
1297389
public static function randNum($min = null, $max = null)
    {
        mt_srand((double) microtime() * 1000000);
        if ($min === null || $max === null) {
            return mt_rand();
        } else {
            return mt_rand($min, $max);
        }
    }
88862
function max(expression) {

        //Define output
		var outData;
		
		//If there's no expression
		if (!expression){
		
			//Just assign current items
			outData = this.items;
		}
		else{
		
			//Otherwise apply select condition
			outData = jslinq(this.items)
				.select(expression)
				.toList();
		}
		
		//If array has no elements, returns null
		if (outData.length === 0){
			return null;
		}
		else{
		
			//Apply orderby
			outData = jslinq(outData)
				.orderBy(function(x) { return x; })
				.toList();
				
			//Returns last element
			return outData[outData.length - 1];
		}
    }
1085585
public function setMax(string $max)
    {
        $this->doSetMax($max);
        $this->getTag()->setAttribute('max', $max);

        return $this;
    }
614479
public function max($max) {
        $this->check_role = 'max';
        $this->p1 = $max;
        $result = $this->value <= $max;
        $this->checkResult($result);
        return $this;
    }
395521
public function range(int $min=null, int $max=null)
        {
                $min      = is_null($min) ? '-inf' : $min;
                $max      = is_null($max) ? '+inf' : $max;
           
                $response = $this->_redis->zrevrangebyscore($this->_key, $max, $min, 'WITHSCORES');
                $result   = [];
                for($i=0,$num=count($response);$i<$num;$i++) {
                        $result[$response[$i]] = intval($response[++$i]);
                }
                return $result;
        }
261332
public function visitMaximumConstraint(NumberValue\MaximumConstraint $constraint)
    {
        $value = $this->currentValue();
        if (
            !$value instanceof Value\NumberValueInterface ||
            $value->value() <= $constraint->maximum()
        ) {
            return $this->createResult();
        }

        return $this->createSingleIssueResult($constraint);
    }
1325608
private function max($value, $max)
    {
        if (is_string($value)) {
            $value = strlen($value);
        }

        return $value <= $max;
    }
1044036
public function length($min, $max = null) {
        if (!$this->_isValid) {
            return $this;
        }
        $c = count($this->_unsafeVar);
        if ($c < $min || (null !== $max && $c > $max)) {
            $this->_isValid = false;
        }
        return $this;
    }
1016598
public function matchQuantity($min, $max = null)
	{
		$match = '{'.$min;

		if ($max !== null)
		{
			$match .= ',' . $max;
		}

		$match .= '}';

		$this->value($match);

		return $this;
	}