Skip to main content
4 votes
2 answers
110 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 ...
Noemi's user avatar
  • 41
1 vote
1 answer
117 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 ...
Victor Hanukayev's user avatar
5 votes
2 answers
178 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 ...
0747's user avatar
  • 55
1 vote
2 answers
101 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 ...
applepie's user avatar
4 votes
2 answers
460 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": [...
mouwsy's user avatar
  • 2,117
0 votes
1 answer
49 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 ...
sjedi's user avatar
  • 97
0 votes
1 answer
35 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]=$J$4,Table1[Col5]=$K$4) and OR(Table1[Col6]=Pivot!$J$5,Table1[Col6]=Pivot!...
sjedi's user avatar
  • 97
1 vote
0 answers
45 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 ...
David Ferris's user avatar
  • 2,355
0 votes
0 answers
56 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 ...
CodeMonkey's user avatar
  • 12.6k
0 votes
0 answers
85 views

Using 2x4 active decoder and a NOR gate design a XOR gate

I am trying to create a a XOR gate. only from 2x4 and NOR Gates. however I am stuck. Please draw the diagram or give image of this.
Muhammad Manik Uddin's user avatar
9 votes
0 answers
316 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 ...
Matt Timmermans's user avatar
-2 votes
1 answer
157 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 ...
Gregorio Litenstein's user avatar
0 votes
1 answer
64 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 ...
beansaregood's user avatar
0 votes
1 answer
55 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^...
Scorch's user avatar
  • 29
0 votes
6 answers
178 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 ...
Roger's user avatar
  • 428

15 30 50 per page
1
2 3 4 5
129