All Questions

1739
votes
7answers
792130 views

What are the basic rules and idioms for operator overloading?

Note: The answers were given in a specific order, but since many users sort answers according to votes, rather than the time they were given, here's an index of the answers in the order in which they ...
3493
votes
18answers
499998 views

Reference — What does this symbol mean in PHP?

What is this? This is a collection of questions that come up every now and then about syntax in PHP. This is also a Community Wiki, so everyone is invited to participate in maintaining this list. W...
5250
votes
49answers
1294040 views

Which equals operator (== vs ===) should be used in JavaScript comparisons?

I'm using JSLint to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.le...
114
votes
9answers
41287 views

The 3 different equals

What is the difference between =, ==, and ===? I think using one equal sign is to declare a variable while two equal signs is for a comparison condition and lastly three equal signs is for comparing ...
340
votes
10answers
43134 views

"is" operator behaves unexpectedly with integers

Why does the following behave unexpectedly in Python? >>> a = 256 >>> b = 256 >>> a is b True # This is an expected result >>> a = 257 >>> b = 2...
3828
votes
19answers
1161838 views

Does Python have a ternary conditional operator?

If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?
2029
votes
31answers
318216 views

What is the !! (not not) operator in JavaScript?

I saw some code that seems to use an operator I don't recognize, in the form of two exclamation points, like so: !!. Can someone please tell me what this operator does? The context in which I saw thi...
404
votes
19answers
214884 views

How do the PHP equality (== double equals) and identity (=== triple equals) comparison operators differ?

What is the difference between == and ===? How exactly does the loosely == comparison work? How exactly does the strict === comparison work? What would be some useful examples?
118
votes
8answers
22491 views

What does the comma operator , do?

What does the , operator do in C?
1127
votes
8answers
501197 views

What are bitwise shift (bit-shift) operators and how do they work?

I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ... What I'm wondering is, at a core level, what does bit-...

Previous Next