? Scala Dynamics: Ability to add dynamic methods?

I know I can add dynamic "fields" like this:import collection.mutableclass DynamicType extends Dynamic { private val fields = mutable.Map.empty[String, Any].withDefault {key => throw new NoSuchFie
 ? Anonymous recursive function in Scala

Is there a way to write an anonymous function that is recursive in Scala? I'm thinking of something like this:((t: Tree) => { print(t.value); for (c <- t.children) thisMethod(c)})(r
 ? Why does not ; equivalent to the eol?

This question already has an answer here: toList on Range with suffix notation causes type mismatch 2 answers A
 ? Ignore case for a string in scala

Consider:object HelloWorld { def main(args: Array[String]): Unit = { val s:String = "AbcD" println(s.contains("ABCD")) println(s.contains("AbcD")) }}Output:falsetrueI need the result to be
 ? grpc protocol buffer client returns Jetty ALPN/NPN error

When trying to run a a simple scala protocol buffer client through grpc i'm getting the following exception. is there anything i should add to my build.sbt[error] (grpc-default-executor-1) java.lang
 ? Convert query string to map in scala

I have a query string in this form:val query = "key1=val1&key2=val2&key3=val3I want to create a map with the above key/value pairs. So far iam doing it like this://creating an iterator with 2
 ? Use Proguard for Scala AWS Lambda

I have a question regarding the usage of proguard together with a scala aws lambda function. I have created a very simple aws lambda function like this:package exampleimport scala.collection.JavaConve
 ? List all classes in object using reflection

I have an object like:sealed trait Messageobject Message { case class DoSomething(...) extends Message case class DoSomethingElse(...) extends Message ...}what I'm trying to do is to create a list
 ? Scala: Ordering[Int].lt invocation fails for reflective method call

I'm playing with Scala reflection and ScalaTest. I've a method defined as follows in an object Ch2:def isSorted[A](as: Array[A], ordered: (A, A) => Boolean): BooleanThe following test fails as desc
 ? Absolute function

In my program I am using Bigdecimal to truncate numbers and storing them in a variable. Eg. 123.456789 is getting displayed as 123.45.Further I am trying to find the absolute of the numbers.The proble
 ? Is there an OAuth wrapper library for Scala?

Is there an OAuth wrapper library for Scala?I am looking forward to work with my del.icio.us (authenticated via Yahoo account, so I am going to need OAuth) bookmarks base from a Scala code. Is there a
 ? Scala idiom for ordering by multiple criteria

I want to do something like this:class Foo extends Ordered[Foo] { val x val y val z . . . . def compare(that: Foo) = { val c0 = this.length compareTo that.length // prima
 ? spark rank - scala based one second and third elemnts of tuple of RDD

Hi I would like to assign a rank for each row based on second element and third element of tuple ,Here we have sample data . would like to add "1" if the third element of tuple has max value against i
 ? SBT remote debugging works in intellij but not when executing tests

I execute the following command in the terminal sbt -jvm-debug 9999 and start a remote debug configuration with default values in Intellij 15.0.4-1. Next I execute the sbt task run and breakpoints wor
 ? Why does Kotlin compile faster than Scala?

When we read the wikipedia description of the Kotlin programming language, it is stating that: JetBrains lead Dmitry Jemerov said that most languages did not have the features they were looking for,
 ? How to debug an Ammonite script?

Normally my scripts are simple and can be debugged with:printsif it becomes hung with jstackBut can I use a real debugger?Maybe launching the JVM with remote debugging enabled, but I don't know how to

Page 1 of 669  |  Show More Pages:  Top Prev Next Last