This file has been truncated, but you can view the full file.
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
// Version: v1.0.0-pre.2-370-g6a165ad | |
// Last commit: 6a165ad (2013-01-10 15:58:36 -0800) | |
(function() { | |
/*global __fail__*/ | |
/** | |
Ember Debug |
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
App.Router.map (match) -> | |
(match "/user").to "user", (match) -> | |
(match "/").to "userIdx" | |
(match "/settings").to "userSetup", (match) -> | |
(match "/").to "userSetupIdx" | |
(match "/profile").to "userSetupProf" | |
(match "/password").to "userSetupPass" | |
####################################################################################### |
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
val numbers = List(1, 2, 3, 4, 5, 6) | |
val oddNumbers = numbers.filter(_ % 2 != 0) | |
println("oddNumbers = " + oddNumbers); |
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
List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5, 6); | |
List<Integer> oddNumbers = new ArrayList<Integer>(); | |
for (int number : numbers) { | |
if (number % 2 != 0) | |
oddNumbers.add(number); | |
} | |
System.out.println("oddNumbers = " + oddNumbers); |
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
class ClassDeclarationSyntaxInScala { | |
abstract class AbstractDTO(val id: Long) | |
class CustomerDTO(id: Long, var name: String, var roles: List[String]) | |
extends AbstractDTO(id) | |
} |
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
public class ClassDeclarationSyntaxInJava { | |
public abstract class AbstractDTO { | |
private final Long id; | |
public AbstractDTO(Long id) { | |
this.id = id; | |
} | |
public Long getId() { |
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
val customersById = new HashMap[String, Customer] | |
var strings = List ("one", "two", "three") | |
val profit = new BigInteger("12345678.99") |
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
Map<String, Customer> customersById = new HashMap<String, Customer>(); | |
List<String> strings = Arrays.asList("one", "two", "three"); | |
BigInteger profit = new BigInteger("12345678.99"); |
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 scala.reflect.api._ | |
import scala.reflect.runtime._ | |
import scala.reflect.runtime.Mirror._ | |
object Pimps { | |
implicit def pimp(str:String) = new { | |
def test = println("hello") | |
} | |
} |
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
class ListBuilder extends Dynamic { | |
private var res = List[String]() | |
def applyDynamic(method: String)(args: Any*) = { | |
val argString = if (args.length>0) "(" + args.mkString(" ") + ")" else "" | |
res = method + argString :: res | |
this | |
} | |
def result = res.reverse |