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
#include "vertex.h" | |
#include "graph.h" | |
#include "set.h" | |
using namespace std; | |
class base | |
{ | |
public: |
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 IteratorService_ = function(array){ | |
var newArray = array.slice(0); | |
Object.defineProperty(newArray, 'nextIndex', { value: 0, enumerable: false, writable:true }); | |
Object.defineProperty(newArray, 'next', { value: function(){if(this.nextIndex >= this.length){throw new Error("NoSuchElementException")}else{return this[this.nextIndex++]}}, enumerable: false }); | |
Object.defineProperty(newArray, 'hasNext', { value: function(){return (this.nextIndex < this.length)}, enumerable: false }); | |
return newArray; | |
} |
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 emailReminder() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var leases = ss.getSheetByName("Leases").getDataRange().getValues(); | |
var emails = ss.getSheetByName("Emails").getDataRange().getValues(); | |
var notificationWindows = {} | |
notificationWindows[addMonths(new Date(),6)] = makeNotifications(emails, "Six Months"); | |
notificationWindows[addMonths(new Date(),3)] = makeNotifications(emails, "Three Months"); | |
notificationWindows[addMonths(new Date(),1)] = makeNotifications(emails, "One Month"); |
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
application: YOURPROJECTID | |
version: 1 | |
runtime: python27 | |
api_version: 1 | |
threadsafe: yes | |
handlers: | |
- url: /(.+) | |
static_files: public/\1 | |
upload: public/(.*) |
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
{ | |
"hosting": { | |
"public": “.”, | |
"headers":[{ | |
"source":"**", | |
"headers":[{ | |
"key":"Access-Control-Allow-Origin", | |
"value":"*" | |
}] | |
}] |
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 exportSpreadsheet() { | |
//All requests must include id in the path and a format parameter | |
//https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export | |
//FORMATS WITH NO ADDITIONAL OPTIONS | |
//format=xlsx //excel | |
//format=ods //Open Document Spreadsheet | |
//format=zip //html zipped | |
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 localAuth = false; | |
var sProps = PropertiesService.getScriptProperties(); | |
function doGet() { | |
var driveService = getDriveService(); | |
if (!driveService.hasAccess()) { | |
return showAuth(); | |
} | |
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
/** | |
* Converts an XML string to a JSON object, using logic similar to the | |
* sunset method Xml.parse(). | |
* @param {string} xml The XML to parse. | |
* @returns {Object} The parsed XML. | |
*/ | |
function xmlToJson(xml) { | |
var doc = XmlService.parse(xml); | |
var result = {}; | |
var root = doc.getRootElement(); |