Ruby

Size: px
Start display at page:

Download "Ruby"

Transcription

1 Ruby

2 ? a.k.a. ihower twitter: ihower 2006 Ruby ( ) Rails Developer

3 Ruby? (interpreted) Yukihiro Matsumoto, a.k.a. Matz Lisp, Perl, Smalltalk Happy

4 irb: Interactive Ruby irb(main):001:0> irb(main):001:0> => 2 irb(main):002:0>

5 Ruby Dynamic v.s. Static typing Ruby/Perl/Python/PHP v.s. Java/C/C++ Strong v.s. Weak typing Ruby/Perl/Python/Java v.s. PHP/C/C++

6 ?? PHP code: Ruby code: $i = 1; echo "Value is " + $i # 1 C code: i=1 puts "Value is " + i #TypeError: can't convert Fixnum into String # from (irb):2:in `+' # from (irb):2 int a = 5; float b = a;

7 Ruby # "UPPER" puts "upper".upcase # -5 puts -5.abs # Fixnum puts 99.class # "Ruby Rocks!" 5.times do puts "Ruby Rocks!"

8 Array a = [ 1, "cat", 3.14 ] puts a[0] # 1 puts a.size # 3 a[2] = nil puts a.inspect # [1, "cat", nil]

9 Hash (Associative Array) config = { "foo" => 123, "bar" => 456 } puts config["foo"] # 123

10 Symbols config = { :foo => 123, :bar => 456 } puts config[:foo] # 123

11 If if account.total > puts "large account" elsif account.total > puts "medium account" else puts "small account"

12 If Perl Style if account.total > puts "large account" elsif account.total > puts "medium account" else puts "small account"

13 expression? true_expresion : false_expression x = 3 puts ( x > 3 )? " " : " " #

14 Case case name when "John" puts "Howdy John!" when "Ryan" puts "Whatz up Ryan!" else puts "Hi #{name}!"

15 while, loop, until, next and break i=0 while ( i < 10 ) i += 1 next if i % 2 == 0 # i = 0 loop do i += 1 break if i > 10 # i = 0 i += 1 until i > 10 puts i # 11

16 false nil puts "not execute" if nil puts "not execute" if false puts "execute" if true # execute puts "execute" if # execute ( JavaScript ) puts "execute" if 0 # execute ( C ) puts "execute" if 1 # execute puts "execute" if "foo" # execute puts "execute" if Array.new # execute

17 Regular Expressions Perl # phone = " " if phone =~ /(\d{3})-(\d{3})-(\d{4})/ ext = $1 city = $2 num = $3

18 Methods def def say_hello(name) result = "Hi, " + name return result puts say_hello('ihower') # Hi, ihower

19 Methods def def say_hello(name) result = "Hi, " + name return result puts say_hello('ihower') # Hi, ihower

20 Class class Greeter def = name def say(word) puts "#{word}, #{@name}" g1 = Greeter.new("ihower") g2 = Greeter.new("ihover") g1.say("hello") # Hello, ihower g2.say("hello") # Hello, ihover

21 Class class Greeter def = name def say(word) puts "#{word}, #{@name}" g1 = Greeter.new("ihower") g2 = Greeter.new("ihover") g1.say("hello") # Hello, ihower g2.say("hello") # Hello, ihover

22 Class class Greeter def = name def say(word) puts "#{word}, #{@name}" g1 = Greeter.new("ihower") g2 = Greeter.new("ihover") g1.say("hello") # Hello, ihower g2.say("hello") # Hello, ihover

23 Class class Greeter def = name def say(word) puts "#{word}, #{@name}" g1 = Greeter.new("ihower") g2 = Greeter.new("ihover") g1.say("hello") # Hello, ihower g2.say("hello") # Hello, ihover

24 Class class Greeter def = name def say(word) puts "#{word}, #{@name}" g1 = Greeter.new("ihower") g2 = Greeter.new("ihover") g1.say("hello") # Hello, ihower g2.say("hello") # Hello, ihover

25 Class ( ) class = ihower def self.say Greeter.say # Hello, ihower

26 Class ( ) class = ihower def self.say Greeter.say # Hello, ihower

27 Class ( ) class = ihower def self.say Greeter.say # Hello, ihower

28 Class body attr_accessor, attr_writer, attr_reader class Person class Person attr_accessor :name def def = val

29 class MyClass def public_method private def private_method protected def protected_method class MyClass def public_method def private_method def protected_method public :public_method private :private_method protected :proected_method

30 Class class Pet attr_accessor :name, :age class Cat < Pet class Dog < Pet

31 code block closure { puts "Hello" } # block do puts "Blah" # block puts "Blah"

32 code block (iterator) # people = ["David", "John", "Mary"] people.each do person puts person # 5.times { puts "Ruby rocks!" } # 1.upto(9) { x puts x }

33 code block (iterator) # people = ["David", "John", "Mary"] people.each do person puts person # 5.times { puts "Ruby rocks!" } # 1.upto(9) { x puts x } while, until, for

34 code block # a = [ "a", "b", "c", "d" ] b = a.map { x x + "!" } puts b.inspect # ["a!", "b!", "c!", "d!"] # b = [1,2,3].find_all{ x x % 2 == 0 } b.inspect # [2]

35 code block # a = [ "a", "b", "c" ] a.delete_if { x x >= "b" } # ["a"] # [2,1,3].sort! { a, b b <=> a } # ["3", 2, 1 ]

36 code block functional programming fu? # (5..10).inject { sum, n sum + n } # find the longest word longest = ["cat", "sheep", "bear"].inject do memo, word ( memo.length > word.length )? memo : word

37 code block file = File.new("testfile", "r") #... file.close File.open("testfile", "r") do file #... #

38 Yield yield code block # def call_block puts "Start" yield yield puts "End" call_block { puts "Blocks are cool!" } # # "Start" # "Blocks are cool!" # "Blocks are cool!" # "End"

39 code block def call_block yield(1) yield(2) yield(3) call_block { i puts "#{i}: Blocks are cool!" } # # "1: Blocks are cool!" # "2: Blocks are cool!" # "3: Blocks are cool!"

40 Proc object code block def call_block(&block) block.call(1) block.call(2) block.call(3) call_block { i puts "#{i}: Blocks are cool!" } # proc object proc_1 = Proc.new { i puts "#{i}: Blocks are cool!" } proc_2 = lambda { i puts "#{i}: Blocks are cool!" } call_block(&proc_1) call_block(&proc_2) # # "1: Blocks are cool!" # "2: Blocks are cool!" # "3: Blocks are cool!"

