Redian新闻
>
Anyone knowing how to shuffle a deck of cards in Java?
avatar
Anyone knowing how to shuffle a deck of cards in Java?# JobHunting - 待字闺中
s*z
1
本人新任教授仅一个月,博后时有篇文章拖了挺长时间,现在终于要投,博后老板要我
自己当first author&corresponding author。这篇文章纯粹是在以前博后时大学做的
,理所当然应该用以前大学作为affiliation单位。现在问题是我可以把我目前所在大
学加到affiliation里吗?这样对tenure有帮助吗?我博后老板也已经从以前的大学搬
走了。我或许应该和他商量可不可以这样,不过在这之前,还是想确认一下这是不是个
合理的建议。
望赐教。
avatar
G*7
2
To keep my status, I have to go back to school. I am not a computer major.
However, one of the classes I am taking is Java. The professor asks us to
write a program to shuffle a deck of cards.
Can anyone tell me the Java code for shuffling a deck of cards? or tell
me where to find such websites or solutions? I have done numerous internet
solutions, but didn't find any codes working.
Would appreciate if anyone can help. You can also send emails to me.
avatar
n*r
3
如果有你博后老板的名字,这篇文章对你tenure帮助不大,至少我们系是这样。

【在 s**z 的大作中提到】
: 本人新任教授仅一个月,博后时有篇文章拖了挺长时间,现在终于要投,博后老板要我
: 自己当first author&corresponding author。这篇文章纯粹是在以前博后时大学做的
: ,理所当然应该用以前大学作为affiliation单位。现在问题是我可以把我目前所在大
: 学加到affiliation里吗?这样对tenure有帮助吗?我博后老板也已经从以前的大学搬
: 走了。我或许应该和他商量可不可以这样,不过在这之前,还是想确认一下这是不是个
: 合理的建议。
: 望赐教。

avatar
d*e
4
前两天才讨论过
http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle

tell

【在 G**7 的大作中提到】
: To keep my status, I have to go back to school. I am not a computer major.
: However, one of the classes I am taking is Java. The professor asks us to
: write a program to shuffle a deck of cards.
: Can anyone tell me the Java code for shuffling a deck of cards? or tell
: me where to find such websites or solutions? I have done numerous internet
: solutions, but didn't find any codes working.
: Would appreciate if anyone can help. You can also send emails to me.

avatar
y*y
5
void randint(){
Random r = new Random();
int temp=0;
int index=0;
int[] a = new int[52];
for(int i=0;ia[i]=i;

for(int i=0;iindex=r.nextInt(52-i)+i;
temp=a[i];
a[i]=a[index];
a[index]=temp;
}
for(int i=0;iSystem.out.print(a[i]+" ");
}
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。