Generate the display of the question number.
@param string|null $number The question number to display. 'i' is a special
value that gets displayed as Information. Null means no number is displayed.
@return HTML fragment.
4750
protected function number($number) {
        if (trim($number) === '') {
            return '';
        }
        $numbertext = '';
        if (trim($number) === 'i') {
            $numbertext = get_string('information', 'question');
        } else {
            $numbertext = get_string('questionx', 'question',
                    html_writer::tag('span', $number, array('class' => 'qno')));
        }
        return html_writer::tag('h3', $numbertext, array('class' => 'no'));
    }
117282
public function number($number, $decimals = null)
    {
        return number_format(
            (float) $number,
            $decimals,
            $this->getSymbol(self::DECIMAL_MARK),
            $this->getSymbol(self::THOUSANDS_SEPARATOR)
        );
    }
957395
public static function convert($number)
    {
        $number = preg_replace('/\,/i', '', $number);

        $number = preg_replace('/([^0-9\.\-])/i', '', $number);

        if (! is_numeric($number)) {
            return '0.00';
        }

        $isCents = (bool) preg_match('/^0.\d+$/', $number);

        return ($isCents ? '0' : null).number_format($number * 100., 0, '.', '');
    }
1142775
public function getDevice($number)
    {
        foreach ($this->devices as $device) {
            if ($device->number == $number) {
                return $device;
            }
        }

        return null;
    }
155510
public function firstsMutable(int $number = null): self
    {
        $this->generatorToArray();

        if ($number === null) {
            $this->array = (array) \array_shift($this->array);
        } else {
            $number = (int) $number;
            $this->array = \array_splice($this->array, 0, $number);
        }

        return $this;
    }
1026010
public function setNumber($number)
    {
      if(!is_string($number) || strlen(trim($number)) == 0)
        throw new InvalidArgumentException(__METHOD__ . '; Invalid number, must be a non empty string');

      $this->number = $number;
    }
733958
public function findByNumber($className, $number)
    {
        $extendee = trim($className, '\\');

        if ( ! isset($this->extensions[$extendee][$number])) {
            return null;
        }

        return $this->extensions[$extendee][$number];
    }
766598
public function format($number, $currency_sign = NULL) {
    $this->symbol_replacements[self::SYMBOL_SPECIAL_CURRENCY] = $currency_sign;

    return parent::format($number);
  }
95762
public function format($number) {
    if ((float) $number != $number) {
      throw new \InvalidArgumentException('Number has no valid float value.');
    }
    $sign = (int) ($number < 0);

    // Split the number in major and minor units, and make sure there is a
    // minor unit at all.
    $number = explode('.', abs($number));
    $number += array(
      self::MINOR => '',
    );

    $digits = array(
      str_split($number[self::MAJOR]),
      strlen($number[self::MINOR]) ? str_split($number[self::MINOR]) : array(),
    );

    $symbols = $this->cloneNumberPatternSymbols($this->symbols[$sign]);
    $this->process($symbols[$sign][self::MAJOR], $digits[self::MAJOR]);
    // Integer formatting defaults from right to left, but minor units should
    // be formatted from left to right, so reverse all data and results.
    $symbols_minor = array_reverse($symbols[$sign][self::MINOR]);
    $this->process($symbols_minor, array_reverse($digits[self::MINOR]));
    foreach ($symbols[$sign][self::MINOR] as $symbol) {
      if (!is_null($symbol->replacement)) {
        $symbol->replacement = strrev($symbol->replacement);
      }
    }

    // Prepare the output string.
    $output = array(
      self::MAJOR => '',
      self::MINOR => '',
    );
    foreach ($symbols[$sign] as $fragment => $fragment_symbols) {
      $this->replacePlaceholders($fragment_symbols);
      foreach ($fragment_symbols as $symbol) {
        $output[$fragment] .= !is_null($symbol->replacement) ? $symbol->replacement : $symbol->symbol;
      }
    }

    return $output[self::MAJOR] . $this->getReplacement(self::SYMBOL_SPECIAL_DECIMAL_SEPARATOR) . $output[self::MINOR];
  }
