Code
Scala.js – Referring to non-existent class
Thursday, September 9th, 2021Related issue: https://github.com/scala-js/scala-js/issues/629 If the issue is coming from a shared module being used in both a Scala.js and JVM setting, the issue may be that the shared module is not being compiled for Scala.js. We can fix that as follows by compiling it for both. Mill example below:
Accessing SQL databases from Scala
Wednesday, July 21st, 2021You can run the database with Docker (example) as follows: Reference instructions for connecting to the docker instance:
Local build in npm
Monday, May 24th, 2021Python classes, metaclasses, and instances at a glance
Tuesday, February 16th, 2021For more details: http://www.thedigitalcatonline.com/blog/2014/09/01/python-3-oop-part-5-metaclasses/
git-strip-above
Monday, February 15th, 2021git format-patch $1..HEAD -o wip && git reset –hard $1
Getting files from sources in Scala
Sunday, February 14th, 2021// Java-based ways getClass.getResource(“/html/myfile.html”) println(Source.fromInputStream(getClass.getResourceAsStream(“/html/myfile.html”)).mkString) // Scala-native way // Note: NO LEADING SLASH println(Source.fromResource(“html/myfile.html”).getLines.toList)