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 fiddle.Fiddle, Fiddle.println | |
import scalajs.js | |
import scalacss.Defaults._ | |
@js.annotation.JSExport | |
object ScalaFiddle { | |
println( MyStyles.render ) | |
} | |
object MyStyles extends StyleSheet.Inline { |
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 japgolly.scalajs.react._ | |
import org.scalajs.dom | |
import org.scalajs.dom.raw.{HTMLElement, MouseEvent} | |
object Dropdown { | |
import japgolly.scalajs.react.vdom.all._ | |
case class State(isOpen: Boolean = false) | |
case class Props(classes: String, content: ReactNode) |
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
// $FiddleDependency org.scala-js %%% scalajs-dom % 0.9.0 | |
// $FiddleDependency com.lihaoyi %%% scalatags % 0.5.4 | |
import scalatags.JsDom.all._ | |
import org.scalajs.dom | |
import fiddle.Fiddle, Fiddle.println | |
import scalajs.js | |
object ScalaFiddle extends js.JSApp { | |
def main() = { | |
// $FiddleStart |
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
"Macau", | |
"Macedonia", | |
"Madagascar", | |
"Malawi", | |
"Malaysia", | |
"Maldives", | |
"Mali", | |
"Malta", | |
"Marshall Islands", | |
"Mauritania", |
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 poc | |
import org.scalajs.dom | |
import scala.scalajs.js | |
import scala.scalajs.js.annotation.JSExport | |
@js.native | |
object WorkerGlobal extends js.GlobalScope { | |
def addEventListener(`type`: String, f: js.Function): Unit = js.native |
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 com.amazonaws.HttpMethod | |
import com.amazonaws.services.s3.AmazonS3Client | |
import com.amazonaws.services.s3.model._ | |
... | |
val s3Client = new AmazonS3Client | |
private def getFlow(pathRaw: String, method: HttpMethod) = { | |
// clean the path | |
val path = pathRaw.dropWhile(_ == '/').trim |
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
// $FiddleDependency org.scala-js %%% scalajs-dom % 0.9.0 | |
// $FiddleDependency com.lihaoyi %%% scalatags % 0.5.4 | |
import scalatags.JsDom.all._ | |
import org.scalajs.dom | |
import fiddle.Fiddle, Fiddle.println | |
import scalajs.js | |
object ScalaFiddle extends js.JSApp { | |
def main() = { | |
// $FiddleStart |
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 scala.tools.nsc.interactive, scala.tools.nsc.reporters._, scala.tools.nsc._ | |
object Test { | |
def main(args: Array[String]): Unit = { | |
val reporter = new StoreReporter | |
val s = new Settings() | |
s.processArgumentString("-Ypresentation-any-thread") | |
val global = new interactive.Global(s, reporter) | |
import global._ | |
val Cursor = ""//"_DUMMY_ " |
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
.room-list-item__unread-badge { | |
color: black; | |
} | |
pre code { | |
text-rendering: optimizeLegibility; | |
font-family: Hasklig, monospace; | |
} |
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 math._ | |
val (h, w) = (Page.canvas.height, Page.canvas.width) | |
var x = 0.0 | |
// $FiddleStart | |
val graphs = Seq[(String, Double => Double)]( | |
("red", sin), | |
("green", x => 2 - abs(x % 8 - 4)), | |
("blue", x => 3 * pow(sin(x / 12), 2) * sin(x)) | |
) | |
// $FiddleEnd |
NewerOlder