Skip to main content

Questions tagged [boolean]

A Boolean data type is a data type with only two possible values: true or false.

boolean
-3 votes
1 answer
39 views

When attempting to enter time in string format, it results in an infinite loop [duplicate]

I started learning to program in C++. The task is to get the user to input the number of hours. However, when trying to enter the time in text string format, it starts to infinitely execute the loop ...
Рустам Велиев's user avatar
1 vote
1 answer
23 views

How to set pandas.DataFrame cell to null without FutureWarning

I would like to set some cells to null based on a condition. For example: import pandas as pd # version is 2.2.2 df = pd.DataFrame({'x' : [1, 2, 2, 1, 1, 2]}) df["b"]=False df.loc[df["x&...
aabyssx's user avatar
  • 13
-1 votes
3 answers
41 views

Clarification on how PHP handles true and false values

I would like to use a true/false result to do alternative things in PHP. I was surprised by the following: $falsevar = false; $truevar = true; echo "falsevar which I just set to false is".$...
user6631314's user avatar
  • 1,868
0 votes
0 answers
6 views

Using boolean difference in Pyvista gives artefacts

I am trying to do a boolean difference between two different shapes (a larger cylinder and a smaller cylinder that's deformed). The reasons is I want to use this geometry input for a simulation later ...
Tanamas's user avatar
  • 123
0 votes
0 answers
6 views

Coding and Plotting Haar Wavelet

I am trying to plot Haar Wavelet function using the code below: #define the t variable #define the range of the time domain L = 10 #Define the number of points in the time domain n = 100 #define the ...
User123's user avatar
  • 29
1 vote
1 answer
26 views

How to resolve complex boolean expressions into all possible combinations

I'm trying to solve the following problem. I have a set of logical operations and I would like to resolve them into all possible combinations. For example: "((A | X) & B & C) | (C | E) &...
himself's user avatar
  • 88
1 vote
0 answers
22 views

Opposite results between `bool(x)` and `x.__bool__()` after patching

In this simple little test case, I monkey patch the __bool__ method of an instance, but am surprised to see that calling bool(x) and x.__bool__() give opposite results afterwards. What is the ...
xApple's user avatar
  • 6,416
0 votes
0 answers
56 views

Convert undefined state (x) to high impendance state (z)

I have this set and reset test bench: module sr_tb; reg s = 0; reg r = 0; wire p; wire q; wire y; or or1(y, s, p); not not1(q, r); and ...
Muhammad Ikhwan Perwira's user avatar
0 votes
0 answers
14 views

Support for complex queries using analyzers

I submitted this as a feature request but perhaps it is best for this to be addressed as a question here. We have the need to be able to build some more complex search queries that logically combine ...
user2985311's user avatar
-1 votes
0 answers
48 views

I have this error: Trying to access array offset on value of type bool

Warning: Trying to access array offset on value of type bool in C:\xampp\htdocs\streaming\includes\classes\Video.php on line 27 Warning: Trying to access array offset on value of type bool in C:\xampp\...
Sauce2k's user avatar
  • 11
0 votes
1 answer
103 views

What's wrong with this simple boolean expression in Ruby?

Here is my Ruby 3.2 code: puts (1 and 0) puts (1 and 0 and 1) It prints 0 and then 1 (I'm expecting 0 in both cases). Can someone explain, why?
yegor256's user avatar
  • 104k
0 votes
1 answer
57 views

Sending data from Rails to get validated in JSON Schema

In my app I am sending product information in various types (string, integer, float, and boolean) for validation by a JSON Schema. I noticed today when attempting to send false boolean values for ...
dukehenry's user avatar
1 vote
1 answer
67 views

How to redirect a user after a boolean check in Flutter

I have a button that checks the time difference, so I would want the user to be redirected if the button is active or when he clicks on the button when it is active. Below is what I have tried but I'm ...
samuel Jen's user avatar
0 votes
1 answer
50 views

How can I make a bool happen only once?

I'm trying to set up a dialogue system and I can't figure out how to make it stop repeating every frame. { [SerializeField] public TMP_Text dialogueText; [SerializeField] public GameObject ...
Fish_Fish013's user avatar
0 votes
1 answer
29 views

Check if child exist in firebase database and return true or false [duplicate]

I want to create method that will check if a child is present or not in firebase database and returns the value true or false accordingly. here's my code public boolean check_if_child_exist(...
Rakesh Bhagat's user avatar

15 30 50 per page
1
2 3 4 5
786