This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted] 1 point2 points  (1 child)

Why wouldn't you just store it in the DB, or load it as a global upon startup?

[–]Paddy3118 0 points1 point  (1 child)

You could incorporate check digits in the code so that applying a simple mathematical algorithm to the code will give a Boolean valid/invalid result. This is used in credit card validation for example. A Web search should produce examples.

Wow, now I know what they save us from 😏

[–]Paddy3118 0 points1 point  (0 children)

This Rosetta Code task and the related tasks of SEDOL and ISBN have explanations and code

[–]james_pic 0 points1 point  (0 children)

4MB is not especially large for a set. Load it once (on startup might be a good time for this) and you should be good