ScalaFukuoka 2017 Backlog.key
|
|
- かずまさ ひがき
- 5 years ago
- Views:
Transcription
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 [T] <T> => -> Option Optional val & var let & var for
54 implicit class Foo(val a: String) { def foo: Int = 3 * a.toint } 9.foo extension String { var foo: Int { return 3 * Int(self)! } } 9.foo struct Foo { Foo(const char* a) : a(a) {} int foo() { return 3 * atoi(a); } private: const char* a; }; Foo a = 33"; a.foo();
55 for 文 ムズカシイネ for comprehension for loop for { i <- 1 until n j <- 1 until i if isprime(i + j) } yield (i, j)
56 The Scala Language Specification Version 2.9 / 6.19 For Comprehensions and For Loops for(p <- e) yield e e.map{case p => e } p <- e if g p <- e.withfilter((x1,,xn) => g) for(p <- e; p <- e ; ) yield e e.flatmap{ case p => for(p <- e ; ) yield e }
57 for { i <- 1 until n j <- 1 until i if isprime(i + j) } yield (i, j) for(p <- e; p <- e ; ) yield e e.flatmap{ case p => for(p <- e ; ) yield e } (1 until n).flatmap { case i => for (j <- 1 until i if isprime(i + j)) yield (i, j) }
58 (1 until n).flatmap { case i => for (j <- 1 until i if isprime(i + j)) yield (i, j) } p <- e if g p <- e.withfilter((x1,,xn) => g) (1 until n).flatmap { case i => for (j <- (1 until i).withfilter { j => isprime(i + j) } ) yield (i, j) }
59 (1 until n).flatmap { case i => for (j <- (1 until i).withfilter { j => isprime(i + j) } ) yield (i, j) } for(p <- e) yield e e.map{case p => e } (1 until n).flatmap { case i => (1 until i).withfilter { j => isprime(i + j) }.map { case j => (i, j) } }
60 for { i <- 1 until n j <- 1 until i if isprime(i + j) } yield (i, j) (1 until n).flatmap { case i => (1 until i).withfilter { j => isprime(i + j) }.map { case j => (i, j) } }
61 The Scala Language Specification Version 2.9 / 6.19 For Comprehensions and For Loops for(p <- e) yield e e.map{case p => e } p <- e if g p <- e.withfilter((x1,,xn) => g) for(p <- e; p <- e ; ) yield e e.flatmap{ case p => for(p <- e ; ) yield e }
62 flatmap map withfilter for { : allprojects <- projectrepository.allrelatedprojectsorderrecent(ctx.user.id) usercount <- userrepository.countusersofspace(ctx.space.id) allprojectids = allprojects.map(_.id) mypullrequests <- pullrequestrepository.allmyrequest(user.id, allprojectids) activities <- projectactivityrepository.allgroupedactivitiesofspace (allprojectids, activitytypes, pagination) : } yield DashboardContents( : allprojects = allprojects, usercount = usercount, mypullrequests = mypullrequests, activities = activities, : ) }
63
64 使っている言語やライブラリ 新 現在 言語 Scala Java ウェブ フレームワーク Play Webwork テンプレート エンジン Twirl Velocity スクリプト Haxe Haxe
65 Play API Core
66 Java Scala
67 Play API Core
68 xwork-dashboard.xml <!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN" " <xwork> <package name="dashboard" extends="default"> <default-interceptor-ref name= defaultauthcomponentstack"/> <action name="dashboard" class="jp.co.nulab.backlog.webwork.dashboard.dashboard"> <result name="success" type="velocity"> <param name="location">/pages/dashboard/dashboard.vm</param> </result> </action> </package> </xwork> routes GET /dashboard controllers.dashboard.dashboardcontroller.viewdashboard()
69 for if map filter def viewdashboard() = addtoken { actions.useraction.async { implicit request => dashboardapplicationservice.viewdashboard().map { contents => Ok(views.html.dashboard.dashboard(contents)) } } }
70 Velocity ${action.gettext( msg.dashboard.storage.warning', $!webwork.htmlencode($action.diskusageratio))} msg.dashboard.storage.warning", contents.diskusageratio))
71 Velocity #parse("/pages/_newui/common/parts/globalheader.vm")
72 Play API Core
73 def viewdashboard()(implicit ctx: UserContext): Future[DashboardContents] = { for { contents <- dashboardcontentsfactory.create() } yield contents }
74 def create()(implicit ctx: UserContext, io: IOContext, ec: ExecutionContext): Future[DashboardContents] = { val user = ctx.user val activitytypes = ActivityType.availableActivities(user.role) val pagination = PaginationQuery(count = 10) } for { : allprojects <- projectrepository.allrelatedprojectsorderrecent(ctx.user.id) usercount <- userrepository.countusersofspace(ctx.space.id) : } yield DashboardContents( : allprojects = allprojects, usercount = usercount, : )
75
76 Scala Java
77
78
79
untitled
Struts IT Open Source JavaEE Application Consulting Struts Open Source JavaWorld Jakarta 4 Jakarta/Apache Copyright(c) yukimitsu kurozumi 2007 All Rights Reserved. 2 1986 150 CAC OSS Consulting,, Web System
More informationJava演習(4) -- 変数と型 --
50 20 20 5 (20, 20) O 50 100 150 200 250 300 350 x (reserved 50 100 y 50 20 20 5 (20, 20) (1)(Blocks1.java) import javax.swing.japplet; import java.awt.graphics; (reserved public class Blocks1 extends
More information(Eclipse\202\305\212w\202\324Java2\215\374.pdf)
C H A P T E R 11 11-1 1 Sample9_4 package sample.sample11; public class Sample9_4 { 2 public static void main(string[] args) { int[] points = new int[30]; initializearray(points); double averagepoint =
More informationintra-mart Accel Platform — IM-Repository拡張プログラミングガイド 初版
Copyright 2018 NTT DATA INTRAMART CORPORATION 1 Top 目次 1. 改訂情報 2. はじめに 2.1. 本書の目的 2.2. 対象読者 2.3. サンプルコードについて 2.4. 本書の構成 3. 辞書項目 API 3.1. 最新バージョン 3.1.1. 最新バージョンの辞書を取得する 3.2. 辞書項目 3.2.1. 辞書項目を取得する 3.2.2.
More informationコーディング基準.PDF
Java Java Java Java.java.class 1 private public package import / //////////////////////////////////////////////////////////////////////////////// // // // // ////////////////////////////////////////////////////////////////////////////////
More information10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV
tutimura@mist.i.u-tokyo.ac.jp kaneko@ipl.t.u-tokyo.ac.jp http://www.misojiro.t.u-tokyo.ac.jp/ tutimura/sem3/ 2002 12 11 p.1/33 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20
More informationjava_servlet2_見本
13 2 JSF Web 1 MVC HTML JSP Velocity Java 14 JSF UI PC GUI JSF Web 2.1 JSF JSF Web FORM FORM 2-1 JSF role, JSF JSF 15 Web JSF JSF Web Macromedia JSF JSF JSF 2.2 / Subscriber package com.mycompany.newsservice.models;
More informationPowerPoint Presentation
UML 2004 7 9 10 ... OOP UML 10 Copyright 2004 Akira HIRASAWA all rights reserved. 2 1. 2. 3. 4. UML 5. Copyright 2004 Akira HIRASAWA all rights reserved. 3 1..... Copyright 2004 Akira HIRASAWA all rights
More information新・明解Java入門
537,... 224,... 224,... 32, 35,... 188, 216, 312 -... 38 -... 38 --... 102 --... 103 -=... 111 -classpath... 379 '... 106, 474!... 57, 97!=... 56 "... 14, 476 %... 38 %=... 111 &... 240, 247 &&... 66,
More informationParametric Polymorphism
ML 2 2011/04/19 Parametric Polymorphism Type Polymorphism ? : val hd_int : int list - > int val hd_bool : bool list - > bool val hd_i_x_b : (int * bool) list - > int * bool etc. let hd_int = function (x
More information{:from => Java, :to => Ruby } Java Ruby KAKUTANI Shintaro; Eiwa System Management, Inc.; a strong Ruby proponent http://kakutani.com http://www.amazon.co.jp/o/asin/4873113202/kakutani-22 http://www.amazon.co.jp/o/asin/477413256x/kakutani-22
More informationK227 Java 2
1 K227 Java 2 3 4 5 6 Java 7 class Sample1 { public static void main (String args[]) { System.out.println( Java! ); } } 8 > javac Sample1.java 9 10 > java Sample1 Java 11 12 13 http://java.sun.com/j2se/1.5.0/ja/download.html
More information: : : TSTank 2
Java (8) 2008-05-20 Lesson6 Lesson5 Java 1 Lesson 6: TSTank1, TSTank2, TSTank3 java 2 car1 car2 Car car1 = new Car(); Car car2 = new Car(); car1.setcolor(red); car2.setcolor(blue); car2.changeengine(jet);
More informationmonad.gby
2012.11.18 1 1 2 2 DSL 3 4 Q) A) 5 Q) A) 6 7 8 Haskell 9 10 Parser data Parser a = Parser (String -> [(a,string)]) Parser pwrap :: a -> Parser a pwrap v = Parser $ \inp -> [(v,inp)] Parser pbind :: Parser
More informationやさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF
pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) pref : 2004/6/5 (11:8) 3 5 14 18 21 23 23 24 28 29 29 31 32 34 35 35 36 38 40 44 44 45 46 49 49 50 pref : 2004/6/5 (11:8) 50 51 52 54 55 56 57 58 59 60 61
More informationJava (5) 1 Lesson 3: x 2 +4x +5 f(x) =x 2 +4x +5 x f(10) x Java , 3.0,..., 10.0, 1.0, 2.0,... flow rate (m**3/s) "flow
Java (5) 1 Lesson 3: 2008-05-20 2 x 2 +4x +5 f(x) =x 2 +4x +5 x f(10) x Java 1.1 10 10 0 1.0 2.0, 3.0,..., 10.0, 1.0, 2.0,... flow rate (m**3/s) "flowrate.dat" 10 8 6 4 2 0 0 5 10 15 20 25 time (s) 1 1
More informationex01.dvi
,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) { double
More informationkyoto.gby
Haskell 2013.5.24 1 2 1988 B4 Sun 1992 3 Unix Magazine Unix Magazine UNIX RFC FYI (For Your Information) 4 IP PEM (Privacy Enhanced Mail) WIDE Project mh-e PEM 5 6 Unix Magazine PGP PGP 1 7 Mew (MIME)
More informationBrekeke PBX - Version 2.1 ARSプラグイン開発ガイド
Brekeke PBX Version 2.1 ARS プラグイン開発ガイド Brekeke Software, Inc. バージョン Brekeke PBX v2.1 ARS プラグイン開発ガイド, 2008 年 2 月 著作権本書の著作権は Brekeke Software, Inc. にあります Copyright 2003-2008 Brekeke Software, Inc. 本書の一部または全部を
More informationorg/ghc/ Windows Linux RPM 3.2 GHCi GHC gcc javac ghc GHCi(ghci) GHCi Prelude> GHCi :load file :l file :also file :a file :reload :r :type expr :t exp
3 Haskell Haskell Haskell 1. 2. 3. 4. 5. 1. 2. 3. 4. 5. 6. C Java 3.1 Haskell Haskell GHC (Glasgow Haskell Compiler 1 ) GHC Haskell GHC http://www.haskell. 1 Guarded Horn Clauses III - 1 org/ghc/ Windows
More informationJavaからScalaへ
#01 Java Scala (NISHIMOTO Keisuke) keisuken@cappuccino.ne.jp Java #01 Java Scala 2 (NISHIMOTO Keisuke) Twitter: @keisuke_n (follow,remove,block ) Java Scala Web GUI/ #01 Java Scala 3 29 Ruby/Rails Scala
More informationpresen.gby
kazu@iij.ad.jp 1 2 Paul Graham 3 Andrew Hunt and David Thomas 4 5 Java 6 Java Java Java 3 7 Haskell Scala Scala 8 9 Java Java Dean Wampler AWT ActionListener public interface ActionListener extends EventListener
More information6-1
6-1 (data type) 6-2 6-3 ML, Haskell, Scala Lisp, Prolog (setq x 123) (+ x 456) (setq x "abc") (+ x 456) ; 6-4 ( ) subtype INDEX is INTEGER range -10..10; type DAY is (MON, TUE, WED, THU, FRI, SAT, SUN);
More informationとても使いやすい Boost の serialization
とても使いやすい Boost の serialization Zegrahm シリアライズ ( 直列化 ) シリアライズ ( 直列化 ) とは何か? オブジェクトデータをバイト列や XML フォーマットに変換すること もう少しわかりやすく表現すると オブジェクトの状態を表す変数 ( フィールド ) とオブジェクトの種類を表す何らかの識別子をファイル化出来るようなバイト列 XML フォーマット形式で書き出す事を言う
More information解きながら学ぶJava入門編
44 // class Negative { System.out.print(""); int n = stdin.nextint(); if (n < 0) System.out.println(""); -10 Ÿ 35 Ÿ 0 n if statement if ( ) if i f ( ) if n < 0 < true false true false boolean literalboolean
More informationendo.PDF
MAP 18 19 20 21 3 1173 MAP 22 700800 106 3000 23 24 59 1984 358 358 399 25 12 8 1996 3 39 24 20 10 1998 9,000 1,400 5,200 250 12 26 4 1996 156 1.3 1990 27 28 29 8 606 290 250 30 11 24 8 1779 31 22 42 9
More information2017_08_ICN研究会_印刷用
class Producer : noncopyable public: run() m_face.setinterestfilter("/example/testapp", bind(&producer::oninterest, this, _1, _2), RegisterPrefixSuccessCallback(), bind(&producer::onregisterfailed, this,
More informationCondition DAQ condition condition 2 3 XML key value
Condition DAQ condition 2009 6 10 2009 7 2 2009 7 3 2010 8 3 1 2 2 condition 2 3 XML key value 3 4 4 4.1............................. 5 4.2...................... 5 5 6 6 Makefile 7 7 9 7.1 Condition.h.............................
More informationSpring Framework Web Web Web DB AOP DI Java EE 3 Web WebMVC Web Java 4 DB H2 Database Java H2 Database http://www.h2database.com/ Version 1.0 Zip 5 H2 > cd $H2_HOME/bin > java cp h2.jar org.h2.tools.server
More informationhaskell.gby
Haskell 1 2 3 Haskell ( ) 4 Haskell Lisper 5 Haskell = Haskell 6 Haskell Haskell... 7 qsort [8,2,5,1] [1,2,5,8] "Hello, " ++ "world!" "Hello, world!" 1 + 2 div 8 2 (+) 1 2 8 div 2 3 4 map even [1,2,3,4]
More informationWebOTXマニュアル
WebOTX アプリケーション開発ガイド WebOTX アプリケーション開発ガイドバージョン : 7.1 版数 : 第 2 版リリース : 2010 年 1 月 Copyright (C) 1998-2010 NEC Corporation. All rights reserved. 4-1-1 目次 4. J2EE WebOTX...3 4.1. Webアプリケーション...3 4.1.1. Webアプリケーションを作成する...3
More informationr02.dvi
172 2017.7.16 1 1.1? X A B A X B ( )? IBMPL/I FACOM PL1 ( ) X ( ) 1.2 1 2-0 ( ) ( ) ( ) (12) ( ) (112) (131) 281 26 1 (syntax) (semantics) ( ) 2 2.1 BNF BNF(Backus Normal Form) Joun Backus (grammer) English
More informationohp02.dvi
172 2017.7.16 1 ? X A B A X B ( )? IBMPL/I FACOM PL1 ( ) X 2 ( ) 3 2-0 ( ) ( ) ( ) (12) ( ) (112) 31) 281 26 1 4 (syntax) (semantics) ( ) 5 BNF BNF(Backus Normal Form) Joun Backus (grammer) English grammer
More informationintra-mart Accel Platform — イベントナビゲータ 開発ガイド 初版 None
クイック検索検索 目次 Copyright 2013 NTT DATA INTRAMART CORPORATION 1 Top 目次 intra-mart Accel Platform イベントナビゲータ開発ガイド初版 2013-07-01 None 改訂情報概要イベントフローの作成 更新 削除をハンドリングするイベントフローを非表示にする回答を非表示にするリンクを非表示にするタイトル コメントを動的に変更するリンク情報を動的に変更するナビゲート結果のリンクにステータスを表示する
More informationサービス付き高齢者向け住宅賠償責任保険.indd
1 2 1 CASE 1 1 2 CASE 2 CASE 3 CASE 4 3 CASE 5 4 3 4 5 6 2 CASE 1 CASE 2 CASE 3 7 8 3 9 10 CASE 1 CASE 2 CASE 3 CASE 4 11 12 13 14 1 1 2 FAX:03-3375-8470 2 3 3 4 4 3 15 16 FAX:03-3375-8470 1 2 0570-022808
More informationtime.book
BEAWebLogic Server WebLogic Time Services ªªªª ªªª ª BEA WebLogic Server ªªª ª ª 7.0 ªª ª ª u : 2002 6 28 m Copyright 2002, BEA Systems, Inc. All Rights Reserved. ÑÔÒÏÏÎÆÍËÔÓÕÎÖÊÂBEA Systems, Inc. Ê Ó
More informationQuick Sort 計算機アルゴリズム特論 :2017 年度 只木進一
Quick Sort 計算機アルゴリズム特論 :2017 年度 只木進一 2 基本的考え方 リスト ( あるいは配列 )SS の中の ある要素 xx(pivot) を選択 xx より小さい要素からなる部分リスト SS 1 xx より大きい要素からなる部分リスト SS 2 xx は SS 1 または SS 2 に含まれる 長さが 1 になるまで繰り返す pivot xx の選び方として 中央の要素を選択すると効率が良い
More informationT2でつなごう! -つなぐつながるWebフレームワーク「T2」の紹介
T2 でつなごう! - つなぐつながる Web フレームワーク T2 の紹介 T2 プロジェクト 米林正明 片山暁雄 自己紹介 名前 米林正明 ID id:yone098 所属 株式会社 Abby 代表取締役社長 自己紹介 名前 片山 暁雄 ID id:c9katayama 所属 株式会社キャピタルアセットプランニング Agenda T2の概要 T2の基本姿勢 T2の目指す所 機能紹介 DIコンテナ非依存
More informationPJta_h1h4_0329.ai
0120-119-110 1-2-1 100-8050 http://www.tokiomarine-nichido.co.jp/ 24365 0120-691-300 98 http://www.tokiomarine-nichido.co.jp/ 201071 19 P.37 P.816 P.17 P.1819 contents 1 2 3 4 5 6 1 2 3 4 http://www.tokiomarine-nichido.co.jp/
More information−ÈŁÛ05/‚æ4‘Í
CONTENTS 1. 50 2. 51 3. 52 52. 6 1 6 2 6 3 65 65 5. 66 6. 67 1 67 2 67 3 68 7. 69 8. 69 1 69 2 69 3 70 70 9. 71 9 1 50 2 51 52 3 53 5 55 56 57 58 59 60 61 62 63 1 2 6 3 65 5 66 6 1 2 67 3 68 7 8 1 2 69
More information24_5章_01f
CONTENTS p08 1 2 3 4 p14 p20 p24 p28 p40 03 04 05 4527,575 9 405,849 0.1 4,908 9405,849 17 790,361 74 3,331,365 6 243,400 34 1,554,738 51 2,318,680 161,853 122,460 9 410,863 163,253 3121,444 0.15,830 24
More informationuntitled
T O N E G U N 2012 S H I N K I N E R S U L O C S I D B A N K 1. 2. 3. CONTENTS 1. 2. 1. 2. 3. 4. 5. 02 03 04 05 17, 216 84362 1,63323 516 225 17 06 07 1,385 46 1 42 31 3.3% 2.2% 67.4% 08 09 10 1 3 2 1
More information17 1721 42 47 63 1214 15 16 1718 47 6010 10 1316 1719 52 1417 1718 49 53 1315 1617 1719 47 49 11 1214 1718 52 54 11 13 2 No.1311 2005. 4. 13
No.1311 2005.4.13 CONTENTS 17 1721 42 47 63 1214 15 16 1718 47 6010 10 1316 1719 52 1417 1718 49 53 1315 1617 1719 47 49 11 1214 1718 52 54 11 13 2 No.1311 2005. 4. 13 1617 1718 16 1718 10 12 16 13 1512
More information名称未設定-1
Contents http://www.saitama-ctv-kyosai.net 2 250 554 810 13462 250 6318 7144 250 5710 7752 250 5078 8384 2 3201 32 3073 2 1478 1595 2 1382 1691 2 1382 1691 16535 8739 1 2 3 1 2 3 http://www.saitama-ctv-kyosai.net/
More information海外旅行_2007pdf版
CONTENTS 03 10 14 19 21 25 29 35 39 A. 3 4 1 2 3 4 5 6 7 8 9 10 5 6 8 7 A. 9 10 12 11 l 13 14 15 16 17 18 A. 19 20 A. 21 22 23 24 A. 25 26 27 28 29 30 31 32 33 34 A. 35 36 37 38 http://www.forth.go.jp/
More informationオートバイの保険.indd
201211 P.37 P.816 P.17 P.1819 contents 1 2 3 4 5 6 1 18 1 2 16 3 11 4 5 7 8 6 18 9 10 6 7 8 9 10 11 12 11 13 12 5 13 14 14 15 18 16 19 17 20 21 0120-071-281 0570-022808 15 16 3 4 1 0 0 0 0 0 4 1 2 17 18
More informationuntitled
Contents 01 02 03 1 05 07 09 11 13 15 2 17 19 21 23 3 25 27 29 31 4 33 35 39 41 43 43 43 01 02 03 1 1 A A D C B A C D E D 2 3 4 5 05 1 A B C D E 2 3 4 5 06 1 A B C D 2 A B B C C E D A D E 3 A B C D E 4
More informationnewmodelinformation_book_sample.pdf
05 29 http://www.yano-pbi.com/ 03-5371-6923 FAX:03-5352-1088 CONTENTS 1 2 3 4 5 6 7 8 9 10 10 11 11 12 12 13 14 14 15 15 16 17 17 18 18 19 20 20 21 22 23 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
More information