由买买提看人间百态

topics

全部话题 - 话题: connes
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
d**e
发帖数: 6098
1
来自主题: JobHunting版 - abstraction vs encapsulation
说起这个,我想搭车问一个问题。
interface不能instantiate,我的理解是不能直接
intfc myobj = new intfc();
但如果有个class
public class abc implements intfc
{
...
}
那 intfc myobj = new abc() 就可以。
我一直以来有个疑问是java里的一些interface,比如java.sql里的connection,
preparedstatement, resultset之类。我发现很多其它的interface在java doc里都会
提哪些class用到这些interface。但诸如connection, resultset这些却没提到哪个
class用到它。是否就说没class用它?如果是,但为什么又可以直接到,比如
Connection conn = XXX.getConnection(...)
Statement stmt = conn.createStatement(...)
ResultSet rs = stmt.executeQuery(...);
还是实际有cl
x*******o
发帖数: 2581
2
學習文刀的計算
j*****h
发帖数: 3292
3
来自主题: Stock版 - CONNR??
老大,历害,炒多出来了
好像是CONN的Right, 可以按一定价格买CONN
查headline, 或者问文刀兄
m********0
发帖数: 2717
4
来自主题: Stock版 - 这几天巨量的Stock
Symbol AvgVolume (No column name) Volume Ratio
AAU 348363 2010/12/01 1623500 4.66
ABAT 848698 2010/12/01 2683700 3.16
ABM 246261 2010/12/02 1101500 4.47
ABM 246261 2010/12/03 1189700 4.83
ACPW 302000 2010/12/03 927000 3.07
AEL 596058 2010/12/03 2003500 3.36
AFFY 655734 2010/12/02 1987100 3.03
AIT 290638 2010/12/02 970500 3.34
AMRN 681435 2010/12/01 6431400 9.44
AMRN 681435 ... 阅读全帖
l******2
发帖数: 5522
5
来自主题: Stock版 - 坚定地持有HIG
我和巴菲特虽然都能估算一个公司的价值, 但是差别是巴菲特能持有一个股票(BRK.A)
长达48年, 超级能忍受寂寞, 而我目前还做不到这一点。 我持有一只股票一年不涨, 我就手痒要卖掉。 屡次翻这种白痴错误。 今年5000股CONN, 持有了一年半每涨过, 就卖了。 我卖掉CONN后2个月, 股价翻一倍。
s*****r
发帖数: 1745
6
来自主题: Stock版 - 坚定地持有HIG
呵呵,对HIG有faith很好呀,倒是你老是“坚持持有!”让人觉得你在给自己打气。

