Open
Conversation
Rename alphanumeric-generator.php to v.0.1/alphanumeric-generator.php
array_search() could not search in array properly and changed to own searching style. Because of this issue , generator could not generate by id correctly.
Just clean up of debug code.
Fixed a little bug when value was 0 -> generator could not generate the next value after the 0 because it was returning as FALSE.
For now it's the final update, but still need to figure it out how to generate key quickest way. There need to be some reverse way of doing this : 0000 0000 = Code Number 0 0000 0001 = Code Number 1 0000 0158 = Code Number (1 * 10^2) + (5 * 10^1) + (8 * 10^0) = 158 For Alphabets (A=0, B=1, C= 2, ... Z = 25, a = 26, ..., z = 51, 0 = 52, 1 = 53, 9 = 61: AAAA ABCD = Code Number (0 * 62^7) + (0 * 62^6) + (0 * 62^5) + (0 + 62^4) + (0 * 62^3) + (1 * 62^2) + (2 * 62^1) + (3 * 62^0) = 14780307 This is the current way : generate key -> count the possicion of the key Solution wanted : input ID -> generate key without too much cycling by PHP "for" cycle At the moment if i input ID 5,000,000 with proper setting the script hang up or the page will become unavailable. I haven't found any simple solution of how to reverse it,but i believe there must be somethnig to solve this issue. So if anyone know a solution please feel free to develop and commit. Thanks
Generator is finished 27.3.2017 16:10.
Repaired 1 bug. There was one error in generating code by ID. When generated two or more numbers at the same time '$this->code_char_base[]' was joining all generated code as one,so database couldn't recocnise correct code.
Replace protected by public in : protected $code_max_type. Because of issue when using : $this->CANG->code_max_type
Issue with strings AAAAACPZ next code was -> AAAAACP1 but it should be AAAAACP0 and after AAAAACP1. Issue fixed!
…s_NoMySQL/Example_Generate_ID.php
…amples_NoMySQL/Example_Generate_ID_JSON.php
…mples_NoMySQL/Example_Generate_Random.php
…e_Examples_NoMySQL/Example_Generate_Random_JSON.php
…mples_NoMySQL/Example_Generate_String.php
…e_Examples_NoMySQL/Example_Generate_String_JSON.php
…/Base_Examples_NoMySQL/Example_Microsoft_SN_Generate_ID.php
…v.0.3/Base_Examples_NoMySQL/Example_Microsoft_SN_Generate_ID_JSON.php
… to v.0.3/Base_Examples_NoMySQL/Example_Microsoft_SN_Generate_Random_JSON.php
….0.3/Base_Examples_NoMySQL/Example_Microsoft_SN_Generate_Random.php
Finally Back on Track and Almost Ready to Use Them
Renaming Files and Updating Source Code to make it working.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code was converted to Class and has been improved for a better work.