/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental data structures /06/14(Tue) / Memory Management
|
|
- ひでか ささおか
- 5 years ago
- Views:
Transcription
1 I117 II I117 PROGRAMMING PRACTICE II OTHER LANGUAGES Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp
2 / SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental data structures /06/14(Tue) / Memory Management /06/16(Thu) / Memory Management /06/21(Tue) / Debugging /06/23(Thu) / Software Development Env /06/28(Tue) / Software Development Env /06/30(Thu) / Data Structure : Tree /07/05(Tue) / Data Structure: Hash /07/07(Thu) / Understanding Programs /07/12(Tue) / Understanding Programs /07/14(Thu) / Script Language /07/19(Tue) / Script Language /07/21(Thu) / Other Languages /07/26(Tue) / Examination
3 / FINAL REPORT free topic : The deadline: 7/26(Tue) Submit the source code, and the report. by i117report@jaist.ac.jp by 7/26(Tue) 23:59. / Sound file converter / web crawler (CalDAV) calendar program new shell, editor, window manager rsync encrypt/decrypt, rsync markov-chain program The final report must have deep consideration
4 / TODAY'S INDEX python
5 PYTHON
6 PYTHON C sh Java Ruby Python C++ Perl Erlang LISP Scheme ML OCaml Haskel
7 PYTHON (very-high-level language) BBC Monty Python s Flying Circus C
8 PYTHON Python 2.x xPython Python 3.x Python 2.x Python 3.x
9 PYTHON CPython C PythonCPython JPython Java Java VM PyPy PythonPython IronPython C#.NET Unladen Swallow CPython LLVMJIT Stackless Python Python Eve OnlineSecond LifeMMORPGCisco IronPort
10 HELLO WORLD! print python $ python >>> print Hello World Hello World! Ctrl+D $ cat hello.py print Hello World $ python hello.py Hello World! Python.py
11 HELLO WORLD! IN PYTHON 3.X Python 3.x print() >>> print( Hello World ) Hello World!
12 PYTHON Shell1 #! $ cat hello.py #!/usr/bin/env python print Hello World $ chmod +x hello.py $./hello.py Hello World!
13 Python ASCII # -*- coding: encoding -*- UTF-8 $ cat morning.py #!/usr/bin/env python # -*- coding: utf-8 -*- print u $./morning.py
14 PYTHON Unicode
15 Hello World! Hello World! \ \ \ \n \t\\\ >>> print Hello \ World!\ Hello World! >>> print Hello\\World! Hello\World! >>> print Hello\nWorld! Hello World
16 + >>> Hello + World! HelloWorld! * >>> Hello * 5 'HelloHelloHelloHelloHello' len() >>> len( Hello ) 5
17 [] 0 : -1-2 >>> word = Hello >>> word[1] # 1 e >>> word[1:4] # 13 ell >>> word[:3] # 02 hel # >>> word[1:] # 1 ello # >>> word[:-2] # 3 hel
18 UNICODE Python 2.x str unicode u hello u unicode type >>> type('hello') <type 'str'> >>> type(u'') <type 'unicode'> str unicode >>> [0] # 1 '\xe3' >>> u [0] # 1 u'\u3053 >>> len('') 15 # 15 >>> len(u'') 5 # 5
19 UNICODE IN PYTHON 3.X Python 3.x Unicode str (2.x) bytes (3.x) hello b hello Python 2.6 b hello Unicode unicode (2.x) str (3.x) u hello hello
20 UNICODESTR unicodeencode() >>> u.encode( utf-8 ) # UTF-8 '\xe3\x81\x93\xe3\x82\x93\xe3\x81\xab \xe3\x81\xa1\xe3\x81\xaf >>> u.encode( sjis ) # Shift-JIS '\x82\xb1\x82\xf1\x82\xc9\x82\xbf\x82\xcd' unicodeunicode() >>> unicode('\x82\xb1\x82\xf1\x82\xc9\x82\xbf \x82\xcd', 'sjis') u'\u3053\u3093\u306b\u3061\u306f' >>> print unicode('\x82\xb1\x82\xf1\x82\xc9\x82\xbf \x82\xcd', 'sjis')
21 PYTHON list deque set tuple dict
22 LIST C [] >>> foo = ['apple', 'orange', 100, 200] >>> foo ['apple', 'orange', 100, 200] [] >>> foo[2] 100 [:] >>> foo[1:3] ['orange', 100] >>> foo[:2] ['apple', 'orange']
23 LIST + >>> foo = ['apple', 'orange', 100, 200] >>> foo + ['banana', 500] ['apple', 'orange', 100, 200, 'banana', 500] >>> foo ['apple', 'orange', 100, 200, 'banana', 500] >>> foo[1] = 'cherry' >>> foo ['apple', 'cherry', 100, 200, 'banana', 500] >>> foo[2:3] = [300, 400] >>> foo ['apple', 'cherry', 300, 400, 200, 'banana', 500]
24 LIST >>> a = [66.25, 333, 333, 1, ] >>> print a.count(333), a.count(66.25) # 2 1 >>> a.insert(2, -1) # 2-1 >>> a [66.25, 333, -1, 333, 1, ] >>> a.index(333) # >>> a.remove(333) # 333 >>> a [66.25, -1, 333, 1, ] >>> a.reverse() # >>> a [1234.5, 1, 333, -1, 66.25] >>> a.sort() # >>> a [-1, 1, 66.25, 333, ] >>> len(a) # 5
25 LIST appendpop >>> stack = [3, 4, 5] >>> stack.append(6) # 6 >>> stack.append(7) # 7 >>> stack [3, 4, 5, 6, 7] >>> stack.pop() # 7 >>> stack [3, 4, 5, 6] >>> stack.pop() 6 >>> stack.pop() 5 >>> stack [3, 4]
26 DEQUE deque >>> import collections # collections >>> queue = collections.deque([1, 2, 3]) # >>> queue deque([1, 2, 3]) >>> queue.append(4) # 4 >>> queue.append(5) # 5 >>> queue deque([1, 2, 3, 4, 5]) >>> queue.popleft() # >>> queue.popleft() >>> queue deque([3, 4, 5])
27 SET >>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana ] >>> fruit = set(basket) # set >>> fruit set(['orange', 'pear', 'apple', 'banana']) >>> orange in fruit # orange True # >>> 'crabgrass' in fruit False >>> fruit.add( peach ) # peach >>> fruit set(['apple', 'banana', 'orange', 'peach', 'pear']) >>> fruit.remove( orange ) # orange set(['apple', 'banana', 'peach', 'pear'])
28 TUPLE list tuple tuplec >>> point = 10, 30 # tuple >>> point (10, 30) >>> point[0] # 0 10 >>> x, y = point # x, y tuple >>> x 10 >>> y 30
29 DICT KeyValue Key >>> fruit = { orange : 100, apple : 200} # >>> fruit[ orange ] # key orange 100 >>> fruit[ orange ] = 300 # orange >>> fruit {'orange': 300, 'apple': 200} >>> fruit[ banana ] = 500 # banana >>> fruit {'orange': 300, 'apple': 200, 'banana': 500} >>> del fruit[ apple ] # apple >>> fruit {'orange': 300, 'banana': 500}
30 PYTHON if for range() continuebreak pass
31 Python 4 CPython C if (a == b) { a = b * 2; printf( %d\n, a); } Python if a == b: a = b * 2 print a CK&RGNUBSD
32 IF Cif >>> x = 3 >>> if x < 0:... print x is less than zero... elif x == 0:... print zero... elif x == 1:... print single... else... print more... more
33 FOR forcfor >>> animal = [ dog, cat, bird ] >>> for a in animal: # animala... print a... dog cat bird
34 FORDICT dictkeys()key >>> fruit = {'orange': 100, 'apple': 200, 'banana': 400} >>> for f in fruit.keys():... print f, :, fruit[f]... orange : 100 apple : 200 banana : 400 iteritems()3.xitems() >>> fruit = {'orange': 100, 'apple': 200, 'banana': 400} >>> for k, v in fruit.iteritems():... print k, :, v... orange : 100 apple : 200 banana : 400
35 RANGE() range() >>> range(10) # 09 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) # 39 [3, 4, 5, 6, 7, 8, 9] >>> range(3, 20, 4) # 320 [3, 7, 11, 15, 19] # 4
36 CFOR range() >>> month = [ April, May, June, July ] >>> for i in range(len(month)):... print i, month[i]... 0 April 1 May 2 June 3 July xrange() xrange()
37 CONTINUEBREAK break continue >>> for n in range(2, 10):... for x in range(2, n):... if n % x == 0:... print n, 'equals', x, '*', n/x... break... else: # Cforelse... # else... print n, 'is a prime number'... 2 is a prime number 3 is a prime number 4 equals 2 * 2 5 is a prime number 6 equals 2 * 3 7 is a prime number 8 equals 2 * 4 9 equals 3 * 3
38 PASS pass >>> while is_func(): # is_func()... pass #
39 PYTHON def lambda C++ f : X Y Z 2f(x, y)gf f(x, y) = g(x)(y) g : X (Y Z)
40 def return >>> def twice(x): # def,... return x * 2 # return... >>> twice(100) # 200 >>> twice(45) 90 >>> x # xtwice Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name x is not defined
41 C >>> def n_times(x, n = 2): # n... return x * n... >>> n_times(40) # n n = 2 80 >>> n_times(40, 3) # n 120
42 >>> def person(name, age):... print 'name = ' + name... print 'age = ' + str(age)... >>> person( Alice, 16) # name = Alice age = 16 >>> person(age = 18, name = Bob ) # name = Bob age = 18
43 ** * >>> def var_args(*args, **kargs):... print args... print kargs... >>> var_args(1, 2, 3, 'foo', 'bar', name = 'Alice', age = 20) (1, 2, 3, foo, bar ) # { age : 20, name : Alice } #
44 * ** >>> range(2, 7) # [2, 3, 4, 5, 6] >>> args = [2, 7] >>> range(*args) # [2, 3, 4, 5, 6] >>> def n_times(x, n):... return x * n... >>> args = {'n': 100, 'x': 3} >>> n_times(**args) # 300
45 LAMBDA lambda n_times() >>> f = lambda x, n: x * n >>> f(10, 4) 40 lambda defreturn
46 n >>> def n_times_f(n): # n... return lambda x: n_times(x, n) # n... >>> f1 = n_times_f(2) # 2 >>> f1(10) 20 >>> f1(15) 30 >>> f2 = n_times_f(5) # 5 >>> f2(10) 50 >>> f2(15) 75
47 2x, ysort() x < y, x == y, x > y -1, 0, 1 >>> people = [('Bob', 20), ('Carol', 15), ('Alice', 17)] >>> people [('Bob', 20), ('Carol', 15), ('Alice', 17)] >>> people.sort() # >>> people # [('Alice', 17), ('Bob', 20), ('Carol', 15)] >>> people.sort(lambda x, y: x[1] - y[1]) # >>> people # [('Carol', 15), ('Alice', 17), ('Bob', 20)]
48 PYTHON filter map reduce
49 FILTER filter(func, list) func list 23 >>> def f(x):... return x % 2!= 0 and x % 3!= 0... >>> filter(f, range(2, 25)) [5, 7, 11, 13, 17, 19, 23]
50 MAP map(func, list) func list 3 >>> def cube(x):... return x**3 # **... >>> map(cube, range(1, 11)) [1, 8, 27, 64, 125, 216, 343, 512, 729, 1000]
51 REDUCE 2 reduce(func, list, init) func list init >>> reduce(lambda x, y: x + y,... [[1, 2, 3], [4, 5], [6, 7, 8]],... []) [1, 2, 3, 4, 5, 6, 7, 8] step 1: [1, 2, 3] + [4, 5] [6, 7, 8] + [] step 2: [1, 2, 3, 4, 5] + [6, 7, 8] result: [1, 2, 3, 4, 5, 6, 7, 8]
52 { x * x x L} >>> [x * x for x in range(10)] [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] { x * x x * x > 20, x L} >>> [x * x for x in range(10) if x * x > 20] [25, 36, 49, 64, 81]
53 PYTHON dir()
54 Python11 my_echo.pyecho() $ cat my_echo.py def echo(word): print word my_echoecho $ python >>> import my_echo # >>> my_echo.echo( Hello World! ) # Hello World!
55
56 / SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental data structures /06/14(Tue) / Memory Management /06/16(Thu) / Memory Management /06/21(Tue) / Debugging /06/23(Thu) / Software Development Env /06/28(Tue) / Software Development Env /06/30(Thu) / Data Structure : Tree /07/05(Tue) / Data Structure: Hash /07/07(Thu) / Understanding Programs /07/12(Tue) / Understanding Programs /07/14(Thu) / Script Language /07/19(Tue) / Script Language /07/21(Thu) / Other Languages /07/26(Tue) / Examination
57 / FINAL REPORT free topic : The deadline: 7/26(Tue) Submit the source code, and the report. by i117report@jaist.ac.jp by 7/26(Tue) 23:59. / Sound file converter / web crawler (CalDAV) calendar program new shell, editor, window manager rsync encrypt/decrypt, rsync markov-chain program The final report must have deep consideration
/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1
I117 II I117 PROGRAMMING PRACTICE II 2 MEMORY MANAGEMENT 2 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming
More informationI117 II I117 PROGRAMMING PRACTICE II DEBUG Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara
I117 II I117 PROGRAMMING PRACTICE II DEBUG Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming 2. 2011/06/09(Thu)
More informationI117 II I117 PROGRAMMING PRACTICE II SOFTWARE DEVELOPMENT ENV. 1 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara
I117 II I117 PROGRAMMING PRACTICE II SOFTWARE DEVELOPMENT ENV. 1 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of
More informationI117 II I117 PROGRAMMING PRACTICE II HASH Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara
I117 II I117 PROGRAMMING PRACTICE II HASH Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming 2. 2011/06/09(Thu)
More informationI117 II I117 PROGRAMMING PRACTICE II 2 SOFTWARE DEVELOPMENT ENV. 2 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu
I117 II I117 PROGRAMMING PRACTICE II 2 SOFTWARE DEVELOPMENT ENV. 2 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic
More informationPython Speed Learning
Python Speed Learning 1 / 76 Python 2 1 $ python 1 >>> 1 + 2 2 3 2 / 76 print : 1 print : ( ) 3 / 76 print : 1 print 1 2 print hello 3 print 1+2 4 print 7/3 5 print abs(-5*4) 4 / 76 print : 1 print 1 2
More informationI117 II I117 PROGRAMMING PRACTICE II SCRIPT LANGUAGE 1 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara
I117 II I117 PROGRAMMING PRACTICE II SCRIPT LANGUAGE 1 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara yasu@jaist.ac.jp / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming
More informationlistings-ext
(6) Python (2) ( ) ohsaki@kwansei.ac.jp 5 Python (2) 1 5.1 (statement)........................... 1 5.2 (scope)......................... 11 5.3 (subroutine).................... 14 5 Python (2) Python 5.1
More information1 ( : Documents/kadai4), (ex.py ),. print 12345679 * 63, cd Documents/kadai4, python ex.py., python: can t open file ex.py : [Errno 2] No such file or
Python 2010.6 1 Python 1.1 ( ). mi.,.py. 1.2, python.. 1. python, python. ( ). 2.., python. Python (>>>). Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type help, copyright,
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 informationPython Speed Learning
Python Speed Learning 1 / 89 1 2 3 4 (import) 5 6 7 (for) (if) 8 9 10 ( ) 11 12 for 13 2 / 89 Contents 1 2 3 4 (import) 5 6 7 (for) (if) 8 9 10 ( ) 11 12 for 13 3 / 89 (def) (for) (if) etc. 1 4 / 89 Jupyter
More informationPowerPoint Presentation
知能システム論 1 (3) 2009.4.21 情報システム学研究科情報メディアシステム学専攻知能システム学講座末廣尚士 - 講義資料の HP http://www.taka.is.uec.ac.jp/ から右のメニューの class をクリック または http://www.taka.is.uec.ac.jp/class200 9/class2009.html を直接入力 2. Python 入門
More information永和システムマネジメント SP 安井力 東京支社 Python 勉強会実習資料 2005/12/28 この資料の使い方最初から順に試してください 初心者は 書かれたとおり入力して ほかにも似た例を試してみてください 初級者は 書かれたとおり入力して なぜそれで動くのか調べてください 中級者は 設問か
この資料の使い方最初から順に試してください 初心者は 書かれたとおり入力して ほかにも似た例を試してみてください 初級者は 書かれたとおり入力して なぜそれで動くのか調べてください 中級者は 設問から解答を考えてください 根性 問題も挑戦してください 上級者は 根性 問題も含めて この資料の改善をしてください 根性 問題は やる気と ( 多少の ) 知識がある人に挑戦して欲しいものです 1. 起動と実行
More informationBoo Boo 2 Boo 2.NET Framework SDK 2 Subversion 2 2 Java 4 NAnt 5 Boo 5 5 Boo if 11 for 11 range 12 break continue 13 pass
Boo Boo 2 Boo 2.NET Framework SDK 2 Subversion 2 2 Java 4 NAnt 5 Boo 5 5 Boo 6 6 7 9 10 11 if 11 for 11 range 12 break continue 13 pass 13 13 14 15 15 23 23 24 24 24 25 import 26 27-1- Boo Boo Python CLI.NET
More informationnum2.dvi
kanenko@mbk.nifty.com http://kanenko.a.la9.jp/ 16 32...... h 0 h = ε () 0 ( ) 0 1 IEEE754 (ieee754.c Kerosoft Ltd.!) 1 2 : OS! : WindowsXP ( ) : X Window xcalc.. (,.) C double 10,??? 3 :, ( ) : BASIC,
More information3360 druby Web Who is translating it? http://dx.doi.org/10.1007/s10766-008-0086-1 $32.00 International Journal of PARALLEL PROGRAMING Must buy! http://dx.doi.org/10.1007/s10766-008-0086-1 toruby The
More information1.indd
14 15 6 april 6 16 17 18 april 18 april 18 19 28 april 20 21 28 april 22 23 21 may 24 25 10 june 21 may 26 27 10 june 28 29 12 june 30 31 12 25 june 32 33 25 34 35 4 july 37 36 38 39 25 july 25 july 40
More information¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~alse
I Exercise on Programming I http://bit.ly/oitprog1 1, 2 of 14 ( RD S ) I 1, 2 of 14 1 / 44 Ruby Ruby ( RD S ) I 1, 2 of 14 2 / 44 7 5 9 2 9 3 3 2 6 5 1 3 2 5 6 4 7 8 4 5 2 7 9 6 4 7 1 3 ( RD S ) I 1, 2
More informationRuby演習テキスト1
Ruby言語 基礎演習 社会人技術者研修 2014年度 テキスト 社会人技術者研修 2014年度テキスト 2014.11 Ruby基礎演習 1 2014.11 2015.2.1 puts "Hello Ruby >ruby hello.rb ( リターン ) > ruby hello.rb Hello Ruby # はじめての ruby プログラム puts "Hello Ruby" > ruby
More information3360 druby Web Who is translating it? http://dx.doi.org/10.1007/s10766-008-0086-1 $32.00 International Journal of PARALLEL PROGRAMING Must buy! http://dx.doi.org/10.1007/s10766-008-0086-1 toruby LT Linux
More informationたのしいプログラミング Pythonではじめよう!
Title of English-language original: Python for Kids A Playful Introduction to Programming ISBN 978-1-59327-407-8, published by No Starch Press, Inc. Copyright 2013 by Jason R. Briggs. Japanese-language
More informationr07.dvi
19 7 ( ) 2019.4.20 1 1.1 (data structure ( (dynamic data structure 1 malloc C free C (garbage collection GC C GC(conservative GC 2 1.2 data next p 3 5 7 9 p 3 5 7 9 p 3 5 7 9 1 1: (single linked list 1
More informationohp07.dvi
19 7 ( ) 2019.4.20 1 (data structure) ( ) (dynamic data structure) 1 malloc C free 1 (static data structure) 2 (2) C (garbage collection GC) C GC(conservative GC) 2 2 conservative GC 3 data next p 3 5
More information3 Java 3.1 Hello World! Hello World public class HelloWorld { public static void main(string[] args) { System.out.println("Hello World");
(Basic Theory of Information Processing) Java (eclipse ) Hello World! eclipse Java 1 3 Java 3.1 Hello World! Hello World public class HelloWorld { public static void main(string[] args) { System.out.println("Hello
More information2
Haskell ( ) kazu@iij.ad.jp 1 2 Blub Paul Graham http://practical-scheme.net/trans/beating-the-averages-j.html Blub Blub Blub Blub 3 Haskell Sebastian Sylvan http://www.haskell.org/haskellwiki/why_haskell_matters...
More informationsyspro-0405.ppt
3 4, 5 1 UNIX csh 2.1 bash X Window 2 grep l POSIX * more POSIX 3 UNIX. 4 first.sh #!bin/sh #first.sh #This file looks through all the files in the current #directory for the string yamada, and then prints
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 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 informationI117 プログラミング演習II
I117 プログラミング演習 II I117 PROGRAMMING PRACTICE II メモリ管理 1 MEMORY MANAGEMENT 1 情報社会基盤研究センター Research Center for Advanced Computing Infrastructure (RCACI) 小原泰弘 / Yasuhiro Ohara yasu@jaist.ac.jp スケジュール / SCHEDULE
More information,,,,., C Java,,.,,.,., ,,.,, i
24 Development of the programming s learning tool for children be derived from maze 1130353 2013 3 1 ,,,,., C Java,,.,,.,., 1 6 1 2.,,.,, i Abstract Development of the programming s learning tool for children
More informationPython @HACHINONE 10 1 V Python 2014 2 : L[i] # -*- coding: utf-8 -*- def search(l, e): """L をリスト e をオブジェクトとする L に e が含まれていれば True そうでなければ False を返す """ for i in range(len(l)): if L[i] == e: return True
More informationDec , IS p. 1/60
Dec 08 2007, IS p. 1/60 Dec 08 2007, IS p. 2/60 Plan of Talk (LDAP) (CAS) (IdM) Dec 08 2007, IS p. 3/60 Dec 08 2007, IS p. 4/60 .. Dec 08 2007, IS p. 5/60 Dec 08 2007, IS p. 6/60 Dec 08 2007, IS p. 7/60
More information3 3.1 algebraic datatype data k = 1 1,1... 1,n1 2 2,1... 2,n2... m m,1... m,nm 1 m m m,1,..., m,nm m 1, 2,..., k 1 data Foo x y = Alice x [y] B
3 3.1 algebraic datatype data 1 2... k = 1 1,1... 1,n1 2 2,1... 2,n2... m m,1... m,nm 1 m m m,1,..., m,nm m 1, 2,..., k 1 data Foo x y = Alice x [y] Bob String y Charlie Foo Double Integer Alice 3.14 [1,2],
More informationRubyKaigi2009 COBOL
RubyKaigi2009 COBOL seki@druby.org 3360 Pragmatic Bookshelf druby Web $32.00 International Journal of PARALLEL PROGRAMING !? MapReduce Rinda (map, reduce) map reduce key value [, ] [, ID] map()
More informationRuby Ruby ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( ) 44=>
Ruby Ruby 200779 ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( 2+3+4+5+6+7+8+9 ) 44 irb(main):002:0> irb irb(main):001:0> 1+2+3+4 => 10 irb(main):002:0>
More information2
2011.11.11 1 2 MapReduce 3 4 5 6 Functional Functional Programming 7 8 9 10 11 12 13 [10, 20, 30, 40, 50] 0 n n 10 * 0 + 20 * 1 + 30 * 2 + 40 * 3 + 50 *4 = 400 14 10 * 0 + 20 * 1 + 30 * 2 + 40 * 3 + 50
More informationr1.dvi
Ruby 2009.9.7 1 ( ) --- ( ( ) ( ) 1 --- ( ) 1 ( ) (?) IT 7K( )?? ( ) ( )? IT ( ) --- ( ) 1 ( ) --- ( ) (?) 2-3% Top-Level ICT Professional 5% ICT Professional 10% 100% 50% 20% Devl. Experiment Adv. ICT
More informationtuat1.dvi
( 1 ) http://ist.ksc.kwansei.ac.jp/ tutimura/ 2012 6 23 ( 1 ) 1 / 58 C ( 1 ) 2 / 58 2008 9 2002 2005 T E X ptetex3, ptexlive pt E X UTF-8 xdvi-jp 3 ( 1 ) 3 / 58 ( 1 ) 4 / 58 C,... ( 1 ) 5 / 58 6/23( )
More informationJava updated
Java 2003.07.14 updated 3 1 Java 5 1.1 Java................................. 5 1.2 Java..................................... 5 1.3 Java................................ 6 1.3.1 Java.......................
More informationBASIC / / BA- SIC Web 1/10 1/10 / / JavaScript
BASIC / / BA- SIC Web 1/10 1/10 // JavaScript MIT Processing line(10,10,100,100); 1 BASIC / Phidgets 1 GAINER 2 USB / Phidgets USB 1: 1 http://www.phidgets.com/ 2 http://gainer.cc/ / / BGM Phidgets University
More information1 VisBAR edu H 2 O.....
VisBAR edu v1.03 ( ) 25 4 22 1 VisBAR edu 1 1.1....................................................... 1 1.2.................................................. 2 2 3 2.1 H 2 O.........................................
More informationIntroduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for
Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for embedded systems that use microcontrollers (MCUs)
More informationuntitled
C -1 - -2 - concept lecture keywords FILE, fopen, fclose, fscanf, fprintf, EOF, r w a, typedef gifts.dat Yt JZK-3 Jizake tsumeawase 45 BSP-15 Body soap set 3 BT-2 Bath towel set 25 TEA-2 Koutya
More information(CC Attribution) Lisp 2.1 (Gauche )
http://www.flickr.com/photos/dust/3603580129/ (CC Attribution) Lisp 2.1 (Gauche ) 2 2000EY-Office 3 4 Lisp 5 New York The lisps Sammy Tunis flickr lisp http://www.flickr.com/photos/dust/3603580129/ (CC
More informationつくって学ぶプログラミング言語 RubyによるScheme処理系の実装
Ruby Scheme 2013-04-16 ( )! SICP *1 ;-) SchemeR SICP MIT * 1 Structure and Interpretaion of Computer Programs 2nd ed.: 2 i SchemeR Ruby Ruby Ruby Ruby & 3.0 Ruby ii https://github.com/ichusrlocalbin/scheme_in_ruby
More information(pack ) Toplevel
1 1 2 2 3 (pack ) 6 3.1................................... 6 3.2 1............................ 8 3.3 Toplevel........................................ 9 3.4............................... 10 3.5 Toplevel..................................
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 11 20 p.1/34 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20
More information(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1
(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1 17 Fortran Formular Tranlator Lapack Fortran FORTRAN, FORTRAN66, FORTRAN77, FORTRAN90, FORTRAN95 17.1 A Z ( ) 0 9, _, =, +, -, *,
More informationPowerPoint プレゼンテーション
アルゴリズム設計 5 月 18 日 Agenda 諸注意 Pythonの心得 エラー処理 クラス 諸注意 諸注意 提出前に必ず実行してください! エラーがある場合はコメントアウト等, 実行されないように 関数名指定にも関わらず, 自分で関数名を決めている どの問題なのか分からなくなるので, 決められた名前を使ってください 関数をクォーテーションで囲んでいる 定義しただけでは実行されないので, クォーテーションで囲む意味はありません.
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 informationpiyo0705B.rtfd
if?:!k&r, p.51" if (a > b) z = a; else z = b; if?:!k&r, p.51" z = (a > b)? a : b; /* z = max(a, b) */ It should be noted that the conditional expression is indeed an expression,...if if def my_max(a, b):
More informationLiveCode初心者開発入門サンプル
/ About LiveCode 01:... 11 02: Create... 15 set 03:... 21 name title LiveCode 04:... 29 global local width height 05:... 37 Controls Tools Palette Script Editor message handler 06:... 52 RGB 07:... 63
More information導入基礎演習.ppt
Multi-paradigm Programming Functional Programming Scheme Haskell ML Scala X10 KL1 Prolog Declarative Lang. C Procedural Lang. Java C++ Python Object-oriented Programming / (root) bin home lib 08 09
More informationuntitled
Worldspan go! 4.x (UCI) Administrator Guide go! 4.x (UCI) Version 2.1.4 : 31 August 2007 1. WORLDSPAN GO! VERSION 4.X (UCI)... 3 2. WORLDSPAN GO! VERSION 4.X (UCI)... 4 3.... 6 4. WORLDSPAN GO! VERSION
More information(2 Linux Mozilla [ ] [ ] [ ] [ ] URL 2 qkc, nkc ~/.cshrc (emacs 2 set path=($path /usr/meiji/pub/linux/bin tcsh b
II 5 (1 2005 5 26 http://www.math.meiji.ac.jp/~mk/syori2-2005/ UNIX (Linux Linux 1 : 2005 http://www.math.meiji.ac.jp/~mk/syori2-2005/jouhousyori2-2005-00/node2. html ( (Linux 1 2 ( ( http://www.meiji.ac.jp/mind/tool/internet-license/
More informationNEEDS Yahoo! Finance Yahoo! NEEDS MT EDINET XBRL Magnetic Tape NEEDS MT Mac OS X Server, Linux, Windows Operating System: OS MySQL Web Apache MySQL PHP Web ODBC MT Web ODBC LAMP ODBC NEEDS MT PHP: Hypertext
More informationuntitled
INDEX April. 2013 No.113 Contents 2.20 WED 2.16 SAT T opics! Aizawa Event Calendar 5 May TUE 5.14 TUE 5.28 TUE 6.11 6 13 20 27 5 12 19 26 7 14 21 28 1 8 15 22 29 2 9 16 23 30 3 10 17 24 31 4 11 18 25 MON
More information1153006 JavaScript try-catch JavaScript JavaScript try-catch try-catch try-catch try-catch try-catch 1 2 2 try-catch try-catch try-catch try-catch 25 1153006 26 2 12 1 1 1 2 3 2.1... 3 2.1.1... 4 2.1.2
More informationKyosuke MOROHASHI
Practical Meta Programming on Rails Application @2013-12-17 Ruby 1 in MOROHASHI Kyosuke (@moro) Kyosuke MOROHASHI Aga toolbox Ruby " " Ruby http://www.amazon.co.jp/exec/obidos/asin/4048687158/morodiary05-22/ref=noism
More information1 1 1........................... 1 2........... 1 3........................... 4 4.............. 6 2 7 1...................... 7 2........................... 8 3............................ 8 4...............
More informationlistings-ext
(10) (2) ( ) ohsaki@kwansei.ac.jp 8 (2) 1 8.1.............................. 1 8.2 mobility.fixed.......................... 2 8.3 mobility.randomwalk...................... 7 8.4 mobility.randomwaypoint...................
More informationCopyright c 2008 Zhenjiang Hu, All Right Reserved.
2008 10 27 Copyright c 2008 Zhenjiang Hu, All Right Reserved. (Bool) True False data Bool = False True Remark: not :: Bool Bool not False = True not True = False (Pattern matching) (Rewriting rules) not
More informationJEB Plugin 開発チュートリアル 第4回
Japan Computer Emergency Response Team Coordination Center 電子署名者 : Japan Computer Emergency Response Team Coordination Center DN : c=jp, st=tokyo, l=chiyoda-ku, email=office@jpcert.or.jp, o=japan Computer
More information(Java/FX ) Java CD Java version Java VC++ Python Ruby Java Java Eclipse Java Java 3 Java for Everyone 2 10 Java Midi Java JavaFX Shape Canvas C
(Java/FX ) Java CD Java version 10.0.1 Java VC++ Python Ruby Java Java Eclipse Java Java 3 Java for Everyone 2 10 Java Midi Java JavaFX Shape Canvas Canvas Eclipse Eclipse M... 1 javafx e(fx)clipse 3.0.0
More informationRL_tutorial
)! " = $ % & ' "(& &*+ = ' " + %' "(- + %. ' "(. + γ γ=0! " = $ " γ=0.9! " = $ " + 0.9$ " + 0.81$ "+, + ! " #, % #! " #, % # + (( + #,- +. max 2 3! " #,-, % 4! " #, % # ) α ! " #, % ' ( )(#, %)!
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 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 informationI 2 tutimura/ I 2 p.1/??
I 2 tutimura@mist.i.u-tokyo.ac.jp http://www.misojiro.t.u-tokyo.ac.jp/ tutimura/ 2002 4 25 I 2 p.1/?? / / Makefile I 2 p.2/?? Makefile make GNU make I 2 p.3/?? Makefile L A T E X I 2 p.4/?? core (1) gcc,
More informationohp1.dvi
2008 1 2008.10.10 1 ( 2 ) ( ) ( ) 1 2 1.5 3 2 ( ) 50:50 Ruby ( ) Ruby http://www.ruby-lang.org/ja/ Windows Windows 3 Web Web http://lecture.ecc.u-tokyo.ac.jp/~kuno/is08/ / ( / ) / @@@ ( 3 ) @@@ :!! ( )
More informationuntitled
30 callcc yhara ( ( ) (1) callcc (2) callcc (3) callcc callcc Continuation callcc (1) (2) (3) (1) (2) (3) (4) class Foo def f p 1 callcc{ cc return cc} p 2 class Bar def initialize @cc = Foo.new.f def
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 informationjoho07-1.ppt
0xbffffc5c 0xbffffc60 xxxxxxxx xxxxxxxx 00001010 00000000 00000000 00000000 01100011 00000000 00000000 00000000 xxxxxxxx x y 2 func1 func2 double func1(double y) { y = y + 5.0; return y; } double func2(double*
More informationC言語によるアルゴリズムとデータ構造
Algorithms and Data Structures in C 4 algorithm List - /* */ #include List - int main(void) { int a, b, c; int max; /* */ Ÿ 3Ÿ 2Ÿ 3 printf(""); printf(""); printf(""); scanf("%d", &a); scanf("%d",
More information28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment
28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment 1170288 2017 2 28 Docker,.,,.,,.,,.,. Docker.,..,., Web, Web.,.,.,, CPU,,. i ., OS..,, OS, VirtualBox,.,
More informationRHEA key
2 P (k, )= k e k! 3 4 Probability 0.4 0.35 0.3 0.25 Poisson ( λ = 1) Poisson (λ = 3) Poisson ( λ = 10) Poisson (λ = 20) Poisson ( λ = 30) Gaussian (µ = 1, s = 1) Gaussian ( µ = 3, s = 3) Gaussian (µ =
More informationEmacs Ruby..
command line editor 27014533 2018 3 1 5 1.1................................... 5 1.2................................... 5 2 6 2.1 Emacs...................................... 6 2.2 Ruby.......................................
More information:56 1 (Forward kinematics) (Global frame) G r = (X, Y, Z) (Local frame) L r = (x, y, z) 1 X Y, Z X Y, Z 1 ( ) ( ) 1.2 (Joint rotati
2013.09.21 17:56 1 (Forward kinematics) 1.1 2 (Global frame) G r (X, Y, Z) (Local frame) L r (x, y, z) 1 X Y, Z X Y, Z 1 ( ) ( ) 1.2 (Joint rotation) 3 P G r, L r G r L r Z α : G r Q L Z,α r (1) 1 G r
More informationtest.gby
Beautiful Programming Language and Beautiful Testing 1 Haskeller Haskeller 2 Haskeller (Doctest QuickCheck ) github 3 Haskeller 4 Haskell Platform 2011.4.0.0 Glasgow Haskell Compiler + 23 19 8 5 10 5 Q)
More information5-2 print(i, "\n") print("-- while--\n") while i < 2 j = print(i, ",", j, "\n") print("-- while--\n") while j < 3 print(i, ",", j, "\n") j = j + 1 pri
I 5 1 5 2 2.1 5-1 print(i, "\n") print("-- while--\n") while i < 3 print(i, "\n") print("-- while--\n") print(i, "\n") 1 5-2 print(i, "\n") print("-- while--\n") while i < 2 j = print(i, ",", j, "\n")
More informationI I / 68
2013.07.04 I 2013 3 I 2013.07.04 1 / 68 I 2013.07.04 2 / 68 I 2013.07.04 3 / 68 heat1.f90 heat2.f90 /tmp/130704/heat2.f90 I 2013.07.04 4 / 68 diff heat1.f90 heat2.f90!! heat2. f 9 0! c m > NGRID! c nmax
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#include #include #include int gcd( int a, int b) { if ( b == 0 ) return a; else { int c = a % b; return gcd( b, c); } /* if */ } int main() { int a = 60; int b = 45; int
More informationRuby 50 Ruby UTF print, \n [Ruby-1] print("hello, Ruby.\n") [Ruby-2] Hello, Ruby. [Ruby-3] print("hello, \"Ruby\".\n") 2 [Ruby-4] seisuu = 10 pr
Ruby 50 Ruby UTF-8 1 1 print, \n [Ruby-1] print("hello, Ruby.\n") [Ruby-2] Hello, Ruby. [Ruby-3] print("hello, \"Ruby\".\n") 2 [Ruby-4] seisuu = 10 print(seisuu, "\n") jissuu = 3.141592 print(jissuu, "\n")
More information明解Java入門編
1 Fig.1-1 4 Fig.1-1 1-1 1 Table 1-1 Ease of Development 1-1 Table 1-1 Java Development Kit 1 Java List 1-1 List 1-1 Chap01/Hello.java // class Hello { Java System.out.println("Java"); System.out.println("");
More informationPython C/C++ IPMU IRAF
Python C/C++ IPMU 2010 11 24IRAF Python Swig Numpy array Image Python 2.6.6 swig 1.3.40 numpy 1.5.0 pyfits 2.3 pyds9 1.1 svn co hjp://svn.scipy.org/svn/numpy/tags/1.5.0/doc/swig swig/numpy.i /usr/local/share/swig/1.3.40/python
More information2
Java Festa in 2007 OPEN JAVA: IMAGINE THE POSSIBILITIES 2 3 4 Java SE のダウンロード数の比率 1996/12 からのダウンロード数 5 JavaOne 2007 5/7: CommunityOne > NetBeans Day, GlassFish, OpenSolaris, OpenJDK, Web 2.0 5/8-11: JavaOne
More information2011 Future University Hakodate 2011 System Information Science Practice Group Report Project Name Visualization of Code-Breaking Group Name Implemati
2011 Future University Hakodate 2011 System Information Science Practice Group Report Project Name Group Name Implemation Group /Project No. 13-C /Project Leader 1009087 Takahiro Okubo /Group Leader 1009087
More informationr08.dvi
19 8 ( ) 019.4.0 1 1.1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( ) 1 next 1 prev 1 head cur tail head cur prev
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 informationpptx
iphone 2010 8 18 C xkozima@myu.ac.jp C Hello, World! Hello World hello.c! printf( Hello, World!\n );! os> ls! hello.c! os> cc hello.c o hello! os> ls! hello!!hello.c! os>./hello! Hello, World!! os>! os>
More informationjohokiso-char.pdf.pdf
1 2 (2) l ASCIIJISUnicode ISO-2022-JP, Shift_JIS, EUC-JP Web l Copyright 2006-2018 Kota Abe 2018/06/12 3 4 l ()!? 5 6 l : This is a pen. 84 104 105 83 This is a pen. (, encode) () (, decode) l 41 42 43
More informationJava (9) 1 Lesson Java System.out.println() 1 Java API 1 Java Java 1
Java (9) 1 Lesson 7 2008-05-20 Java System.out.println() 1 Java API 1 Java Java 1 GUI 2 Java 3 1.1 5 3 1.0 10.0, 1.0, 0.5 5.0, 3.0, 0.3 4.0, 1.0, 0.6 1 2 4 3, ( 2 3 2 1.2 Java (stream) 4 1 a 5 (End of
More informationjssst-ocaml.mgp
Objective Caml Jacques Garrigue Kyoto University garrigue@kurims.kyoto-u.ac.jp Objective Caml? 2 Objective Caml GC() Standard MLHaskell 3 OCaml () OCaml 5 let let x = 1 + 2 ;; val x : int = 3 ;; val-:
More informationohp08.dvi
19 8 ( ) 2019.4.20 1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: 2 (2) NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( 2) 3 (3) head cur tail head cur prev data
More informationMicrosoft PowerPoint - 11RubyIntro-No02.ppt [互換モード]
Ruby 入門 東京電機大学櫻井彰人 Ruby とは? Ruby: 松本ゆきひろ氏による (1993) 純粋オブジェクト指向 スクリプト言語 Web プログラムで どんどんポピュラーに Ruby on Rails (http://www.rubyonrails.org/) なぜか きわめて Lisp like 松本行弘 (Matz) Introduction 実行環境 Windows/Unix/Linux/
More information¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~alse
I Exercise on Programming I http://bit.ly/oitprog1 13 of 14 ( RD S ) I 13 of 14 1 / 39 https://bit.ly/oitprog1 ( RD S ) I 13 of 14 2 / 39 game.rb ( RD S ) I 13 of 14 3 / 39 game.rb 12 ( ) 1 require "io/console"
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 information