Top "Shorthand" questions

Multiline string literal in C#

Is there an easy way to create a multiline string literal in C#? Here's what I have now: string query = "…

c# string shorthand
Omitting the second expression when using the if-else shorthand

Can I write the if else shorthand without the else? var x=1; x==2 ? dosomething() : doNothingButContinueCode(); I've noticed putting null for …

javascript ternary-operator conditional-operator shorthand
What exactly does += do in python?

I need to know what += does in python. It's that simple. I also would appreciate links to definitions of other …

python operators notation shorthand compound-assignment
CSS transition shorthand with multiple properties?

I can't seem to find the correct syntax for the CSS transition shorthand with multiple properties. This doesn't do anything: .…

css webkit css-transitions shorthand
$(document).ready shorthand

Is the following shorthand for $(document).ready? (function($){ //some code })(jQuery); I see this pattern used a lot, but I'm …

javascript jquery document-ready shorthand
Shorthand if/else statement Javascript

I'm wondering if there's a shorter way to write this: var x = 1; if(y != undefined) x = y; I initially tried …

javascript shorthand
PHP shorthand for isset()?

Is there a shorthand way to assign a variable to something if it doesn't exist in PHP? if(!isset($var) { $…

php isset shorthand
What does "nit" mean in hacker-speak?

When someone writes "nit: removed whitespace" on a commit, what does "nit" mean? I've also seen it capitalized as if …

shorthand abbreviation
Which "if" construct is faster - statement or ternary operator?

There are two types of if statements in java - classic: if {} else {} and shorthand: exp ? value1 : value2. Is one …

java performance if-statement shorthand premature-optimization
PHP if shorthand and echo in one line - possible?

What's the best, preferred way of writing if shorthand one-liner such as: expression ? $foo : $bar Plot twist: I need to …

php if-statement echo shorthand