Convert a numerical representation of logging level to the logging level.

@param num
- the numerical index that corresponds to the given level.
@return the logging level.
196738
@SuppressWarnings({ "checkstyle:magicnumber", "checkstyle:returncount" })
	public static Level fromInt(int num) {
		switch (num) {
		case 0:
			return Level.OFF;
		case 1:
			return Level.SEVERE;
		case 2:
			return Level.WARNING;
		case 3:
			return Level.INFO;
		case 4:
			return Level.FINE;
		case 5:
			return Level.FINER;
		case 6:
			return Level.FINEST;
		case 7:
			return Level.ALL;
		default:
			if (num < 0) {
				return Level.OFF;
			}
			return Level.ALL;
		}
	}
129576
public static int toInteger(LogLevel level) {
		if (level == LogLevel.Fatal)
			return 1;
		if (level == LogLevel.Error)
			return 2;
		if (level == LogLevel.Warn)
			return 3;
		if (level == LogLevel.Info)
			return 4;
		if (level == LogLevel.Debug)
			return 5;
		if (level == LogLevel.Trace)
			return 6;
		return 0;
	}
278681
function (num) {
      switch (typeof num) {
        case 'number':
          return num;
        case 'string':
          if (!isNaN(num)) {
            return num.indexOf('.') > -1 ? parseFloat(num) : parseInt(num, 10);
          }
      }

      return num;
    }
720672
protected static String numerify(String numberString) {
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < numberString.length(); i++) {
            if (numberString.charAt(i) == '#') {
                sb.append(RandomUtils.nextInt(10));
            } else {
                sb.append(numberString.charAt(i));
            }
        }

        return sb.toString();
    }
230677
private function _convert_number(&$num)
    {
        if (!empty($this->_params['only_integer']))
            $num = (int)$num;
        else
            $num = (float)$num;
    }
622525
private String getRomanNumber(int num) {
    String roman = "";  // The roman numeral.
    int N = num;        // N represents the part of num that still has
    //   to be converted to Roman numeral representation.
    for (int i = 0; i < numbers.length; i++) {
      while (N >= numbers[i]) {
        roman += letters[i];
        N -= numbers[i];
      }
    }
    return roman;
  }
27729
function (num) {
            var value, encoded = '';
            while (num >= 0x20) {
                value = (0x20 | (num & 0x1f)) + 63;
                encoded += (String.fromCharCode(value));
                num >>= 5;
            }
            value = num + 63;
            encoded += (String.fromCharCode(value));

            return encoded;
        }
765320
public String numerify(String numberString, int from, int to) {
		return replaceSymbolWithCharsFromTo(numberString, '#', Character.forDigit(from, 10), Character.forDigit(to, 10));
	}
236041
public static final int readNaturalNumber(OInput dis) throws IOException {

		int naturalNumber = 0;
		byte b1 = dis.readByte();
		
		if( b1 >= 0) {
			naturalNumber = b1;
		} else {
			byte b2 = dis.readByte();
			
			if(b2 >= 0) {
				naturalNumber = b1 * dv1 * -1 ;
				naturalNumber += b2;
			} else {
				
				byte b3 = dis.readByte();
				
				if(b3 >= 0) {
					naturalNumber += b1  * dv2 * -1;
					naturalNumber += (b2+1) * dv1 * -1;
					naturalNumber += b3;
				} else {
					byte b4 = dis.readByte();
					
					if(b4 >=0) {
						naturalNumber += b1  * dv3 * -1;
						naturalNumber += (b2+1) * dv2 * -1;
						naturalNumber += (b3+1) * dv1 * -1;
						naturalNumber += b4;
						
					} else {
						byte b5 = dis.readByte();

						naturalNumber += b1  * dv4 * -1;
						naturalNumber += (b2+1) * dv3 * -1;
						naturalNumber += (b3+1) * dv2 * -1;
						naturalNumber += (b4+1) * dv1 * -1;
						naturalNumber += b5;

					}
				}
			}
		}
		
		return naturalNumber;
	}
