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
/** | |
* Scala De FizzBuzz | |
*/ | |
object FizzBuzz { | |
/** | |
* 先ずはJavaっぽく... | |
*/ | |
def forDeFizzBuzz: Unit = { | |
for (i: Int <- 1 to 30) { |
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.collection.immutable.List | |
object nabeatsuAlgorism { | |
/** | |
* 世界のナベアツアルゴリズム | |
* 3の倍数と3がつく数字のときだけ'アホ'になります | |
*/ | |
def main(args: Array[String]): Unit = { | |
// 1~40までの数字に対してmapを実行 |
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.collection.immutable.List | |
import scala.annotation.tailrec | |
/** 素数を取得 */ | |
object PrimeNumber { | |
def main(args: Array[String]): Unit = { | |
// 1は除外(素数についてのお約束ごと) | |
searchPrimeNumber(List.range(2, 10000)) | |
} |
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
package models | |
/** ページ処理で利用するクラス */ | |
case class PageNation[A](currentPageNum: Int // 現在のページ番号 | |
,totalCount : Int // 全体件数 | |
,dataList : List[A] // 一覧するデータリスト | |
) { | |
/** 取得したデータの件数からページ数を計算 */ | |
def maxPageNumber: Int = { |
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.annotation.tailrec | |
object LifeGame { | |
def main(args: Array[String]) = { | |
queenBee | |
} | |
/** | |
* ライフゲーム |
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.annotation.tailrec | |
object LifeGame { | |
def main(args: Array[String]) = { | |
queenBee | |
} | |
/** | |
* ライフゲーム |
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
object Uruu { | |
def main(args: Array[String]) = { | |
List.range(1983, 2017) foreach { year => | |
println(s"${year} = ${year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)}") | |
} | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>二次元ライフゲーム</title> | |
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHZDM5XzZPS1JQd3c"></script><!-- Three.js --> | |
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHcDEtSGpLV20zRjg"></script><!-- TrackballControls.js --> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
</head> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>三次元ライフゲーム</title> | |
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHZDM5XzZPS1JQd3c"></script><!-- Three.js --> | |
<script type="text/javascript" src="https://www.googledrive.com/host/0BxNQTV_CEVCHcDEtSGpLV20zRjg"></script><!-- TrackballControls.js --> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
</head> |
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
#!/bin/sh | |
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree stash save `date` |
OlderNewer