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.

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 + ...
enies lobby's user avatar
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 ...
TheBoomNL's user avatar
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; ...
user24509156's user avatar
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 ...
timd's user avatar
  • 376
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....
dqqqq98's user avatar
  • 13
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 ...
Monika chibh's user avatar
-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 ...
Steve Bennett's user avatar
-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....
deconya's user avatar
  • 81
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* ...
Pascal Gicquel's user avatar
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, ...
TrayMan's user avatar
  • 7,397
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 ...
maponda1's user avatar
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"...
Dhrumil Dave's user avatar
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"]/...
Aminah Nuraini's user avatar
-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){ ...
wayne's user avatar
  • 3
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&...
Cort Ammon's user avatar
  • 10.6k

15 30 50 per page