貧窮不能等,因為時間久了,你就會貧窮習慣了;
學習不能等,因為努力晚了,人老就無能為力了;
夢想不能等,因為懂得少了,就沒本事夢想成真了;
健康不能等,因為身體垮了,人生的一切就都沒了。
你不能決定生命的長度,但可以控制它的寬度;
你不能左右天氣,但可以改變心情;
你不能改變容顏,但可以展現笑容;
你不能控制他人,但可以掌握自己;
你不能預知明天,但可以利用今天;
你不能樣樣勝利,但可以事事盡力。
2013年9月13日 星期五
2013年9月12日 星期四
【職訓局-手機程式開發班】2013 9/11 java
CLASS ex1:
class aa{
public int x, y;
public bb b;
aa(int x, int y){
this.x = x;
this.y = y;
b = new bb(this.x, this.y);
}
public String area(){
return "x:" + this.x + ",y:" + this.y + ",面積為:" + b.area();
}
public String perimeter(){
return "x:" + this.x + ",y:" + this.y + ",邊長為:" + b.perimeter();
}
}
class bb{
public int x, y;
public cc c;
bb(int x, int y){
this.x = x;
this.y = y;
c = new cc(this.x, this.y);
}
public int area(){
return this.x * this.y;
}
public int perimeter(){
return c.perimeter();
}
}
class cc{
public int x, y;
cc(int x, int y){
this.x = x;
this.y = y;
}
public int perimeter(){
return 2 * (this.x + this.y);
}
}
public class test01 {
public static void main(String[] args) {
aa a = new aa(10,20);
a.b.x = 100;
System.out.println(a.area());
a.b.c.x = 1000;
System.out.println(a.perimeter());
}
}
CLASS ex2:
package ch09;
class aa{
public int x, y;
public bb b;
aa(int x, int y){
this.x = x;
this.y = y;
b = new bb(this.x, this.y);
}
public String area(){
return "x:" + this.x + ",y:" + this.y + ",面積為:" + b.area();
}
public String perimeter(){
return "x:" + this.x + ",y:" + this.y + ",邊長為:" + b.perimeter();
}
}
class bb{
public int x, y;
public cc c;
bb(int x, int y){
this.x = x;
this.y = y;
c = new cc(this.x, this.y);
}
public int area(){
return this.x * this.y;
}
public int perimeter(){
return c.perimeter();
}
}
class cc{
public int x, y;
cc(int x, int y){
this.x = x;
this.y = y;
}
public int perimeter(){
return 2 * (this.x + this.y);
}
}
public class test01 {
public static void main(String[] args) {
aa a = new aa(10,20);
a.b.x = 100;
System.out.println(a.area());
a.b.c.x = 1000;
System.out.println(a.perimeter());
}
}
class aa{
public int x, y;
public bb b;
aa(int x, int y){
this.x = x;
this.y = y;
b = new bb(this.x, this.y);
}
public String area(){
return "x:" + this.x + ",y:" + this.y + ",面積為:" + b.area();
}
public String perimeter(){
return "x:" + this.x + ",y:" + this.y + ",邊長為:" + b.perimeter();
}
}
class bb{
public int x, y;
public cc c;
bb(int x, int y){
this.x = x;
this.y = y;
c = new cc(this.x, this.y);
}
public int area(){
return this.x * this.y;
}
public int perimeter(){
return c.perimeter();
}
}
class cc{
public int x, y;
cc(int x, int y){
this.x = x;
this.y = y;
}
public int perimeter(){
return 2 * (this.x + this.y);
}
}
public class test01 {
public static void main(String[] args) {
aa a = new aa(10,20);
a.b.x = 100;
System.out.println(a.area());
a.b.c.x = 1000;
System.out.println(a.perimeter());
}
}
CLASS ex2:
package ch09;
class aa{
public int x, y;
public bb b;
aa(int x, int y){
this.x = x;
this.y = y;
b = new bb(this.x, this.y);
}
public String area(){
return "x:" + this.x + ",y:" + this.y + ",面積為:" + b.area();
}
public String perimeter(){
return "x:" + this.x + ",y:" + this.y + ",邊長為:" + b.perimeter();
}
}
class bb{
public int x, y;
public cc c;
bb(int x, int y){
this.x = x;
this.y = y;
c = new cc(this.x, this.y);
}
public int area(){
return this.x * this.y;
}
public int perimeter(){
return c.perimeter();
}
}
class cc{
public int x, y;
cc(int x, int y){
this.x = x;
this.y = y;
}
public int perimeter(){
return 2 * (this.x + this.y);
}
}
public class test01 {
public static void main(String[] args) {
aa a = new aa(10,20);
a.b.x = 100;
System.out.println(a.area());
a.b.c.x = 1000;
System.out.println(a.perimeter());
}
}
2013年9月11日 星期三
【語言比較】1.class
JAVA
class:
class a01{
private int x;
int y;
public void setx(int x){
this.x = x;
}
public int getx(){
return this.x;
}
public int area(){
return this.x * this.y;
}
}
使用
a01 a = new a01();
a.setx(10);
a.y = 20;
system.out.print(a.area());
ObjectiveC
a01.h檔
@property int x,y;
- (void) setx:(int)x;
- (int) getx();
- (int) area();
a01.m檔
@synthesize x,y;
- (void) setx:(int)setX{
x = setX;
}
- (int) getx(){
return x;
}
- (int) area(){
return x*y;
}
使用
a01 *a = [[a01 alloc] init]
[a setx:10]
a.y = 20;
NSLog(@"%i",[a area]);
PHP
class:
class a01{
private $x;
public $y;
public function setx($x){
$this->x = $x;
}
public function getx(){
return $this->x;
}
public function area(){
return $this->x * $this->y;
}
}
使用
$a = new a01();
$a->setx(10);
$a->y = 20;
echo $a->area();
Javascript (網頁)
class:
function a01() {
this.x;
this.y;
this.setx = function(x) {
this.x = x;
}
this.getx = function(){
return this.x;
}
this.area = function(){
return this.x * this.y;
}
}
使用
var a = new a01();
a.setx(10);
a.y = 20;
document.write(a.area());
【mysql】不常用語法
1. is Null
SELECT * FROM user WHERE address is Null
2.is not Null
SELECT * FROM user WHERE address is not Null
3.not like
SELECT * FROM user WHERE address not like '_中%'
4.view 建立及移除暫存資料表
create view tmp as SELECT * FROM user WHERE address is Null
drop view tmp
5.distinct 重複的不計
SELECT count(distinct address) FROM user WHERE address is Null
SELECT * FROM user WHERE address is Null
2.is not Null
SELECT * FROM user WHERE address is not Null
3.not like
SELECT * FROM user WHERE address not like '_中%'
4.view 建立及移除暫存資料表
create view tmp as SELECT * FROM user WHERE address is Null
drop view tmp
5.distinct 重複的不計
SELECT count(distinct address) FROM user WHERE address is Null
2013年9月10日 星期二
2013年9月9日 星期一
2013年9月5日 星期四
【職訓局-手機程式開發班】2013 9/4 Java
1.參照
package test; class A{ int aa = 10; } class B{ void c(A a){ // 可以傳類別近來 a.aa = 3; } } public class class_text { public static void main(String[] args) { A a = new A(); B b = new B(); b.c(a); System.out.println(a.aa); // a.aa = 3 } }2.呼叫自己的function
package test; public class class_test2 { int i; public static void main(String[] args) { class_test2 c = new class_test2(); // 自己 c.i = 10; c.A(); } void A(){ System.out.println(i); } }
2013年9月3日 星期二
2013年9月2日 星期一
【職訓局-手機程式開發班】2013 8/28 Unity coding
訂閱:
文章 (Atom)