jvm-home() {
JAVACMD=$(which echo) "$1" | tr -s '[:space:]' '\n' | grep -F "$1.home=" | cut -d= -f2
}$ jvm-home groovy
/usr/share/groovyjvm-home() {
JAVACMD=$(which echo) "$1" | tr -s '[:space:]' '\n' | grep -F "$1.home=" | cut -d= -f2
}$ jvm-home groovy
/usr/share/groovyI've even seen implementations that compare objects using
JSON.stringify.
I would expect a memoizer and most hash code/table implementations to treat { foo: "bar", baz: "quux" } and { baz: "quux", foo: "bar" } as equivalent, but many implementations use JSON.stringify, which doesn't guarantee this:
$ node
> JSON.stringify({ foo: "bar", baz: "quux" })
'{"foo":"bar","baz":"quux"}'
> JSON.stringify({ baz: "quux", foo: "bar" })
'{"baz":"quux","foo":"bar"}'
| // Groovy's Elvis operator | |
| // | |
| // lhs ?: rhs | |
| // | |
| // is equivalent to: | |
| // | |
| // lhs == null ? rhs : lhs | |
| // | |
| // or: | |
| // |
| " name: GitHub-Flavored Text for Vim | |
| " | |
| " description: highlight embedded code blocks with GitHub-Flavored Markdown code fences | |
| " | |
| " based on: http://vim.wikia.com/wiki/VimTip857 | |
| " | |
| " keywords: syntax highlighting, single file, same file, multi, multiple, github flavoured text, | |
| " github flavored vim, github flavoured vim, polyglot, guard, guards, fenced | |
| " | |
| " example: |