diff --git a/assign5/assign5.md b/assign5/assign5.md index 94dd975d1644c8892baf97fd2faf27f8d53aa35d..3ae1260b4d89dc3611ce969d701f5bbcc93c5e99 100644 --- a/assign5/assign5.md +++ b/assign5/assign5.md @@ -232,8 +232,24 @@ https://sedna.cs.umd.edu/436clips/vids/horses.mp4" ``` You may upload URLs for recordings elsewhere, but try to keep them short (20-30 seconds, max). -- I will build another small app that can be used to regenerate/reset the database. Link - will be here soon. +- You can regenerate a reasonable, syntacticly correct db as follows: +``` + let root = Database.database().reference() + + let vid1 = root.child("urls").childByAutoId() + vid1.setValue(["name": "Neo romps happily in the snow", + "tags": "dog,awesome,pet", + "url": "https://sedna.cs.umd.edu/436clips/vids/neo.mp4"]) + root.child("seen/kendrick/\(vid1.key!)").setValue("1") + + root.child("urls").childByAutoId().setValue(["name": "Meditation Sheep", "tags": "sheep,peaceful", + "url": "https://sedna.cs.umd.edu/436clips/vids/sheep.mp4"]) + root.child("urls").childByAutoId().setValue(["name": "Beautiful Sunset", "tags": "sunset,peaceful", + "url": "https://sedna.cs.umd.edu/436clips/vids/sunset.mp4"]) + root.child("urls").childByAutoId().setValue(["name": "Horses", "tags": "horses,rural,peaceful", + "url": "https://sedna.cs.umd.edu/436clips/vids/horses.mp4", + "likes": ["someone": "1", "someone else": "1"]]) +``` ## Grading