- Create a new Implementation of
Logger
that makes all message uppercase and replace the existing one. - Create a new Implementation of
Logger
that inherits from the uppercase version. Add new functionality - Create a new
LogHandler
that inherits fromLogHandler
. This should allow for theLogger
to be changed after the constructor is used - Create a new
LogHandler
that can accept multipleLoggers
and uses all of them to display messages
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
fun AppConfig.shouldUpdate(appVersion: String): Boolean { | |
val appNumbers = appVersion.substringBefore(" ").split(".").map { it.toInt() } | |
val minNumbers = minAndroidVersion.split(".").map { it.toInt() } | |
appNumbers.forEachIndexed { index, number -> | |
val minNumber = minNumbers.elementAtOrElse(index) { 0 } | |
if (number > minNumber) { | |
return false | |
} else if (number < minNumber) { | |
return true | |
} |
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
{ | |
"employees":[ | |
{ | |
"imageUrl":" ", | |
"name":"Sam Doward" | |
}, | |
{ | |
"imageUrl":"", | |
"name":"Enrique Anaya" | |
}, |
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
sealed class HomeCard { | |
data class Campaign(val campaignId: String, | |
val imageUrl: String, | |
val videoUrl: String?, | |
val mapUrl: String, | |
val title: String, | |
val progress: Int, | |
val footer: Footer) : HomeCard() |
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
{ | |
"cameraPage": { | |
"id": "camera_test123", | |
"text1": "", | |
"text2": "", | |
"image": null, | |
"data": { | |
"campaignId": "yemen", | |
"teamId": "asfasdf", | |
"meals": 234, |
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
#!/bin/sh | |
# Suppose you want to do blind reviewing of code (eg for job interview | |
# purposes). Unfortunately, the candidates' names and email addresses are | |
# stored on every commit! You probably want to assess each candidate's version | |
# control practices, so just `rm -rf .git` throws away too much information. | |
# Here's what you can do instead. | |
# Rewrite all commits to hide the author's and commiter's name and email | |
for branch in `ls .git/refs/heads`; do |