Questions tagged [program-flow]
71 questions
0
votes
3 answers
list of all executions in Linux
Is it possible to find out all the programs getting executed in Linux. There will be many scripts and other executables getting launched and killed during the life time of a system and I would like to get a list of these (or a print while execuction…

user2148707
- 93
- 12
0
votes
2 answers
Wait for user interaction before finishing onCreate()
In my app I set everything up in onCreate and then, start an Async Task which sets about loading all of my resources etc... just after the Async Task starts, I add my splash screen to my layout. When everything has loaded, the splashscreen is…

Zippy
- 3,826
- 5
- 43
- 96
0
votes
2 answers
Setting object to null and program flow in Java
I'd like a little help understanding how setting an object to null works in java. I have a situation where, seemingly, at first glance it appears that an object that is set to null, is suddenly not null, but obviously this can't be the case.
I have…

Zippy
- 3,826
- 5
- 43
- 96
0
votes
1 answer
Deferring deferrements in Golang
I'm new to Go and I have to write an app which has to open lots of files at various points. The code to open each file would be
fl, err := os.Open(..)
check(err)
defer fl.Close()
where check simply calls panic if anything goes wrong.
Now, as I…

rath
- 3,655
- 1
- 40
- 53
0
votes
1 answer
PHP program flow for dynamically generated html inputs posting to DOMPDF
I am new to programming and have a control flow question. I am working with php and the DOMPDF library to generate PDFs.
I have a jQuery script that will dynamically generate input fields for an additional SET of inputs (up to 10 sets [20 inputs]).…

user2917239
- 898
- 3
- 12
- 27
0
votes
2 answers
How do I return to the top of the code?
When I Click on a button I use this class I made, so when it doesn't meet the requirements it shows a messagebox, but it just keeps going with the button, like it doesn't go back.
For example, I want the program to go back after one of these…

user3043427
- 37
- 6
0
votes
1 answer
How to make the mutex not be recursive
I ran the code below expecting flow to be locked on the 2nd time I lock a mutex. After running it twice I realize it can lock many times (assuming in the same thread) without stopping. How do I change this behavior?
using System;
using…
user34537
0
votes
2 answers
Python conversion calculator loop / code efficiency
The following is the (semi) finished version of a simple Mils to Degrees conversion calculator I built in Python 2.7 as a learning exercise. I am new to Python and still working out the kinks. The premise is, the user chooses to convert mils to…

Betastate
- 67
- 1
- 2
- 8
-1
votes
1 answer
Program lines are executing immediately before returning from function calls in python. Please explain program flow in event driven program
When the start timer is called by the button click, how is it that the lines following the count_down function call are executed immediately before the counter is completed and returned?
Also, if we double click the start button it behaves…

Mohan
- 11
- 4
-3
votes
2 answers
confirming program flow
can someone tell if the code below would work fine?
class CriticalSection{
int iProcessId, iCounter=0;
public static boolean[] freq = new boolean[Global.iParameter[2]];
int busy;
//constructors
CriticalSection(){}
CriticalSection(int iPid){
…

leba-lev
- 2,788
- 10
- 33
- 43
-6
votes
1 answer
The concise 'how many beers' issue?
Where I'm at
I'm trying to figure out how many beers I can buy with 10 RMB after recycling every bottle I get. It's obvious to me that I'm doing something wrong, procedurally, but it's not occurring to me what that is. I'm currently reading "How…

Wolfpack'08
- 3,982
- 11
- 46
- 78