Skip to content

Master update#2

Open
PatrickImProVision wants to merge 74 commits intoadmiyn:masterfrom
PatrickImProVision:master
Open

Master update#2
PatrickImProVision wants to merge 74 commits intoadmiyn:masterfrom
PatrickImProVision:master

Conversation

@PatrickImProVision
Copy link

Code was converted to Class and has been improved for a better work.

Lukas Stribrny and others added 30 commits March 13, 2017 03:29
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.
Lukas Stribrny and others added 30 commits December 6, 2017 08:18
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!
…amples_NoMySQL/Example_Generate_ID_JSON.php
…e_Examples_NoMySQL/Example_Generate_Random_JSON.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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant