scala-2.10 Questions
2
Solved
I have created one small program and in order to test it I have write small Scala Test class. But when I tried to execute scala test I was getting below error, please advise,
java.lang.NoSuchMetho...
Aphonic asked 12/12, 2014 at 23:9
4
I'm trying to call the Selenium Java libraries from Scala. I'm using Scala IDE (Eclipse), and Scala 2.10.2. What is causing this compiler error?
error while loading Function, class file '/Dev/sele...
Brahma asked 3/9, 2013 at 19:15
3
Solved
I am using a project with cross-build for Scala 2.8, 2.9 and (hopefully) 2.10, using SBT. I would like to add the -feature option when compiling with 2.10 only.
In other words, when I compile wit...
Twoway asked 27/9, 2012 at 16:43
5
Solved
For example, I want to create the following query:
SELECT c.* FROM Coffees c WHERE c.name IN ('robusta', 'arabica')
My attempt failed:
val cnames = List("robusta", "arabica")
sql""" SELECT c.* ...
Irrelevance asked 1/7, 2013 at 15:41
3
Solved
After switching to Scala 2.10 I get tons of warnings:
reflective access of structural type member method ... should be enabled by making the implicit value language.reflectiveCalls visible
Wha...
Mccammon asked 12/11, 2012 at 3:23
4
Solved
I have some code with nested calls to flatMap like so:
foo.flatMap(implicit f => bar(123).flatMap(b =>
/* and so on... implicit f is still in scope here.*/
))
Normally, one would write th...
By asked 28/12, 2012 at 17:21
4
Solved
I'm documenting a Scala class with overloaded methods. How can I distinguish them when referring to them in scaladoc comments? For example, if I have
/**
* The most important method is [[Doc.foo]...
Postmortem asked 13/3, 2013 at 19:9
2
Solved
As a follow up of
Matt R's question, as Scala 2.10 has been out for quite an amount of time, what would be the best way to extract the fields and values of a case class. Taking a similar example:
...
Sanmicheli asked 9/12, 2013 at 8:49
5
Solved
What is the difference between size and length of a Seq? When to use one and when the other?
scala> var a :Seq[String] = Seq("one", "two")
a: Seq[String] = List(one, two)
scala> a.size
res6...
Bop asked 9/4, 2014 at 15:7
7
Solved
Is there a simple way to flatten a collection of try's to give either a success of the try values, or just the failure?
For example:
def map(l:List[Int]) = l map {
case 4 => Failure(new Except...
Aetolia asked 19/3, 2013 at 9:29
2
Solved
Is there any working solution for dropping into REPL console with for Scala 2.10?
This is mainly for debugging purpose - I want to pause in the middle of execution, and have a REPL console where I...
Splitting asked 10/7, 2014 at 10:32
4
Solved
I quite like the ** syntax for pow, available in many languages (such as Python).
Is it possible to introduce this into Scala, without modifying the Scala 'base' code?
My attempt at an Int only o...
Featherbrain asked 3/11, 2013 at 1:11
3
Is there a method in Akka (or in the standard library in Scala 2.10) to convert a Future[A] which might fail into a Future[Either[Exception,A]]? I know that you can write
f.map(Right(_)).recover {...
Wearisome asked 5/1, 2013 at 4:50
7
Solved
Given a string of JSON, and a case class that corresponds to it, what's a simple way to parse the JSON into the case class? There are many libraries available, but it seems that Scala might now do ...
Endamage asked 8/5, 2014 at 1:10
2
Solved
I have the ordinary scala-2.10 macros working in a maven project just by including the scala-reflect.jar library as a dependency in the pom, but what do I need to turn on macro-paradise? I am using...
Tamas asked 30/9, 2013 at 3:55
2
Solved
When I switch to Scala 2.11.8 SDK in IntelliJ, I get the following error during compile. Compiles fine when I use 2.10.6 SDK in IntelliJ with the same code.
Any ideas on how to fix this?
Error:s...
Insolence asked 8/9, 2016 at 4:55
3
Solved
Using scala 2.10.3, my goal is to make the following work:
object A {
implicit class Imp(i: Int) {
def myPrint() {
println(i)
}
}
}
object B {
implicit class Imp(i: String) {
def myPrint()...
Noleta asked 28/2, 2014 at 21:11
2
Solved
This answer to What's the (hidden) cost of Scala's lazy val? shows how they were implemented in Scala 2.7. But as the comments say, this must have changed since then, so I'm curious, what's the cur...
Stirpiculture asked 14/7, 2013 at 18:20
2
Solved
In Scala 2.9 one could implement polymorphic instantiation as
def newInstance[T](implicit m: Manifest[T]) =
m.erasure.newInstance.asInstanceOf[T]
but as of 2.10 Manifest is being replaced with ...
Adjudge asked 28/8, 2013 at 22:33
3
Solved
I have read several articles expressing that abstract types should be used to achieve f-bounded polymorphism in Scala. This is primarily to alleviate type inference issues, but also to remove the q...
Wideawake asked 1/9, 2013 at 10:25
7
Solved
I have a list as follows:
val internalIdList: List[Int] = List()
internalIdList = List(11, 12, 13, 14, 15)
From this list would remove the third element in order to obtain:
internalIdList = Li...
Eggshaped asked 17/9, 2013 at 10:21
3
Solved
I begin to learn Scala and I'm interesting can I define and use function without any class or object in Scala as in Haskell where there is no OOP concept. I'm interested can I use Scala totally wit...
Paynim asked 31/8, 2013 at 13:45
2
Solved
I am able to print data in two RDD with the below code.
usersRDD.foreach(println)
empRDD.foreach(println)
I need to compare data in two RDDs. How can I iterate and compare field data in one RDD ...
Disputant asked 5/1, 2015 at 15:45
3
Solved
I am trying to unit test an upload call but I get this error for the following code:
@MultipartConfig(maxFileSize = 3145728)
class WebServlet extends ScalatraServlet with FileUploadSupport {
over...
Isley asked 2/8, 2013 at 15:14
4
Solved
Scala 2.10 introduced value classes. They are very usefull for writing typesafe code. Moreover there are some limitations, some of them will be detected by compiler, and some will require allocatio...
Candie asked 15/7, 2013 at 15:45
1 Next >
© 2022 - 2024 — McMap. All rights reserved.