Top "Conditional" questions

In computer science, conditional statements, conditional expressions and conditional constructs are features of a programming language which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false.

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 …

conditional mixins sass if-statement
Run an Ansible task only when the variable contains a specific string

I have multiple tasks depend from the value of variable1. I want to check if the value is in {{variable1}} …

linux conditional ansible ansible-playbook ansible-2.x
How do I use properly CASE..WHEN in MySQL

Here is a demo query, notice it is very simple, Fetches only where base_price is 0, And still, it chooses …

mysql sql conditional switch-statement case
How do I negate a test with regular expressions in a bash script?

Using GNU bash (version 4.0.35(1)-release (x86_64-suse-linux-gnu), I would like to negate a test with Regular Expressions. For example, I …

regex bash conditional negate
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 …

bash conditional noop
Is it good practice to use the xor operator for boolean checks?

I personally like the exclusive or, ^, operator when it makes sense in the context of boolean checks because of its …

java conditional bitwise-operators logical-operators xor
jQuery check if attr = value

I seem to be having trouble with my code. I need to say: if ( $('html').attr('lang').val() == 'fr-FR' ) { // do …

jquery conditional attr if-statement
Using SUMIFS with multiple AND OR conditions

I would like to create a succinct Excel formula that SUMS a column based on a set of AND conditions, …

excel sum conditional sumifs
SQL: Return "true" if list of records exists?

An alternative title might be: Check for existence of multiple rows? Using a combination of SQL and C# I want …

c# sql conditional boolean exists
Multiple conditions in if statement shell script

I would like to know whether it is possible to have more than two statements in an if statement when …

shell if-statement conditional account