How are you checking that you've grabbed all of the 'subsets' that we were talking about earlier?
Interesting project, anyways!
Not sure how specific you want me to be but i'll give you all the details.
After I search for item x I parse the html to get the first username and store it as a string.
I then get the char in position 0 of the username string.
I create an int array the size of the number of subsets (13)
The idea is that the first int in the array is for the first subset, the second int for the second subset and etc.
If the int value in the array is 0 that means subset 0 hasn't been checked and onces it checks it gets changed to a 1.
(The first subset is A-N)
so when i get a username like "airdare" I get the char 'a'
In ascii this is represented by the int 97 so i use mod (%) 97 to give me a int pos = 0 and
if position 0 in the int array is 0 I make it 1 because I have now found that subset
to check if I have gone through all subsets I simply add up the int array and if it gives me 13 I know I've found them all.
if the first user name was "nairdare" the char would be 'n' and once i mod 97 i get pos= 13 which would return a nullpointerexception because the array only goes from 0 to 12 and because A and N are the same subset I simply have a condition that says if pos > 12 then pos-=13 giving me once again pos = 0 which is exactly what i need.
A few more conditions are added for underscores and digits.
Lol that was probably a bitch to read. Hopefully you could follow. Thanks for your support.
Edited by Nemecek, 14 December 2013 - 03:55 PM.