hash - Integer generation from text: suggestions? -
OK, I have some data that I dynamically used for an integer type identifier.
For example, there is a sample record for allocation.
& lt; Listing & gt; & Lt; Sportcode & gt; A.A. & Lt; / Sportcode & gt; & Lt; Lgabbr & gt; NL & lt; / Lgabbr & gt; & Lt; Partitioning & gt; Central & lt; / Split & gt; ... & lt; Listing & gt;
There is more data related to this listing but these are the only areas that I can use to generate the identifier, and I have to use them all.
Can I put them together to create a unique identifier?
The only idea I've found so far is to concat together the wire and then charcode it with every four instead. It works just fine when I'm just doing playcode encoding (AA = 6565), or sportcode and lgabbr (AANL = 65657,876), but when I add the partition it becomes long and unwieldy (AANLCENTRAL = 6565787667697884826576).
Edit
Several answers have been submitted that show how to reverse the process, I think that It should be mentioned that the process does not need to be reversible. Once the number is generated, it is the value used by the rest of the application.
Re-edit I have decided to go with my solution in a different way, although I have found some good suggestions as the most effective method of assigning the identifier Instead of creating them they have to take it, so I added an XML document with ID definitions and the related data is now using the XSLT stylesheet I to be the identifier in the attached sheet. Can a Lookup and I can use the identifier assigned. I did not want to define custom everything because there are so many posibilities around 25 sportscodes, 10/15 LGBBR, and 10 divisions are possible. This is a lot for the account in a stylesheet Adding an additional XML document integrates this data for easy editing outside of the stylesheet, and this is the way I'm going with (and this BTW works).
Thank you for all your suggestions. "Text" itemprop = "text">
after you
You have character limits in strings (such as only upper-case Latin) Then they can use the base-26 to adjust the number. like:.
The test will be adjusted J4IJ , and 337,135
in decimal to base-26 Using digits (0-9, AP)
With this pattern you can add your string and make numbers.
Comments
Post a Comment