2008-05-29

Java modifier

source from: http://www.k8w.net/technology/java/200801/419.html
http://dev.21tx.com/2002/02/07/10057.html

Java语言定义了public、protected、private、abstract、static和final这6常用修饰词外
还定义了5 个不太常用的修饰词,下面是对这11个Java修饰词的介绍:



No.Modifier使用对象介绍
1public类、接口、成员无论它所处在的包定义在哪,该类(接口、成员)都是可访问的
2private成员成员只可以在定义它的类中被访问
3static类、方法、字段、初始化函数成名为static的内部类是一个顶级类,它和包含类的成员是不相关的。静态方法是类方法,是被指向到所属的类而不是类的实例。静态字段是类字段,无论该字段所在的类创建了多少实例,该字段只存在一个实例被指向到所属的类而不是类的实例。初始化函数是在装载类时执行的,而不是在创建实例时执行的。
4final类、方法、字段、变量被定义成final的类不允许出现子类,不能被覆盖(不应用于动态查询),字段值不允许被修改。
5abstract类、接口、方法类中包括没有实现的方法,不能被实例化。如果是一个abstract方法,则方法体为空,该方法的实现在子类中被定义,并且包含一个abstract方法的类必须是一个abstract类
6protected成员成员只能在定义它的包中被访问,如果在其他包中被访问,则实现这个方法的类必须是该成员所属类的子类。
7native成员与操作平台相关,定义时并不定义其方法,方法的实现被一个外部的库实现。
8strictfp类、方法strictfp修饰的类中所有的方法都隐藏了strictfp修饰词,方法执行的所有浮点计算遵守IEEE 754标准,所有取值包括中间的结果都必须表示为float或double类型,而不能利用由本地平台浮点格式或硬件提供的额外精度或表示范围。
9synchronized方法对于一个静态的方法,在执行之前jvm把它所在的类锁定;对于一个非静态类的方法,执行前把某个特定对象实例锁定。
10volatile字段因为异步线程可以访问字段,所以有些优化操作是一定不能作用在字段上的。volatile有时可以代替synchronized.
11transient字段字段不是对象持久状态的一部分,不应该把字段和对象一起串起。

meet with new friend, assertion from java island

damn...
kind of simple code, but today i just know...





Fig. 13.9 Checking with assert that a value is within range.
   1  // Fig. 13.9: AssertTest.java
2 // Demonstrates the assert statement 3 import java.util.Scanner; 4 5 public class AssertTest 6 {
7 public static void main( String args[] ) 8 { 9 Scanner input = new Scanner( System.in ); 10 11 System.out.print( "Enter a number between 0 and 10: " );
12 int number = input.nextInt(); 13
14 // assert that the absolute value is >= 0
15 assert ( number >= 0 && number <= 10 ) : "bad number: " + number;
16
17 System.out.printf( "You entered %d\n", number );
18 } // end main
19 } // end class AssertTest



Enter a number between 0 and 10: 5
You entered 5






Enter a number between 0 and 10: 50
Exception in thread "main" java.lang.AssertionError: bad number: 50
at AssertTest.main(AssertTest.java:15)


2008-05-06

mp3 edit

google found by: mp3 edit
URL: http://www.nch.com.au/wavepad/

WavePad Sound Editor
Professional Audio Editing Software

able to load mpg/audio files and trim, edit and convert to other formats.

2008-04-24

车零件和专有名词的介绍以及简称

Source from: http://zhidao.baidu.com/question/22900168.html?fr=qrl
found by: www.baidu.com
with words: 车 零件 介绍


一.外部的一些部件

1.发动器(引擎)罩盖 bonnet(US.E. hood)
2.行李箱 boot(US.E. trunk)
3.保险杠 bumper
4.门 door
5.排气管 exhaust pipe
6.头灯 headlight
7.毂盖 hubcap
8.转向灯 indicator light (US.E. turn signal)
9.牌照 number plate (US,E. license plate)
10.尾灯 rear light (US.E. taillight)
11.后窗 rear window
12.牌照号码 registration number
13.车顶 roof
14.车顶架 roof-rack
15.边灯 sidelight (US.E. parking light)
16.轮胎 tyre (US.E. tire)
17.挡风玻璃窗 windscreen (US.E. windshield)
18.刮水器(雨刷) windscreen wiper
19.翼子板 wing (US.E. fender)
20.后视镜 wing mirror (US.E. side mirror)
21.天线 antenna

