Questions tagged [delayed-execution]

Delaying the execution of a program or a procedure by a given amount of time, or until the results are explicitly requested.

Delaying the execution of a program or a procedure by a given amount of time, or until the results are explicitly requested.

279 questions
3
votes
4 answers

Is LINQ faster or just more convenient?

Which of theses scenarios would be faster? Scenario 1: foreach (var file in directory.GetFiles()) { if (file.Extension.ToLower() != ".txt" && file.Extension.ToLower() != ".bin") continue; // Do something cool. } Scenario…
Jordan
  • 9,642
  • 10
  • 71
  • 141
3
votes
2 answers

How to delay within a single method while not delaying the whole program in java?

I am writing a snake program in java that paints a series of rectangles. I don't understand how to delay my direction changes for blocks in order so that the snake rectangles change direction all at the same spot that the arrow key was hit. I need…
katelyn e
  • 31
  • 4
3
votes
3 answers

Need a mix of Delayed and Map

I have an application without a save button; saving happens automatically in the background. As the user works with the app, tasks are created and put into a queue for execution. Some of them are delayed, for example, when you start typing, I wait…
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
3
votes
4 answers

Adding Delay In A For Loop Without Blocking UI

In my UI, when a button is tapped, it calls a for loop that executes several tasks sequentially. // For Loop for (int i = 1; i <= 3; i++) { // Perform Task[i] } // Results: // Task 1 // Task 2 // Task 3 After each task, I would like add a…
Oak
  • 165
  • 2
  • 14
3
votes
2 answers

Delayed jobs node.js web app

I'm looking for a solution to set up delayed jobs in node.js web app. My first idea was to use RabbitMQ - Dead Letter Exchanges and Per-Message Time-To-Live. By marking messages as persistent we can get a guarantee that a message won't be lost. A…
enzo
  • 287
  • 5
  • 12
3
votes
0 answers

Non-standard evaluation of expressions in S4 context

This is borrowed from shiny's function exprToFunction which is used in their reactive function. Actual question How can I delay the evaluation of an expression (e.g. specified via arg expr) in order to "capture" its content when calling a S4 method…
Rappster
  • 12,762
  • 7
  • 71
  • 120
3
votes
1 answer

delay in animation after several calls using jquery.animate

I am trying to show overlay all over the page after click on div by calling function that implements jquery.animate in a click event what is happening after several click say like 4 or 5 tries I begin to note there is a delay between clicking the…
Muhammad Nour
  • 2,109
  • 2
  • 17
  • 24
3
votes
3 answers

Define timeouts between steps of jQuery.each() loop

As far as I know, $.each() is a synchronous function, so I think, somehow it has to be possible - with some sort of technique - to delay the steps of the looping through the array. I didn't find a proper way yet. How could I set timeouts for it's…
István Pálinkás
  • 2,217
  • 7
  • 25
  • 50
3
votes
7 answers

How to add .delay to .click on .each iteration (jquery)

So, I want to put delay on this JavaScript code. $(function(){ $('.clickThis').each(function(){ $(this).click(); }); }); I tried this $(function(){ $('.clickThis').each(function(){ $(this).click().delay(5000); …
user2054689
  • 25
  • 1
  • 3
3
votes
1 answer

Delayed Function Call

What's the most elegant way of performing a delayed (and therefore also asynchronous) functional call using C++11, lambdas and async? Suggested naming: delayed_async. Reason for asking is that I want a GUI alert light to be switched off after given…
Nordlöw
  • 11,838
  • 10
  • 52
  • 99
2
votes
1 answer

Is there a delay between when an element style is updated in the code and updated visually? (JS)

I am new to JavaScript. Context: I created a bookmarklet (a browser bookmark that executes JavaScript instead of opening a webpage) that creates a "mousedown" event listener. When the listener is called it determines what element is under the mouse…
2
votes
1 answer

How to check if an iframe is fully loaded?

I have a JSP file in which I am starting 2 applications. The first application is starting through an