Skip to main content

Questions tagged [operators]

Operators are symbols that occur in nearly all programming and coding languages, used for performing calculations, comparisons, and assignments of data. Use this tag for any questions relating to operators, in any language, including things such as syntax, behaviour and use.

1 vote
2 answers
135 views

Freemarker equivalent of typescript optional chaining "?"

Typescript has a nice operator ? (called optional chaining) that check empty attributes in chains of dots. Example x?.y?.w?.z means (more or less) if (x !== undefined && x !== null && ...
luca.vercelli's user avatar
-2 votes
2 answers
134 views

Make easely a sub array from an array

Check this c/c++ code, but just pay atention to the use of "&" operator and the array operations into the function. Its ok to pass an array like that?, will be any invalid access problem ...
Cebo's user avatar
  • 25
0 votes
1 answer
56 views

Using assignment operators in Dart

void main() { var a=10; var b=2; var toplam=a+=b; var fark=a-=b; var carpim=a*=b; var bolme=a/=b; print("$toplam"); print("$fark"); print("$carpim"); ...
Zeynep Baysoy's user avatar
1 vote
0 answers
45 views

Operator Associativity Test vs Operand Evaluation Order

I am trying to write a simple code structure that verifies whether the && operator in a language (not a specific language, so I can't get help of truthy/falsy values) is left-associative or ...
pnguib's user avatar
  • 53
1 vote
1 answer
56 views

Dictionary subscript or operator which adds a specified "default" value if key doesn't exist is Swift?

I need to write something like the following: var dict = [SomeEnum: SomeObject]() var someValue: SomeObject! = dict[.case1] if someValue == nil { someValue = someDefaultValue dict[.case1] = ...
Gargo's user avatar
  • 1,339
0 votes
1 answer
42 views

Reading the values out of an expression string, while keeping the formula intact

I have some code with mathematical operations, and I'm trying to make them easier to read and debug. But a very particular case is becoming complex, here's an example: public int val1=1; public int ...
desiredness's user avatar
0 votes
1 answer
89 views

How to create an "=" operator to check if a Structure type is null

I have never had any issues creating an operator before, but this time I am stumped. My goal is to be able to use the = operator to check if my structure type is null. Example: If myStruct = Nothing ...
John89's user avatar
  • 57
1 vote
1 answer
23 views

Why am I unable to start a connection using my operator's port in RapidMiner?

I'm unable to move or open the operators in my process view in RapidMiner. It has this numbers on top which does not happen normally. Can someone please tell me what to do? I have attached an image ...
Sarah's user avatar
  • 11
0 votes
1 answer
72 views

How does the tide-operator start a pd cluster?

I've recently been learning about Kubernetes operators. When deploying an etcd cluster, the etcd-operator uses the following creation method: Bootstrap phase: Start a seed member. In the ...
Phoenix Chao's user avatar
0 votes
1 answer
331 views

I do not understand how {int a=10; a+=++a-5/3+6*a; System.out.print(a);} outputs 86

I do not understand how { int a = 10; a += ++a-5/3+6*a; System.out.print(a); } outputs 86 I know that shorthand notation has lower precedence than any of the operator used here so my ...
Vyagh's user avatar
  • 11
0 votes
2 answers
27 views

I want to know which determines the output like not in this case applies to first condition only or both

x=(not (5==5) and (10<12)) print(x) when executing. not negates the first expression or both? In my opinion "not" should be executed with (5==5) only but my colleague says it will affect ...
sana's user avatar
  • 1
0 votes
0 answers
40 views

SQL without using union or union all

I am trying to write a sql query to get table name and counts of multiple tables under same result columns. Final Table: table_name table_count tbl1 10 tbl2 20 tbl3 40.....
Sam Sandy's user avatar
0 votes
2 answers
81 views

When is the dereferencing operator useful? [duplicate]

I am a newbie c-coder, so this probably has a very simple answer. I understand the function of pointers and the dereferencing operator, but I'm not sure when they're actually useful? Basic example: ...
ScoutRr's user avatar
2 votes
1 answer
458 views

Task Mapping over a task group without using decorator

I have implemented a task group that is expected to be reused across multiple DAGs, in one of which utilizing it in a mapping manner makes more sense. Here is the full code of my task group: from ...
Memphis Meng's user avatar
  • 1,581
-1 votes
1 answer
79 views

perform calculation based on the operator passed as method parameter [closed]

I'm trying to do arithmetic operations based on the operators passed as method parameter. I can perform this in many ways but problem is I've a datatable to be operated upon. I cannot pass particular ...
StackUseR's user avatar
  • 958

15 30 50 per page