2011-02-21

43个妈妈可能没教到的人生细节

source:

http://www.facebook.com/note.php?note_id=183554461682207&id=139571682739468

1.去别人家里,不要坐在人家的床上 。

2.在酒桌上与别人碰杯,自己的杯子一定要低于对方的,特别是对方是长辈或领导 。

3.晴带雨伞,饱带干粮---未雨绸缪总是好的。

4. 如果问别人话,别人不回答你,不要死着脸皮不停的问。

5. 吃饭的时候尽量不要发出声音。

6. 捡东西或者穿鞋时候要蹲下去,不要弯腰撅屁股。

7. 别人批评你的时候,即使他是错的,也不要先辨驳,等大家都平静下来再解释 。

8.做事情要适可而止,无论是狂吃喜欢的食物还是闹脾气 。

9.到朋友家吃完饭,要主动帮忙洗碗清理桌子-----主人做饭已经很辛苦了,不能事后还让主人清理。

10.生活中会遇见各式各样的人,你不可能与每个人都合拍,但是有一点是四海皆准的:你如何对待别人,别人也会如何对待你 。

11.待客不得不大,持家不得不小 。

12.把拳头收回来是为了更有力的还击

13.人活在这个世上,首先要学会一个“忍”字。

14.任何时候对任何人不要轻易告诉对方你的秘密 。

15.钱不是靠攒的,会花才会赚 。

16.学无止境,不仅仅是学书本知识,更要学会怎么待人处事,社会远比你想象的要复杂 。

17.不要跟同事议论上司或其他同事的是非,你的无心之言很可能成为别人打击你的证据。

18.做事情,做好了是你的本分,做的不好就是你失职 。

19.只有错买,没有错卖。不要只顾着贪小便宜。

20.有时候孤单是正常的,不要害怕,要自己调剂

21.有真正的朋友,但不知你有没有福气遇到。不管有没有遇到,都不要否认它。不要算计别人,尤其不要算计自己喜欢的人。对自己喜欢的人,不要使用手段去得到 。

22.最勇敢的事情是认清了生活的真相之后依旧热爱生活。不要害怕欺骗,但要知道世界上存在欺骗 。

23.借钱的时候,心里要有个底,就是要想着这个钱是回不来的。所以借出去的钱永远要在自己能承受的损失范围之内。可以承受的数字以内,即使回不来,也是心里早准备好的。自己不能承受损失的数目,就不能借。

24.最好的朋友之间,除非他穷的吃不了饭了,否则最好不要有经济往来。许多可贵的友谊都败坏在钱上。

25.君子可寓意于物,但不可留意于物 。

26.出门在外能忍则忍,退一步海阔天空。

27.擦桌子的时候要往自己的方向抹 。

28.打电话接电话第一句话一定要是 喂,您好;挂电话的时候等别人先挂。

29.一次不忠 百次不容。

30.不随地吐痰扔东西,如果没有垃圾箱,就拎回家扔垃圾筒里。

31.多看书对心灵有益,你会看到一个更广阔的世界 。

32.是你去适应社会,不是社会来适应你。

33.不要让别人知道自己的真实想法,要笑在人前笑,要哭一个人躲起来哭。

34.走路手不要插在口袋里。

35.简单的事情复杂做,复杂的事情简单做 。

36.机会只留给有准备的人,天上不会掉馅饼。

37.不管什么条件下,仔细刷牙,特别是晚上 。

38.早上一定要吃早餐,没有早餐喝杯水也一定要 。

39.少说别人是非,把自己管牢 。

40.你是无价之宝 。

41.女生,和男孩子出去要自己买单 。

42.要对自己的行为负责,不要怨天由人,在做之前要想想应不应该,出了事要学会自己解决 。

43.要想人前显贵,必先人后受罪

2010-12-06

oracle increase processes value

error found: ORA-12516: TNS:listener could not find available handler with matching protocol stack


We use Oracle Database 10g Express Edition Release 10.2.0.1.0 for our RoR development and were hitting the TNS:listener error all the time. This made concurrent development a real pain and we couldn't leave staging servers and sqldeveloper sessions up.

Google searches turned up really scant information - mainly advices to increase the PROECESSES limit. I am not a DBA, so wasn't sure what needed to be done.
In any case, the following solution worked like a charm and I hope others who have this issue find this post useful.

source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.csh
setenv ORACLE_SID XE

And then execute the following steps to increase the number processes and sessions:
1) Connect to the database using the sys or system user:
sqlplus SYSTEM/@///xe
2) To confirm the PROCESSES and SESSIONS values, run the following script:
sql> col name format A30
Sql> col value format A30
sql> select name, value from v$parameter where name in ('processes','sessions');
3) SQL> alter system set processes=300 scope=spfile;
4) SQL> alter system set sessions=300 scope=spfile;
5) Bounce(restart) the database to reflect the changes
6) To confirm new values run the script (2).






