delay

How to call a method after a delay

I want to be able to call the following method after a specified delay. In objective c there was something like: [self.performSelectorAfterDelay @selector(DoSomething) withObject:nil afterDelay:5]; Is there an equivalent of this method in java? For example I need to be able to call a method after 5 seconds. public void DoSomething()...

Shorten the touch delay in a UIScrollView?

I'm looking to shorten the touch delay on a UIScrollView, but I don't want to use setDelaysContentTouches:NO; I still want there to be a slight delay but my users are complaining about it being too long. Is there a way to do this? ...

PHP timer without script pause/delay

So I just want to write this quick and dirty module to a program that takes the current time, echos a string, and then waits x minutes and echos another string. The only thing is, is this little module stops the rest of the program until it's finished. Any way around this? ...

jQuery how to make delayed appending inside a loop?

Would like to append rows in a small period. Couldn't do that. :) Maybe someone here could demonstrate that? Would be very grateful. ...

Optimising simple animations with only a few frames

Hi there everyone. I've managed to set up a button which when pressed displays a thought bubble. The bubble appears first as a smaller bubble, then a slightly larger bubble, then finally the full sized bubble, all in quick succession. I've managed to do this just fine with the following code, I'm just wondering if this really is the best...

AsyncSocket Delay Sending Data

So I'm writing an application for my iphone that networks to my computer running a java application using AsyncSocket. But when I try sending data from my iPhone to the java application, the data only prints out when I exit the iPhone application. Why does this happen and how can I fix it? ...

jQuery: Fade in delay on Load

Hello I've stumpled on something queite nice, I've wanted to use in some upcoming project. It's an animated opacity on load, or you can call it fade in. I wondered if you could link some elements together (ex. 3) so element2 only starts when element 1 i finished, and element3 when no. 2 is? Or should you define som kind of delay on ...

background-image load or display delays even though cached in IE7

I have a seperator li which has a background image, in an expanded tree menu, it may appear several times using the css: .simpleTree .line { background:url("/images/Css/gridLine.gif") no-repeat 0 0; Even tho it is cached (from previous instances), there is still a slight delay in IE7 (~500 - 1sec) before all the background images ...

Easiest way to repeatedly call a custom function in Jquery while hovering?

I have a function called goRight() which does some stuff when I click a div called "goright". I want to make it so that when I hover over the div "goright" it will call the function repeatedly (with a small delay) for as long as I'm hovering, and then do nothing and stop once i move the mouse away. I have experimented with setInterval ...

Set delay with javascript / ajax

I want to make a delay when the result comes in the note. I have a form > input the user types his username in the input and I check with AJAX if the username is available or not. If yes a note shows up near the input with the result. Please no jQuery! ...

Objective c time delay

Here is my code so far: - (IBAction) startApproximiteLevel:(id)sender { [getBackgroundLevel startAnimation:self]; float sample1; float sample2; float sample3; float sample4; float sample5; float finalSample; float charlieSoundVolume = [charlieSoundLevel floatValue]; sample1 = charlieSoundVolume; sleep(1) sample2 = charlieSoundVolume; ...

Robot.delay(int) versus Thread.sleep(long)

I have a program whose only purpose is to drive a java.awt.Robot in an infinite loop until an exit condition is met. The robot performs a number of actions in quick succession, which require a standard UI delay between them. For this, I use java.awt.Robot.setAutoDelay(int ms), which appears to be designed for precisely this purpose. At...

Visual Studio 2010 - How to optimize

I am using the 2010 version of Visual Studio, but am having many problems with delays - my computer has a good configuration of RAM, and processor - especially when saving files. Currently I am carrying a medium-sized project, only one open file (ASP.NET page) using a single suite of components from third party, the Telerik. And yet, in...

jquery redirect on click or after 10 seconds

Hello, I have a spash screen on a website that has a div with the ID of "splash" i'm trying to make the div fade in then if the user clicks on the div it fades out and redircts to the main site. If the user dosen't click it just fades out and redirects after 10 seconds. The timed redirect is working but not the click function. ...

How does one stop a thread without a stop() method?

I have question about the Java threads. Here is my scenario: I have a thread calling a method that could take while. The thread keeps itself on that method until I get the result. If I send another request to that method in the same way, now there are two threads running (provided the first did not return the result yet). But I want t...

jQuery: using delay() and prepend()

In the following code the last line doesn't work in my way: $('button.goal').click(function () { $('div.scorer_away').animate({ width: 'hide', opacy: 'hide' }, 'slow') .delay(2500) .animate({ width: 'show', opacy: 'show' }, 'slow'); $('span.scorer_away').delay(3000).prepend('<img src="chofbauer.png" alt="" />'); How ca...

How to add Delay before calling next call back function in jquery

Hi guys, I am trying to make a javascript banner. I have 3 images inside a div with ids #img1, #img2 n #img3. <script src="scripts/jquery-latest.min.js" type="text/javascript"></script> <script> var AnimState = true; var AnimTime = 2000; var AnimDelay = 3000; $(document).ready( function() { $('#image img')...

can the execution of statements in Python be delayed?

I want it to run the first line print 1 then wait 1 second to run the second command print 2, etc. Pseudo-code: print 1 wait(1 seconds) print 2 wait(0.45 seconds) print 3 wait(3 seconds) print 4 ...

jQuery: delay() or timeout with stop() ??

hey guys, $('.file a').live('mouseenter', function() { $('#download').stop(true, true).fadeIn('fast'); }).live('mouseleave', function() { $('#download').stop(true, true).fadeOut('fast'); }); i want the mouseenter function to have a stop() and a DELAY of like a 1sec. So if i hover over #download the fadeIn should start 1second ...

Force WPF to render a window while hidden?

I've noticed that when I make a change to the visual presentation of a window while the window is hidden, the changes are not immediately visible when the window is shown. Rather, the window appears briefly in the state it was in when it was last-visible, taking 0.5-1 seconds to display the updated form. This can be confusing and ugly a...