tagged [conditional-statements]
How to have multiple conditions for one if statement in python
How to have multiple conditions for one if statement in python So I am writing some code in python 3.1.5 that requires there be more than one condition for something to happen. Example: The problem is...
- Modified
- 21 Apr at 01:24
HTML IF Statement
HTML IF Statement I just wanna know how to do an `if`-statement in simple HTML. Like the `[if IE6]` thingy I'd like to do something like this How's the syntax? I can't seem to find anything but `[If!I...
- Modified
- 24 Feb at 23:54
What command means "do nothing" in a conditional in Bash?
What command means "do nothing" in a conditional in Bash? Sometimes when making conditionals, I need the code to do nothing, e.g., here, I want Bash to do nothing when `$a` is greater than "10", print...
- Modified
- 11 May at 01:12
MySQL select with CONCAT condition
MySQL select with CONCAT condition I'm trying to compile this in my mind.. i have a table with firstname and lastname fields and i have a string like "Bob Jones" or "Bob Michael Jones" and several oth...
- Modified
- 20 Apr at 17:59
Simpler way to check if variable is not equal to multiple string values?
Simpler way to check if variable is not equal to multiple string values? Current Code: And: ```
- Modified
- 27 Dec at 21:47
Convert string value to operator in C#
Convert string value to operator in C# I'm trying to figure out a way to build a conditional dynamically. Here is my code so far: I did read this post, but could not figure out how to implement some o...
- Modified
- 28 Nov at 19:45
Shorthand conditional in C# similar to SQL 'in' keyword
Shorthand conditional in C# similar to SQL 'in' keyword In C# is there a shorthand way to write this: Like: I know I could also use switch, but
- Modified
- 28 Aug at 18:1
How to combine multiple conditions to subset a data-frame using "OR"?
How to combine multiple conditions to subset a data-frame using "OR"? I have a data.frame in R. I want to try two different conditions on two different columns, but I want these conditions to be inclu...
- Modified
- 8 Apr at 20:19
Project reference conditional include with multiple conditions
Project reference conditional include with multiple conditions Here's a snippet from my csproj file: What I'd like to do is include `program_data.dll` for build conf
- Modified
- 10 Jun at 21:10
If statement for strings in python?
If statement for strings in python? I am a total beginner and have been looking at [http://en.wikibooks.org/wiki/Python_Programming/Conditional_Statements](http://en.wikibooks.org/wiki/Python_Programm...
- Modified
- 20 Jul at 13:44
Why do empty JavaScript arrays evaluate to true in conditional structures?
Why do empty JavaScript arrays evaluate to true in conditional structures? I was encountering a lot of bugs in my code because I expected this expression: `Boolean([]);` to evaluate to false. But this...
- Modified
- 4 May at 12:58
JavaScript: using a condition in switch case
JavaScript: using a condition in switch case How can I use a condition inside a switch statement for JavaScript? In the example below, a case should match when the variable `liCount` is ` 0`; however,...
- Modified
- 4 Apr at 13:12
Is if(var == true) faster than if(var != false)?
Is if(var == true) faster than if(var != false)? Pretty simple question. I know it would probably be a tiny optimization, but eventually you'll use enough if statements for it to matter. EDIT: Thank y...
- Modified
- 5 Oct at 13:57
Replacing Numpy elements if condition is met
Replacing Numpy elements if condition is met I have a large numpy array that I need to manipulate so that each element is changed to either a 1 or 0 if a condition is met (will be used as a pixel mask...
- Modified
- 4 Nov at 11:27
Using Action dictionaries instead of switch statements
Using Action dictionaries instead of switch statements I'm just reviewing some of my old code (have some spare time), and I noticed a rather lengthy switch statement. Due to gaining new knowledge, I h...
- Modified
- 11 Jul at 01:44
xor with 3 values
xor with 3 values I need to do an xor conditional between 3 values, ie i need one of the three values to be true but not more than one and not none. I thought i could use the xor ^ operator for this b...
- Modified
- 3 Jun at 14:19
Syntax for if/else condition in SCSS mixin
Syntax for if/else condition in SCSS mixin Hi I'm trying to learn SASS/SCSS and am trying to refactor my own mixin for clearfix what I'd like is for the mixin to be based on whether I pass the mixin a...
- Modified
- 3 Oct at 10:26
IN Clause with NULL or IS NULL
IN Clause with NULL or IS NULL Postgres is the database Can I use a NULL value for a IN clause? example: I want to limit to these four values. I have tried the above statement and it doesn't work, wel...
- Modified
- 15 Jun at 18:6
Check if year is leap year in javascript
Check if year is leap year in javascript This is what I have so far (the entry is o
- Modified
- 25 Jun at 20:54
Show WPF Tooltip if needed
Show WPF Tooltip if needed I have a TextBlock inside a limited-size control. If the text is too long to fit into the control, I'd like to show a tooltip with full text. This is a classic behavior you ...
- Modified
- 12 Jul at 12:12
Set value of one Pandas column based on value in another column
Set value of one Pandas column based on value in another column I need to set the value of one column based on the value of another in a Pandas dataframe. This is the logic: I am unable to get this to...
- Modified
- 5 Dec at 17:33
How to use conditional statement within child attribute of a Flutter Widget (Center Widget)
How to use conditional statement within child attribute of a Flutter Widget (Center Widget) So far whenever I needed to use a conditional statement within a Widget I have done the following (Using Cen...
- Modified
- 23 Apr at 03:47
visitor pattern against conditionals?
visitor pattern against conditionals? I don't seem to find this in usage scenarios for the visitor pattern (or maybe I don't get it). It's also not hierarchical. Let's use an authentication example. A...
- Modified
- 9 Aug at 11:22
How do you put an "IF DEBUG" condition in a c# program?
How do you put an "IF DEBUG" condition in a c# program? How do you put an "IF DEBUG" condition in a c# program so that, at run time, it will ignore a set of code if you are running in Debug mode and y...
- Modified
- 1 May at 18:39
Replacing values from a column using a condition in R
Replacing values from a column using a condition in R I have a very basic `R` question but I am having a hard time trying to get the right answer. I have a data frame that looks like this: ``` species
- Modified
- 13 Jul at 12:31