Skip to content

Instantly share code, notes, and snippets.

https://repl.it/@ElliottAlexande/Make-student-reports-drill
https://repl.it/@ElliottAlexande/Enroll-in-summer-school-drill
https://repl.it/@ElliottAlexande/find-by-id-drill
https://repl.it/@ElliottAlexande/validate-object-keys-drill
function getTokens(rawString) {
// NB: `.filter(Boolean)` removes any falsy items from an array
return rawString.toLowerCase().split(/[ ,!.";:-]+/).filter(Boolean).sort();
}
function mostFrequentWord(text) { // define the function. It accepts one argument, "text"
let words = getTokens(text); // set a variable, "words", to the filtered and sorted output of "getTokens". It is an array of all the words present in "text"
let wordFrequencies = {}; // create an object, "wordFrequencies", to keep track of word quantities
for (let i = 0; i <= words.length; i++) { // begin for loop
Wut2Do will be a web app for finding nearby events and venues that match the users query and that are happening soon or currently.
const STORE = {
mapId: 0,
lat: 0,
lon: 0,
categoriesSettings: {
url: 'https://api.foursquare.com/v2/venues/categories',
data: {
client_id: 'KQZRJLBTVACPKJ2NYBQXS3AZ1ALG0HOWLJVNKI3MKHOPEI3O',
client_secret: 'MNYP4FZLA33QRUFKTMXCXSYJ00OYBYO2M5IHGL3IUOKD1SW4',
v: '20180823'
@escottalexander
escottalexander / gist:201dae669ac731329db35c9d428e32d3
Created September 13, 2018 21:55
user feedback on Wut2Do app
My first user gave me some very good styling advice and pointed out the ways I could make it more user friendly.
I made the adjustments he recommended and submitted it to a new user.
The second user said that they were experiencing problems with using the keyboard while testing it.
I fixed that and let my final user test it on a mobile device. Her exact wording was, "it works great! Good job!"
https://elite-hammer.glitch.me/
https://titanium-act.glitch.me/
Show all restaurants
db.restaurants.find()
Show first ten sorted by name
db.restaurants.
find().
sort({name: 1}).
limit(10);
Find by _id
1. Get all restaurants
SELECT * FROM restaurants
2. Get Italian restaurants
SELECT * FROM restaurants
WHERE cuisine = 'Italian';
3. Get 10 Italian restaurants, subset of fields
SELECT id, name FROM restaurants
WHERE cuisine = 'Italian'
Epic
To facilitate games of EiMM with minimal need for moderation.
User Stories
I can register a profile and log in
I can host a game or join a game that is hosted by someone else
As a host, I can view players and assign roles, abilities, and alias’
As a host, I can remove players for inappropriate behaviour or other reasons
As a player, I can message other players
As a player, I can keep track of information that has been revealed to me
Short list of user stories:
As a player, I can message other players
As a player, I can view my information such as role or abilities
As a player, I can keep track of information that has been revealed to me
As a user, I can see how much time is left until the night ends
Screens the user will interact with:
Profile
Messaging interface
Notes