こちらの勉強会で使った資料です -> http://sscala.connpass.com/
Scalaのバージョンは 2.11.1 でやりました。
- val
こちらの勉強会で使った資料です -> http://sscala.connpass.com/
Scalaのバージョンは 2.11.1 でやりました。
import rx.subjects.BehaviorSubject; | |
public class DataBindingSample { | |
public void start() { | |
ViewModel viewModel = new ViewModel("default"); | |
View view1 = new View(); | |
System.out.println("######################"); | |
System.out.println("view1: " + view1.value); |
package main | |
import ( | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"golang.org/x/oauth2" |
function create_insert() { | |
var headerRowIndex = 1; | |
var firstValuesRowIndex = headerRowIndex + 1; | |
var range = SpreadsheetApp.getActiveRange(); | |
var cells = range.getValues(); | |
var numRows = range.getNumRows(); | |
var numColumns = range.getNumColumns(); | |
var tableName = cells[0][0]; |
function! PostSlackTimes(surround) | |
let tmp = @@ | |
silent normal gvy | |
let selected = @@ | |
let @@ = tmp | |
let text = substitute(selected, "\n", '\n', "g") | |
let ret = system("curl -X POST -H 'Content-type: application/json' --data '{\"text\": \"" . a:surround . text . a:surround . "\"}'" | |
\ . " 'https://hooks.slack.com/services/<TOKEN>'") | |
endfunction |
unmap "t" | |
map "ctrl+f" scrollPageDown | |
map "ctrl+b" scrollPageUp | |
map "[ t" previousTab | |
map "] t" nextTab | |
map "[ T" firstTab | |
map "] T" lastTab |
# coding: utf-8 | |
import sys | |
import datetime | |
import re | |
import requests | |
import twitter | |
from datetime import datetime | |
GITHUB_USER = "hoge" |
case class User(id: Int, email: String, name: String, age: Option[Int], address: Option[String]) | |
def selectUsers: DBIO[Seq[User]] = sql""" | |
SELECT | |
id, | |
email, | |
name, | |
age, | |
address | |
FROM |
public class Main { | |
public static void main(String[] args) { | |
System.out.println(flatMapRoutine()); | |
System.out.println(nonFlatMapRoutine()); | |
} | |
private static Optional<Pole> flatMapRoutine() { | |
return new Pole(0, 0).landLeft(1) | |
.flatMap(x -> x.landRight(4)) | |
.flatMap(x -> x.landLeft(-1)) |
@Configuration | |
public class DatabaseConfig { | |
@Bean | |
public DataSource ds1() { | |
org.apache.tomcat.jdbc.pool.DataSource ds = new org.apache.tomcat.jdbc.pool.DataSource(); | |
ds.setDriverClassName("driverName"); | |
ds.setUrl("url"); | |
ds.setUsername("username"); | |
ds.setPassword("password"); |