synchronous

How to call web service using vbscript (synchronous)?

落花浮王杯 提交于 2019-11-30 13:50:34
Actually there many examples and I have used one of them. But it works asynchronous, I mean it is not waiting the function that I called to finish. function ProcessSend() Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP.4.0") Set oXMLDoc = CreateObject("MSXML2.DOMDocument") oXMLHTTP.onreadystatechange = getRef("HandleStateChange") strEnvelope = "callNo="&callNo&"&exp="&exp call oXMLHTTP.open("POST","http://localhost:11883/ServiceCall.asmx/"&posFirm,true) call oXMLHTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded") call oXMLHTTP.send(strEnvelope) end function Sub

Starting a process synchronously, and “streaming” the output

瘦欲@ 提交于 2019-11-30 12:17:45
I'm looking at trying to start a process from F#, wait till it's finished, but also read it's output progressively. Is this the right/best way to do it? (In my case I'm trying to execute git commands, but that is tangential to the question) let gitexecute (logger:string->unit) cmd = let procStartInfo = new ProcessStartInfo(@"C:\Program Files\Git\bin\git.exe", cmd) // Redirect to the Process.StandardOutput StreamReader. procStartInfo.RedirectStandardOutput <- true procStartInfo.UseShellExecute <- false; // Do not create the black window. procStartInfo.CreateNoWindow <- true; // Create a process

How to make an asynchronous Dart call synchronous?

Deadly 提交于 2019-11-30 09:12:13
I'm on the way to evaluate Dart for a German company by porting various Java programs to Dart and compare and analyze the results. In the browser Dart wins hands down. For server software performance seemed to be a serious isssue (see this question of me ) but that got mostly defused. Now I'm in the area of porting some "simple" command-line tools where I did not expect any serious problems at all but there is at least one. Some of the tools do make HTTP requests to collect some data and the stand-alone Dart virtual machine only supports them in an asynchronous fashion. Looking through all I

Netty synchronous client with asynchronous callers

心已入冬 提交于 2019-11-30 07:42:38
问题 I am creating a server which consumes commands from numerous sources such as JMS, SNMP, HTTP etc. These are all asynchronous and are working fine. The server maintains a single connection to a single item of legacy hardware which has a request/reply architecture with a custom TCP protocol. Ideally I would like a single command like this blocking type method public Response issueCommandToLegacyHardware(Command command) or this asynchronous type method public Future<Response>

jquery synchronous functions

大憨熊 提交于 2019-11-30 05:48:48
问题 Is there a way to run a function after another functions completes? For example: doSomething(); doSomethingElse(); i only want doSomethingElse() to run after doSomething completes. is this possible? 回答1: If your doSomething() function is doing something asynchronously (such as making an Ajax request) then you'll want to make doSomethingElse() the callback for that asynchronous request, rather than having it execute immediately after doSomething() returns. 回答2: Actually you can do what you

Waiting for completion block to complete in an AFNetworking request

假如想象 提交于 2019-11-30 05:34:47
I am making a JSON request with AFNetworking and then call [operation waitUntilFinished] to wait on the operation and the success or failure blocks. But, it seems to fall right though - in terms of the log messages, I get "0", "3", "1" instead of "0", "1", "3" NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://google.com"]]; AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url]; httpClient.parameterEncoding = AFFormURLParameterEncoding; NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:@"query", @"q", nil]; NSMutableURLRequest *request =

How to cleanly get user input from the middle of model's method in Model-View-Viewmodel architecture?

天大地大妈咪最大 提交于 2019-11-30 04:48:08
问题 I am writing an app that listens on a network connection, and when some data arrive, it replies back, and depending on incoming data, it may need to ask user (show dialog) before replying back. I don't know how to do this cleanly in M-V-VM architecture: the events and binding to observable collections are nice if I need to just update GUI based on incoming data, but what if I actually need an anwer from user before replying back? And to make things worse, I want to do it synchronously,

AngularJS promise in app.run() [duplicate]

时间秒杀一切 提交于 2019-11-30 04:16:50
问题 This question already has answers here : AngularJS : Initialize service with asynchronous data (10 answers) Closed 2 years ago . I'm working on angularJs and typescript project. I have to make synchronous http call and get some data from server before I launch my client app and load UI. I search on internet and see everybody speak about promise, huumm okay why not. So I use promise (make $http call and use $q to return promise) in my app.run(). Maybe I'm missing nothing because this is not

Nodejs Synchronous For each loop

空扰寡人 提交于 2019-11-30 03:35:48
I want to do a for each loop but have it run synchronously. Each iteration of the loop will do an http.get call and that will return json for it to insert the values into a database. The problem is that the for loop runs asynchronously and that causes all of the http.gets to all run at once and my database doesn't end up inserting all of the data.I am using async-foreach to try to do what I want it to do, but I don't have to use it if I can do it the right way. mCardImport = require('m_cardImport.js'); var http = require('http'); app.get('/path/hi', function(req, res) { mCardImport.getList

NSURLConnection synchronous request on https

这一生的挚爱 提交于 2019-11-29 23:35:17
Can anyone tell me the way how I can make a synchronous call to the https server? I am able to do asynchronous request on https server using following delegate methods. - (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace and - (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge but I need to do synchronous. //Encoding the request NSData *postData = [xmlText dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; **//Calculating length of