Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064.

    @method mod9710
    @param {String} iban
    @returns {Number}
766177
def mod9710(iban):
    
    remainder = iban
    block = None

    while len(remainder) > 2:
        block = remainder[:9]
        remainder = str(int(block) % 97) + remainder[len(block):]

    return int(remainder) % 97
950415
private static function getIbanLength($iban)
    {
        $countrycode = substr($iban, 0, 2);

        $lengths = array(
            'AL' => 28,
            'AD' => 24,
            'AT' => 20,
            'AZ' => 28,
            'BH' => 22,
            'BE' => 16,
            'BA' => 20,
            'BR' => 29,
            'BG' => 22,
            'CR' => 21,
            'HR' => 21,
            'CY' => 28,
            'CZ' => 24,
            'DK' => 18,
            'DO' => 28,
            'TL' => 23,
            'EE' => 20,
            'FO' => 18,
            'FI' => 18,
            'FR' => 27,
            'GE' => 22,
            'DE' => 22,
            'GI' => 23,
            'GR' => 27,
            'GL' => 18,
            'GT' => 28,
            'HU' => 28,
            'IS' => 26,
            'IE' => 22,
            'IL' => 23,
            'IT' => 27,
            'JO' => 30,
            'KZ' => 20,
            'XK' => 20,
            'KW' => 30,
            'LV' => 21,
            'LB' => 28,
            'LI' => 21,
            'LT' => 20,
            'LU' => 20,
            'MK' => 19,
            'MT' => 31,
            'MR' => 27,
            'MU' => 30,
            'MC' => 27,
            'MD' => 24,
            'ME' => 22,
            'NL' => 18,
            'NO' => 15,
            'PK' => 24,
            'PS' => 29,
            'PL' => 28,
            'PT' => 25,
            'QA' => 29,
            'RO' => 24,
            'SM' => 27,
            'SA' => 24,
            'RS' => 22,
            'SK' => 24,
            'SI' => 19,
            'ES' => 24,
            'SE' => 24,
            'CH' => 21,
            'TN' => 24,
            'TR' => 26,
            'AE' => 23,
            'GB' => 22,
            'VG' => 24,
            'DZ' => 24,
            'AO' => 25,
            'BJ' => 28,
            'BF' => 27,
            'BI' => 16,
            'CM' => 27,
            'CV' => 25,
            'IR' => 26,
            'CI' => 28,
            'MG' => 27,
            'ML' => 28,
            'MZ' => 25,
            'SN' => 28,
            'UA' => 29
        );

        return isset($lengths[$countrycode]) ? $lengths[$countrycode] : false;
    }
463737
public static int calculateMod11CheckSum(int[] weights, StringNumber number) {
       int c = calculateChecksum(weights, number, false) % 11;
       if (c == 1) {
          throw new IllegalArgumentException(ERROR_INVALID_CHECKSUM + number);
       }
       return c == 0 ? 0 : 11 - c;
    }
361649
private int incrementAndGetModulo(int modulo) {
        for (;;) {
            int current = nextServerCyclicCounter.get();
            int next = (current + 1) % modulo;
            if (nextServerCyclicCounter.compareAndSet(current, next))
                return next;
        }
    }
6934
private boolean checkModulo11Tin(final String ptin) {
    final int checkSum = ptin.charAt(ptin.length() - 1) - '0';
    int sum = 10;
    for (int i = 0; i < ptin.length() - 1; i++) {
      int summe = (ptin.charAt(i) - '0' + sum) % 10;
      if (summe == 0) {
        summe = 10;
      }
      sum = 2 * summe % MODULO_11;
    }
    int calculatedCheckSum = MODULO_11 - sum;
    if (calculatedCheckSum == 10) {
      calculatedCheckSum = 0;
    }
    return checkSum == calculatedCheckSum;
  }
467601
function number(value) {
  var parsedNumber = Number.parseInt(value, 10);

  // couldn't parse it
  if (typeOf(parsedNumber) != 'number') {
    return throwModifierError('number', value, {message: 'Invalid Number'});
  }

  return parsedNumber;
}
1162105
function calcWeak32(data, prev, start, end) {
  var a = 0;
  var b = 0;
  var M = 1 << 16;
  var N = 65521;

  if (!prev) {
    var len = (start >= 0 && end >= 0) ? (end - start + 1) : data.length;
    var datai;
    for (var i = 0; i < len; i++) {
      datai = data[i];
      a += datai;
      b += ((len - i) * datai);
    }

    a %= N;
    b %= N;
  } else {
    var k = start;
    var l = end - 1;
    var prev_k = k - 1;
    var prev_l = l - 1;
    var prev_first = data[prev_k];
    var curr_last = data[l];

    a = (prev.a - prev_first + curr_last) % N;
    b = (prev.b - (prev_l - prev_k + 1) * prev_first + a) % N;
  }
  return { a: a, b: b, sum: a + b * M };
}
1199045
function round10(value, exp) {
                var type = 'round';
                // If the exp is undefined or zero...
                if (typeof exp === 'undefined' || +exp === 0) {
                    return Math[type](value);
                }
                value = +value;
                exp = +exp;
                // If the value is not a number or the exp is not an integer...
                if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
                    return NaN;
                }
                // Shift
                value = value.toString().split('e');
                value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));
                // Shift back
                value = value.toString().split('e');
                return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));
            }
