/

Size: px
Start display at page:

Download "/"

Transcription

1 /

2 1 UNIX AWK( ) 1.1 AWK AWK AWK A.V.Aho P.J.Weinberger B.W.Kernighan 3 UNIX AWK GNU AWK mkdir ~/data data ( ) cd data 1 98 MS DOS FD 1

3 2 AWK 2.1 AWK byte.data 1 byte.data AWK gawk $3 > 0 { print $1, $2 * $3 byte.data ( ) byte.data AWK AWK $3 > 0 print $1, $2 * $ gawk $3 == 0 { print $1 byte.data $3 == 0 3 print $1 1 /user/awk 2

4 2.2 AWK AWK AWK AWK 1 ( ) ( ) $3 == 0 ( ) { print $1 ( ) ({) 2.3 AWK AWK gawk file1 file2 gawk $3 == 0 { print $1 file1 file2 $ 1 ( ) 3

5 gawk f f AWK 2.4 byte.data AWK AWK ( ) byte.data AWK 1 ( ) $1 2 $2 $ $ { print { print $0 { print $1, $3 NF 2 { print NF, $1, $NF { print $1, $2 * $3 3 { print NR, $0 { print $1,, $2 * $3 2.5 print printf printf printf(, 1, 2,..., n) % (d,f,s) 1 2 4

6 % 1 { printf("%s %6d \n", $1, $2 * $3) %s $1 %6d $2 * $3 6 n { printf("%-8s %6.2f \n",$1, $2 * $3) 2 % 8s 8 %6.2f AWK OS sort gawk { printf("%7d %s\n", $2 * $3, $0) byte.data sort AWK sort ( ) $2 >= 920 { print("%s\n", $1) $2 * $3 > 9000 { printf("$%6d for %s\n", $2 * $3, $1) $1 == " " / / 5

7 2.7.1 &&! $2 >= 920 && $3 >= $2 >= 920 $3 >= !($2 < 920 && $3< 10) 2.8 BEGIN END BEGIN END BEGIN BEGIN { print " "; print " " { print 6

8 3 AWK print NF $3 >= 10 { byte = byte + 1 END { print byte 3.2 END { print " ", NR, " " { pay = pay + $2 * $3 END { print " ", NR, " " print " ", pay, " " print " ", pay / NR, " " 3.3 AWK AWK $2 > maxrate { maxrate = $2;maxemp = $1 END { print " ", maxemp, " ", maxrate, " " 7

9 3.4 { names = names $1 " " END { print names 3.5 { last = $0 END { print last 3.6 AWK ( ) length { print $1, length($1) { nc = nc + length($0) + 1 nw = nw + NF END { print NR, " ", nw, " ", nc, " " 8

10 4 AWK if-else C 4.1 if else 900 if $2 > 900 { n = n + 1; pay = pay + $2 * $3 END { if (n > 0) print n, "employees, total pay is", pay, "average pay is", pay/n else print "no employees are paid more then 900/hour" byte.data if else if print print 4.2 while while

11 # (while ) # # { i = $1 while (i <= $2 ) { sum = sum + i printf("\t%6d %6d %10d \n",$1,i,sum) i = i + $3 while # ( ) AWK gawk -f while.awk<return> <RETURN> 4.3 for for for # (for ) # # { for (i = $1; i <= $2; i = i + $3) { sum = sum + i printf("\t%6d %6d %10d \n",$1,i,sum) i = $1 i <= $2 i = i + $3 10

12 5 AWK AWK line line[1] 2 line[2] END while # reverse { line[nr] = $0 # END { i = NR # while (i > 0) { print line[i] i = i - 1 byte.data for # reverse { line[nr] = $0 # END { for (i = NR; i > 0; i = i -1 ) print line[i] 11

13 6 AWK ( ) 1. END print NR NR == print $NF 4. { field = $NF END { print field 5. 4 NF > $NF > 4 7. { nf = nf + NF END { print nf 8. Beth /Beth/ { nlined = nlines + 1 END { print nlines 9. 1 ($1 ) $1 > max { max = $1; maxline = $0 END { print max, maxline 12

14 10. NF > length($0) > { print NF, $0 13. print $2, $1 14. { temp = $1;$1 = $2;$2 = temp;print 15. $1 = NR;print 16. $2 = ; print 17. { for (i = NF; i > 0; i = i - 1) printf("%s ", \$i) printf("\n") 18. { sum = 0 for (i = 1; i <= NF; i = i + 1) sum = sum +\$i print sum 19. { for (i = 1; i <= NF; i = i + 1) sum = sum + \$i END { print sum 20. { for (i = 1; i <= NF; i = i + 1) if ($i < 0) $i = -$i print 13

15 AWK AWK AWK AWK BEGIN END AWK if else while for i

16 AWK

2.4.7 \ AWK AWK......

2.4.7 \ AWK AWK...... AWK ogurisu@lagendra.s.kanazawa-u.ac.jp 2001 1 8 ( ): 1 2002 10 10 ( ): 1.1 AWK C Java AWK perl, ruby web AWK A4 A4 1 ( :p) 2 1 AWK 2 2 AWK 4 2.1 AWK............................... 5 2.2 AWK NR NF.....................................

More information

C言語によるアルゴリズムとデータ構造

C言語によるアルゴリズムとデータ構造 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 information

18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf("hello World\n"); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o

18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf(hello World\n); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o 18 C ( ) 1 1 1.1 hello world.c 5 printf("hello World\n"); 6 } [ ] [ ] #include % cc hello_world.c %./a.out Hello World [a.out ] % cc hello_world.c -o hello_world [ ( ) ] (K&R 4.1.1) #include

More information

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B A/B (2018/10/19) Ver. 1.0 kurino@math.cst.nihon-u.ac.jp http://edu-gw2.math.cst.nihon-u.ac.jp/ kurino/2018/soft/soft.html 2018 10 19 A/B 1 2018 10 19 2 1 1 1.1 OHP.................................... 1

More information

離散数理工学 第 2回 数え上げの基礎:漸化式の立て方

離散数理工学 第 2回  数え上げの基礎:漸化式の立て方 2 okamotoy@uec.ac.jp 2015 10 20 2015 10 18 15:29 ( ) (2) 2015 10 20 1 / 45 ( ) 1 (10/6) ( ) (10/13) 2 (10/20) 3 ( ) (10/27) (11/3) 4 ( ) (11/10) 5 (11/17) 6 (11/24) 7 (12/1) 8 (12/8) ( ) (2) 2015 10 20

More information

Microsoft Word - C.....u.K...doc

Microsoft Word - C.....u.K...doc C uwêííôöðöõ Ð C ÔÖÐÖÕ ÐÊÉÌÊ C ÔÖÐÖÕÊ C ÔÖÐÖÕÊ Ç Ê Æ ~ if eíè ~ for ÒÑÒ ÌÆÊÉÉÊ ~ switch ÉeÍÈ ~ while ÒÑÒ ÊÍÍÔÖÐÖÕÊ ~ 1 C ÔÖÐÖÕ ÐÊÉÌÊ uê~ ÏÒÏÑ Ð ÓÏÖ CUI Ô ÑÊ ÏÒÏÑ ÔÖÐÖÕÎ d ÈÍÉÇÊ ÆÒ Ö ÒÐÑÒ ÊÔÎÏÖÎ d ÉÇÍÊ

More information

UnixText2.pptx

UnixText2.pptx Unix Unix! grep! sed! sort! cut! join! awk! (grep)! grep ' ' [...]! grep 'GO' 1433B_HUMAN.sprot!! 1433B_HUMAN.sprot GO grep '^FT' 1433B_HUMAN.sprot!! 1433B_HUMAN.sprot FT! grep -v! grep -i! grep -w!!!

More information

離散数理工学 第 2回 数え上げの基礎:漸化式の立て方

離散数理工学 第 2回  数え上げの基礎:漸化式の立て方 2 okamotoy@uec.ac.jp 2014 10 21 2014 10 29 10:48 ( ) (2) 2014 10 21 1 / 44 ( ) 1 (10/7) ( ) (10/14) 2 (10/21) 3 ( ) (10/28) 4 ( ) (11/4) 5 (11/11) 6 (11/18) 7 (11/25) ( ) (2) 2014 10 21 2 / 44 ( ) 8 (12/2)

More information

</ul> (XXX ) 15 ( )15 35 (XXX ) 15 ( ) [4] HTML HTML HTML HTML 1. <!--- CONTENTS_TITLE_TABLE ---> <b><font size=+1>xxx </font></b> <sm

</ul> (XXX ) 15 ( )15 35 (XXX ) 15 ( ) [4] HTML HTML HTML HTML 1. <!--- CONTENTS_TITLE_TABLE ---> <b><font size=+1>xxx </font></b> <sm 1. 1 2006 9 5 AWK HTML 2 1 [4] AWK Yahoo! : http://headlines.yahoo.co.jp/hl HTML HTML [4] HTML HTML ( ) HTML 3 2 Yahoo! Yahoo! ( ) (XXX ) - 15 ( )15 35

More information

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2 September 2016 1 Windows Cygwin Mac *1 Emacs Ruby 1 1.1 ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2 ~/16:00:20> ls 2 2 ls ls -a ~/16:00:20> ls -a

More information

( ) Shift JIS ( ) ASCII ASCII ( ) 8bit = 1 Byte JIS(Japan Industrial Standard) X 0201 (X ) 2 Byte JIS ISO-2022-JP, Shift JIS, EUC 1 Byte 2 By

( ) Shift JIS ( ) ASCII ASCII ( ) 8bit = 1 Byte JIS(Japan Industrial Standard) X 0201 (X ) 2 Byte JIS ISO-2022-JP, Shift JIS, EUC 1 Byte 2 By 23 3 ( ( (binary file) UNIX CUI 3.1 = + 2 bit ) ( 3.1) bit bit 1 Byte=8 bit 1 Byte ASCII, JIS X 0201 ASCII(American Standard Code for Information Interchange) 7bit (;) (:) ( ) (") ) 7bit ( ) 24 3 3.1 (

More information

解きながら学ぶC言語

解きながら学ぶC言語 printf 2-5 37 52 537 52 printf("%d\n", 5 + 37); 5370 source program source file.c ex00.c 0 comment %d d 0 decimal -2 -p.6 3-2 5 37 5 37-22 537 537-22 printf("537%d\n", 5-37); function function call ( )argument,

More information

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D II 8 2003 11 12 1 6 ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 Daisuke 8 =>. 73 Daisuke 35 Hiroshi 64 Ichiro 87 Junko

More information

ex14.dvi

ex14.dvi 1,, 0, b (b b 2 b ) n k n = n j b j, (0 n j b 1), n =(n k n k 1...n 1 n 0 ) b, n j j j +1, 0,...,b 1 (digit). b b, n b 1 ñ, ñ = k (b 1 n j )b j b N, n b n, n = b N n, n =ñ+1 b N, n m n + m (mod b N ),

More information

r2.dvi

r2.dvi 15 2 1 2015.6.2 ( ( ( Ruby ( ( https://www.ruby-lang.org/ja/documentation/ 2 Chris Pine,, 2,, 2010. Yugui, Ruby,, 2008. Ruby 1 ( Ruby ( 2 ( i i j ( ) /( (regular expression Ruby /.../ ( 1 if / / =~ =~

More information

: CR (0x0d) LF (0x0a) line separator CR Mac LF UNIX CR+LF MS-DOS WINDOWS Japan Advanced Institute of Science and Technology

: CR (0x0d) LF (0x0a) line separator CR Mac LF UNIX CR+LF MS-DOS WINDOWS Japan Advanced Institute of Science and Technology I117 8 1 School of Information Science, Japan Advanced Institute of Science and Technology : CR (0x0d) LF (0x0a) line separator CR Mac LF UNIX CR+LF MS-DOS WINDOWS Japan Advanced Institute of Science and

More information

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2  2 B R b I 4 003 4 30 1 ASCII ( ) 0 17 0 NUL 16 DLE SP 0 @ P 3 48 64 80 96 11 p 1 SOH 17 DC1! 1 A Q a 33 49 65 81 97 113 q STX 18 DC " B R b 34 50 66 8 98 114 r 3 ETX 19 DC3 # 3 C S c 35 51 67 83 99 115 s 4 EOT

More information

(2 Linux Mozilla [ ] [ ] [ ] [ ] URL 2 qkc, nkc ~/.cshrc (emacs 2 set path=($path /usr/meiji/pub/linux/bin tcsh b

(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 information

新・明解C言語 ポインタ完全攻略

新・明解C言語 ポインタ完全攻略 2 1-1 1-1 /* 1-1 */ 1 int n = 100; int *p = &n; printf(" n %d\n", n); /* n int */ printf("*&n %d\n", *&n); /* *&n int */ printf(" p %p\n", p); /* p int * */ printf("&*p %p\n", &*p); /* &*p int * */ printf("sizeof(n)

More information

( ) 1 Windows HTML ( ) ( ) ( ) WWW 10 ( )

( ) 1 Windows HTML ( ) ( ) ( ) WWW 10 ( ) ( ) 1 Windows HTML ( ) ( ) ( ) 1. 2. 3. 4. WWW 10 ( ) 2 1. 2. 1 3. ( ) 4. 5. 3 Windows 2 7 8 MS Word MS Excel 1. MS Word 600 2. MS Excel 1 34 2 83 3 23 4 70 5 100 6 45 7 58 8 29 9 68 10 72 11 37 12 12

More information

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 1. 1.1. 1.2. 1 PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU 2. 2.1. 2 1 2 C a b N: PC BC c 3C ac b 3 4 a F7 b Y c 6 5 a ctrl+f5) 4 2.2. main 2.3. main 2.4. 3 4 5 6 7 printf printf

More information

1 ( : 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

1 ( : 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 information

r08.dvi

r08.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

VISPO /表1-4

VISPO /表1-4 7 2005 1,132 5,249 362 13,666 311,809 1,359 3,723 1,669 538 3,737 17,418 39,036 75,694 5,281 1,169 161,502 7,463 11,408,436 500,000 13,263 192,052 41,391 49,706 136,232 61,102 12,402,182 11,573,898 273,042

More information

コンピュータ概論

コンピュータ概論 4.1 For Check Point 1. For 2. 4.1.1 For (For) For = To Step (Next) 4.1.1 Next 4.1.1 4.1.2 1 i 10 For Next Cells(i,1) Cells(1, 1) Cells(2, 1) Cells(10, 1) 4.1.2 50 1. 2 1 10 3. 0 360 10 sin() 4.1.2 For

More information

TC5.ids

TC5.ids % cp ~train00/.cshrc.iris ~ % cp ~train00/.alias.all ~ % exit UNIX の基本 シェルシステムとユーザの仲立ちをするプログラムであって ユーザが入力したコマンドを解釈して実行する Unix では文法によって sh 系と csh 系がある sh 系には sh, ash, zsh, bash などがある csh 系には csh, tcsh などがある

More information

C 2 / 21 1 y = x 1.1 lagrange.c 1 / Laglange / 2 #include <stdio.h> 3 #include <math.h> 4 int main() 5 { 6 float x[10], y[10]; 7 float xx, pn, p; 8 in

C 2 / 21 1 y = x 1.1 lagrange.c 1 / Laglange / 2 #include <stdio.h> 3 #include <math.h> 4 int main() 5 { 6 float x[10], y[10]; 7 float xx, pn, p; 8 in C 1 / 21 C 2005 A * 1 2 1.1......................................... 2 1.2 *.......................................... 3 2 4 2.1.............................................. 4 2.2..............................................

More information

P05.ppt

P05.ppt 2 1 list0415.c forfor #include int i, j; for (i = 1; i

More information

超初心者用

超初心者用 3 1999 10 13 1. 2. hello.c printf( Hello, world! n ); cc hello.c a.out./a.out Hello, world printf( Hello, world! n ); 2 Hello, world printf n printf 3. ( ) int num; num = 100; num 100 100 num int num num

More information

新・明解C言語で学ぶアルゴリズムとデータ構造

新・明解C言語で学ぶアルゴリズムとデータ構造 第 1 章 基本的 1 n 141 1-1 三値 最大値 algorithm List 1-1 a, b, c max /* */ #include int main(void) { int a, b, c; int max; /* */ List 1-1 printf("\n"); printf("a"); scanf("%d", &a); printf("b"); scanf("%d",

More information

10/ / /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

10/ / /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

:30 12:00 I. I VI II. III. IV. a d V. VI

:30 12:00 I. I VI II. III. IV. a d V. VI 2017 2017 08 03 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF X [ S ] a S S ; X X X, S [, a, ], ; BNF X (parse tree) (1) [a;a] (2) [[a]] (3) [a;[a]] (4) [[a];a] : [a] X 2 222222

More information

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C 1 6 9 1 main main 1 NULL NULL 1 15 23 25 48 26 30 32 36 38 43 45 47 50 52 for 2 (a) 2 2 1 Yacc 2 (b) 2 3 yytext tmp2 ("") tmp2->next->word tmp2 yytext tmp2->next->word

More information

Microsoft Word - no14.docx

Microsoft Word - no14.docx ex26.c #define MAX 20 int max(int n, int x[]); int num[max]; int i, x; printf(" "); scanf("%d", &x); if(x > MAX) printf("%d %d \n", MAX, MAX); x = MAX; for(i = 0; i < x; i++) printf("%3d : ", i + 1); scanf("%d",

More information

Taro-cshプログラミングの応用.jt

Taro-cshプログラミングの応用.jt c s h プログラミングの応用 0. 目次 1. 課題 課題 1 : 与えられたパス名からディレクトリ名とファイル名を分離し出力せよ 課題 2 : オプション (-in) の後に続く文字列とオプション (-out) の後に続く文字列をそれぞれまとめる オプションの指定がなく文字列から始まるとき -in を仮定する 課題 3 : 複数のファイルから与えられたパターンとマッチする文字列を含む行を取り出せ

More information

新版明解C言語入門編

新版明解C言語入門編 175cm 60kg ( ) 175cm 175.3cm 175.869758 cm 175cm 60kg p.177 18-1 vx - vy vx vy List -1 List -1 int vx, vy; puts(""); printf(" vx "); scanf("%d", &vx); printf(" vy "); scanf("%d", &vy); printf("vx + vy

More information

Taro-リストⅠ(公開版).jtd

Taro-リストⅠ(公開版).jtd 0. 目次 1. 再帰的なデータ構造によるリストの表現 1. 1 リストの作成と表示 1. 1. 1 リストの先頭に追加する方法 1. 1. 2 リストの末尾に追加する方法 1. 1. 3 昇順を保存してリストに追加する方法 1. 2 問題 問題 1 問題 2-1 - 1. 再帰的なデータ構造によるリストの表現 リストは データの一部に次のデータの記憶場所を示す情報 ( ポインタという ) を持つ構造をいう

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション プログラミング応用演習 第 4 回再帰的構造体 前回の出席確認演習 #include int main() { FILE *fp; int c, linecount, length, maxlength; fp=fopen("/usr/share/dict/words","r"); if (fp == NULL) return 1; linecount=0; length=0;

More information

初歩のC言語ターミナル_2014_May.pages

初歩のC言語ターミナル_2014_May.pages C Mac OS X ( Vi Mi) Xcode CD >cd C:\Users\\Desktop gcc first.c C:\Users\\Desktop>gcc -o first first.c gcc first.c C:\Users\\Desktop>first Windows OS VisualStudio VisualStudio VS2012 CD C:\ >cd C:\Users\

More information

ohp08.dvi

ohp08.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 information

joho12.ppt

joho12.ppt n φ 1 (x),φ 2 (x),,φ n (x) (x i, f i ) Q n c 1,,c n (,f k ) q n = c i φ i (x) x Q n i=1 c 1 = 0 c 1 n ( c 1 ) = q n f k 2 Q n ( c 1 ) = q 2 2 n ( ) 2 f k q n ( ) + f k Q n c 1 = c 1 q n 2 q n( ) q n q

More information

シェルスクリプトマガジン vol.30

シェルスクリプトマガジン vol.30 ユニケージ開発手法 コードレビュー USP 研究所技術研究員 written by 大内智明 Vol.19 更新したファイルを相手サーバに配信する方法について説明します 今回は前回に引き続いて 店舗や商品といったマスタ 関連のファイルが どのように管理されて 各業務サー マスタ関連のファイルは 一般的に種類も多く サイズも大小様々なものがあります そこで 毎回全マスタの配信を行わないようにするために

More information

Ruby 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 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 information

Unix * 3 PC 2 Linux, Mac *4 Windows Cygwin Cygwin gnuplot Cygwin unix emulator online gnuplot *5 matplotlib *6 SuperMongo *7 gnuplot gnuplot OS *8 Uni

Unix * 3 PC 2 Linux, Mac *4 Windows Cygwin Cygwin gnuplot Cygwin unix emulator online gnuplot *5 matplotlib *6 SuperMongo *7 gnuplot gnuplot OS *8 Uni 2015 8 1 ( ) Unix 1 *1 Unix Unix Unix Perl, Python *2 Unix 2 PC gnuplot *1 100 10 10 6 10 = 10 7 1 1/3 3 10 7 10 7.5 1 24 3600 = (30 6)(30 + 6) 100 = 86400 1 10 7.5 *2 Perl, Python Python 1 Unix * 3 PC

More information

I J

I J I 065763J 8 7 7 31 jikken/ +----- accumulation_demupa.c +----- accumulation_rain.c +----- frequency_demupa.c +----- frequency_rain.c +----- go.sh +----- graph_maker.sh +----- mesure-ryudai/ 2007/4/1 2007/6/30

More information

Automatic Processing System on Internet Text Messages Hiroyuki EDO abd Yoshiyuki SAKAMOTO 1 Return-Path: Return- Path: RFC822: Standard f

Automatic Processing System on Internet Text Messages Hiroyuki EDO abd Yoshiyuki SAKAMOTO 1 Return-Path: Return- Path: RFC822: Standard f 163 177 2000 Automatic Processing System on Internet Text Messages Hiroyuki EDO abd Yoshiyuki SAKAMOTO 1 Return-Path: Return- Path: RFC822: Standard for ARPA Internet Text Messages 163 2000 RFC822:ARPA

More information

Excel97関数編

Excel97関数編 Excel97 SUM Microsoft Excel 97... 1... 1... 1... 2... 3... 3... 4... 5... 6... 6... 7 SUM... 8... 11 Microsoft Excel 97 AVERAGE MIN MAX SUM IF 2 RANK TODAY ROUND COUNT INT VLOOKUP 1/15 Excel A B C A B

More information

‚æ4›ñ

‚æ4›ñ ( ) ( ) ( ) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 (OUS) 9 26 1 / 28 ( ) ( ) ( ) A B C D Z a b c d z 0 1 2 9 (OUS) 9

More information

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè11²ó

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè11²ó 11 2013 6 19 11 (6/19) 6 (18:10-19:40) λ13 UNIX : 2 / 26 UNIX UNIX sort, head, tail, cat, cut diff, tee, grep, uniq, wc join, find, sed, awk, screen 3 / 26 sort sort : $ sort [options] [FILE...] options

More information

K-BASIC 1st: ユニケージ基礎編(前編)

K-BASIC 1st: ユニケージ基礎編(前編) 5 2 AWK AWK AWK 2.1 AWK AWK UNIX OS 1977 UNIX Alfred Aho Peter Weinberger Brian Kernighan 3 AWK AWK /etc/resolv.conf DNS IP 1 [hoge@lecture ~]$ cat /etc/resolv.conf awk {print $2} 2 ---------- 3 4 8.8.8.8

More information

BW BW

BW BW Induced Sorting BW 11T2042B 2015 3 23 1 1 1.1................................ 1 1.2................................... 1 2 BW 1 2.1..................................... 2 2.2 BW.................................

More information

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó 2 2015 4 20 1 (4/13) : ruby 2 / 49 2 ( ) : gnuplot 3 / 49 1 1 2014 6 IIJ / 4 / 49 1 ( ) / 5 / 49 ( ) 6 / 49 (summary statistics) : (mean) (median) (mode) : (range) (variance) (standard deviation) 7 / 49

More information

2 Excel =sum( ) =average( ) B15:D20 : $E$26 E26 $ =A26*$E$26 $ $E26 E$26 E$26 $G34 $ E26 F4

2 Excel =sum( ) =average( ) B15:D20 : $E$26 E26 $ =A26*$E$26 $ $E26 E$26 E$26 $G34 $ E26 F4 1234567 0.1234567 = 2 3 =2+3 =2-3 =2*3 =2/3 =2^3 1:^, 2:*/, 3:+- () =2+3*4 =(2+3)*4 =3*2^2 =(3*2)^2 =(3+6)^0.5 A12 =A12+B12 ( ) ( )0.4 ( 100)0.9 % 1 2 Excel =sum( ) =average( ) B15:D20 : $E$26 E26 $ =A26*$E$26

More information

P02.ppt

P02.ppt int If 2 1 ,,, 3 a + b ab a - b ab a * b ab a / b ab a % b ab a + b 4 2 list0201.c /, % /*/ int vx, vy; puts(""); printf("vx"); scanf("%d", &vx); printf("vy"); scanf("%d", &vy); printf("vx + vy = %d\n",

More information

Networking Semester 802.3

Networking Semester 802.3 Networking Semester 802.3 2 ) ( Computer Hardware () () () () () () () () ()- () () () () () BIOS () Computer Software Operating Systems Windows, Linux Linux Windows OS I 1.C 2. 3. 3-1.main 3-2.printf

More information

DA100データアクイジションユニット通信インタフェースユーザーズマニュアル

DA100データアクイジションユニット通信インタフェースユーザーズマニュアル Instruction Manual Disk No. RE01 6th Edition: November 1999 (YK) All Rights Reserved, Copyright 1996 Yokogawa Electric Corporation 801234567 9 ABCDEF 1 2 3 4 1 2 3 4 1 2 3 4 1 2

More information

r07.dvi

r07.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 information

17. (1) 18. (1) 19. (1) 20. (1) 21. (1) (3) 22. (1) (3) 23. (1) (3) (1) (3) 25. (1) (3) 26. (1) 27. (1) (3) 28. (1) 29. (1) 2

17. (1) 18. (1) 19. (1) 20. (1) 21. (1) (3) 22. (1) (3) 23. (1) (3) (1) (3) 25. (1) (3) 26. (1) 27. (1) (3) 28. (1) 29. (1) 2 1. (1) 2. 2 (1) 4. (1) 5. (1) 6. (1) 7. (1) 8. (1) 9. (1) 10. (1) 11. (1) 12. (1) 13. (1) 14. (1) 15. (1) (3) 16. (1) 1 17. (1) 18. (1) 19. (1) 20. (1) 21. (1) (3) 22. (1) (3) 23. (1) (3) 24. 1 (1) (3)

More information

ohp07.dvi

ohp07.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 information

pptx

pptx 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 information

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

¥×¥í¥°¥é¥ß¥ó¥°±é½¬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 information

I 2 tutimura/ I 2 p.1/??

I 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 information

(1/2) 2/45 HPC top runner application programmer PC-9801F N88-BASIC Quick BASIC + DOS ( ) BCB Windows Percolation, Event-driven MD ActionScript Flash

(1/2) 2/45 HPC top runner application programmer PC-9801F N88-BASIC Quick BASIC + DOS ( ) BCB Windows Percolation, Event-driven MD ActionScript Flash 1/45 8 Outline 1. 2. 3. 4. Jun. 6, 2013@ A (1/2) 2/45 HPC top runner application programmer PC-9801F N88-BASIC Quick BASIC + DOS ( ) BCB Windows Percolation, Event-driven MD ActionScript Flash MPI MD (2/2)

More information

情報科学概論 第1回資料

情報科学概論 第1回資料 1. Excel (C) Hiroshi Pen Fujimori 1 2. (Excel) 2.1 Excel : 2.2Excel Excel (C) Hiroshi Pen Fujimori 2 256 (IV) :C (C 65536 B4 :2 (2 A3 Excel (C) Hiroshi Pen Fujimori 3 Tips: (1) B3 (2) (*1) (3) (4)Word

More information

GNU Emacs GNU Emacs

GNU Emacs GNU Emacs GNU Emacs 2015 10 2 1 GNU Emacs 1 1.1....................................... 1 1.2....................................... 1 1.2.1..................................... 1 1.2.2.....................................

More information

1 SHIMURA Masato polynomial irr.xirr EXCEL irr

1 SHIMURA Masato polynomial irr.xirr EXCEL irr 1 SHIMURA Masato 2009 12 8 1 2 1.1................................... 2 1.2 polynomial......................... 4 2 irr.xirr EXCEL 5 2.1 irr............................................. 5 2.2 d f, pv...........................................

More information

chapter11.PDF

chapter11.PDF 11. 11.1. 11.1.1. 98 7 15 12 20 158 7/15 12/20 99 11 10 2000 3 31 11/10 3/31 2000 1 141 + 1 = 142 142 2000 3 27 99 12 10 451 344 = 107 2000 1 107 + 1 = 108 108 2000 6 27 98 12 20 98/12/20 99/12/20 2000/6/27

More information

main

main 14 1. 12 5 main 1.23 3 1.230000 3 1.860867 1 2. 1988 1925 1911 1867 void JPcalendar(int x) 1987 1 64 1 1 1 while(1) Ctrl C void JPcalendar(int x){ if (x > 1988) printf(" %d %d \n", x, x-1988); else if(x

More information

2 1. Ubuntu 1.1 OS OS OS ( OS ) OS ( OS ) VMware Player VMware Player jp/download/player/ URL VMware Plaeyr VMware

2 1. Ubuntu 1.1 OS OS OS ( OS ) OS ( OS ) VMware Player VMware Player   jp/download/player/ URL VMware Plaeyr VMware 1 2010 k-okada@jsk.t.u-tokyo.ac.jp http://www.jsk.t.u-tokyo.ac.jp/~k-okada/lecture/ 2010 4 5 Linux 1 Ubuntu Ubuntu Linux 1 Ubuntu Ubuntu 3 1. 1 Ubuntu 2. OS Ubuntu OS 3. OS Ubuntu https://wiki.ubuntulinux.jp/ubuntutips/install/installdualboot

More information

2001 ElispExpectPerlPythonTcl videlphiemacsbrief Visual C++Nisus Writer Jeffrey E.F. Friedl PerlPython this. this _ [...] [...] [ ] 210

2001 ElispExpectPerlPythonTcl videlphiemacsbrief Visual C++Nisus Writer Jeffrey E.F. Friedl PerlPython this. this _ [...] [...] [ ] 210 209228 2001 How to Master Regular Expression SAKAMOTO Yoshiyuki and EDO Hiroyuki Awk 209 2001 ElispExpectPerlPythonTcl videlphiemacsbrief Visual C++Nisus Writer Jeffrey E.F. Friedl PerlPython this. this

More information

新・明解Java入門

新・明解Java入門 第 1 章 画面 文字 表示 Java Java Java Java Java JRE Java JDK 21 1-1 Java Java Java Java 誕生 Fig.1-1 Oak Java Sun Microsystems 2010 Oracle Java Oracle 4 Java http://www.java.com/ http://www.alice.org/ Fig.1-1Java

More information

05 I I / 56

05 I I / 56 05 I 2015 2015.05.14 I 05 2015.05.14 1 / 56 I 05 2015.05.14 2 / 56 cd mkdir vis01 OK cd vis01 cp /tmp/150514/leibniz.*. I 05 2015.05.14 3 / 56 I 05 2015.05.14 4 / 56 Information visualization Data visualization,

More information

:30 12:00 I. I VI II. III. IV. a d V. VI

:30 12:00 I. I VI II. III. IV. a d V. VI 2018 2018 08 02 10:30 12:00 I. I VI II. III. IV. a d V. VI. 80 100 60 1 I. Backus-Naur BNF N N y N x N xy yx : yxxyxy N N x, y N (parse tree) (1) yxyyx (2) xyxyxy (3) yxxyxyy (4) yxxxyxxy N y N x N yx

More information

lexex.dvi

lexex.dvi (2018, c ) http://istksckwanseiacjp/ ishiura/cpl/ 4 41 1 mini-c lexc,, 2 testlexc, lexc mini-c 1 ( ) mini-c ( ) (int, char, if, else, while, return 6 ) ( ) (+, -, *, /, %, &, =, ==,!=, >, >=,

More information

Microsoft Word - Cプログラミング演習(12)

Microsoft Word - Cプログラミング演習(12) 第 12 回 (7/9) 4. いくつかのトピック (5)main 関数の引数を利用したファイル処理 main 関数は, 起動する環境から引数を受け取ることができる 例えば 次に示すように,main 関数に引数を用いたプログラムを作成する 01 /* sample */ 02 /* main 関数の引数 */ 03 #include 04 05 main(int argc, char

More information

haskell.gby

haskell.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 information

Prog1_15th

Prog1_15th 2012 年 7 月 26 日 ( 木 ) 実施構造体と typedef typedef 宣言によって,struct 構造体タグ名という表記を再定義し, データ型名のように扱うことができる 構文は typedef struct 構造体タグ名 再定義名 ; となり, この場合の構造体変数の宣言は, 再定義名を用いて行うことができる なお, ここでは 構造体タグ名は省略可能である 構造体を指すポインタ

More information

XMPによる並列化実装2

XMPによる並列化実装2 2 3 C Fortran Exercise 1 Exercise 2 Serial init.c init.f90 XMP xmp_init.c xmp_init.f90 Serial laplace.c laplace.f90 XMP xmp_laplace.c xmp_laplace.f90 #include int a[10]; program init integer

More information

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç C (3) if else switch AND && OR (NOT)! 1 BMI BMI BMI = 10 4 [kg]) ( [cm]) 2 bmi1.c Input your height[cm]: 173.2 Enter Input your weight[kg]: 60.3 Enter Your BMI is 20.1. 10 4 = 10000.0 1 BMI BMI BMI = 10

More information

parser.y 3. node.rb 4. CD-ROM

parser.y 3. node.rb 4. CD-ROM 1. 1 51 2. parser.y 3. node.rb 4. CD-ROM 1 10 2 i 0 i 10 " i i+1 3 for(i = 0; i

More information

TEX American Mathematical Society PostScript Adobe Systems Incorporated

TEX American Mathematical Society PostScript Adobe Systems Incorporated P A D manual ( pad2ps 3.1j ) (seiichi@muraoka.info.waseda.ac.jp) 1996 11 2 TEX American Mathematical Society PostScript Adobe Systems Incorporated pad2ps PAD PAD (Problem Analysis Diagram) C 1 2 PAD PAD

More information

標準型四方陣と「オイラー方陣」

標準型四方陣と「オイラー方陣」 : II -2 [ ] T1/ T2/ T3/ T4/ 0 3 2 1 0 3 2 1 1 3 1 3 1 3 1 3 0 3 2 1 0 3 2 1 1 3 1 3 1 3 1 3.-------..-------..-------..-------. 2 1 0 3 2 1 0 3 0 2 0 2 0 2 0 2 2 1 0 3 2 1 0 3 0 2 0 2 0 2 0 2 -+-+-+- -+-+-+-

More information

橡挿入法の実践

橡挿入法の実践 PAGE:1 7JFC1121 PAGE:2 7JFC1121 PAGE:3 7JFC1121 Kadai_1.pas program input_file;{7jfc1121 19 20 { type item = record id : integer; math : integer; english : integer; var wfile data flag id_no filename :

More information

I httpd School of Information Science, Japan Advanced Institute of Science and Technology

I httpd School of Information Science, Japan Advanced Institute of Science and Technology I117 17 4 httpd School of Information Science, Japan Advanced Institute of Science and Technology httpd HTTP httpd log file access log access.log CERN httpd common format lighttpd common format 2 1000

More information

[1] #include<stdio.h> main() { printf("hello, world."); return 0; } (G1) int long int float ± ±

[1] #include<stdio.h> main() { printf(hello, world.); return 0; } (G1) int long int float ± ± [1] #include printf("hello, world."); (G1) int -32768 32767 long int -2147483648 2147483647 float ±3.4 10 38 ±3.4 10 38 double ±1.7 10 308 ±1.7 10 308 char [2] #include int a, b, c, d,

More information

untitled

untitled 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

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa I 2017 11 1 SageMath SageMath( Sage ) Sage Python Sage Python Sage Maxima Maxima Sage Sage Sage Linux, Mac, Windows *1 2 Sage Sage 4 1. ( sage CUI) 2. Sage ( sage.sage ) 3. Sage ( notebook() ) 4. Sage

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション プログラミング初級 第 7 回 2017 年 5 月 29 日 配列 ( 復習 )~ 文字列 1 配列とは 2 配列 : 複数の変数をグループとしてまとめて扱うもの 配列 変数 int data[10]; 整数型の配列 同種のデータ型を連続して確保したものを配列とよぶ = 整数がそれぞれにひとつずつ入る箱を 10 個用意したようなもの int data; 整数型の変数 = 整数がひとつ入る dataという名前の箱を用意したようなもの

More information

Microsoft Word - no15.docx

Microsoft Word - no15.docx ex33.c /* */ #define IDLENGTH 7 /* */ #define MAX 100 /* */ /* */ struct student char idnumber[idlength + 1]; /* */ int math; /* () */ int english; /* () */ int japanese; /* () */ double average; /* */

More information