Questions tagged [pausing-execution]

61 questions
2
votes
2 answers

Synchronous Sleep function in Javascript

I want to simulate a progress bar using JS/JQuery, this is my HTML code :

0%

I want to go from 0 to 100 and see -Visually- the progress in slow motion, So What I need exactly is a For Loop and a pause function, but…
TheByeByeMan
  • 1,396
  • 2
  • 28
  • 50
2
votes
1 answer

Is it possible to pause a python script till file is not in use?

I have a python script which updates some values in a file. This script may be used by more than 1 users, which means that file will be updated by multiple users. But 2 users shouldn't update the file at the same time. If a user is updating the…
alwbtc
  • 28,057
  • 62
  • 134
  • 188
1
vote
1 answer

C# elevator system, pausing

Making a simple elevator system in c#, got it working for when yuo select a floor by typing in a floor number, the lift then goes to this floor. The next stage is to select a floor using a button. The problem is when the lift gets to the floor that…
1
vote
2 answers

Game paused but the paddles in game still moving

Recently I made a Pong game with the turtle module and I'm using this method to pause the game: # Pause function game_pause = False def pause_game(): global game_pause if game_pause: game_pause = False else: game_pause =…
1
vote
1 answer

Android studio, wait for one line of code to complete before starting next

Beginner question... I have the following 4 lines of code. The third line asks the user (with speech) whether he / she is certain about an action. Then the fourth line calls a method called speechYesNo (included below) to listen for the users…
Jon
  • 55
  • 2
  • 15
1
vote
0 answers

Matlab uigetdir function fails unless I pause execution

I've built an image browser with this structure (pseudocode) function myBrowser() loadFirstImage(); uiwait; function handleKeyPress(~,event) if ~(isempty(event.Character)) if(strcmp(event.Key,…
Carlos Borau
  • 1,433
  • 1
  • 24
  • 34
1
vote
1 answer

Findout how long a job has been running in Quartz

I am writing a kind of start - pause - resume - pause - resume -(at regular intervals) kind of job in Quartz. I am using a SimpleTrigger for initial experimentation. I would like to how I can find the time a job has been running. I looked at the…
Abhishek
  • 6,862
  • 22
  • 62
  • 79
1
vote
1 answer

A valid loop for pausing a program after it ends

I'm a novice programmer and have been learning C++ recently, after some research in how to pause my program at the end I upgraded from system.get(); to a cin.ignore(); cin.get(); combo. Would I be better suited to writing an if loop to wait…
1
vote
2 answers

Pausing Service during alarm, resuming it afterwards

So I have a Service that I want to be able to listen for Alarms and temporarily shut itself down/pause whilst the alarm rings, and then resume itself afterwards. What my Service does is that it inflates a view using WindowManager on top of the…
Nyfiken Gul
  • 654
  • 4
  • 20
1
vote
1 answer

R: I fail to pause my code

I am trying to pause my code for a little while, time for me to observe the plots. I tried: print('A') something = readline("Press Enter") print('B') print('C') , then there is no pause, the line print('B') is fed to readline and get stored into…
Remi.b
  • 17,389
  • 28
  • 87
  • 168
1
vote
1 answer

SceneKit – Entering in inactive mode causes "SCNAction" glitch

Im currently working on a SceneKit app and I've recently ran into a problem while testing it on my iPhone 5s. I write the code below to have a block move left and right repeatedly, everything works fine. SCNAction *mn1 = [SCNAction moveByX:-2.2 y:0…
nick
  • 101
  • 10
1
vote
2 answers

BASH: Pause and resume a child script

I want to control a child script somehow. I am making a master script which spawns many children scripts and need to RESUME and PAUSE them on demand. Child Do stuff PAUSE Cleanup Parent sleep 10 RESUME child Is this possible? AS PER…
Pithikos
  • 18,827
  • 15
  • 113
  • 136
1
vote
0 answers

Pausing JavaFX task crashes App

I am a novice on JavaFX. Recently I was trying to modify the code by jewelsea found on this link : https://gist.github.com/jewelsea/4989970#file-promptingtaskdemo-java-L87 On the code above, the program pauses a FutureTask with a…
user1420482
  • 147
  • 3
  • 12
1
vote
1 answer

Pause a CCNode for a while time

I want to Pause a CCNode for a while and after that resume it again. when I use below code separately they work but when I want to resume this CCNode for a specific time when a button clicked it dose't work and occur an Assertion failed(that is: …
HRZ
  • 98
  • 7
1
vote
1 answer

Skrollr: How do I pause sections?

Can someone please explain the data attributes to create pausing in scenes using the Skrollr.js? I want to create a small animation but not really sure how to achieve it. Does the plugin just wait for you to finish an animation before it can scroll…