Skip to content

Instantly share code, notes, and snippets.

@scova0731
scova0731 / scala-image-processing.md
Last active December 31, 2015 17:07
Scala/Java 画像変換ライブラリ調査 (2015/3)
@scova0731
scova0731 / scala-learning-resource.md
Created February 27, 2015 04:02
Scala 学習リソース (2015/2版)

定番、および比較的最近の学習リソースを集めてみました (2015/2)。

リファレンス

記事等

@takezoe
takezoe / DailyScala_FunctionAdvance.md
Last active December 3, 2019 04:18
Scalaの関数を活用するためのあれこれ

Scalaの関数を活用する

Functionオブジェクト

Scalaでは関数をファーストクラスオブジェクトとして扱うことができる。以下のような感じで関数やメソッドを変数に代入するとFunctionオブジェクトに変換される。実際は引数の数に応じてFunction0Function22というトレイトが用意されている。なので引数の数が22個以上の関数を変数に代入しようとするとエラーになる。

def hello(name: String) = s"Hello ${name}!"

// 関数を変数に代入
@gakuzzzz
gakuzzzz / action-function.md
Last active April 6, 2023 01:47
ActionFunction の紹介 - Play framework Advent Calendar 2014 7日目

ActionFunction の紹介

この記事は Play framework Advent Calendar 2014 の7日目です。

昨日は @dorako321 さんの Play framework Advent Calendar 2014 6日目 位置情報を使ってみよう でした。

明日は @nazoking さんの play2.3 の sbt-web を使わず node で代替システムを作るための資料 です。

さて、そんなこんなで公式ドキュメントではまだ語られていない ActionFunction とそのサブトレイトについて紹介したいと思います。 (公式ドキュメントにも記載ありました https://www.playframework.com/documentation/2.3.x/ScalaActionsComposition#Different-request-types )

@nobuoka
nobuoka / GoogleHttpJavaClientExample.java
Created November 8, 2014 11:20
google-http-java-client を使用するサンプルコード
import java.io.IOException;
import com.google.api.client.http.GenericUrl;
import com.google.api.client.http.HttpRequest;
import com.google.api.client.http.HttpRequestFactory;
import com.google.api.client.http.HttpResponse;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.javanet.NetHttpTransport;
public class GoogleHttpJavaClientExample {
@john2x
john2x / 00_destructuring.md
Last active April 25, 2026 03:06
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

@gakuzzzz
gakuzzzz / 1_.md
Last active March 7, 2025 06:35
Scala の省略ルール早覚え

Scala の省略ルール早覚え

このルールさえ押さえておけば、読んでいるコードが省略記法を使っていてもほぼ読めるようになります。

メソッド定義

def concatAsString(a: Int, b: Int): String = {
  val a_ = a.toString();
  val b_ = b.toString();
@taea
taea / rm_pid.md
Last active January 12, 2023 14:22
postgres をちゃんと終了しないと.pidファイルが残っちゃって、Rails が起動しないもんだい

Rails 起動しようとするとこんなエラーでる

PG::ConnectionBad at /
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
@seraphy
seraphy / ExpressionTest.java
Created December 3, 2013 03:43
Expressを使ってリフレクションを直接使うよりも簡単にメソッド名でオブジェクト(Java Beans)にアクセスする方法の例.
package jp.seraphyware.javalangtest;
import java.beans.Expression;
/**
* リフレクションを直接使うよりも簡単にメソッド名で
* オブジェクトにアクセスする方法の例.<br>
*/
public class ExpressionTest {
@seratch
seratch / getting_started_ja.md
Last active June 5, 2018 02:56
Skinny Framework 1.0 Introduction in Japanese

NOTICE: This is just a draft of Skinny framework introduction (written in Japanese for now). English version will be published soon.

Skinny Framework とは

Logo

https://github.com/seratch/skinny-framework

Skinny Framework は Scala のフルスタックな Web アプリケーション開発フレームワークです。2014/03 を目処に最初の安定バージョン 1.0.0 をリリースするべく精力的に開発しています。(追記: 2014/03/28 に 1.0.0 がリリースされました)