Get mean score stat.

@param \simplehtmldom_1_5\simple_html_dom $a_stat_score

@return string
969614
private function getMeanScore($a_stat_score)
    {
        $mean_score = $a_stat_score->find('div', 1);
        $temp_score = $mean_score->find('span', 0)->plaintext;

        return str_replace($temp_score, '', $mean_score->plaintext);
    }
543092
private function getReviewScore($bottom_area)
    {
        $score = [];
        $score_area = $bottom_area->find('table', 0);
        if ($score_area) {
            foreach ($score_area->find('tr') as $each_score) {
                $score_type = strtolower($each_score->find('td', 0)->plaintext);
                $score_value = $each_score->find('td', 1)->plaintext;
                $score[$score_type] = $score_value;
            }
        }

        return $score;
    }
704132
private function getEachRole($a)
    {
        $r = [];
        $link = $a->find('a', 0);
        $id = explode('/', $link->href);
        $r['id'] = $id[4];
        $r['title'] = $link->plaintext;

        return $r;
    }
976197
public static function getScore( $password )
	{
		$score	= 0;

		//  --  LENGTH  --  //
		$length	= strlen( $password );
		$min	= self::$minLength;
		if( $length < $min )															// Password too short
			$score	-= 100;
		else if( $length >= $min && $length <= $min + 2 ) 								// Password Short
			$score += 6;
		else if( $length >= $min + 3 && $length <= $min + 4 )							// Password Medium
			$score += 12;
		else if( $length >= $min + 5 )													// Password Large
			$score += 18;

		//  --  CASE SENSE  --  //
		if( preg_match( "/[a-z]/", $password ) )										// at least one lower case letter
			$score	+= 1;
		if( preg_match( "/[A-Z]/", $password ) )										// at least one upper case letter
			$score	+= 5;

		//  --  NUMBERS  --  //
		if( preg_match( "/\d+/", $password ) )											// at least one number
			$score	+= 5;
		if( preg_match( "/(.*[0-9].*[0-9].*[0-9])/", $password ) )						// at least three numbers
			$score	+= 7;

		//  --  SPECIAL CHARACTERS  --  //
		if( preg_match( "/.[!,@,#,$,%,^,&,*,?,_,~]/", $password ) )						// at least one special character
			$score	+= 5;
		if( preg_match( "/(.*[!@#$%^&*?_~].*[!@#$%^&*?_~])/", $password ) )				// at least two special characters
			$score	+= 7;

		//  --  COMBINATION  --  //
		if( preg_match( "/([a-z].*[A-Z])|([A-Z].*[a-z])/", $password ) )				// both upper and lower case
			$score	+= 2;
		if( preg_match( "/[a-z]/i", $password ) && preg_match( "/\d/", $password ) )	// both letters and numbers
			$score	+= 3;
		$regEx	= "/([a-z0-9].*[!@#$%^&*?_~])|([!@#$%^&*?_~].*[a-z0-9])/i";
		if( preg_match( $regEx, $password ) )											// letters, numbers, and special characters
			$score	+= 3;

		//  --  BAD WORDS  --  //
		if( in_array( strtolower( $password ), self::$badWords ) ) 
			$score -= 200;
		return $score;
	}
1190840
public function getHandlerStat($stat)
    {
        return isset($this->handlerStats[$stat])
            ? $this->handlerStats[$stat]
            : null;
    }
1340218
public function averageChildren(): string
    {
        $average = (float) DB::table('families')
            ->where('f_file', '=', $this->tree->id())
            ->avg('f_numchil');

        return I18N::number($average, 2);
    }
115784
function getJsSortAttribute() {
        $len  = 6;
        $sort = [];
        if (!$this->default_sort) {
            return str_pad($this->id, 10, '0', STR_PAD_LEFT);
        }
        foreach ($this->default_sort as $k => $v) {
            $val = $this->{$k};
            if ('desc' == $v) {
                if (is_numeric($val)) {
                    $val = pow(10, $len) - intval($val);
                }
            }
            $sort[] = str_pad(mb_substr($val, 0, $len + 1), $len + 1, '0', STR_PAD_LEFT);
        }

        return implode('_', $sort);
    }
418561
function _getScreen()
    {
        $output = '';
        for ($i = 0; $i <= $this->max_y; $i++) {
            for ($j = 0; $j <= $this->max_x + 1; $j++) {
                if (isset($this->attrs[$i][$j])) {
                    $output.= $this->attrs[$i][$j];
                }
                if (isset($this->screen[$i][$j])) {
                    $output.= htmlspecialchars($this->screen[$i][$j]);
                }
            }
            $output.= "\r\n";
        }
        return rtrim($output);
    }
1041602
protected function formatStats($stats)
    {
        if (!$stats) {
        return "No statistics returned.\n";
        }

        $out = "Servers found: " . count($stats) . "\n\n";
        foreach ($stats as $host => $item) {
            if (!is_array($item) || count($item) == 0) {
                $out .= "  <error>" . $host . "</error>\n";

                continue;
            }

            $out .= "<info>Host:\t" . $host . "</info>\n";
            $out .= "\tUsage: " . $this->formatUsage($item['bytes'], $item['limit_maxbytes']) . "\n";
            $out .= "\tUptime: " . $this->formatUptime($item['uptime']) . "\n";
            $out .= "\tOpen Connections: " . $item['curr_connections'] . "\n";
            $out .= "\tHits: " . $item['get_hits'] . "\n";
            $out .= "\tMisses: " . $item['get_misses'] . "\n";
            if ($item['get_hits'] + $item['get_misses'] > 0 ) {
                $out .= "\tHelpfulness: " . round($item['get_hits'] / ($item['get_hits'] + $item['get_misses']) * 100, 2) . "%\n";
            }
        }

        return $out;
    }
