This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function destroyer(arr) { | |
// Remove all the values | |
res = Array.from(arr[0]); | |
for(var i = 1 ; i < arr.length; i++){ | |
res = res.filter(function(v){ | |
console.log(i); | |
console.log(v); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PORT = 8080; | |
var express = require('express'); | |
var service = express(); | |
service.get("/", function(request, response){ | |
response.send("Usage: Load this same page with either a string representing the date, or a Unix timestamp at the end</br> you will be given both the timestamp and readable date as a response."); | |
}); | |
service.get("/:date", function(request, response){ | |
response.send(createTimestamps(request.params.date)); | |
// response.send("Hello") | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PORT = 8080; | |
var express = require('express'); | |
var service = express(); | |
service.get("/", function(request, response){ | |
response.send("Usage: Load this same page with either a string representing the date, or a Unix timestamp at the end</br> you will be given both the timestamp and readable date as a response."); | |
}); | |
service.get("/:date", function(request, response){ | |
response.send(createTimestamps(request.params.date)); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongo = require('mongodb').MongoClient | |
const url = "mongodb://localhost:27017/learnyoumongo" | |
mongo.connect(url, function(err, db) { | |
if(err){} | |
var first = process.argv[2]; | |
db.collection('parrots').find( | |
{ | |
age: {$gt: +first} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongo = require('mongodb').MongoClient | |
var first = String(process.argv[2]); | |
var second = String(process.argv[3]); | |
// var first = "blah"; | |
// var second = "blah2"; | |
var jsonObject = { | |
firstname: first, | |
lastName: second | |
}; | |
const url = "mongodb://localhost:27017/learnyoumongo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Job | |
{ | |
title: String, | |
location: String, | |
applicants: [ID]; | |
poster: ID, | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*MAIN STYLES-------------------*/ | |
body{ | |
font-family: 'Spectral SC', serif; | |
} | |
.main-header{ | |
height:200px; | |
} | |
.comtaier { | |
width:80%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="app"> | |
<h1>{{msg}}</h1> | |
<form> | |
<input type="text" v-model="input"></input> | |
<p v-show="input.length === 0">Please enter some text</p> | |
<div v-if = "input.length > 15"> | |
Thats a lot of text | |
</div> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Place finding | |
/find/{category}/near/{type}/{location} | |
Categories would be [Bar, Food, Entertainment] | |
Locations would be Zipcodes, Cities, | |
Profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(findHealthcareBenefitEligibility({ | |
age: 25, | |
wasFosterChild: false, | |
isPregnant: false, | |
income: 1600, | |
householdsize: 1, | |
isUSCitizen: true, | |
})); |
OlderNewer