Change Static parameters in SPFILE:
Changing static parameters requires the SPFILE option for the SCOPE clause with ALTER SYSTEM Statement and changes applies to SPFILE only. The changes cannot be applied to active Instance and the database needs to be restarted to take effect the modified parameters.

You can identify the static parameters using below query
SQL> select name, value, issys_modifiable from v$parameter
where name='processes';
NAME VALUE ISSYS_MODIFIABLE
------------------- -------------- ---------------------------
Processes 150 FALSE

All parameter that have the column ISSYS_MODIFIABLE value FALSE in the V$PARAMETER view are STATIC parameters and remaining are DYNAMIC parameters in Oracle database.

The ALTER SYSTEM command with SCOPE=SPFILE the will not update the value in the V$PARAMETER view but it will show the new value in the V$SPPARAMETER view as Oracle SPFILE parameter is updated.

For ex:-
SQL> alter system set processes=200 scope=both;
alter system set processes=200 scope=both
*
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified

Above statement failed because “processes” is Static parameter and can be used with SCOPE=SPFILE only.

SQL> alter system set processes=200 scope=spfile;
System altered.

You can view the new value in V$SPPARAMETER view as the SPFILE is updated.

SQL> select name, value, isspecified from v$spparameter
where name ='processes';
NAME VALUE ISSYS_MODIFIABLE
------------------- -------------- ---------------------------
Processes 150 TRUE

Changing Static parameters in PFILE:
Edit the “$ORACLE_HOME/dbs/init.ora” file with new value and bounce the database to take effect the modified parameters.

Identify weather using PFILE or SPFILE:
To check SPFILE or PFILE used by Database or instance, run below commands.

You can see the Oracle SPFILE location.

SQL > show parameter spfile;
NAME TYPE VALUE
------------------ ----------- -----------------------------------------
spfile string /oracle/v10201/dbs/spfileOradb.ora

SQL > select name, value from v$parameter where name = 'spfile';
NAME VALUE
------------ ------------------------------------------------------------
spfile /oracle/v10201/dbs/spfileOradb.ora

SQL> select count(1) from v$spparameter where isspecified = 'TRUE';

Returns a NON-ZERO value if SPFILE is in use.

Regards,
Satishbabu Gunukula
http://www.oracleracexpert.com/






Usefull Commands(window sqlplus):
  • show parameter spfile;

  • SQL> select name, value from v$parameter where name in ('processes','sessions', 'parallel_max_servers', 'db_file_multiblock_read_count', 'spfile' );

2010-01-18

linux, search & replace

command:
:1,%s/opt\/repository/opt\/billson\/repository/g

explain:
- :1 = go to line 1, eg, :5 = go to line 5
- %s = search
- opt\/repository = parameter 1
- opt\/billson\/repository = parameter 2
- g = global

2009-06-23

Synchronized在java的用法

2009-05-12 13:41
Java 对多线程的支持与同步机制深受大家的喜爱,似乎看起来使用了synchronized关键字就可以轻松地解决多线程共享数据同步问题。

到底如何?――还得对synchronized关键字的作用进行深入了解才可定论。 总的说来,synchronized关键字可以作为函数的修饰符,也可作为函数内的语句,也就是平时说的同步方法和同步语句块。

如果再细的分类,synchronized可作用于
  • instance变量、
  • object reference(对象引用)、
  • static函数 和
  • class literals(类名称字面常量)身上。
