Re: Iterate over ArrayBuffer

2014-09-04 Thread Ngoc Dao
> I want to iterate over the ArrayBuffer. You should get yourself familiar with methods related to the Scala collection library: https://twitter.github.io/scala_school/collections.html Almost all of the methods take a function as their parameter. This is a very convenient feature of Scala (unlike

Re: Is uberjar a recommended way of running Spark/Scala applications?

2014-06-01 Thread Ngoc Dao
Alternative solution: https://github.com/xitrum-framework/xitrum-package It collects all dependency .jar files in your Scala program into a directory. It doesn't merge the .jar files together, the .jar files are left "as is". On Sat, May 31, 2014 at 3:42 AM, Andrei wrote: > Thanks, Stephen. I h

Re: What is the difference between map and flatMap

2014-03-12 Thread Ngoc Dao
> Can someone explain to me the difference between map and flatMap Similarity: Both transform collection A to collection B. Difference: * map: One element in A is transformed to one element. One -> one. Size of B = size of A. * flatMap: One element in A is transformed to 0 or more elements, then