Top "Ternary-operator" questions

The conditional operator is a ternary operator that is part of the syntax for a basic conditional expression in several programming languages.

AngularJS - Using ternary operators and filters within a binding

I current have a simple data binding: {{ myAccount.Balance }} I think applied a couple of filters: {{ myAccount.Balance | filter1 | filter2 }} …

javascript angularjs angularjs-scope ternary-operator angular-filters
conditional operator in Velocity

Is there a way to do ternary operators in Velocity? This is what I'd like to do: #set ($name = ($args.…

velocity ternary-operator
Does VHDL have a ternary operator?

I love the neatness of the ternary operator vs if clauses. Does this operator exist in vhdl? My search was …

vhdl ternary-operator
Boolean multiplication in c++?

Consider the following: inline unsigned int f1(const unsigned int i, const bool b) {return b ? i : 0;} inline unsigned int …

c++ boolean ternary-operator standards-compliance
Why is the ternary operator used to define 1 and 0 in a macro?

I'm using an SDK for an embedded project. In this source code I found some code which at least I …

c++ c boolean ternary-operator
Can a JavaScript ternary operator support 3 conditions?

Given the following JavaScript ternary operator, is it possible to enable this to support 3 conditions versus the current two? const …

javascript switch-statement ternary-operator ternary
Expressions in JavaScript Ternary Operator and JSLint

I recently received a comment on one of my blog posts about JSLint asking why JSLint threw an error with …

javascript ternary-operator jslint jshint
Jenkins: groovy DSL: using the ternary operator to distinguish between FreeStyleJob and MatrixJob

I am trying to write a groovy-dsl script for Jenkins to generate two jobs: The first job is a FreestyleJob …

jenkins groovy ternary-operator jenkins-job-dsl groovydsl
How to handle a null value in JSON-Simple?

I'm ingesting tweets in JSON using JSON-Simple. I split the user object off into it's own JSONObject class, in memory: …

java nullpointerexception ternary-operator json-simple
Short form for Java If Else statement

I have a method which checks for nulls. Is there a way to reduce the number of lines in the …

java if-statement ternary-operator short