Return a new ``CT_DecimalNumber`` element having tagname *nsptagname*
        and ``val`` attribute set to *val*.
324698
def new(cls, nsptagname, val):
        
        return OxmlElement(nsptagname, attrs={qn('w:val'): str(val)})
380403
function numberWithCommas(value) {
                if (formatting) {
                    var parts = (""+value).split(decimalSeparator);
                    parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
                    return parts.join(decimalSeparator);
                }
                else {
                    // No formatting applies.
                    return value;
                }
            }
1256914
def substitute_values(text, values):
    """"""
    shift, final_text, shifts = 0, text, defaultdict(int)
    for value in values:
        first = value['old_span'][0] + shift
        second = value['old_span'][1] + shift
        new_s = value['new_surface']
        final_text = final_text[0:first] + new_s + final_text[second:]
        shift += len(new_s) - len(value['old_surface'])
        for char in range(first + 1, len(final_text)):
            shifts[char] = shift

    logging.debug(u'Text after numeric conversion: "%s"', final_text)

    return final_text, shifts
956967
def num(string):
    """"""
    if not isinstance(string, type('')):
        raise ValueError(type(''))
    try:
        string = re.sub('[^a-zA-Z0-9\.\-]', '', string)
        number = re.findall(r"[-+]?\d*\.\d+|[-+]?\d+", string)
        return float(number[0])
    except Exception as e:
        logger = logging.getLogger('tradingAPI.utils.num')
        logger.debug("number not found in %s" % string)
        logger.debug(e)
        return None
955456
function(val)
    {
      var numberOptions =
      {
        style: "currency",
        currency: currency,
        minimumFractionDigits: 0,
        maximumFractionDigits: 0
      }

      return formatNumber(val == null || val === "" || isNaN(val) ? 0 : val, numberOptions)
    }
560467
function isDotNotation(val) {
    if (!chek_1.isString(val))
        return false;
    return /\..*\./.test(val) && !val.match(/\s/);
}
203649
function(value, element) {
			if ( this.optional(element) )
				return "dependency-mismatch";
			// accept only digits and dashes
			if (/[^0-9-]+/.test(value))
				return false;
			var nCheck = 0,
				nDigit = 0,
				bEven = false;

			value = value.replace(/\D/g, "");

			for (var n = value.length - 1; n >= 0; n--) {
				var cDigit = value.charAt(n);
				var nDigit = parseInt(cDigit, 10);
				if (bEven) {
					if ((nDigit *= 2) > 9)
						nDigit -= 9;
				}
				nCheck += nDigit;
				bEven = !bEven;
			}

			return (nCheck % 10) == 0;
		}
246197
def decimal(self, prompt, default=None, lower=None, upper=None):
        """"""
        prompt = prompt if prompt is not None else "Enter a decimal number"
        prompt += " [{0}]: ".format(default) if default is not None else ': '
        return self.input(
            curry(filter_decimal, default=default, lower=lower, upper=upper),
            prompt
        )
670491
def new(cls, num_id, abstractNum_id):
        
        num = OxmlElement('w:num')
        num.numId = num_id
        abstractNumId = CT_DecimalNumber.new(
            'w:abstractNumId', abstractNum_id
        )
        num.append(abstractNumId)
        return num
541128
function getTag(val) {
  const tag = Object.prototype.toString.call(val).slice(8, -1)

  if (basicTypes.includes(tag.toLowerCase())) {
    return tag.toLowerCase()
  }

  return tag
}
157743
def sub(value, arg):
    """"""
    try:
        nvalue, narg = handle_float_decimal_combinations(
            valid_numeric(value), valid_numeric(arg), '-')
        return nvalue - narg
    except (ValueError, TypeError):
        try:
            return value - arg
        except Exception:
            return ''
372875
function ( num, integer ) {
			var tmp, item, i,
				transformTable, numberString, convertedNumber;

			// Set the target Transform table:
			transformTable = this.digitTransformTable( $.i18n().locale );
			numberString = '' + num;
			convertedNumber = '';

			if ( !transformTable ) {
				return num;
			}

			// Check if the restore to Latin number flag is set:
			if ( integer ) {
				if ( parseFloat( num, 10 ) === num ) {
					return num;
				}

				tmp = [];

				for ( item in transformTable ) {
					tmp[transformTable[item]] = item;
				}

				transformTable = tmp;
			}

			for ( i = 0; i < numberString.length; i++ ) {
				if ( transformTable[numberString[i]] ) {
					convertedNumber += transformTable[numberString[i]];
				} else {
					convertedNumber += numberString[i];
				}
			}

			return integer ? parseFloat( convertedNumber, 10 ) : convertedNumber;
		}
1269238
def floating_point(
        element_name,  # type: Text
        attribute=None,  # type: Optional[Text]
        required=True,  # type: bool
        alias=None,  # type: Optional[Text]
        default=0.0,  # type: Optional[float]
        omit_empty=False,  # type: bool
        hooks=None  # type: Optional[Hooks]
):
    # type: (...) -> Processor
    
    value_parser = _number_parser(float)
    return _PrimitiveValue(
        element_name,
        value_parser,
        attribute,
        required,
        alias,
        default,
        omit_empty,
        hooks
    )
1164397
def visit_Num(self, node: AST, dfltChaining: bool = True) -> str:
        """"""
        return str(node.n)
216709
def _tag(val, tag):
        """"""
        if isinstance(val, str):
            val = bytes(val, 'utf-8')
        return (bytes('<' + tag + '>', 'utf-8') + val +
                bytes('</' + tag + '>', 'utf-8'))
1120154
public ValueMap withNumberSet(String key, Number ... val) {
        super.put(key, InternalUtils.toBigDecimalSet(val));
        return this;
    }
940208
function(sStyle, sNumber, sPlural) {

			var sFormat;
			var oFormats;

			switch (sStyle) {
			case "long":
				oFormats = this._get("decimalFormat-long");
				break;

			default: //short
				oFormats = this._get("decimalFormat-short");
				break;
			}

			if (oFormats) {
				var sName = sNumber + "-" + sPlural;
				sFormat = oFormats[sName];
				if (!sFormat) {
					sName = sNumber + "-other";
					sFormat = oFormats[sName];
				}
			}

			return sFormat;

		}