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 options = null; | |
undefined | |
> options | |
null | |
> options['developerCredentials'] | |
TypeError: Cannot read property 'developerCredentials' of null | |
at repl:1:8 | |
at REPLServer.defaultEval (repl.js:164:27) | |
at bound (domain.js:280:14) | |
at REPLServer.runBound [as eval] (domain.js:293:12) |
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
{ | |
"env": { | |
"browser": true, | |
}, | |
"parser": "babel-eslint", | |
"plugins": [], | |
// setting all these to false for now, mostly useful for es6 | |
"ecmaFeatures": { | |
"arrowFunctions": false, | |
"binaryLiterals": false, |
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
def is_a_cat(animal_name): | |
if animal_name == 'cat': | |
return True | |
else: | |
return False | |
def lycanthropize(animal_name): | |
return "were-" + animal_name |
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 ioClient = require('socket.io-client') | |
var should = require('should'); | |
var chai = require('chai'); | |
var options ={ | |
transports: ['websocket'], | |
'force new connection': true, | |
'reconnection delay' : 0, | |
'reopen delay' : 0 | |
}; |
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
for city in db.cities.find(): | |
if "Metropolitan Division" in city['censusName']: | |
db.cities.remove(city) |
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
$ grep "41860" cities.py; | |
{"censusCBSACode":"41860","censusName":"Oakland-Fremont-Hayward, CA Metropolitan Division"}, | |
{"censusCBSACode":"41860","censusName":"San Francisco-San Mateo-Redwood City, CA Metropolitan Division"}, | |
{"censusCBSACode":"41860","censusName":"San Francisco-Oakland-Fremont, CA Metropolitan Statistical Area"}, | |
$ grep "31100" cities.py; | |
{"censusCBSACode":"31100","censusName":"Los Angeles-Long Beach-Glendale, CA Metropolitan Division"}, | |
{"censusCBSACode":"31100","censusName":"Santa Ana-Anaheim-Irvine, CA Metropolitan Division"}, | |
{"censusCBSACode":"31100","censusName":"Los Angeles-Long Beach-Santa Ana, CA Metropolitan Statistical Area"}, | |
$ grep "37980" cities.py; | |
{"censusCBSACode":"37980","censusName":"Camden, NJ Metropolitan Division"}, |
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
>>> from cities import citiesToInsert | |
>>> for city in citiesToInsert: | |
... db.cities.insert(city) | |
... | |
ObjectId('51313de546c19709f3ce00eb') | |
ObjectId('51313de546c19709f3ce00ec') | |
ObjectId('51313de546c19709f3ce00ed') | |
ObjectId('51313de546c19709f3ce00ee') | |
ObjectId('51313de546c19709f3ce00ef') | |
ObjectId('51313de546c19709f3ce00f0') |