Redian新闻
>
组里有博后的机会,biomaterials/metals/medical device/water filter/nanomaterials
avatar
组里有博后的机会,biomaterials/metals/medical device/water filter/nanomaterials# Engineering - 工程
D*n
1
大家討論的時候視乎混到一起了。
中文有意思的地方(是否是優越性就不說了)就是讀,寫分離吧。
抱怨漢字難學的人,仿佛忘了,就算忘了怎麼寫,閱讀的時候是絕對沒有困難的。
抱怨同音字多的人,視乎也忘了,日常交談是沒有問題的。因為有上下文的關係,使得
信息可以有效壓縮。
比較中文英文在表達同一個意思誰用的“詞”多的時候,時候忘了,我們是閱讀的,有
效性是詞的長度和,而不是誰的詞多,英文的“詞”長度明顯比中文長。
還有舉個例沒有太大意義,因為每種語言都有自己特別擅長的場合。譬如中文的古詩,
英文(字母)表示數學。
avatar
h*c
2
the question:
Sun has a jdbc pool example. I implement the interfaces.
The connections time out overnight.
It is not recommended to use auto-reconnect. why? the key point is I don't
know how to set auto-reconnect.
Or there is better solution.
Put simple,
how to check java.sql.connection valid? It is has abstract function isValid,
but how to overwrite it? if not valid, how to reconnect?
Thanks in advance.
avatar
y*c
3
我们组可能会招一个博后,州立校,midewest area,学校一般。感兴趣可以发信息给我
需要材料,机械,bioenginering,或者chemistry或类似背景。
avatar
D*n
4
還有一點,中文的讀寫分離,使得有效壓縮成為可能。
如果沿用英文的讀寫合一,就不能避免延長詞的長度。
因為如果同音字都同樣寫的話,看起來就一樣了。

【在 D******n 的大作中提到】
: 大家討論的時候視乎混到一起了。
: 中文有意思的地方(是否是優越性就不說了)就是讀,寫分離吧。
: 抱怨漢字難學的人,仿佛忘了,就算忘了怎麼寫,閱讀的時候是絕對沒有困難的。
: 抱怨同音字多的人,視乎也忘了,日常交談是沒有問題的。因為有上下文的關係,使得
: 信息可以有效壓縮。
: 比較中文英文在表達同一個意思誰用的“詞”多的時候,時候忘了,我們是閱讀的,有
: 效性是詞的長度和,而不是誰的詞多,英文的“詞”長度明顯比中文長。
: 還有舉個例沒有太大意義,因為每種語言都有自己特別擅長的場合。譬如中文的古詩,
: 英文(字母)表示數學。

avatar
b*y
5
you could do a "ping" using sql, say, "select 1". If it throws exception,
that means the connection is dead.
It is like checking heartbeat...
avatar
H*a
6
说的很好。
读写结合的一个很不好的地方是,
现在的人很难理解古代的文献,因为口语是在不断变化的,而为了保持言书一致,
书写必须改变。读写分离(汉字不能说完全分离,但是很有代表性了)的语言文字
就有相当的优势。

【在 D******n 的大作中提到】
: 還有一點,中文的讀寫分離,使得有效壓縮成為可能。
: 如果沿用英文的讀寫合一,就不能避免延長詞的長度。
: 因為如果同音字都同樣寫的話,看起來就一樣了。

avatar
h*c
7
I once google that somebody suggest using getMetadata (don't recall the
exact fucntion name).
I met the situation that a connection pass the getMetadata validation but
still throws exception when executing a statement.
The mysql server timeout connections at about ten hours, so it is very
difficult to find out where SQLException is thrown.
Very long code.
My temporary solution is when reaping the pool, if a connection idles more
than one hour remove it from the pool. So when try to get a connection from
the pool, we will not get a very old connection idled a very long time.
So to speak, if a pool is busy, the connections will not timeout. If the
pool is not busy, then empty the pool, start new connection when
getConnection is called. I have to wait till tomorrow to see it works or not.

【在 b******y 的大作中提到】
: you could do a "ping" using sql, say, "select 1". If it throws exception,
: that means the connection is dead.
: It is like checking heartbeat...

avatar
b*y
8

from
Yes, I read about the metadata solution too somewhere before.
Anyhow, the solution I have above using "select 1" works like a charm for us
.

【在 h**********c 的大作中提到】
: I once google that somebody suggest using getMetadata (don't recall the
: exact fucntion name).
: I met the situation that a connection pass the getMetadata validation but
: still throws exception when executing a statement.
: The mysql server timeout connections at about ten hours, so it is very
: difficult to find out where SQLException is thrown.
: Very long code.
: My temporary solution is when reaping the pool, if a connection idles more
: than one hour remove it from the pool. So when try to get a connection from
: the pool, we will not get a very old connection idled a very long time.

avatar
g*g
9
Connection pool is actually a pretty complicated topic.
If this is for work, I suggest you use a 3rd party library,
e.g. DBCP

isValid,

【在 h**********c 的大作中提到】
: the question:
: Sun has a jdbc pool example. I implement the interfaces.
: The connections time out overnight.
: It is not recommended to use auto-reconnect. why? the key point is I don't
: know how to set auto-reconnect.
: Or there is better solution.
: Put simple,
: how to check java.sql.connection valid? It is has abstract function isValid,
: but how to overwrite it? if not valid, how to reconnect?
: Thanks in advance.

avatar
b*y
10

We are using DBCP.
Actually, anybody educate me why Sun Microsystem or Oracle couldn't come up
with these amazing tools?

【在 g*****g 的大作中提到】
: Connection pool is actually a pretty complicated topic.
: If this is for work, I suggest you use a 3rd party library,
: e.g. DBCP
:
: isValid,

avatar
h*c
11
Empty the pool can solve the problem.
I quick-glanced DBCP not saw topics about time-out.Try later.
Thanks for replies!
avatar
B*g
12
No profit?

up

【在 b******y 的大作中提到】
:
: We are using DBCP.
: Actually, anybody educate me why Sun Microsystem or Oracle couldn't come up
: with these amazing tools?

avatar
b*y
13

hmm, I guess you are right. As a company, probably no incentive to maintain
open source projects...

【在 B*****g 的大作中提到】
: No profit?
:
: up

avatar
h*c
14
apache 好像有很多ibm 的人在里面zt.

【在 B*****g 的大作中提到】
: No profit?
:
: up

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。