二.内部装置

1.油门踏板 accelerator pedal (US.E.gas pedal)
2.刹车踏板 brake pedal
3.阻风门纽 choke
4.离合器踏板 clutch pedal
5.仪表板 dashboard/fascia
6.司机座 driver's seat
7.门把 door handle
8.变速杆 gear-lever (US.E. gearshift)
9.储物箱 glove compartment
10.手刹车 handbrake
11.头垫 head-rest
12.暖气设备 heater
13.喇叭 horn
14.点火开关 ignition switch
15.客座 passenger seat
16.后视镜 rear-view mirror
17.安全带 seat-belt
18.速度计 speedometer
19.方向盘 steeringwheel

三.发动机和底盘

1.空气过滤器 air filter
2.车轴 axle
3.蓄电池 battery
4.鼓式制动器 brake-drum
5.汽化器 carburettor (US.E. carburetor)
6.底盘 chassis
7.离合器 clutch
8.量油尺 dip-stick
9.手刹车 handbrake
10.差速器 differential gear
11.发电机 dynamo
12.排气歧管 exhaust manifold
13.风扇 fan
14.风扇皮带 fan belt
15.变速箱 gearbox
16.导线 leads
17.汽油箱 petrol tank (US.E. gas tank)
18.冷却器 radiator
19.避震器 shock absorber
20.消声器 silencer (US.E. muffler)
21.火化塞 sparking-plug (US.E. spark plug)
22.起动发动机 starter motor
23.悬挂装置 suspension
24.传动轴 transmission shaft (US.E. drive shaft)

"US.E."代表是美式英语
参考资料:http://hi.baidu.com/ferrari1

自己如何清洗汽车

source from: http://www.xche.com.cn/bbs2/1/?art=http://www.xche.com.cn/art/6579/65795.html
found by: www.google.com
with words: 挡风 玻璃 窗 车 如何 清洗

* 自己如何清洗汽车
本文相关车型:四川丰田
  


电动洗车虽然快速、省力,但不省钱,而且有一些死角无法洗到,表面清洁也不是十全十美。所以,有时候也不妨自己动手清洗汽车。

(1)先用清水清洗车身,方法是从车顶往下冲洗污物。

(2)用清水仔细冲洗前后车身及前后挡风玻璃上附着的污泥。

(3)用清水冲洗两侧玻璃门窗。

(4)用清水柱冲洗车轮挡泥板内侧及凹缘内处,并用手或布擦或挖凹缘内的积泥。

(5)用水柱冲洗减振器上的积泥。

(6)用清水冲洗车门板下的淤泥。

(7)用软毛刷子及清水刷洗前后保险杠上的污泥。

(8)用布或软毛刷子或海绵刷洗轮圈护盖上的污泥。

(9)用水柱彻底冲洗前挡泥板上的污泥。

(10)用水柱彻底冲洗后挡泥板、后保险杠与车身连接处接缝中泊污泥。

(11)用清水清洗后照镜与车窗及连接处的污泥。

(12)用水大力冲洗车身下底盘各处污泥和油秽。

(13)用水大力冲洗车轮污泥,并用刷子或螺丝刀清除轮胎纹沟中的小石子和其他脏物。

(14)用毛巾或布配合清水擦洗全车。

(15)用半干半湿毛巾按"车顶-前挡风玻璃-后车身-行李箱盖-发动机盖-前后保险杠-左右两侧及车窗"的顺序擦去残留污痕。

(16)用干毛巾按上述程序擦干全车。

如果有高压水枪,可先将车身全部喷射清洗一次,然后按"前后挡风玻璃及通风口-左右车门及挡风玻璃-车门板下部及门饰板和饰条-底盘各处及门槛间和缝隙和车轮顶部-前后保险杠及其与车身的接缝处-车轮及轮胎"的顺序进行冲洗,然后进行上述的(14)至(16)步即可。

2008-04-03

eclipse: steps for [New Java Project]/[Create project from existing source.]

