vendredi 15 mars 2019

Hash number from String and flexible corridor of choice

I have a String ID e.g. 01-45533-C and need to select a row based on this ID in a table. To select a row I 1) Need to somehow has this to a Number (e.g. 25) 2) Select the row in the table.

My challenge here is: 1) I need to get the some row any time I run this function over and over (so it must be some has function) 2) The length of the table, so the possible numbers the hash can produce can change any time I run the function. Anyways I need to get the same row over and over again for the same ID.

Hope some body can help me how to achieve this. Generating a row number based on the String ID seems quite possible, but receiving the same number again if the corridor of possible number changes seems very challenging.

Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire