Advanced Search
Have you seen a function declared like this?
def foo a, **b
...
end
I understand that a single *
is the splat operator. What does **
mean?
Possible Duplicate:
What is the !! operator in JavaScript?
What does !! (double exclamation point) mean?
I am going through some custom JavaScript code at my workplace and I am not able to understand the following construct.
var myThemeKey = (!!$('row') && $('row').hasClassName('green-theme')) ? 'green' : 'white';
I understand everything on the above line except !!
operator. I assume that it is a NOT
operator and NOT
of NOT
is the original value but why would someone do a NOT
of NOT
?
Can someone please help me understand what is happening on the above line of code?
What does this mean in Python:
sock.recvfrom(2**16)
I know what sock is, and I get the gist of the recvfrom
function, but what the heck is 2**16
? Specifically, the two asterisk/double asterisk operator?
(english keywords, because it's hard to search for this: times-times star-star asterisk-asterisk double-times double-star double-asterisk operator)
Possible Duplicate:
What is the “double tilde” (~~) operator in JavaScript?
I found this snip of code in a node.js library's source. What effect does ~~
have on the input
variable?
inArray[3] = ~~input;
It's also used in other ways:
return ~~ ((a - b) / 864e5 / 7 + 1.5);
Possible Duplicates:
Lamda Explanation and what it is as well as a good example
What is the => token called?
I have seen this code:
myContext.SomeEntities.Single(x => x.code == code);
And I don´t know what does the => operator do.
Every search on google about the operator returns no results.
Thank you.