eclipse: steps for [New Java Project]/[Create project from existing source.]





  1. Create new workplace.

  2. Configure(add) JRE 1.5 ([Window > Preferences]>[Java > Installed JREs > Add])


    1. browse jdk1.5.0_12 directory. -> click OK.

    2. select the JRE which just added. -> click OK.

    3. (need to change Compiler compliance level@Window.Preference.Java.Compiler)

  3. Configure Tomcat version:


    1. Select Tomcat version 5.x

    2. browse Tomcat Home -> click OK.

    3. -> click Apply.



  1. Create New Project (pure new/from existing source)


    1. File > New > Project

    2. Java > Java Project.-> Click Next.

    3. -> Type Project Name

    4. Choose Contents -> Click Create Project from existing source.

    5. Browse source directory(location path) -> Click OK.

    6. Optional to check Add project to working set. -> Click Next

  2. go to Libraries tab


    1. Check if Tomcat doesn't in the list.


      1. (create user libraries for tomcat - jasper-runtime.jar, jsp-api.jar, servlet-api.jar)

  3. database xml Configuration


    1. edit config.xml (path, port, id, password)

    2. edit hibernate.cfg.xml (path, port, id, password)


done.

2008-03-28

twitter 罢工。。。

gmail 的 twitter 罢工???

2008-03-26

Korea Star King

Star King #8 - Five Year Old Blind Genius Pianist (en)
http://www.youtube.com/watch?v=ntReE2n15bo

heechul crying cut from star king super junior t
http://www.youtube.com/watch?v=JCOFHC075iI&feature=related

(Blind) 5 years old girl on Piano - Variety Show (Korea)
http://www.youtube.com/watch?v=3SFppCXNOyk&feature=related

Star King #44 - Boy dancing Tell Me, Girls Generation (en)
http://www.youtube.com/watch?v=pw0zRb3bgMQ&feature=related

Star King #38 - Charice Pempengco Wows The World (en)
http://www.youtube.com/watch?v=WZccz5cy3ks&feature=related

___________________________________________________________________________
extra:
Bianca Ryan vs. Charice Pemepngco! prove it! Who is better
http://www.youtube.com/watch?v=7mWKTbcbRmY&feature=related

2008-03-13

tech-recipes

http://www.tech-recipes.com/

found by phrase: xp vista theme

2008-03-12

斟酌

斟酌
zhen 1 zhuo 2

斟酌: [ zhēn zhuó ]

1. wrestle
2. went behind

其它相关解释:



例句与用法:
1. 此事已成定局,我们不能再去斟酌它了。
It is settled and therefore we cannot go behind it.

2. 我得先斟酌一下, 才能决定是否接受这样的提议.
I'd hesitate before accepting such an offer.

2008-03-02

华联聚会

chu san our secondary school 10ann gathering wil held in hua lian school hall


only for 1999 grad

to be continue

2008-02-14

熟透的香蕉會產生攻擊異常細胞的物質 TNF

Subject: 熟透的香蕉會產生攻擊異常細胞的物質 TNF

我今天看連網路看台灣新聞,有一個小女孩3歲時得白血球癌症,她媽媽施行每日五蔬果,疾病遠離我。
现在这个小女孩已上学并且白血球的癌症已痊愈了。

熟透的香蕉會產生攻擊異常細胞的物質 TNF
您可能會發現不久的將來 ........香蕉會缺貨 !!
香蕉愈成熟即表皮上黑斑愈多, 它的免疫活性也就愈高。
日本人愛吃香蕉不是沒原因的, 大、小朋友們都喜歡吃香蕉 ~真方便,每日五蔬果,疾病遠離我喔 ........
根據日本科學家的研究發現,香蕉中具有抗癌作用的物質 TNF。
而且,香蕉愈成熟其抗癌效果愈高。
日本東京大學教授山崎正利利用動物試驗,比較了香蕉、葡萄、蘋果、西瓜、菠蘿、梨子、柿子等多種水果的免疫活性,結果證實其中以香蕉的效果最好,能夠增加白血球,改善免疫系統的功能,還會產生攻擊異常細胞的物質 TNF。
山崎 教授的試驗也發現, 香蕉愈成熟即表皮上黑斑愈多,它的免疫活性也就愈高。
所以從現在開始要吃熟一點的香蕉唷! 香蕉不會使白血球盲目增長只有在數量少的時候才會大幅度增加。 因此,專家們研究認為,香蕉具有的免疫激活作用比較溫和 , 在人體狀態健康時並不會使免疫力異常升高. 但對病人、老人和抵抗力差的體弱者則很有效果。
因此,在日常生活中,我們不妨每天吃1∼2根香蕉,透過提升身體的抗病能力來 預防感染,特別是預防感冒和流感等病毒的侵襲。
山崎 教授指出,在黃色表皮上出現黑色斑點的香蕉,其增加白血球的能力......... 要比表皮發青綠的香蕉強8 倍。