1005275
function checksum$3(number) {
	var result = 0;

	var i;
	for (i = 1; i < 11; i += 2) {
		result += parseInt(number[i]);
	}
	for (i = 0; i < 11; i += 2) {
		result += parseInt(number[i]) * 3;
	}

	return (10 - result % 10) % 10;
}
974355
function version_1(input){
	var hash = 2166136261; //offset: 2166136261 = 0x811c9dc5 

	for(var i=0; i< input.length; i++){
		hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);
		hash ^= input.charCodeAt(i);
	}

	return hash >>> 0;
}
280655
function getNumStr(num, fixed = 4) {
  let numStr = '';

  if (typeof num != "number") {
    num = Number(num);
    if (isNaN(num)) {
      // console.log("Pushbullet Plugin: Number Conversion Failed");
      return "Conversion Failure";
    }
  }


  if (Number.isInteger(num)) {
    numStr = num.toString();
  } else {

    //Create modNum Max - Must be a better way...
    let modNumMax = '1';
    for (let i = 1; i < fixed; i++) {
      modNumMax = modNumMax + '0';
    }
    modNumMax = Number(modNumMax);

    let i = 0;
    if (num < 1) {
      let modNum = num - Math.floor(num);
      while (modNum < modNumMax && i < 8) {
        modNum *= 10;
        i += 1;
      }
    } else {
      i = fixed;
    }
    numStr = num.toFixed(i);
    //Remove any excess zeros
    while (numStr.charAt(numStr.length - 1) === '0') {
      numStr = numStr.substring(0, numStr.length - 1);
    }

    //If last char remaining is a decimal point, remove it
    if (numStr.charAt(numStr.length - 1) === '.') {
      numStr = numStr.substring(0, numStr.length - 1);
    }

  }

  //Add commas for thousands etc
  let dp = numStr.indexOf('.'); //find deciaml point
  if (dp < 0) { //no dp found
    dp = numStr.length;
  }

  let insPos = dp - 3;
  insCount = 0;
  while (insPos > 0) {
    insCount++;
    numStr = numStr.slice(0, insPos) + ',' + numStr.slice(insPos);
    insPos -= 3;
  }


  return (numStr);
}
608785
function(number, pad) {
      var endian, i, multiplier, padding, power, remainder, value, _i;
      if (pad == null) {
        pad = true;
      }
      power = Math.floor((Math.log(number) / Math.LN2) / 8) * 8;
      multiplier = Math.pow(2, power);
      value = Math.floor(number / multiplier);
      remainder = number % multiplier;
      endian = "";
      if (remainder > 255) {
        endian += this.stringifyLittleEndian(remainder, false);
      } else if (power !== 0) {
        endian += this.dec2hex(remainder);
      }
      endian += this.dec2hex(value);
      if (pad) {
        padding = 16 - endian.length;
        for (i = _i = 0; _i < padding; i = _i += 1) {
          endian += "0";
        }
      }
      return endian;
    }
1054289
function ScriptNum(num, base) {
  if (!(this instanceof ScriptNum))
    return new ScriptNum(num, base);

  I64.call(this, num, base);
}
1324555
public function calculateCheckDigits($iban)
    {
        $value = $this->prepareCheckDigitsCalculate($iban);

        $modulo = null;
        $valueLength = strlen($value);
        $nextPosition = 0;
        $nextLength = 9;
        do {
            $subValue = substr($value, $nextPosition, $nextLength);
            $subValue = $modulo . $subValue;
            $modulo = $subValue % 97;

            $nextPosition += $nextLength;
            $nextLength = 9 - strlen($modulo);
        } while ($valueLength > $nextPosition);

        $checksum = 98 - $modulo;
        return (int)$checksum;
    }
339386
static function IsValidMod10($str)
	{
	   if (strspn($str, "0123456789") != strlen($str))
	   {
	      return false;
	   }

	   $map = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, // for even indices
	                0, 2, 4, 6, 8, 1, 3, 5, 7, 9); // for odd indices
	   $sum = 0;
	   $last = strlen($str) - 1;

	   for ($i = 0; $i <= $last; $i++)
	   {
	      $sum += $map[$str[$last - $i] + ($i & 1) * 10];
	   }

	   return $sum % 10 == 0;
	}
1028372
function(mod) {
			var seconds = this.getTimeSeconds();
			
			if(mod) {
				if(seconds == 60) {
					seconds = 0;
				}
				else {
					seconds = seconds % 60;
				}
			}
			
			return Math.ceil(seconds);
		}
515943
def _modulo(self, decimal_argument):
        
        _times, remainder = self._context.divmod(decimal_argument, 100)

        # match the builtin % behavior by adding the N to the result if negative
        return remainder if remainder >= 0 else remainder + 100