Posts

javascript - Google Sheets Script Error - Cannot convert Array to Object[][] -

i'm working on script encode data in fields insertion html (the cells contain words planétarium , rua joão bettega, 01 ). getting error , don't know it. error says "cannot convert array object[][]" i'm passing two-dim array .setvalues() , know that's not (found common problem). ideas? here's function: // columns[] , columns2encode[] set in scope above function function _encodedata() { var sheet = _getsheet(); var data = sheet.getdatarange().getvalues(); var rowcnt = data.length; var colcnt = data[0].length; var data2set = new array(rowcnt-1); // creates array w/ row.length indeces var colencodeindexlist = []; var origval, encodedval, range, cell; // used later in loop(s) toast('start encoding data'); // loop every row for(var ri = 0; ri < data.length; ri++) { if(ri !== 0) { data2set[ri] = new array(colcnt); // creates array w/ length of ~ 29 } // loop every cell (column entry in given row) fo...

angular - Different Sidemenu in ionic 2 app -

i have different side menus in ionic 2 app based on user login. when user logs in customer , want show side-menu customer functionalities. when user logs in admin, show different side-menu. i using ionic 2 sidemenu template any appreciated. you use *ngif on element inside sidebar display based on if user logged in admin. example: <div class="side-bar-admin" *ngif="admin'"></div>

c# - Formula conditional EPPlus -

i'm trying add file column conditional formula... cell stay blank or formula show string. i saw 2 possibilities, using _formatrangeaddress or each data of cell... file can have 150 000+ rows... var _formatrangeaddress = new exceladdress("c1:cxxxx,d1:dxxxx"); string _statement = "si(c2=d2;point(d2 c2);linestring(d2 c2,d3 c3)"; var _cond4 = worksheet.conditionalformatting.addexpression(_formatrangeaddress); _cond4.style.fill.patterntype = officeopenxml.style.excelfillstyle.solid; _cond4.formula = _statement; any ideas how can make formula works? thanks.

javascript - Undefined error when embedding SVG -

Image
i' using ajax call retrieve htm file builds svg . call returns file area it's suppose appear says: is timing issue? have ajax call in separate js file called after page loads. function buildmap(){ var lbmp = document.getelementbyid("lbmp-map"); if(lbmp != null){ $.ajax({ url:'../footer.htm', method: 'get', success: function(response){ lbmp.innerhtml = response.responsetext; }, failure: function(response){ lbmp.innerhtml = "<p>failure</p>"; } }); } } on success, ajax gives directly content, html in response , not in response.responsetext , that's why getting undefined message.

mysql - Query on my sql db -

i have 2 different query: select nazione, count(*) gold `summertotalmedal` medaglia = 'gold' , sport = 'athletics' group nazione order gold desc and select nazione, count(*) silver `summertotalmedal` medaglia = 'silver' , sport = 'athletics' group nazione order silver desc is there way join query such 2 different output on 2 different coloumns? you can use conditional aggregation same select nazione, sum(case when medaglia ='gold' , sport='athletics' 1 else 0 end) gold, sum(case when medaglia ='silver' , sport='athletics' 1 else 0 end) silver summertotalmedal group nazione

mercurial - How can I view the remaining changesets left to check in an hg bisect? -

when i'm running hg bisect, want "look ahead" @ what's remaining, see if there obvious culprits check while slow bisection test runs. so given i've run > hg bisect -g testing changeset 15802:446defa0e64a (8 changesets remaining, ~2 tests) how can view 8 changesets remaining? you can use bisect("untested") revset view untested changesets. e.g.: hg log -r 'bisect(untested)' if information, can combine template option: hg log -r 'bisect(untested)' -t '{rev}\n' or can restrict output first , last entry of range: hg log -r 'first(bisect(untested))+last(bisect(untested))' you can create revset aliases in .hg/hgrc or ~/.hgrc file save typing, e.g.: [revsetalias] tbt = bisect("untested") tbt2 = first(tbt)+last(tbt) then can (for example): hg log -r tbt note if call revset alias untested , you'll have quote string untested (e.g. bisect("untested") ), hence choice ...

php - Extract keyword that Word Pattern -

i have string. hi {$user_name} test msg {$user1,$user2,$user3} i want extract {$word} string. have tried use str_replace not working. short solution preg_mach_all function: $str = 'hi {$user_name} test msg {$user1,$user2,$user3}'; preg_match_all('/\s*(\{\$[^\{\}]+\})+\s*/iue', $str, $matches); echo "<pre>"; var_dump($matches[1]); // output: array(2) { [0]=> string(12) "{$user_name}" [1]=> string(22) "{$user1,$user2,$user3}" } http://php.net/manual/ru/function.preg-match-all.php