"A high-throughput distributed messaging system." site
Notes taken from source
- Created at LinkedIn (open sourced in 2011)
// Reduction: We can sum all the elements | |
// with the usual recursive schema | |
def sum(xs: List[Int]): Int = xs match { | |
case Nil => 0 | |
case y :: ys => y + sum(ys) | |
} | |
// But this can be abstracted out using 'reduceLeft' | |
// That will perform these operations LINKING to the left | |
def sum(xs: List[Int]) = (0 :: xs) reduceLeft ((x, y) = x + y) |
import java.util.Map; | |
import javax.sql.DataSource; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Qualifier; | |
import org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryBuilder; | |
import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.ComponentScan.Filter; |
Install Kafka in CentOS |
// --- Compiling --- | |
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz | |
$ tar xzvf redis-2.8.3.tar.gz | |
$ cd redis-2.8.3 | |
$ make | |
$ make install | |
// --- or using yum --- | |
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
====================================== | |
Usage: | |
Fetcher<Source, MyEntity> f = new Fetcher<Source, MyEntity>(source) { | |
@Override | |
public List<MyEntity> fetch(Pageable pageRequest) | |
{ | |
return source.findAll(pageRequest); | |
} | |
}; |
// $ scala-2.11.5 -Xexperimental | |
// Original Java 8 version: http://winterbe.com/posts/2014/07/31/java8-stream-tutorial-examples/ | |
scala> import java.util.{Arrays, List, ArrayList} | |
scala> import java.util.stream.{Stream, IntStream} | |
// List<String> myList = Arrays.asList("a1", "a2", "b1", "c2", "c1"); | |
scala> val myList = Arrays.asList("a1", "a2", "b1", "c2", "c1") |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
Index:
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
Index: