source from: http://www.exampledepot.com/egs/java.lang/HasSubstr.html
found by: java string contains string
e72. Determining If a String Contains a SubstringSee also e423 Quintessential Regular Expression Search Program. String string = "Madam, I am Adam";
// Starts with
boolean b = string.startsWith("Mad"); // true
// Ends with
b = string.endsWith("dam"); // true
// Anywhere
b = string.indexOf("I am") > 0; // true
// To ignore case, regular expressions must be used
// Starts with
b = string.matches("(?i)mad.*");
// Ends with
b = string.matches("(?i).*adam");
// Anywhere
b = string.matches("(?i).*i am.*");
2008-11-05
2008-10-30
2008-10-08
problem with html tag properties
with this code
<div style="width: 47px; float: left;">
some of onscreen items couldn't display
when i change to
<div style="width: 47%; float: left;">
things looking fine.
let me a msg if u know what's wrong with this.
thank you.
used codes reference: http://www.htmlcodetutorial.com/characterentities_famsupp_69.html
<div style="width: 47px; float: left;">
some of onscreen items couldn't display
when i change to
<div style="width: 47%; float: left;">
things looking fine.
let me a msg if u know what's wrong with this.
thank you.
used codes reference: http://www.htmlcodetutorial.com/characterentities_famsupp_69.html
2008-07-26
me at hometown...
has been a long time x update anything over here.
recently nothing i done, daily task not much to say...
i'm using nokia n70... so, now i can read novel by using my hp.
read many novels that i download from internet, many of those novels is around hundred thousand words... that's really cool...
words to bring the story... or stories...
sometimes i feel that i was there, in the story line...
and i can see things in those novels that in words, but i saw!!!
excellent feeling...
recently nothing i done, daily task not much to say...
i'm using nokia n70... so, now i can read novel by using my hp.
read many novels that i download from internet, many of those novels is around hundred thousand words... that's really cool...
words to bring the story... or stories...
sometimes i feel that i was there, in the story line...
and i can see things in those novels that in words, but i saw!!!
excellent feeling...
2008-06-12
为什么要知道栈与堆的机制?
问:到底为什么要知道栈(stack)与堆(heap)的机制?
这真的与我有关系吗?
答:
这真的与我有关系吗?
答:
- 如果想要了解变量的有效范围(sope)、对象的建立、内存管理、线程(thread) 和异常处理,则认识栈与堆是很重要的。
- 后面的章节会讨论到有关线程与异常处理的部分,其余的都会在这一章讨论。
- 你无需知道它们是如何实现的,只是能够理解这几页的内容就足够了。
2008-06-03
2008-05-29
Java 是做什么?
語言特性
Java之所以被開發,是要達到以下五個目的:
Java之所以被開發,是要達到以下五個目的:
- 應當使用物件導向程序設計方法學
- 應當允許同一程序在不同的電腦平臺執行
- 應當包括內建的對電腦網路的支持
- 應當被設計成安全地執行遠端代碼
- 應當易於使用,並借鑒以前那些物件導向語言(如C++)的長處。
Java技術主要分成幾個部分:Java語言、運行環境JVM、類庫。一般情況下說Java時並不區分指的是哪個部分。
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修饰词的介绍:
http://dev.21tx.com/2002/02/07/10057.html
Java语言定义了public、protected、private、abstract、static和final这6常用修饰词外
还定义了5 个不太常用的修饰词,下面是对这11个Java修饰词的介绍:
| No. | Modifier | 使用对象 | 介绍 |
|---|---|---|---|
| 1 | public | 类、接口、成员 | 无论它所处在的包定义在哪,该类(接口、成员)都是可访问的 |
| 2 | private | 成员 | 成员只可以在定义它的类中被访问 |
| 3 | static | 类、方法、字段、初始化函数 | 成名为static的内部类是一个顶级类,它和包含类的成员是不相关的。静态方法是类方法,是被指向到所属的类而不是类的实例。静态字段是类字段,无论该字段所在的类创建了多少实例,该字段只存在一个实例被指向到所属的类而不是类的实例。初始化函数是在装载类时执行的,而不是在创建实例时执行的。 |
| 4 | final | 类、方法、字段、变量 | 被定义成final的类不允许出现子类,不能被覆盖(不应用于动态查询),字段值不允许被修改。 |
| 5 | abstract | 类、接口、方法 | 类中包括没有实现的方法,不能被实例化。如果是一个abstract方法,则方法体为空,该方法的实现在子类中被定义,并且包含一个abstract方法的类必须是一个abstract类 |
| 6 | protected | 成员 | 成员只能在定义它的包中被访问,如果在其他包中被访问,则实现这个方法的类必须是该成员所属类的子类。 |
| 7 | native | 成员 | 与操作平台相关,定义时并不定义其方法,方法的实现被一个外部的库实现。 |
| 8 | strictfp | 类、方法 | strictfp修饰的类中所有的方法都隐藏了strictfp修饰词,方法执行的所有浮点计算遵守IEEE 754标准,所有取值包括中间的结果都必须表示为float或double类型,而不能利用由本地平台浮点格式或硬件提供的额外精度或表示范围。 |
| 9 | synchronized | 方法 | 对于一个静态的方法,在执行之前jvm把它所在的类锁定;对于一个非静态类的方法,执行前把某个特定对象实例锁定。 |
| 10 | volatile | 字段 | 因为异步线程可以访问字段,所以有些优化操作是一定不能作用在字段上的。volatile有时可以代替synchronized. |
| 11 | transient | 字段 | 字段不是对象持久状态的一部分,不应该把字段和对象一起串起。 |
meet with new friend, assertion from java island
damn...
kind of simple code, but today i just know...
kind of simple code, but today i just know...
| ||
1 // Fig. 13.9: AssertTest.java
|
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.
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
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)步即可。
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.]
- Create new workplace.
- Configure(add) JRE 1.5 ([Window > Preferences]>[Java > Installed JREs > Add])
- browse jdk1.5.0_12 directory. -> click OK.
- select the JRE which just added. -> click OK.
- (need to change Compiler compliance level@Window.Preference.Java.Compiler)
- Configure Tomcat version:
- Select Tomcat version 5.x
- browse Tomcat Home -> click OK.
- -> click Apply.
- Create New Project (pure new/from existing source)
- File > New > Project
- Java > Java Project.-> Click Next.
- -> Type Project Name
- Choose Contents -> Click Create Project from existing source.
- Browse source directory(location path) -> Click OK.
- Optional to check Add project to working set. -> Click Next
- go to Libraries tab
- Check if Tomcat doesn't in the list.
- (create user libraries for tomcat - jasper-runtime.jar, jsp-api.jar, servlet-api.jar)
- database xml Configuration
- edit config.xml (path, port, id, password)
- edit hibernate.cfg.xml (path, port, id, password)
done.
2008-03-28
2008-03-27
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
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-15
Subscribe to:
Posts (Atom)