41 def my_sum(*val) val.inject(0) { sum, v sum + v } puts my_sum(1,2,3,4) # 10

42 Hash { } def my_print(a, b, options) puts a puts b puts options[:x] puts options[:y] puts options[:z] puts my_print("a", "B", { :x => 123, :z => 456 } ) puts my_print("a", "B", :x => 123, :z => 456) # # A # B # 123 # nil # 456

43 raise, begin, rescue, ensure raise "Not works!!" # RuntimeError # class MyException < RuntimeError raise MyException begin puts 10 / 0 rescue => e puts e.class ensure #... # ZeroDivisionError

44 Module (1) Namespace module MyUtil def self.foobar puts "foobar" MyUtil.foobar # foobar

45 Module(2) Mixins module Debug def who_am_i? "#{self.class.name} (\##{self.object_id}): #{self.to_s}" class Foo include Debug # Mixin #... class Bar include Debug include AwesomeModule #... ph = Foo.new(" ") et = Bar.new(" ") ph.who_am_i? # "Foo (#330450): " et.who_am_i? # "Bar (#330420): "

46 Module(2) Mixins module Debug def who_am_i? "#{self.class.name} (\##{self.object_id}): #{self.to_s}" class Foo include Debug # Mixin #... class Bar include Debug include AwesomeModule #... ph = Foo.new(" ") et = Bar.new(" ") Ruby Module ph.who_am_i? # "Foo (#330450): " et.who_am_i? # "Bar (#330420): "

47 (duck typing) # class Duck def quack puts "quack!" # ( ) class Mallard def quack puts "qwuaacck!! quak!"

48 Class Type birds = [Duck.new, Mallard.new, Object.new] # birds.each do duck duck.quack if duck.respond_to? :quack

49 Class Type birds = [Duck.new, Mallard.new, Object.new] # birds.each do duck duck.quack if duck.respond_to? :quack OOP!

50 Metaprogramming

51 define_method class Dragon define_method(:foo) { puts "bar" } ['a','b','c','d','e','f'].each do x define_method(x) { puts x } dragon = Dragon.new dragon.foo # "bar" dragon.a # "a" dragon.f # "f"

52 Domain-Specific Language class Firm < ActiveRecord::Base has_many :clients has_one :account belongs_to :conglomorate # has_many AciveRecord class method Firm instance methods firm = Firm.find(1) firm.clients firm.clients.size firm.clients.build firm.clients.destroy_all

53 Method Missing class Proxy def = object def method_missing(symbol, *args) object = ["a", "b", "c"] proxy = Proxy.new(object) puts proxy.first # Proxy first method_missing "a"

54 Introspection ( ) # Object.methods => ["s", "name", "class_eval", "object_id", "new", "singleton_methods",...] # Object.respond_to? :name => true

55 Ruby

56 Ruby production Ruby 1.8.6, ( MRI, Matz Ruby Interpreter) Ruby (YARV) JRuby Ruby Ruby Enterprise Edition(REE) Ruby GC memory leak

57 Ruby production IronRuby (based on Microsoft.NET) MacRuby (based on Objective-C) Rubinius (Engine yard project) MagLev (based on smalltalk) Cardinal (based on Parrot VM)

58 Thank you. Beginning Ruby 2nd. (Apress) Programming Ruby (The Pragmatic Programmers) The Well-Grounded Rubyist (Manning) Ruby (O Reilly)

ruby-intro.key

ruby-intro.key Ruby 程式語 言 入 門導覽 https://ihower.tw 2015/6 Aga 什什麼是 Ruby 基本語法介紹 一些應 用 什什麼是 Ruby? https://www.ruby-lang.org/zh_tw/ 開放原碼 物件導向的動態直譯式 (interpreted) 程式語 言 簡單哲學 高 生產 力力 精巧 自然的語法 創造者 Yukihiro Matsumoto, a.k.a.

More information

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc 2 5 8 11 0 13 1. 13 2. 15 3. 18 1 23 1. 23 2. 26 3. 28 2 36 1. 36 2. 39 3. 42 4. 44 5. 49 6. 51 3 57 1. 57 2. 60 3. 64 4. 66 5. 70 6. 75 7. 83 8. 85 9. 88 10. 98 11. 103 12. 108 13. 112 4 115 1. 115 2.

More information

数据结构与算法 - Python基础

数据结构与算法 - Python基础 Python 教材及课件 课件及作业见网址 xpzhang.me 1 1. Python 2. 3. (list) (tuple) 4. (dict) (set) 5. 6. 7. 2 Python Python 3 Python 4 Python 1, 100, -8080, 0,... 0x 0-9, a-f 0 xff00, 0 xa432bf 5 1.24, 3.14, -9.80,...

More information

02

02 Thinking in C++: Volume One: Introduction to Standard C++, Second Edition & Volume Two: Practical Programming C++ C C++ C++ 3 3 C C class C++ C++ C++ C++ string vector 2.1 interpreter compiler 2.1.1 BASIC

More information

untitled

untitled 1 Outline 料 類 說 Tang, Shih-Hsuan 2006/07/26 ~ 2006/09/02 六 PM 7:00 ~ 9:30 聯 ives.net@gmail.com www.csie.ntu.edu.tw/~r93057/aspnet134 度 C# 力 度 C# Web SQL 料 DataGrid DataList 參 ASP.NET 1.0 C# 例 ASP.NET 立

More information

Microsoft Word - 01.DOC

Microsoft Word - 01.DOC 第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的

More information

Microsoft Word - ch04三校.doc

Microsoft Word - ch04三校.doc 4-1 4-1-1 (Object) (State) (Behavior) ( ) ( ) ( method) ( properties) ( functions) 4-2 4-1-2 (Message) ( ) ( ) ( ) A B A ( ) ( ) ( YourCar) ( changegear) ( lowergear) 4-1-3 (Class) (Blueprint) 4-3 changegear

More information

untitled

untitled 1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override

More information

WWW PHP

