由买买提看人间百态

topics

全部话题 - 话题: notify
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
s******y
发帖数: 72
1
来自主题: JobHunting版 - LinkedIn 面经
object.notify() 好像就是每次只唤醒一个在这个object上wait的线程,但是不保证那
个线程被唤醒。 我当时的思路是定义两个object, H和O线程wait 在不同的object上,
这样就可以notify两次H和一次O了。 当时面试官说这种方法可以的, 哎,

a
c********t
发帖数: 5706
2
来自主题: JobHunting版 - LinkedIn 面经
实测了一下这个方法,好像不行哦.主要是因为H object thread不能notify O object
的waiting threads.同理O object thread不能notify H object的waiting threads.导
致满足条件的时候,也不能唤醒对方。
还有什么办法吗?
m*****k
发帖数: 731
3
来自主题: JobHunting版 - LinkedIn 面经
难道不是producer (H), consumer (O) 问题么?
number of slots = 2,
H thread waits when seeing number of full slots = 2,
O thread waits when seeing number of full slots < 2,
when H thread increases full slots by 1, notify() once,
when O thread decreases full slots by 2, notify() twice,
O1, h1, h2,
yes, h1 will wake up O1, so what?, O1 will go to wait again, then h2 will
wake up O1 again, and h2O is produced, all threads finish.
O1, h1, h2 都等待 直到 h4 or O4 来才让他们产生h2o
does not make any sense. who will do ... 阅读全帖
m*****k
发帖数: 731
4
来自主题: JobHunting版 - LinkedIn 面经
难道不是producer (H), consumer (O) 问题么?
number of slots = 2,
H thread waits when seeing number of full slots = 2,
O thread waits when seeing number of full slots < 2,
when H thread increases full slots by 1, notify() once,
when O thread decreases full slots by 2, notify() twice,
O1, h1, h2,
yes, h1 will wake up O1, so what?, O1 will go to wait again, then h2 will
wake up O1 again, and h2O is produced, all threads finish.
O1, h1, h2 都等待 直到 h4 or O4 来才让他们产生h2o
does not make any sense. who will do ... 阅读全帖
d****n
发帖数: 233
5
来自主题: JobHunting版 - 第二次groupon面筋。。。
1. Before sending a message, the machine need to check the leader that there
is no ongoing sending on same message and the message has not been sent.
if this is the new message, the leader will record this message and issue
a work ticket. If the message failed to be sent, the machine need to notify
server on the failure so another machine can send it. If message sent, the
machine which sent it notify the leader to commit the message.
Another way is to use some existing distributed message queu... 阅读全帖
z*******3
发帖数: 13709
6
来自主题: JobHunting版 - Java编程讨论:LinkedIn的H2O
汗,实验了一下,有三个小问题,看来多线程白板还是难以bug free,需要多练习
getCurrentThread() -> currentThread()
currentThread.wait() -> wait()
hThread.notify() -> synchronized(hThread){ hThread.notify();}
F****n
发帖数: 3271
7
来自主题: JobHunting版 - Java编程讨论:LinkedIn的H2O
你知道你的hThread.notify() notify不到 wait()把???
z*******3
发帖数: 13709
8
来自主题: JobHunting版 - Java编程讨论:LinkedIn的H2O
汗,实验了一下,有三个小问题,看来多线程白板还是难以bug free,需要多练习
getCurrentThread() -> currentThread()
currentThread.wait() -> wait()
hThread.notify() -> synchronized(hThread){ hThread.notify();}
F****n
发帖数: 3271
9
来自主题: JobHunting版 - Java编程讨论:LinkedIn的H2O
你知道你的hThread.notify() notify不到 wait()把???
f*****n
发帖数: 970
10
来自主题: JobHunting版 - H1B申请的I-129填表的一个身份问题
Page 3,Part 4 processing information 1st section.
1. If the person named in Part 3 is outside the United States or a requested
extension of stay or change of status cannot be granted, give the U.S.
consulate or inspection facility you want notified if this petition is
approved.
a) type of office: consulate(领事馆?)
Pre-flight inspection
Port of entry
三项选一个
b) office Address (city)
c) US state or Foreign Country
d Beneficiary's Foreign Address
My background:
I am using OPT-STEM 17-months,ne... 阅读全帖
j*****u
发帖数: 15
11
本人是国内的,LCA 已经certify了,今天收到律师的邮件说
if we do not get a copy of your I-20 showing OPT by March 26, 2013 (
tomorrow) we will have to file your case as a Notify instead of a Change of
status
请问是不是律师把我误以为是美国的学生,有OPT呢?
file your case as a notify是什么意思呢?
希望有经验的前辈能够指点一下,万分感谢。
j******8
发帖数: 21
12
来自主题: JobHunting版 - 请教个H1B 和OPT的问题
因为我现在还没有申请OPT,要申请notify的H1B而不是change of status. Notify就是
要去美国领事馆激活。这个是律师告诉我的。请问懂行的同学,律师有没有忽悠我啊?
v****t
发帖数: 338
13
来自主题: JobHunting版 - 烙印太牛了。。。
Respected Dr Vicktt
I, A.Sriram, am currently a pre-final year student pursuing Bach
elor of Technology course at Indian Institute of Technology (IIT) Bhubaneswa
r, one of India's premier institutions for science and engineering.
I am looking for a research internship under your guidance(between 1st week
of May to 2nd week of July) which will be in keeping with my long-term obje
ctive of carrying out research in an academic position in my own country as
well as give me an opportunity... 阅读全帖
h********3
发帖数: 2075
14
pthread_cond_wait和signal这个没啥复杂的。Java里面也有wait和notify。就算你不
知道Java的wait,notify怎么用,简单几句话也可以解释清楚这2个函数的意思。
k********e
发帖数: 1416
15
UPDATE, March 25, 2013: This story updates to include a link to the
Geosyntec contamination report.
For at least two months, Google employees were exposed to excessive levels
of a hazardous chemical after workers disabled a critical part of the
ventilation system at the company’s new satellite campus on a Superfund
toxic waste site, records show.
From mid-November to mid-January, levels of trichloroethylene, or TCE,
exceeded concentrations considered safe by the federal Environmental
Protection ... 阅读全帖
f*****l
发帖数: 1703
16
来自主题: JobHunting版 - 如何知道原公司是否已经revoke了H1B
The lawyer who filed your original H1B with that company should get a notice
.
He may share with your previous employer.
But you don't necessary get a notice from the lawyer.
I once was revoked before, the lawyer was hired by me, so he notified me. If
it is corporate lawyer, he probably won't notify you.
w****r
发帖数: 15252
17
来自主题: JobHunting版 - 问一道电面的os的题
A.notify()
B.notify()
or notifyall()
s*i
发帖数: 5025
18
来自主题: JobHunting版 - 求问一道multithreading问题
这个可以吗?
Object b = new Object();
boolean foo = false;
void functionFoo() {
while(1){
synchronized(b) {
if(foo) b.wait();
System.out.print("Foo");
foo = true;
b.notify();
}
}
}
void functionBar() {
while(1) {
synchronized(b) {
if(!foo) b.wait();
System.out.print("Bar");
foo = false;
b.notify()... 阅读全帖
x*********n
发帖数: 100
19
来自主题: JobHunting版 - 求问一道multithreading问题
嗯,应该用Semaphore就好。原理一样,用两个events. 只是觉得这是个面试问题,想
说用最basic的。
java notify早了,还不能把signal设上等wait用的。加上其他各种限制,觉得java里
面的wait, notify设计的不是一般的差。

print1
D**C
发帖数: 6754
20
这都没法编译,wait/notify都要建立在一个object上面。
当然略加修改就可以了,我不觉得还需要check empty/full,只需要notify the
waiting process就可以了,没有waiting的,notifyall没有负效果
d****r
发帖数: 300
21
来自主题: JobHunting版 - uber 的一个面试题
Some kinda listener design pattern to catch data change event in other cells
and notifier pattern to notify other cells your data change event.

My
k****r
发帖数: 807
22
来自主题: JobHunting版 - 再问一个blockingqueue的问题
lz 你最后的code有两个问题:
1. dequeue 中idx没有用。
2. enqueue dequeue在对queue操作前notify不对:
notify();
// }
this.queue.add(item);
j**********r
发帖数: 3798
23
谁问你notify,当场喷他。这年头谁还用notify,当场反问要求举一个concurrency
package不能实现的例子。

发帖数: 1
24

这个基本思路是,线程2等待一个信号,线程1发这个信号。
最直接的是用 Condition.signal/await
自己用 Object.notify/wait() 做也简单
(实际上 Thread.join() 就是用 Object.notify/wait 实现的)
java.util.concurrency 很多 class 都可以应用到这个问题上
如 Phaser , 因为这个问题是很多其他问题的一部分。
如果线程间需要传递数据,可以用SynchronousQueue
如果想更底层一点,可以用 LockSupport.park/unpark
前面有个思路是 lock/unlock (Java可以用 Lock class)
也是同样效果。但是JAVA人的习惯是不能长时间的 hold a lock .
m**********t
发帖数: 385
25
Quality and Regulatory Affairs Manager/ Supervisor in PCCI China Development Center, Philips Shanghai
Summary:
Under general supervision, support business staff and act as a primary liaison to business regarding product/process regulatory requirements and compliance issues. Notify quality management concerning quality and/or regulatory issues. Provide weekly status reports on assigned projects.
Initiate quality/regulatory plans for new product development. Review quality/regulatory plans for exi... 阅读全帖
m**********t
发帖数: 385
26
一、Healthcare-Clinical Application Specialist
Job:Marketing Communication;Primary Location:China-Jiangsu-Suzhou
Schedule:Full-time;Job Number 012105
Responsibilities:
•In Charge of clinical & technology training to physicians, patients
internal staffs.
•Forcefully support sales & marketing team by providing clinical and
technology materials.
•Collaborate with key customer to launch clinical study according to
marketing strategy
•Assist Academy Manager to run Academy proces... 阅读全帖
t**s
发帖数: 1393
27
来自主题: Living版 - 可恶的房东,能不能一走了之?
我觉得你这个房东不太好打交道。
其实 close 后就 2 months 了,为什么还得去续签 1 年 lease......对大部分人而言,close 后留下半个月或者一个月的时间,还是有必要的,特别是在房子不是 move-in condition 的情况下。
你这 lease 是怎么签的呢?那个房客和你有没有什么书面合同之类,例如 sublet 合约?如果没有,此事和他就没有什么关系了。
但是即使这样,即使你以你的名义续签了一年的合约,我估计你也能合法地跳出来,只是得损失一些米米。仔细阅读你的 lease。我以前租 apt 时,lease 上是这么说的,首先我不能 sublet,但是如果要 move out,我得:
1) notify the renting office (written notice) 2 months in advance, if signed a one-year contract;
OR
notify the renting office (written notice) 1 month in advance, if signed month-by-mon
m****n
发帖数: 174
28
你找出你当初签的purchase agreement,看看seller disclosure 和buyer inspection
的条款怎末说的。看看在多少天之内,你是可以notify unacceptable condition的。
如果时限还没过,你就notify seller of your objection together with a copy of
the inspection. 然后seller要在一定天数之内(具体看agreement), terminate the
contract and refund earnest money或者 cure the conditions at seller’s
expense (就是seller花钱修好)。
r*c
发帖数: 254
29
When changing the primary residence to rental, what happens to existing
mortgage loan and its rate? Will the lender force me to refi it with a
higher rate or just bump up the rate without long refi process?
I have a refinance 4.25% 15 yr on my primary on August 2011, which I am
starting to rent it out from this month. I am calling insurance company to
notify the change of occupancy status. Do I have to call lender to notify
the change of occupancy status?
b*****g
发帖数: 2727
30
http://www.sears.com/craftsman-1-hps-belt-drive-garage-door-ope
Description Item # 00955918000P Model # 55918
Special Buy - We took our Battery back-up Craftsman Garage Door Opener added
additional power and included the 54900 Craftsman Connectivity Hub in the
carton (a $49.99 Value)!! Now you can enjoy quiet belt operation, open/close
during power outages with battery back-up, and the peace of mind knowing
that your garage door is closed using the AssureLink app. Never worry about
leaving the d... 阅读全帖
m***i
发帖数: 84
31
收到催债公司的信 是医疗账单,$183. 去年的service,但是之前我的保险公司没有付
钱,我一直没收到账单,后来收到了,我和保险公司对了一下,发现医院账单和保险公
司的EOB不一样。我要求保险公司调查,如果确实该我付钱,我就会付的,保险公司调
查需要30天,医院也知道这个。我前几天寻思着调查结束,一直打电话给保险公司问这
个事情,上周终于弄清楚了我自己需要付这个,于是就把payment寄给医院了。平信寄
的。
结果今天收到collections company的信:
this is to advise the above captioned has called upon our services with
reference to your account.
For proper credit, please return the bottom portion of this letter with
payment.
Unless you notify this office within 30 days after receiving this notice
that you... 阅读全帖
t****1
发帖数: 449
32
Terms & Conditions
1. You are eligible to earn 5,000 Starpoints for each approval. Referrals
must be submitted by August 10, 2011, and referred individual(s) must apply
by August 22, 2011, and be approved. Please allow 6-8 weeks for bonus points
to post to your account after each referred prospect is approved for the
Card. Due to the confidential nature of the credit approval process, you
will not be notified of whether we approve or decline any application(s)
from individual(s) you refer.
2. To... 阅读全帖
u***n
发帖数: 10554
33
来自主题: Money版 - 信用卡挂失要收钱么?
BOA的信用卡找不到了,当时在银行网点,翻了几遍包都没看到。于是银行的工作人员
直接帮我report lost了,说是寄一张replacement ccard给我。
我也没多想,结果过了两天,在包的最底下翻到了信用卡。
那也没法取消新卡是不?
现在新卡已经收到了,突然想起一个问题,这样的挂失是否会收费呢?
找了FAQ,也没提到这个问题。
https://www.bankofamerica.com/banking-information/faq/credit-cards/security-
faq.go
What if my credit card is lost or stolen?
If your card is lost or stolen, you should immediately report this to Bank
of America and notify all of the participating merchants with whom you've
set up automatic bill payments. Once Bank of America is... 阅读全帖
s***g
发帖数: 259
34
I applied a Chase Freedom Mastercard today. It offers $200 cashback after
spending 500 in the first three months. After filling in the application,
the message said that your application will be evaluated and you will be
notified later (maybe in ten days) about its status.
My question is that how long usually does it take for the pending
application to be approved or disapproved. How will Chase notify me of their
decision? by email, call me, or mail a letter to my home? Thank you for any
answer ... 阅读全帖
z****l
发帖数: 5282
35
☆─────────────────────────────────────☆
zhengqiji (没有昵称) 于 (Wed Aug 31 11:09:04 2011, 美东) 提到:
rt 一直用allstate 下个半年的保险要涨了 有想法换一家 quote了好几家 都差不多
结果收到了geico一封信 说是根据我的信用报告 没办法给我最优惠的保费 因为too
many hard inquiries。。 难道quote保险也要查信用报告 不会是个hard pull吧
前前后后quote了四五家 都是网上弄的 但是没有输过social# 只是姓名 生日 加驾照
号 这样子保险公司也会找到你的信用报告查一查 那岂不又多了n个hard。。
最近的免费报告都查过了 没办法再看一下 只能求教版上的筒子们 问题小白了
发包子给前几个筒子
=======
update 9/1/2011
仔细读了一下geico给的信 说是可以跟transunion要一个信用报告
用这个地址进去
Transunion:
http://bit.ly/i69cvI
其中有一项就是
Denial of in... 阅读全帖
G****y
发帖数: 3537
36
来自主题: Money版 - 红鸟的安全性问题讨论
14. Unauthorized Transactions.
Prepaid REDcard provides all of the protections against unauthorized
transactions, including all of the limitations on potential liability, that
are required to be provided to holders of debit cards tied to checking
accounts by applicable federal law, including Regulation E.
Tell us AT ONCE if you believe someone has transferred or may transfer funds
from your Account or Sub-Account without your permission, or if you believe
your Card or Sub-Account Card has been l... 阅读全帖
v********c
发帖数: 953
37
来自主题: Money版 - 红鸟la地区10.12target无法充值
from doc
Tried in Madison, WI just now and my non chip debit card was declined.
Cashiers had no idea what the issue was because they know debit cards should
work. They asked me to call the number on the back of my Redcard and the
representative said that “as of Oct 1, only cash loads are allowed”.
Sounds like there was some sort of grace period and the restriction hit
today. I complained about not being notified of this change and he said all
cardholders were notified. I asked the reason and he ... 阅读全帖

发帖数: 1
38
2. I am not subject to backup withholding* because: (a) I am exempt from
backup withholding, or (b) I have not been notified by the Internal Revenue
Service (IRS) that I am subject to backup withholding as a result of a
failure to report all interest or dividends, or (c) the IRS has notified me
that I am no longer subject to backup withholding, and
3. I am a U.S. person (including a U.S. resident alien).
2, 3 要选么?
n*****5
发帖数: 28
39
急请教一个问题:我2/10在branch申请了ink plus,pending了之后在等(automatic
line说是will notify writing in 2 weeks)。然后banker帮我给后台打电话之后拒了
。我recon再次被拒。然后banker说开一个business checking可以special recon,于
是我开了一个business checking, 存了77k,上周四banker给fax了special recon的文
件。
今天打auto line,message是will notify 7-10 business days in writing. 听起来
好像不是个好兆头...都说3月会对ink plus实行5/24,那我是应该明天让banker打电话
去催,还是顺其自然的等呢?
另外,我自己recon悲剧的理由是:
1) too many inquiries
2) too many credit or loan accounts opened recently (我去年申了15张cc)
3) Business too new
4) In... 阅读全帖
h****s
发帖数: 16779
40
规定是这样,不过如果你不报税,这个也没啥了。IRS不查的。
https://www.irs.gov/individuals/additional-itin-information
What do I do when I am assigned a social security number (SSN)?
Once you receive a SSN, you must use that number for tax purposes and
discontinue using your ITIN. It is improper to use both the ITIN and the
SSN assigned to the same person to file tax returns. It is your
responsibility to notify the IRS so we can combine all of your tax records
under one identification number. If you do not notify the IRS... 阅读全帖
i*******0
发帖数: 227
41
来自主题: Money版 - target gc 清零问题 (不断更新)
收到本州attorney general的回信。貌似他们会联系靶子店,但不具备法律裁决执行权
利。希望更多的人去投诉。
Thank you for contacting the Consumer Protection Division of State Attorney
General’s Office. Consumer complaints provide valuable information that our
office uses to identify patterns of unfair or deceptive practices that may
warrant enforcement of the Consumer Protection Act.
The complaint you submitted to our office regarding Target Stores was
reviewed and determined to be appropriate for the informal complaint
resolution services of... 阅读全帖
w******2
发帖数: 39
42
来自主题: NextGeneration版 - 突然悲剧了!失业中
Bless you. The same situation here.
I think there is a rule for H1B for many school. They need notify you at
least one month or several months before they terminate your H1B. I don't
think it is legal they notify you the last day. This is the reason they are
nice enough to let you to change the status to F2. Otherwise they will
report Immigration authority. It is their fault, but not yours.
Your boss is definitely an evil, but it is not the time to think about him.
The best way is if you can fin
a*****g
发帖数: 19398
43
反对 PARCC考试的大潮——PARCC Refusal Campaign
High school students in Bloomington and Normal, Illinois, have organized a
student union, called the Blono Student Union, to oppose PARCC. it is called
the Blono Student Union.
Students in Bloomington and Normal, Illinois, Join to Oppose PARCC Tests
Refusing the PARCC
An effective way to resist standardized testing is to simply not participate
in it; refusing state tests is a common, legal strategy used all over the
nation. Students and parents around the co... 阅读全帖
a*****g
发帖数: 19398
44
反对 PARCC考试的大潮——PARCC Refusal Campaign
High school students in Bloomington and Normal, Illinois, have organized a
student union, called the Blono Student Union, to oppose PARCC. it is called
the Blono Student Union.
Students in Bloomington and Normal, Illinois, Join to Oppose PARCC Tests
Refusing the PARCC
An effective way to resist standardized testing is to simply not participate
in it; refusing state tests is a common, legal strategy used all over the
nation. Students and parents around the co... 阅读全帖
a*****g
发帖数: 19398
45
反对 PARCC考试的大潮——PARCC Refusal Campaign
High school students in Bloomington and Normal, Illinois, have organized a
student union, called the Blono Student Union, to oppose PARCC. it is called
the Blono Student Union.
Students in Bloomington and Normal, Illinois, Join to Oppose PARCC Tests
Refusing the PARCC
An effective way to resist standardized testing is to simply not participate
in it; refusing state tests is a common, legal strategy used all over the
nation. Students and parents around the co... 阅读全帖
s**u
发帖数: 9035
46
Call for Applications for the 2012 Kauffman Foundation Postdoctoral
Entrepreneur Awards
The Ewing Marion Kauffman Foundation and the National Postdoctoral
Association (NPA) have announced the call for nominations for the 2012
Kauffman Foundation Outstanding Postdoctoral Entrepreneur and Emerging
Postdoctoral Entrepreneur awards, which recognize exceptional former
and current postdocs who are working to commercialize research. The
awards will be presented at the NPA 10th Annual Meeting, March 16... 阅读全帖
q***s
发帖数: 60
47
【 以下文字转载自 Visa 讨论区 】
发信人: qesss (qesss), 信区: Visa
标 题: H1B petition期间能坐Cruise吗?
发信站: BBS 未名空间站 (Thu Mar 30 14:29:04 2017, 美东)
先谢谢大家了!
我刚毕业,打算带家人去坐个Caribbean的游轮,就Carnival那种,visit US adjacent
islands。我有工作offer,大概5月入职,律师刚刚帮我file H1B petition。不知道
在这种情况下,坐cruise会不会有问题?
Concern是这样的(according to my 律师)。假设我H1B抽中了,如果我一直在境内,那
我的状态是change of status(也就是F1自动变成H1B);但如果我在4月1日之后出境,
律师说我就不是change of status了,会变成consular notify,意味着我必须去使馆
签证来激活我的H1B status.
但是后来我又跟律师说,我其实只是坐个游轮,并不是回中国一类的。她回复我说: it
is considered st... 阅读全帖
a*********g
发帖数: 8087
48
来自主题: shopping版 - 谁给推荐个mail管理软件。
智商够的话就用gmail!
gmail notifier!
mac下google notifier!
i*******a
发帖数: 30
49
来自主题: StartUp版 - H1B可以有两份工作吗?
I have a question related to this too.
Do you need to notify the full time employer about your part-time job/part-
time H1B? Is it a required procedure to notify your full time employer about
this during part time H1B application? Can you keep your part-time job a
secret from your full time boss/company?
Thank you.
s*********e
发帖数: 4475
50
来自主题: StartUp版 - 创业真不容易
Lucy Liu在谢大律师手下的时候, 我觉得态度挺好的。
但这两年在mitbbs上, 包括本版, 树敌不少。 看她几年
时间从一个小文员发展成大老板, 但危机处理不过关呀。
我觉得这事闹那么大了, 她该出来解释一下, 顺便
把钱退了, 大家也许还不至于如此群情汹涌。
做生意, 还是避免在中国人圈里混。 钱不好挣, 风险也大。
发信人: fatwallets (肥钱包), 信区: Immigration
标 题: @@@@我的EB1A申请经历 + 揭露无能无良黑心律师 Lucy Lu
关键字: EB1A,无能,无良,Lucy Lu
发信站: BBS 未名空间站 (Sat Feb 19 02:35:15 2011, 美东)
我去年6月找她帮我办EB1A,实在很生气才在这里曝她,
先讲讲她的无良“职业操守”, 头两个也许不算啥,您看完再说
1)。拉客的时候吹的天花乱坠,交了钱就不理了
2)。一般打电话,发email都不回,或1-2周才回
3)。12/15/2010 她收到补件通知,补交期限是1/26/2011。她直到1/25/2011才
通知我。还跟我说USCIS允许发
延期请求,她已经... 阅读全帖
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)