Posts

c# - Stereo Calibration and 3d Reconstruction -

the result of 3d reprojection function matrix has x,y,z of each pixel. let's take first element of matrix points[0] has: x= 414.580017 y= -85.03029 z= 10000.0 what unit here , can find pixel in image ? , why not x=0,y=0,z=10000.0! points = pointcollection.reprojectimageto3d(disparitymap, q);

struts2 - Creating two or more sitemesh decorators in struts 2 app? -

i creatig struts 2 application using sitemesh 2.4 plugin in want apply multiple decorator acording requested resource. decorators.xml <?xml version="1.0" encoding="utf-8"?> <decorators defaultdir="/decorators"> <decorator name="layout1" page="layout1.jsp"> <pattern>/first/*</pattern> </decorator> <decorator name="layout" page="layout.jsp"> <pattern>/second/*</pattern> </decorator> </decorators> i have created 2 different layout file named layout.jsp , layout1.jsp inside decorators directory , have create navigation file this <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %> <decorator:usepage id="thepage" /> <html> <head> </head> <body> <% string selection = thepage.getproperty("meta.selection"); %> <p> ...

javascript - How can I get the value from a series of textbox with same id -

i have series of textboxes same name <%for(i=0;i<=nooftasks;i++){%> <input type="text" id="duration" name="duration" class="td4" onkeyup="durationformat()"> }%> in javascript have add colon after 2 digits function durationformat() { var duration = document.getelementsbyname("duration").value; if(duration.length==2){ duration=duration+":"; } } but not desired result not string textbox of particular text box. any ideas? <input type="text" id="duration" name="duration" class="td4" onkeyup="durationformat(this)"> <script> function durationformat(obj) { if ((obj.value.length)== 2) { obj.value+=":"; } } </script>

css - CSS3 background-position issue with Safari only -

the following code renders in ie9, firefox, chrome, not in safari: .search-choice { position: relative; background-clip : padding-box; background-image: url('../design/icon_chosen_close.gif'); background-repeat: no-repeat; background-position: top 6px right 6px; } <ul class="chzn-choices"> <li class="search-choice" id="sellvb_chzn_c_0"> <span>multi1</span><a href=# class="search-choice-close" rel="0"></a> </li> </ul> safari doesn't seem take account background-position. have tried number of variants (like background-position-x: right 6px), nothing seems work. can't offset background image in safari starting top right corner. any ideas? lot time! found out safari marks following line invalid , background image won't displayed: background-position: top 15px right 0px; but when type only: background-position: top right; ...

Android Apps to asynchronously read some kind of buffer -

i assigned task research , implement 2 apps following: app writes content buffer/register of sort app terminates app b starts , reads buffer the apps not supposed run @ same time. first of don't know possibilities have. came following: write file write shared memory range are 2 options possible , have grant app b right access file or memory range? furthermore supposed check network sockets usage "buffer". know go against supposed done expected! trying use datagramsocket because can open kind of socket, send packets on it, close socket , terminate app. thought there system buffer holding packets until calls receive on datagramsocket same port. possible or system throw packets away when nobody receiving them immediately? there class in android api created allow sharing data between different applications - contentprovider . you should create contentprovider in charge of data (i recommend using sqlite database store data), , both apps can...

events - Handler on DOM elements in GWT -

i want add handler on buttonelement , have implemented follow. please me in resolving error in code. not want add handler directly on button widget. button button = new button("click"); element buttonelement = button.getelement(); event.seteventlistener(buttonelement, new eventlistener() { @override public void onbrowserevent(event event) { string string = event.gettype(); if(string.equalsignorecase("click")) { system.out.println("click"); } } }); event.sinkevents(buttonelement, event.onclick); your code correct, might added widget after sink event. have add widget before sink event. example: button button=new button("click"); element buttonelement = button.getelement(); rootpanel.get().add(button); event.sinkevents(buttonelement, event.onclick); event.seteventlist...

c# - TemplateBinding a GradientStop Offset -

i'm trying bind gradientstop offset in order display sort of progress bar inside ellipse. customcontrol button , if possible i'd keep way. of course there several dependency properties , offsetprogress 1 of them. is possible templatebind gradientstop offset? languages c# xaml wpf. here's code if thinks can useful: <ellipse stroke="black" strokethickness="1" stretch="uniform"> <ellipse.fill> <lineargradientbrush endpoint="1,0" startpoint="0,0"> <gradientstop color="{binding path=background.color, relativesource={relativesource mode=templatedparent}}" offset="{templatebinding offsetprogress}" /> <!-- not working --> <gradientstop color="#ffffffff" offset="0.5" /> </lineargradientbrush> </ellipse.fill> thank you!