Top "Operators" questions

What is the difference between i = i + 1 and i += 1 in a 'for' loop?

I found out a curious thing today and was wondering if somebody could shed some light into what the difference …

python loops numpy operators
Boolean operators ( &&, -a, ||, -o ) in Bash

Can someone please explain the difference between the &&, ||, -a, and -o Unix operators? What are the restrictions on …

bash shell unix boolean operators
Bitwise operation and usage

Consider this code: x = 1 # 0001 x << 2 # Shift left 2 bits: 0100 # Result: 4 x | 2 # Bitwise OR: 0011 # Result: 3 x & 1 # Bitwise AND: 0001 # Result: 1 …

python binary operators bit-manipulation
How do I print the percent sign(%) in c

I am a beginner in C, and I was wondering why this program does not print % sign? The code is: #…

c operators percentage
What is the difference between the | and || or operators?

I have always used || (two pipes) in OR expressions, both in C# and PHP. Occasionally I see a single pipe …

c# php operators
Concatenate two string literals

I am reading Accelerated C++ by Koenig. He writes that "the new idea is that we can use + to concatenate …

c++ string syntax operators concatenation
What does map(&:name) mean in Ruby?

I found this code in a RailsCast: def tag_names @tag_names || tags.map(&:name).join(' ') end …

ruby syntax operators parameter-passing
How do I overload the square-bracket operator in C#?

DataGridView, for example, lets you do this: DataGridView dgv = ...; DataGridViewCell cell = dgv[1,5]; but for the life of me I can't …

c# collections operators operator-overloading
How to compare two object variables in EL expression language?

I am creating a drop down list of all languages. The default language selection for the list will be determined …

jsp operators jstl el object-comparison
R: += (plus equals) and ++ (plus plus) equivalent from c++/c#/java, etc.?

Does R have a concept of += (plus equals) or ++ (plus plus) as c++/c#/others do?

r operators variable-assignment increment