2003 LMNtal : : : 1G00P102-2

Size: px
Start display at page:

Download "2003 LMNtal : : : 1G00P102-2"

Transcription

1 2003 LMNtal : : : 1G00P102-2

2 LMNtal LMNtal (1) (2) (3) (OS) LMNtal LMNtal LMNtal

3 i LMNtal LMNtal LMNtal Atom LMNtal Java

4 ii INLINE Inline module I/O I/O map map semaphore semaphore amidakuji.lmn

5 iii Appendix.A 45 A.1 Inline.java A.2 Module.java A.3.java Appendix.B 54 B.1 I/O (io.lmn)

6 iv Append :

7 v 2.1 LMNtal INLINE LOADMODULE

8 LMNtal LMNtal[1], [2] LMNtal Atom LMNtal LMNtal LMNtal CHR gamma LMNtal LMNtal LMNtal 1.2 LMNtal LMNtal

9 LMNtal LMNtal LMNtal 3 4 5

10 Appendix Module Inlin 7

11 4 2 LMNtal LMNtal(Linked Multisets of Nodes transformation language) LMNtal [1][2] TODO cite 2.1 Atom Atom LMNtal Atom 0 Atom 1 1 X a Atom a(x) Atom a(x,y) a(y,x) Atom h(neck). a(neck, Hand1, Body, Hand2). h(hand1). h(hand2). b(body, Foot1, Foot2). f(foot1). f(foot2). h h Hand2 h Neck a Body Hand1 b Foot1 Foot2 f f 2.1: LMNtal 2.4 Atom Atom Atom KL1 CHR

12 X start1 start2 start3 start1 start2 start3 start1 start2 start3 you c c c c c c you c c c c c c c c c c c c you goal1 goal2 goal3 goal1 goal2 goal3 goal1 goal2 goal3 << Rule >> you c c :- c c you 2.2: Append : you LMNtal 2.2

