Top "Boolean" questions

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

PHP: bool vs boolean type hinting

I've been trying to use type hinting more in PHP. Today I was writing a function that takes a boolean …

php boolean default-value type-hinting
Is there an easier way to do boolean conversions?

I have used this scenario many times in nearly all my projects, when I'm doing some sort of data conversion, …

delphi boolean type-conversion delphi-xe2
How to count the number of occurrences of `None` in a list?

I'm trying to count things that are not None, but I want False and numeric zeros to be accepted too. …

python boolean list-comprehension nonetype
Valid JavaBeans names for boolean getter methods

I know most variable names will work with "is", such as isBlue(), but is "has" also a valid prefix, like …

java boolean naming-conventions javabeans
Double Pipe Symbols in Ruby Variable Assignment?

Possible Duplicate: What does ||= mean in Ruby? Forgive me if this is a newby question but im reading a book …

ruby boolean variable-assignment
Is it bad to explicitly compare against boolean constants e.g. if (b == false) in Java?

Is it bad to write: if (b == false) //... while (b != true) //... Is it always better to instead write: if (!b) //... …

java coding-style boolean
How do I determine if *exactly* one boolean is true, without type conversion?

Given an arbitrary list of booleans, what is the most elegant way of determining that exactly one of them is …

boolean logic
return a boolean - jdbcTemplate

I would like to return a boolean value using in this method: public Boolean isSizeOk(String transactionId){ String sqlQuery = "SELECT …

boolean return jdbctemplate
PHP printed boolean value is empty, why?

I am new to PHP. I am implementing a script and I am puzzled by the following: $local_rate_filename = $_…

php boolean echo
Is it ok to read a shared boolean flag without locking it when another thread may set it (at most once)?

I would like my thread to shut down more gracefully so I am trying to implement a simple signalling mechanism. …

c++ multithreading locking boolean monitor