Posts

Accessing DOM elements and composition lifecycle for non-viewModels in Aurelia -

i have application closely tied dom. need keep track of size , position of elements represent objects behind them. myviewmodel.js export class myviewmodel { // root view model has important properties // other functions , objects need use constructor() { this.importantproperty = 'veryimportant'; this.things = []; } // create things in view model // represented in dom creatething() { this.things.push({ isathing: true }); } // things things in view model // depend on root view model dosomethingwiththing(thing, property) { thing[property] = `${this.importantproperty}${property}`; } // need know dom representation // of things in view model doanotherthingwiththing(thing) { console.log(`the height of thing ${thing.height}`); } lookandseewhatsizethisthingis(element, thing) { thing.height = element.clientheight; thing.width = el...

Cascading: Merge tuple if Join is unavailable -

here's issue: i have 2 tables id field match on. of them match, if don't, need merge record other table , make empty fields null. is kind of thing possible in cascading? thanks! you can use cogroup along left/right/outer join matches requirement.

javascript - Protractor + Safari non-secure form warning -

Image
os: os x el capitan node: v5.4.1 protractor: 3.3 safari: 9.0.3 i'm getting security warning popup in in test , wondering if there way around in fashion. popup security warning doesn't seem come on chrome , browser.switchto().alert(); doesn't seem work? this alert/security warning looks like apparently block mixed content , doesn't seem there option anymore change why mixed content blocked in safari i have tried press tab enter b/c works manually seems give error when use code browser.actions().sendkeys(protractor.key.tab).sendkeys(protractor.key.enter).perform(); failed: unknown command: {"id":"z4v9sab7uay","name":"sendkeystoactiveelement","parameters":{"value":[""]}} (warning: server did not provide stacktrace information)

ruby - FFmpeg extracts different number of frames when using -filter_complex together with the split filter -

i fiddling ffmpeg, extracting jpg pictures videos. splitting input stream 2 output stream -filter_complex, because process videos direct http link (scarce free space on vps), , don't want read through whole video twice (traffic quota scarce). furthermore need 2 series of pitcures, 1 applying filters (fps changing, scale, unsharp, crop, scale) , selecting them naked eye, , other series being untouched (expect fps changing, , cropping black borders), using them furter processing after selecting first series. call ffmpeg command ruby script, contains string interpolation / substitution in form #{}. working command line looked like: ffmpeg -y -fflags +genpts -loglevel verbose -i #{url} -filter_complex "[0:v]fps=fps=#{new_fps.round(5).to_s},split=2[in1][in2];[in1]crop=iw-#{crop[0]+crop[2]}:ih-#{crop[1]+crop[3]}:#{crop[0]}:#{crop[1]},scale=#{thumb_width}:-1:flags=lanczos,unsharp,lutyuv=y=gammaval(#{gammaval})[out1];[in2]crop=iw-#{crop[0]+crop[2]}:ih-#{crop[1]+crop[3]}:#{crop[0...

buildbot scheduler not working -

i have same problem discussed here buildbot scheduler not work , answer there may not apply -- possibly because i've got newer version of buildbot >buildbot --version buildbot version: 0.8.12 twisted version: 16.2.0 running on windows 7 64-bit. i'd svn commit trigger buildbot builders, instead, periodic scheduler (when enabled) triggers builders. log shows 2016-06-10 11:40:18-0700 [-] svnpoller: polling 2016-06-10 11:40:18-0700 [-] svnpoller: svnurl=file:///g:/buildbot/buildbot_repo/trunk/triggers_for_testing, root=file:///g:/buildbot/buildbot_repo, prefix=trunk/triggers_for_testing 2016-06-10 11:40:18-0700 [-] svnpoller: starting @ change 31 2016-06-10 11:40:18-0700 [-] svnpoller: _process_changes none .. 31 2016-06-10 11:40:18-0700 [-] svnpoller: finished polling none 2016-06-10 11:40:38-0700 [-] svnpoller: polling 2016-06-10 11:40:38-0700 [-] svnpoller: _process_changes 31 .. 32 2016-06-10 11:40:38-0700 [-] adding change revision 32 2016-06-10 11:40:38-0700 [-...

jsf 2 - primefaces datatable with checkboxes are processing selects when are marked -

i have 1 datatable multiple selection (checkboxes). every time checkboxes marked, executed select of datatable again. xhtml: <p:datatable id="dtusuarios" widgetvar="usuarios" value="#{configgruposusuariosmb.usuarios}" var="usuario" paginator="true" rows="10" paginatorposition="bottom" scrollable="true" scrollheight="82%" rowsperpagetemplate="5,10,15,30,50,100" paginatortemplate="{currentpagereport} {firstpagelink} {previouspagelink} {pagelinks} {nextpagelink} {lastpagelink} {rowsperpagedropdown}" emptymessage="#{i18n.datatablevazia}" lazy="true" currentpagereporttemplate="{currentpage}/{totalpages} #{i18n.paginas} - {startrecord} #{i18n.a} {endrecor...

Can't get if statement to compare two strings in javascript -

Image
in code when i equals 5 mydate should equal it. alert shows me same. can never function return 1; function checkforholiday(date) { var mydate = new date(date); mydate = mydate.getmonth() + "/" + mydate.getdate() + "/" + mydate.getfullyear(); alert(mydate + "\n" + holidays[5]); (i = 0; <= 9; i++) { if (mydate == holidays[i]) { return 1; alert("got it"); } } return 0; } this string in array looks like: year = 2013 holidays[5] = "7/2/" + year my alert shows me this: i have run code locally, , have working. i'm going guess issue stems fact date.getmonth() returns month numbers january === 0. throws lot of people off. to recreate code, used chrome's console. changed alert console.log save myself hassle of using alert . here's code: function checkforholiday(date) { var mydate = new date(date); mydate = mydate.getmonth() +...