Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit c984bd8

Browse files
committed
lecture2
1 parent 3d5e5e5 commit c984bd8

40 files changed

+1788
-43
lines changed

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
.DEFAULT: html
55
all: html note quiz
66

7-
BASE := localhost:8082
8-
9-
SLIDES := $(basename $(notdir $(wildcard slide/day*.md)))
7+
SLIDES := $(basename $(notdir $(wildcard slide/lx*.md)))
108
HTML_TMP := $(addprefix docs/tmp/, $(addsuffix .html, $(SLIDES)))
119
HTML := $(addprefix docs/html/, $(addsuffix .html, $(SLIDES)))
1210
PDF := $(addprefix docs/pdf/, $(addsuffix .pdf, $(SLIDES)))
@@ -37,13 +35,15 @@ docs/html/%.html: $(HTML_DEV) slide/%.md
3735
@# Firstly, Pandoc generates a temporary HTML file:
3836
@# slide/*.md -> tmp/*.html
3937
@echo "pandoc: $(md) => $(html1)"
40-
@pandoc docs/dev/slide.yaml $(md) \
38+
@pandoc lib/slide.yaml $(md) \
4139
--to=revealjs --slide-level=2 \
4240
--standalone \
4341
--output=$(html1) \
44-
-V revealjs-url=../lib/reveal.js-3.5.0 \
42+
-V revealjs-url=/lecture/lib/reveal.js-3.5.0 \
4543
-V theme=serif \
46-
--css=../dev/kw.css \
44+
-V slideNumber=true \
45+
--css=/lecture/lib/kw.css \
46+
--mathjax \
4747
--smart
4848

4949
@# Then, PhantomJS is used to patch the temporary HTML and finishes it.
@@ -76,7 +76,7 @@ docs/quiz/%.html: quiz/%.md
7676
--smart
7777

7878
server:
79-
@wget --quiet --spider "http://$(BASE)/" || (cd docs; php -S $(BASE) &)
79+
@wget --quiet --spider "http://localhost:8080/" || (cd $(HOME)/Sites; php -S localhost:8080 &)
8080

8181
shutdown:
8282
@killall php

build.sbt

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// ライブラリ群
2+
3+
val scalactic = "org.scalactic" %% "scalactic" % "3.0.1"
4+
5+
// テストのために使う ScalaTest ライブラリ
6+
val scalatest = "org.scalatest" %% "scalatest" % "3.0.1" % "test"
7+
8+
// データ生成テストのために使う ScalaCheck ライブラリ
9+
val scalacheck = "org.scalacheck" %% "scalacheck" % "1.13.4" % "test"
10+
11+
// 並行処理のための Akka Actor ライブラリ
12+
val akka_actor = "com.typesafe.akka" % "akka-actor_2.12" % "2.5.4"
13+
14+
lazy val commonSettings = Seq(
15+
organization := "prg17.is.titech.ac.jp",
16+
version := "0.1.0-SNAPSHOT",
17+
18+
// scalac に与えるオプション
19+
scalaVersion := "2.12.3", // コンパイルに使う scalac のバージョン
20+
scalacOptions := Seq("-feature", "-unchecked", "-deprecation"),
21+
libraryDependencies ++= Seq(scalactic, scalatest, scalacheck),
22+
23+
fork in (Test, run) := true,
24+
connectInput := true,
25+
// Scalaのプログラムの置き場所を非標準の場所に指定.
26+
// 通常は src/scala/*.scala, test/scala/*.scala に置く.
27+
// これはJavaとの共存のためにsrcとtestの下をScalaとJavaで棲み分けるためである.
28+
// 本実習ではJavaのプログラムを書くことはないので,非標準だがより単純な設定を採用する.
29+
scalaSource in Compile := baseDirectory.value / "src",
30+
scalaSource in Test := baseDirectory.value / "test",
31+
32+
// コンパイル結果を非標準の場所に設定
33+
// この設定はコンパイルの副産物がDropbox等のクラウドストレージに保存されることを
34+
// 避けるためのものです。これによりクラウドストレージとの同期時間が短縮されます。
35+
target := Path.userHome / "tmp" / "sbt" / "prg1b" / name.value
36+
)
37+
38+
lazy val root = (project in file("."))
39+
//.aggregate(lx02)
40+
41+
lazy val lx02 = project
42+
.settings(commonSettings)
43+
.settings(name := "lx02", version := "0.1.0")
44+
45+
lazy val lx02a = project
46+
.settings(commonSettings)
47+
.settings(name := "lx02a", version := "0.1.0")
48+
49+
lazy val lx02b = project
50+
.settings(commonSettings)
51+
.settings(name := "lx02b", version := "0.1.0")
52+
53+
lazy val lx02c = project
54+
.settings(commonSettings)
55+
.settings(name := "lx02c", version := "0.1.0")
56+
57+
lazy val lx02d = project
58+
.settings(commonSettings)
59+
.settings(name := "lx02d", version := "0.1.0")
60+
61+
lazy val lx02e = project
62+
.settings(commonSettings)
63+
.settings(name := "lx02e", version := "0.1.0")
64+
65+
lazy val lx02f = project
66+
.settings(commonSettings)
67+
.settings(name := "lx02f", version := "0.1.0")
68+
69+
lazy val lx02g = project
70+
.settings(commonSettings)
71+
.settings(name := "lx02g", version := "0.1.0")
72+
73+
lazy val lx02h = project
74+
.settings(commonSettings)
75+
.settings(name := "lx02h", version := "0.1.0")
76+
77+
lazy val lx02i = project
78+
.settings(commonSettings)
79+
.settings(name := "lx02i", version := "0.1.0")
80+
81+
lazy val lx02j = project
82+
.settings(commonSettings)
83+
.settings(name := "lx02j", version := "0.1.0")
84+
85+
lazy val lx02k = project
86+
.settings(commonSettings)
87+
.settings(name := "lx02k", version := "0.1.0")

docs/dev/kw.css

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/dev/phantom.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ const fs = require('fs');
44
const page = require('webpage').create();
55
const system = require('system');
66

7-
const base_url = 'http://localhost:8082/';
8-
const document_url = base_url + 'tmp/' + system.args[1] + '.html';
9-
const jquery_url = base_url + 'dev/jquery-3.2.1.min.js';
10-
const script_url = base_url + 'dev/kw.js';
7+
const base_url = 'http://localhost:8080';
8+
const document_url = base_url + '/lecture/tmp/' + system.args[1] + '.html';
9+
const jquery_url = base_url + '/lecture/dev/jquery-3.2.1.min.js';
10+
const script_url = base_url + '/lecture/dev/kw.js';
1111
const html = system.args[2];
1212

1313
console.log(document_url, script_url, html);

docs/dev/quiz.header

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<link ref="stylesheet" type="text/css" href="../lib/reveal.js-3.5.0/css/theme/solarized.css">
2-
<link rel="stylesheet" type="text/css" href="../dev/kw.css">
2+
<link rel="stylesheet" type="text/css" href="/is-prg1b/lib/kw.css">
33
<script src="//use.edgefonts.net/source-code-pro.js"></script>

0 commit comments

Comments
 (0)