Boolean Questions
Ad
Why is my valid_triangle program from cs50 doesn't work?
I have a problem with this code as i can't seem to find the problem? here is the problem that i tried to solve: - declare and write a function
Addition with _Bool type in C
In a piece of code i'm working on, i need to add 1 to an unsigned long if some _bool is true. i've been using
Boolean Field in Oracle
Yesterday i wanted to add a boolean field to an oracle table. however, there isn't actually a boolean data type in oracle. does anyone here know
JPA repository Boolean Query - return null pointer exception
I have java springboot project with repository that included boolean custom query. but the system run to null pointer exception apart from return
Python: check if all points within a rectangle
I wrote below function to check if the list of points is within a rectangle, and it should return true only if all points in the list are in the
How to fetch values from Realtime Database Firebase that are not string values
I have linked my react webapp to the real-time database of firebase and am successfully fetching string values and displaying it on my webapp.
How can I stop cin from skippping a line?
So i was trying to make a program where the user is asked to give an input and it gives output with answered questions. everything looks alright
Laravel : How to update boolean value using foreign key in a table
here is my database table i want to work with i want to
c++ : Why does my boolean store a value greater than 1?
I'm learning c++ and am right now starting with the concept of classes. and i learned that a new created object (without constructor) will have
How is this swap type expression working?
I have been experimenting with python. i found the swapping method for variables: var1, var2 = var2, var3 i
Ad
What is the meaning of "a|=b" in JS/TS if it's valid to begin with?
When i see the expression let a : number = 3; a = a + 5; i immediately refactor it to let a :
Trace back original position of argmin/argmax on boolean masked NumPy array - Python
Context since masking with the numpy.ma-module is significantly slower than direct boolean masking,
Problem to check if a function is true in another function php
I use this code to check the function 1 is true. if it is true, function 2 assigns a css class, otherwise another one : function
Toggle state with useState in React wont work as an object
Toggling the state from true to false like this works fine in react using hooks every time toggletest function is executed: const
Dart: Is there a way to negate and return a boolean in a single line?
Is there a way to write the follwoing funciton as a single line, using the fat arrow (=>) notation? bool tick() { _tick =
Flutter comparing a value with two strings
Here i want to compare the currentvalue with the two strings i gave and i want to create a widget accordingly, but i can only check if it
Flutter How to set Boolean from Settingpage
How to turn on/off vibration on homepage from settings page with boolean switchlisttile? i want if the switchlisttile in the settings page
Create new boolean fields based on specific terms appearing in a tokenized pandas dataframe
Looping over a list of terms to search for, i need to create a boolean field for each term according to whether or not it is present in a
NLRX Package: Include boolean parameter as variable
Can i include boolean parameters in the variables for a simdesign? an if so, how would that look like? right now i only have metric variables like
Pandas dataframe and assigning values
There is a behavior of pandas dataframes that i can't explain. i wish somone could walk me through this. import pandas as pd df =
Convert list boolean to list string flutter
How to convert list string to list bool? list<string> liststring = ["true", "false, "true"]
Ad
TensorFlow: Efficient way to get the index of the smallest element in a tensor that isn't zero?
I use tensorflow 1.12. i have a one-dimensional tensor tag_mask_sizes, which mostly contains zero's but also a few positive integers.
Flutter ListView changing values
I have a question: i have a listview.builder in flutter with songs and every song item has a play button on the left. so i click the play button
Change Colors of Selected Containers and Unselect? [Flutter]
They are containers filled with reasons to report a user. how to change the code so that each individual container will change color upon tab
how can I check from firestore how many items have a true or false value and show only the true in a list? - flutter
I want to make that in a todo app, only the elements that have the true value are showing in the list. how can i do this?
basic flutter question regarding the use of $ in flutter
Suppose i have declared expression like this bool smp0 = false; bool smp1 = false; bool smp2
How to return True if two-dimensional array in python has at least one True
I'm trying to write a code which checks if 2d-array (consists of only boolean) has at least one true and return true if there is at least one
assigning a unique id for button
Suppose there exist a form and has two button ,i want one button to get disabled until all parameter is filled by user while other enabled,for
I am trying to toggle my Boolean by IsFormDisplayed function
Hey i am calling the isformdisplayed function from . i want this function to toggle between true and false every time i call it. can you tell what
Change zero to ones in vector if surrounded by less than five consecutive zeros
I have a vector of 0s and 1s and want to identify the indices where a string of 0s is surrounded by
Lisp: Unable to check whether a boolean is true?
I am trying to check whether a boolean variable (boolvariable) is true (t) using the following code:
Issue with handling boolean instance in Flutter class
In my flutter app i have a class and a list of classes like the following: class guesttype { final string name; bool isactive;
Ad
Pandas- using "any" and "all" on multipls series outside of dataframe
I am looking for an equivalent to df.any() and df.all() that would work on series that are not in a dataframe. i would rather not use the | and
Uncheck a checkbox when user checking another one (bool of checkbox is in a map)
I have in my app a few checkboxes and i want, when the user checks a checkbox, that the other checkboxes are unchecked. that's normally not
Count conditions within each row in Pandas Dataframe
I have this dataframe: char1 char2 char3 0 2 2 3 1 2 3 3 2 2 3 3 3 2 2
Python Pandas, Boolean Indexing: How to select all rows with a "True" value
Let's assume i need a "starting pont" of a filter. how can i get a boolean index of all values in a column to be 'true'? minimal example:
Flutter bool name = String its possible?
Hey i make a favorite system with a bool to say if is favorite or not. but if the name of the bool is always the same it applies to all my
Why ternary expression is executed after falsy value in Javascript?
As far as i know expressions are not executed after falsy values in javascript. for example in the following statement:
Python - loop through boolean if there is a value
Im trying to code a script where i check a certain page of names. before i continue summarizing the problem. the page is known to flick - meaning
Generate all length-n permutations of True/False?
This problem came up while trying to write code for a truth-table generating function. how can i generate a list of lists of all length-n
Which is the best way to sort an array when it has boolean values?
I was following a course and when i reached the challenge section the teacher asked to write down a code that sorts this objects array which
How to set the default value in the view of an existing form, depending on the decision (boolean) field?
I want to change the view of the "contacts/new" form when the "citizen" (i added it in my .py file as a boolean field) is ticked. when it is true,
Flutter/Dart: How to make a Boolean Listenable with the ChangeNotifierProvider?
I'm using a changenotifierprovider to provide a boolean which returns true or false depending on whether the user is logged in. how do i make the
Ad
Remove quotes from boolean when form is submitted
I have a simple form. it posts to the server (node js / express), and has a checkbox with a 'true' value when checked.
Flutter Future<bool>, RX<bool>, and regular bool confusion and how to get the value of one from the other
I'm new to flutter and just learned about getx so i'm trying to incorporate it into my app as much as possible. in this example i'm trying to get
Displaying some data in Grid according to boolean value using react-redux
I want to display "taxable" if value from db is true, if value is false print "non-taxable". how can i do it in
Returns a Future<Dynamic> instead of Bool
I want to return a bool in this method but it return a future @override widget build(buildcontext context) { return
Store state for each item separately in RecyclerView
Recyclerview onclick doesn't work properly. it has to change state to true or false. when i
Boolean value set to state toggles on it's own despite value is true
I've created a component that contains a form used to validate youtube urls that has a state property that evaluates to true or false depending on
How do I create a simplified logic circuit of this given [(A’B’)’ + (A’+ B’)’]’ ? and What is the simplified Boolean expression?
I have to draw the simplified logic circuit of this given [(a’b’)’ + (a’+ b’)’]’ and also get the simplified boolean expression
Python use the print() function in a ternary conditional operator?
I don't understand why this fails print('yes') if true else print('no') file "<stdin>", line 1 print('yes') if true
List of booleans in Shared Preferences Flutter
Is there a way i can have a list of bools in shared preferences. i have a list of settings with checkboxes and i want to save those settings
getsizeof() function returns different output in Python 2 and Python 3
Small code: import sys x = true print(sys.getsizeof(x)) python 2 output: 24
Merge & Filter Multiple Columns of One Dataframe with Boolean Logic
Objective: output buy/sell/neutral/error indicators to a single df[column] while filtering out "false" values. indicators are based on the below
Ad
Give a boolean an ID using string value
In order for my projects algorithm to work i have to name a boolean the value of the string. for example: string check="hello";
Bundle.getBoolean Null object reference
I have this piece of code: override var shouldshowupload: boolean get() = arguments.getboolean(is_landing_upload_page,
Casting potential bool to bool in Python, any downsides?
In my python code i got a few casts of bool() onto variables which i know are likely already boolean. are there any downsides to this?
True and 1 and 1.0 evaluated to be same in python dictionaries
Can anyone explain this behaviour of python dictionaries? d = {} d[true] = 'magic' d[1] = 'cool' d[1.0] = 'hello' print(d) #
How to get a boolean state from a fragment to an activity?
I have an activity that is the foundation of 2 fragments. the activity chooses which fragment to show based on a boolean. currently, i have set
flutter - Future<bool> convert to bool
I have a future bool method and i want to use this method iconbutton color. if i use below codes, i see a error message on my device screen
Converting an Interger to a bool List in Dart
I have a number stored in in shared preferences. this number is a converted binary number that represents the state of a few user-changable
type 'String' is not a subtype of type 'bool' flutter
The following _typeerror was thrown building home(dirty, dependencies: [_modalscopestatus], state: _homestate#f1f65): type 'string' is not a
How can i acces this boolean in this timer?
gesturedetector( ontap: () { timer(duration(seconds: 10), () { bool check =true;
How would I skip a specific event using boolean flag?
I'm making a function that combined 2 events in single on method for controlling, editing more better and easily like this:
Why the boolean false is less than boolean true?
When i wanted to solve a sorting problem in javascript*, i found out the false boolean is lees than true boolean. why? i
Ad
isinstance function in if statement python
As part of a lcm program i'm creating, i want a condition to determine whether the result of an expression is integer or
Booleans and Firebase database
I am working on an app that uses firebase database to store some booleans that looks similar to this "test" : {
How can I change a boolean value with POST request Django
Edit: my goal is to create a small e-commerce. in my index i have a list of products, one of the attributes is a boolean
IOS/Core-data/Objective-C: NSPredicate with Boolean values
In the nsfetchedresultscontroller for a tableview, i am trying to filter out cases where an attribute is true, 1, yes, on or
Return a boolean from a method that searches an array
Is there a way to immediately return a boolean when a condition is met during a for loop that is scanning through a list? i've been using
Boolean Functions in C "control may reach end of non-void function" error
I'm always getting "control may reach end of non-void function" on the boolean function when compiling the code and don't know what's
Convert a set of "true" boolean value variable into array
I am have a set of boolean value as following var prodcat1 = true; var prodcat2 = false; var prodcat3 = false; var prodcat4 =
Test boolean variable
I created a series of tools, and i stumbled a series of issues with the processing workflow due to boolean variables. i have the following
How to use SharedPreferences?
How can i use sharedpreferences on android studio to save some data like the value of a boolean? sharedpreferences.editor editor =
Convert List<Boolean> to byte [ ] array
I have a list of booleans which i want to convert byte [] arrays.i try to convert list to byte[] arrays but i have a mistake.this is my code
how to check dynamically changing boolean value using three js
I'm making a 3d 4x4x4 tic tac toe with three js, and to check win combo condition, i created a boolean array. since there are 16*4=64 blocks, i
Ad
Add " SI or NO" in a Boolean field
I have to store in the boolean field the words " si or no " ( affirmation and negation in spanish). but i can only use these: true: 't'
Wrong results with variables operations in C
I am trying to write this code: #include <stdio.h> #include <cs50.h> #include <math.h> int main(void) {
Function is returning 1 instead of a value?
I am writing a queue data structure and i am not able to retain the value of the integer in the array once the value is returned in the stack. the
Why can an int return type function return a string?
This is the function i'm talking about: static int getinput() { printf("enter your name: "); return fgets(input,
Is incrementing a _Bool defined?
A _bool is defined by the c standard to be an unsigned type containing either 0 or 1. if a value of 1 of type _bool is incremented, there are, as
Boolean logic that will not cooperate
I have been running into an issue with my website that i have been banging my head against now for at least a couple of weeks so i hope someone
best way to write code of bool that check 6 functions?
I have this code: bool validinput = !string.isnullorwhitespace(reg_name_tbx.text) &&
optimize complex logic condition
I suffered complex c style code logic like as if (a || (b && (x || y))) foo(); is any better way to
The Exclamation Notation and `strcmp` Function in C programming
There is a question that makes me confused during learning with the harvard university cs50 course. the following is the question that bothers me
Are multiple comparison operators possible in javascript?
So i was writing in the browser console 4 < 5 true 4 < 5 < 10
Ad
php/Laravel - codepath is reached no matter the value of the conditional expression
I created a helper class named uuidhelper with a function named isvaliduuid that returns a bool value. i'm type-hinting
Python boolean comparison and is
Python 3.6.2 console: >>> 11 > 0 is true false but >>> 0 is true false
Leap year function; how does this solution work?
The problem is this: given a year, report if it is a leap year. the tricky thing here is that a leap year in the gregorian
How to find the value of bool
X =[1,2,3,4,5,6] y = [1,2,3,4,5] if x == y: print("numbers found") else: print("numbers not found")
Create a boolean column in pandas datafame based on percentile values of another column
I have a dataframe with multiple columns. i want to create boolean column, flagging if the value belongs to 90th percentile and above. my
Check cells in pandas columns for boolean + strings and return boolean (TypeError: unsupported operand type(s) for &: 'bool' and 'str')
I'm writing a script that uses a scoring algorithm to test for certain criteria in a set of columns, similar to this example: df =
Declaring Variables, LIKE and booleans
Can "like" and a boolean behave the same way in a variable (in sql)? or is there a way to do this? i'm trying to declare a
Error retrieving a checked Checkbox in Laravel as a boolean
I'm a bit new to laravel and i'm working on a laravel application which has a checkbox field which should
Is there a faster way to read data with a FileStream?
So i'm trying to read data and store it in an array as fast as possible and the fastest method i found of doing so was this. var
Pandas Series boolean maps and plotting
I am just trying to up my understanding of plotting pandas series data using booleans to mask out values i don't want. i am not sure that what i
Boolean value in a JSON response is converted to string on production server
I have a laravel application. in the users table, i have a boolean column called active:
Ad
Iterate variables over binary combinations
Is there a simple way to loop variables through all possible combinations of true/false? for example, say we have a function:
How do you deal with NULL values in columns of type boolean in MS Access?
I was wondering if there is a better way to cope with ms-access' inability to handle null for boolean-values other than change the
Ad
Blog Categories
Ad