Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
-4 votes
3 answers
142 views

While practising nested loops in C, I wanted to understand how control flows between an outer loop and an inner loop. I understood that the inner loop runs for each iteration of the outer loop, but ...
xapet's user avatar
  • 49
4 votes
1 answer
51 views

Consider the following piece of code: (define p (make-parameter 'outer)) (reset (parameterize ([p 'inner]) (displayln (p)) ; prints 'inner (shift k (begin (displayln (p)) ; ...
Joseph Camacho's user avatar
0 votes
0 answers
55 views

I want to put two tensors into a map, and then get one tensor from the map. To ensure tf.tensorMapInsert is executed, I use tf.withControlDependencies - but it does not work. Here is my code: Operand&...
Mingxi's user avatar
  • 1
0 votes
1 answer
39 views

Let's say I have a list of users in my app, and I have to send a notification only to those who meet certain criteria, for example, a user should be in a specific country. I have 2 classes, ...
eugenedrvnk's user avatar
0 votes
3 answers
194 views

Is every line of code executed only once (when loops aren't used)? #include <stdio.h> int main() { int a = 1; // Variable 'a' is initialized to 1 printf("%d\n", a); // ...
SyefC's user avatar
  • 19
-3 votes
1 answer
266 views

I am learning about control flow graphs and came across this example. int binsearch(int x, int v[], int n) { int low, high, mid; // Line 1 low = 0; ...
Hi There's user avatar
2 votes
1 answer
95 views

I'm a beginner in assembly and I'm encountering unexpected behavior in my code. The code works as expected, printing numbers from contador variable to 1, but when I removed the unused variable loops (...
Felipe Teixeira's user avatar
-1 votes
1 answer
160 views

I am new to Pandas and trying to figure out how to create/use functions, perform simple if-else statements. I wrote the following function average_shares(), but it doesn't work as I expect (because it ...
friendly_girl's user avatar
3 votes
2 answers
1k views

I tried to migrate to control flow format in my Angular 18 projects in nx workspace. For most of the templates worked perfectly but for one html I'm getting the following error: [ngSwitch]: Error: ...
Alireza Ahmadi's user avatar
0 votes
0 answers
31 views

I'm working on some code that grabs some data from a website and then transforms it into a data object that will work for whatever machine learning library the user is using. I wanted to do some ...
Willow Unknown's user avatar
-1 votes
1 answer
47 views

I have a function that takes an integer and returns a string that is picked by a switch. The strings are part of a coherent text and I want to be able to add cases to the switch whenever I want to ...
user3808217's user avatar
-2 votes
1 answer
42 views

I'm looking for a more pythonic way to construct this check: good_result = None for item in items: result = process(item) if result.isGood(): good_result = result break if not ...
Ward's user avatar
  • 97
2 votes
2 answers
5k views

I migrated from the structural directives *ngIf and *ngFor to the new control flow with @if and @for in Angular. But there is one case that I used previously but I cannot seem to get it to work with ...
Wilt's user avatar
  • 44.9k
0 votes
0 answers
320 views

I migrated project to Angular 17.3.6. Also updated PhpStorm to 2024.1.1 and there is recent Angular plugin. I cannot get IDE to provide code completion in Angular templates. Also it doesn't recognize ...
Nebojsha's user avatar
  • 381
0 votes
4 answers
249 views

From my previous knowledge the (logical AND) has a higher precedence than the (logical OR), so for example in the following line of Java code boolExp2 will be compared with boolExp3 before comparing ...
Yazan AlAtout's user avatar
0 votes
0 answers
56 views

Looking for a way to retrieve control flow information, such as local variables and their values and which instructions/branches were executed for the tested methods using JaCoCo (0.8.11). I am ...
Arseni's user avatar
  • 11
2 votes
1 answer
114 views

When piping the output of a command to a ForEach-Object loop in PowerShell, using a continue statement causes it to error out. Works as expected: ipconfig | ForEach-Object { $_ } Errors: ipconfig |...
DeadChex's user avatar
  • 4,719
0 votes
1 answer
64 views

Why isn't this code directly storing the assembly instructions of func into the buffer? The value of the buffer is junk and doesn't change. #include <stdio.h> #include <stdlib.h> #...
Mohammed's user avatar
0 votes
1 answer
3k views

I am trying to build an indesign script that will produce a floating window that can display report results. I need to use this as a check-off "sheet" that will stay visible and moveable. ...
Bryan Pinkey's user avatar
1 vote
1 answer
995 views

With the old control flow I could reference the result of a function in this way. <span *ngIf="column.getValue && column.getValue(item) as value">{{value}}</span> But ...
fieldhof's user avatar
  • 195
1 vote
1 answer
184 views

I have noticed that when I write the following code, the compiler yields a missing return statement error: // Similar loops make sense in retry patterns // but this is just a simple example func ...
Arnold Zahrneinder's user avatar
1 vote
1 answer
249 views

I am a noob in binary analysis and I am looking for your help. I am working on calculating the MD index of callgraph function nodes by Python, and I have to analyze the control flow graph (CFG) inside ...
PeterMouse's user avatar
1 vote
1 answer
784 views

I have two tasks in control flow. The first task is in sequence container and creates multiple global temp tables. The second task uses these temp tables. Both the tasks are in 'Execute SQL Task'. ...
mk SQL's user avatar
  • 11
0 votes
0 answers
61 views

I was benchmarking function pointers vs switch case statements in quick-bench and got the expected result. Function pointers are slower than switch case. But I wanted to remove the operation from the ...
Even Elshaug Almås's user avatar
0 votes
0 answers
42 views

I need to dump data to a spreadsheet relevant to an alert condition being true but an aspect of the data will occur at a latter time then the alert condition being true. So if my alert is true at 2023-...
philip hoy's user avatar
0 votes
0 answers
73 views

I have written an Assembly x64 Assembly code (NASM compatible) that is getting compiled and running on Linux but outputs an unexpected portion of the code. What this code does is that it takes a ...
Aditya Patil's user avatar
-1 votes
2 answers
97 views

In the program, no errors. PASS, CLEARED user inputs are working as desired. But when I enter NO as user input in the nested if, control picks "else statement" correctly, but also it is ...
Murali7373's user avatar
0 votes
1 answer
97 views

I am trying to use Clang to find all the loops at the source code level of an input source file. My code currently can identify for-loops in the source file and printout the line number. It also seems ...
Kokoro's user avatar
  • 1
1 vote
3 answers
146 views

I have the following code where I want to invoke the instance method connect before proceeding with the invocation of every other instance method of the TelegramClient class. How can this be achieved ...
kabdik's user avatar
  • 37
0 votes
1 answer
270 views

i am trying to create a maui app for android that can talk to and control a specific hid device. i already have the usb device found, and as far as i know i have a connection to the device. But trying ...
spill62's user avatar
  • 21
0 votes
1 answer
73 views

I have a database that looks like this: Rat Age RA RB RAB RC RD RCD A 1 None None Mild Severe None Death B 2 Mild Severe Severe None Mild Severe RA stands for reaction to substance A, RB reaction to ...
LozCodes's user avatar
  • 129
0 votes
1 answer
47 views

I'm trying to write a big for-loop that executes some nested logic. I'd like to control which comparisons get applied with a kwarg in my function. Basically, I have two different comparisons, both ...
DRJ's user avatar
  • 35
0 votes
1 answer
61 views

I have been trying to build a Hangman game, but I am facing a problem. The game runs fine, but every time I guess the word on my last chance, instead of the “You won!” block being executed, the “You ...
Huzaifa's user avatar
0 votes
0 answers
70 views

I have an array of discriminated union objects type Discriminated = { discriminator: 'a' a: string; } | { discriminator: 'b', b: number; } const arr: Discriminated[] = [ { discriminator:...
Dilame Nickolson's user avatar
2 votes
1 answer
353 views

Suppose we have classic Abstract Syntax Tree of a program. I wonder worth it to put purely semantic information (referred variable type, size in bytes, etc) in AST? I need all this stuff for different ...
385i's user avatar
  • 35
0 votes
1 answer
218 views

I see I am allowed to do statements like this within my script task: Dts.TaskResult = (int)ScriptResults.Success; Dts.TaskResult = (int)ScriptResults.Failure; New to SSIS, and I could not find this ...
Sir Fartsalot's user avatar
1 vote
0 answers
223 views

I am trying to understand the Next.js routing fundamentally so that I can customize it according to my need. But I wasn't able to find about the workflow of the routing with a high-level explanation. ...
Hasnat Mahbub's user avatar
0 votes
1 answer
85 views

Section 6.6.3 of the dragon book (Compilers: Principles, Techniques, and Tools 2nd Edition) describes how to translate the flow-of-control statements like if/if-else/while into intermediate code. For ...
hengxin's user avatar
  • 2,011
0 votes
1 answer
179 views

I'm updating a macro and need help with the control flow. I'm not a programmer by trade, so control flow isn't something I've encountered before. The current version of the macro works as follows: ...
David Vinnicombe's user avatar
-2 votes
1 answer
160 views

How many times have you encountered a function with a return statement deep within the code? Or failed to notice a break or a continue in a loop? While I have not been blindsided by return recently, I ...
user2150648's user avatar
1 vote
1 answer
2k views

I'm rewriting some code from Pure Python to JAX. I have a function that has if/else statements in it that depend on the value of the input variable. I know these kinds of "control flow" ...
Jim Raynor's user avatar
0 votes
2 answers
155 views

With the following (very contrived) example where: If the object has a certain value for an attribute, then another (optional) attribute must be defined. I want to catch errors in the constructor so ...
Sean McClure's user avatar
0 votes
2 answers
171 views

Getting clojure.core$count cannot be cast to java.lang.Number error for defined variable count (defroutes jobs-routes (context "/jobs" [] (POST "/jobValidation" [name ...
sanaka's user avatar
  • 37
-1 votes
1 answer
105 views

Working on a leetcode problem described as: "Given a binary array nums and an integer k, return the maximum number of consecutive 1's in the array if you can flip at most k 0's." I am using ...
Siggyweb's user avatar
0 votes
1 answer
47 views

i have this function that works as intended except for the fact that the last print instruction outside the while cycle (print("why don't you print?")) never get executed and i don't ...
jane12's user avatar
  • 1
0 votes
0 answers
48 views

I need help stepping through a second loop in R when a test fails in my first loop. Here's the logic: to start use config_list[1] from list then download file path_list[1] from list check if file ...
Scuba Steve's user avatar
-4 votes
2 answers
49 views

i was running a program that return the maximum 2 number in a certain list and I found that there a difference between using if and elif in definition of function So if i used : def maxi (lst) : ...
Hossam salah's user avatar
1 vote
1 answer
393 views

Sometimes there is a need to call a function and handle the exception directly (with a try/catch), and other times there it is preferable to call the same function and receive a null or false if it ...
burn's user avatar
  • 81
0 votes
2 answers
3k views

I am building a simple rock paper scissors game. Everytime you win, you gain a point. Same for the computer. Between the player and computer, the first to get 3 points wins. Everything worked fine but ...
ETPROG....'s user avatar
0 votes
1 answer
54 views

The following code works. The functional line of code is p1+p2+p3+p4+show. However, if I comment that line out and uncomment the commented lines, the app still works, but the associated map doesn't ...
Steve's user avatar
  • 595

1
2 3 4 5
19