13 start1(you). start2(r20). start3(r30). you(you, R10). c(r10, C1, R11). c(r11, C3, R12). c(r20, C1, R21). c(r21, C2, R22). c(r22, C3, R23). c(r30, C2, R31). goal1(r12). goal2(r23). goal3(r31). you(t1,m1), c(m1,c,d1), c(t2,c,d2) :- c(t1,c,d1), c(t2,c,m2), you(m2,d2) Atom c c you you c 2 a(x), b(x) a(y), b(y) 2.3 Atom { compound Cell 1 Python 2 LMNtal you

14 2.4. LMNtal 7 { { {a(x), b(x,y), ({a(x) :- {d(x)), c(y) a b c : Cell : Atom a :- d : Rule 2.3: (stable) Atom a b c a,b,c LMNtal 2.4 LMNtal LMNtal P P ::= 0 (null) p( X) (atom) P,P (composition) {P (cell) {P/ (stable cell) (T :- T) (reaction rule) T T ::= 0 (null) p( X) (atom) T,T (composition) {T (cell) {T/ (stable cell) T:-T (rule variable) $p[ X A] (process variable) p(* X) (aggregate) A ::= [ ] (null) *X (bundle) 2.1: LMNtal X X X

15 X p p Atom Atom p P P P P P {P P P 2.4: Atom Node1 : { kake. ue. { { kashi. { kake. $p. $p ue. { { kashi. kake Node1 { ue { ue Node1 ue

16 $p[x 1,...X m A] [X 1,...X m A] $p $p Atom 3 $p[x 1,...X m A] X 1,...X m $p X 1,...X m m A X 1,...X m [ ] 0 *X 0 A [ ] $p[x,y] $p X,Y $p[x *Y] $p X $p[ [ ] ] $p $p[ ] $p[ *X] $p $p 2.2: {a(x), {b(x) {$p(x),{b(x) $p b(x) X a(x) X $p

17 { { lawless_area :- { { order lawless area number(n) :- 7 < N greater_than_seven(n). { number(n) :- greater_than_seven(n) n(n Z n > 7) number( 8) :- greater_than_seven( 8). number( 9) :- greater_than_seven( 9). 4 lawless area :) 5 6

18 number(10) :- greater_than_seven(10). number(11) :- greater_than_seven(11). number(12) :- greater_than_seven(12). : : number(5). number(19). number(5). greater_than_seven(19). 2.8 LMNtal Java LMNtal LMNtal LMNtal

19 12 3 LMNtal OS LMNtal LMNtal OS LMNtal LMNtal LMNtal

20 LMNtal LMNtal Java Java Java Java LMNtal

21 LMNtal LMNtal LMNtal LMNtal /*inline*/ System.out.println("test") print_test 3.1:

22 /*inline*/ (NEWATOM, LINK ) Java runtime.atom me 2 /*inline_define*/ Java Java Java

23 /*inline*/ String s=do_input(); me.nthatom(0).changename(s); me.changename("done"); null (You inputted "ABC") done ABC 3.2: MyInlineCode.java runtime.inlinecode run(atom a, int codeid) interface runtime.inlinecode package runtime; public interface InlineCode { public void run(atom a, int codeid); codeid MyInlineCode.java

24 import runtime.*; /*** ***/ public class MyInlineCode implements InlineCode { public void run(atom me, int codeid) { switch(codeid) { case 0: { /*** ID = 0 ***/ break; case 1: { /*** ID = 1 ***/ break; : : case N: { /*** ID = N ***/ break; INLINE

25 INLINE ID 3.1: INLINE LMNtal ( a :- [[/*inline*/system.out.println(123);]] ), a spec [2, 0] findatom [1, 0, a_0] react [( a :- /*inline*/... ), [0], [1]] spec [2, 3] dequeueatom [1] removeatom [1, 0, a_0] newatom [2, 0, /*inline*/...] enqueueatom [2] inline [2, 0] freeatom [1] proceed [] import runtime.*; public class MyInlineCode implements InlineCode { public void run(atom me, int codeid) { switch(codeid) { case 0: { /*inline*/system.out.println(123); break;

26 19 4 LMNtal LMNtal

27 Java static LMNtal LMNtal

28 LMNtal { C Java 2 1 name/1 1 name/1 name/1 1 name/1 1 % io { name(io), ( fprint(stream, String) :-??? ) 2 ::= [ : ] {

29 % io io : { ( fprint(stream, String) :-??? ) 1 2 foo 2 % foo : { some_atom, foo : { another_atom java

30 << Module m >> m.a m.a :- m.b (rule N) (Copy m s rule to user membrane) << Module m >> m.a :- m.b (rule N) m.a m.a :- m.b (rule N) (Apply m.a :- m.b) << Module m >> m.a :- m.b (rule N) m.b m.a :- m.b (rule N) 4.1:

31 LOADMODULE LOADMODULE 4.1: LOADMODULE

32 :- unary($m) mv 1 {mv($m1),$p,@q,{name($m2),$r,@s :- $m1=$m2 {name($m2),$p,@q,$r,@s. 1 mv LMNtal 1 name(module_name) name {find_and_link($m1,x),ready($m2), :- $m1=$m2 {msg(x,$m2), mv call($m,$method,x) :- unary($m),unary($method) {mv($m).find_and_link($method,x).. 4 module : { name(module). static.load. module.static_method(ready). module.static_method(msg(x)) :- some process..., module.static_method(ready). call(module, module.static_method, result)

33 call(m, m.incr, X) m io.print(x) {{{ io.print(call(m, m.incr)). m:{ name(m). id(0). m.incr(ready). m.incr(msg(x)), id($o) :- int($o),$n=$o+1 cp($n, C1, C2), id(c1), X=C2, m.incr(ready).. {{{ io.print(x). {mv(m). find_and_link(m.incr,x).. m:{... 1 {{{ io.print(x). {mv(m). find_and_link(m.incr,x).. m:{... 1 {{{ io.print(x). {mv(m). find_and_link(m.incr,x).. m:{... 1 {{{ io.print(x).. {mv(m). find_and_link(m.incr,x).. m:{...

34 << Module m >> m.incr ready id 0 io.print call m.incr,..., :- cp($n,... m m.incr Generate agent << Module m >> id 0 io.print m.incr ready m.incr,..., :- cp($n,... find_and_link m.incr mv m Agnet go up << Module m >> id 0 io.print m.incr ready m.incr,..., :- cp($n,... find_and_link m.incr mv m 4.2:

35 Agnet go up << Module m >> id 0 io.print m.incr ready find_and_link m.incr,..., :- cp($n,... m.incr mv m Agnet go up << Module m >> id 0 io.print m.incr ready find_and_link m.incr,..., :- cp($n,... m.incr mv m Agnet go down << Module m >> find_and_link m.incr m.incr ready id 0 io.print m.incr,..., :- cp($n, :

36 Find and link << Module m >> msg m.incr id 0 io.print m.incr,..., :- cp($n,... Apply m s rule << Module m >> 1 cp m.incr ready id io.print m.incr,..., :- cp($n,... Finish << Module m >> 1 m.incr 1 id io.print ready m.incr,..., :- cp($n, :

37 {{{ io.print(x).. m:{ name(m). find_and_link(m.incr, X). id(0). m.incr(ready). m.incr(msg(x)), id($o) :- int($o),$n=$o+1 cp($n, C1, C2), id(c1), X=C2, m.incr(ready).. find_and_link {{{ io.print(x).. m:{ name(m). id(0). m.incr(msg(x)). m.incr(msg(x)), id($o) :- int($o),$n=$o+1 cp($n, C1, C2), id(c1), X=C2, m.incr(ready).. {{{ io.print(x).. m:{ name(m). cp(1, C1, C2). id(c1). X=C2. m.incr(ready). m.incr(msg(x)), id($o) :- int($o),$n=$o+1 cp($n, C1, C2), id(c1), X=C2, m.incr(ready).. {{{ io.print(x).. m:{ name(m). id(1). 1(X). m.incr(ready). m.incr(msg(x)), id($o) :- int($o),$n=$o+1 cp($n, C1, C2), id(c1), X=C2, m.incr(ready).. io.print 1 id(0) id(1) call(m, m.incr, X) 2(X), id(2)

38 system_ruleset

39 Inline public static InlineCode inlinecode Process cp public static Map code static List defs Map List static int codecount public static void initinline() MyInline.class public static int getcodeid(string codestr) ID

40 5.1. Inline 33 public static void add(string funcname) public static void makecode() MyInline.java public static void callinline(atom atom, int codeid) ID Inline.add /*inline*/ Map code ID /*inline_define*/ List defs runtime.inline.makecode() Java compile.rulecompiler.addinline INLINE

41 5.2. module 34 compile.rulecompiler.addinline /** */ private void addinline() { Iterator it = rhsatoms.iterator(); while(it.hasnext()) { Atom atom = (Atom)it.next(); int atomid = rhsatomtopath(atom); int codeid = Inline.getCodeID(atom.functor.getName()); if(codeid == -1) continue; body.add( new Instruction (Instruction.INLINE, atomid, codeid)); INLINE MyInlineCode.run INLINE case Instruction.INLINE : //[atom, inlineref] Inline.callInline ( atoms[inst.getintarg1()], inst.getintarg2() ); break; 5.2 module public static String libpath "../lmntal_lib/" public static Map memnametable

42 5.2. module public static void regmemname(string name, Membrane m) public static void loadmodule(membrane m, String modname) public static void resolvemodules(membrane m) C Linker static void getneedmodules(membrane m, List need) need regmemname Module.resolveModules LMNtal

43 5.2. module 36 LOADMODULE LOADMODULE case Instruction.LOADMODULE: //[dstmem, module_name] // compile.structure.membrane m = (compile.structure.membrane) compile.module.memnametable.get(inst.getarg2()); if(m==null) { Env.e("Undefined module "+inst.getarg2()); else { Iterator i = m.rulesets.iterator(); while (i.hasnext()) { mems[inst.getintarg1()].loadruleset ((Ruleset)i.next() ); break;

44 I/O I/O io:{ io.print(string) :- unary(string) [[/*inline*/ System.out.println(me.nth(0)); ]](String). io.input(message) :- [[/*inline*/ String s = javax.swing.joptionpane.showinputdialog(null, me.nth(0)); me.changename(s); me.nthatom(0).changename("done"); ]](Message). io.input(message, X) :- [[/*inline*/ String s = javax.swing.joptionpane.showinputdialog(null, me.nth(0)); me.changename("done"); me.nthatom(0).changename(s); ]](Message, X). io.input :- [[/*inline*/ String s = javax.swing.joptionpane.showinputdialog(null, "Input text."); me.changename(s); ]]. Java io.print io.input 1 done

45 map 38 2 done LMNtal map map // unary map map : { map.new($self) :- unary($self) {name($self). // override exist key map.put($self, $k, $v), {name($name), assoc($ok, $ov), $p :- unary($k),unary($v),$name=$self,$ok=$k,unary($ov) {name($name), assoc($k, $v), $p. // add new key map.put($self, $k, $v), {name($name), $p :- unary($k),unary($v),$name=$self {name($name), assoc($k, $v), $p. map.get($self, $k, V), {name($name), assoc($mk, $mv), $p :- unary($k),$name=$self,$k=$mk,unary($mv) V=$mv, {name($name), assoc($mk, $mv), $p.. key value (map.put) key value (map.get) map.new map map.get map.put map map.get 1

46 semaphore 39 LMNtal (bless ) 1 Perl5 OOP Perl5 OOP Java C++ OOP semaphore semaphore // Semaphore sem : { name(sem). static.load. // public static method interface defs. sem.new(ready). sem.up(ready). sem.new(msg($self)) :- unary($self) {sem($self), state(notbusy), sem.new(ready). // up -> state(busy) if state(notbusy) sem.up(msg($self)), {sem($name), state(notbusy) :- $self==$name {sem($name), state(busy), allowed($self), sem.up(ready). // down -> state(notbusy) sem.down(msg($self)), {sem($name), state(busy) :- $self==$name {sem($name), state(notbusy), sem.down(ready)..

47 amidakuji.lmn - /* SYNOPSIS amidakuji.start_at(start2). ==> amidakuji.done(goal??). */ amidakuji : { amidakuji.start_at($y),c($s,c,d) :- $s=$y you($s,u),c(u,c,d). you(t1,m1), c(m1,c,d1), c(t2,c,d2) :- c(t1,c,d1), c(t2,c,m2), you(m2,d2).. c(u,c,m), you(m,$goal) :- unary($goal) c(u,c,$goal), amidakuji.done($goal). 2.2 amidakuji.start_at( ) you you you amidakuji.done( ) // Amida data start1(r10). start2(r20). start3(r30). c(r10, C1, R11). c(r20, C1, R21). c(r21, C2, R22). c(r30, C2, R31). c(r11, C3, R12). c(r22, C3, R23). goal1(r12). goal2(r23). goal3(r31).

48 // Main program io.input([[this is amidakuji. Where to start today? Input start1, start2 or start3.]], input_str). input_str(done(you)) :- amidakuji.start_at(you). amidakuji.done($goal) :- unary($goal) io.print([[you got to ]]), io.print($goal). start1 3 amidakuji.start_at you module : {... { name(module) system_ruleset name(module) module:{ property:{ atom.... module.property.atom

49 Objective Caml LMNtal 6.5.4

50 43 6.1:

51 44 [1], : Programming with Logical Links, 19, [2] Kazunori Ueda and Norio Kato : Programming with Logical Links, Design of the LMNtal language, In Proc. 3rd Asian Workshop on Programming Languages and Systems (APLAS 2002), pp , [3] : Inside KLIC Version 1.0, KLIC Task Group/AITEC/JIPDEC, [4] : DKLIC,,, 2002.

52 45 Appendix.A A.1 Inline.java package runtime; import java.io.*; import java.util.*; /** * <BR> * * <UL> * <LI>"/ inline /" * * <LI>"/ inline_define /" * * <LI> * * <LI> * * * <LI> INLINE * * <LI> NEWATOM, LINK * INLINE * * <LI> * </UL> * <PRE> * NEWATOM [1, 0, abc_0] *... * INLINE [1, 0] * </PRE> * hara */ public class Inline { /** */ public static InlineCode inlinecode; /** */

53 A.1. Inline.java 46 static Process cp; /** Hash { -> */ public static Map code = new HashMap(); /** List */ public static List defs = new ArrayList(); /** */ static int codecount = 0; /** * * */ public static void initinline() { try { if(cp!=null) { // // BufferedReader br = new BufferedReader(new InputStreamReader(cp.getErrorStream() String el; while( (el=br.readline())!=null ) { System.err.println(el); cp.waitfor(); Env.d("Compile result : "+cp.exitvalue()); cp = null; // jar ClassLoader cl = new FileClassLoader(); Object o = cl.loadclass("myinlinecode").newinstance(); if (o instanceof InlineCode) { inlinecode = (InlineCode)o; //inlinecode = (InlineCode)Class.forName("MyInlineCode").newInstance(); //Env.d(Class.forName("MyInlineCode").getField("version")); catch (Exception e) { //Env.e("!! catch!! "+e.getmessage()+"\n"+env.parray(arrays.aslist(e.getstacktrace( if (inlinecode!= null) { Env.d("MyInlineCode Loaded"); else if (inlinecode == null) { Env.d("Failed in loading MyInlineCode"); /** * ID name codeid */ public static int getcodeid(string name) { try {

54 A.1. Inline.java 47 return ((Integer)code.get(name)).intValue(); catch (Exception e) { return -1; /** * * atom */ public static void add(string src) { if(src.startswith("/*inline*/")) { //if(src.startswith("a")) { // Env.d("Register inlinecode : "+src); code.put(src, new Integer(codeCount++)); else if(src.startswith("/*inline_define*/")) { // Env.d("Register inlinedefinecode : "+src); defs.add(src); /** * * TODO java oneliner REPL "-" * TODO */ public static void makecode() { try { if(code.isempty() && defs.isempty()) return; Iterator i; PrintWriter p = new PrintWriter(new FileOutputStream("MyInlineCode.java")); Env.d("make inline code "+code); //p.println("package runtime;"); p.println("import runtime.*;"); i = defs.iterator(); while(i.hasnext()) { String s = (String)i.next(); p.println(s); p.println("public class MyInlineCode implements InlineCode {"); p.println("\tpublic static String version=\"static string.\";"); p.println("\tpublic void run(atom me, int codeid) {"); //p.println("\t\tenv.p(\" \");"); //p.println("\t\tenv.d(\"exec Inline \"+me+codeid);"); p.println("\t\tswitch(codeid) {"); i = code.keyset().iterator(); while(i.hasnext()) {

55 A.2. Module.java 48 String s = (String)i.next(); int codeid = ((Integer)(code.get(s))).intValue(); p.println("\t\tcase "+codeid+": "); //p.println("\t\t\t/*"+s.replaceall("\\*\\/", "* /").replaceall("\\/\\*", "/ *") p.println("\t\t\t"+s); p.println("\t\t\tbreak;"); p.println("\t\t"); p.println("\t"); p.println(""); p.close(); // cp = Runtime.getRuntime().exec("javac -classpath.;lmntal.jar MyInlineCode.java"); catch (Exception e) { Env.d("!!! "+e.getmessage()+arrays.aslist(e.getstacktrace())); /** * atom */ public static void callinline(atom atom, int codeid) { //Env.d(atom+" "+codeid); if(inlinecode==null) return; //Env.d("=> call Inline "+atom.getname()); inlinecode.run(atom, codeid); A.2 Module.java package compile; import java.io.bufferedreader; import java.io.fileinputstream; import java.io.inputstreamreader; import java.util.*; //import runtime.functor; import runtime.env; import compile.parser.lmnparser; import compile.structure.*; /** * <br><br> * *

56 A.2. Module.java 49 * <li> * <li> module_name : {... * <li> * <li> * <li> LOADMODULE * * <ul> * <li> module_name : {... * <li> [1] module_name.name * <li> [2] use(module_name), name<br> * <br> * * <li> * * </ul><br> * * * * <ul> * <li> [.] * <dl> * <dt>string Functor.path</dt> * <dd> * * * (n-kato)</dd> * <dt>boolean Functor.pathFree</dt> * <dd> </dd> * ModuleName$AtomName (n-kato) * </dl> * <li>. LOADMODULE *.lmn * <li> FINDATOM AtomSet * func * <ul> * <li>!func.pathfree name, arity, path * <li> func.pathfree name, arity * </ul> * (n-kato) * </ul> * * * * m.p

57 A.2. Module.java 50 * * runtime.functor p * runtime.atom * * [1] m.p m.p m.p m,p * findatom dstatom,srcmem,p * path dstatom,m * [2] p p (*A) * findatom dstatom,srcmem,p * [3] m.p m.p * newatom dstmem,p,m * [4] p m.p * newatom dstmem,p,m * [5] m.p m.p * [6] p m.p * * m.p * * m.p m,p * * [1] m.p m.p m.p * findatom dstatom,srcmem, m,p * [2] p p * findatom dstatom,srcmem,p * [3] m.p m.p * newatom dstmem,mem, m,p * [4] p p * newatom dstmem,mem,p * [5] m.p m.p * [6] p p * * m.p p (*A) * * * * m.p * * * * * * inline * >>>1

58 A.2. Module.java 51 #, {{up,1,2,3 down {down ($r match {down, $t) #, {down,1,{2,3,{4,5 >>>2 ( { find_and_link($name1, X), $Name2, decl :- $Name1 eq $Name2 $name2(x), decl ) ## { find_and_link(m, X), m, decl :- m(x), decl for all {m String(m) ## decl >>>3 ( $a(x) :- static($a) { up, down, find_and_link($a, X) ) 1, 2, 3 {{{ io.print(m.incr), m:{ decl, m.incr, id(0), ( m.incr(x), id(n) :- cp(s(n), Cp1, Cp2), id( -> {{{ io.print(x), { up, down, find_and_link(m.incr, X), m.incr(x), m:{... -> {{{ io.print(x), { up, down, find_and_link(m.incr, X), m:{... -> {{{ io.print(x), { up, down, find_and_link(m.incr, X), m:{... -> {{{ io.print(x), { up, down, find_and_link(m.incr, X), m:{... -> {{{ io.print(x), m:{ decl, m.incr, id, { up, down, find_and_link(m.incr, X), (... :-.. -> {{{ io.print(x), m:{ decl, id, m.incr(x), (... :-...) -> {{{ io.print(x), m:{ decl, id(1), 1(X), m.incr, (... :-...) hara * */ public class Module { public static String libpath = "../lmntal_lib/"; public static Map memnametable = new HashMap(); /** * m */ public static void regmemname(string name, Membrane m) { memnametable.put(name, m); /** * m mod_name */ public static void loadmodule(membrane m, String mod_name) {

59 A.2. Module.java 52 String filename = libpath+mod_name+".lmn"; StringBuffer sb = new StringBuffer("Loading Module "+mod_name+"..."); try { LMNParser lp = new LMNParser(new BufferedReader(new InputStreamReader(new FileInputS Membrane nm = RulesetCompiler.runStartWithNull(lp.parse()); // Env.p("MOD compiled "+nm); //memnametable GC //m.add(nm); sb.append(" [ OK ] "); catch (Exception e) { Env.e("!! catch!! "+e.getmessage()+"\n"+env.parray(arrays.aslist(e.getstacktrace()) sb.append(" [ FAILED ] "); Env.d(sb.toString()); /** * m */ public static void resolvemodules(membrane m) { List need = new ArrayList(); getneedmodules(m, need); Iterator i = need.iterator(); while(i.hasnext()) { loadmodule(m, (String)i.next()); /** * m need */ static void getneedmodules(membrane m, List need) { Iterator i; i = m.atoms.listiterator(); while(i.hasnext()) { Atom a = (Atom)i.next(); String path = a.getpath(); if(path == null) continue; if(path.equals(m.name)) continue; // Env.p("Check module existence "+path); if(!memnametable.containskey(path)) { // Env.p("TODO: search lib file : " + path); need.add(path); i = m.rules.listiterator(); while(i.hasnext()) { RuleStructure rs = (RuleStructure)i.next(); getneedmodules(rs.leftmem, need); getneedmodules(rs.rightmem, need);

60 A.3..java 53 i = m.mems.listiterator(); while(i.hasnext()) { getneedmodules((membrane)i.next(), need); A.3.java

61 54 Appendix.B B.1 I/O (io.lmn) io:{ ( io.print(string) :- [[/*inline*/ System.out.println(me.nth(0)); ]](String) )

新・明解Java入門

新・明解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

K227 Java 2

K227 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

Java (9) 1 Lesson Java System.out.println() 1 Java API 1 Java Java 1

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

1 Java Java GUI , 2 2 jlabel1 jlabel2 jlabel3 jtextfield1 jtextfield2 jtextfield3 jbutton1 jtextfield1 jtextfield2 jtextfield3

1 Java Java GUI , 2 2 jlabel1 jlabel2 jlabel3 jtextfield1 jtextfield2 jtextfield3 jbutton1 jtextfield1 jtextfield2 jtextfield3 1 2 2 1 2 2.1.................................................... 2 2.2.................................................... 2 2.3........................................ 2 2.4....................................................

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

,,,,., C Java,,.,,.,., ,,.,, i

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

Javaセキュアコーディングセミナー東京 第3回 入出力(File, Stream)と例外時の動作 演習解説

Javaセキュアコーディングセミナー東京 第3回 入出力(File, Stream)と例外時の動作 演習解説 Java セキュアコーディングセミナー東京第 3 回入出力と例外時の動作 演習解説 2012 年 11 月 11 日 ( 日 ) JPCERT コーディネーションセンター脆弱性解析チーム戸田洋三 1 Hands-on Exercises コンパイルエラーに対処しよう ファイルからのデータ入力を実装しよう 2 Hands-on Exercise(1) サンプルコードの コンパイルエラーに対処しよう 3

More information

Java演習(4) -- 変数と型 --

Java演習(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

PowerPoint Presentation

PowerPoint 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 プログラミング Ⅰ 3 回目変 数 今日の講義講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能 変数は 型 ( データ型 ) と識別子をもちます 2 型 ( データ型 ) 変数に記憶する値の種類変数の型は 記憶できる値の種類と範囲

Java プログラミング Ⅰ 3 回目変 数 今日の講義講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能 変数は 型 ( データ型 ) と識別子をもちます 2 型 ( データ型 ) 変数に記憶する値の種類変数の型は 記憶できる値の種類と範囲 Java プログラミング Ⅰ 3 回目変 数 今日の講義講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能 変数は 型 ( データ型 ) と識別子をもちます 2 型 ( データ型 ) 変数に記憶する値の種類変数の型は 記憶できる値の種類と範囲を決定します 次の型が利用でき これらの型は特に基本型とよばれます 基本型 値の種類 値の範囲 boolean

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

用 日 力力 生 大 用 生 目 大 用 行行

More information

tkk0408nari

tkk0408nari SQLStatement Class Sql Database SQL Structured Query Language( ) ISO JIS http://www.techscore.com/tech/sql/02_02.html Database sql Perl Java SQL ( ) create table tu_data ( id integer not null, -- id aid

More information

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value = Part2-1-3 Java (*) (*).class Java public static final 1 class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value

More information

日 力力 生 行行 入 入 力力 生 用 方

日 力力 生 行行 入 入 力力 生 用 方 日 力力 生 行行 入 入 力力 生 用 方 力力 生 行行 自 行行 生 力力 生 一 二 力力 生 力力 力力 方 ファイル書き込み Androidプロジェクトの 生成 新規Androidプロジェクトを下記の設定値で作成 項 目名 設定値 プロジェクト名 Sample9 ビルドターゲット Android 2.2にチェックを付 ける アプリケーション名 Sample9 パッケージ名 jp.ac.uot

More information

. IDE JIVE[1][] Eclipse Java ( 1) Java Platform Debugger Architecture [5] 3. Eclipse GUI JIVE 3.1 Eclipse ( ) 1 JIVE Java [3] IDE c 016 Information Pr

. IDE JIVE[1][] Eclipse Java ( 1) Java Platform Debugger Architecture [5] 3. Eclipse GUI JIVE 3.1 Eclipse ( ) 1 JIVE Java [3] IDE c 016 Information Pr Eclipse 1,a) 1,b) 1,c) ( IDE) IDE Graphical User Interface( GUI) GUI GUI IDE View Eclipse Development of Eclipse Plug-in to present an Object Diagram to Debug Environment Kubota Yoshihiko 1,a) Yamazaki

More information

Web 1 p.2 1 Servlet Servlet Web Web Web Apache Web Servlet JSP Web Apache Tomcat Jetty Apache Tomcat, Jetty Java JDK, Eclipse

Web 1 p.2 1 Servlet Servlet Web Web Web Apache Web Servlet JSP Web Apache Tomcat Jetty Apache Tomcat, Jetty Java JDK, Eclipse Web 1 p.1 1 Servlet 1.1 Web Web WWW HTML CGI Common Gateway Interface Web HTML Web Web CGI CGI CGI Perl, PHP C Java Applet JavaScript Web CGI HTML 1.2 Servlet Java Servlet Servlet CGI Web CGI 1 Java Java

More information

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

やさしい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 information

アルゴリズムとデータ構造1

アルゴリズムとデータ構造1 1 200972 (sakai.keiichi@kochi sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi ://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2009/index.html 29 20 32 14 24 30 48 7 19 21 31 Object public class

More information

データ構造とアルゴリズム論

データ構造とアルゴリズム論 15 11 11 Java 21 231-0811 32 152-0033 1 Java 3-5,55,63,39,87,48,70,35,77,59,44 3-5 3-7 score2.txt 75 15 11 11 5-1 3-7 jbuttonread jbuttondisplay jlabelmessage jtextfieldname jtextfieldtokuten

More information

Part y mx + n mt + n m 1 mt n + n t m 2 t + mn 0 t m 0 n 18 y n n a 7 3 ; x α α 1 7α +t t 3 4α + 3t t x α x α y mx + n

Part y mx + n mt + n m 1 mt n + n t m 2 t + mn 0 t m 0 n 18 y n n a 7 3 ; x α α 1 7α +t t 3 4α + 3t t x α x α y mx + n Part2 47 Example 161 93 1 T a a 2 M 1 a 1 T a 2 a Point 1 T L L L T T L L T L L L T T L L T detm a 1 aa 2 a 1 2 + 1 > 0 11 T T x x M λ 12 y y x y λ 2 a + 1λ + a 2 2a + 2 0 13 D D a + 1 2 4a 2 2a + 2 a

More information

ALG ppt

ALG ppt 2012614 (sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2012/index.html 1 2 2 3 29 20 32 14 24 30 48 7 19 21 31 4 N O(log N) 29 O(N) 20 32 14 24 30 48 7 19 21 31 5

More information

II 1 p.1 1 Servlet 1.1 Web Web WWW HTML CGI Common Gateway Interface Web HTML Web Web CGI CGI CGI Perl, PHP C JavaScript Web CGI HTML 1.2 Servlet Java

II 1 p.1 1 Servlet 1.1 Web Web WWW HTML CGI Common Gateway Interface Web HTML Web Web CGI CGI CGI Perl, PHP C JavaScript Web CGI HTML 1.2 Servlet Java II 1 p.1 1 Servlet 1.1 Web Web WWW HTML CGI Common Gateway Interface Web HTML Web Web CGI CGI CGI Perl, PHP C JavaScript Web CGI HTML 1.2 Servlet Java Servlet Servlet CGI Web CGI Java Java JVM Java CGI

More information

解きながら学ぶJava入門編

解きながら学ぶ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 information

ALG ppt

ALG ppt 2012 6 21 (sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2012/index.html 1 l l O(1) l l l 2 (123 ) l l l l () l H(k) = k mod n (k:, n: ) l l 3 4 public class MyHashtable

More information

untitled

untitled 2011 6 20 (sakai.keiichi@kochi-tech.ac.jp) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2011/index.html tech.ac.jp/k1sakai/lecture/alg/2011/index.html html 1 O(1) O(1) 2 (123) () H(k) = k mod n

More information

JavaプログラミングⅠ

JavaプログラミングⅠ Java プログラミング Ⅰ 3 回目変数 今日の講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能です 変数は 型 ( データ型ともいいます ) と識別子をもちます 2 型 変数に記憶できる値の種類です型は 値の種類に応じて次の 8 種類があり これを基本型といいます 基本型値の種類値の範囲または例 boolean 真偽値 true または

More information

A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2:

A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2: Java Jojo ( ) ( ) A B 1: Ex. MPICH-G2 C.f. NXProxy [Tanaka] 2: Java Jojo Jojo (1) :Globus GRAM ssh rsh GRAM ssh GRAM A rsh B Jojo (2) ( ) Jojo Java VM JavaRMI (Sun) Horb(ETL) ( ) JPVM,mpiJava etc. Send,

More information

HTML Java Tips dp8t-asm/java/tips/ Apache Tomcat Java if else f

HTML Java Tips   dp8t-asm/java/tips/ Apache Tomcat Java if else f 1 Servlet 1.1 Web Web WWW HTML CGI Common Gateway InterfaceWeb HTML Web Web CGI CGI CGI Perl C Java Applet JavaScript Web CGI HTML 1.2 Servlet Java Servlet Servlet CGI Web CGI 1 Java / Java Java CGI Servlet

More information

Condition DAQ condition condition 2 3 XML key value

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

22 200702894 1 1 3 2 4 2.1..................................... 4 2.1.1............................. 4 2.1.2............................. 4 2.2................................... 9 2.2.1...................................

More information

Quick Sort 計算機アルゴリズム特論 :2017 年度 只木進一

Quick Sort 計算機アルゴリズム特論 :2017 年度 只木進一 Quick Sort 計算機アルゴリズム特論 :2017 年度 只木進一 2 基本的考え方 リスト ( あるいは配列 )SS の中の ある要素 xx(pivot) を選択 xx より小さい要素からなる部分リスト SS 1 xx より大きい要素からなる部分リスト SS 2 xx は SS 1 または SS 2 に含まれる 長さが 1 になるまで繰り返す pivot xx の選び方として 中央の要素を選択すると効率が良い

More information

intra-mart Accel Platform — イベントナビゲータ 開発ガイド   初版  

intra-mart Accel Platform — イベントナビゲータ 開発ガイド   初版   Copyright 2013 NTT DATA INTRAMART CORPORATION 1 Top 目次 intra-mart Accel Platform イベントナビゲータ開発ガイド初版 2013-07-01 改訂情報概要イベントフローの作成 更新 削除をハンドリングするイベントフローを非表示にする回答を非表示にするリンクを非表示にするタイトル コメントを動的に変更するリンク情報を動的に変更するナビゲート結果のリンクにステータスを表示する

More information

PowerPoint Presentation

PowerPoint Presentation プログラミング Java III 第 4 回 : サーブレットの HTTP Request の処理 Ivan Tanev 講義の構造 1. サーブレットの HTTP Request の処理 2. 演習 2 第 3 回のまとめ Internet Explorer のアドレス バー : http://isd-si.doshisha.ac.jp/teaching/programming_3/xxxxxxxx/lecture3_form1.html

More information

JAVA とテンプレート

JAVA とテンプレート JAVA とテンプレート 序論 : コンテナ 他のクラスのオブジェクトを保存するものをコンテナ (Container) と呼ぶ 集合 リスト 表 コンテナに求められる機能 追加 削除 参照 要素の比較 並べ替え 要素のクラスが不明では 比較できない 要素が想定しているクラスのものかの判定 テンプレート以前の対応方法 コンテナ設計時に 保存されるクラスを特定してコンテナをコードする 保存されるクラスごとに作成しなければならない

More information

TopLink å SampleClient.java... 5 Ò readallsample() querysample() cachesample() Ç..

TopLink å SampleClient.java... 5 Ò readallsample() querysample() cachesample() Ç.. lê~åäé= qçéiáåâ= NMÖENMKNKPF Volume2 Creation Date: Mar 04, 2005 Last Update: Aug 22, 2005 Version 1.0 ...3... 3 TopLink å...4 1... 4... 4 SampleClient.java... 5 Ò... 8... 9... 10 readallsample()... 11

More information

II 2 p.2 2 GET POST form action URL Aisatsu 2.1 Servlet GET GET : Query String QueryStringTest.java 1 import java.io.ioexception; 2 import java.io.pri

II 2 p.2 2 GET POST form action URL Aisatsu 2.1 Servlet GET GET : Query String QueryStringTest.java 1 import java.io.ioexception; 2 import java.io.pri II 2 p.1 2 GET POST Servlet Servlet Servlet CGI/Servlet GET POST 2 GET URL? FORM GET : http://maps.google.co.jp/maps?hl=ja&ll=34.292821,134.063587&z=15 POST HTML HTML : Aisatsu.html HTML 1

More information

オブジェクト指向プログラミング・同演習 5月21日演習課題

オブジェクト指向プログラミング・同演習 5月21日演習課題 オブジェクト指向プログラミング 同演習 5 月 21 日演習課題 問題 1 配列の例外処理例外が発生する可能性のある処理を try で囲み その後に catch で例外を捕捉します 例外処理の終了処理として finally が行われます これは書かなくて自動的に行われます 提出課題 1 (Kadai052301.java) 以下のプログラムは例外処理をしていない ArrayIndexOutOfBoundsException

More information

r1.dvi

r1.dvi 2006 1 2006.10.6 ( 2 ( ) 1 2 1.5 3 ( ) Ruby Java Java Java ( Web Web http://lecture.ecc.u-tokyo.ac.jp/~kuno/is06/ / ( / @@@ ( 3 ) @@@ : ( ) @@@ (Q&A) ( ) 1 http://www.sodan.ecc.u-tokyo.ac.jp/cgi-bin/qbbs/view.cgi

More information

intra-mart Accel Platform — イベントナビゲータ 開発ガイド   初版   None

intra-mart Accel Platform — イベントナビゲータ 開発ガイド   初版   None クイック検索検索 目次 Copyright 2013 NTT DATA INTRAMART CORPORATION 1 Top 目次 intra-mart Accel Platform イベントナビゲータ開発ガイド初版 2013-07-01 None 改訂情報概要イベントフローの作成 更新 削除をハンドリングするイベントフローを非表示にする回答を非表示にするリンクを非表示にするタイトル コメントを動的に変更するリンク情報を動的に変更するナビゲート結果のリンクにステータスを表示する

More information

HTML Java Tips dp8t-asm/java/tips/ Apache Tomcat Java if else f

HTML Java Tips   dp8t-asm/java/tips/ Apache Tomcat Java if else f 1 Servlet 1.1 Web Web WWW HTML CGI Common Gateway InterfaceWeb HTML Web Web CGI CGI CGI Perl C Java Applet JavaScript Web CGI HTML 1.2 Servlet Java Servlet Servlet CGI Web CGI 1 Java / Java Java CGI Servlet

More information

r02.dvi

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

ohp02.dvi

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

文字列操作と正規表現

文字列操作と正規表現 文字列操作と正規表現 オブジェクト指向プログラミング特論 2018 年度只木進一 : 工学系研究科 2 文字列と文字列クラス 0 個以上の長さの文字の列 Java では String クラス 操作 文字列を作る 連結する 文字列中に文字列を探す 文字列中の文字列を置き換える 部分文字列を得る 3 String クラス 文字列を保持するクラス 文字列は定数であることに注意 比較に注意 == : オブジェクトとしての同等性

More information

「Android Studioではじめる 簡単Androidアプリ開発」正誤表

「Android Studioではじめる 簡単Androidアプリ開発」正誤表 Android Studio Android 2016/04/19 Android Studio Android *1 Android Studio Android Studio Android Studio Android Studio Android PDF : Android Studio Android Android Studio Android *2 c R TM *1 Android

More information

1: Preference Display 1 package sample. pref ; 2 3 import android. app. Activity ; 4 import android. content. Intent ; 5 import android. content. Shar

1: Preference Display 1 package sample. pref ; 2 3 import android. app. Activity ; 4 import android. content. Intent ; 5 import android. content. Shar Android 2 1 (Activity) (layout strings.xml) XML Activity (Intent manifest) Android Eclipse XML Preference, DataBase, File 3 2 Preference Preference Preference URL:[http://www.aichi-pu.ac.jp/ist/lab/yamamoto/android/android-tutorial/tutorial02/tutorial02.pdf]

More information

LMNtal LMNtal LMNtal JAVA JAVA JAVA LMNtal LMNtal LMNtal

LMNtal LMNtal LMNtal JAVA JAVA JAVA LMNtal LMNtal LMNtal 2003 LMNtal GUI GUI : 2004 2 5 : : 1G00P024-3 LMNtal LMNtal LMNtal JAVA JAVA JAVA LMNtal LMNtal LMNtal 1 1 2 LMNtal 3 2.1 LMNtal.............................. 3 2.1.1 Atom........................ 3 2.1.2...............................

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

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value = Part2-1-3 Java (*) (*).class Java public static final 1 class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value

More information

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

1/8 ページ Java 基礎文法最速マスター Java Javaの文法一覧です 他の言語をある程度知っている人はこれを読めばJavaの基礎をマスターしてJavaを書くことができるようになっています 簡易リファレンスとしても利用できると思いますので これは足りないと思うものがあれば教えてください 1. 基礎 class の作成プログラムはclassに記述します たとえばSampleという名前のclassを作る場合

More information

Microsoft PowerPoint - Lecture_3

Microsoft PowerPoint - Lecture_3 プログラミング III 第 3 回 : サーブレットリクエスト & サーブレットレスポンス処理入門 Ivan Tanev 講義の構造 1. サーブレットの構造 2. サーブレットリクエスト サーブレットレスポンスとは 3. 演習 2 Lecture2_Form.htm 第 2 回のまとめ Web サーバ Web 1 フォーム static 2 Internet サーブレ4 HTML 5 ットテキスト

More information

Programming-C-9.key

Programming-C-9.key プログラミングC 第9回 例外 スレッド 白石路雄 2 finally try{ ( 例外が発生するかもしれない処理 ) catch(exception のクラス名 e){ ( 例外が発生した時の処理 ) finally{ ( 例外の発生の有無に関わらず 必ず行う処理 ) 3 Integer.parseInt() NumberFormatException

More information

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

O E ( ) A a A A(a) O ( ) (1) O O () 467

O E ( ) A a A A(a) O ( ) (1) O O () 467 1 1.0 16 1 ( 1 1 ) 1 466 1.1 1.1.1 4 O E ( ) A a A A(a) O ( ) (1) O O () 467 ( ) A(a) O A 0 a x ( ) A(3), B( ), C 1, D( 5) DB C A x 5 4 3 1 0 1 3 4 5 16 A(1), B( 3) A(a) B(b) d ( ) A(a) B(b) d AB d = d(a,

More information

CX-Checker CX-Checker (1)XPath (2)DOM (3) 3 XPath CX-Checker. MISRA-C 62%(79/127) SQMlint 76%(13/17) XPath CX-Checker 3. CX-Checker 4., MISRA-C CX- Ch

CX-Checker CX-Checker (1)XPath (2)DOM (3) 3 XPath CX-Checker. MISRA-C 62%(79/127) SQMlint 76%(13/17) XPath CX-Checker 3. CX-Checker 4., MISRA-C CX- Ch CX-Checker: C 1 1 2 3 4 5 1 CX-Checker CX-Checker XPath DOM 3 CX-Checker MISRA-C CX-Checker: A Customizable Coding Checker for C TOSHINORI OSUKA, 1 TAKASHI KOBAYASHI, 1 JUNICHI MASE, 2 NORITOSHI ATSUMI,

More information

Oracle Forms Services R6i

Oracle Forms Services R6i Creation Date: Jul 04, 2001 Last Update: Jul 31, 2001 Version: 1.0 0 0... 1 1...3 1.1... 3 1.2... 3 1.3... 3 2...4 2.1 C/S... 4 2.2 WEB... 5 2.3 WEB... 5 2.4 JAVABEAN... 6 3 JAVABEAN...7 3.1... 7 3.2 JDEVELOPER...

More information

/ ( ) 8/7/2003 13:21 p.2/64

/ ( ) 8/7/2003 13:21 p.2/64 B 12 I ks91@sfc.wide.ad.jp N208 8/7/2003 13:21 p.1/64 / ( ) 8/7/2003 13:21 p.2/64 8/7/2003 13:21 p.3/64 2! 12 7/ 8 1 13 7/15 2 / ( ) 11 (SFC ) ( 5 ) 8/7/2003 13:21 p.4/64 10 2003/7/22 23:59 JST 11 ( )

More information

PL : pl0 ( ) 1 SableCC ( sablecc ) 1.1 sablecc sablecc Étienne Gagnon [1] Java sablecc sablecc ( ) Visitor DepthFirstAdapter 1 (Depth

PL : pl0 ( ) 1 SableCC ( sablecc ) 1.1 sablecc sablecc Étienne Gagnon [1] Java sablecc sablecc ( ) Visitor DepthFirstAdapter 1 (Depth PL0 2007 : 2007.05.29 pl0 ( ) 1 SableCC ( sablecc ) 1.1 sablecc sablecc Étienne Gagnon [1] Java sablecc sablecc () Visitor DepthFirstAdapter 1 (Depth First traversal) ( ) (breadth first) 2 sablecc 1.2

More information

B 10 : N ip2003f10.tex B : 9/12/ :02 p.1/71

B 10 : N ip2003f10.tex B : 9/12/ :02 p.1/71 B 10 : ks91@sfc.wide.ad.jp N206 2003 ip2003f10.tex B : 9/12/2003 10:02 p.1/71 : / ip2003f10.tex B : 9/12/2003 10:02 p.2/71 ip2003f10.tex B : 9/12/2003 10:02 p.3/71 1 http://java.sun.com/j2se/1.4.1/docs/api/

More information

1: JX-model XML File Package Import Class Intf Ctor Method SInit Field Param Local ExtdOpt ImplOpt ThrwOpt Members QName Type Stmt Label Expr ident li

1: JX-model XML File Package Import Class Intf Ctor Method SInit Field Param Local ExtdOpt ImplOpt ThrwOpt Members QName Type Stmt Label Expr ident li Sapid JX-model ver. 1.3.13 2003 2 27 1 JX-model Java XML JX-model JX-model Java (Java 2 ver. 1.4) 20 7 JX-model 1 ^ $ Child nodes JX-model / ( ) JX-model @ @id @sort 1.1 File File JX-model XML /Package,

More information

1 VisBAR edu H 2 O.....

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

untitled

untitled JCSP CSP HPC H.Nakahara 1 2 CSP A B HPC H.Nakahara 3 CSP HPC H.Nakahara 4 CSP Process A chan Process B ( DFD) HPC H.Nakahara 5 DFD HPC H.Nakahara 6 DFD FAX OK? HPC H.Nakahara 7 HPC H.Nakahara 8 HPC H.Nakahara

More information

Java プログラミング Ⅰ 3 回目変数 変数 変 数 一時的に値を記憶させておく機能型 ( データ型 ) と識別子をもつ 2 型 ( データ型 ) 変数の種類型に応じて記憶できる値の種類や範囲が決まる 型 値の種類 値の範囲 boolean 真偽値 true / false char 2バイト文

Java プログラミング Ⅰ 3 回目変数 変数 変 数 一時的に値を記憶させておく機能型 ( データ型 ) と識別子をもつ 2 型 ( データ型 ) 変数の種類型に応じて記憶できる値の種類や範囲が決まる 型 値の種類 値の範囲 boolean 真偽値 true / false char 2バイト文 Java プログラミング Ⅰ 3 回目変数 変数 変 数 一時的に値を記憶させておく機能型 ( データ型 ) と識別子をもつ 2 型 ( データ型 ) 変数の種類型に応じて記憶できる値の種類や範囲が決まる 型 値の種類 値の範囲 boolean 真偽値 true / false char 2バイト文字 0x0000 ~ 0xffff byte 1バイト整数 - 2 8 ~ 2 8-1 short 2バイト整数

More information

Q&A集

Q&A集 & ver.2 EWEB-3C-N080 PreSerV for Web MapDataManager & i 1... 1 1.1... 1 1.2... 2 1.3... 6 1.4 MDM. 7 1.5 ( )... 9 1.6 ( )...12 1.7...14 1.8...15 1.9...16 1.10...17 1.11...18 1.12 19 1.13...20 1.14...21

More information

JavaプログラミングⅠ

JavaプログラミングⅠ Java プログラミング Ⅰ 3 回目変数 今日の講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能です 変数は 型 ( データ型ともいいます ) と識別子をもちます 2 型 変数に記憶できる値の種類です型は 値の種類に応じて次の 8 種類があり これを基本型といいます 基本型値の種類値の範囲または例 boolean 真偽値 true または

More information

fp.gby

fp.gby 1 1 2 2 3 2 4 5 6 7 8 9 10 11 Haskell 12 13 Haskell 14 15 ( ) 16 ) 30 17 static 18 (IORef) 19 20 OK NG 21 Haskell (+) :: Num a => a -> a -> a sort :: Ord a => [a] -> [a] delete :: Eq a => a -> [a] -> [a]

More information

BlueJ 2.0.1 BlueJ 2.0.x Michael Kölling Mærsk Institute University of Southern Denmark Toin University of Yokohama Alberto Palacios Pawlovsky 17 4 4 3 1 5 1.1 BlueJ.....................................

More information

Gartner Day

Gartner Day J2EE 1 J2EE C AP 2 J2EE AP DD java *.class java *.class java *.class *.class DD EAR, WAR, JAR orionapplicationclient.xmweb.xmapplication.jar.xml orion- orion-ejb- ml Oracle Application Server 10g *.jsp

More information

JavaScript の使い方

JavaScript の使い方 JavaScript Release10.5 JavaScript NXJ JavaScript JavaScript JavaScript 2 JavaScript JavaScript JavaScript NXJ JavaScript 1: JavaScript 2: JavaScript 3: JavaScript 4: 1 1: JavaScript JavaScript NXJ Static

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 information

test.gby

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

2: 3: A, f, φ f(t = A sin(2πft + φ = A sin(ωt + φ ω 2πf 440Hz A ( ( 4 ( 5 f(t = sin(2πf 1t + sin(2πf 2 t = 2 sin(2πt(f 1 + f 2 /2 cos(2πt(f 1 f

2: 3: A, f, φ f(t = A sin(2πft + φ = A sin(ωt + φ ω 2πf 440Hz A ( ( 4 ( 5 f(t = sin(2πf 1t + sin(2πf 2 t = 2 sin(2πt(f 1 + f 2 /2 cos(2πt(f 1 f 12 ( TV TV, CATV, CS CD, DAT, DV, DVD ( 12.1 12.1.1 1 1: T (sec f (Hz T= 1 f P a = N/m 2 1.013 10 5 P a 1 10 5 1.00001 0.99999 2,3 1 2: 3: 12.1.2 A, f, φ f(t = A sin(2πft + φ = A sin(ωt + φ ω 2πf 440Hz

More information

コーディング基準.PDF

コーディング基準.PDF Java Java Java Java.java.class 1 private public package import / //////////////////////////////////////////////////////////////////////////////// // // // // ////////////////////////////////////////////////////////////////////////////////

More information

Java プログラミング Ⅰ 7 回目 switch 文と論理演算子 今日の講義講義で学ぶ内容 switch 文 論理演算子 条件演算子 条件判断文 3 switch 文 switch 文 式が case のラベルと一致する場所から直後の break; まで処理しますどれにも一致致しない場合 def

Java プログラミング Ⅰ 7 回目 switch 文と論理演算子 今日の講義講義で学ぶ内容 switch 文 論理演算子 条件演算子 条件判断文 3 switch 文 switch 文 式が case のラベルと一致する場所から直後の break; まで処理しますどれにも一致致しない場合 def Java プログラミング Ⅰ 7 回目 switch 文と論理演算子 今日の講義講義で学ぶ内容 switch 文 論理演算子 条件演算子 条件判断文 3 switch 文 switch 文 式が case のラベルと一致する場所から直後の まで処理しますどれにも一致致しない場合 default: から直後の まで処理します 式の結果 ラベル 定数 整数または文字 (byte, short, int,

More information

インターネットマガジン2001年4月号―INTERNET magazine No.75

インターネットマガジン2001年4月号―INTERNET magazine No.75 i illustration : Hada Eiji 206 INTERNET magazine 2001/4 jdc.sun.co.jp/wireless/ www.nttdocomo.co.jp/mc-user/i/java/ www.zentek.com/i-jae/ja/download.html INTERNET magazine 2001/4 207 Jump 01 Jump 02 Jump

More information

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

Exam : 1z1-809-JPN Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO Get Latest & Valid 1z1-809-JPN Exam's Question and Answers 1 from Ac

Exam : 1z1-809-JPN Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO Get Latest & Valid 1z1-809-JPN Exam's Question and Answers 1 from Ac Actual4Test http://www.actual4test.com Actual4test - actual test exam dumps-pass for IT exams Exam : 1z1-809-JPN Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO Get Latest & Valid 1z1-809-JPN

More information

HARK Designer Documentation 0.5.0 HARK support team 2013 08 13 Contents 1 3 2 5 2.1.......................................... 5 2.2.............................................. 5 2.3 1: HARK Designer.................................

More information

(CC Attribution) Lisp 2.1 (Gauche )

(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

データ構造とアルゴリズム論

データ構造とアルゴリズム論 15 10 14 Java jtextfielddata jbuttonwrite jlabelmessage void jbuttonwrite_actionperformed(actionevent e) { String Data=jTextFieldData.getText(); try { // Test1.txt fw FileWriter fw= new FileWriter("Test1.txt");

More information

IE6 2 BMI chapter1 Java 6 chapter2 Java 7 chapter3 for if 8 chapter4 : BMI 9 chapter5 Java GUI 10 chapter6 11 chapter7 BMI 12 chap

IE6 2 BMI chapter1 Java 6 chapter2 Java 7 chapter3 for if 8 chapter4 : BMI 9 chapter5 Java GUI 10 chapter6 11 chapter7 BMI 12 chap 1-1 1-2 IE6 2 BMI 3-1 3-2 4 5 chapter1 Java 6 chapter2 Java 7 chapter3 for if 8 chapter4 : BMI 9 chapter5 Java GUI 10 chapter6 11 chapter7 BMI 12 chapter8 : 13-1 13-2 14 15 PersonTest.java KazuateGame.java

More information

Java学習教材

Java学習教材 Java 2016/4/17 Java 1 Java1 : 280 : (2010/1/29) ISBN-10: 4798120987 ISBN-13: 978-4798120980 2010/1/29 1 Java 1 Java Java Java class FirstExample { public static void main(string[] args) { System.out.println("

More information

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1

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

そして 取得した OutputStream インスタンスを使い 文字コードは UTF-8 として PrintWriter インスタンスを生成して あとは PrintWriter.append() で書き込みたい文字 列を渡して close() で保存する というだけです ファイルの読込み方法 それで

そして 取得した OutputStream インスタンスを使い 文字コードは UTF-8 として PrintWriter インスタンスを生成して あとは PrintWriter.append() で書き込みたい文字 列を渡して close() で保存する というだけです ファイルの読込み方法 それで Android: データを保存する方法 Android のアプリケーションで データを保存する方法を説明します 保存する方法としては以下のものがあります ファイルとして保存 Preference データベース (SQLite) ファイルへ書き込む Android のファイルへの書き出しはアクセス権限の設定部分があるので読み込みの openfileinput メソッドより 引数が増えています public

More information

I HTML HashMap (i) (ii) :.java import java.net.*; import java.io.*; import java.util.hashmap; public class SimpleStopWatch { public static voi

I HTML HashMap (i) (ii) :.java import java.net.*; import java.io.*; import java.util.hashmap; public class SimpleStopWatch { public static voi II Java 10 2 12 10:30 12:00 I. I III II. III. IV. ( a d) V. : this==null, T == N A ActionListener C class D actionperformed G getsource I implements K KeyListener J JApplet L addmouselistener M MouseListener

More information

presen.gby

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

0226_ぱどMD表1-ol前

0226_ぱどMD表1-ol前 No. MEDIA DATA 0 B O O K 00-090-0 0 000900 000 00 00 00 0000 0900 000900 AREA MAP 0,000 0,000 0,000 0,000 00,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 0,000 00,000 0,000

More information

オブジェクト脳のつくり方

オブジェクト脳のつくり方 2003 12 16 ( ) ML Java,.NET, UML J2EE, Web Java, J2EE.NET SI ex. ) OO OO OO OO OO (Controller) (Promoter) (Analyzer) (Supporter) http://nba.nikkeibp.co.jp/coachsp.html It takes time. OO OK OO 1.

More information

JAVA H13 OISA JAVA 1

JAVA H13 OISA JAVA 1 JAVA H13 OISA JAVA 1 ...3 JAR...4 2.1... 4 2.2... 4...5 3.1... 5 3.2... 6...7 4.1... 7 4.2... 7 4.3... 10 4.4...11 4.5... 12 4.6... 13 4.7... 14 4.8... 15 4.9... 16...18 5.1... 18 5.2...19 2 Java Java

More information

リファレンス,配列 例外処理

リファレンス,配列 例外処理 リファレンス, 配列, 例外処理 その他演習に役立つこと 2004 年 7 月 21 日 海谷治彦 1 リファレンス ま, 改め紹介しなくても Java 遣いなら誰でもつかってる. インスタンスをプログラム中から識別 ( 捕獲 ) するためのラベルのようなもの. C でいうところのポインタ変数に相当. Java では, あるインスタンスを参照するリファレンスが 1 つもなくなると, 勝手にインスタンスは消去される.

More information

Assignment_.java 課題 : 転置行列 / class Assignment_ public static void main(string[] args) int i,j; int[][] array = 1,,,,,,,,,,,,,1,1,; 行 列行列 i

Assignment_.java 課題 : 転置行列 / class Assignment_ public static void main(string[] args) int i,j; int[][] array = 1,,,,,,,,,,,,,1,1,; 行 列行列 i 1 1 0 1 Assignment_1.java 課題 1: チェッカー / class Assignment_1 public static void main(string[] args) int i,j; チェッカー用の 次元配列 int[][] checker=new int[][]; チェッカーパターンを書き込む for(i=0;i

More information

OOCOBOL紹介

OOCOBOL紹介 ISO ANSI COBOL85 COBOL 1959 COBOL OOCOBOL 1 ... 1... 3.... 3. OOCOBOL... 4.1.... 4.2.... 5.3. IDENTIFICATION DIVISION... 7.4. ENVIRONMENT DIVISION.... 7.5. DATA DIVISION... 7.6. PROCEDURE DIVISION....

More information

main.dvi

main.dvi Dec. 3, 1998 http://www.jaist.ac.jp/ kaiya/ 1??...? : Java RMI http://www.jaist.ac.jp/ kaiya/ 2 ( ) [1] [2] Bertrand Meyer. The Next Software Breakthrough. COMPUTER, Vol. 30, No. 7, pp. 113 114, Jul. 1997.

More information

Thread

Thread 14 2013 7 16 14.1....................................... 14 1 14.2 Thread................................... 14 1 14.3............................. 14 5 14.4....................................... 14 10

More information

新版明解C言語 実践編

新版明解C言語 実践編 2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,

More information

java_servlet2_見本

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

55 7 Java C Java TCP/IP TCP/IP TCP TCP_RO.java import java.net.*; import java.io.*; public class TCP_RO { public static void main(string[] a

55 7 Java C Java TCP/IP TCP/IP TCP TCP_RO.java import java.net.*; import java.io.*; public class TCP_RO { public static void main(string[] a 55 7 Java C Java TCP/IP TCP/IP 7.1 7.1.1 TCP TCP_RO.java import java.net.*; import java.io.*; public class TCP_RO { public static void main(string[] argv) { Socket readsocket = new Socket(argv[0], Integer.parseInt(argv[1]));

More information

syspro-0405.ppt

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

3 Java 3.1 Hello World! Hello World public class HelloWorld { public static void main(string[] args) { System.out.println("Hello World");

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