Find common give names of males.

@param int $threshold
@param int $maxtoshow

@return string
191170
public function commonGivenMale(int $threshold = 1, int $maxtoshow = 10): string
    {
        return $this->commonGivenQuery('M', 'nolist', false, $threshold, $maxtoshow);
    }
1020041
public function setThreshold(int $threshold = null) : self
    {
        $this->threshold = null === $threshold ? error_reporting() : $threshold;

        return $this;
    }
480676
public function getCommonSurname(): string
    {
        $top_surname = $this->topSurnames(1, 0);
        
        return $top_surname
            ? implode(', ', array_keys(array_shift($top_surname)) ?? [])
            : '';
    }
652596
@Override
    public String parse(final String threshold, final RangeConfig tc) throws RangeException {

        if (threshold == null) {
            throw new RangeException("Range can't be null");
        }

        Stage currentStage = this;

        String parsedThreshold = threshold;

        boolean stageParsed;

        while (parsedThreshold.length() != 0) {
            stageParsed = false;
            for (String transitionName : currentStage.getTransitionNames()) {
                Stage transition = currentStage.getTransition(transitionName);
                if (transition.canParse(parsedThreshold)) {
                    parsedThreshold = transition.parse(parsedThreshold, tc);
                    currentStage = transition;
                    stageParsed = true;
                    break;
                }
            }

            if (!stageParsed) {
                throw new InvalidRangeSyntaxException(currentStage, parsedThreshold, threshold);
            }
        }

        if (!currentStage.isLeaf()) {
            throw new PrematureEndOfRangeException(currentStage, threshold);
        }

        return parsedThreshold;
    }
721699
protected function getVisitsUsersSearchEngine($days = 30, $maxResult = 10)
    {
        list($startDate, $endDate) = $this->calculateDays($days);

        $this->getVisitsUsersSearchEngineForPeriod($startDate, $endDate,
            $maxResult);
    }
709902
public function commonGivenList(int $threshold = 1, int $maxtoshow = 10): string
    {
        return $this->commonGivenQuery('B', 'list', false, $threshold, $maxtoshow);
    }
904880
public function getTopBrowsers($numberOfDays = 365, $maxResults = 6)
    {
        list($startDate, $endDate) = $this->calculateNumberOfDays($numberOfDays);

        return $this->getTopBrowsersForPeriod($startDate, $endDate, $maxResults);
    }
183294
function getThreshold(threshold) {
			if (min > threshold) {
				threshold = min;
			} else if (max < threshold) {
				threshold = max;
			}

			return translate(threshold, 0, 1);
		}
1024986
public function findUsersOwnersOfMostWorkspaces($max)
    {
        $dql = "
            SELECT CONCAT(CONCAT(u.firstName,' '), u.lastName) AS name, u.username, COUNT(DISTINCT ws.id) AS total
            FROM Claroline\CoreBundle\Entity\Workspace\Workspace ws
            JOIN ws.creator u
            WHERE u.isEnabled = true
            GROUP BY u.id
            ORDER BY total DESC
        ";
        $query = $this->_em->createQuery($dql);

        if ($max > 1) {
            $query->setMaxResults($max);
        }

        return $query->getResult();
    }
513112
public function commonGivenMaleListTotals(int $threshold = 1, int $maxtoshow = 10): string
    {
        return $this->commonGivenQuery('M', 'list', true, $threshold, $maxtoshow);
    }
9399
public function commonGivenFemaleTable(int $threshold = 1, int $maxtoshow = 10): string
    {
        return $this->commonGivenQuery('F', 'table', false, $threshold, $maxtoshow);
    }
215093
public function countByScore($min, $max){
        return $this->getConnection()->getSlave()->zCount($this->name, $min, $max);
    }
309281
public function commonGiven(int $threshold = 1, int $maxtoshow = 10): string
    {
        return $this->commonGivenQuery('B', 'nolist', false, $threshold, $maxtoshow);
    }
602047
public static function getLevelName($level)
    {
        $level = (int) $level;
        foreach (static::$levelNameToLevel as $levelName => $currentLevel) {
            if ($level >= $currentLevel) {
                return $levelName;
            }
        }

        return static::$levelNameToLevel[static::ALL];
    }
1217159
public function bindSockets($addrs = [], $max = 0)
    {
        if (is_string($addrs)) {
            $addrs = array_map('trim', explode(',', $addrs));
        }
        $n = 0;
        foreach ($addrs as $addr) {
            if ($this->bindSocket($addr)) {
                ++$n;
            }
            if ($max > 0 && ($n >= $max)) {
                return $n;
            }
        }
        return $n;
    }
108845
public function commonGivenUnknownListTotals(int $threshold = 1, int $maxtoshow = 10): string
    {
        return $this->commonGivenQuery('U', 'list', true, $threshold, $maxtoshow);
    }
892394
public function commonGivenFemale(int $threshold = 1, int $maxtoshow = 10): string
    {
        return $this->commonGivenQuery('F', 'nolist', false, $threshold, $maxtoshow);
    }