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 UIKit | |
import JCNotificationBannerPresenter | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { |
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
// protractor configuration file for cucumber | |
exports.config = { | |
allScriptsTimeout: 11000, | |
specs: [ | |
'features/**/*.feature' | |
], | |
capabilities: { | |
'browserName': 'chrome' |
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
{ | |
"edid": { | |
"dmt_found": false, | |
"hdmi_audio": true, | |
"is_monitor": true, | |
"model": "HDMI", | |
"preferred_group": "DMT", | |
"preferred_hz": 60.0, | |
"preferred_mode": 27, | |
"preferred_res": "1280x800p", |
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
renderBodyContentOn: html | |
|modalDOMElement microphone audioDomElement audioUrl| | |
html button | |
with: 'Add message'; | |
class: 'btn btn-primary'; | |
onClick: [modalDOMElement asJQuery modal: 'show']. | |
modalDOMElement := html div class:'modal fade'; with:[ | |
html style with: ' |
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
test("proper inserts and lookups and remove") { | |
val topNode = system.actorOf(Props[BinaryTreeSet]) | |
topNode ! Contains(testActor, id = 1, 1) | |
expectMsg(ContainsResult(1, false)) | |
topNode ! Insert(testActor, id = 2, 1) | |
expectMsg(OperationFinished(2)) | |
topNode ! Remove(testActor, id = 4, 1) |
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
test("Test empty tree 'Contains'") { | |
// behind the scene this on create a node actor - follow props: Props(classOf[BinaryTreeNode], elem, initiallyRemoved) | |
val testNode = system.actorOf(BinaryTreeNode.props(0, true)) | |
testNode ! Contains(testActor, id = 1, 0) | |
expectMsg(ContainsResult(1, false)) | |
} | |
test("Test empty tree 'Insert'") { |
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
package week12 | |
import akka.actor.Actor | |
import akka.actor.Props | |
import akka.event.LoggingReceive | |
class TransferMain extends Actor { | |
val accountA = context.actorOf(Props[BankAccount], "accountA") | |
val accountB = context.actorOf(Props[BankAccount], "accountB") |
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
test("recovered standalone") { | |
val ex = new NoSuchElementException | |
// exception in the end | |
val o1 = Observable(1, 2, 3) ++ Observable(ex) | |
val o1Revocered = o1.recovered | |
assert(o1Revocered.toBlockingObservable.toList === List(Success(1), Success(2), Success(3), Failure(ex))) | |
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
[ | |
{ | |
"id":"1", | |
"title":"Plan 1 title", | |
"description":"Plan 1 description", | |
"instructions":[ | |
{ | |
"id":"1_1", | |
"title":"Instruction 1" | |
}, |
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 nestCollection(model, attributeName, nestedCollection) { | |
//setup nested references | |
for (var i = 0; i < nestedCollection.length; i++) { | |
model.attributes[attributeName][i] = nestedCollection.at(i).attributes; | |
} | |
//create empty arrays if none | |
nestedCollection.bind('add', function (initiative) { | |
if (!model.get(attributeName)) { | |
model.attributes[attributeName] = []; |
NewerOlder