Top "Boolean" questions

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

What's the difference between XOR and NOT-EQUAL-TO?

My question uses Java as an example, but I guess it applies to probably all. Is there any practical difference …

boolean xor evaluation
Booleans in ConfigParser always return True

This is my example script: import ConfigParser config = ConfigParser.ConfigParser() config.read('conf.ini') print bool(config.get('main', 'some_…

python boolean configparser
Defining "boolness" of a class in python

Why doesn't this work as one may have naively expected? class Foo(object): def __init__(self): self.bar = 3 def __bool__(…

python python-2.7 class boolean python-2.x
In MySQL, how do I insert 1 when string value is 'true', 0 when false, while preserving nulls

I am using an INSERT query that SELECTs from a plain-text database into a more query-friendly database. The following is …

mysql boolean insert-into string-conversion
C : is there "lazy evaluation" when using && operator, as in C++?

I would like to know if this looks correct : while((next !=NULL) && (strcmp(next->name, some_string) &…

c boolean evaluation
Coldfusion string == true OR empty == false?

I am used to using PHP and JavaScript but I have now begun working on a project in Coldfusion. In …

string coldfusion boolean coldfusion-8
Why does "sizeof(a ? true : false)" give an output of four bytes?

I have a small piece of code about the sizeof operator with the ternary operator: #include <stdio.h> #…

c boolean sizeof conditional-operator c11
how to bind inverse boolean, JavaFX

My goal is to bind these two properties such as when checkbox is selected then paneWithControls is enabled and vice-versa. …

java binding boolean javafx-8
Is the operation "false < true" well defined?

Does the C++ specification define: the existence of the 'less than' operator for boolean parameters, and if so, the result …

c++ boolean language-lawyer comparison-operators
Why isn't the size of a bool data type only 1 bit in C#?

I am just learning C# and looking deeper into data types. Why isn't a bool data type 1 bit in size? …

c# types boolean byte bit