212280
public static function AVERAGE()
    {
        $returnValue = $aCount = 0;

        // Loop through arguments
        foreach (PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()) as $k => $arg) {
            if ((is_bool($arg)) &&
                ((!PHPExcel_Calculation_Functions::isCellValue($k)) || (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE))) {
                $arg = (integer) $arg;
            }
            // Is it a numeric value?
            if ((is_numeric($arg)) && (!is_string($arg))) {
                if (is_null($returnValue)) {
                    $returnValue = $arg;
                } else {
                    $returnValue += $arg;
                }
                ++$aCount;
            }
        }

        // Return
        if ($aCount > 0) {
            return $returnValue / $aCount;
        } else {
            return PHPExcel_Calculation_Functions::DIV0();
        }
    }
1139364
private function urlStatFile()
    {
        try {
            $this->object = $this->bucket->object($this->file);
            $info = $this->object->info();
        } catch (ServiceException $e) {
            // couldn't stat file
            return false;
        }

        // equivalent to 100666 and 100444 in octal
        $stats = array(
            'mode' => $this->bucket->isWritable()
                ? self::FILE_WRITABLE_MODE
                : self::FILE_READABLE_MODE
        );
        $this->statsFromFileInfo($info, $stats);
        return $this->makeStatArray($stats);
    }
1209293
public function get_grade() {
        $grade = $this->get_rubric_filling();

        if (!($scores = $this->get_controller()->get_min_max_score()) || $scores['maxscore'] <= $scores['minscore']) {
            return -1;
        }

        $graderange = array_keys($this->get_controller()->get_grade_range());
        if (empty($graderange)) {
            return -1;
        }
        sort($graderange);
        $mingrade = $graderange[0];
        $maxgrade = $graderange[sizeof($graderange) - 1];

        $curscore = 0;
        foreach ($grade['criteria'] as $id => $record) {
            $curscore += $this->get_controller()->get_definition()->rubric_criteria[$id]['levels'][$record['levelid']]['score'];
        }

        $allowdecimals = $this->get_controller()->get_allow_grade_decimals();
        $options = $this->get_controller()->get_options();

        if ($options['lockzeropoints']) {
            // Grade calculation method when 0-level is locked.
            $grade = max($mingrade, $curscore / $scores['maxscore'] * $maxgrade);
            return $allowdecimals ? $grade : round($grade, 0);
        } else {
            // Alternative grade calculation method.
            $gradeoffset = ($curscore - $scores['minscore']) / ($scores['maxscore'] - $scores['minscore']) * ($maxgrade - $mingrade);
            return ($allowdecimals ? $gradeoffset : round($gradeoffset, 0)) + $mingrade;
        }
    }
110209
protected function _calculateLetterScore()
    {
        $score = 0;

        foreach (array (self::CLASS_UPPER, self::CLASS_LOWER) as $class) {
            $letterCount = $this->_getClassCount($class);

            if ($letterCount != $this->_length) {
                if ($letterCount > 0) {
                    $score += ($this->_length - $letterCount) * 2;
                }
            }
        }

        return $score;
    }
1205551
protected function getArrayString($a)
	{
		$s = 'array(';
		$i = 0;
		foreach ($a as $k => $v)
		{
			$s .= ($i) ? ', ' : '';
			$s .= '"' . $k . '" => ';
			if (is_array($v) || is_object($v))
			{
				$s .= $this->getArrayString((array) $v);
			}
			else
			{
				$s .= '"' . addslashes($v) . '"';
			}
			$i++;
		}
		$s .= ')';
		return $s;
	}
727038
public static function intToRoman($a = null)
    {
        if (is_null($a)) {
            return null;
        }
        if ($a>4999) {
            return null;
        }
        if ($a==0) {
            return self::$romans_letters[0];
        }
        $a = (string) $a;
        $ctt = '';
        $counter = 1;
        for ($i=(strlen($a)-1); $i>=0; $i--) {
            $tmp_ctt = '';
            $char = $a{$i};
            if ($char>0 && $char<4) {
                $index = array_search($counter, self::$romans_numbers);
                $tmp_ctt .= str_pad(self::$romans_letters[$index], $char, self::$romans_letters[$index]);
            } elseif (3<$char && $char<9) {
                $index = array_search($counter, self::$romans_numbers);
                if ($char==4) {
                    $tmp_ctt .= self::$romans_letters[$index];
                }
                $tmp_ctt .= self::$romans_letters[$index+1];
                if ($char>5) {
                    $tmp_ctt .= str_pad(self::$romans_letters[$index], ($char-5), self::$romans_letters[$index]);
                }
            } elseif ($char==9) {
                $index = array_search($counter, self::$romans_numbers);
                $tmp_ctt .= self::$romans_letters[$index].self::$romans_letters[$index+2];
            }
            $counter = $counter*10;
            $ctt = $tmp_ctt.$ctt;
        }
        return $ctt;
    }
197710
public function get_min_max_score() {
        if (!$this->is_form_available()) {
            return null;
        }
        $returnvalue = array('minscore' => 0, 'maxscore' => 0);
        foreach ($this->get_definition()->rubric_criteria as $id => $criterion) {
            $scores = array();
            foreach ($criterion['levels'] as $level) {
                $scores[] = $level['score'];
            }
            sort($scores);
            $returnvalue['minscore'] += $scores[0];
            $returnvalue['maxscore'] += $scores[sizeof($scores)-1];
        }
        return $returnvalue;
    }
93132
def get_stat(self, obj_name, stat_name):
        

        return self.statistics[obj_name][self.captions.index(stat_name)]