NUMBER - Evaluate the argument as a number, with options specified as key=value.
966332
private void evalNumber(MessageArg arg) {
    initDecimalArgsParser();
    parseArgs(decimalArgsParser);
    
    BigDecimal number = arg.asBigDecimal();
    NumberFormatter formatter = CLDR_INSTANCE.getNumberFormatter(locale);
    formatter.formatDecimal(number, buf, decimalArgsParser.options());
  }
706817
def set_value_for_key(self, key, value):
        
        if key in self.options:
            self.options[key]['value'] = value
1139346
def number(description, **kwargs) -> typing.Type:
    
    kwargs['description'] = description
    return type('Number', (Number,), kwargs)
903534
def as_number(self):
		
		def combine(subver, ver):
			return subver / 10 + ver
		return reduce(combine, reversed(self.version))
121074
def number_to_numeral(number, mode, rounding)
      if number.special? # @context.special?(number)
        special_num_to_numeral(number)
      else
        if mode == :exact
          exact_num_to_numeral number, rounding
        else # mode == :approximate
          approximate_num_to_numeral(number, rounding)
        end
      end
    end
548770
def _to_number(cls, string):
        """"""
        try:
            if float(string) - int(string) == 0:
                return int(string)
            return float(string)
        except ValueError:
            try:
                return float(string)
            except ValueError:
                return string
389644
public ValueNumber forNumber(int number) {
        if (number >= getNumValuesAllocated()) {
            throw new IllegalArgumentException("Value " + number + " has not been allocated");
        }
        return allocatedValueList.get(number);
    }
1300328
def _parse_number(klass, number):
        
        try:
            return int(number)
        except ValueError as e:
            if number in VALID_NUMBERS:
                return number
            else:
                raise e
735789
function numberType(mname, tpe, options) {
  const doubles = options.themeDoubles.split(',')
  if (doubles && doubles.includes(mname)) {
    return 'Double'
  } else {
    return 'Int'
  }
}
1253422
def str_to_num(self, arg):
        

        if len(arg) == 1:
            ten = '10'
        else:
            ten = ''
        switcher = {
            '一': '1',
            '二': '2',
            '三': '3',
            '四': '4',
            '五': '5',
            '六': '6',
            '七': '7',
            '八': '8',
            '九': '9',
            '十': ten,
            '〇': '0',
            '○': '0',
        }
        test = ''
        for i in arg:
            test = test + switcher.get(i, None)
        return int(test)
430581
def try_number(value):
    

    for cast_function in [int, float]:
        try:
            return cast_function(value)
        except ValueError:
            pass

    raise ValueError("Unable to use value as int or float: {0!r}"
                     .format(value))
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;
    }
529762
def int_option(string, options):
    
    i = int(string)
    if i in options:
        return i

    raise ValueError('Not in allowed options')
1052295
def as_number(as_number_val):
    """"""
    as_number_str = py23_compat.text_type(as_number_val)
    if "." in as_number_str:
        big, little = as_number_str.split(".")
        return (int(big) << 16) + int(little)
    else:
        return int(as_number_str)
901830
def asnum(number, limit=None, return_format=None):
    
    uri = 'asnum/{number}'.format(number=number)
    if limit:
        uri = '/'.join([uri, str(limit)])
    return _get(uri, return_format)
502083
def to_int(argument):
	
	if(argument.startswith("0b")):
		return int(argument[2:], 2)
	elif(argument.startswith("0x")):
		return int(argument[2:], 16)
	elif(argument.startswith("0") and argument != "0"):
		return int(argument[1:], 8)
	elif(argument[0] == "'" and argument[2] == "'"):
		return ord(argument[1])
	return int(argument)
1132074
function toNumber(value) {
        var _this = this;

        if (validateHelpers.isArray(value)) {
            return value.map(function (a) {
                return _this.toNumber(a);
            });
        }

        var number = parseFloat(value);

        if (number === undefined) {
            return value;
        }

        if (number.toString().length !== value.toString().length && !validateHelpers.isNumeric(value)) {
            return value;
        }

        return validateHelpers.isNumber(number) ? value : number;
    }