Posts

java - primefaces:row edit event not working when click on pencil icon -

i using jsf,primefaces , hibernate have fetch data database inside table when click in pencil icon not working , not error or exception generated , click compiler not going on our bean class have name 1 table , client name database table working facility name column when define 2 column not working my xhtml page <p:datatable id="allfacilitylist" var="facility" rendered="true" value="# {facilitybean.facilitylist}" paginator="true" rows="15" paginatorposition="top" styleclass="fixed-size" emptymessage="no facility insdie faclity list" style="width: 965px;" editable="true"> <p:ajax event="rowedit" immediate="true" listener="#{facilitybean.onedit}" update=":ftlistform"/> <p:column headertext="facility name" style="width:60%; alignment-adjust: midd...

networking - Send message alert to multiple computers on a network -

i have simple question. @ school today , had managed send message alert saying 'hello' every computer in library. took while messages go away, no-one rid of it. don't want did, interested in how did it. i'm studying computer science major @ school. linux_user:~$ echo "message" | wall

html - Javascript to automatically zoom in with a browser on load -

i have created java application 500x400 px iphones width greater 400px, after site loads need manually zoom application. there javascript automatically zoom window width of screen being displayed 400px, secondly there way disable scrolling :) thank much! check out css3 media queries. allow include stylesheets depending on browser's viewport's size. , disable scrolling u set scroll hidden. code disable scroll. $('html, body').css({ 'overflow': 'hidden', 'height': '100%' }) also using js u detect platform u r rendering application , use zoom zoom in accordingly. example mozilla : if ($.browser.mozilla){ var step = 0.02; currffzoom += step; $('body').css('moztransform','scale(' + currffzoom + ')'); } else { var step = 2; curriezoom += step; $('body').css('zoom', ' ' + curriez...

sprite kit - How do I use whiteColor in Swift and SpriteKit -

i'm running yosemite , xcode 6. created new project using "game" option, spritekit , swift. in override didmovetoview() in gamescene.swift added following line try change ground color: self.backgroundcolor = skcolor(whitecolor) this compiles won't run, stopping error "use of unresolved identifier 'whitecolor'" the import is: import spritekit do need import whitecolor defined (which assume constant in header file somewhere ? +[skcolor whitecolor] class method, usual, translate skcolor.whitecolor() self.backgroundcolor = skcolor.whitecolor()

c# - dropdownlist doesn't lost his selected value but listbox does -

i have 2 user control 1 has dropdownlist other listbox, on main page there button when click button page goes postback , user controls session add controls on page. , can selected items drop down list list box cant sync viewstate guess. what did try; binding session uc in page init, adding listbox datavalue , datatext, viewstate enable listbox(which default guess) if think logic right must doing wrong in code let me know try paste here in simplified version. here's code you're trying do, maybe you're not doing correct , can spot out. protected void page_load(object sender, eventargs e) { var newlistbox = new listbox(); newlistbox.id = "anewid"; newlistbox.items.add("1"); newlistbox.items.add("2"); newlistbox.selectedindexchanged += lstboxchanged; panel1.controls.add(newlistbox); } private void lstboxchanged(object sender, eventa...

How to click a link using jquery or javascript? -

i have link: <a href="#panel2-2">manage lists</a> i want "click" link using jquery or javascript. i've tried: $("#panel2-2").click(function(){}); $("#panel2-2").trigger('click'); it doesn't work! how can click using javascript? you need use jquery attribute equals selector . description : selects elements have specified attribute value equal value. for case, use this: $( "a[href='#panel2-2']" ).click();

python - Gridwise application of the bisection method -

i need find roots generalized state space. is, have discrete grid of dimensions grid=axbx(...)xx , of not know ex ante how many dimensions has (the solution should applicable grid.size ) . i want find roots ( f(z) = 0 ) every state z inside grid using bisection method . remainder contains f(z) , , know f'(z) < 0 . need increase z if remainder > 0 decrease z if remainder < 0 wlog, matrix history of shape (grid.shape, t) contains history of earlier values of z every point in grid , need increase z (since remainder > 0). need select zalternative inside history[z, :] "smallest of those, larger z ". in pseudo-code, is: zalternative = hist[z,:][hist[z,:] > z].min() i had asked earlier . solution given b = sort(history[..., :-1], axis=-1) mask = b > history[..., -1:] index = argmax(mask, axis=-1) indices = tuple([arange(j) j in b.shape[:-1]]) indices = meshgrid(*indices, indexing='ij', sparse=true) indices.append(index)...