-
Notifications
You must be signed in to change notification settings - Fork 610
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
Exercises for video 2-7 #35
Comments
@blinkityblank to screen capture these, you can copy |
@blinkityblank for saving the image as a file and path to file in database I didn't actually implement it I just made 4 PNG files and created a |
@blinkityblank for the drawings I made some in drawings.db (just rename to database.db), but feel free to make your own! Just note the logging of the latitude and longitude, maybe spoof a different location! |
For face-api.js I'm uploading just some footage of me running the demo to google drive. Let's make sure we credit the code and url on screen in addition to docs. |
@shiffman - in case you're looking for some face-api references, I've got a few working with p5. of interest might be: |
Oh this is awesome, I forgot you had these! I'm eventually hoping to make a README page for each module so this would be perfect to include. . as well as add to the video descriptions! |
Hopefully I am writing this in the correct place. Please edit and/or delete as seems fit. I have coded the "save to file" aspect as follows
Hopefully this is relevant |
hello @jrichalot - thanks for writing! One potential fix here could be that your What may be the issue is that you're trying to write your file, but in face it has been deleted before your machine has had the chance. Hope this helps! |
Thanks @joeyklee. The code works... but much more elegant indeed with |
@jrichalot Thank you for providing your solution. I wasn't able to figure that out on my own and it got quite frustrating until I took a look on this repository to find your solution :) I took your code as a reference and tried to also consider @joeyklee 's tip to use the delete part in the callback function in the writeFile(). Somehow it is not being removed from the "data". From the wording of the parameter it seems, that it is an error handler and the deleting is not executed as long as there is no error in writing the file? This is how I tried it:
Does someone see what I am missing here? |
Yup, pretty quick fix though! fs.writeFile(data.filepath+data.filename, base64Data, 'base64', error => { Taken right from here https://nodejs.org/api/fs.html#fs_callback_example Not sure if you'll see this but thought it might be nice. |
The text was updated successfully, but these errors were encountered: