1,930 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
0
votes
6
replies
75
views
Parsing pipes with boolean logic operators in bash
I'm investigating how Bash parsing works. Let's assume that all lower-case letters here represent scripts that always return a successful exit status - 0. The contents of all scripts are identical. ...
4
votes
2
answers
123
views
How to reduce multivariate boolean expressions
I need to model a system of several boolean expressions in 512 variables. Due to the number of variables, I found the expressions are way too large to handle normally, which is why I need a way to ...
1
vote
1
answer
133
views
How to set a boolean flag True after entry and back to False after exit using Pandas (vectorized)?
I'm working with a Pandas DataFrame where I need to track a boolean flag (in_position)
that becomes True after an entry_signal and resets to False only after an exit_signal.
This must be done ...
5
votes
2
answers
218
views
How does the `(...) and (...) or (...)` idiom mimic a ternary operator in Lua?
This statement mimics a ternary operator in the Lua programing language:
local result = condition and true_value or false_value
But how does it work? Why does it give true_value if the condition is ...
1
vote
2
answers
119
views
truthy values == false return true
So I am a beginner at javascript and learnt that there are only a limited falsy values: false, 0, -0, BigInt 0n, "", null, undefined, NaN
Yet when I use the == operator with truthy values, this ...
4
votes
2
answers
533
views
Check if all values of Polars DataFrame are True
How can I check if all values of a polars DataFrame, containing only boolean columns, are True?
Example df:
df = pl.DataFrame({"a": [True, True, None],
"b": [...
0
votes
1
answer
59
views
Combining multiple OR conditions with AND in Excel formula
I am trying to combine OR conditions with AND over multiple columns in my Excel datasheet and would like advice on how to do this. A sample table is shown below.
The formula does not calculate the two ...
0
votes
1
answer
46
views
Troubleshooting of Boolean combination of AND and OR conditions in Excel Formula [duplicate]
I am trying to set up an Excel conditional formula with both AND and OR criteria.
However, the last 2 criteria OR(Table1[Col5]=$J4,ドルTable1[Col5]=$K4ドル) and OR(Table1[Col6]=Pivot!$J5,ドルTable1[Col6]=Pivot!...
1
vote
0
answers
49
views
Draw a border(s) around a hand-drawn SVG path with fabric.js
I'm using fabric JS free drawing mode to generate a bunch of hand-drawn SVGs. I then composite these onto a canvas. I convert them to a bitmap Image for rendering so that I can easily union all of the ...
0
votes
0
answers
65
views
Logical condition equivalent with restrictions
I am developing an Azure DevOps custom task. Part of the setting of the inputs is a VisibleRule which can contain a condition which will determine if the input will be visible, if the condition is ...
9
votes
0
answers
327
views
Limiting the depth of Boolean expressions
I am given a Boolean expression of arbitrary depth, like (A or (B and (C or (~D and E) or F) or (G and H))). There can be any number of terms at each level.
I want to limit the depth of the ...
-2
votes
1
answer
164
views
c++: Is (a || b) || c; equivalent to if (!a && !b) { c; }
I'm updating somebody else's code.
They did the following :
bool a();
bool b();
a() || b() || std::clog << "whine about something" << std::endl;
I'm replacing the std::clog bit ...
0
votes
1
answer
72
views
How do i make an onTap toggle Icon to switch between two 'username' and 'Anonymous on Flutter?
I am making a Charity App project, and I am struggling to figure out how to have an anonymous button before someone submits their donation. I want the anonymous option to display before someone ...
0
votes
1
answer
71
views
How do I construct a boolean circuit from a boolean function when I cancelled our one of the variables?
I was given a truth table of four variables, let's call them A,B,C,D. I found every instance where the truth table was true and turned it into a function:
F = (-A^-B^-C^-D) v (-A^-B^-C^ D) v (-A^-B^ C^...
0
votes
6
answers
193
views
How to return false if only one specific condition is true and no others? [closed]
In the following (paraphrased) code, I am checking various conditions, updating them, and scheduling a single notification regardless of the number of changed conditions. If none of the conditions are ...