Transforms input into a number.
@param {*} input to become a number
@return {number} number version of input
187277
function(n){
  if(typeof n === 'number'){
    return n;
  }
  if(typeof n !== 'string'){
    n = JSON.stringify(n)
  }
  var res = 0;
  n.split("").map(function(bit){
    res += bit.charCodeAt(0);
  });
  return res;
}
77107
function (input) {
			var bi = BigInteger.fromByteArrayUnsigned(input);
			var chars = [];

			while (bi.compareTo(B58.base) >= 0) {
				var mod = bi.mod(B58.base);
				chars.unshift(B58.alphabet[mod.intValue()]);
				bi = bi.subtract(mod).divide(B58.base);
			}
			chars.unshift(B58.alphabet[bi.intValue()]);

			// Convert leading zeros too.
			for (var i = 0; i < input.length; i++) {
				if (input[i] == 0x00) {
					chars.unshift(B58.alphabet[0]);
				} else break;
			}

			return chars.join('');
		}
222024
public static function fromString(string $input): self
    {
        $input = preg_replace('/[^\d]/', '', $input);

        if (!is_numeric($input)) {
            throw new \InvalidArgumentException("Expects \$input to be a number, \"{$input}\" given.");
        }

        // Get the last digit.
        $checkDigit = (int) $input[strlen($input) - 1];

        // Remove the last digit.
        $number = substr($input, 0, strlen($input) - 1);

        return new self($number, $checkDigit);
    }
127239
function (number, digits) {
    if (typeof number !== "number") { throw "not a number: " + number; }
    var s = number.toString();
    if (number.length > digits) {
      return number.substr(number.length - digits, number.length);
    }
    while (s.length < digits) {
      s = '0' + s;
    }
    return s;
  }
355028
function numberPad(num, size) {
  var s = "000000000" + num;
  return s.substr(s.length-size);
}
233636
function formatNumber(number) {
	number = String(number).split('.');
	return number[0].replace(/(?=(?:\d{3})+$)(?!\b)/g, ',') +
	(number[1] ? '.' + number[1] : '');
}
1234405
function standardizeInput(input) {
  if ([undefined, null].indexOf(input) !== -1) {
    input = null;
  }
  else if (_.isNaN(input)) {
    input = null;
  }
  else if (_.isString(input)) {
    input = input.trim();

    // Written empty values
    if (["unspecified", "unknown", "none", "null", "empty", ""].indexOf(input.toLowerCase()) !== -1) {
      input = null;
    }
  }

  return input;
}
684507
function canConvert(input) {
    return input != null && (typeof input === 'string' || input.nodeType && (input.nodeType === 1 || input.nodeType === 9 || input.nodeType === 11));
}
649929
function reverseOfNumber(number) {
        if (isNumber(number)) {
            var stringNumber = numberToString(number) + '';
            return Number(stringNumber.split('').reverse().join(''));
        }
        else {
            return 0;
        }
    }
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;
		}
510665
private int convertInt(String input, int defaultValue) {
        try {
            return Integer.parseInt(input.trim());
        } catch (NumberFormatException nfe) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "Malformed input: " + input);
            }
            return defaultValue;
        }
    }
137691
function parse(input) {
				if (typeof input === 'object') {
					input = stringify(input);
				}

				if (!input) {
					return { m: 0 };
				}

				var path = input.split('-');
				output = {
					m: Number(path.shift())
				};

				if (path.length) {
					path.forEach(function (variation, i) {
						variation = variation.split(':');
						output[Number(variation[0])] = parseInt(variation[1], 10);
					});
				}

				return output;
			}
491556
public static void transformSq(final GrayF32 input , final GrayF64 transformed )
	{
		int indexSrc = input.startIndex;
		int indexDst = transformed.startIndex;
		int end = indexSrc + input.width;

		double total = 0;
		for( ; indexSrc < end; indexSrc++ ) {
			float value = input.data[indexSrc];
			transformed.data[indexDst++] = total += value*value;
		}

		for( int y = 1; y < input.height; y++ ) {
			indexSrc = input.startIndex + input.stride*y;
			indexDst = transformed.startIndex + transformed.stride*y;
			int indexPrev = indexDst - transformed.stride;

			end = indexSrc + input.width;

			total = 0;
			for( ; indexSrc < end; indexSrc++ ) {
				float value = input.data[indexSrc];
				total +=  value*value;
				transformed.data[indexDst++] = transformed.data[indexPrev++] + total;
			}
		}
	}
1024854
function( input ) {

		if ( input == null ) {

			input = this.result;

		}
		 	this.result = input;

		  this.alphaNum(this.result);

			this.halfSpace( this.result );

			this.removeArabicChar( this.result );

			return this;

		}
431910
public static function toInteger($input = false) {

        if ($input && Validate::isNumber($input)) {

            $integer = (int) $input;
            if (Validate::isInteger($integer)) {

                return $integer;
            }
        }

        return false;
    }
1187291
public String normalizeNumber(final String number) {
        try {
            final BigDecimal normalizedNumber = parseNumber(new NumberBuffer(
                    number));
            if (normalizedNumber == null) {
                return number;
            }
            return normalizedNumber.toBigIntegerExact().toString();

        } catch (NumberFormatException | ArithmeticException e) {
            // Return the source number in case of error, i.e. malformed input
            return number;
        }
    }
685752
function min(input) {
                if (!Array.isArray(input)) {
                    throw new Error('input must be an array');
                }

                if (input.length === 0) {
                    throw new Error('input must not be empty');
                }

                var min = input[0];
                for (var i = 1; i < input.length; i++) {
                    if (input[i] < min) min = input[i];
                }
                return min;
            }