由买买提看人间百态

topics

全部话题 - 话题: testtes
(共0页)
b******g
发帖数: 669
1
来自主题: Java版 - 问HashSet的问题?
All set cares uniqueness and equals() determine whether two object are
identical.
但是我test 了下
import java.util.HashSet;
public class testT {
private String name;
public testT(String name){
this.name=name;
}
public boolean equals(Object o){
if(!(o instanceof testT))return false;
testT person=(testT)o;
return person.name.equals(this.name);
}
public static void main(String[] args){
HashSet hs=new HashSet();
testT p1= new testT("jing");
... 阅读全帖
s******r
发帖数: 1524
2
来自主题: Statistics版 - 包子求sas code
data testt;
input id $3. cat val ;
datalines;
aaa 1 123
aaa 2 456
aaa 9 789
bbb 1 235
bbb 9 666
ccc 1 124
ccc 2 675
ccc 3 222
ccc 9 111
;
run;
proc sort data=testt;by id;run;
data testt_new;merge testt testt(where=(cat9=9) rename=(val=val9 cat=cat9));
by id;
drop cat9;
run;

ID
s*******n
发帖数: 4605
3
海洋石油981
各喽啰国爱怎么闹就怎么闹,中国扛住就行,关键还要看谁“有戏”。
http://www.jjxw.cn/testt/2012/0509/26591.shtml
N****g
发帖数: 5172
4
来自主题: ebiz版 - [合集] testt
☆─────────────────────────────────────☆
DVD209 (dvd209) 于 (Mon Mar 30 17:49:03 2009) 提到:
test
w*****3
发帖数: 16
5
来自主题: Immigration版 - testt
test
b**k
发帖数: 1219
6
来自主题: Canada版 - xt是不是开农场去了?
testt
x*********8
发帖数: 84
7
来自主题: loseweight版 - testtest
testtes
r***y
发帖数: 4379
8
来自主题: Java版 - 问HashSet的问题?
跟 hashcode 没关系, 你的 equals() 方法实现错误
的 equals() 中 -- return person.name.equals(this.name);
比较的就是 string pool 中的静态string "jing"
你两次new testT 都指向同一个 string object
当然 equals() 是 true
另外, 即使你 new String("jing") 两次, 用 string 的equals 还会是 true
因为 String 的 equals 在比较它内涵的 char[]

are
s******r
发帖数: 1524
9
not sure what you want.Try
data test1 test2(keep=idx);set test;
idx=_n_;
if **** then output test2;
else output test1;
run;
data test2;set test2;
idx=.;
run;
data testt;set test1 test2(in=in2);
drop idx;
run;
在 hehehehe (入了大圣教,心中充满喜乐) 的大作中提到: 】
m*********k
发帖数: 10521
10
来自主题: WBCenter版 - HongKong版申请代发包子
[HongKong] pricess2008 Nov 2 ● 恭祝HK新斑竹板斧上任,发100个包纸同乐*^_
^*
扣除版面:(HongKong)1770伪币成功
成功奖励 10 伪币的用户: xiaoxiaoshij, znprc, Unstoppable, Bbrave, waiwaiwai,
kanbbs, irene2, spidermonkey, hanzo, jh11, lakes, bigbigapple, cooI,
traffic00, tellmenot, LOV, donttell, faner, alliah, ladyred, I7788, mahjong,
Alr, aimer, firingdragon, donthurtme, iveney, images, Grad, JM10,
SteelDragon, wham, weiyixiao, inLove, contact, editor, zbmjk, waiver,
scarlett, testt, stocks, xinlei, evence, YaTou22, miny, QianJua... 阅读全帖
m*********k
发帖数: 10521
11
来自主题: WBCenter版 - 申请代发eb23办祝福包子
"[EB23]Qheart Jan 31 ● 发100个包子求祝福(申请代发了,大家且等着收包"
成功奖励 10 伪币的用户: moneybull, cofaky895, fatmingzhou, heilongjiang,
noles, BigGame, PInce, meatoo, UncleLee, octcmyc, gcvv, AngryYouth, faiths,
susannew, ilovewuhan, charleybei, BlueCactus, Zaini, manbeing, cutegirls,
iBull, yoyo0220, remrofia, ROR, oyeyy7, poppy0526, BelmarBreeze, Medevac, o2
, Sydra, starboard, recoco, flaming, alexx, ropfahj71, redgiant, airfly,
dramawatcher, anyaway, ybwind, icuris, chouwacuipin, Miitbbbs, yateng,
Teamster,... 阅读全帖
(共0页)