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
$('.myButton').click(function(){ | |
$('.secondEl').show(); | |
}); |
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
$('.myButton').click(minion(){ | |
$('.secondEl').show(); | |
}); |
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
$('button').click(function(){ | |
console.log("One"); | |
$('.firstChild').show(function(){ | |
console.log("Two"); | |
$('.childofChild').show(); | |
}); | |
console.log("Three"); | |
}); |
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
$('button').click(minion(){ | |
console.log("One"); | |
$('.firstChild').show(minion(){ | |
console.log("Two"); | |
$('.childofChild').show(); | |
}); | |
console.log("Three"); | |
}); |
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
// generic reportOrders that shows your orders to the function | |
function reportOrders (minionOrders) { | |
if ( typeof minionOrders === "string"){ | |
console.log(minionOrders); | |
} | |
else if ( typeof minionOrders === "object"){ | |
for (var item in minionOrders) { | |
console.log(item + ": " + minionOrders[item]); | |
} | |
} |
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
// generic reportOrders that shows your orders to the function | |
function reportOrders (minionOrders) { | |
if ( typeof minionOrders === "string"){ | |
console.log(minionOrders); | |
} | |
else if ( typeof minionOrders === "object"){ | |
for (var item in minionOrders) { | |
console.log(item + ": " + minionOrders[item]); | |
} | |
} |
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 request = require('request'); | |
var app = require('express')(); | |
var results; | |
function logRes(){ | |
console.log(results); | |
} | |
app.get('/storeData', function(req,res){ | |
readResult(logRes) |
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 request = require('request'); | |
var app = require('express')(); | |
var results; | |
function logRes(){ | |
console.log(results); | |
} | |
app.get('/storeData', minion1(req,res){ | |
readResult(logRes) |
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
// First line of function | |
blockspring.runParsed("query-google-spreadsheet", { | |
// Here is where you need to decide what data you are grabbing with the Google query syntax | |
// I am finding elements that match the variable num, which is from a previous part of the code | |
// Google syntax makes you request columns with letters as opposed to your column titles. | |
"query": "SELECT A, C WHERE B ="+num, | |
// This is the full URL of your sheet. Just copy and paste from your browser. | |
"url": "YOURURLHERE" | |
//Cache is false so that your browser does not run an old function when you cnange your code | |
}, { cache: false, expiry: 7200}, function(res) { |
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
//Blockspring APIs take in data as if it was from a spreadsheet. Needs nested arrays | |
//Like this: [[row1val1, row1val2],[row2val1, row2val2]...] | |
//Example from Blockspring site | |
var orig = "[[\"name\",\"random number\"],[\"Jason\",\"150\"],[\"Don\",\"250\"],[\"Paul\",\"50\"]]" | |
//Add values to sheet | |
blockspring.runParsed("append-to-google-spreadsheet", { | |
//middle parameter from Google Spreadhseet URL | |
//https://docs.google.com/spreadsheets/d/FILE_ID/edit?usp=sharing | |
"file_id": 'YOURIDHERE', |
OlderNewer