This file contains 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
//In the cell below, determine what is the most frequent CHARACTER in the README, and how many times was it used? | |
//spark and scala | |
var charCounts2 = readme.flatMap(line => line.toList). | |
filter( a => !a.equals("\n") && !a.equals(" ") && !a.equals("") ). | |
filter( _ != ' '). | |
map(character => (character, 1)). | |
reduceByKey((a,b) => a + b). | |
reduce((a, b) => if (a._2 > b._2) a else b) | |
//take(55). |
This file contains 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 com.google.inject.Inject; | |
public class AuthenService { | |
private final UserDAO userDAO; | |
@Inject | |
public AuthenService(UserDAO userDAO) { | |
this.userDAO = userDAO; |