A)
, 我就手痒要卖掉。 屡次翻这种白痴错误。 今年5000股CONN, 持有了一年半每涨过
, 就卖了。 我卖掉CONN后2个月, 股价翻一倍。
b*****s
发帖数: 1475
7
☆─────────────────────────────────────☆
ljiiuan2 (文刀兄) 于 (Thu Jul 5 10:41:48 2012, 美东) 提到:
1. FRE/FNM: 傻B才会买这两支股票。
2. BAC/C: 别说了猪了三年了。
3. VIFL/BG: 很多青蛙可能不记得我有这些PICK, 但VIFL股价翻三倍是事实。
4. CONN: 记得股版两年前对此PICK颇有争议。 搜一下应该还能找到相应的帖子。
5. BP: 这个PICK虽然没有帮青蛙们赚了很多钱,但是是一个非常好的心理压力测试测
试。很多青蛙2010年后明白了一个道理:赚小钱靠拼,赚大钱靠命。
6. HIG/GNW/LNC: 我曾建议大家在28买入HIG,不知套死了多少人。
7. RSH/FSLR: 今年的PICK
☆─────────────────────────────────────☆
BullishSolar (康南) 于 (Thu Jul 5 10:49:06 2012, 美东) 提到:
低利率年代,HIG/GNW/LNC这几个可能还要猪两年。高抛... 阅读全帖
l******2
发帖数: 5522
8
去年CONN在$5的时候, 当时你也认为它12个月里破$21不可能。
当时把手上5000股CONN和50个call卖了换HIG, 我也做梦没想到它能破$21, 我以为会
翻倍的是HIG。
还是那句话, 赚小钱靠拼, 赚大钱靠命。
l******2
发帖数: 5522
9
来自主题: Stock版 - 操底容易, 守底难!
当年我在$5操底CONN, 5000-6000股票, 加上60个两年call, 最后有什么用呢? 5.5就全
卖了, 现在CONN$30一股.
操底最多是运气, 守底才是定力.
j*****h
发帖数: 3292
10
CONN 转型后,一直靠easy credit 和house mkt rebound 实现sales expansion.
当时太贱挺了,也没设alert.
有大牛赚翻了吧
CONN study for short 10/13/2013, setup: option bear spread or outright stock
short (if can borrow)with stop loss
D****R
发帖数: 6053
11
那天HARTFORD会严重堵车,并没地方停车.
TO MEDIA: PLEASE HELP US GET THIS MESSAGE TO THE PUBLIC IN ADVANCE
MAJOR TRAFFIC ADVISORY:
WEDNESDAY, SEPT. 9 “GET MOTIVATED” SEMINAR AT HARTFORD’S XL CENTER
Commuters and Ticket Holders Should Prepare for
Major Traffic Congestion/Parking Issues and Take Steps to Prevent Delays
HARTFORD, CONN., September 2, 2009 -- Good – yet challenging – news for
Downtown Hartford, Conn. on Wednesday, September 9:
The nationally renowned “Get Motivated" Business Seminar scheduled to
fe
I***i
发帖数: 14557
12
【 以下文字转载自 Nevada 讨论区 】
发信人: LVHuan (.......), 信区: Nevada
标 题: 鉴于南加大枪击事件 。。。发个有用的
发信站: BBS 未名空间站 (Thu Apr 12 20:25:30 2012, 美东)
美国城市犯罪率前25名。 这份排名里没有NYC,芝加哥,洛杉矶等大城市,是因为大城
市的人口数量多,犯罪案件多但是犯罪率不高。中型城市的犯罪率通常高于大城市。
当你们要选择公寓的时候,请先把地址输入www.crimemapping.com查查当地犯罪情况,
USC事发地1迈半径里一周就发生15起刑事案件。危险的地方再便宜也不能住!!!
============================================================
25、乔治亚州亚特兰大市(Atlanta, Ga.)
综合得分:168.5
每10万人暴力犯罪数:1150
每10万人财产犯罪数:8330
24、俄亥俄州辛辛那提市(Cincinnati, Ohio)
综合得分:182.1
每10万人暴力犯罪数:1192
每10万人财产犯罪数:839... 阅读全帖
t*********7
发帖数: 3398
13
Ok my best friend used to work at fox conn here in their ex brea office ,he
is in charge of apple products qc, from what I know, apple designs
everything fox conn just make it
He's been to the shen zhen factories many times and according to him, the
pressure isn't that bad
q***6
发帖数: 5654
14
尼玛,爷现在就在底特律,flint附近,怎么不早讲。。。。。。
【 以下文字转载自 Military 讨论区 】
发信人: xinchong (文革余孽), 信区: Military
标 题: 去美国旅游要避免这些城市
发信站: BBS 未名空间站 (Sat Nov 3 09:35:17 2012, 美东)
资本主义社会,贫富悬殊,也不能全怪抢你杀你的贫苦的劳动人民。中国在伪共的领导
下,很快就会出现成百上千个这样的城市。
1. Flint, Mich.
Flint reported 2,337 violent crimes per 100,000 people.
The city also reported 83 forcible rapes per 100,000 people. The national
average is 26.8 forcible rapes per 100,000 people.
2. Detroit, Mich.
Detroit reported 2,137 violent crimes per 100,000 people.
The city al... 阅读全帖
G****a
发帖数: 10208
15
【 以下文字转载自 Nevada 讨论区 】
发信人: LVHuan (.......), 信区: Nevada
标 题: 鉴于南加大枪击事件 。。。发个有用的
发信站: BBS 未名空间站 (Thu Apr 12 20:25:30 2012, 美东)
美国城市犯罪率前25名。 这份排名里没有NYC,芝加哥,洛杉矶等大城市,是因为大城
市的人口数量多,犯罪案件多但是犯罪率不高。中型城市的犯罪率通常高于大城市。
当你们要选择公寓的时候,请先把地址输入www.crimemapping.com查查当地犯罪情况,
USC事发地1迈半径里一周就发生15起刑事案件。危险的地方再便宜也不能住!!!
============================================================
25、乔治亚州亚特兰大市(Atlanta, Ga.)
综合得分:168.5
每10万人暴力犯罪数:1150
每10万人财产犯罪数:8330
24、俄亥俄州辛辛那提市(Cincinnati, Ohio)
综合得分:182.1
每10万人暴力犯罪数:1192
每10万人财产犯罪数:839... 阅读全帖
G****a
发帖数: 10208
16
来自主题: Missouri版 - zz 美国城市犯罪率前25名
美国城市犯罪率前25名。 这份排名里没有NYC,芝加哥,洛杉矶等大城市,是因为大城
市的人口数量多,犯罪案件多但是犯罪率不高。中型城市的犯罪率通常高于大城市。
当你们要选择公寓的时候,请先把地址输入www.crimemapping.com查查当地犯罪情况,
USC事发地1迈半径里一周就发生15起刑事案件。危险的地方再便宜也不能住!!!
============================================================
25、乔治亚州亚特兰大市(Atlanta, Ga.)
综合得分:168.5
每10万人暴力犯罪数:1150
每10万人财产犯罪数:8330
24、俄亥俄州辛辛那提市(Cincinnati, Ohio)
综合得分:182.1
每10万人暴力犯罪数:1192
每10万人财产犯罪数:8394
23、新泽西州纽瓦克市(Newark, N.J.)
综合得分:182.3
每10万人暴力犯罪数:930
每10万人财产犯罪数:4180
22、哥伦比亚特特区华盛顿市(Washington, D.C.)
综合得分:183.5
每10万人暴力犯罪数:126... 阅读全帖
Y*****2
发帖数: 38613
17
来自主题: Missouri版 - zz Connecticut elementary school shooting
At least 27 dead in shooting at Conn. elementary school
http://news.msn.com/us/at-least-27-dead-in-shooting-at-conn-ele
fucking insane ppl everywhere.
L****n
发帖数: 3545
18
美国城市犯罪率前25名。 这份排名里没有NYC,芝加哥,洛杉矶等大城市,是因为大城
市的人口数量多,犯罪案件多但是犯罪率不高。中型城市的犯罪率通常高于大城市。
当你们要选择公寓的时候,请先把地址输入www.crimemapping.com查查当地犯罪情况,
USC事发地1迈半径里一周就发生15起刑事案件。危险的地方再便宜也不能住!!!
============================================================
25、乔治亚州亚特兰大市(Atlanta, Ga.)
综合得分:168.5
每10万人暴力犯罪数:1150
每10万人财产犯罪数:8330
24、俄亥俄州辛辛那提市(Cincinnati, Ohio)
综合得分:182.1
每10万人暴力犯罪数:1192
每10万人财产犯罪数:8394
23、新泽西州纽瓦克市(Newark, N.J.)
综合得分:182.3
每10万人暴力犯罪数:930
每10万人财产犯罪数:4180
22、哥伦比亚特特区华盛顿市(Washington, D.C.)
综合得分:183.5
每10万人暴力犯罪数:126... 阅读全帖
b**********0
发帖数: 1447
19
Officials: 13 dead in NYC tour bus accident
Email
Print
AP – This image provided by ABC-TV shows the World Wide Tours tour bus
after it was sliced by the exit sign …
By JIM FITZGERALD and TOM HAYS, Associated Press – 1 min ago
NEW YORK – Thirteen people died Saturday when a bus returning from a casino
flipped onto its side on a major highway in the Bronx and was sliced in
half by the support pole for a large sign, authorities said.
The driver, who survived, told police he lost control after bein... 阅读全帖
j**4
发帖数: 10425
20
来自主题: NewYork版 - More than a dozen people,
More than a dozen people, including elementary school children, were shot
and killed at a Newtown, Conn., elementary school this morning, federal and
state sources tell ABC News.
A shooting involving two gunmen erupted at a Connecticut school this morning
, prompting the town of Newtown to lock down all of its schools and draw
SWAT teams to the school, authorities said today.
State Police confirm that one shooter is dead. A second gunman is apparently
at large.
It's unclear how many people have ... 阅读全帖
c*****v
发帖数: 108
21
【 以下文字转载自 Military 讨论区 】
发信人: xinchong (文革余孽), 信区: Military
标 题: 去美国旅游要避免这些城市
发信站: BBS 未名空间站 (Sat Nov 3 09:35:17 2012, 美东)
资本主义社会,贫富悬殊,也不能全怪抢你杀你的贫苦的劳动人民。中国在伪共的领导
下,很快就会出现成百上千个这样的城市。
1. Flint, Mich.
Flint reported 2,337 violent crimes per 100,000 people.
The city also reported 83 forcible rapes per 100,000 people. The national
average is 26.8 forcible rapes per 100,000 people.
2. Detroit, Mich.
Detroit reported 2,137 violent crimes per 100,000 people.
The city also reported 48.2 murders per 100... 阅读全帖
d******e
发帖数: 1424
22
来自主题: SanDiego版 - 10 dirties cities in US - 6 in CA (转载)
【 以下文字转载自 Northcounty 俱乐部 】
发信人: diketene (呆客厅), 信区: Northcounty
标 题: 10 dirties cities in US - 6 in CA
发信站: BBS 未名空间站 (Wed Dec 12 23:01:05 2012, 美东)
1. Fresno, Calif.
The Fresno-Madera metro area takes the prize for dirtiest city in America.
The 500,000 people in this area suffer from being exposed to groundwater
polluted by agriculture as well as having the 5th worst year-round particle
pollution in the nation, according to the American Lung Association.
Sperling Air Quality Index: 1 Sperling... 阅读全帖
a**y
发帖数: 335
23
来自主题: SanFrancisco版 - php问题求救--悬赏100包子...:)
哦?这应该怎么做?
$conn=odbc_connect("odbcname","user","pwd");
$sql="Select some_nvarchar from myTable where id=286";
$result=odbc_exec($conn,$sql);
$row=odbc_fetch_array($result);
t**********g
发帖数: 3388
24
来自主题: SanFrancisco版 - 去美国旅游要避免这些城市 (转载)
【 以下文字转载自 WaterWorld 讨论区 】
发信人: xinchong (文革余孽), 信区: WaterWorld
标 题: 去美国旅游要避免这些城市 (转载)
发信站: BBS 未名空间站 (Sat Nov 3 09:36:04 2012, 美东)
资本主义社会,贫富悬殊,也不能全怪抢你杀你的贫苦的劳动人民。中国在伪共的领导
下,很快就会出现成百上千个这样的城市。
1. Flint, Mich.
Flint reported 2,337 violent crimes per 100,000 people.
The city also reported 83 forcible rapes per 100,000 people. The national
average is 26.8 forcible rapes per 100,000 people.
2. Detroit, Mich.
Detroit reported 2,137 violent crimes per 100,000 people.
The city also reported 48.2 murder... 阅读全帖
c*****n
发帖数: 14445
25
【 以下文字转载自 WaterWorld 讨论区 】
发信人: xinchong (文革余孽), 信区: WaterWorld
标 题: 去美国旅游要避免这些城市 (转载)
发信站: BBS 未名空间站 (Sat Nov 3 09:36:04 2012, 美东)
资本主义社会,贫富悬殊,也不能全怪抢你杀你的贫苦的劳动人民。中国在伪共的领导
下,很快就会出现成百上千个这样的城市。
1. Flint, Mich.
Flint reported 2,337 violent crimes per 100,000 people.
The city also reported 83 forcible rapes per 100,000 people. The national
average is 26.8 forcible rapes per 100,000 people.
2. Detroit, Mich.
Detroit reported 2,137 violent crimes per 100,000 people.
The city also reported 48.2 murder... 阅读全帖
c****9
发帖数: 5402
26
【 以下文字转载自 USANews 讨论区 】
发信人: lczlcz (lcz), 信区: USANews
标 题: 美国最危险的25座城市
发信站: BBS 未名空间站 (Fri Dec 3 12:17:14 2010, 美东)
The 25 Most Dangerous Cities In America
FBI统计:美国最危险的25座城市
根据美国联邦调查局(FBI)于11月底发布的最新统计《美国犯罪报告》(Crime in
the United
States,CIUS),密苏里州圣路易斯市成为全美最危险的城市:该市去年的暴力犯罪率
达到2.71%,是
全美平均几率的将近五倍(按:去年,圣路易斯市每10万居民中就发生了2070例犯罪案
件,而全国平均值
为429例)。
25、乔治亚州亚特兰大市(Atlanta, Ga.)
综合得分:168.5
每10万人暴力犯罪数:1150
每10万人财产犯罪数:8330
24、俄亥俄州辛辛那提市(Cincinnati, Ohio)
综合得分:182.1
每10万人暴力犯罪数:1192
每10万人财产犯罪数:8394
23、新泽西州纽瓦克市... 阅读全帖
s*****x
发帖数: 3679
27
Again, Guns don't kill people, people kill blah blah blah...
http://news.blogs.cnn.com/2012/12/14/shooting-reported-at-conne
MASS KILLINGS AT SCHOOL
Source: Nearly 20 dead, including 10 kids
Witness: 3 went into hall, 1 returned
Sandy Hook Elementary shooter also dead
Pres. Obama briefed on shootings
Shooting happened at Sandy Hook Elementary in Newtown, Conn. LIVE BLOG
u****d
发帖数: 23938
28
【 以下文字转载自 WaterWorld 讨论区 】
发信人: xinchong (文革余孽), 信区: WaterWorld
标 题: 去美国旅游要避免这些城市 (转载)
发信站: BBS 未名空间站 (Sat Nov 3 09:36:04 2012, 美东)
资本主义社会,贫富悬殊,也不能全怪抢你杀你的贫苦的劳动人民。中国在伪共的领导
下,很快就会出现成百上千个这样的城市。
1. Flint, Mich.
Flint reported 2,337 violent crimes per 100,000 people.
The city also reported 83 forcible rapes per 100,000 people. The national
average is 26.8 forcible rapes per 100,000 people.
2. Detroit, Mich.
Detroit reported 2,137 violent crimes per 100,000 people.
The city also reported 48.2 murder... 阅读全帖
d*****1
发帖数: 1837
29
http://news.yahoo.com/s/ap/20110125/ap_on_sp_co_ne/fbc_uconn_do
HARTFORD, Conn. – A major benefactor to the University of Connecticut wants
the school to return $3 million in donations and remove his family name
from its football complex because he says he was shut out of discussions
about the selection of a new football coach.
Robert Burton, chief executive officer of Greenwich, Conn.-based Burton
Capital Management, said in a Jan. 19 letter to UConn athletic director Jeff
Hathaway that his opi... 阅读全帖
d******k
发帖数: 4295
30
下赛季看英超爽了
All 380 Premier League games each season will be televised live on one of
NBC Universal's many channels, and streamed online for free to customers who
authenticate through participating pay-TV providers.
On an average Saturday, NBC Sports Network will show a game at 7:00 a.m. and
a game at 10:00 a.m., and NBC will show a game at 12:30 p.m. On Sundays,
NBCSN will show a doubleheader at 8:00 a.m. and 11:00 a.m., with the latter
game also airing on Telemundo or mun2.
Midweek games will be ... 阅读全帖
b********n
发帖数: 16354
31
来自主题: LeisureTime版 - 去美国旅游要避免这些城市 (转载)
【 以下文字转载自 WaterWorld 讨论区 】
发信人: xinchong (文革余孽), 信区: WaterWorld
标 题: 去美国旅游要避免这些城市 (转载)
发信站: BBS 未名空间站 (Sat Nov 3 09:36:04 2012, 美东)
资本主义社会,贫富悬殊,也不能全怪抢你杀你的贫苦的劳动人民。中国在伪共的领导
下,很快就会出现成百上千个这样的城市。
1. Flint, Mich.
Flint reported 2,337 violent crimes per 100,000 people.
The city also reported 83 forcible rapes per 100,000 people. The national
average is 26.8 forcible rapes per 100,000 people.
2. Detroit, Mich.
Detroit reported 2,137 violent crimes per 100,000 people.
The city also reported 48.2 murder... 阅读全帖
x******g
发帖数: 33885
32
来自主题: WaterWorld版 - 去美国旅游要避免这些城市 (转载)
【 以下文字转载自 Military 讨论区 】
资本主义社会,贫富悬殊,也不能全怪抢你杀你的贫苦的劳动人民。中国在伪共的领导
下,很快就会出现成百上千个这样的城市。
1. Flint, Mich.
Flint reported 2,337 violent crimes per 100,000 people.
The city also reported 83 forcible rapes per 100,000 people. The national
average is 26.8 forcible rapes per 100,000 people.
2. Detroit, Mich.
Detroit reported 2,137 violent crimes per 100,000 people.
The city also reported 48.2 murders per 100,000 people. The national average
is 4.7 murders per 100,000 people.
3. St. Louis, Mo.
St. Louis rep... 阅读全帖
D*****r
发帖数: 6791
33
Ben Kalka的上诉书,作为人文主义者他要在监狱里享受信仰待遇。
http://openjurist.org/215/f3d/90/ben-kalka-v-kathleen-hawk-et-al
1
Ben Kalka was a federal prisoner. After his conviction in 1991, he was
incarcerated in seven different Federal Correctional Institutions ("FCIs").
Kalka claims to be a long-time member of the American Humanism Association (
"AHA"). He alleges that at six of the prisons, he attempted to form "
humanist groups within the chapels of the prisons they maintain," Complaint
at 12, but with one exceptio... 阅读全帖
G*******s
发帖数: 4956
34
来自主题: TrustInJesus版 - 歷史中的宗教改革運動
歷史中的宗教改革運動
THE PROTESTANT REFORMATION IN HISTORY
歷史中的改革宗神學﹕與誰比較`?
Reformed Theology in History: As Compared with Whom?
(1) 改革宗是基督新教的﹕基督教與天主教的分別
Reformed are Protestants: Protestants vs. Roman Catholics and Orthodox
a. 聖經的權威
The authority of the Bible: sola scriptura vs. Catholic "magisterium of the
church" (teaching authority of the church = equal to the Bible's authority)
b. 基督為罪人作代罪的死。
Christ died as substitutionary atonement for sinners. How is grace applied
to the sinner? Im... 阅读全帖
l**a
发帖数: 5175
35
来自主题: Wisdom版 - 太惨了
Conn. school victims shot by rifle multiple times(ZT)
http://news.yahoo.com/conn-school-victims-shot-rifle-multiple-t
z***y
发帖数: 13818
36
我找了几个网站asp代码学习,装上以后首页能出来,但是经常出现"[microsoft][ODBC
microsoft Access Driver]不能更新。数据库对象为只读"的错误。我检查了半天,也搞
不懂是哪里除了问题。
我装了access2000,操作系统是win2000 pro和win2000 server。我在两套系统上都试过
,问题是一样的。
我检查asp脚本,似乎在定义access driver的一行代码就显示出错。比如:
Set conn=Server.CreatObject("ADODB.Connection")
conn.open "driver={microsoft Access Driver (*.mdb)}; & Dbpath
这一行就不对了,可是我怎么也看不出不对来。
难道跟Access的版本有关?
z***y
发帖数: 13818
37
【 以下文字转载自 BuildingWeb 讨论区,原文如下 】
发信人: zmimy (咪咪), 信区: BuildingWeb
标 题: 我的asp脚本为什么总是出现"数据库对象不能更新"的错误 ?
发信站: The unknown SPACE (Sun Sep 1 00:46:08 2002) WWW-POST
我找了几个网站asp代码学习,装上以后首页能出来,但是经常出现"[microsoft][ODBC
microsoft Access Driver]不能更新。数据库对象为只读"的错误。我检查了半天,也搞
不懂是哪里除了问题。
我装了access2000,操作系统是win2000 pro和win2000 server。我在两套系统上都试过
,问题是一样的。
我检查asp脚本,似乎在定义access driver的一行代码就显示出错。比如:
Set conn=Server.CreatObject("ADODB.Connection")
conn.open "driver={microsoft Access Driver (*.mdb)}; & Dbpath
这一行就不对了,
n********a
发帖数: 68
38
update.
methods.
Depends.
It usually good to keep the Connection object open until you are all
done with db. So that doesn't seem a problem for you.
Using Statement than PreparedStatement definitely smells bad. Although
Oracle will try to cache your SQL even with Statement object, but
PreparedStatement requires Oracle to cache SQL.
The most likely problem for you is variable binding.
Do you code something like this:
conn.prepareStatement("select x from foo where y=1");
conn.prepareStatement("sel
n********a
发帖数: 68
39

PreparedStatement ps = conn.prepareStatement("select col from table where
col1=?");
ps.setString(1, "foo");
ResultSet rs = ps.executeQuery(sql);
// Now iterate through the ResultSet.
// After you finished iteration, close ResultSet object.
rs.close();
// Don't close ps yet if you have another variable to bind
// You can reuse the PreparedStatement.
ps.setString(1, "bar");
rs = ps.executeQuery(sql);
PreparedStatement ps = conn.prepareStatement("update table set col1=? where
col2=?");
ps.setStrin
c*****d
发帖数: 6045
40
来自主题: Database版 - 问一个可能看起来很怪的问题
“同一个程序段紧挨着的两行代码”
程序是这样的吗?
Connection conn ...;
Statement stmt;
...
stmt.execute("delete ... ");
stmt.execute("insert ... ");
...
stmt.close();
conn.close();
这样的话应该是一个session
s******v
发帖数: 4495
41
来自主题: EmergingNetworking版 - 为啥6PE中PE之间要enable ipv4 和 ipv6 AF?
configuration is simple. but why 2.2.2.2 要enabled在ipv4 AF? 看了C的网站都是
这样,而且如果拿掉2.2.2.2 under ipv4, the ipv6 prefix is not accepted as
valid.
router bgp 1
nei 1:1:1::2 remote 100 # CE
nei 2.2.2.2 remote 1 # RR
nei 2.2.2.2 upd loop0
!
add ipv4
redis conn
nei 2.2.2.2 act # RR enabled on ipv4,必须的,可是为什么?
!
add ipv6
redis conn
nei 2.2.2.2 act # RR enabled ipv6 with label
nei 2.2.2.2 send-label
nei 1:1:1::2 act
c*******u
发帖数: 1269
42
来自主题: Flash版 - A simple problem on Flex
req header:
GET URL HTTP/1.1
If-Modified-Since: date
If-None-Match: tag
User-Agent: xxx
Accept: formats
Cookie: xxx
parameter1:xxx
parameter2:xxx
parameter3:xxx
resq header:
HTTP/1.1 200 OK
Date: date
ETag: tag
Refresh: xxx
parameter1:xxx
parameter2:xxx
parameter3:xxx

in Java, two functions can be used to headle the senario.
conn.setRequestProperty("xxx","xxx);
conn.getHeaderField("xxx);
but in flash/as, i only found
var resp:LoadVars=new LoadVars();
req.addRequestHeader("xxx","xxx");
there
d*r
发帖数: 238
43
来自主题: Java版 - How to connect to SQL2000?

Here is my program:
public class Test {
public Test() {
String sql =
"jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=testdb";
DriverManager.registerDriver(new SQLServerDriver());
Connection conn = DriverManager.createConnection(sql, "sa", "sa");
Statement stmt = conn.createStatement();
String query = "SELECT * FROM mytable";
ResultSet rs = stmt.executeQuery(query);
while (rs.next()) {
int i = rs.getInt("id");
B******N
发帖数: 445
44
来自主题: Java版 - How to connect to SQL2000?
first:pay attention that rs.getInt(column_number), the column_number is one
based not zero based.
second:
replace:
DriverManager.registerDriver(new SQLServerDriver());
Connection conn = DriverManager.createConnection(sql, "sa", "sa");
with this:
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn = DriverManager.getConnection(sql, "sa", "sa");
z***h
发帖数: 405
45
an example
String strStoredProcedure = "{ call your_procedure_name (?,?) }";
// Connection conn = getConnection(); //get your DB connection
CallableStatement cstmt = conn.prepareCall(strStoredProcedure);
cstmt.setString(1, strValue1);
cstmt.setString(2, strValue2);
cstmt.executeUpdate();
//or ResultSet rs = executeQuery();//if you expect output
c******n
发帖数: 4965
46
netty/SEDA/ finally comes down to UNIX select
all these years all these fancy concepts, basically people were still
trying to solve the problem of parallelly handling network/io requests,
until recently the only approach used by industry is to excessively
relying on OS and do
while ( conn = accept() ) {
new Thread(conn).start()
}
amazing this went on for so long and still a lot of servers (not only
web servers, but proprietory servers , for example cassandra) still do
this
x***n
发帖数: 70
47
来自主题: Java版 - a prepared statement question
不是将sql语句直接当作形参么?比如:
conn = DriverManager.getConnection(DatabaseConnStr);
Statement stmt=conn.createStatement( );
num=stmt.executeUpdate(sql);
很久没用这个了,不知道是不是你问的。
c*********r
发帖数: 2733
48
来自主题: Java版 - a prepared statement question
String str =update table set columnA = 'OK' where columnB in (?,?,?);
//conn is a connection
PreparedStatement ps = conn.prepareStatement(str);
ps.setInt(1,1);
ps.setInt(1,2);
ps.setInt(1,3);
c***c
发帖数: 6234
49
统一谢谢各位了。
是的,用connection pool,如果是conn.close(),就是放回pooling。如果statement
或 resultset 没有close,conn是不会没其request用的。
争取了2 周,彻底fix这个。
难道不能有办法强行关掉所有statement 和resultset在本connection里吗?
以前用c#没这么大问题。
再次感谢回复
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)