Top "Conditional-statements" 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.

How to load a script only in IE

I need a particular script to be triggered in Internet Explorer browsers Only! I've tried this: <!--[if IE]&…

javascript internet-explorer conditional-statements
Conditional INSERT INTO statement in postgres

I'm writing a booking procedure for a mock airline booking database and what I really want to do is something …

database postgresql conditional-statements sql-insert
Is it possible to turn the access_logs block on and off via the environment_name variable?

I'm looking at using the new conditionals in Terraform v0.11 to basically turn a config block on or off depending …

if-statement conditional-statements terraform
Will an IF statement stop evaluating if it fails the first condition?

If I have an If statement with 2 conditions - and the first fails, will the 2nd condition even be considered …

c# if-statement conditional-statements
How to check if a StringBuilder is empty?

I must unit test a method that takes a StringBuilder, two items, and fill the StringBuilder with the discrepancies found …

c# conditional-statements stringbuilder
R repeat function until condition met

I am trying to generate a random sample that excludes certain "bad data." I do not know whether the data …

r function conditional-statements repeat
Angular 2 Pipe under condition

Is it possible in Angular 2 to apply a pipe under condition? I would like to do something like: {{ variable.text | (…

angular conditional-statements angular-pipe angular2-pipe
Switch statement using or

I'm creating a console app and using a switch statement to create a simple menu system. User input is in …

c++ switch-statement conditional-statements or-operator
switch case in XSL

I have a loop with the same tags to load content in ten cells but has a difference div title …

xslt if-statement switch-statement conditional-statements xsl-choose
Why Switch/Case and not If/Else If?

This question in mainly pointed at C/C++, but I guess other languages are relevant as well. I can't understand …

c++ c switch-statement conditional-statements