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
var species = Array.from(document.getElementsByTagName('section')) | |
.filter((section) => section.classList.contains('Observation')) | |
.filter((section) => section.children.length > 1 && section.children[0].children.length > 0) | |
.map((section) => section.children[1].innerText) | |
.join('\n'); | |
const newDiv = document.createElement('div'); | |
newDiv.style.background = 'mistyrose'; | |
newDiv.style.borderRadius = '10px'; | |
newDiv.style.padding = '25px'; |
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
private fun ClosedRange<Int>.random() = | |
Random().nextInt(endInclusive - start) + start | |
private fun getVote(vote: Boolean): Single<Boolean> { | |
return Single.just(vote) | |
.delay((1000..3000).random().toLong(), TimeUnit.MILLISECONDS) | |
} | |
private fun getConsensus(voteList: List<Boolean>): Boolean? { | |
return Observable.fromIterable(voteList) |