1: Preference Display 1 package sample. pref ; 2 3 import android. app. Activity ; 4 import android. content. Intent ; 5 import android. content. Shar
|
|
|
- れんか すわ
- 7 years ago
- Views:
Transcription
1 Android 2 1 (Activity) (layout strings.xml) XML Activity (Intent manifest) Android Eclipse XML Preference, DataBase, File 3 2 Preference Preference Preference URL:[ mail:[[email protected]] 1
2 1: Preference Display 1 package sample. pref ; 2 3 import android. app. Activity ; 4 import android. content. Intent ; 5 import android. content. SharedPreferences ; 6 import android. os. Bundle ; 7 import android. view. Menu ; 8 import android. view. MenuItem ; 9 import android. widget. TextView ; public class Display extends Activity { 12 private static final int EDIT = Menu. FIRST ; 13 private static final int ACTIVITY_EDIT = 0; 14 private TextView tv; 15 private SharedPreferences pref ; /* * Called when the activity is first created. */ 19 public void oncreate ( Bundle savedinstancestate ) { 20 super. oncreate ( savedinstancestate ); 21 setcontentview ( R. layout. display ); 22 tv = ( TextView ) findviewbyid ( R. id. text ); pref = getsharedpreferences (" Display ", 0); 25 tv. settext ( pref. getstring (" text ", "" )); 26 } public boolean oncreateoptionsmenu ( Menu menu ) { 30 super. oncreateoptionsmenu ( menu ); 31 menu. add (0, EDIT, 0, " EDIT "); 32 return true ; 33 } public boolean onmenuitemselected ( int featureid, MenuItem item ) { 37 switch ( item. getitemid ()) { 38 case EDIT : 39 edit (); 40 return true ; 41 } 42 return super. onmenuitemselected ( featureid, item ); 43 } private void edit () { 46 Intent i = new Intent ( this, Edit. class ); 47 startactivityforresult (i, ACTIVITY_EDIT ); 48 } public void onactivityresult ( int requestcode, int resultcode, Intent intent ) { 52 super. onactivityresult ( requestcode, resultcode, intent ); switch ( requestcode ) { 55 case ACTIVITY_EDIT : 56 tv. settext ( pref. getstring (" text ", "" )); 57 break ; 58 } 59 } 60 } 2
3 2: Preference Edit 1 package sample. pref ; import android. app. Activity ; 5 import android. content. SharedPreferences ; 6 import android. os. Bundle ; 7 import android. view. View ; 8 import android. widget. Button ; 9 import android. widget. EditText ; public class Edit extends Activity { 12 EditText et; 13 Button confirm ; 14 SharedPreferences pref ; protected void oncreate ( Bundle savedinstancestate ) { 18 super. oncreate ( savedinstancestate ); 19 setcontentview ( R. layout. edit ); 20 et = ( EditText ) findviewbyid ( R. id. edit ); 21 confirm = ( Button ) findviewbyid ( R. id. confirm ); pref = getsharedpreferences (" Display ", 0); 24 et. settext ( pref. getstring (" text ", "" )); confirm. setonclicklistener ( new View. OnClickListener () { 27 public void onclick ( View view ) { 28 sendtext (); 29 } 30 }); 31 } private void sendtext () { 34 SharedPreferences. Editor prefeditor = pref. edit (); 35 prefeditor. putstring (" text ", et. gettext (). tostring ()); 36 prefeditor. commit (); setresult ( RESULT_OK, getintent ()); 39 finish (); 40 } } Bundle Activity Preference Display Preference text Display.java Display.java Preference oncreate() [l.19 - l.26] TextView Preference 3
4 24 Display Preference 25 text TextView oncreateoptionmenu() [l.29 - l.33] onmenuitemselected() [l.36 - l.43] edit() [l.45 - l.48] Bundle Intent Edit Activity Preference startactivityforresult() onactivityresult() [l.51 - l.62] 55 Intent Bundle textview Preference 56 pref Edit.java Edit.java Preference oncreate() [l.17 - l.31] EditText Bundle Bundle EditText EditText Preference EditText Preference 23, 24 Display sendtext() [ 33 - l.40] Intent Bundle Display Activity Preference Preference SharedPreferncs.Editor SharedPreferences edit() 34 Editor 35 putstring() Preference 36 commit() commit() Preference Preference 4
5 2.1 Preference Preference SharedPreferences Preference SharedPreferences.Editor commit() Preference Bundle Intent Preference Android XML Preference XML Preference 2.2 XML Prefernce Android Preference XML Preference XML Preference 1 1: XML Preference 5
6 XML 3: Java 1 package tutorial. v2; 2 3 import android. os. Bundle ; 4 import android. preference. PreferenceActivity ; 5 6 public class pref extends PreferenceActivity { 8 public void oncreate ( Bundle savedinstancestate ) { 9 super. oncreate ( savedinstancestate ); addpreferencesfromresource ( R. xml. pref ); 12 } 13 } 4: XML 1 <? xml version =" 1.0 " encoding ="utf -8"?> 2 < PreferenceScreen xmlns : android =" http :// schemas. android. com / apk / res / android "> 3 4 < PreferenceCategory android : title =" inline preferences " > 5 < CheckBoxPreference 6 android : key =" checkbox_preference " 7 android : title =" CheckBoxPreference " 8 android : summary =" This is CheckBox style." / > 9 </ PreferenceCategory > < PreferenceCategory android : title =" dialog based preferences " > 12 < EditTextPreference 13 android : key =" edittext_preference " 14 android : title =" EditTextPreference " 15 android : summary =" This is EditText style." 16 android : dialogtitle =" Please input any words." / > 17 </ PreferenceCategory > < PreferenceCategory android : title =" Preference attributes " > 20 < CheckBoxPreference 21 android : key =" parent_checkbox_preference " 22 android : title =" Parent Preference " 23 android : summary =" This is Parent Preference." / > < CheckBoxPreference 26 android : key =" child_checkbox_preference " 27 android : dependency =" parent_checkbox_preference " 28 android : layout ="? android : attr / preferencelayoutchild " 29 android : title =" Child Preference " 30 android : summary =" This is Child Preference." / > 31 </ PreferenceCategory > </ PreferenceScreen > Java 3 Java XML (l.11) XML Preference 3 Activity PreferenceActivity PreferenceActivity Activity Preference 6
7 Activity 11 addpreferncesfromresource() Preference PreferencesActivity Activity Activity XML XML XML Preference XML Preference Preference 4 PreferenceScreen (l.2 - ) XML Preference URL XML Android PreferenceScreen 1 PreferenceCategory (l.4 - ) Preference 1 inline prefernces Check- BoxPreference android:title CheckBoxPreference (l.5 - l.8) Preference Preference CheckBox, EditText Preference CheckBoxPreference android:key boolean android:title 1 android:summary Preference EditTextPreference (l.12 - l.16) Preference String EditTextPreference android:dialogtitle 2 dependency (l.19 - l.31) 2 android:dependency Prefernce Preference True Preference android:layout Preference 7
8 ?? Android Preference layout layout 2: 8
9 3 DataBase Android DataBase SQLite[2] Android DataBase API API DataBase SQLite 5: Java 1 package fuji. tutorial. sqlite ; 2 3 import android. app. Activity ; 4 import android. content. ContentValues ; 5 import android. content. Context ; 6 import android. content. Intent ; 7 import android. database. sqlite. SQLiteCursor ; 8 import android. database. sqlite. SQLiteDatabase ; 9 import android. os. Bundle ; 10 import android. view. Menu ; 11 import android. view. MenuItem ; 12 import android. widget. TextView ; public class Display extends Activity { 15 private static final int EDIT = Menu. FIRST ; 16 private static final int ACTIVITY_EDIT = 0; 17 static final String DB_NAME = " file. db"; 18 static final String TABLE_NAME = " text "; 19 private TextView tv; public void oncreate ( Bundle savedinstancestate ) { 23 super. oncreate ( savedinstancestate ); 24 setcontentview ( R. layout. display ); 25 tv = ( TextView ) findviewbyid ( R. id. text ); 26 tv. settext ( read ()); 27 } public boolean oncreateoptionsmenu ( Menu menu ) { 31 super. oncreateoptionsmenu ( menu ); 32 menu. add (0, EDIT, 0, " EDIT "); 33 return true ; 34 } public boolean onmenuitemselected ( int featureid, MenuItem item ) { 38 switch ( item. getitemid ()) { 39 case EDIT : 40 edit (); 41 return true ; 42 } 43 return super. onmenuitemselected ( featureid, item ); 44 } private void edit () { 47 Intent i = new Intent ( this, Edit. class ); 48 startactivityforresult (i, ACTIVITY_EDIT ); 49 } public void onactivityresult ( int requestcode, int resultcode, Intent intent ){ 53 super. onactivityresult ( requestcode, resultcode, intent ); switch ( requestcode ) { 56 case ACTIVITY_EDIT : 57 tv. settext ( read ()); 9
10 58 break ; 59 } 60 } private String read (){ 63 SQLiteDatabase db = this. openorcreatedatabase 64 ( DB_NAME, Context. MODE_PRIVATE, null ); 65 db. execsql (" create table if not exists " + TABLE_NAME + "( info text )"); String info = ""; SQLiteCursor c =( SQLiteCursor ) db. query 70 ( TABLE_NAME, new String [] {" info "}, null, null, null, null, null ); 71 if ( c. getcount () > 0) { 72 c. movetofirst (); 73 info = c. getstring (0); 74 } else { 75 ContentValues cv = new ContentValues (); 76 cv.put (" info ", ""); 77 db. insert ( Display. TABLE_NAME, null, cv ); 78 } db. close (); 81 return info ; 82 } 83 } 6: XML 1 package fuji. tutorial. sqlite ; 2 3 import android. app. Activity ; 4 import android. content. ContentValues ; 5 import android. content. Context ; 6 import android. database. sqlite. SQLiteCursor ; 7 import android. database. sqlite. SQLiteDatabase ; 8 import android. os. Bundle ; 9 import android. view. View ; 10 import android. widget. Button ; 11 import android. widget. EditText ; public class Edit extends Activity { 14 private EditText et; 15 private Button confirm ; protected void oncreate ( Bundle savedinstancestate ) { 19 super. oncreate ( savedinstancestate ); 20 setcontentview ( R. layout. edit ); 21 et = ( EditText ) findviewbyid ( R. id. edit ); 22 confirm = ( Button ) findviewbyid ( R. id. confirm ); 23 et. settext ( read ()); confirm. setonclicklistener ( new View. OnClickListener () { 26 public void onclick ( View view ) { 27 sendtext (); 28 } 29 }); 30 } private void sendtext () { 33 write (et. gettext (). tostring ()); 34 setresult ( RESULT_OK ); 35 finish (); 36 } 37 10
11 38 private String read () { 39 SQLiteDatabase db = this. openorcreatedatabase 40 ( Display. DB_NAME, Context. MODE_PRIVATE, null ); 41 String info = ""; SQLiteCursor c = ( SQLiteCursor ) db. query 44 ( Display. TABLE_NAME, new String [] {" info "}, null, null,null,null, null ); 45 if ( c. getcount () > 0) { 46 c. movetofirst (); 47 info =c. getstring (0); 48 } db. close (); 51 return info ; 52 } private void write ( String text ) { 55 SQLiteDatabase db = this. openorcreatedatabase 56 ( Display. DB_NAME, Context. MODE_PRIVATE, null ); 57 ContentValues cv = new ContentValues (); 58 cv.put (" info ", text ); 59 db. update ( Display. TABLE_NAME, cv, null, null ); 60 db. close (); 61 } 62 } read() l.63 - l.64 openorcreatedatabase() 3 l.65 execsql() SQLite info l.67 l.69 Cursor SQLite- Cursor Cursor SQLite l.71 - if c l.72 - l getstring() 11
12 1 0 l.75 - l.77 ContentValue 76 insert() l.80. write() read() update() update() info info 4 File File Java File 7: File Display 1 package fuji. tutorial. file ; 2 3 import java. io. BufferedReader ; 4 import java. io. FileInputStream ; 5 import java. io. InputStreamReader ; 6 7 import android. app. Activity ; 8 import android. content. Intent ; 9 import android. os. Bundle ; 10 import android. view. Menu ; 11 import android. view. MenuItem ; 12 import android. widget. TextView ; public class Display extends Activity { 15 private static final int EDIT = Menu. FIRST ; 16 private static final int ACTIVITY_EDIT = 0; 17 private TextView tv; public void oncreate ( Bundle savedinstancestate ) { 21 super. oncreate ( savedinstancestate ); 22 setcontentview ( R. layout. display ); 23 tv = ( TextView ) findviewbyid ( R. id. text ); 24 tv. settext ( readfile ()); 25 } public boolean oncreateoptionsmenu ( Menu menu ) { 12
13 29 super. oncreateoptionsmenu ( menu ); 30 menu. add (0, EDIT, 0, " EDIT "); 31 return true ; 32 } public boolean onmenuitemselected ( int featureid, MenuItem item ) { 36 switch ( item. getitemid ()) { 37 case EDIT : 38 edit (); 39 return true ; 40 } 41 return super. onmenuitemselected ( featureid, item ); 42 } private void edit () { 45 Intent i = new Intent ( this, Edit. class ); 46 startactivityforresult (i, ACTIVITY_EDIT ); 47 } public void onactivityresult ( int requestcode, int resultcode, Intent intent ) { 51 super. onactivityresult ( requestcode, resultcode, intent ); switch ( requestcode ) { 54 case ACTIVITY_EDIT : 55 tv. settext ( readfile ()); 56 break ; 57 } 58 } public String readfile () { 61 FileInputStream in = null ; 62 String text = null ; 63 String tmp = null ; 64 try { 65 in = this. openfileinput (" data "); 66 InputStreamReader ir = new InputStreamReader ( in ); 67 BufferedReader br = new BufferedReader ( ir ); text = br. readline () + "\ n"; 70 tmp = br. readline (); 71 while ( tmp!= null ){ 72 text = text + tmp + "\ n"; 73 tmp = br. readline (); 74 } 75 if ( text == "\n") { 76 text = ""; 77 } in. close (); 80 ir. close (); 81 br. close (); 82 } catch ( Exception e) { 83 } 84 return text ; 85 } 86 } 13
14 8: File Edit 1 package fuji. tutorial. file ; import java. io. BufferedReader ; 5 import java. io. BufferedWriter ; 6 import java. io. FileInputStream ; 7 import java. io. FileOutputStream ; 8 import java. io. InputStreamReader ; 9 import java. io. OutputStreamWriter ; import android. app. Activity ; 12 import android. content. Context ; 13 import android. os. Bundle ; 14 import android. view. View ; 15 import android. widget. Button ; 16 import android. widget. EditText ; public class Edit extends Activity { 19 EditText et; 20 Button confirm ; protected void oncreate ( Bundle savedinstancestate ) { 24 super. oncreate ( savedinstancestate ); 25 setcontentview ( R. layout. edit ); 26 et = ( EditText ) findviewbyid ( R. id. edit ); 27 confirm = ( Button ) findviewbyid ( R. id. confirm ); et. settext ( readfile ()); 30 confirm. setonclicklistener ( new View. OnClickListener () { 31 public void onclick ( View view ) { 32 sendtext (); 33 } 34 }); 35 } private void sendtext () { 38 writefile ( et. gettext (). tostring ()); 39 setresult ( RESULT_OK ); 40 finish (); 41 } public String readfile () { 44 FileInputStream in = null ; 45 String text = null ; 46 String tmp = null ; 47 try { 48 in = this. openfileinput (" data "); 49 InputStreamReader ir = new InputStreamReader ( in ); 50 BufferedReader br = new BufferedReader ( ir ); text = br. readline () + "\ n"; 53 tmp = br. readline (); 54 while ( tmp!= null ) { 55 text = text + tmp + "\ n"; 56 tmp = br. readline (); 57 } if ( text == "\n") { 60 text = ""; 61 } in. close (); 64 ir. close (); 65 br. close (); 66 } catch ( Exception e) { 14
15 67 } 68 return text ; 69 } public void writefile ( String data ) { 72 FileOutputStream out = null ; 73 try { 74 out = this. openfileoutput (" data ", Context. MODE_PRIVATE ); 75 OutputStreamWriter osw = new OutputStreamWriter ( out ); 76 BufferedWriter bw = new BufferedWriter ( osw ); 77 bw. write ( data ); bw. close (); 80 osw. close (); 81 out. close (); 82 } catch ( Exception e) { 83 } 84 } 85 } File openfileinput() openfileoutput() FileInputStream FileOutputStream 2 Stream Display.java 65 Edit.java adb(android Debug Bridge) 5.1 adb adb Android adb sdk adb adb 5.2 adb shell 15
16 3: # sdk tools Android Linux Linux ls 4: ls / 15 & data data data /data/data/ 16
17 5: data /data/app/ app 17
18 5.3 Preference 2 Preference sample.pref Preference /data/data/ /shared prefs/ 1 24 Display Preference /data/data/sample.pref/display.xml Preference XML Display.xml Display.xml cat 7: Display.xml text my tutorial 6: my tutorial & 18
19 5.4 DataBase 3 fuji.tutorial.sqlite databases 5 file.db text info 8: my tutorial sqlite & 9: file.db text info my tutorial sqlite sqlite3 sqlite3 SQL 9 2.mode line line = select * from text; select text select info 8 19
20 5.5 File File /data/data/ / Files File 4 fuji.tutorial.file 11: data my files 10: my files & 6 3 Preference /data/data/ /shared pref/ cat DataBase /data/data/ /databases/ sqlite3 File /data/data/ /files/ cat 1: (Preference, DataBase, File) adb 20
21 adb Android [1] Android SDK: [2] SQLite: /11/05 : Ver 1.0 : 21
日 力力 生 行行 入 入 力力 生 用 方
日 力力 生 行行 入 入 力力 生 用 方 力力 生 行行 自 行行 生 力力 生 一 二 力力 生 力力 力力 方 ファイル書き込み Androidプロジェクトの 生成 新規Androidプロジェクトを下記の設定値で作成 項 目名 設定値 プロジェクト名 Sample9 ビルドターゲット Android 2.2にチェックを付 ける アプリケーション名 Sample9 パッケージ名 jp.ac.uot
Microsoft Word - Android_SQLite講座_画面800×1280
Page 5 5 アクティビティ ( 一覧 ) を作成する ファイル名 : src/jp/edu/mie/view010.java ( 新規作成 ) /* * View010 */ import android.app.activity; import android.content.intent; import android.os.bundle; import android.view.view;
1: Android 2 Android 2.1 Android 4 Activity Android Service ContentProvider BroadcastReceiver Activity ( ): Android 1 Android Service ( ): ContentProv
II Java/Android 1 Android 1.1 Google 2003 Android 2005 Google Android 2007 11 Google T- (T-Mobile International) Open Handset Alliance OHA Android 1.2 OS Android 7.0 API (Application Program Interface)
Microsoft Word - _Intent.doc
public class Intent extends Object implements Parcelable Cloneable 英和 : 意図, 目的 intent が 意図 目的 を意味するように Android ではアプリ ( アクティビティ ) が何をしたいかという 意図 目的 のリクエスト メッセージをシステムに送ると, システムがそれを解釈 判断し, 適切なアクティビティへ渡す仕組みが備わっている
新・明解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,
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
「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
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
補足資料 キーイベント処理サンプル package jp.co.keyevent; import android.app.activity; import android.os.bundle; import android.view.keyevent; import android.widget.t
補足資料 キーイベント処理サンプル package jp.co.keyevent; import android.app.activity; import android.os.bundle; import android.view.keyevent; import android.widget.toast; public class KeyEventSampleActivity extends Activity
やさしい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
About me! 足立昌彦 / +Masahiko.Adachi )! バイドゥ株式会社技術顧問 (Simeji)! 株式会社カブク Co-Founder! Google Developer Expert (Android)
Discover Support Library Masahiko Adachi @adamrokcer / +Masahiko.Adachi 28 th Sep, 2013 About me! 足立昌彦 ( @adamrocker / +Masahiko.Adachi )! バイドゥ株式会社技術顧問 (Simeji)! 株式会社カブク Co-Founder! Google Developer Expert
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
[email protected] [email protected] 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
intra-mart Accel Platform — イベントナビゲータ 開発ガイド 初版
Copyright 2013 NTT DATA INTRAMART CORPORATION 1 Top 目次 intra-mart Accel Platform イベントナビゲータ開発ガイド初版 2013-07-01 改訂情報概要イベントフローの作成 更新 削除をハンドリングするイベントフローを非表示にする回答を非表示にするリンクを非表示にするタイトル コメントを動的に変更するリンク情報を動的に変更するナビゲート結果のリンクにステータスを表示する
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
データベースからデータの 読 み 込 み Cursorクラス
アンドロイドのデータベースについて SQlite データベースからデータの 読 み 込 み Cursorクラス Cursorでデータをとってきます // 注 意 定 数 でDatabaseクラスの 中 にあるとします public static final String ID = " id"; public static final String NAME = "_name"; // 例 えばこんなデータベースがあるとして(SQLiteOpenHelperクラスを
(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
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
intra-mart Accel Platform — イベントナビゲータ 開発ガイド 初版 None
クイック検索検索 目次 Copyright 2013 NTT DATA INTRAMART CORPORATION 1 Top 目次 intra-mart Accel Platform イベントナビゲータ開発ガイド初版 2013-07-01 None 改訂情報概要イベントフローの作成 更新 削除をハンドリングするイベントフローを非表示にする回答を非表示にするリンクを非表示にするタイトル コメントを動的に変更するリンク情報を動的に変更するナビゲート結果のリンクにステータスを表示する
: : : TSTank 2
Java (8) 2008-05-20 Lesson6 Lesson5 Java 1 Lesson 6: TSTank1, TSTank2, TSTank3 java 2 car1 car2 Car car1 = new Car(); Car car2 = new Car(); car1.setcolor(red); car2.setcolor(blue); car2.changeengine(jet);
1.SqlCtl クラスリファレンス SqlCtl クラスのリファレンスを以下に示します メソッドの実行中にエラーが発生した場合は標準エラー出力にメッセージを出力します (1)Connect() メソッド データベースへ connect 要求を行います boolean Connect(String
目次 1.SqlCtl クラスリファレンス 2 (1)Connect() メソッド 2 (2)DisConnect() メソッド 3 (3)Commit() メソッド 3 (4)Rollback() メソッド 4 2.SqlStm クラスリファレンス 5 (1)Prepare() メソッド 5 (2)Execute() メソッド 6 (3)Release() メソッド 6 (4)Immediate()
コーディング基準.PDF
Java Java Java Java.java.class 1 private public package import / //////////////////////////////////////////////////////////////////////////////// // // // // ////////////////////////////////////////////////////////////////////////////////
Java プログラミング Ⅰ 7 回目 switch 文と論理演算子 今日の講義講義で学ぶ内容 switch 文 論理演算子 条件演算子 条件判断文 3 switch 文 switch 文 式が case のラベルと一致する場所から直後の break; まで処理しますどれにも一致致しない場合 def
Java プログラミング Ⅰ 7 回目 switch 文と論理演算子 今日の講義講義で学ぶ内容 switch 文 論理演算子 条件演算子 条件判断文 3 switch 文 switch 文 式が case のラベルと一致する場所から直後の まで処理しますどれにも一致致しない場合 default: から直後の まで処理します 式の結果 ラベル 定数 整数または文字 (byte, short, int,
解きながら学ぶ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
目的 泡立ち法を例に Comparableインターフェイスの実装 抽象クラスの利用 型パラメタの利用 比較 入替 の回数を計測
泡立ち法とその実装 計算機アルゴリズム特論 :2017 年度只木進一 目的 泡立ち法を例に Comparableインターフェイスの実装 抽象クラスの利用 型パラメタの利用 比較 入替 の回数を計測 Comparable インターフェイ ス クラスインスタンスが比較可能であることを示す Int compareto() メソッドを実装 Integer Double String などには実装済み public
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
Prog2_6th
2017 年 11 月 2 日 ( 木 ) 実施 インテントインテントとは Android アプリは複数のアクティビティを持つことが出来, また, アクティビティ以外の要素も持つので, 複数のアクティビティ間, アクティビティとアクティビティ以外の要素との間といったオブジェクト間を結び付ける仕組みが必要となる その役割を担うのがインテントで, 複数のアプリ間やアプリとシステムとの間もインテントで結び付けることが出来る
226
226 227 Main ClientThread Request Channel WorkerThread Channel startworkers takerequest requestqueue threadpool WorkerThread channel run Request tostring execute name number ClientThread channel random
Exam : 1z0-809 日本語 (JPN) Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO 1 / 8 Get Latest & Valid 1z0-809-JPN Exam's Question and Answe
Actual4Test http://www.actual4test.com Actual4test - actual test exam dumps-pass for IT exams Exam : 1z0-809 日本語 (JPN) Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO 1 / 8 Get Latest &
非推奨メソッド等の掲載について
非推奨メソッド等の掲載について スマートにプログラミング Android 入門編第 2 版 SDK 4/2.3 対応 (2012 年 6 月 11 日発行第 2 版第 1 刷 ) において 一部現在では非推奨となったレイアウト及びメソッドの利用が掲載されておりました お詫びと共に補足 訂正させて頂きます 下記にその対応について示します 株式会社リックテレコム書籍出版部 ( 情報更新日 :2012.8.14)
Android :
Android : 2018 6 1 Android SB Informatics & IDEA chapter 1 1-1 Android Android 1-2 column 1-3 Windows Mac Android Studio column Android Studio 1-4 Android Studio Android Studio column Instant Run column
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
JavaプログラミングⅠ
Java プログラミング Ⅰ 3 回目変数 今日の講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能です 変数は 型 ( データ型ともいいます ) と識別子をもちます 2 型 変数に記憶できる値の種類です型は 値の種類に応じて次の 8 種類があり これを基本型といいます 基本型値の種類値の範囲または例 boolean 真偽値 true または
PowerPoint プレゼンテーション
1 2 3 /usr/local javalib xerces-2_6_2 xalan-2_6_0 4 XERCES_HOME=/usr/local/javalib/xerces-2_6_2 CLASSPATH=$XERCES_HOME/xmlParserAPIs.jar:$CLASSPATH CLASSPATH=$XERCES_HOME/xercesImpl.jar:$CLASSPATH CLASSPATH=$XERCES_HOME/xercesSamples.jar:$CLASSPATH
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...
ユニット・テストの概要
2004 12 ... 3... 3... 4... 5... 6... 6 JUnit... 6... 7 Apache Cactus... 7 HttpUnit/ServletUnit... 8 utplsql... 8 Clover... 8 Anthill Pro... 9... 10... 10... 10 SQL... 10 Java... 11... 11... 12... 12 setter
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
untitled
-1- 1. JFace Data Binding JFace Data Binding JFace SWT JFace Data Binding JavaBean JFace Data Binding JavaBean JFace Data Binding 1JFace Data Binding JavaBean JavaBean JavaBean name num JavaBean 2JFace
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
Vuzix M100 SDKインストールガイド
Vuzix M100 SDK Vuzix Corporation. 2015-12-24 1 SDK Vuzix M100 SDK Android Studio 1.1 Add-on Vuzix M100 1.1.1 Android Studio Configure SDK Manager SDK Update Sites Name Vuzix M100 SDK URL URL *1 * http://vuzix.com/k79g75yxos/addon.xml
TopLink È... 3 TopLink...5 TopLink åø... 6 TopLink å Workbench O/R ~... 8 Workbench À ~... 8 Foundation Library å... 8 TopL
lê~åäé= qçéiáåâ= NMÖENMKNKPF Volume1 Creation Date: Mar 04, 2005 Last Update: Aug 23, 2005 Version 1.0 ...3... 3 TopLink 10.1.3 È... 3 TopLink...5 TopLink åø... 6 TopLink å... 7... 8 Workbench O/R ~...
アルゴリズムとデータ構造1
1 200972 (sakai.keiichi@kochi [email protected]) 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
. 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
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]));
データ構造とアルゴリズム論
Java jtextfielddata jbuttonwrite jlabelmessage void jbuttonwrite_actionperformed(actionevent e) { String Data=jTextFieldData.getText(); try { // Test1.txt fw FileWriter fw= new FileWriter("Test1.txt");
$ java StoreString abc abc ed abced twice abcedabced clear xyz xyz xyz bingo! abc bingo!abc ^Z mport java.io.*; ublic class StoreString { public static void main(string[] args) throws IOException{ BufferedReader
3 Powered by mod_perl, Apache & MySQL use Item; my $item = Item->new( id => 1, name => ' ', price => 1200,
WEB DB PRESS Vol.1 79 3 Powered by mod_perl, Apache & MySQL use Item; my $item = Item->new( id => 1, name => ' ', price => 1200, http://www.postgresql.org/http://www.jp.postgresql.org/ 80 WEB DB PRESS
ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web 2014 3
Web 2.0 Web Web Web Web Web Web Web I II I ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web 2014 3 1. 1.1 Web... 1 1.1.1... 3 1.1.2... 3 1.1.3... 4 1.2... 4 I 2 5 2. HTMLCSS 2.1 HTML...
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
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
GIMP import javafx.application.application; import javafx.scene.scene; import javafx.scene.canvas.canvas; import javafx.scene.canvas.graphicscontext;
(JavaFX ) JavaFX 2 1. 2 2. 52 3. A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2 4. 13 5. 6. 7. 8. 9. 13 10. 11. 12. Java.gif 1 GIMP import javafx.application.application; import javafx.scene.scene; import javafx.scene.canvas.canvas;
JavaプログラミングⅠ
Java プログラミング Ⅰ 3 回目変数 今日の講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能です 変数は 型 ( データ型ともいいます ) と識別子をもちます 2 型 変数に記憶できる値の種類です型は 値の種類に応じて次の 8 種類があり これを基本型といいます 基本型値の種類値の範囲または例 boolean 真偽値 true または
ALG ppt
2012614 ([email protected]) 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
VB.NETコーディング標準
(C) Copyright 2002 Java ( ) VB.NET C# AS-IS [email protected] [email protected] Copyright (c) 2000,2001 Eiwa System Management, Inc. Object Club Kenji Hiranabe02/09/26 Copyright
2-2. TableLayout TableLayout は任意のビューを表形式で配置したい場合に利用する (HTML の Table に近いイメー ジ ) 2-3. FrameLayout ビューを重ねて表示するためのレイアウト 後から配置した部品が前面に来る仕様となっている 3. まとめ レイア
1. レイアウトの基本 Android でレイアウトを作成する方法には XML で定義する方法 と プログラム上から作成する方法 の 2 つがある XML で定義する方が読みやすく変更も容易なので 基本的には XML でレイアウトを作成し 動的にレイアウトを変更したい場合にプログラムで記述するのが一般的である 2. レイアウトの種類 ビューを配置するベースとなるレイアウトについて説明する ここで紹介するレイアウト以外にも
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.............................