334975
function amf0encNumber(num) {
    var buf = new Buffer(9);
    buf.writeUInt8(0x00, 0);
    buf.writeDoubleBE(num, 1);
    return buf;
}
648557
public static function dec2roman($num)
    {

        static $ones = array("", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix");
        static $tens = array("", "x", "xx", "xxx", "xl", "l", "lx", "lxx", "lxxx", "xc");
        static $hund = array("", "c", "cc", "ccc", "cd", "d", "dc", "dcc", "dccc", "cm");
        static $thou = array("", "m", "mm", "mmm");

        if (!is_numeric($num)) {
            throw new Exception("dec2roman() requires a numeric argument.");
        }

        if ($num > 4000 || $num < 0) {
            return "(out of range)";
        }

        $num = strrev((string)$num);

        $ret = "";
        switch (mb_strlen($num)) {
            /** @noinspection PhpMissingBreakStatementInspection */
            case 4:
                $ret .= $thou[$num[3]];
            /** @noinspection PhpMissingBreakStatementInspection */
            case 3:
                $ret .= $hund[$num[2]];
            /** @noinspection PhpMissingBreakStatementInspection */
            case 2:
                $ret .= $tens[$num[1]];
            /** @noinspection PhpMissingBreakStatementInspection */
            case 1:
                $ret .= $ones[$num[0]];
            default:
                break;
        }

        return $ret;
    }
1268940
static function romanNumeral( $num ) {
		static $table = array(
			array( '', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X' ),
			array( '', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC', 'C' ),
			array( '', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM', 'M' ),
			array( '', 'M', 'MM', 'MMM' )
		);

		$num = intval( $num );
		if ( $num > 3000 || $num <= 0 ) {
			return $num;
		}

		$s = '';
		for ( $pow10 = 1000, $i = 3; $i >= 0; $pow10 /= 10, $i-- ) {
			if ( $num >= $pow10 ) {
				$s .= $table[$i][floor( $num / $pow10 )];
			}
			$num = $num % $pow10;
		}
		return $s;
	}
174008
public double getNumberFromNode(int n)
  {
    XMLString xstr = m_dtmMgr.getDTM(n).getStringValue(n);
    return xstr.toDouble();
  }
1044681
public void setNumberOfVars(final int num) {
    if (this.varnum != 0)
      throw new UnsupportedOperationException("Variable number is already set. Resetting it is not supported");
    if (num < 1 || num > MAXVAR)
      throw new IllegalArgumentException("Invalid variable number: " + num);
    this.vars = new int[num * 2];
    this.level2var = new int[num + 1];
    this.refstack = new int[num * 2 + 4];
    this.refstacktop = 0;
    while (this.varnum < num) {
      this.vars[this.varnum * 2] = pushRef(makeNode(this.varnum, 0, 1));
      this.vars[this.varnum * 2 + 1] = makeNode(this.varnum, 1, 0);
      popref(1);
      this.nodes[this.vars[this.varnum * 2]].refcou = MAXREF;
      this.nodes[this.vars[this.varnum * 2 + 1]].refcou = MAXREF;
      this.level2var[this.varnum] = this.varnum;
      this.varnum++;
    }
    this.nodes[0].level = num;
    this.nodes[1].level = num;
    this.level2var[num] = num;
    varResize();
  }
423216
function NUM() {
        var _parser = SEQ(OPT('-'), OR('0', SEQ(RANGE('1', '9'), REPEAT(DIGIT()))), OPT(SEQ('.', REPEAT(DIGIT(), 1))), OPT(SEQ(OR('e', 'E'), OPT(OR('+', '-')), REPEAT(DIGIT(), 1))));

        return _make_alias('NUM', paka.P.NUM, _parser);
    }
1164166
public ScriptBuilder number(int index, long num) {
        if (num == -1) {
            return op(index, OP_1NEGATE);
        } else if (num >= 0 && num <= 16) {
            return smallNum(index, (int) num);
        } else {
            return bigNum(index, num);
        }
    }
69075
function encodeNumber_(num) {
  let encodedNumber = '';
  while (num >= 0x20) {
    encodedNumber += CHAR64_.charAt(
      0x20 | (num & 0x1f));
    num >>= 5;
  }
  encodedNumber += CHAR64_.charAt(num);
  return encodedNumber;
}