Version: 2022.03.02
This file contains hidden or 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 React, { useState, useMemo } from 'react'; | |
| import { | |
| Activity, | |
| Server, | |
| Cloud, | |
| Settings, | |
| Info, | |
| BarChart3, | |
| CheckCircle2, | |
| Trophy, |
This file contains hidden or 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 org.public_domain.java.utils; | |
| import java.util.Iterator; | |
| import java.util.stream.Stream; | |
| import java.util.stream.StreamSupport; | |
| import org.jetbrains.annotations.NotNull; | |
| /** | |
| * File: org.public_domain.java.utils.StreamUtils.java | |
| * <p> |
This file contains hidden or 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 org.public_domain.java.utils; | |
| import java.util.*; | |
| import java.util.Map.Entry; | |
| import java.util.function.Function; | |
| import java.util.function.Supplier; | |
| /** | |
| * File: org.public_domain.java.utils.Memoizer.java | |
| * <p> |
This file contains hidden or 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
| //StackOverflow Question: https://stackoverflow.com/q/77362860/501113 | |
| //Updated/fixed the 5 code files to incorporate the answer by Turing85: https://stackoverflow.com/users/4216641/turing85 | |
This file contains hidden or 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 org.public_domain.java.utils; | |
| import java.util.NoSuchElementException; | |
| import java.util.Objects; | |
| import java.util.Optional; | |
| import java.util.function.Consumer; | |
| import java.util.function.Function; | |
| import java.util.function.Predicate; | |
| import java.util.function.Supplier; | |
| import org.jetbrains.annotations.NotNull; |
This file contains hidden or 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 org.public_domain | |
| import zio.console._ | |
| import zio.{ExitCode, UIO, URIO, ZIO} | |
| import java.io.IOException | |
| object PurelyFunctionalHangman extends zio.App { | |
| def run(args: List[String]) : URIO[Console, ExitCode] = | |
| hangman.exitCode |
This file contains hidden or 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 scalatags.JsDom.all._ | |
| val textAreaInput = | |
| textarea.render | |
| val buttonExecuteTransform = | |
| button("Execute Transform").render | |
| val textAreaOutput = | |
| textarea.render |
This file contains hidden or 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
| //C1 - Initial Scala solution attempt | |
| val lettersToDigitsPrefixSize = 3 | |
| val letterToDigits = | |
| List( | |
| 'a' -> List(1, 3, 7, 9), | |
| 'b' -> List(2, 4, 6, 8), | |
| 'c' -> List(1, 3, 7, 9), | |
| 'd' -> List(2, 4, 6, 8), |
This file contains hidden or 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 org.public_domain.scrabble | |
| import scala.util.{Success, Failure, Random, Try} | |
| object Bag { | |
| //copy and paste directly from provided URL at "Tile count and value ordered by count" | |
| // with "Blank" replaced with "_": | |
| // http://scrabblewizard.com/scrabble-tile-distribution/ | |
| private val countByTileFull = | |
| """E 12 1 |
NewerOlder