delayed

C# delayed function calls

Is there a nice simple method of delaying a function call whilst letting the thread continue executing? e.g. public void foo() { // Do stuff! // Delayed call to bar() after x number of ms // Do more Stuff } public void bar() { // Only execute once foo has finished } Im aware that this can be achieved by using a tim...

(MS-DOS) Time Delays

I came past a few ways to cause a time delay such as pings and dirs. Though none of them are really precise, is there anny proper way to cause a time delay? I heard about a few things though they don't work on all computers, not on my Windows XP nor the Windows NT at college. It takes ages going through all files on Google finding a go...

How to stop sending email in php?

I have a list of email addresses, which I tested that they are invalid, not exists. But my mail server still keep trying to send email to them. Is there any way to stop sending email to the non-exists, invalid email addresses? I am using php though.. ...

POST response taking too long

Hello. Client side Ajax Javascript code is using XMLHttpRequest to send a POST request, but I'm getting like a 0.5 second delay in getting the response and I'm trying to find out why, since I'd like it to be faster, more like 0.2 seconds. Both endpoints are in the same intranet, the client directly connected via ethernet and the server...

INSERT LOW_PRIORITY or INSERT DELAYED in Hibernate

Hi guys, How do I do a low_priority or delayed insert into a MySQL table with Hibernate? In my logging routine I want to insert the log info to a table in my database for further analysis. But I don't care about how long it takes for the insert to be done, so usually I would say INSERT LOW_PRIORITY INTO LogEntry (level, title, full) VA...

DirectShow Capture with delayed play

I'm developing a custom video capture application. The idea is to capture output from a webcam, and simultaneously display a delayed preview. For instance if a user specifies a delay of 5 minutes, after 5 minutes of video capture the video preview will star playing what was captured 5 minutes ago, and will keep playing until five minu...

Rails: using "content_for" after the corresponding "yield" inside layout

Hi everybody, I think this has been asked before but even though I searched Google I haven't come up with a solution. So this is what I'm trying to do in Rails 2.3.5: layouts/application.html.erb: <html> <head> ... some other stuff <%= yield :head %> </head> <body> <% content_for :head, "something that belongs in the...

Drupal Ajax data retrieval delayed

I have a simple click function with the code below, but I can't seem to get the data on the first click. $.ajax({ type: 'POST', url: 'test/get/1', success: function (result) { testit = result; }, dataType: 'json', data: 'js=1' }); alert(testit); In my callback function I simply have return drupal_json('hello'); but it doe...

Idiomatic jQuery delayed event (only after a short pause in typing)?

Here is some jQuery for a search box that I expect is actually an antipattern, and am sure there is a much better solution for that I would love to be pointed towards: I will describe it in comments then just give the code, since the comments may be more clear and simple than the code: // set up a function call on keypress. // functio...

Delay rendering of a custom control in WPF

I have a WPF custom control that sometimes takes a while to render in some complex scenarios. I would like to be able to tell my custom control to show a placeholder image (e.g. "Please wait - rendering!") and then actually render the control in idle time (after input is processed). I am thinking along the lines of having my custom cont...

display data after every 10 seconds in Android

I have to display some data after every 10 seconds. Can anyone tell me how to do that? ...

Confusion about delayed_job startup.

I have script with that i can install everything on server. I don't need to monitor my jobs. Is it a proper way if i will add this two lines on my that script to start delayed_job server on my production server. chmod a+x script/delayed_job RAILS_ENV=production script/delayed_job start Because we have a product and we can't monitor it...

Custom jQuery Delayed Callback

I am playing with extending jQuery with a function that has two params: a callback function and a timeout. I'm on pre 1.4 so I don't have the .delay() built-in, but even that isn't really what I want. I've started out with the below, but am unclear as to 1 why is the callback function undefined inside the setTimeout, and 2 how should ...

How to return the result of dialog window work in the moment of its closing?

Everyone knows the MessageBox.Show() method, that returns DialogResult value after dialog closed. How can I implement such a method in my dialog class? class MyDialog : Form { public static MyDialogResult Show() {}; } The problem, as you can guess, is that the method returns a value only after user clicks some button in the dialog. ...

Poor FTP Performance due to delayed Ack : Solutions exist for Android?

Hello, i have a Problem using FTP connection on Android 2.2 devices. My app uses AndFTP via intent and loads data from a FTP Server connected via Wifi to the handset. The FTP downloadspeed is only 7kByte/s. I had the same speed on my Windows XP Notebook, then i changed the delayed acknowledge setting. So now my Notebook reaches 30...

Binding evaluation after UI is visible.

Hi All, Here is my scenario. I have usercontrol, uc1. In uc1 i have listbox on which ItemTemplateSelector is defined and it is pointing to different DataTemplates having other usercontrols eg. uc2, uc3 etc... Items in listbox are getting updated when UI is visible. I mean, I can see for eg. in a list box item first arrow comes up, th...