Skip to content

Instantly share code, notes, and snippets.

View FloWi's full-sized avatar

Florian Witteler FloWi

View GitHub Profile
@FloWi
FloWi / calc.scala
Last active June 18, 2021 17:52
ganzzahlige Vektorlängen
val maxNum = 20
val res = for {
x <- 1.to(maxNum)
y <- x.to(maxNum)
z <- y.to(maxNum)
squareSum = x*x+y*y+z*z
sqrtSquareSum = math.sqrt(squareSum)
if (sqrtSquareSum.toInt.toDouble == sqrtSquareSum)
} yield s"$x,$y,$z,$squareSum,${sqrtSquareSum.toInt}"
Error:scalac: Error: org.jetbrains.jps.incremental.scala.remote.ServerException
java.lang.StackOverflowError
at scala.reflect.internal.Names$Name.decode(Names.scala:460)
at scala.reflect.internal.Names$TypeName.decode(Names.scala:598)
at scala.reflect.internal.Symbols$Symbol.decodedName(Symbols.scala:1269)
at scala.reflect.internal.Types$TypeRef.$anonfun$isShowAsInfixType$3(Types.scala:2091)
at scala.reflect.internal.Types$TypeRef.isShowAsInfixType(Types.scala:2091)
at scala.reflect.internal.Types$TypeRef.customToString(Types.scala:2372)
at scala.reflect.internal.Types$TypeRef.safeToString(Types.scala:2382)
at scala.reflect.internal.tpe.TypeToStrings.typeToString(TypeToStrings.scala:55)
package doobietest
import com.zaxxer.hikari.{HikariConfig, HikariDataSource}
import doobie.hikari.HikariTransactor
import monix.eval.Task
import org.scalatest.{BeforeAndAfterEach, FunSuite, Matchers}
import scala.concurrent.Await
import scala.concurrent.duration.{FiniteDuration, _}
[INFO] ------------------------------------------------------------------------
[INFO] Building JavaCPP Presets for FlyCapture 2.7.3.19-0.11
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ flycapture ---
[INFO]
[INFO] --- maven-resources-plugin:2.4:resources (generate-sources) @ flycapture ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/flwi/dev/playground/javacpp-presets/flycapture/src/main/resources
[INFO]
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000304085203b, pid=27392, tid=139897653995264
#
# JRE version: Java(TM) SE Runtime Environment (8.0_40-b25) (build 1.8.0_40-b25)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.40-b25 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libtesseract.so.3+0x25203b] ERRCODE::error(char const*, TessErrorLogCode, char const*, ...) const+0x16b
#
package utils
import akka.actor.{Actor, ActorSystem}
import akka.testkit.{ImplicitSender, TestActorRef, TestKit}
import org.scalatest.FunSuiteLike
import scala.concurrent.duration._
class StatefulnessBetweenTestsWithImplicitSenderSpec extends TestKit(ActorSystem("MyTestSystem"))
with FunSuiteLike
@FloWi
FloWi / foobar.cs
Created March 8, 2012 10:47
IEnumerable<T> extension
public static class IEnumerableExtensions
{
public static IEnumerable<T> OrEmpty<T>(this IEnumerable<T> t)
{
return t ?? Enumerable.Empty<T>();
}
public static IEnumerable<T> OrEmpty_WontCompile<T>(this T t)
{
return t ?? Enumerable.Empty<T>();
# Generates a series of substitution cipher puzzles. The messages to
# "encrypt" are take from a text file passed on the command-line,
# where each message is on one line.
#
# The output is a PDF, "codes.pdf".
#
# This was written for my 7 year-old, who loves doing substitution
# ciphers.
require 'rubygems'
require 'prawn'