This file contains hidden or 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 onOpen() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var menuEntries = [ {name: "Run Query", functionName: "runQuery"} ]; | |
ss.addMenu("HTTP Archive + BigQuery", menuEntries); | |
} | |
function runQuery() { | |
var projectNumber = 'httparchive'; | |
var sheet = SpreadsheetApp.getActiveSheet(); |
This file contains hidden or 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
/** | |
* quick and neat way to initialize a Map since Java 8 | |
*/ | |
Map<Integer, String> map = Collections.unmodifiableMap( | |
Stream.of( | |
new SimpleEntry<>(0, "zero"), | |
new SimpleEntry<>(1, "one"), | |
new SimpleEntry<>(2, "two"), | |
new SimpleEntry<>(3, "three") | |
).collect(Collectors.toMap( |
This file contains hidden or 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
Coffee coffee = Barista.makeCoffee( | |
new Arabica(), | |
Coffee::withMilk, | |
Coffee::withSprinkles); | |
System.out.println( | |
coffee.getIngredients() | |
+ ". Cost: "+ | |
coffee.getCost()); |