I'm using the Node.JS driver for MongoDB, and I'd like to perform a synchronous query, like such:  function getAThing() {     var db = new mongo.Db("mydatabase", server, {});      db.open(function(err, db)     {         db.authentic...
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 cause...
I am facing a problem with Node.js (v0.12.7). I am writing an application that must be stopped somewhere and wait for a result from a query to database and then what it is doing.  And the problem is not as trivial as using async (series, etc ...). I...
I have an array of promises that I would like to call in parallel, but resolve synchronously.  I made this bit of code to do the required task, however, I needed to create my own object QueryablePromise to wrap the native Promise that I can synchrono...
I am looping over an array to update its values using returned value from called function which internally calls an asynchronous function.  I need to handle asynchronous function in synchronous way which is not being directly called. This is replicat...
I have a for loop which contains ajax request. The request is working aynchronously. So i can't reach the result of request in time. How can i solve this problem without using any library?  Thanks.      var availables = document.getElementsByClas...
I am currently working on a project with 3 friends using nodeJs, expressJs, MongoDB, html5,... Since we're fairly new to these technologies we bumped into some problems. A big problem that I can't find a solution for is the asynchronous execu...
If I want to have synchronous and asynchronous functions execute in a particular order I could use jQuery promise but it doesn't seem to work the way I'd expect it to work.  Functions a,b and c should execute in that order when in a the defer...
I have a node application that is not a web application - it completes a series of asynchronous tasks before returning 1. Immediately before returning, the results of the program are printed to the console.  How do I make sure all the asynchronous wo...
Currently, I'm working to replace "alert'/"confirm" with the jquery dialog.  But most of legacy codes is written in some asynchronous way, which make it difficult to change. Is there any way to make jquery dialog work in a synchro...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.