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
8
votes
5 answers

Inject external javascript file in html body after page load

I want to load an external javascript after page is loaded. Actually the javascript contains source for an ad and its making page load slow. All I want is to delay loading & execution of ads to make sure fast page load. thanks, Bilal
Tepu
  • 1,602
  • 2
  • 20
  • 28
8
votes
1 answer

How can I make sure my LINQ queries execute when called in my DAL, not in a delayed fashion?

I have a DAL that is composed of a bunch of methods that perform LINQ queries on my database. How do I ensure that before returning say an IEnumberable or something similar from the database, I ensure that the LINQ query is execute then, not in some…
KingNestor
  • 65,976
  • 51
  • 121
  • 152
7
votes
4 answers

Delaying execution of PHP script

What is the best way to stop bots, malicious users, etc. from executing php scripts too fast? Is it ok if I use the usleep() or sleep() functions to simply do "nothing" for a while (just before the desired code executes), or is that plain stupid and…
Mussnoon
  • 892
  • 3
  • 10
  • 18
7
votes
1 answer

delaying excel calculations during interop C#

I have to input several hundred cells into an excel sheet from a C# program. Each time I set a cell or a range, excel slowly responds... presumably updating various outputs between each input I add. Is there a way to disable calculations from my…
tbischel
  • 6,337
  • 11
  • 51
  • 73
6
votes
2 answers

Linux Kernel: udelay() returns too early?

I have a driver which requires microsecond delays. To create this delay, my driver is using the kernel's udelay function. Specifically, there is one call to udelay(90): iowrite32(data, addr + DATA_OFFSET); iowrite32(trig, addr +…
tan-ce
  • 61
  • 1
  • 4
6
votes
1 answer

Can I get a list of selectors delayed with performSelector:withObject:afterDelay:?

I would like to be able to cancel delayed selectors individually. I can do his with [NSObject cancelPreviousPerformRequestsWithTarget...] but need all the method parameters to do this. At the point where I want to cancel, I don't have them. Is there…
Steve Weller
  • 4,599
  • 4
  • 23
  • 30
6
votes
4 answers

How to avoid keydown delay with jQuery?

GOAL: When a user types character in a text box, make a button appear. When the user clears the text box using the backspace key but holds down that key for a few extra seconds, hide the button instantly. ISSUE: If a user types in a single…
brooklynsweb
  • 817
  • 3
  • 12
  • 26
6
votes
1 answer

Memoization during delayed evaluation

The book Structure and Interpretation of Computer Programs introduces a memoizing procedure as follows: (define (memo-proc proc) (let ((already-run? false) (result false)) (lambda () (if (not already-run?) (begin (set! result…
loudandclear
  • 2,306
  • 1
  • 17
  • 21
6
votes
3 answers

Ajax Heartbeat using setInterval, Preventing multiple calls at the same time

I wish to make an AJAX call using jQuery as a "heartbeat" in the background so that my web application can check for new data. For example every 10 seconds. I have seen on other posts that it is possible to use setInterval() to call a method which…
Luke
  • 22,826
  • 31
  • 110
  • 193
5
votes
2 answers

Can you perform a delayed set (:= in Mathematica) in Matlab?

So, I've recently converted from Mathematica to Matlab, and while Matlab has most of Mathematica's useful features, I can't figure out how to perform the equivalent of Mathematica's delayed set operation ':=' which assigns a variable a value in a…
zergylord
  • 4,368
  • 5
  • 38
  • 60
5
votes
3 answers

Delayed execution in Delphi

Is it possible to start procedure delayed after the calling procedure will end? procedure StartLoop; begin DoSomething; end; procedure FormCreate(...); begin if ParamStr(1)='start' then StartLoop; end; StartLoop will be called inside…
jsmith
  • 175
  • 1
  • 10
5
votes
3 answers

Delayed Queue implementation in Storm – Kafka, Cassandra, Redis or Beanstalk?

I have a storm topology to process messages from Kafka and make HTTP call / saves in Cassandra based on the task in hand. I process the messages as soon as they come. How ever few messages are not processed completely due to the response form…
5
votes
2 answers

execute function in C++ after a delay without using sleep

is there a simple way of making something happen after a specific delay in C++? In python, I just use frame.after(ms,myFunction) which is nice and easy - it seems like a far trickier problem in C++! It has previously been suggested that I use…
psychojim
  • 59
  • 1
  • 1
  • 4
5
votes
1 answer

Linq to Sql DB Object to Domain Object mapping and performance

I'm having a problem trying to make my LINQ to SQL queries and the mapping to my domain objects DRY without incurring the cost of multiple round trips to the db. Given this example: var query1 = from x in db.DBProducts select new…
tbehunin
  • 1,043
  • 1
  • 12
  • 24
5
votes
1 answer

PLINQ delayed execution

I'm trying to understand how parallelism might work using PLINQ, given delayed execution. Here is a simple example. string[] words = { "believe", "receipt", "relief", "field" }; bool result = words.AsParallel().Any(w => w.Contains("ei")); With…
tbischel
  • 6,337
  • 11
  • 51
  • 73
1
2
3
18 19