Redian新闻
>
转(我们的父母都活在新闻联播里
avatar
转(我们的父母都活在新闻联播里# Joke - 肚皮舞运动
c*z
1
not sure where is wrong? Can someone help?
Thanks
class myclass
{
private:
myclass() {}
static myclass uniqueinstance;
static bool b;
public:
static myclass getinstance()
{
if(b==false)
{uniqueinstance=myclass();
b=true;
}
return uniqueinstance;
}
};
bool myclass::b=false;
void main()
{
myclass.getinstance();
}
avatar
l*h
2
看到网上有人推荐这个系列的书,就到amazon上查了一下。没想到旧书竟还要$100+,
想问问大家,有没有用过此书的,给再说说,值不值?
avatar
r*e
3
想申请EB1A,碰到一个问题:
参加了几个会议,
有的会议是1 abstract + 1 conference paper + 1 presentation
有的会议是1 abstract + 1 presentation
有的会议只有非一作的abstract
结果导致有7篇conference papers, 14个abstracts 和11个presentations。
另外我有11篇peer-reviewed papers.总体publication不强,想请教我该怎样在
authorship中描述。
如 I have 18 research papers, 14 abstracts and 11 presentations? 或其他更好
的描述?
请大牛们赐教,非常感谢!
avatar
w*s
4
最近每天都撒谎
来自: 卡列宁の微笑(列宁姐保佑你高分过关~)
爸妈来北京玩,这些天我变成了江湖骗子。
先把房租说低了500元;
又把年假说多了10天;
称他们入住的快捷酒店和我们公司有协议于是价格等于6线城市;
那2张国家大剧院的芭蕾舞票是不要钱拿到的;
报销的餐票不够这个月又到下旬所以一定都要往人均100吃呀;
必须去某店买新衣服因为A品牌B品牌的设计师我认识所以打5折还包邮哦亲;
现在看病不用排号只用网上问诊+收药。(害苦了好心网友杜边生不辞劳苦冒充病号
和挤在大妈堆里排挂号。。。)
然后,我还有个在外地出差因此不能陪他们吃饭的男友................
avatar
a*1
5
至少copy constructor 和assignment operator 也要private吧
avatar
t*j
6
同问
avatar
c*7
7
我最近被这些小故事搞晕了已经...
写这个文章的是男还是女?

【在 w***s 的大作中提到】
: 最近每天都撒谎
: 来自: 卡列宁の微笑(列宁姐保佑你高分过关~)
: 爸妈来北京玩,这些天我变成了江湖骗子。
: 先把房租说低了500元;
: 又把年假说多了10天;
: 称他们入住的快捷酒店和我们公司有协议于是价格等于6线城市;
: 那2张国家大剧院的芭蕾舞票是不要钱拿到的;
: 报销的餐票不够这个月又到下旬所以一定都要往人均100吃呀;
: 必须去某店买新衣服因为A品牌B品牌的设计师我认识所以打5折还包邮哦亲;
: 现在看病不用排号只用网上问诊+收药。(害苦了好心网友杜边生不辞劳苦冒充病号

avatar
P*c
8
re. 另外这个不thread safe。这种情况一般应该用double-checking lock.

【在 a********1 的大作中提到】
: 至少copy constructor 和assignment operator 也要private吧
avatar
r*y
9
it is not OK to return a copy of the object in the singleton pattern.
need to return a reference or a pointer

【在 c**z 的大作中提到】
: not sure where is wrong? Can someone help?
: Thanks
: class myclass
: {
: private:
: myclass() {}
: static myclass uniqueinstance;
: static bool b;
: public:
: static myclass getinstance()

avatar
l*l
10
myclass.getinstance(); => myclass::getinstance();

【在 c**z 的大作中提到】
: not sure where is wrong? Can someone help?
: Thanks
: class myclass
: {
: private:
: myclass() {}
: static myclass uniqueinstance;
: static bool b;
: public:
: static myclass getinstance()

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