From 192d24249093cbf93115de7bbb9cf93b868d69b9 Mon Sep 17 00:00:00 2001 From: "Peter J. Keleher" <keleher@cs.umd.edu> Date: Mon, 4 May 2020 10:49:09 -0400 Subject: [PATCH] auto --- assign5/assign5.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/assign5/assign5.md b/assign5/assign5.md index 94dd975..3ae1260 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 -- GitLab