Top "Operators" questions

What is the "=~" operator in Ruby?

I saw this on a screencast and couldn't figure out what it was. Reference sheets just pile it in with …

ruby operators
Why '&&' and not '&'?

Why is && preferable to & and || preferable to |? I asked someone who's been programming for years and his …

c# operators
Understanding the behavior of a single ampersand operator (&) on integers

I understand that the single ampersand operator is normally used for a 'bitwise AND' operation. However, can anyone help explain …

c# operators bitwise-operators
Is relying on && short-circuiting safe in .NET?

Assume myObj is null. Is it safe to write this? if(myObj != null && myObj.SomeString != null) I know …

c# .net operators logical-operators short-circuiting
What does the := operator mean in mysql?

I have a mysql table (scho_id,school_name,school_views). I was looking for a mysql query to get …

mysql operators rank colon-equals
What is "?:" notation in JavaScript?

I found this snippet of code in my travels in researching JSON: var array = typeof objArray != 'object' ? JSON.parse(objArray) : …

javascript syntax coding-style operators notation
Why are bitwise shifts (<< and >>) used for cout and cin?

Question is in the title really; I'm sure there is something logical, but for now I'm stumped!

c++ io operators
Creating `**` power operator for Scala?

I quite like the ** syntax for pow, available in many languages (such as Python). Is it possible to introduce this …

scala operators operator-overloading scala-2.10 pow
Ambiguous reference to member '=='

That must be a basic mistake, but I can't see what is wrong in this code: .... object is some NSManagedObject .... …

ios swift operators arithmetic-expressions
What does !! (double exclamation point) mean?

In the code below, from a blog post by Alias, I noticed the use of the double exclamation point !!. I …

perl operators boolean negation