Questions tagged [asynccallback]

A callback is a piece of executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time. An asynchronous or deferred callback is invoked after a function returns, or at least on another thread’s stack.

A callback is a piece of executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time. An asynchronous or deferred callback is invoked after a function returns, or at least on another thread’s stack.

More Info

457 questions
0
votes
1 answer

ActiveX in AsyncCallback

On developing a websocket server I initiate the listener as following: private void StartAccept() { _listener.BeginAcceptTcpClient(new AsyncCallback(HandleAsyncConnection), null); } for having it non-blocking to be able to accept multiple…
Andreas Hinderberger
  • 1,505
  • 23
  • 41
0
votes
1 answer

Callback when entity returns data

How to call callback when Device returns data and pass this to the callback method. Controller (function() { 'use strict'; angular .module('frontendApp') .controller('DeviceController', DeviceController); …
San
  • 341
  • 8
  • 22
0
votes
1 answer

web2py: how to detect when an LOAD component has loaded via ajax?

I'm injecting a component into my web2py page using {{=LOAD(...)}} as described at http://web2py.com/books/default/chapter/29/12/components-and-plugins#LOAD, but I need to fire off some javascript once the component is loaded. Normally if something…
user2667066
  • 1,867
  • 2
  • 19
  • 30
0
votes
0 answers

Synchronous monk mongodb query in nodejs

I am working with monk mongodb query in my nodejs application, when I execute the query I get the response asynchronously in a callback mechanism. I want to wait for the query to execute and use the result. The code var mycoll =…
Rahul Chawla
  • 190
  • 1
  • 3
  • 14
0
votes
1 answer

Javascript function (asynchronous) works in Mozilla FF but not in Chrome?

I've been struggling to develop some code which uses an asynchronous function in javascript. The code all works fine in Mozilla, but Chrome console.log shows nothing...and no errors are logged. The code processes an image object array, and uses an…
0
votes
1 answer

how to use callback or observable in angular2?

I have work in angular2 project. but, one problem in our auth guard code. I think script is not waiting result for callable function. then result variable console in "undefined". Please show this console image. So, please help me. 1)…
0
votes
0 answers

Javascript variable value in a callback are getting reset in closure

I am experiencing a very strange behavior in some part of a ES5 JavaScript module that I am trying to refactor. As I know in JavaScript, when an async callback uses a variable present into parent function scope(The scope in which the callback was…
0
votes
1 answer

How to callback jquery after load full web use append

Please help me, i have a code add product, i have use ckeditor but after i want add new a textarea use ckeditor, and to solve the problem. i have use a append. when i am click button use function append then it dont load jquery. i dont know how to…
0
votes
2 answers

Printing response to AJAX call

I am trying to query an endpoint on my server via an AJAX call The server code: @app.route('/predict') def predict(): return 'predict' All I want to do is print "predict" in the console. $.get({ url: "http://url.com/predict", success:…
Morgan Allen
  • 3,291
  • 8
  • 62
  • 86
0
votes
1 answer

How to handle successive https request in node JS?

I'm trying to build a slack app and to configure it properly I need to do successive Https get request. I use callbacks methods to handle it, the first one calls the second one without any problem but then the third one never starts, and my program…
ghosteins
  • 23
  • 3
0
votes
1 answer

Understanding Call backs

I create a small script to understand callback better. From the below script, the behavior I expected was: "http.get runs and takes on average 200 ms. The for loop "i" increment takes on average 2500 ms. At 200 ms, the process should exit and the…
0
votes
3 answers

How can I add a callback to a function with multiple async calls in JavaScript?

function jsoncall(){ $.getJSON("http://localhost:3000/data", function (data) {...}); $.getJSON("http://localhost:3000/data", function (data) {...}); } jsoncall.callback(function(){ //do stuff }); Something like the pseudocode above. Is…
Joel De La Cruz
  • 647
  • 1
  • 6
  • 20
0
votes
2 answers

Node for-loop callback required

I want to change the Tags format which I am fetching form one of the collections. Tags data contains some KC ids in an array which I am using to get KC data and insert in TagUnit to get final response format. var newTags = Tags.map(function(TagUnit)…
Rusty
  • 1,086
  • 2
  • 13
  • 27
0
votes
2 answers

Call async method with callback from sync UI thread

Im really stuck here... I have a XAML Page UI and want to call an async function everytime the user interacts with the UI. I use SignalR for networking: public static class ProtocolClient { private static HubConnection hubConnection; private…
pythonimus
  • 293
  • 4
  • 15
0
votes
1 answer

Whats the Best Practice to call a method out of a Callback-Response?

I'm using an asyncronus XML-RPC-Client (https://github.com/gturri/aXMLRPC) in my Project and wrote some methods using the asyncronous Callback-Methods of this Client like this this: public void xmlRpcMethod(final Object callbackSync) { …
bartolja
  • 487
  • 1
  • 4
  • 13