Questions for scala


8971

How to activate ENSIME editor for Emacs in MacBook

Iam new for emacs ... installed emacs for macbook and installed the ensime plugin, i cant follow the steps as provided in the ensime site, can anyone help me by citing any wiki or blogs which has s...
6043

How to exclude library dependencies with explicit URL from generated pom?

I'm moving the Scala Migrations project from ant/ivy to sbt. It optionally uses log4jdbc as a library dependency that doesn't exist in any public Maven repository (from what I can find).
9008

Scala - iterators and takeWhile

I am running the following piece of code:
704

Working with Lift XHTML/HTML in Netbeans

I am developing a Lift application using Netbeans and I have everything working apart from the lift xhtml, which is stored with an html extension, creates a number of warning and errors in netbeans...
3106

Implementing a Measured value in Scala

A Measured value consists of (typically nonnegative) floating-point number and unit-of-measure. The point is to represent real-world quantities, and the rules that govern them. Here's an example:
3423

Lazy Cartesian product of several Seqs in Scala

I implemented a simple method to generate Cartesian product on several Seqs like this:
2411

Purely functional data structures for text editors

What would be good purely functional data structures for text editors? I want to be able to insert single characters into the text and delete single characters from the text with acceptable efficie...
8527

Scala - XML inspection/modification

I am new to both XML processing and Scala in general. I have few questions/things to achieve based on the example xml below
314

How do you write shortened version of function literal?

Could you please explain to me how to write shortened version of function literal ?
6719

correctly terminate akka actors in scala

I've write sample code that starts an actor, kills it and finishes execution.
553

Scala - futures does not run

I am trying to run the following future basic code
4175

ClassNotFoundException / NoClassDefFoundError when running a Scala jar

Having a Scala project exported to a .jar with eclipse, the application started with java -jar app.jar dies with the error java.lang.ClassNotFoundException: scala.Predef$.
8557

Scala - Problem using MapWrapper when upgrading from 2.7.7 to 2.8.1

I have this piece of code I inherited that works well under Scala 2.7.7 (well, replacing the import to use jcl ). But when I try to use 2.8.1 I get this error:
7151

Generically typed classes in collections in Scala

I'm having a problem with a generic class I'm creating in Scala. I have the following class:
5102

scala, transform a callback function to an iterator/list

For the sake of this question, I have the following example code which I cannot change:
8605

traits with immutable paramiters in scala

I want to make the following example so that Collar is immutable
3288

Building a regex with packrat parsers in Scala

I have two packrat parsers in scala:
8097

Type inference on anonymous functions with enrich-my-library

Say I have a method that turns a (function on two elements) into a (function on two sequences):
470

Scala/Lift: Does it require special http routing?

Since Lift is stateful, each subsequent request to a page/site must go back to the same server. Presumably that means that the front-end load balancer needs to keep track of which client is talking...
147

types as mold to delegated classes in Scala

I am working in ScalaFX Project. In this moment I am adapting classes from javafx.scene.control.cell. In this package, methods with same signature are duplicated in many classes. e.g.
7546

Why doesn't Scala's Option translate directly to a T in bytecode?

One thing I don't understand about Scala, is why Null subclasses everything, despite not passing the substitution test. Presumably this is for Java compatibility, which is fine, I guess -- but then...
3079

Counter in for comprehension

How to do Scala equivalent to this Java code:
8195

In Scala, what exactly does 'val a: A = _' (underscore) mean?

What exactly does val a: A = _ initialize a value to? Is this a typed null? Thanks.
6051

Get superclasses function in Scala

What would be a short functional way to get the superclasses of a given Class instance in Scala?
421

Setting instance vars with apply

With Array it's possible to get and set elements with val i = xs(0) and xs(0) = i syntax. How to implement this functionality in my own class? So far I was only able to implement getting the values.
2586

A way to prepend letters to each imported class

Is there a way to import all classes from a package and rename them all by prepending some text? A construct
3555

How many implicits are there in Scala?

If I haven't imported anything but Scala's usual defaults, how many implicits (implicit conversions) are in scope?
3922

Why do people use _? as an identifier suffix?

I start reading Lift framework source code, I find that there're so many methods are defined using a name like methodName_? , is there a convention that _? has some special meaning?
4238

How to use Spring Autowired (or manually wired) in Scala object?

I am trying to use Spring with Scala. I know Autowired works with Scala class, but I am using a web-framework that requires an object and I want to inject a dao into it. I wonder how to do this? So...
334

Functional code for finding index in array

I would like to refactor this piece of Scala code in functional style:
4005

Scala - ordering a list

I am trying to sort a List of XMLMessage which in turn, derive from Message. The Message trait extends Ordered and provides comparison function based on timestamps. However, when I try to say:
4352

Scala - Recursion of an anonymous function

I'm working through the scala labs stuff and I'm building out a function that will, in the end, return something like this:
1940

Managing unused `List`s in Scala

Scala have wealth of immutable structure.
2344

Integration Test in Play Framework

I am trying to get Integration Tests to work in Play Framework 2.1.1
1065

ScalaTest - writing custom matchers

I am running into a problem while writing a custom matcher for NodeSeq:
3685

How can I make ensime show all compilation errors?

I'm doing Scala web development using the Play framework's scala module, and using Emacs+Ensime to edit the code. Sometimes even when Ensime shows no errors, Play will still show a compilation erro...
8756

Overriding method by return type in scala, oop solution?

I have some problem to find oop information about my problem in scala, peraphs you can help me to find a good solution, or good web/book ressources ?
3678

Self-referential duck-typing

I wish to write a function that operates on any value that can be added to other members of its own type (whatever "added" means in context). The obvious (heh-heh) definition of such a type:
375

Scala: pre-initialize val while extending a class

How do I pre-initialize a val and extend a class in Scala?
9104

Need help figuring out performance bottleneck

I'm working on my scala chops and implemented a small graph Api to track vertices and edges added to graph. I have basic GraphLike Trait, and have an Undirected Graph class ( UnDiGraph) and a Direc...
2819

What do Futures and Agents in Akka offer over Clojure's counterparts?

Having watched the presentation Composable Futures with Akka 2.0, I am curious to know what additional features the Akka implementation of Futures and Agents bring over Clojure's ones.
7358

Is the method name “is” of “RequestVar” a short name of some other words?

In lift web framework, the RequestVar has a method is:
5079

What is the recommended mongo db plugin for Play! Framework?

There are at least two mongo db plug-ins for Play! Framework, PlayMorphia and Mongo 1.3.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.