Posts

c# - task deadlock when invoking in worker threads -

i have windows form program (**vs 2010 .net 4 **) detecting recursively folders , sub folders of directory , optimizing files. tasking library , have progressbar shows progress of item , label near progressbar shows current file. have settext(string text) method , delegate (delegate void settextcallback(string text);) use purpose. when want show messagebox @ end of process think deadlock. when don't use task.wait(); in button6_click goes ok , ui won't hang. code: public partial class form1 : form { int maxfilecounter = 0; static int filecounter = 0; delegate void settextcallback(string text); delegate void setprogresscallback(int i); private void button6_click(object sender, eventargs e) { task task = task.factory.startnew(() => { editfiles(txtfilepath.text); }); task.wait(); messagebox.show("finished"); } private void editfiles(string directorypath) { try { //directoryinfo dirinfo = new directo...

c# - How to pass multi parameters in webservice from radcombobox in asp.net? -

how pass multiple parameters in webmethod radcombobox? use radocombobox use webservice. want pass 2 parameters webmethod. how do it? <telerik:radcombobox id="radcmbaccountlist" runat="server" cssclass="radctrlcombo h4" enableloadondemand="true" enablevirtualscrolling="true" loadingmessage="در حال دریافت اطلاعات.." width="128px" minfilterlength="1" skin="webblue"> <webservicesettings method="getaccountlist" path="~/services/webservice.asmx" > </webservicesettings> </telerik:radcombobox> [webmethod] public radcomboboxdata getaccountlist(radcomboboxcontext context, int accountid) {} i want pass accountid webmethod. the radcomboboxcontext object dictionary. need pass in single parameter context , in web method can access key/value pairs. set keys client-side whatever need: <script type="text/javascrip...

python - algebraic constraint to terminate ODE integration with scipy -

i'm using scipy 14.0 solve system of ordinary differential equations describing dynamics of gas bubble rising vertically (in z direction) in standing still fluid because of buoyancy forces. in particular, have equation expressing rising velocity u function of bubble radius r, i.e. u=dz/dt=f(r), , 1 expressing radius variation function of r , u, i.e. dr/dt=f(r,u). rest appearing in code below material properties. i'd implement account physical constraint on z which, obviously, limited liquid height h. consequently implemented sort of z<=h constraint in order stop integration in advance if needed: used set_solout in order so. situation code runs , gives results, set_solout not working @ (it seems z_constraint never called actually...). know why? there more clever idea, may in order interrupt when z=h (i.e. final value problem) ? right way/tool or should reformulate problem? thanks in advance emi from scipy.integrate import ode db0 = 0.001 # init bubble radius y0, ...

sql - Joining Multiple Tables - Oracle -

i'm studying multiple table joins week , have odd results being returned. here scenario... using correct tables, create query using traditional join operation list customer first , last name, book title, , order date (formatted mm/dd/yyyy alias of “order date”) customers have purchased books published 'printing us'. with database i'm querying against, correct tables query book_customer, books, book_order, , publisher. statement have written returns information need, returning 5900 records. don't see how can right. publisher, printing us, has 14 books listed in database , there 20 customer records, if every customer purchased every printing book, return 280 records total. yet can't figure out have wrong. statement listed below. select bc.firstname, bc.lastname, b.title, to_char(bo.orderdate, 'mm/dd/yyyy') "order date", p.publishername book_customer bc, books b, book_order bo, publisher p where(publishername = 'printing us'); ...

iOS storyboard: few buttons and one segue -

Image
in app first screen content few button (it password screen) , user must press few buttons , go next screen. how can create 1 segue button same behavior? or, must create 1 ibaction , programmaticaly call push method? thanks

segmentation fault - Java fatal error SIGSEGV -

i getting error message java compiler don't understand. i've tested code on osx 10.6, 10.9, , ubuntu 14.04, both java 6 , 7. when run eclipse debugger or interpreter (using -xint option), runs fine. otherwise, following messages: java 1.6: invalid memory access of location 0x8 rip=0x1024e9660 java 1.7: # # fatal error has been detected java runtime environment: # # sigsegv (0xb) @ pc=0x000000010f7a8262, pid=20344, tid=18179 # # jre version: java(tm) se runtime environment (7.0_60-b19) (build 1.7.0_60-b19) # java vm: java hotspot(tm) 64-bit server vm (24.60-b09 mixed mode bsd-amd64 compressed oops) # problematic frame: # v [libjvm.dylib+0x3a8262] phaseidealloop::idom_no_update(node*) const+0x12 # # failed write core dump. core dumps have been disabled. enable core dumping, try "ulimit -c unlimited" before starting java again # # if submit bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # there's more error output java 7 (...

PHP quiz code (radio buttons wont update global values) -

i making webpage ask 15 questions user. based off of answers these 15 questions webpage determine kind of element user bend (its reference avatar last airbender). i website first display description page ($currentpage = 0). when user clicks "next question" button $currentpage variable increase 1 , first question appear 4 radio buttons under possible answers. each answer corresponds element (air, earth, water, or fire). if user selects (one radio button only) score element increase 1. when user clicks "next question" button $currentpage variable increase 1 again , next question appear. @ end of 15 questions (total of 16 pages including description page) compare 4 score see value greatest determine element user bend. i have coded 1 question , description portions, can not seem increase $earthscore, $waterscore, $firescore, or $airscore 1 after selecting radio button corresponding answer , hitting next question. could guys please me out??? i dont have 10 re...