Skip to content

Instantly share code, notes, and snippets.

View rshindo's full-sized avatar

Ryo Shindo rshindo

  • Kanagawa, Japan
View GitHub Profile
@rshindo
rshindo / Application.java
Created September 11, 2019 18:33
Spring Batchで複数のデータソースを扱う方法
package hello;
import org.springframework.batch.core.configuration.annotation.DefaultBatchConfigurer;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;

勉強会ライブ配信を支える技術

初版:2019-08-30
更新:2019-08-30

文責:@rshindo (twitter:@shindo_ryo)

はじめに

スタッフをやっているコミュニティで勉強会をライブ配信する機会があり、せっかくなので知見をまとめておく。

abstract class IntQueue {
def get(): Int
val buf = new ArrayBuffer[Int]
def put(x: Int) = {
println("IntQueue.put")
println("x=" + x)
buf += x
}
}
@rshindo
rshindo / scalasort.scala
Created January 31, 2017 09:04
scalaでいろんなソート
import java.math._
def bogosort(list: List[Int]): List[Int] = {
val r = new Random()
def suffle(xs: List[Int]): List[Int] = {
xs.sortWith((i, j) => r.nextInt < 0)
}
def isSorted(xs: List[Int]): Boolean = {
xs == xs.sorted
}