2008-02-10

轻轻的 say hello...

Memo... - まっ白
http://anitalau.blog.163.com/

Date found: 2008-02-10 9:12pm
Artist: Rosie Thomas
Song: Say Hello.mp3



Date found: 2008-03-31 11:10am
Artist: JoJo
Song: Like That.wma

2008-02-04

how to learn wisdom.

By Three Methods...
We may learn wisdom:
1st: by reflection, which is noblest;
2nd: by imitation, which is easiest;
3rd: by experience, which is the bitterest.
Confucius.

2008-02-03

asp.net query builder parameter

Found by: asp.net query builder parameter
IDE: Visual Studio 2005
Found URL: http://forums.asp.net/t/1199996.aspx


Quetion/Problem:
Hi there, I have an urgent problem Some background: I'm using vs2005, MySql and Vb.net. Now, I watched the video from asp.net on hilo_data_final which shows you how to create a typed dataset, and using the wizard create adapters, datatables together with the query builder and then filter a given select statement by using an @something parameter. Now, when using MS Sql, it works and after finishing the query builder, the parameter is placed inside the table adapter, but when using MySql, the moment I change the query syntax, the parameter is the "recognized" by vs2005. Hope someone can help...



Solved by:
Hi,
in your query builder, change the @ to ? (question mark).
hope it helps..

Cheers,
CLIPER
There’s nothing constant in this world, except change.
------------------------------------------------
Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own commonsense.
---Buddha (563BC-483BC)

2008-01-28

HEALTH Important notice‏.

by: sy NEOH @hotmail.com
Subject: FW: HEALTH Important notice


少喝奶茶;
Reduce volume of tea;

不吃 刚烤的面包;
Do not eat bread which JUST toasted;

远离充 手机电源 ;
Get a distance from charger;

白天多喝水,晚上少喝;
Drink more water at the morning, less in the night;

一天 不喝多于两杯咖啡;
Do not drink coffee twice a day;

少吃油多的食物;
Reduce volume of oily food;

最佳睡眠为晚上十点至凌晨六点;
Best sleeping time is from 10 at night to 6 at the morning;

晚上五点后少吃大餐;
Do not have HUGE meals after 5pm;

每天喝酒不多过一杯;
Do not take alcohol more than a cup daily;

不用 冷水服胶囊;
Do not take capsule with cool water;

睡前半小时服药忌立刻躺下;
Do not lie down immediately after taking medicine before sleeping;

睡眠不足八小时人会变笨;
8 hours lack of sleep will make a person stupid;

午睡习惯的人不易老;
People who get used of napping will not get old easily;

若不能晨跑,傍晚5点至8 点的时间是散步的好时间;
If you can't get on early morning runs, 5-8 at the afternoon is a great time for jogging;

电池剩一格时不要 接电话 ,剩一格时辐射是平时的一千倍 ;
When battery left last grid, do not answer the phone. The radiation is 1000 times;

还要记得用左耳接话 ,右耳会直接伤害到大脑;
Answer the phone by left ear. It'll spoil your brain directly by using right ear;

少用耳机。用一小时后就好休息你的耳朵;
Do not use earphone for long time. Rest your ear awhile after 1 hour.


请转发 每一 你珍惜的朋友.
Forward this to friends who you care.

2008-01-22

load data into CrystalReport by generated TableAdapter.Fill() DataTable

Dim c As DataTable = Me.dsNorthwind.Customers

Me.taCustomers.Fill(c)
Me.crtAllCustomer.SetDataSource(c)
Me.crvCustomers.ReportSource = Me.crtAllCustomer
Me.crvCustomers.DisplayGroupTree = False

Me.crvCustomers.Zoom(70)

Google Referrals