Posts

windows - how to stop a running script in Matlab -

this question has answer here: how abort running program in matlab? 1 answer i write long running script in matlab, e.g. tic; d = rand(5000); [a,b,c] = svd(d); toc; it seems running forever. becasue press f5 in editor window. cannot press c-break stop in matlab console. i want know how stop script. current use task manager kill matlab, silly. thanks. matlab says this- m-files run long time, or call built-ins or mex-files run long time, ctrl+c not stop execution. typically, happens on microsoft windows platforms rather unix[1] platforms. if experience problem, can matlab break execution including drawnow, pause, or getframe function in m-file, example, within large loop. note ctrl+c might less responsive if started matlab -nodesktop option. so don't think option exist. happens many matlab functions complex. either have wait or don't use the...

Identifying a PHP problem that doesn't prints a ERROR and the code isn't yours -

i've make website works , don't know right now. can run in virtual machine ubuntu, on company's server in debian, on wamp... can't working in server client. i think problem gets. form can't modify sended get, using next url: http://domain.com/sgap/dades_proj_edit.php?idedit=2011854&id=&projectname=afsdfasdf&comptitle=asasfdafsdafs&codarea=eciv&grauimp=1&codtipus=2&codsubtipus=6&subtipusdef=fdsaafasfddfs&codpais=8&clientid=2&promotor=asdfa&entfin=fsdafadsfds&impcontract=2&initdate=21%2f01%2f2011&findate=30%2f01%2f2011&uteflag=false&utepartic=&utepercent=0&descprelim=fdsadasdadfsadfs&codprojstatus=1&statusstamp=25%2f01%2f2011&cruserid=&action=update firefox shows blanc page no error. i've tried force show errors error_reporting(e_all) , ini_set("error_reporting", e_all) show if happens wait page showed 0 errors. i supposed $_get error , tried put on to...

c# - How to force an asp.net control to reload the postback data? -

what best practice force postback data , viewstate data re-loaded on code behind? the reason ask is, have 1 gridview generated dynamically , when structure generated postback data loaded , want forse asp.net reload postback data once have gridview structure generated. how can achieve this? thanks i don't think possibe, it's not necessary anyway. need build gridview structure @ earlier page event (eg oninit ).

ajax - need guidance for this asp.net mvc scenario -

i developing small asp.net mvc base application online test/exam. have scenario like, when user ask load test, getting list of question objects list in index action of controller. requirement user should not able see questions @ time, rather 1 one question should appear. have kept estimated time each question, showing sum of time of question @ right top corner user can see time limit. timer reduces each second. confuse how keep run timer commonly questions. , how can render 1 one question rather ones. since there no postback in asp.net mvc ,the implementation scenario quite difficult. please guide edited: * can ? * [httpget] public actionresult index(int? testid) { int id = convert.toint32(testid); list<question> questionlist;// = new list<question>(); questionlist = questionmanager.getquestionsbytestid(id); if (questionlist != null) { foreach (question q in questionlist) { return redirecttoaction("loadnextqu...

c++ - Reducing time complexity -

int main() { int n ; std::cin >> n; // or scanf ("%d", &n); int temp; if( n ==1 ) temp = 1; // if n 1 number power of 2 temp = 1 if( n % 2 != 0 && n!= 1) temp =0; // if n odd can't power of 2 else { (;n && n%2 == 0; n /= 2); if(n > 0 && n!= 1) temp = 0; // if loop breaks out because of second condition else temp = 1; } std::cout << temp; // or printf ("%d", temp); } the above code checks whether number power of two. worst case runtime complexity o(n). how optimize code reducing time complexity? try if( n && (n & (n-1)) == 0) temp = 1; check whether number power of 2 or not. for example : n = 16 ; 1 0 0 0 0 (n) & 0 1 1 1 1 (n - 1) _________ 0 0 0 0 0 (yes) a number power of 2 has 1 bit set. n & (n - 1) unsets rightmost set bit . running time o(1) ;-) as @gman noticed n needs unsigned integer. bitwise operation o...

xcode - How to use Mailcore framework in my IOS project? -

i have download mailcore iphone https://bitbucket.org/mronge/mailcore/downloads .i have try build shows error no architectures compile (only_active_arch=yes, active arch=armv6, valid_archs=i386) so can't add mailcore framework ios project .please me find solution from getting started documentation on project: iphone use mailcore has included iphone target, requires additional compiled binaries (openssl , cyrusssl). unable provide these, company remail offering binaries , compiled copy of mailcore iphone. contact remail more information: mailcore@remail.com it seems you'd need before building against iphone target.

iphone - After updating XCode i got error -

this type of error occur when install sdk 3.2.5 ios 4.2 , run older project... older project run in previous version of xcode... code sign error: identity 'iphone developer' doesn't match valid certificate/private key pair in default keychain go project on left(groups & files column), right click on , select info. go build tab , code signing. under code signing identity, make sure select correct development profile.