883062
public static function ceil($number)
    {
        if (self::compare($number, 0) == 1) {
            $result = bcadd($number, '1', 0);
        } else {
            $result = bcadd($number, '0', 0);
        }

        return $result;
    }
613095
private function normalize( $number = null )
	{
		if ( is_null( $number ) ) $number =& $this->_value;

		// Handle the case of -0
		if ( $this->_value == "-0" ) $this->_value = "0";

		if ( strpos( $this->_value, '.' ) === false ) return;

		$number = trim( $number );
		$number = rtrim( $number, '0');
		$number = rtrim( $number, '.');
		if ( $number == "" || $number == "-" ) $number .= "0";

		// The leading zero may be missing
		if ( substr( $number, 0, 1 ) == "." ) $number = "0" . $number;
		if ( substr( $number, 0, 2 ) == "-." ) $number = str_replace( "-.", "-0.", $number );
		if ( substr( $number, 0, 2 ) == "+." ) $number = str_replace( "+.", "0.", $number );

		return $number;
	}
995818
public static function fromNumber($number)
    {
        if (is_float($number)) {
            return self::fromString(sprintf('%.14F', $number));
        }

        if (is_int($number)) {
            return new self($number);
        }

        if (is_string($number)) {
            return self::fromString($number);
        }

        throw new \InvalidArgumentException('Valid numeric value expected');
    }
997561
public static function getSegment($number) {
        $segments = self::getAllSegments();

        if (isset($segments[$number]))
            return $segments[$number];

        return NULL;
    }
89463
private static function executeStep2($number) {
        $byteArray = str_pad(self::bcdecuc($number), 13, chr(0), STR_PAD_LEFT);

        $generatorPolynomial = 0x0f35;
        $frameCheckSequence = 0x07ff;
        $data = 0;
        $byteIndex = 0;
        $bit = 0;

        $data = (ord($byteArray[$byteIndex]) << 5) & 0xffff;
        for ($bit = 2; $bit < 8; $bit++) {
            if (($frameCheckSequence ^ $data) & 0x400) {
                $frameCheckSequence = ($frameCheckSequence << 1) ^ $generatorPolynomial;
            } else {
                $frameCheckSequence = ($frameCheckSequence << 1);
            }

            $frameCheckSequence &= 0x7ff;
            $data <<= 1;
            $data &= 0xffff;
        }

        for ($byteIndex = 1; $byteIndex < 13; $byteIndex++) {
            $data = (ord($byteArray[$byteIndex]) << 3) & 0xffff;
            for ($bit = 0; $bit < 8; $bit++) {
                if (($frameCheckSequence ^ $data) & 0x0400) {
                    $frameCheckSequence = ($frameCheckSequence << 1) ^ $generatorPolynomial;
                } else {
                    $frameCheckSequence = ($frameCheckSequence << 1);
                }

                $frameCheckSequence &= 0x7ff;
                $data <<= 1;
                $data &= 0xffff;
            }
        }

        return $frameCheckSequence;
    }
234029
function $number(params) {
    if (params == null) {
        return params;
    }
    if (typeof params === 'number') {
        return params;
    }
    if (typeof params === 'string') {
        return Number(params);
    }
    throw new Error('$number expects a number or string');
}
318446
public function get($number)
    {
        if (ArrayOperations::checkNull([$number])) {
            throw
            new PlivoValidationException(
                'number is mandatory');
        }

        $response = $this->client->fetch(
            $this->uri . $number .'/',
            []
        );

        return new Number(
            $this->client, $response->getContent(),
            $this->pathParams['authId']);
    }
294754
public static function spellNumber($number)
    {
        $a = new \NumberFormatter(Yii::$app->language, \NumberFormatter::SPELLOUT);

        return $a->format($number);
    }