[@function] AlphabeticID.decode
[@description] Decode a short string and return number
[@param] string
[@return] integer
344231
function(_string) {
    if ('undefined' == typeof _string) {
      return null;
    }
    else if ('string' != typeof _string) {
      throw new Error('Wrong parameter type');
    }

    var str = _string.reverse();
    var ret = 0;

    for (var i = 0; i <= (str.length - 1); i++) {
      ret = ret + this.index.indexOf(str.substr(i, 1)) * (this.bcpow(this.index.length, (str.length - 1) - i));
    }

    return ret;
  }
1303578
def base62_decode(cls, string):
        

        alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

        base = len(alphabet)
        strlen = len(string)
        num = 0

        idx = 0
        for char in string:
            power = (strlen - (idx + 1))
            try:
                num += alphabet.index(char) * (base ** power)
            except ValueError:
                raise Base62DecodeError(
                    "Failed to decode char: '{}'".format(char))
            idx += 1

        return num
1070932
def string_to_int(string, alphabet):
    
    number = 0
    alpha_len = len(alphabet)
    for char in string:
        number = number * alpha_len + alphabet.index(char)
    return number
199760
def decode(string, encoding=None, errors=None):
    
    if encoding is None:
        encoding = getpreferredencoding()
    if errors is None:
        errors = getpreferrederrors()
    return string.decode(encoding, errors)
542613
def decode(self, hashid):
        
        if not hashid or not _is_str(hashid):
            return ()
        try:
            numbers = tuple(_decode(hashid, self._salt, self._alphabet,
                                    self._separators, self._guards))

            return numbers if hashid == self.encode(*numbers) else ()
        except ValueError:
            return ()
952856
function decode2(s) {
  assert.equal(s.length, 2)
  const [ upper, lower ] = s
  return (decode(upper) << 6) | decode(lower)
}
1150266
@Override
    public int decode ( byte[] buffer, int bufferIndex, int len ) throws SMBProtocolDecodingException {
        this.indexNumber = SMBUtil.readInt8(buffer, bufferIndex);
        return 8;
    }
1184381
function ord(str) {
    var code = str.charCodeAt(0);

    // High surrogate.
    if (0xD800 <= code && code <= 0xDBFF) {
        // This is just a high surrogate with no following low surrogate, so we return its value;
        if (str.length === 1) {
            return code;
        }

        var low = str.charCodeAt(1);

        return ((code - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000;
    }

    // Low surrogate
    if (0xDC00 <= code && code <= 0xDFFF) {
        return code;
    }

    return code;
}
860261
static CharSequence decode(final CharSequence s) {
    if (!contains(s, '%')) {
      return s.toString();
    }
    return decode0(s);
  }
895777
function decode (data, start, end, encoding) {
  if (data == null || data.length === 0) {
    return null
  }

  if (typeof start !== 'number' && encoding == null) {
    encoding = start
    start = undefined
  }

  if (typeof end !== 'number' && encoding == null) {
    encoding = end
    end = undefined
  }

  decode.position = 0
  decode.encoding = encoding || null

  decode.data = !(Buffer.isBuffer(data))
    ? Buffer.from(data)
    : data.slice(start, end)

  decode.bytes = decode.data.length

  return decode.next()
}
349568
def decode(s)
    ts = lex(s)
    v, ts = textparse(ts)
    if ts.length > 0
      raise Error, 'trailing garbage'
    end
    v
  end
1223334
def hex_decode(encoded)
      encoded.scan(/[[:xdigit:]]{2}/).map { |h| h.hex.chr }.join
    end
1094825
function encode(num) {
  var encoded = '';

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

  return encoded;
}
855923
function decode(mgrsString) {

        if (mgrsString && mgrsString.length === 0) {
            throw ("MGRSPoint coverting from nothing");
        }

        var length = mgrsString.length;

        var hunK = null;
        var sb = "";
        var testChar;
        var i = 0;

        // get Zone number
        while (!(/[A-Z]/).test(testChar = mgrsString.charAt(i))) {
            if (i >= 2) {
                throw ("MGRSPoint bad conversion from: " + mgrsString);
            }
            sb += testChar;
            i++;
        }

        var zoneNumber = parseInt(sb, 10);

        if (i === 0 || i + 3 > length) {
            // A good MGRS string has to be 4-5 digits long,
            // ##AAA/#AAA at least.
            throw ("MGRSPoint bad conversion from: " + mgrsString);
        }

        var zoneLetter = mgrsString.charAt(i++);

        // Should we check the zone letter here? Why not.
        if (zoneLetter <= 'A' || zoneLetter === 'B' || zoneLetter === 'Y' || zoneLetter >= 'Z' || zoneLetter === 'I' || zoneLetter === 'O') {
            throw ("MGRSPoint zone letter " + zoneLetter + " not handled: " + mgrsString);
        }

        hunK = mgrsString.substring(i, i += 2);

        var set = get100kSetForZone(zoneNumber);

        var east100k = getEastingFromChar(hunK.charAt(0), set);
        var north100k = getNorthingFromChar(hunK.charAt(1), set);

        // We have a bug where the northing may be 2000000 too low.
        // How
        // do we know when to roll over?

        while (north100k < getMinNorthing(zoneLetter)) {
            north100k += 2000000;
        }

        // calculate the char index for easting/northing separator
        var remainder = length - i;

        if (remainder % 2 !== 0) {
            throw ("MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters" + mgrsString);
        }

        var sep = remainder / 2;

        var sepEasting = 0.0;
        var sepNorthing = 0.0;
        var accuracyBonus, sepEastingString, sepNorthingString, easting, northing;
        if (sep > 0) {
            accuracyBonus = 100000.0 / Math.pow(10, sep);
            sepEastingString = mgrsString.substring(i, i + sep);
            sepEasting = parseFloat(sepEastingString) * accuracyBonus;
            sepNorthingString = mgrsString.substring(i + sep);
            sepNorthing = parseFloat(sepNorthingString) * accuracyBonus;
        }

        easting = sepEasting + east100k;
        northing = sepNorthing + north100k;

        return {
            easting: easting,
            northing: northing,
            zoneLetter: zoneLetter,
            zoneNumber: zoneNumber,
            accuracy: accuracyBonus
        };
    }
80686
def decode(s):
    
    strs = []
    i = 0
    while i < len(s):
        index = s.find(":", i)
        size = int(s[i:index])
        strs.append(s[index+1: index+1+size])
        i = index+1+size
    return strs
695177
function(){
		this.decodeCell( function(cell,ca){
			if     (ca==="-"){ cell.qnum = -2;}
			else if(ca!=="."){ cell.qnum = +ca;}
		});
	}
14253
function decode(base64string) {
        var number = 0;
        var chars = base64string.split('');
        var len = chars.length;
        var val10;
        var val64;
        var asciiVal;

        for (var i = 0; i < len; i++) {

            val64 = chars[len - 1 - i];
            asciiVal = val64.charCodeAt(0);
            val10 = 0;
            if (val64 === '_') {
                val10 = 63;
            }
            else if (val64 === '-') {
                val10 = 62;
            }
            else if (asciiVal > 96 && asciiVal < 123) {
                val10 = asciiVal - 61;
            }
            else if (asciiVal > 64 && asciiVal < 91) {
                val10 = asciiVal - 55;
            }
            else if (asciiVal > 47 && asciiVal < 58) {
                val10 = asciiVal - 48;
            }
            else {
                throw new AppError({ msg: 'Non-base64value in encoded string' });
            }

            number += (Math.pow(64, i) * val10);
        }

        return number;
    }