generates 36 capacity digits string from integer result is string of [0-1A-Z]
@param {number} num
@returns {string}
9707
function int2Str36(num) {
    let baseIdx = d36.length;
    let result = [];
    let empty = null;
    if (num === 0) return '0';
    for (let i = 0; i < baseIdx; i++) {
        let d = d36[i];
        let c = 0;
        if (d <= num) {
            c = Math.trunc(num/d);
            num -= d * c;
            c = encodeCharCode2Int36(c);
            empty = encodeCharCode2Int36(0);
        } else {
            c = empty;
        }
        if (c) result.push(c);
    }
    return String.fromCharCode.apply(null, result);
}
756347
function numToDate(num) {
  const str = `${num}`;
  const YN = str.substring(0, 4);
  const M = str.substring(4, 6);
  const D = str.substring(6, 8);
  return `${YN}-${M}-${D}`;
}
258779
function rand62() {
    return 0 ^ Math.random() * 2 ?
      (0 ^ Math.random() * 36).toString(36)
    : (0 ^ Math.random() * 25 + 10).toString(36).toUpperCase()
  }
250031
function numToIndexableString(num) {

  if (num === 0) {
    return '1';
  }

  // convert number to exponential format for easier and
  // more succinct string sorting
  var expFormat = num.toExponential().split(/e\+?/);
  var magnitude = parseInt(expFormat[1], 10);

  var neg = num < 0;

  var result = neg ? '0' : '2';

  // first sort by magnitude
  // it's easier if all magnitudes are positive
  var magForComparison = ((neg ? -magnitude : magnitude) - MIN_MAGNITUDE);
  var magString = padLeft((magForComparison).toString(), '0', MAGNITUDE_DIGITS);

  result += SEP + magString;

  // then sort by the factor
  var factor = Math.abs(parseFloat(expFormat[0])); // [1..10)
  /* istanbul ignore next */
  if (neg) { // for negative reverse ordering
    factor = 10 - factor;
  }

  var factorStr = factor.toFixed(20);

  // strip zeros from the end
  factorStr = factorStr.replace(/\.?0+$/, '');

  result += SEP + factorStr;

  return result;
}
1094825
function encode(num) {
  var encoded = '';

  do {
    encoded = alphabet[num % length] + encoded;
    num = Math.floor(num / length);
  } while (num > 0);

  return encoded;
}
505187
function intToBytes(num) {
	var bytes = [];

	for(var i=7 ; i>=0 ; --i) {
		bytes[i] = num & (255);
		num = num >> 8;
	}

	return bytes;
}
735002
function(digits, n) {
		n = n.toString();
		while(n.length < digits)
		n = '0' + n;
		return n;
	}
434814
function(numbers) {
      var encoded = '';

      var numbersLength = numbers.length;
      for (var i = 0; i < numbersLength; ++i) {
        encoded += this.encodeUnsignedInteger(numbers[i]);
      }

      return encoded;
    }
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;
  }
1350719
public String num2Chn(int num){
		char s[]=new char[32],ch;
		int counter1,counter2;
		int chr,preChr=-1;
		int len=0;
		boolean suffixZero=true;
		counter1=0;
		counter2=0;
		while(num>0){
			chr=num%10;
			if(chr!=0){
				suffixZero=false;
				if(counter1>0){
					s[len]=this.strUnit.charAt(counter1);
					len++;
				}
				if(num/10!=0 || counter1!=1 || chr!=1){
					s[len]=this.strDigitOut.charAt(chr);
					len++;
				}
			}
			else{
				if(!suffixZero)
					if(preChr!=0){
						s[len]=this.strDigitOut.charAt(chr);
						len++;
					}
			}
			num=num/10;
			preChr=chr;
			counter1++;
			if(counter1==4){
				counter1=0;
				counter2++;
				suffixZero=true;
				if(num%10000>0){
					s[len]=this.strUnit.charAt(3+counter2);
					len++;
				}
			}
		}
		for(int i=0;i<len/2;i++){
			ch=s[i];
			s[i]=s[len-i-1];
			s[len-i-1]=ch;
		}
		if(len==0){
			s[len]=this.strDigitOut.charAt(0);
			len++;
		}
		return new String(s,0,len);
	}
214976
private static String numToString(int num, int width) {
        String str = Integer.toString(num);
        int len = str.length();
        if (len >= width) {
            return str.substring(len - width, len);
        }
        StringBuilder sb = new StringBuilder(width);
        for (int i = len; i < width; i++) {
            sb.append('0');
        }
        sb.append(str);
        return sb.toString();
    }
69075
function encodeNumber_(num) {
  let encodedNumber = '';
  while (num >= 0x20) {
    encodedNumber += CHAR64_.charAt(
      0x20 | (num & 0x1f));
    num >>= 5;
  }
  encodedNumber += CHAR64_.charAt(num);
  return encodedNumber;
}
888542
function (num, totalBytes) {
  var numBytes = Math.floor(Math.log(num) / Math.log(0xff)) + 1;
  var buffer = new Buffer(totalBytes);

  buffer.fill(0);
  buffer.writeUIntBE(num, totalBytes - numBytes, numBytes);

  return buffer;
}
385725
def str2int(num, radix=10, alphabet=BASE85):
    """"""
    return NumConv(radix, alphabet).str2int(num)
953491
function generateKey(length) {
    const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
    const possibleLength = possible.length - 1;

    let text = '';
    _.times(getNumber(length, 16), () => {
        text += possible.charAt(_.random(possibleLength));
    });

    return text;
}
633459
function(num){
    if(_.isUndefined(num) || num == 0)
        num = '00';

    if(_.isString(num) || _.isNumber(num))
        num = new BigNumber(String(num));

    if(isBigNumber(num))
        num = num.toString(16);

    return formatHex(num);
}
493004
function makeRandomId(digits) {
    digits = digits || 16;
    var id = "";
    for (var ii = 0; ii < digits; ++ii) {
      id = id + ((Math.random() * 16 | 0)).toString(16);
    }
    return id;
  }