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 scala.deriving.Mirror.ProductOf | |
object Decoder { | |
type Row = List[String] | |
extension (row: Row) | |
def as[T](using p: ProductOf[T], d: RowDecoder[p.MirroredElemTypes]): T = | |
p.fromProduct(d.decode(row)) | |
trait RowDecoder[A]: |
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 aten.ssl; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.net.InetSocketAddress; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import javax.net.ssl.SSLServerSocketFactory; |
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
public static String formatWithStackInfo(String message) { | |
/** | |
* ex.getStackTrace()[0] is this formatWithStackInfo() method ex.getStackTrace()[1] | |
* is your method where you call this method | |
*/ | |
StackTraceElement ste = new Throwable().getStackTrace()[1]; | |
String callerClassName = ste.getClassName(); | |
int callerLineNumber = ste.getLineNumber(); |