This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiled from "MatchVsVal.scala" | |
public class MatchVsVal { | |
public scala.Tuple2<java.lang.Object, java.lang.Object> source(int); | |
Code: | |
0: getstatic #17 // Field scala/Predef$.MODULE$:Lscala/Predef$; | |
3: invokevirtual #21 // Method scala/Predef$.$qmark$qmark$qmark:()Lscala/runtime/Nothing$; | |
6: athrow | |
public double matchVersion(int); | |
Code: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.ref.WeakReference; | |
import java.util.function.Supplier; | |
public class App { | |
public static void main(String[] args) { | |
System.out.println("Using lambda, does NOT hold on to unreferenced local variable:"); | |
Object strong0 = new Object(); | |
Supplier<WeakReference<Object>> s0 = lambda(strong0); | |
System.out.println(strong0); | |
System.out.println(s0.get()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('test', []) | |
.directive('placeholder', function($timeout){ | |
var i = document.createElement('input'); | |
if ('placeholder' in i) { | |
return {} | |
} | |
return { | |
link: function(scope, elm, attrs){ | |
if (attrs.type === 'password') { | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git stuff (pulled from https://github.com/git/git/tree/master/contrib/completion) | |
if [ -f ~/.git-completion.bash ] ; then . ~/.git-completion.bash ; fi | |
if [ -f ~/.git-prompt.sh ] ; then . ~/.git-prompt.sh ; fi | |
# see .git-prompt.sh for explanation of the (and other) options | |
export GIT_PS1_SHOWDIRTYSTATE=true GIT_PS1_SHOWSTASHSTATE=true GIT_PS1_SHOWUPSTREAM=auto | |
# append history file after each command and execute the git PS1 embed generator | |
PROMPT_COMMAND='history -a ; MY_GIT_PS1="`__git_ps1`"' | |
# better prompt (window title gets directory and git info, nice colors, last cmd status indicator) | |
PS1='\[\e]0;\w$MY_GIT_PS1\007\e[0;1;34m\]\u \[\e[32m\]\w$MY_GIT_PS1 `[ $? -eq 0 ]&&echo ":)\[\e[0;31"||echo "\[\e[31m\]:(\[\e[21"`m\] \$\[\e[0m\] ' |