19,434 questions
-1
votes
1
answer
58
views
Set Terraform Child Module Variable Values Conditionally
I have a Terraform child module for an Azure Function App. This Function App also implements an Azure Monitor Alert (referenced from another child module) and provisions a set of dedicated Action ...
0
votes
7
answers
309
views
Conditional Join in SQL query
I need a single SQL query that would satisfy the below criteria.
I have 2 tables, say Table1 with these values:
ID
Code
Description
1
1000
abc
2
1000
pqr
3
1000
efg
4
2300
rst
5
2300
uvw
6
2930
xyz
7
...
7
votes
6
answers
2k
views
C program: Use an array outside the scope it was defined in
I have some code in which an array of strings is defined in a conditional statement. The array is out of scope where I need it. So I defined another pointer in the outer scope. In the conditional ...
0
votes
2
answers
146
views
How do I assign a value according to conditional statement that use dates from multiple columns [closed]
I am using a large dataset which contains patients with 5 different cancer types. Each patient can have one or more cancer diagnosis, identified in the n.cancers column. There are also columns for ...
0
votes
0
answers
55
views
How to set pipeline variables based on another pipeline variable whose value is assigned using Library variable?
I am having difficulty in achieving a requirement. I need to determine the Agent pool based on Build.Reason. If the reason is PullRequest, I need to assign the value of agent pool using value of a ...
0
votes
3
answers
84
views
How to preserve component state while dynamically rendering and unmounting components in React?
I'm building a React.js application where I need to conditionally render components based on user interactions (like tabs or dynamic forms). The issue is that when a component is unmounted and later ...
-2
votes
2
answers
140
views
Applying changes to a dataframe based on a condition [closed]
I have the following sample data frame:
ID <- rep(1:4, each=9)
Parameter <- rep(c("Tlag", "A1", "A2", "A3", "A4", "alpha1", "...
0
votes
0
answers
49
views
EXCEL - Comparing multiple dates against a single date value for highlighting
I'm trying to use conditional formatting to compare the date output from multiple cells and columns against one date value.
The condition works but in an undesired state. The condition evaluates ...
0
votes
1
answer
66
views
Code Add on to Current to Avoid Using Conditional Formatting
I have the following code, which SET 1 Columns H:K respond to Columns F:G. SET 2 Columns N:Q respond to Columns L:M. Set 3 Columns T:W respond to Columns R:S. Now following that same logic I want the ...
0
votes
0
answers
25
views
Which is efficient for displaying a component in angular conditionally based on a checkbox value? *ngIf directive or [hidden] property? [duplicate]
I have a checkbox and I need to show a datebox only if the checkbox is checked. What is the best and most efficient way to achieve this.
<div class="box" [hidden]="!checked">
...
0
votes
2
answers
111
views
Conditional formatting custom formula that can compare a string referenced on another sheet
I am trying to indirectly reference another sheet within my Google sheets document in order to compare a string and color the cell accordingly if the text matches. Let's say that Sheet 1 is a list of ...
1
vote
1
answer
37
views
Ansible: save item from nested list based on match from a separate list
I'm new to ansible so i'll try to explain this as best as I can...
I have two lists created from separate json_query results. One of them contains nested lists with two related items each (vm and ...
1
vote
3
answers
112
views
Function to evaluate vector based on time and stops once it reaches a threshold
I have a data frame with three variables ID, year and value. I would like to know how many times the "value" has been larger than a threshold going backwards, from the most recent year to ...
1
vote
1
answer
57
views
Can you create multiple columns based on the same set of conditions in Polars?
Is it possible to do something like this in Polars? Like do you need a separate when.then.otherwise for each of the 4 new varialbles, or can you use struct to create multiple new variables from one ...
0
votes
1
answer
110
views
How can I define an infinite loop condition in the for loop in java?
I was making a program in which user can keep entering numbers till user enters a multiple of 10. So I wanted to created a for loop for that and didn't knew what should be the infinite loop condition ...
-1
votes
5
answers
228
views
If statement vs. function pointer (performance) [closed]
Consider the following:
while(running) {
if(logMode == true)
log();
bar();
}
VS
if (logMode == true)
func_ptr = log;
else
func_ptr = noop; //noop is empty function that ...
0
votes
0
answers
59
views
SAS if-then Statement to Python Vectorized Approach - My Values are Not Matching Up
I am trying to replicate some values in a dataset. The original data that I am running my code against for verification purposes has two categories across multiple groups, like so:
grp5
0 ...
1
vote
1
answer
69
views
Swift custom struct: string interpolation not picking up custom description
In the following Swift code:
import Foundation
struct MySet<T: Hashable>: CustomStringConvertible {
let set: Set<T>
}
extension MySet {
var description: String {
return &...
-2
votes
2
answers
161
views
What is better: x == False or not x? [duplicate]
There are two different ways to check for a negative condition in python:
if not x:
and
if x == False:
Which is best by standarts of clear code/faster? I saw people using both, but which of this ...
0
votes
1
answer
62
views
R how to recreate new columns based on an if statement [duplicate]
I have a long column that contains the results of selected items separated by commas within the same cell. I want to create new columns based on conditions.
example
favorite_fruits <- c("...
0
votes
1
answer
34
views
How to start over when a certain condition is met?
I'm writing a program which I want it to start over, that is, reset to initial value and continue when a certain condition is met. But when the condition is met, the program does not reset to the ...
0
votes
2
answers
528
views
Fill with value from cell if two other cells' values match
I have an Excel worksheet sorted like this:
name_in_system id external_name external_id
A A 231
B ...
-1
votes
1
answer
127
views
Why is my column split not working correctly?
Why is my python3 code to split column 4 at the bases of "," to the column 7, 8, 9 with condition if the column 5 value is "LUB" not working?
source data:
20240801 CASH MAN1 ...
2
votes
0
answers
224
views
Outlook 2025 not honoring email conditional HTML
The long trusted conditional HTML statements for Outlook do not seem to be honored by the latest version of Outlook (2025). They still work in older versions.
Example code:
<!--[if gte mso 9]> ...
0
votes
0
answers
61
views
Calculated Column with three conditions
I"m building a dashboard that will identify missing values for three data points: Billing, Reason, Origin. They are all text and do not contain numbers.
How do I construct a calculated column I ...