i have web app developed using google app script htmlservice , html form, populating excel sheet in google drive using spreadsheetapp . , 1 section calling contentservice download data excel file. function doget(e) { // read excel sheet //getappfile(); // render application html template return htmlservice.createtemplatefromfile('index').evaluate() .settitle('go smart') .setsandboxmode(htmlservice.sandboxmode.iframe); } function downloaddoublequatecsvfile() { var sheetid = propertiesservice.getscriptproperties().getproperty('sheetid'); var ss = spreadsheetapp.openbyid(sheetid).getactivesheet(); //var ss = spreadsheetapp.getactivespreadsheet().getactivesheet(); var maxcolumn = ss.getlastcolumn(); var maxrow = ss.getlastrow(); var data = ss.getrange(1, 1, maxrow, maxcolumn).getvalues(); if (data.length > 1) { var csv = ""; (var row = 0; row < data.length; row++) { (var c...
is there difference between this , var in invoced function expressions(iife)? (function(){ var foo = 0; this.bar = 0; })(); if code executed in global context, 2 options: you're in use strict mode, , in case this points nothing (null or undefined) , you'll see exception. you're not in use strict mode , this points window, in case you'll set bar global variable. var keeps variable local (same scope run in) , not exposed outside calls of iife.
from documentation of save.ffdf: using ‘save.ffdf’ automagically sets ‘finalizer’s of ‘ff’ vectors ‘"close"’. means data preserved on disk when object removed or r sessions closed. data can deleted either using ‘delete’ or removing directory object saved (‘dir’). i want starting small ffdf data frame, add bit new data @ time, , grow on disk. did little experiment: # in r ffiris = as.ffdf(iris) save.ffdf(ffiris, dir = "~/desktop/iris") # in bash ls ~/desktop/iris/ ## ffiris$petal.length.ff ffiris$petal.width.ff ffiris$sepal.length.ff ffiris$sepal.width.ff ffiris$species.ff # in r # add new column ffiris =transform(ffiris, new1 = rep(99, nrow(iris))) rm(ffiris) # in bash ls ~/desktop/iris/ ## ffiris$petal.length.ff ffiris$petal.width.ff ffiris$sepal.length.ff ffiris$sepal.width.ff ffiris$species.ff it turns out doesn't automatically update ff data on disk when remove ffiris. saving manually? # in r # add new column ffiris =tran...
Comments
Post a Comment