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 org.http4k.connect.amazon.dynamodb.mapper.DynamoDbIndexMapper | |
import org.http4k.connect.amazon.dynamodb.model.Attribute | |
import org.http4k.connect.amazon.dynamodb.model.AttributeName | |
import org.http4k.connect.amazon.dynamodb.model.AttributeValue | |
class Query( | |
val keyConditionExpression: String?, | |
val filterExpression: String?, | |
val expressionAttributeNames: Map<String, AttributeName>?, | |
val expressionAttributeValues: Map<String, AttributeValue>? |
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
/****************************************************************************************** | |
* Input helper for Computer Futures worksheets | |
* - adds automatically missing zeros (9 -> 09:00) | |
* - computes total day working time and displays it also in human readable form (7.42 -> 7:25) | |
* - enables cursor navigation between input fields | |
* - removes all pre-filled entries from an empty worksheet | |
* (c) Oliver Becker, 2016-2018 | |
******************************************************************************************/ | |
(function() { |
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
let numbers = AnySequence { () -> AnyGenerator<Int> in | |
var i = 1 | |
return anyGenerator { | |
return i++ | |
} | |
}.lazy | |
let fizzes = numbers.map { $0 % 3 == 0 ? "Fizz" : "" } | |
let buzzes = numbers.map { $0 % 5 == 0 ? "Buzz" : "" } |
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
indirect enum Route : CustomStringConvertible { | |
case End | |
case Down(Route) | |
case Left(Route) | |
var description: String { | |
switch self { | |
case .End: return "" | |
case .Down(let way): return "⬇︎\(way)" | |
case .Left(let way): return "⬅︎\(way)" |