Implementing Auto-complete : CF-ToolKit
By Asim Krishna Prasad
Posted on 22/12/14
Tag :
Log
So, I have started implementing the auto-complete feature..
The javascript and PHP amalgamation is ready .. what I need to do now is to traverse through the CodeForces DB and include all the handles into my DB and then just implement the codes already made..
UPDATE 1
It has been 10 mins and the traversal part is not working as it should.. It is not that it is not coded right but the thing is that the JSON element returned by CodeForces API is too big to be parsed into a PHP array.. thinking of some work around...
UPDATE 2
So here is what I did..I fetched only those usernames which were active in last 30 days on codeforces which reduced the data considerably.. Now these usernames are in my DB and by implementing my previously cooked codes I finally implemented auto-complete feature on "All submissions" page..
Moving along..
UPDATE 3
What I am now going to do is to make the DB get update automatically whenever any user adds a friend who is not already in my DB, this will save me from updating the DB manually again and again..
UPDATE 4
Auto-complete is now working for all the text boxes..Around 7500 usernames have been added to the DB (the usernames which took part in any contest on CodeForces in last month) and the usernames will keep adding on as people add friends/compete with any new username on the ToolKit..
Ref-Back : 1. AutoComplete TextBoxes : CF Toolkit
2. CF ToolKit Issues GitHub
COMMENTS :