Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/29/2023 in all areas

  1. This may not be quite the answer you're looking for but I found scripting out pttb.exe (Pin To Task Bar) via CMD/Powershell was easier than any other method of pinning an app.
    1 point
  2. Bess

    IBAN validator

    Based on : http://en.wikipedia.org/wiki/International_Bank_Account_Number#Validating_the_IBAN Func _IbanValidate($iban) ;~ 1. Parse string, but I don't check if IBAN length is correct as per the country, no need. $iban = StringRegExpReplace ( StringUpper($iban), "[^A-Z0-9]", "") ;~ 2. Move the four initial characters to the end of the string $IBAN_iso = StringLeft($iban, 2) ; If need to know Country code $IBAN_key = StringMid($iban, 3, 2) ; next 2 digits $IBAN_bban= StringMid($iban, 5) $IBAN_Reverse = stringsplit($IBAN_bban & $IBAN_iso & $IBAN_key, "") ; complet reversed Iban to array ;~ 3. Replace each letter in the string with two digits, thereby expanding the string, where A = 10, B = 11, ..., Z = 35 $IBAN_Int = "" ; Iban integer For $i = 1 To $IBAN_Reverse[0] If StringIsDigit($IBAN_Reverse[$i]) Then $IBAN_Int &= $IBAN_Reverse[$i] Else $IBAN_Int &= Asc($IBAN_Reverse[$i])-55 EndIf Next ;~ 4. Interpret the string as a decimal integer and compute the remainder of that number on division by 97 ;~ Piece-wise calculation D mod 97 ;~ Starting from the leftmost digit of D, construct a number using the first 9 digits and call it N. ;~ Calculate N mod 97. If the result is less than 10, prefix the result with a 0, giving a result in the range 00 to 96. ;~ Construct a new 9-digit N by concatenating above result (step 2) with the next 7 digits of D. If there are fewer than 7 digits remaining in D but at least one, then construct a new N, which will have less than 9 digits, from the above result (step 2) followed by the remaining digits of D ;~ Repeat steps 2–3 until all the digits of D have been processed ;~ The result of the final calculation in step 2 will be D mod 97 = N mod 97. $mod_N = Mod(StringLeft($IBAN_Int, 9),97) $mod_N = ($mod_N < 10) ? "0" & $mod_N : $mod_N $mod_N = Mod($mod_N&StringMid($IBAN_Int, 10, 7),97) $mod_N = ($mod_N < 10) ? "0" & $mod_N : $mod_N $mod_N = Mod($mod_N&StringMid($IBAN_Int, 17, 7),97) $mod_N = ($mod_N < 10) ? "0" & $mod_N : $mod_N $IBAN_Validate = Mod(int($mod_N&StringMid($IBAN_Int, 24, 7)),97) == 1 Return $IBAN_Validate EndFunc $valide = _IbanValidate("GB82 WEST 1234 5698 7654 32") ConsoleWrite($valide&@LF)
    1 point
  3. I've been meaning to upload the latest updates for a bit but kept putting it off until my PC started smoking and I nearly lost a bunch of work. So here it is. Check the first post for the big old list of changes.
    1 point
×
×
  • Create New...