Questions tagged [program-flow]
71 questions
0
votes
1 answer
program flow when ShowDialogue another window
consider the flowing scenario
chequeInfo = new Check();
Messenger.Default.Register(this, (a) => this.doSomething(a));
AddNewCheck j = new AddNewCheck();
_dialogService.showDialoge(j);
…

Musaab
- 805
- 2
- 13
- 30
0
votes
3 answers
How to track a flow of a c program?
I'ts more of a general question: how to handle the execution path of a c program, which consist of multiple functions?
For example, i have a following c program:
void test_if_statement(int num)
{
if (num > 0)
//do smth
;
…

hyono
- 1
0
votes
1 answer
Error while using a recursive function in Java
I'm trying to run the below recursive function. Here it is-
public static void Q3(int n) {
if (n <= 0)
return;
StdOut.println(n);
Q3(n-2);
Q3(n-3);
StdOut.println(n);
}
Can someone help me understand the flow of control…

Shreyash
- 81
- 1
- 10
0
votes
2 answers
What is actually happening in the code here
void reverse(Node head) {
if(head==null) return;
reverse(head.next);
System.out.print(head.data+" ");
}

Chiranjeet Sen
- 11
- 1
0
votes
1 answer
Strange program flow
I'm really puzzled by the following piece of code:
// Get the content text
String contentText = null;
Header contentEncodingHeader = m_httpEntity.getContentEncoding();
final String contentEncodingValue = contentEncodingHeader != null ?…

Mark Ingram
- 71,849
- 51
- 176
- 230
0
votes
1 answer
How can I create a UML graph by code and I can search characters in graph?
I want to create a program flow graph, but I don't want to draw it by Mouse. I can draw a simple graph by markdown or mermaid, but they are too simple.
For example:
this is generated by Typora Mermaid. All items are html.
But I want to modify…

VictorV
- 637
- 7
- 16
0
votes
2 answers
Trouble understanding Spring Boot code flow
I have a spring boot code like following which handles a particular mapping like following -
@RestController
@ResponseBody
public class SomeAPIController {
@RequestMapping(
value = "/some-api",
method =…

Polish
- 554
- 1
- 4
- 18
0
votes
0 answers
Why is my wait command being executed before my display update command?
I have some simple code here that is not behaving as I expected:
import pygame,sys
from pygame.locals import *
pygame.init()
window = pygame.display.set_mode((1300,700))
while True:
window.fill((0,0,0))
pygame.display.update()
#show…

Johnny Dollard
- 708
- 3
- 11
- 26
0
votes
3 answers
Return from method if other method succeeds with one line
I have trouble finding a fitting title for this question, so please forgive me.
Many methods in my class look like this:
def one_of_many():
# code to determine `somethings`
for something in somethings:
if…

balast
- 33
- 5
0
votes
2 answers
Method called within thread executes in unexpected order (C# .net)
seeking general help in understanding this program flow:
In a windows forms application why is it that when I call a method within a new thread that the thread doesn't wait for the method to complete before continuing execution?
Are methods called…

jWolf
- 153
- 1
- 1
- 6
0
votes
3 answers
What's the cleanest way to branch based on which conditional broke a while loop in Javascript?
Say I've got this loop
while(condition1 && condition2 && condition3 && condition4){
browseReddit();
}
if (!condition1){}
if (!condition2){}
if (!condition3){}
if (!condition4){}
It could be broken by any of the 4 conditions becoming false,…

Nathan
- 6,095
- 10
- 45
- 54
0
votes
1 answer
Using throws to control program flow?
The program communicates with user through class Menu, so the main() looks like this:
int main() {
try {
Menu menu(/*...*/);
while (true) {
menu.printOptions();
menu.chooseOption();
}
}
…

Stefan Stanković
- 628
- 2
- 6
- 17
0
votes
2 answers
Storing Python Program Execution Flow (Function call Flow)
I am developing a project in which I have to store all the function that were called in each request-response cycle and store them. I do not need to store values of the variable, all I need to store is function that we were called with their…

Aditya
- 352
- 1
- 12
0
votes
4 answers
During debugging my program jumps to nearest while statement without break or continue [C++]
When running my C++/Qt5 program under gdb I experienced what seems like an impossibility:
while(totalAvailable > (sizeof(quint32)+sizeof(quint16))){
if(nullptr!=c){
// POINT-A
qDebug()<

Mr. Developerdude
- 9,118
- 10
- 57
- 95
0
votes
2 answers
how control is reaching to entity class
I am going through one spring tutorial. http://websystique.com/spring-security/spring-security-4-remember-me-example-with-hibernate/
I am not able to understand the flow of control from UserDaoImpl.findBySSO to UserProfile... Could you please help…

jaison
- 83
- 2
- 8