(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
'.platform-win32 .editor, .platform-linux .editor': | |
'ctrl-shift-L': 'editor:split-selections-into-lines' | |
'ctrl-shift-up': 'editor:add-selection-above' | |
'ctrl-shift-down': 'editor:add-selection-below' |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// Illustration of a side effect when using string variable/constant for map's key | |
def PROP_NAME = "property name" | |
def myMap = [PROP_NAME: "a Value"] | |
//assert myMap.keySet().iterator().next() == "property name" | |
// fails at runtime but it compiles. | |
// I was expecting the value of the variable to be the key, but it is in fact a String with the name of the variable |
import java.text.DecimalFormat; | |
... | |
DecimalFormat df = new DecimalFormat("###,##0.00"); | |
df.format(number); | |
// in the format string, | |
// # -> shows Digit if present else blank | |
// 0 -> shows Digit if present else 0 | |
// details at : http://docs.oracle.com/javase/6/docs/api/java/text/DecimalFormat.html |