-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to store data in MySQL db? #245
Comments
Since you have the data on the client side with JavaScript, you can send it to the server via the regular methods and store it that way. For example, with websockets or AJAX or even simple HTTP GET requests. Good luck |
Hey Jeff, |
So getStoredPoints() gets the 50 recent prediction accuracies, rather than what's used in the model. So those 50 points are not stored in localForage. I would suggest taking a look at the localForage data after calibration, and storing that in your MySQL, then loading that instead of the getStoredPoints() data. |
Hey Jeff, yup I'm doing that with the code above: get_eyetracking_calibration To store the data I run:
After this I send the form and store it in the database. This part works ;) Still the problem is that I get the error above about the missing "ImageData"...
So it's a bit tricky to store the localforage db and restore it from mysql... I will look for some help from a fiverr javascript developer... Keep you posted |
@jeffhuang Hurrayy :) Finally it works! This gave me the hint I needed: Now I have this function:
PHP Looks like that:
And finally I added this to webgazer:
And this:
So if anyone else is trying to do it... |
@jeffhuang Still a question: My idea is to restore a lost calibration file, if the browser is reset or the users changes the computer. Thanks for your help! |
I would suggest a new calibration. Any change in environment should be recalibrated. |
Hi,
I just wonder how you would have to do this?
Any one already did that?
So far I managed to store the result from the calibration as json in a table:
My problem is, that I want to restore a calibration from the DB if a users deletes the local storage...
So how can I now import this data again?
And is it correct, that by default only the last 50 predictions are stored?
Would it even be possible to store all the data in a db? Or would it be too much? (Talking about data from real usage, not calibration)
Thanks for the help
PS Love your webgazer, i'm trying to use in in a visual training for people after a stroke!
The text was updated successfully, but these errors were encountered: