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
// Global jasmine hook to prevent errors when attempt to | |
// download a localization .json file in test environment. | |
// Here we are resetting the translate provider to a | |
// safe state. | |
// If a test needs to assert for localized texts, | |
// the test author is free to setup the translate provider | |
// on isolation by overriding its settings. | |
// This wont affect other tests because once the test execution | |
// exits, the translate provider is reset once again to | |
// a safe state. |
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
// Builders | |
class SimpleBuilder { | |
constructor(private current = {}) { | |
} | |
prop(key: string, value: any) { | |
return new SimpleBuilder({ ...this.current, ...{ [key]: value } }); | |
} |
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
declare type Curry<P, V> = | |
P extends [infer A, infer B, infer C, infer D] ? (a: A) => Curry<[B, C, D], V> : | |
P extends [infer A, infer B, infer C] ? (a: A) => Curry<[B, C], V> : | |
P extends [infer A, infer B] ? (a: A) => Curry<[B], V> : | |
P extends [infer A] ? (a: A) => V : | |
() => V; // could be unknow, but this allows to safely pass parameterless functions | |
declare function curry<T extends any[], R>(fn: (...args: T) => R): Curry<T, R>; |
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
(function ($) { | |
$.fubuvalidation.Processor.findElementsWith(function(context) { | |
var element = $("#" + context.key, context.form); | |
if (element.size() == 0) { | |
return; | |
} | |
context.element = element; | |
}); | |
$.fubuvalidation.Processor.findElementsWith(function(context) { | |
var element = $("[name=" + context.key + "]", context.form); |
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
<template> | |
<require from="nav-bar.html"></require> | |
<require from="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></require> | |
<nav-bar router.bind="router"></nav-bar> | |
<div class="page-host" style="margin-top:50px"> | |
<router-view></router-view> | |
</div> | |
</template> |
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.directive 'enterKey', ($timeout) -> | |
(scope, elem, attrs) -> | |
elem.bind 'keydown', (e) -> | |
if e.keyCode is 13 | |
$timeout -> | |
scope.$apply attrs.enterKey | |
, +attrs.enterKeyDelay |
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
object HelloFuturesScala extends App { | |
import scala.concurrent._ | |
import scala.concurrent.duration._ | |
import ExecutionContext.Implicits.global | |
def identityFunction(number:Int) = { | |
Thread.sleep(3000) | |
number | |
} | |
println("Hello Futures Scala") |
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
Gtk-Message: Failed to load module "overlay-scrollbar" | |
`menu_proxy_module_load': skype-bin: undefined symbol: menu_proxy_module_load | |
(skype-bin:18177): Gtk-WARNING **: Failed to load type module: (null) | |
`menu_proxy_module_load': skype-bin: undefined symbol: menu_proxy_module_load | |
(skype-bin:18177): Gtk-WARNING **: Failed to load type module: (null) | |
`menu_proxy_module_load': skype-bin: undefined symbol: menu_proxy_module_load |
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
Your overall score for this assignment is 9.58 out of 10.00 | |
The code you submitted did not pass all of our tests: your submission achieved a score of | |
7.58 out of 8.00 in our tests. | |
In order to find bugs in your code, we advise to perform the following steps: | |
- Take a close look at the test output that you can find below: it should point you to | |
the part of your code that has bugs. | |
- Run the tests that we provide with the handout on your code. | |
- The tests we provide do not test your code in depth: they are very incomplete. In order |
NewerOlder