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.

Conditional JOIN Statement SQL Server

Is it possible to do the following: IF [a] = 1234 THEN JOIN ON TableA ELSE JOIN ON TableB If so, what …

sql-server join conditional case
Why is the use of len(SEQUENCE) in condition values considered incorrect by Pylint?

Considering this code snippet: from os import walk files = [] for (dirpath, _, filenames) in walk(mydir): # more code that modifies files …

python conditional pylint
Determining if a variable is within range?

I need to write a loop that does something like: if i (1..10) do thing 1 elsif i (11..20) do thing 2 elsif i (21..30) …

ruby integer conditional range
PHP - exit from IF block

How can I exit a if block if a certain condition is met? I tried using break but it doesn't …

php if-statement conditional exit
Swift inline conditional?

How do I do this in Swift ? (someboolexpression ? "Return value 1" : "Return value 2") (no I have not read the whole manual …

swift conditional
Command inside if statement of bash script

I have the following line as part of a much bigger bash script: if [ `packages/TinySVM-0.09/bin/svm_learn 2>&…

bash if-statement conditional syntax-error
Fastest way of finding the middle value of a triple?

Given is an array of three numeric values and I'd like to know the middle value of the three. The …

java algorithm conditional logic median
Using conditional to generate new column in pandas dataframe

I have a pandas dataframe that looks like this: portion used 0 1 1.0 1 2 0.3 2 3 0.0 3 4 0.8 I'd like to create a new column based on …

python pandas conditional calculated-columns
#ifdef #ifndef in Java

I doubt if there is a way to make compile-time conditions in Java like #ifdef #ifndef in C++. My problem …

java compilation conditional conditional-compilation
Conditional build based on environment using Webpack

I have some things for development - e.g mocks which I would like to not bloat my distributed build …

javascript build conditional require webpack