在进一步阐述之前,我们需要明确几点:
  1. 无论synchronized关键字加在方法上还是对象上,它取得的锁都是对象,而不是把一段代码或函数当作锁――而且同步方法很可能还会被其他线程的对象访问。
  2. 每个对象只有一个锁(lock)与之相关联。
  3. 实现同步是要很大的系统开销作为代价的,甚至可能造成死锁,所以尽量避免无谓的同步控制。 接着来讨论synchronized用到不同地方对代码产生的影响: 假设P1、P2是同一个类的不同对象,这个类中定义了以下几种情况的同步块或同步方法,P1、P2就都可以调用它们。
  • 把synchronized当作函数修饰符时,示例代码如下: Public synchronized void methodAAA() { //…. } 这也就是同步方法,那这时synchronized锁定的是哪个对象呢?它锁定的是调用这个同步方法对象。也就是说,当一个对象P1在不同的线程中执行这个同步方法时,它们之间会形成互斥,达到同步的效果。但是这个对象所属的Class所产生的另一对象P2却可以任意调用这个被加了synchronized关键字的方法。 上边的示例代码等同于如下代码: public void methodAAA() { synchronized (this) // (1) { //….. } } (1)处的this指的是什么呢?它指的就是调用这个方法的对象,如P1。可见同步方法实质是将synchronized作用于object reference。――那个拿到了P1对象锁的线程,才可以调用P1的同步方法,而对P2而言,P1这个锁与它毫不相干,程序也可能在这种情形下摆脱同步机制的控制,造成数据混乱:(
  • 同步块,示例代码如下: public void method3(SomeObject so) { synchronized(so) { //….. } } 这时,锁就是so这个对象,谁拿到这个锁谁就可以运行它所控制的那段代码。当有一个明确的对象作为锁时,就可以这样写程序,但当没有明确的对象作为锁,只是想让一段代码同步时,可以创建一个特殊的instance变量(它得是一个对象)来充当锁: class Foo implements Runnable { private byte[] lock = new byte[0]; // 特殊的instance变量 Public void methodA() { synchronized(lock) { //… } } //….. } 注:零长度的byte数组对象创建起来将比任何对象都经济――查看编译后的字节码:生成零长度的byte[]对象只需3条操作码,而Object lock = new Object()则需要7行操作码。 3.将synchronized作用于static 函数,示例代码如下: Class Foo { public synchronized static void methodAAA() // 同步的static 函数 { //…. } public void methodBBB() { synchronized(Foo.class) // class literal(类名称字面常量) } } 代码中的methodBBB()方法是把class literal作为锁的情况,它和同步的static函数产生的效果是一样的,取得的锁很特别,是当前调用这个方法的对象所属的类(Class,而不再是由这个Class产生的某个具体对象了)。 记得在《Effective Java》一书中看到过将 Foo.class和 P1.getClass()用于作同步锁还不一样,不能用P1.getClass()来达到锁这个Class的目的。P1指的是由Foo类产生的对象。 可以推断:如果一个类中定义了一个synchronized的static函数A,也定义了一个synchronized 的instance函数B,那么这个类的同一对象Obj在多线程中分别访问A和B两个方法时,不会构成同步,因为它们的锁都不一样。A方法的锁是Obj这个对象,而B的锁是Obj所属的那个Class。 小结如下: 搞清楚synchronized锁定的是哪个对象,就能帮助我们设计更安全的多线程程序。

还有一些技巧可以让我们对共享资源的同步访问更加安全:
  1. 定义private 的instance变量+它的 get方法,而不要定义public/protected的instance变量。如果将变量定义为public,对象在外界可以绕过同步方法的控制而直接取得它,并改动它。这也是JavaBean的标准实现方式之一。
  2. 如果instance变量是一个对象,如数组或ArrayList什么的,那上述方法仍然不安全,因为当外界对象通过get方法拿到这个instance对象的引用后,又将其指向另一个对象,那么这个private变量也就变了,岂不是很危险。 这个时候就需要将get方法也加上synchronized同步,并且,只返回这个private对象的clone()――这样,调用端得到的就是对象副本的引用了。

2009-06-19

P1 service after sales...

SMS received from 62003 on 2009 June 18, Thursday 10:59pm:

P1 is experiencing temporary service interruption that affects some of our subscribers. Affected users may experience limited to no service during this period. Our tech team is working to restore service to its full capacity. We will provide further updates as and when available. Thanks.

but the line was facing problem to get the connection since evening right 5/7 hours before i receive this sms... is this better than some service provider?

which only to tell u when u call to their answering machine...

彩色兵马俑

Pictures source from: http://jianghua9161.blog.sohu.com/114969895.html





:
转图(快载):http://2su.de/Er (picasaweb.google.com)
原图(慢载):http://2su.de/VfM (Chinese Version)

兵马俑中英文介绍 (Chinese / English version)

24年等待彩色兵马俑方阵出土 (Chinese Version)

秦始皇兵马俑时隔24年今日第三次发掘(图) (Chinese Version)

江蘇出土彩色漢兵馬俑 (Chinese Version)

出土彩色木俑比兵马俑早500年 (Chinese Version)

2009-05-15

Struts - multiple message-resources

source from: http://viralpatel.net/blogs/2008/11/multiple-message-resource-property-file-in-struts.html

Multiple message resource property file in Struts



Make an entry of message resource file name in struts-config.xml file.





Once this is done, the message resource file can be accessed by using the key (in this case we have myResource & myOtherResource). The key should be used in tag in jsp to display perticular message from the resource property file. bundle=”" attribute of is used to identify the perticular property file.


key="somekey.in.myresource" />
key="somekey.in.myotherresource"/>

2009-05-05

TTplayer 5.5 beta, i love it

what i love TTplayer 5.5 beta:
  • application in utf-8 encoding.
  • 重命名文件 (个别、批件式) (single or batch file rename)
  • 2b continue...

2009-05-04

Web Application - MVC Layers

source found: http://www.javapassion.com/strutscodecamp/

Three Logical Layers in a Web Application: Model, View, Control
? Model (Business process layer)
– Models the data and behavior behind the business process
– Responsible for actually doing
? Performing DB queries
? Calculating the business process
? Processing orders
– Encapsulate of data and behavior which are independent of presentation
? View (Presentation layer)
– Display information according to client types
– Display result of business logic (Model)
– Not concerned with how the information was obtained, or from where (since that is the responsibility of Model)
? Controller (Control layer)
– Serves as the logical connection between the user's interaction and the business services on the back
– Responsible for making decisions among multiple presentations
? e.g. User's language, locale or access level dictates a different presentation.
– A request enters the application through the control layer, it will decide how the request should be handled and what information should be returned

Web Applications
  • It is often advantageous to treat each layer as an independent portion of your application
  • Do not confuse logical separation of responsibilities with actual separation of components
  • Some or of the layers can be combined into single components to reduce application complexity

what's the different of these???

  • logical separation of responsibilities
  • actual separation of components

2009-04-22

GPS Mt KK path tracking

Found this: 神山(Mt. Kinabalu, Timpohon Gate - Laban Rata)
http://maps.google.com/maps/ms?msa=0&msid=116154094173339195464.0004652566f7f86852958&ct=onebox&cd=2&cad=onebox,cid:16864761765956365071


maps.google.com searched by:
  1. Laban Rata
  2. "Mt. Kinabalu, Timpohon Gate - Laban Rata)"















found this: 沙巴的神山Mt Kinabalu攻略| 海外游
googled by: "神山(Mt. Kinabalu, Timpohon Gate - Laban Rata)"



source pic from: http://www.haiwaiyou.com/haiwaiyoublog/?p=1087

more detail have to visit: http://www.haiwaiyou.com/haiwaiyoublog/?p=1087

2009-04-20

一个玩笑

当你有个孩子
你不好好教他
你就害你全家
当你有个女儿
你不好好教她
你就害别人全家
所以你跟谁有仇
很简单嘛。。。
你就宠坏你的女儿
嫁给他儿子
他全家都完了
大仇就报了。













极端的人,可以把以上的话题放大,把一个玩笑变成严肃的言论。。。
相反的人,可以领悟到话里的话,从中理解不同的内容。。。

2009-04-05

i'm using eclipse wtp

Build Type:Integration
Build Name:3.1
Stream:R3.1
Build Date:Thu, 2 Apr 2009 -- 04:46 (UTC)


  1. download parts...

    • No.ComponentsFile Name
      1.Eclipse Platform (Platform, JDT)eclipse-SDK-3.5M6-win32.zip
      2Web App Developerswtp-I-3.1-20090402044606.zip
      3EMF v2.5 Runtime Minimum executable codeemf-runtime-2.5.0M6.zip
      4EMF XSD v2.5 Runtime Minimum executable codexsd-runtime-2.5.0M6.zip
      5Graphical Editing Framework (GEF)GEF-SDK-3.5.0M6.zip
      6Data Tools Platform (DTP) (required only for EJB or JPT development)dtp-sdk-1.7.0M6-200903160500.zip

  2. unzip
    1. Eclipse Platform (Platform, JDT)
    2. Web App Developers
    3. EMF v2.5 Runtime Minimum executable code
    4. EMF XSD v2.5 Runtime Minimum executable code
    5. Graphical Editing Framework (GEF)
    6. Data Tools Platform (DTP) (required only for EJB or JPT development)

2009-04-03

得找工作的 thursday...

oh sh*t...
真的应征了居安思危这句话。。。
不思的话,若出了事情结果只有慌乱。。。

毫无准备的我,只有拿着“经验”向新的战场,向前冲了。。。
希望,结果是有惊无险地让我找到不错的战国投靠咯。。。

妈妈说,机会是给有准备的人。。。
希望我这临时抱佛脚的准备,可以再靠运气遇到临时/迟到出门的机会咯~
呵呵

cheerz...

2009-03-26

Nokia - 隐形的备用电池

source: http://nokia.zol.com.cn

极少有人知道的手机隐藏功能

极少有人知道的手机隐藏功能

隐形的备用电池

  你的手机电量不足了,为了让它能够继续使用,按*3370#键,手机会重新启动,启动完毕后,你就会发现电量增加了50%。这部分隐藏的备用电量用完了你就必须得充电了,再次充电的时候,隐形的备用电池也同时充电,下次电量低的时候又可以用这个方法。知道这个在紧急情况下如果手机电量不足非常管用。

2009-02-19

myName

Windows Live SpacemyName(agian).

周: [ zhōu ]
[ 国标码:D6DC 部首: 笔画:8 笔顺:35121251 ]  

1. lap
2. week
3. thoughtful
4. (surname)
5. complete
6. encircle
7. circuit
8. cycle
9. all
10. every
11. attentive

其它相关解释:
<Chou> <main pipe> <perimeter> <Zhou> 


秉: [ bǐng ] / [ bǐng ]
[ 国标码:B1FC 部首: 笔画:8 笔顺:31511234 ]  

1. maintain
2. (surname)
3. to grasp
4. hold


晟: [ shèng ]
[ 国标码:EAC9 部首: 笔画:10 笔顺:2511135534 ]  

1. splendor
2. brightness of sun

2008-11-17

DISABLED & READONLY

Attributes for DISABLED & READONLY
READONLY and DISABLED both remove the functionality of the input field, but to different degrees. READONLY locks the field: the user cannot change the value. DISABLED does the same thing but takes it further: the user cannot use the field in any way, not to highlight the text for copying, not to select the checkbox, not to submit the form. In fact, a disabled field is not even sent if the form is submitted.
Currently only MSIE recognizes either of these attributes.
this code
produces this




It's important to understand that READONLY merely prevents the user from changing the value of the field, not from interacting with the field. For many types of fields, READONLY is irrelevent because you don't normally change the value. In checkboxes, for example, you can check them on or off (thus setting the CHECKED state) but you don't change the value of the field. DISABLED, however, actually prevents you from using the field. Notice in these examples that you can set the checkboxes even though they are "read only":
this code
produces this
mushrooms

onions

peppers
mushroomsonionspeppers
mushrooms

onions

peppers
mushroomsonionspeppers

2008-11-05

java string contains string

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-10-30

灵魂身体。。。

sunsun9399@skype: 爱情是两个灵魂,一个身体...友谊是一个灵魂,两个身体...

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

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...

2008-06-12

为什么要知道栈与堆的机制?

问:到底为什么要知道栈(stack)与堆(heap)的机制?
这真的与我有关系吗?


答:
  • 如果想要了解变量的有效范围(sope)、对象的建立、内存管理、线程(thread) 和异常处理,则认识栈与堆是很重要的。
  • 后面的章节会讨论到有关线程与异常处理的部分,其余的都会在这一章讨论。
  • 你无需知道它们是如何实现的,只是能够理解这几页的内容就足够了。

2008-06-03

HeadFirstJava 要点 pg 78

传入与传出方法的值类型可以隐含地方大或是明确地缩小。

实例变量 - instance variable

实例变量
instance variable

CNKI翻译助手

http://dict.cnki.net/
CNKI翻译助手
辅助在线翻译系统(含覆盖专业领域最全面的科技术语汉英在线词典、英汉在线词典)

2008-05-29

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修饰词的介绍:



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)

2008-01-13

养生的 12 把金锁匙!

養生~12把金鑰匙...


抗老專

王衛民教授的12把金鑰匙
1 KEY 晨起一杯水,身體水平衡 WATER
2 KEY 右側臥、睡如弓,睡眠品質好 SLEEP
3 KEY 只吃七分飽,身體自然好 APPETITE
4 KEY 生命在運動中蓬勃 EXERCISE
5 KEY 音樂舒暢身心,讀書增加智慧 MUSIC/LITERATURE
6 KEY 常吃豆,可長壽 BEANS
7 KEY 跟菸、酒說再見 VICES
8 KEY 愛與性完美和諧 LOVE/S EX
9 KEY 擺脫孤獨寂寞就健康 LONELINESS
10 KEY 勤用腦,防衰老 MIND
11 KEY 多喝茶,可減肥、防癌、保青春 TEA
12 KEY  用笑容面對人生 SMILE


伸懶腰養生
人在疲倦時,伸個懶腰是挺舒服的。尤其是對伏案工作的人來說,伸懶腰更是一種非常有益的體育活動。人體健康狀況的重要指標之一,就是血液循環正常與否。因為,為人體各部分提供營養物質,並把廢物帶走的工作,都是由循環流動的血液完成的。伸個懶腰,會引起全身大部分肌肉的較強收縮,在持續幾秒鐘的伸懶腰動作中,很多瘀積的血液被趕回了心臟,就可以改善血液循環,與此同時,肌肉的收縮和舒張作用,亦能增進肌肉本身的血液流動,使肌肉內的廢物得以帶走,從而消除疲勞,振奮精神。此外,伸懶腰時人們總喜歡兩臂外展,出現擴胸運動,從而使人心曠神怡,開懷氣暢。
不能喝的五種開水
下列五種開水不宜飲用:
在爐灶上沸騰了很長時間,飲用水已經是溫吞水。
裝在熱水瓶裡已好幾天,成了不新鮮的溫開水。
經過多次反覆煮沸的殘留開水。
開水鍋爐中隔夜重煮和未重煮的開水。
蒸飯、蒸肉後的「下腳水」。
這幾種開水不適宜飲用的原因,簡單地說,反覆沸過的開水中,所含的鈣、鎂、氯、重金屬等微量成分增高了,會對人的腎臟產生不良影響。而溫吞水中亞硝酸鹽容易增多。
不要過量地食用水果
日本京都大學醫學部滕田一郎教授指出,過量地食用水果,會使體內積蓄大量維生素C,進而產生草酸。草酸與人體汗液混合排出,會損傷皮膚,使皮膚變得粗糙,嚴重者還會產生藥物過敏性皮炎。
對此,美國科學家也得出同樣的結論。
他們還認為,吃水果根據不同季節和不同病症加以選擇。
如秋、冬季,天氣乾燥,應選擇有利尿解熱作用的雪梨或有潤腸作用的香蕉、蘋果吃;長期咳嗽的人,應多吃些性寒味甘、有潤肺、消炎止咳功能的梨。腸胃消化不良、老年性心臟衰弱、冠心病和高血脂病患者,常吃山楂,大有裨益。

不要過量地吃雞蛋

雞蛋富含營養物質,是一種男女老少咸宜的滋補品。雞蛋的吃法很多,但以下面兩種食用方法為佳:一是將蛋拌在湯內,或用滾開水沖服,這樣有利於消化吸收;二是煎荷包蛋並加適量白糖,這樣營養效果最顯著。有人覺得雞蛋營養豐富,因此主張多吃,以為攝取的雞蛋越多,增加的營養物質就越豐富。其實,這完全是個誤解。據測定,按人體對蛋白質的需要量,每天吃1~2個雞蛋就足夠了。

不要忘記吃飯前先喝一碗湯

人們已發現,在吃飯前,先喝點熱湯,對控制體重的增加是有好處的。美國學者以一千個肥胖者作對象,進行調查。結果顯示,飯前先喝熱湯的人,每餐攝取的熱量,往往要少55卡。
一般說來,吃飯快的人,容易發胖。這是因為大腦的食慾中樞接受「已吃飽」的信號需要一定的時間。這時,吃飯快的人已經吃下了過量的食物。但如果飯前喝一碗湯,則可減少飯量,從而防止發胖。

不要以為喝水沒有最佳時間

一般說來,我們平均每天最少要喝1500㏄水。除了患有特殊疾病(例如心臟機能或腎臟機能不足)的人之外,我們喝的水一般都顯得不夠,特別是家裡或工作場所太暖或開了冷氣機而致空氣乾燥的時候。我們最好在三餐之間和用餐時常常喝水,不過每次不要喝得太多。

不要以為早餐吃得飽就行了
有人說:「早餐吃得飽,午餐吃得好,晚餐吃得少」,認為「早餐吃得飽」就行了,其實不然。早餐是一天當中最重要的一頓飯。一頓好的、高蛋白的早餐可以使血糖能在較長的時間裡保持正常的水平。早飯除有熱飲料如咖啡或茶外,還應有穀類食品(燕麥做的食品),動物蛋白質(牛奶、酸牛奶、雞蛋),水果或果汁,以及含有少量的脂肪和糖的食品。所以說,早餐不僅要吃得飽,而且要吃得好。
美國芝加哥大學的研究表明,吃完高蛋白的早飯以後,血糖在15分鐘內由空腹時的70~80毫克,升到140~150毫克(正常血糖水平在80~120毫克之間)。值得一提的是,賦予我們生命活力的能量來源,就是正常或高於正常水平的血壓。

別以為淋浴的功能僅在於衛生

淋浴對人體有利,因為噴水的蓮蓬頭事一個很好的陰離子發生器。當蓮蓬頭噴射細水流時,會在空氣中產生大量的陰離子。陰離子是一種特殊的維生素,可以促進人們的新陳代謝,有利於機體生長、發育和排泄廢物,提高人體免疫力,有降低血壓、鎮咳、消除疲勞、催眠等作用。因此,人們在淋浴時會感到很舒服。

不要將開水燒了又燒

有的家庭為了節省燃料,常將溫開水再燒開,這是不符合飲水衛生的。實驗證明,水經過反覆燒開,會使水裡的硝酸鹽物質,變成有毒的亞硝酸鹽它會使人體中的血紅蛋白變為亞硝基血紅蛋白,使之失去帶氧氣的能力。喝一定量含這種物質的水,會使人在十幾分鐘或一至三小時後,發生亞硝酸鹽中毒,出現組織缺氧、心慌、氣短、口唇和指甲,甚至全身皮膚紫紺,並有頭暈、頭痛、嗜睡或煩躁不安、呼吸急促、血壓下降等症狀,對人體健康影響很大。同時,亞硝酸鹽進入人體後,在胃酸的作用下,還會生成一種有毒性的亞硝氨。

喝水養生法

近年來,日本學者對晨起喝一杯涼開水(即把一杯普通的水燒開後,蓋上杯蓋冷卻到室溫攝氏25-30度)又重做了研究,認為人在經過一夜的睡眠後,胃腸道已經排空,飲下這種活性水之後,能很快的被吸收進血液循環,稀釋血液,從而對體內各器官組織進行一次「內洗滌」,增強了肝臟的解毒能力和腎臟的排泄能力,促進新陳代謝,加強免疫功能,對防治腎炎、腎結石、尿路感染都具一定療效,故泌尿科醫生常說:「保護腎臟多喝水。」另外,藉著血液稀釋和擴張血管有利於降低血壓,預防腦溢血和心肌梗塞。

葡萄酒的妙用

1. 適量飲用葡萄酒可減少心臟病猝發的危險性,也能調養心血管系統疾病。每次服酒量不宜過多,每次服用25~50即可,每天服一~二次。
2.
白葡萄酒味甜略帶酸味,飲後刺激胃液、膽汁分泌,善解油腥,對魚肉等油膩飲食尤佳。
3.
葡萄酒除含有糖分、氨基酸外,尚含豐富的維生素B12B1B2及維生素C,故對貧血有一定療效。
4.
葡萄酒還能治療流行性感冒,服用方法,每次取紅葡萄酒30-90,稍加溫服之。每天2-3次。

茶可防治高血壓

茶葉中的兒茶素和維生素CP,有增強血管的柔嫩性、降低血中膽固醇、防止脂肪在肝臟積累和防治動脈硬化的作用,故能治療高血壓、冠心病、心功能不全和脂肪肝。
飲用法:一般每次用綠茶1-2,乾山楂片5,泡茶喝,每天1-2次,經常服用。

不要長時間地煮沸咖啡

人們喜愛喝咖啡,是因為它味道芳香可口,並能使神精系統興奮。
為了使其香味不變,咖啡不宜長時間地煮沸。這是因為蒸汽泡會攜帶部分芳香物質,並聚集在咖啡表面,形成泡沫,而咖啡香味取決泡沫的密度。燒開後的咖啡繼續沸煮,會導致泡沫被破壞,使芳香物質隨蒸汽跑掉。最好是在咖啡燒好後馬上飲用,因為放涼了泡沫也會遭到破壞。

別忘記看完電視後再次洗臉

電視機開啟後,機內電子流對螢光屏不斷轟擊,螢光屏表面會產生靜電荷。靜電荷對螢光屏周圍含有大量微生物和粒子的灰塵有吸引作用。離螢光屏太近會看電視過久,這些灰塵會附著在人的皮膚上導致皮膚病(常出現面部斑疹),因此看電視時不能離螢光屏太近,看電視時間也不宜長,看完後最好用溫水洗臉。

不要老是乘車不走路

日本科學家發現一個有趣定律,糖尿病發病率隨著小汽車數量的增加而升高。經常乘車的人容易發胖,肥胖不僅能誘發糖尿病,而且會使病情加重。這一情況在日本發生能源危機時又一次從反面得到證明:一些在此期間不得不步行的糖尿病患者,看病的次數明顯減少了。

2008-01-11

下次感冒初起, 不妨试试 !

下次感冒初起, 不妨試試 !

可以很快使感冒或頭痛不再繼續惡化!

友人轉寄,說 得蠻有道理的,提供參考!

如果你感覺到已經開始流鼻水、連續打噴嚏、有點頭痛,就快要感冒了!趕緊先喝兩、三杯熱 開水(不可以喝冰的)

等三、五分鐘,再沖一杯咖啡,任何咖啡都可以,三合一的最方便了,如果沒有,鐵罐子的咖啡? ?

可以,一定要熱的喝才有效 ( 不可冰)。

二、三十分鐘以後,咖啡和先前喝的開水會讓你要尿尿,而且,很神 奇的,流鼻水、打噴嚏、頭痛都慢慢不見了!

知道為什麼這麼好用?

一、咖啡可以讓你加速排 尿,加上先喝的開水,可以把已經侵入繁殖的病毒,從身體裡「洗」掉大部分。

二、咖啡有提神、興奮的作用,會讓你低迷不振的免疫 功能提振起來,病毒從尿尿排掉了一部分,免疫功能又加強了,感冒繼續惡化的可能當然降低不少。

2007-12-31

新的一年

2008,第27个年头
多些行动,将是不一样的第一步。

早安,2008
明天再见~!

2007-12-27

Using Transactions.TransactionScope

Trying to do with: running Using scope As Transactions.TransactionScope = New Transactions.TransactionScope() in vs 2005 pro by vb.net
Searched by: TransactionScope imports
Source from: http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.adonet/topic59025.aspx


"Namespace or type specified in the imports 'System.Transactions' doesn't contain any public member or cannot be found. Make sure then namespace... etc."

When I visit the properties of the project and check the available references I can't find it there either. Do I have to do something extra before using that Namespace?


If you are using Visual Studio 2005 Standard Editon & above do the following
Right click on the project
Add Reference
you'll definitely see reference System.Transaction under .NET references in
the references tab.

MSDTC on server is unavailable.

Trying to do with: running Using scope As Transactions.TransactionScope = New Transactions.TransactionScope() in vs 2005 pro by vb.net
Searched by: MSDTC on server is unavailable
Source from: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=54705




[*]

On the server where the trigger resides, you need to turn the MSDTC service on. You can this by clicking START > SETTINGS > CONTROL PANEL > ADMINISTRATIVE TOOLS > SERVICES. Find the service called 'Distributed Transaction Coordinator' and RIGHT CLICK (on it and select) > Start.

Test the trigger and see if it works. If it still does not work, wrap you trigger in the following transaction code (found below in bold):


SET XACT_ABORT ON
BEGIN DISTRIBUTED TRANSACTION


-- Put all queries in here (SELECT, INSERT, UPDATE, and DELETE)
select * from [SERVER2].[DBASE].[OWNER].[TABLENAME]
update [SERVER2].[DBASE].[OWNER].[TABLENAME]
set [column] = value
where [condition(s)]

COMMIT TRANSACTION
SET XACT_ABORT OFF



This solution solved our problems, I hope they solve yours.
We ran into the following errors, and the above fixed them:
1. MSDTC on server is unavailable. [fixed this error by started the service above [*] ]
2. Server: Msg 7395, Level 16, State 2, Procedure name, Line 26
Unable to start a nested transaction for OLE DB provider 'SQLOLEDB'. A nested transaction was required because the XACT_ABORT option was set to OFF.
[OLE/DB provider returned message: Cannot start more transactions on this session.]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionLocal::StartTransaction returned 0x8004d013: ISOLEVEL=4096].

2007-12-20

msn nick

☑爱自己
☐Rich
LoL ~~ o(∩_∩)o...

2007-12-19

DateTimePicker vb.net 2005 bindingsource

These will cause error:
  1. DateTimePicker.value = DateTime.Now().ToString("yyyy-MM-dd dddd hh:mm:ss tt")
  2. DateTimePicker.value = Format(Now, "yyyy-MM-dd dddd hh:mm:ss tt")
if assign value to any components(comboBox.selectedIndex, DateTimePicker.value) within constructor New() body, after form those assigned value don't work as expected.

fixed by: assign value within form_load body.

2007-12-11

sql server functions

SQL Server 2000

There are three types of UDF in Microsoft SQL Server 2000:

  1. Scalar functions.
  2. Inline table-valued functions.
  3. Multistatement table-valued functions.

Scalar functions return a single data value (not a table) with RETURNS clause. Scalar functions can use all scalar data types, with exception of timestamp and user-defined data types. Inline table-valued functions return the result set of a single SELECT statement. Multistatement table-valued functions return a table, which was built with many TRANSACT-SQL statements.

User-defined functions can be invoked from a query like built-in functions such as OBJECT_ID, LEN, DATEDIFF, or can be executed through an EXECUTE statement like stored procedures.

2007-12-10

The Structure of Stored Procedures

The Structure of Stored Procedures
(from SQL SERVER 2000 Stored Procedure Programming)

We will pause aminute to explain the structure of a stored procedure.
A stored procedure encapsulates a relatively simple Select statement for later use.
It returns a recordset containing values from the Selected column.

The recordset will contain only records that matched with the WHERE statement.

The code of a stored procedure consists of a header and a body.

The header of the stored procedure defines external attributes of the stored procedure—its name and a list of one or more parameters.

A example stored procedure has two parameters.
Parameter names must start with the @ character.
The developer must also define a datatype for each parameter.
The header must begin with the Create Procedure keyword and finish with the As keyword.

The body of the stored procedure contains the Transact-SQL statements to be executed when the stored procedure runs.

In this example, there is just one Select statement using the procedure parameters.

2007-12-03

钻石水机用户,是真是假,有关当局快快帮帮忙。

Cz: 钻石水机用户,是真是假,有待你的医生从你的医药报告 一一告知以你

有線新聞踢爆鑽石能量水廣告
http://www.youtube.com/watch?v=-NkHV0a10Do


鑽石水機用戶,請立刻驗腎!!!
請立刻轉寄給所有鑽石水機用戶,功德無量!!!

鑽石水機用戶感染腎小球腎炎 - 李小姐 32 歲,每年都有例行全身檢驗的習慣,
2006 2 月,李小姐安裝了一台鑽石水機,開始生飲過瀘後的水,
2006 4月作例行全身檢驗時發覺感染了腎小球腎炎,腎功能開始衰退。

據知馬來西亞,新加坡和香港已有多人受感染。 鑽石水機大腸桿菌嚴重超標

鑽石水機用戶陳先生,2006 6月安裝了一台鑽石水機,開始生飲過瀘後的水,
感到
身體不適,每天肚瀉多次,代理解釋為好轉反應,陳先生不放心
於是自行把過瀘後
水交化驗所化驗,結果是大腸桿菌嚴重超標。
陳先生於是立刻退機。


Cz: 有关当局快帮帮忙,别让你忠实的用户,过于担心。
好的产品当然不怕考验,希望这一封转邮,纯属恶搞。
要不然,受害者多得是啊~

p/s:查证后,将有详细的讯息 将陆续上载~

new function of blogger



today, new function from blogger.

Write. Share. Post.
Post to Blogger from Google Docs & Spreadsheets.

friendster vs facebook


trend of customizing for friendster steping after facebook.

few days back, friendster launched something which is similiar with facebook.

Google Referrals