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
extern crate rand; | |
use rand::Rng; | |
use std::io::BufWriter; | |
use std::io::Write; | |
use std::fs::OpenOptions; | |
use std::fs::File; | |
use std::str::FromStr; | |
use std::io::BufReader; | |
use std::io::BufRead; |
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 scala.io.Source | |
object IteratorTest { | |
def main(args:Array[String]) { | |
val s1 = Source.fromFile("/Users/amoghm/src/rand.txt").mkString //returns the file data as String | |
//splitting String data with white space and calculating the number of occurrence of each word in the file | |
var buf = s1.split("\\s+").map(s => s.trim.toInt) |
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
extern crate rand; | |
use rand::Rng; | |
use std::io::BufWriter; | |
use std::io::Write; | |
use std::fs::OpenOptions; | |
use std::fs::File; | |
use std::str::FromStr; | |
use std::io::BufReader; | |
use std::io::BufRead; |
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
select | |
cc_call_center_id Call_Center, cc_name Call_Center_Name, cc_manager Manager, | |
sum(cr_net_loss) Returns_Loss | |
from | |
call_center, catalog_returns, date_dim, customer, customer_address, | |
customer_demographics, household_demographics | |
where | |
cr_call_center_sk = cc_call_center_sk | |
and cr_returned_date_sk = d_date_sk | |
and cr_returning_customer_sk = c_customer_sk |