WWW PHP WWW PHP 2003 1 2 function function_name (parameter 1, parameter 2, parameter n ) statement list function_name sin, Sin, SIN parameter 1, parameter 2, parameter n 0 1 1 PHP HTML 3 function strcat ($left,

More information

新・解きながら学ぶJava

新・解きながら学ぶJava 481! 41, 74!= 40, 270 " 4 % 23, 25 %% 121 %c 425 %d 121 %o 121 %x 121 & 199 && 48 ' 81, 425 ( ) 14, 17 ( ) 128 ( ) 183 * 23 */ 3, 390 ++ 79 ++ 80 += 93 + 22 + 23 + 279 + 14 + 124 + 7, 148, 16 -- 79 --

More information

Microsoft PowerPoint - plan08.ppt

Microsoft PowerPoint - plan08.ppt 程 序 设 计 语 言 原 理 Principle of Programming Languages 裘 宗 燕 北 京 大 学 数 学 学 院 2012.2~2012.6 8. 面 向 对 象 为 什 么 需 要 面 向 对 象? OO 语 言 的 发 展 面 向 对 象 的 基 本 概 念 封 装 和 继 承 初 始 化 和 终 结 处 理 动 态 方 法 约 束 多 重 继 承 总 结 2012

More information

Microsoft Word - 第3章.doc

Microsoft Word - 第3章.doc Java C++ Pascal C# C# if if if for while do while foreach while do while C# 3.1.1 ; 3-1 ischeck Test() While ischeck while static bool ischeck = true; public static void Test() while (ischeck) ; ischeck

More information

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2 Chapter 02 變數與運算式 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.2 2.2.1 2.2.2 2.2.3 type 2.2.4 2.3 2.3.1 print 2.3.2 input 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 + 2.4.6 Python Python 2.1 2.1.1 a p p l e b e a r c 65438790

More information

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.07.doc

Microsoft Word - 把时间当作朋友(2011第3版)3.0.b.07.doc 2 5 8 11 0 1. 13 2. 15 3. 18 1 1. 22 2. 25 3. 27 2 1. 35 2. 38 3. 41 4. 43 5. 48 6. 50 3 1. 56 2. 59 3. 63 4. 65 5. 69 13 22 35 56 6. 74 7. 82 8. 84 9. 87 10. 97 11. 102 12. 107 13. 111 4 114 1. 114 2.

More information

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

KillTest 质量更高 服务更好 学习资料   半年免费更新服务 KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务 Exam : 310-065Big5 Title : Sun Certified Programmer for the Java 2 Platform, SE 6.0 Version : Demo 1 / 14 1. 35. String #name = "Jane Doe"; 36. int

More information

C/C++ - 字符输入输出和字符确认

C/C++ - 字符输入输出和字符确认 C/C++ Table of contents 1. 2. getchar() putchar() 3. (Buffer) 4. 5. 6. 7. 8. 1 2 3 1 // pseudo code 2 read a character 3 while there is more input 4 increment character count 5 if a line has been read,

More information

1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10

1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10 Java V1.0.1 2007 4 10 1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10 6.2.10 6.3..10 6.4 11 7.12 7.1

More information

Fuzzy Highlight.ppt

Fuzzy Highlight.ppt Fuzzy Highlight high light Openfind O(kn) n k O(nm) m Knuth O(n) m Knuth Unix grep regular expression exact match Yahoo agrep fuzzy match Gais agrep Openfind gais exact match fuzzy match fuzzy match O(kn)

More information

FY.DOC

FY.DOC 高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主

More information

C/C++程序设计 - 字符串与格式化输入/输出

C/C++程序设计 - 字符串与格式化输入/输出 C/C++ / Table of contents 1. 2. 3. 4. 1 i # include # include // density of human body : 1. 04 e3 kg / m ^3 # define DENSITY 1. 04 e3 int main ( void ) { float weight, volume ; int

More information

第5章修改稿

第5章修改稿 (Programming Language), ok,, if then else,(), ()() 5.0 5.0.0, (Variable Declaration) var x : T x, T, x,,,, var x : T P = x, x' : T P P, () var x:t P,,, yz, var x : int x:=2. y := x+z = x, x' : int x' =2

More information

Chapter 1 What is Programing Paradigm 1

Chapter 1 What is Programing Paradigm 1 An Introduction to Programing Paradigm Chase Zhang May 8, 2013 Chapter 1 What is Programing Paradigm 1 CHAPTER 1. WHAT IS PROGRAMING PARADIGM 2 Definition from Wikipedia 1. Object-oriented programming/

More information

WWW PHP Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2

WWW PHP Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2 WWW PHP 2003 1 Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2 Comments PHP Shell Style: # C++ Style: // C Style: /* */ $value = $p * exp($r * $t); # $value

More information

EJB-Programming-4-cn.doc

EJB-Programming-4-cn.doc EJB (4) : (Entity Bean Value Object ) JBuilder EJB 2.x CMP EJB Relationships JBuilder EJB Test Client EJB EJB Seminar CMP Entity Beans Session Bean J2EE Session Façade Design Pattern Session Bean Session

More information

Perl

Perl Perl 磊 Goal Introduction The first perl program Basical coding style Variable Data structure Control structure Regular expression Lab Reference Outline The first perl program Just type this following string

More information

EJB-Programming-3.PDF

EJB-Programming-3.PDF :, JBuilder EJB 2.x CMP EJB Relationships JBuilder EJB Test Client EJB EJB Seminar CMP Entity Beans Value Object Design Pattern J2EE Design Patterns Value Object Value Object Factory J2EE EJB Test Client

More information

前言 C# C# C# C C# C# C# C# C# microservices C# More Effective C# More Effective C# C# C# C# Effective C# 50 C# C# 7 Effective vii

前言 C# C# C# C C# C# C# C# C# microservices C# More Effective C# More Effective C# C# C# C# Effective C# 50 C# C# 7 Effective vii 前言 C# C# C# C C# C# C# C# C# microservices C# More Effective C# More Effective C# C# C# C# Effective C# 50 C# C# 7 Effective vii C# 7 More Effective C# C# C# C# C# C# Common Language Runtime CLR just-in-time

More information

CHAPTER 1

CHAPTER 1 CHAPTER 1 1-1 System Development Life Cycle; SDLC SDLC Waterfall Model Shelly 1995 1. Preliminary Investigation 2. System Analysis 3. System Design 4. System Development 5. System Implementation and Evaluation

More information

全国计算机技术与软件专业技术资格(水平)考试

全国计算机技术与软件专业技术资格(水平)考试 全 国 计 算 机 技 术 与 软 件 专 业 技 术 资 格 ( 水 平 ) 考 试 2008 年 上 半 年 程 序 员 下 午 试 卷 ( 考 试 时 间 14:00~16:30 共 150 分 钟 ) 试 题 一 ( 共 15 分 ) 阅 读 以 下 说 明 和 流 程 图, 填 补 流 程 图 中 的 空 缺 (1)~(9), 将 解 答 填 入 答 题 纸 的 对 应 栏 内 [ 说 明

More information

untitled

untitled 1 Outline 類别 欄 (1) 類 類 狀 更 易 類 理 若 類 利 來 利 using 來 namespace 類 ; (2) namespace IBM class Notebook namespace Compaq class Notebook 類别 類 來 類 列 欄 (field) (property) (method) (event) 類 例 立 來 車 類 類 立 車 欄 料

More information

VHDL(Statements) (Sequential Statement) (Concurrent Statement) VHDL (Architecture)VHDL (PROCESS)(Sub-program) 2

VHDL(Statements) (Sequential Statement) (Concurrent Statement) VHDL (Architecture)VHDL (PROCESS)(Sub-program) 2 VHDL (Statements) VHDL(Statements) (Sequential Statement) (Concurrent Statement) VHDL (Architecture)VHDL (PROCESS)(Sub-program) 2 (Assignment Statement) (Signal Assignment Statement) (Variable Assignment

More information

C/C++ 语言 - 循环

C/C++ 语言 - 循环 C/C++ Table of contents 7. 1. 2. while 3. 4. 5. for 6. 8. (do while) 9. 10. (nested loop) 11. 12. 13. 1 // summing.c: # include int main ( void ) { long num ; long sum = 0L; int status ; printf

More information

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2

More information

06 01 action JavaScript action jquery jquery AJAX CSS jquery CSS jquery HTML CSS jquery.css() getter setter.css('backgroundcolor') jquery CSS b

06 01 action JavaScript action jquery jquery AJAX CSS jquery CSS jquery HTML CSS jquery.css() getter setter.css('backgroundcolor') jquery CSS b 06 01 action JavaScript action jquery jquery AJAX 04 4-1 CSS jquery CSS jquery HTML CSS jquery.css() getter setter.css('backgroundcolor') jquery CSS background-color camel-cased DOM backgroundcolor.css()

More information

Microsoft Word - 物件導向編程精要.doc

Microsoft Word - 物件導向編程精要.doc Essential Object-Oriented Programming Josh Ko 2007.03.11 object-oriented programming C++ Java OO class object OOP Ruby duck typing complexity abstraction paradigm objects objects model object-oriented

More information

无类继承.key

无类继承.key 无类继承 JavaScript 面向对象的根基 周爱 民 / aimingoo aiming@gmail.com https://aimingoo.github.io https://github.com/aimingoo rand = new Person("Rand McKinnon",... https://docs.oracle.com/cd/e19957-01/816-6408-10/object.htm#1193255

More information

untitled

untitled 說 參 例 邏 邏 1. 說 2. 數 數 3. 8 4. 理念 李 龍老 立 1. 理 料 2. 理 料 3. 數 料 4. 流 邏 念 5. 良 6. 讀 行 行 7. 行 例 來 邏 1. 說 說 識 量 2. 說 理 類 3. 數 數 念 4. 令 5. 良 6. 流 邏 念 7. 說 邏 理 力 1. 2. 3. 4. 5. 列 念 1 參 1. ( Visual Basic 例 ) (1)

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 9 [P.11] : Dev C++ [P.12] : http://c.feis.tw [P.13] [P.14] [P.15] [P.17] [P.23] Dev C++ [P.24] [P.27] [P.34] C / C++ [P.35] 10 C / C++ C C++ C C++ C++ C ( ) C++

More information

<4D6963726F736F667420506F776572506F696E74202D20332D322E432B2BC3E6CFF2B6D4CFF3B3CCD0F2C9E8BCC6A1AAD6D8D4D8A1A2BCCCB3D0A1A2B6E0CCACBACDBEDBBACF2E707074>

<4D6963726F736F667420506F776572506F696E74202D20332D322E432B2BC3E6CFF2B6D4CFF3B3CCD0F2C9E8BCC6A1AAD6D8D4D8A1A2BCCCB3D0A1A2B6E0CCACBACDBEDBBACF2E707074> 程 序 设 计 实 习 INFO130048 3-2.C++ 面 向 对 象 程 序 设 计 重 载 继 承 多 态 和 聚 合 复 旦 大 学 计 算 机 科 学 与 工 程 系 彭 鑫 pengxin@fudan.edu.cn 内 容 摘 要 方 法 重 载 类 的 继 承 对 象 引 用 和 拷 贝 构 造 函 数 虚 函 数 和 多 态 性 类 的 聚 集 复 旦 大 学 计 算 机 科 学

More information

(Microsoft Word - 11\244T\246\342\277\337\260l\302\334.doc)

(Microsoft Word - 11\244T\246\342\277\337\260l\302\334.doc) 赤 川 次 郎 作 品 集 11 三 色 貓 追 蹤 序 曲 那 是 一 隻 凶 猛 的 野 狗 加 上 饑 餓, 正 在 虎 視 眈 眈 地 注 視 孩 子 嘴 裏 啃 著 的 香 腸, 準 備 突 然 猛 撲 上 去 孩 子 還 不 滿 三 歲, 不 曉 得 若 想 躲 開 那 隻 身 體 比 自 己 大 的 惡 犬 一 擊, 最 好 是 把 香 腸 扔 掉, 但 他 反 而 緊 握 在 手 開

More information

CHAPTER VC#

CHAPTER VC# 1. 2. 3. 4. CHAPTER 2-1 2-2 2-3 2-4 VC# 2-5 2-6 2-7 2-8 Visual C# 2008 2-1 Visual C# 0~100 (-32768~+32767) 2 4 VC# (Overflow) 2-1 2-2 2-1 2-1.1 2-1 1 10 10!(1 10) 2-3 Visual C# 2008 10! 32767 short( )

More information

2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF

2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF Chapter 2 WF 2.1 WF 2.2 2. XAML 2. 2 WF 1 T I P WF WF WF WF WF WF WF WF 2.1 WF WF WF WF WF WF WF WF WF WF EDI API WF Visual Studio Designer 1 2.1 WF Windows Workflow Foundation 2 WF 1 WF Domain-Specific

More information

C/C++语言 - 运算符、表达式和语句

C/C++语言 - 运算符、表达式和语句 C/C++ Table of contents 1. 2. 3. 4. C C++ 5. 6. 7. 1 i // shoe1.c: # include # define ADJUST 7. 64 # define SCALE 0. 325 int main ( void ) { double shoe, foot ; shoe = 9. 0; foot = SCALE * shoe

More information

untitled

untitled 1 行 行 行 行.NET 行 行 類 來 行 行 Thread 類 行 System.Threading 來 類 Thread 類 (1) public Thread(ThreadStart start ); Name 行 IsAlive 行 行狀 Start 行 行 Suspend 行 Resume 行 行 Thread 類 (2) Sleep 行 CurrentThread 行 ThreadStart

More information

1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F

1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F 1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET 2.0 2.0.NET Framework.NET Framework 2.0 ( 3).NET Framework 2.0.NET Framework ( System ) o o o o o o Boxing UnBoxing() o

More information

Microsoft PowerPoint - OPVB1基本VB.ppt

Microsoft PowerPoint - OPVB1基本VB.ppt 大 綱 0.VB 能 做 什 麼? CH1 VB 基 本 認 識 1.VB 歷 史 與 版 本 2.VB 環 境 簡 介 3. 即 時 運 算 視 窗 1 0.VB 能 做 什 麼? Visual Basic =>VB=> 程 式 設 計 語 言 => 設 計 程 式 設 計 你 想 要 的 功 能 的 程 式 自 動 化 資 料 庫 計 算 模 擬 遊 戲 網 路 監 控 實 驗 輔 助 自 動

More information

Chapter 9: Objects and Classes

Chapter 9: Objects and Classes Fortran Algol Pascal Modula-2 BCPL C Simula SmallTalk C++ Ada Java C# C Fortran 5.1 message A B 5.2 1 class Vehicle subclass Car object mycar public class Vehicle extends Object{ public int WheelNum

More information

Microsoft Word - PHP7Ch01.docx

Microsoft Word - PHP7Ch01.docx PHP 01 1-6 PHP PHP HTML HTML PHP CSSJavaScript PHP PHP 1-6-1 PHP HTML PHP HTML 1. Notepad++ \ch01\hello.php 01: 02: 03: 04: 05: PHP 06:

More information

Microsoft PowerPoint - ch6 [相容模式]

Microsoft PowerPoint - ch6 [相容模式] UiBinder wzyang@asia.edu.tw UiBinder Java GWT UiBinder XML UI i18n (widget) 1 2 UiBinder HelloWidget.ui.xml: UI HelloWidgetBinder HelloWidget.java XML UI Owner class ( Composite ) UI XML UiBinder: Owner

More information

untitled

untitled 4.1AOP AOP Aspect-oriented programming AOP 來說 AOP 令 理 Cross-cutting concerns Aspect Weave 理 Spring AOP 來 AOP 念 4.1.1 理 AOP AOP 見 例 來 例 錄 Logging 錄 便 來 例 行 留 錄 import java.util.logging.*; public class HelloSpeaker

More information

個 人 的 手, 拉 著 瞎 子 的 手 把 他 帶 往 村 外 的 時 候, 對 於 瞎 子 來 講, 那 個 人 的 手 和 耶 穌 的 手 有 沒 有 區 別? 沒 有! 為 什 麼 沒 有 區 別? 因 為 對 於 一 個 瞎 子 來 說, 手 和 耳 朵 就 是 他 接 觸 世 界, 瞭

個 人 的 手, 拉 著 瞎 子 的 手 把 他 帶 往 村 外 的 時 候, 對 於 瞎 子 來 講, 那 個 人 的 手 和 耶 穌 的 手 有 沒 有 區 別? 沒 有! 為 什 麼 沒 有 區 別? 因 為 對 於 一 個 瞎 子 來 說, 手 和 耳 朵 就 是 他 接 觸 世 界, 瞭 課 目 : 講 道 法 學 生 : 楊 建 偉 老 師 : 汪 院 長 時 間 :2009 年 8 月 1 日 靈 命 三 階 ( 可 8:22-26) 在 四 部 福 音 書 中, 這 是 一 段 很 特 別 的 記 載 特 別 在 什 麼 地 方 呢? 是 不 是 特 別 在 耶 穌 基 督 對 一 個 病 人 的 醫 治? 不, 在 耶 穌 三 年 半 的 服 侍 當 中, 曾 經 醫 治 數

More information

C/C++ - 字符串与字符串函数

C/C++ - 字符串与字符串函数 C/C++ Table of contents 1. 2. 3. 4. 1 char C 2 char greeting [50] = " How " " are " " you?"; char greeting [50] = " How are you?"; 3 printf ("\" Ready, go!\" exclaimed John."); " Ready, go!" exclaimed

More information

Progperl.PDF

Progperl.PDF print "Howdy, world!\n"; 1 2 / / 3 4 / $phrase = " Howdy, world!\n"; print $phrase ; # # / 5 6 / $answer = 42; $pi = 3.14159265; $avocados = 6.02e23; $pet = "Camel"; $sign = "I love my $pet"; $cost = 'It

More information

基于CDIO一体化理念的课程教学大纲设计

基于CDIO一体化理念的课程教学大纲设计 Java 语 言 程 序 设 计 课 程 教 学 大 纲 Java 语 言 程 序 设 计 课 程 教 学 大 纲 一 课 程 基 本 信 息 1. 课 程 代 码 :52001CC022 2. 课 程 名 称 :Java 语 言 程 序 设 计 3. 课 程 英 文 名 称 :Java Programming 4. 课 程 类 别 : 理 论 课 ( 含 实 验 上 机 或 实 践 ) 5. 授

More information

51 C 51 isp 10 C PCB C C C C KEIL

51 C 51 isp 10   C   PCB C C C C KEIL http://wwwispdowncom 51 C " + + " 51 AT89S51 In-System-Programming ISP 10 io 244 CPLD ATMEL PIC CPLD/FPGA ARM9 ISP http://wwwispdowncom/showoneproductasp?productid=15 51 C C C C C ispdown http://wwwispdowncom

More information

新版 明解C++入門編

新版 明解C++入門編 511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,

More information

KillTest 质量更高 服务更好 学习资料 半年免费更新服务

KillTest 质量更高 服务更好 学习资料   半年免费更新服务 KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务 Exam : 310-055Big5 Title : Sun Certified Programmer for the Java 2 Platform.SE 5.0 Version : Demo 1 / 22 1. 11. public static void parse(string str)

More information

untitled

untitled PowerBuilder Tips 利 PB11 Web Service 年度 2 PB Tips PB9 EAServer 5 web service PB9 EAServer 5 了 便 web service 來說 PB9 web service 力 9 PB11 release PB11 web service 力更 令.NET web service PB NVO 論 不 PB 來說 說

More information

Improved Preimage Attacks on AES-like Hash Functions: Applications to Whirlpool and Grøstl

Improved Preimage Attacks on AES-like Hash Functions: Applications to Whirlpool and Grøstl SKLOIS (Pseudo) Preimage Attack on Reduced-Round Grøstl Hash Function and Others Shuang Wu, Dengguo Feng, Wenling Wu, Jian Guo, Le Dong, Jian Zou March 20, 2012 Institute. of Software, Chinese Academy

More information

(TestFailure) JUnit Framework AssertionFailedError JUnit Composite TestSuite Test TestSuite run() run() JUnit

(TestFailure) JUnit Framework AssertionFailedError JUnit Composite TestSuite Test TestSuite run() run() JUnit Tomcat Web JUnit Cactus JUnit Java Cactus JUnit 26.1 JUnit Java JUnit JUnit Java JSP Servlet JUnit Java Erich Gamma Kent Beck xunit JUnit boolean JUnit Java JUnit Java JUnit Java 26.1.1 JUnit JUnit How

More information

mvc

mvc Build an application Tutor : Michael Pan Application Source codes - - Frameworks Xib files - - Resources - ( ) info.plist - UIKit Framework UIApplication Event status bar, icon... delegation [UIApplication

More information

untitled

untitled 1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-1-1 C int main(void){ int x,y,z; int sum=0; double avg=0.0; scanf("%d",&x) ; scanf("%d",&y) ; scanf("%d",&z) ; sum=x+y+z ; avg=sum/3.0; printf("%f\n",avg); system("pause");

More information

RunPC2_.doc

RunPC2_.doc PowerBuilder 8 (5) PowerBuilder Client/Server Jaguar Server Jaguar Server Connection Cache Thin Client Internet Connection Pooling EAServer Connection Cache Connection Cache Connection Cache Connection

More information

LEETCODE leetcode.com 一 个 在 线 编 程 网 站, 收 集 了 IT 公 司 的 面 试 题, 包 括 算 法, 数 据 库 和 shell 算 法 题 支 持 多 种 语 言, 包 括 C, C++, Java, Python 等 2015 年 3 月 份 加 入 了 R

LEETCODE leetcode.com 一 个 在 线 编 程 网 站, 收 集 了 IT 公 司 的 面 试 题, 包 括 算 法, 数 据 库 和 shell 算 法 题 支 持 多 种 语 言, 包 括 C, C++, Java, Python 等 2015 年 3 月 份 加 入 了 R 用 RUBY 解 LEETCODE 算 法 题 RUBY CONF CHINA 2015 By @quakewang LEETCODE leetcode.com 一 个 在 线 编 程 网 站, 收 集 了 IT 公 司 的 面 试 题, 包 括 算 法, 数 据 库 和 shell 算 法 题 支 持 多 种 语 言, 包 括 C, C++, Java, Python 等 2015 年 3 月 份

More information

Microsoft Word - Learn Objective-C.doc

Microsoft Word - Learn Objective-C.doc Learn Objective C http://cocoadevcentral.com/d/learn_objectivec/ Objective C Objective C Mac C Objective CC C Scott Stevenson [object method]; [object methodwithinput:input]; output = [object methodwithoutput];

More information

Microsoft Word - linux命令及建议.doc

Microsoft Word - linux命令及建议.doc Linux 操 作 系 统 命 令 集 1 基 本 命 令 查 看 系 统 信 息 : uname -a 修 改 密 码 : passwd 退 出 : logout(exit) 获 取 帮 助 : man commands 2 文 件 和 目 录 命 令 显 示 当 前 工 作 目 录 : pwd 改 变 所 在 目 录 : cd cd - 切 换 到 上 一 次 使 用 的 目 录 cd 切 换

More information

epub83-1

epub83-1 C++Builder 1 C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r C + + B u i l d e r 1.1 1.1.1 1-1 1. 1-1 1 2. 1-1 2 A c c e s s P a r a d o x Visual FoxPro 3. / C / S 2 C + + B u i l d e r / C

More information

<4D F736F F D D342DA57CA7DEA447B14D2DA475B57BBB50BADEB27AC3FEB14DA447B8D5C344>

<4D F736F F D D342DA57CA7DEA447B14D2DA475B57BBB50BADEB27AC3FEB14DA447B8D5C344> 1. 請 問 誰 提 出 積 體 電 路 (IC) 上 可 容 納 的 電 晶 體 數 目, 約 每 隔 24 個 月 (1975 年 更 改 為 18 個 月 ) 便 會 增 加 一 倍, 效 能 也 將 提 升 一 倍, 也 揭 示 了 資 訊 科 技 進 步 的 速 度? (A) 英 特 爾 (Intel) 公 司 創 始 人 戈 登. 摩 爾 (Gordon Moore) (B) 微 軟 (Microsoft)

More information

我是誰 張 文鈿 a.k.a. ihower 來 自台灣

我是誰 張 文鈿 a.k.a. ihower  來 自台灣 從 Classes 到 Objects: 那些 OOP 教我的事 http://ihower.tw 2013/10/26@ RubyConf China 我是誰 張 文鈿 a.k.a. ihower http://ihower.tw 來 自台灣 Ruby Taiwan http://ruby.tw RubyConf Taiwan 2013/4/25-26 OOP class-oriented object-oriented

More information

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM CHAPTER 6 SQL SQL SQL 6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM 3. 1986 10 ANSI SQL ANSI X3. 135-1986

More information

CC213

CC213 : (Ken-Yi Lee), E-mail: feis.tw@gmail.com 177 [P179] (1) - [P181] [P182] (2) - for [P183] (3) - switch [P184] [P187] [P189] [P194] 178 [ ]; : : int var; : int var[3]; var 2293620 var[0] var[1] 2293620

More information

ebook14-4

ebook14-4 4 TINY LL(1) First F o l l o w t o p - d o w n 3 3. 3 backtracking parser predictive parser recursive-descent parsing L L ( 1 ) LL(1) parsing L L ( 1 ) L L ( 1 ) 1 L 2 L 1 L L ( k ) k L L ( 1 ) F i r s

More information

Learning Java

Learning Java Java Introduction to Java Programming (Third Edition) Prentice-Hall,Inc. Y.Daniel Liang 2001 Java 2002.2 Java2 2001.10 Java2 Philip Heller & Simon Roberts 1999.4 Java2 2001.3 Java2 21 2002.4 Java UML 2002.10

More information

ebook50-15

ebook50-15 15 82 C / C + + Developer Studio M F C C C + + 83 C / C + + M F C D L L D L L 84 M F C MFC DLL M F C 85 MFC DLL 15.1 82 C/C++ C C + + D L L M F C M F C 84 Developer Studio S t u d i o 292 C _ c p l u s

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション Perl CGI 1 Perl CGI 2 Perl CGI 3 Perl CGI 4 1. 2. 1. #!/usr/local/bin/perl 2. print "Content-type: text/html n n"; 3. print " n"; 4. print " n"; 3. 4.

More information

untitled

untitled 1 Outline 流 ( ) 流 ( ) 流 ( ) 流 ( ) 流 ( ) 狀 流 ( ) 利 來 行流 if () 立 行 ; else 不 立 行 ; 例 sample2-a1 (1) 列 // 料 Console.Write(""); string name = Console.ReadLine(); Console.WriteLine(" " + name + "!!"); 例 sample2-a1

More information

<313031365FB14EA5D028B2C4A447A6B8B4ABC0C9295FB05DAC46B3A1A4BDB0C8ADFBB9EFA644A8C6B0BBAC64C576AF715FA4BAADB6313035783135306D6D5FB3E6A6E22E696E6464>

<313031365FB14EA5D028B2C4A447A6B8B4ABC0C9295FB05DAC46B3A1A4BDB0C8ADFBB9EFA644A8C6B0BBAC64C576AF715FA4BAADB6313035783135306D6D5FB3E6A6E22E696E6464> 興 革 策 勵 廉 能 政 風 永 續 共 創 健 全 財 政 拒 絕 利 慾 誘 惑, 視 貪 為 恥 成 就 才 德 兼 備, 以 廉 為 榮 進 退 權 衡 之 際, 誠 信 為 要 取 捨 拿 捏 分 寸, 清 廉 為 先 公 務 員 對 刑 事 偵 查 之 認 識 與 權 益 序 言 廉 政 是 古 今 中 外 任 何 政 治 社 會 及 經 濟 制 度 之 下, 人 民 所 殷 切 企

More information

1 LINUX IDE Emacs gcc gdb Emacs + gcc + gdb IDE Emacs IDE C Emacs Emacs IDE ICE Integrated Computing Environment Emacs Unix Linux Emacs Emacs Emacs Un

1 LINUX IDE Emacs gcc gdb Emacs + gcc + gdb IDE Emacs IDE C Emacs Emacs IDE ICE Integrated Computing Environment Emacs Unix Linux Emacs Emacs Emacs Un Linux C July 27, 2016 Contents 1 Linux IDE 1 2 GCC 3 2.1 hello.c hello.exe........................... 5 2.2............................... 9 2.2.1 -Wall................................ 9 2.2.2 -E..................................

More information

, 即 使 是 在 昏 暗 的 灯 光 下, 她 仍 然 可 以 那 么 耀 眼 我 没 有 地 方 去, 你 会 带 着 我 么 杜 晗 像 是 在 嘲 笑 一 般, 嘴 角 的 一 抹 冷 笑 有 着 不 适 合 这 个 年 龄 的 冷 酷 和 无 情, 看 着 江 华 的 眼 神 毫 无 温

, 即 使 是 在 昏 暗 的 灯 光 下, 她 仍 然 可 以 那 么 耀 眼 我 没 有 地 方 去, 你 会 带 着 我 么 杜 晗 像 是 在 嘲 笑 一 般, 嘴 角 的 一 抹 冷 笑 有 着 不 适 合 这 个 年 龄 的 冷 酷 和 无 情, 看 着 江 华 的 眼 神 毫 无 温 爱 情 飞 过 苍 凉 / 作 者 :18758265241 1 红 色 格 子 的 旅 行 箱, 在 湿 漉 漉 地 上 发 出 刺 啦 刺 啦 的 声 音, 那 么 刺 耳, 就 像 是 此 刻 杜 晗 的 里 一 样, 烦 躁 而 不 安 就 这 样 走 出 来 了,18 年 禁 锢 自 己 的 地 方 就 在 身 后, 杜 晗 手 指 关 节 泛 白, 紧 紧 地 拉 着 旅 行 箱, 走

More information

untitled

untitled 3 C++ 3.1 3.2 3.3 3.4 new delete 3.5 this 3.6 3.7 3.1 3.1 class struct union struct union C class C++ C++ 3.1 3.1 #include struct STRING { typedef char *CHARPTR; // CHARPTR s; // int strlen(

More information

OOP with Java 通知 Project 4: 4 月 18 日晚 9 点 关于抄袭 没有分数

OOP with Java 通知 Project 4: 4 月 18 日晚 9 点 关于抄袭 没有分数 OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 4: 4 月 18 日晚 9 点 关于抄袭 没有分数 复习 类的复用 组合 (composition): has-a 关系 class MyType { public int i; public double d; public char c; public void set(double

More information

四川省普通高等学校

四川省普通高等学校 四 川 省 普 通 高 等 学 校 计 算 机 应 用 知 识 和 能 力 等 级 考 试 考 试 大 纲 (2013 年 试 行 版 ) 四 川 省 教 育 厅 计 算 机 等 级 考 试 中 心 2013 年 1 月 目 录 一 级 考 试 大 纲 1 二 级 考 试 大 纲 6 程 序 设 计 公 共 基 础 知 识 6 BASIC 语 言 程 序 设 计 (Visual Basic) 9

More information

<4D6963726F736F667420576F7264202D20B0D7D0A1C1AEBDE0D7A8BFAF30333034C5C5B0E66761692E646F63>

<4D6963726F736F667420576F7264202D20B0D7D0A1C1AEBDE0D7A8BFAF30333034C5C5B0E66761692E646F63> 内 部 刊 物 朝 教 党 建 廉 洁 文 化 进 校 园 专 刊 总 第 72 期 中 共 朝 阳 区 委 教 工 委 办 公 室 2016 年 2 月 19 日 目 录 编 者 按 (2) 以 廉 洁 之 风 营 造 教 育 一 方 净 土 白 家 庄 小 学 党 总 支 书 记 陈 晓 辉 (3) 遵 规 守 纪 童 谣 白 家 庄 小 学 本 部 南 校 低 年 级 表 演 (11) 马 小

More information

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f

27 :OPC 45 [4] (Automation Interface Standard), (Costom Interface Standard), OPC 2,,, VB Delphi OPC, OPC C++, OPC OPC OPC, [1] 1 OPC 1.1 OPC OPC(OLE f 27 1 Vol.27 No.1 CEMENTED CARBIDE 2010 2 Feb.2010!"!!!!"!!!!"!" doi:10.3969/j.issn.1003-7292.2010.01.011 OPC 1 1 2 1 (1., 412008; 2., 518052), OPC, WinCC VB,,, OPC ; ;VB ;WinCC Application of OPC Technology

More information

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File

1 Project New Project 1 2 Windows 1 3 N C test Windows uv2 KEIL uvision2 1 2 New Project Ateml AT89C AT89C51 3 KEIL Demo C C File 51 C 51 51 C C C C C C * 2003-3-30 pnzwzw@163.com C C C C KEIL uvision2 MCS51 PLM C VC++ 51 KEIL51 KEIL51 KEIL51 KEIL 2K DEMO C KEIL KEIL51 P 1 1 1 1-1 - 1 Project New Project 1 2 Windows 1 3 N C test

More information

2/80 2

2/80 2 2/80 2 3/80 3 DSP2400 is a high performance Digital Signal Processor (DSP) designed and developed by author s laboratory. It is designed for multimedia and wireless application. To develop application

More information

(procedure-oriented)?? 2

(procedure-oriented)?? 2 1 (procedure-oriented)?? 2 (Objected-Oriented) (class)? (method)? 3 : ( 4 ???? 5 OO 1966 Kisten Nygaard Ole-Johan Dahl Simula Simula 爲 6 Smalltalk Alan Kay 1972 PARC Smalltalk Smalltalk 爲 Smalltalk 爲 Smalltalk

More information

chp6.ppt

chp6.ppt Java 软 件 设 计 基 础 6. 异 常 处 理 编 程 时 会 遇 到 如 下 三 种 错 误 : 语 法 错 误 (syntax error) 没 有 遵 循 语 言 的 规 则, 出 现 语 法 格 式 上 的 错 误, 可 被 编 译 器 发 现 并 易 于 纠 正 ; 逻 辑 错 误 (logic error) 即 我 们 常 说 的 bug, 意 指 编 写 的 代 码 在 执 行

More information

穨文件1

穨文件1 2-1 Access 2000 Visual Basic Access 2000 97 Office Visual Basic Visual Basic Visual Basic VBA Visual Basic Visual Basic 2-1-1 Visual Basic Access Visual Basic ( ) 2-1 2-1 Visual Basic 2-1 Microsoft Access

More information

基于矩阵分解和矩阵变换的多义词向量研究

基于矩阵分解和矩阵变换的多义词向量研究 hyshi@pku.edu.cn 2018 6 9 Content 1 PCA VS. RPCA 2 2 3 [1] star s1 star s2 star s3 algorithm s1 algorithm s2 stars, movie, song, MVP stars, award, eagle, two-time supergiant, constellation, aurigae hash,

More information

《大话设计模式》第一章

《大话设计模式》第一章 第 1 章 代 码 无 错 就 是 优? 简 单 工 厂 模 式 1.1 面 试 受 挫 小 菜 今 年 计 算 机 专 业 大 四 了, 学 了 不 少 软 件 开 发 方 面 的 东 西, 也 学 着 编 了 些 小 程 序, 踌 躇 满 志, 一 心 要 找 一 个 好 单 位 当 投 递 了 无 数 份 简 历 后, 终 于 收 到 了 一 个 单 位 的 面 试 通 知, 小 菜 欣 喜

More information

概述

概述 OPC Version 1.6 build 0910 KOSRDK Knight OPC Server Rapid Development Toolkits Knight Workgroup, eehoo Technology 2002-9 OPC 1...4 2 API...5 2.1...5 2.2...5 2.2.1 KOS_Init...5 2.2.2 KOS_InitB...5 2.2.3

More information

Chapter 9: Objects and Classes

Chapter 9: Objects and Classes Java application Java main applet Web applet Runnable Thread CPU Thread 1 Thread 2 Thread 3 CUP Thread 1 Thread 2 Thread 3 ,,. (new) Thread (runnable) start( ) CPU (running) run ( ) blocked CPU sleep(

More information

Strings

Strings Inheritance Cheng-Chin Chiang Relationships among Classes A 類 別 使 用 B 類 別 學 生 使 用 手 機 傳 遞 訊 息 公 司 使 用 金 庫 儲 存 重 要 文 件 人 類 使 用 交 通 工 具 旅 行 A 類 別 中 有 B 類 別 汽 車 有 輪 子 三 角 形 有 三 個 頂 點 電 腦 內 有 中 央 處 理 單 元 A

More information

Microsoft PowerPoint - RT0950_EliminatingRubyGILthroughHTM_Slides_ja.ppt

Microsoft PowerPoint - RT0950_EliminatingRubyGILthroughHTM_Slides_ja.ppt Ruby, Jose G. Castanos IBM Research Watson Research Center Ruby Python JIT Rubinius ytljit PyPy Fiorano HPC Ruby 1 2 (HTM) TM TM Sun Microsystems Blue Gene/Q 2012 Rock Processor Intel zec12 2012 Transactional

More information

C

C C 2017 3 14 1. 2. 3. 4. 2/95 C 1. 3/95 C I 1 // talkback.c: 2 #include 3 #include 4 #define DENSITY 62.4 5 int main(void) 6 { 7 float weight, volume; 8 int size; 9 unsigned long letters;

More information

javaexample-02.pdf

javaexample-02.pdf n e w. s t a t i c s t a t i c 3 1 3 2 p u b l i c p r i v a t e p r o t e c t e d j a v a. l a n g. O b j e c t O b j e c t Rect R e c t x 1 y 1 x 2 y 2 R e c t t o S t r i n g ( ) j a v a. l a n g. O

More information

多層次傳銷與獎金系統

多層次傳銷與獎金系統 醒 吾 技 術 學 院 資 訊 管 理 系 ( 五 專 部 ) 九 十 六 學 年 度 畢 業 專 題 多 層 次 傳 銷 與 獎 金 系 統 組 員 : 921506122 游 濬 瑋 921506126 陳 彥 宇 921506139 林 龍 華 921506144 陳 昶 志 921506149 楊 璧 如 指 導 老 師 : 汪 淵 老 師 中 華 民 國 九 十 七 年 一 月 十 一 醒

More information

read.pdf

read.pdf 16 17 20 21 200gNT$ 340 26 27 28 29 M Hello Kitty M P106 30 31 tupera tupera tupera tupera tupera tupera WORK SHOP Kokuyo S&T http://www.tupera-tupera.com/ 34 35 36 37 38 39 20cm 57cm8cm 2 7cm 8 4 40 41

More information

0SQL SQL SQL SQL SQL 3 SQL DBMS Oracle DBMS DBMS DBMS DBMS RDBMS R DBMS 2 DBMS RDBMS R SQL SQL SQL SQL SELECT au_fname,au_ lname FROM authors ORDER BY

0SQL SQL SQL SQL SQL 3 SQL DBMS Oracle DBMS DBMS DBMS DBMS RDBMS R DBMS 2 DBMS RDBMS R SQL SQL SQL SQL SELECT au_fname,au_ lname FROM authors ORDER BY 0 SQL SQL SELECT DISTINCT city, state FROM customers; SQL SQL DBMS SQL DBMS SQL 0-1 SQL SQL 0SQL SQL SQL SQL SQL 3 SQL DBMS Oracle DBMS DBMS DBMS DBMS RDBMS R DBMS 2 DBMS RDBMS R SQL SQL SQL SQL SELECT

More information