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.
operators
7,831
questions
0
votes
1
answer
39
views
Remove boilerplate code when writing operator overloads
When I made my vector3 struct I noticed the operator functions were almost identical to eachother
vector3 vector3::operator+(float scalar) const {
return vector3(x + scalar, y + scalar, z + ...
2
votes
0
answers
71
views
How to cast to derived class type without dereferencing the base class pointer?
Background
Hello, I am trying to create a way of type checking on casting between derived class types. To do so I want to inform the user when they cast to a type that might cause data loss. Having ...
0
votes
0
answers
17
views
How to build a polymorphic cluster based on a virtual one within the class hierarchy operator method + and demonstrate the mechanism of late binding?
In the base class I defined this operator (I declared it as virtual in the header file):
String String::operator+(String& other) {
int newLength = getTrueSize() + other.getTrueSize() + 1;
...
0
votes
0
answers
100
views
OpenShift Operators clash over InstallModeType
OpenShift V4.12, have four operators installed in namespace openshift-operators, however they clash over there required InstallModeType. When the default global operator-group within the namespace is ...
1
vote
2
answers
61
views
The "-" Operator in SQL where condition
I am encountering a rather peculiar syntax in MySQL, specifically the presence of a '-' symbol within the WHERE condition in the following query.
SELECT
users.id
FROM
users
WHERE
users....
0
votes
0
answers
17
views
Can anyone tell me that how html operators will work in ckeditor?
& , < and > operators are not working. When i have entered these operators cursor moves at start of line bydefault.
I have replaced these operators with others also but didn't work and also ...
-1
votes
2
answers
156
views
Is Observable's "viewof" really an operator? [closed]
I'm confused by Observable's use of the word "operator" in their documentation, and wondering whether they have misused it, or I'm simply not understanding.
Observable has a special viewof ...
-1
votes
1
answer
99
views
groovy find operator produce java.io.NotSerializableException: java.util.regex.Matcher
Im working in a pipeline with groovy and I found this problem with find operator where all solutions didn't work.
after this code:
stage('Get build artifacts') {
def buildNumber = (params....
0
votes
0
answers
35
views
How to numerically solve the diffferential equation giving the ground states of a Bose-Einstein condensate?
I am trying to solve the differential equation giving the ground states of a Bose-Einstein Condensate in 2D. I need to solve it in C/C++.
I have an equation that is as follows : (vn+1-vn)/dTau = 1/2* ...
0
votes
0
answers
47
views
Prefix type operators in Scala?
Scala allows writing infix operators for types, just as for expressions:
type ->[P,Q] = P => Q
Making X -> Y equivalent to writing ->[X,Y].
I would like to have a unary prefix operator, ...
0
votes
3
answers
80
views
How to return integer part using backslash when dividing two decimals in Visual Basic
I am trying to divide two decimals and want to get the exact integer part of the result only using a\b. Consider the following example:
Dim a, b As Integer
a = 200
b = 2
...
0
votes
0
answers
19
views
Why A = B = C not the same as A = B AND B = C AND C = A in MySQL Case When Statement? [duplicate]
Here is a table Numbers:
+--+--+--+
|A |B |C |
+--+--+--+
|1 |1 |1 |
|1 |2 |1 |
|2 |2 |2 |
|3 |2 |1 |
|3 |3 |3 |
+--+--+--+
Now executing the query:
SELECT CASE WHEN (A = B = C) THEN "Equal"...
1
vote
1
answer
20
views
Why my OR operator doesn't work on XPATH? [duplicate]
I've tried both
//th[text()="Seller Finanacing Available"]/following-sibling::td[text()="Yes" OR text()=""]
and
//th[text()="Seller Finanacing Available"]/...
-2
votes
1
answer
60
views
Why is my or operator not working in my while loop [duplicate]
Im trying to use an or operator the the parameters of my while loop and its not working.
import javax.swing.JOptionPane;
public class Checkpoint203P5 {
public static void main(String[] args){
...
0
votes
1
answer
68
views
Does C++ guarantee shortcutting for compile time constants?
I have a compile-time condition, using std::conditional<cond, TypeA, TypeB>. In my case, the condition is a disjunction, along the lines of SimpleCondition<T>::value || ComplexCondition&...