k*******3 发帖数: 1909 | 1 怎么看? 我复制了邮件头:
Delivered-To: 我@gmail.com
Received: by 10.96.74.232 with SMTP id x8csp68128qdv;
Fri, 25 Jul 2014 20:54:23 -0700 (PDT)
X-Received: by 10.66.252.161 with SMTP id zt1mr23096453pac.41.1406346863451;
Fri, 25 Jul 2014 20:54:23 -0700 (PDT)
Return-Path: <[email protected]
(function(){try{var s,a,i,j,r,c,l,b=document.getElementsByTagName("script");l=b[b.length-1].previousSibling;a=l.getAttribute('data-cfemail');if(a){s='';r=parseInt(a.substr(0,2),16);for(j=2;a.length-j;j+=2)... 阅读全帖 |
|
r****x 发帖数: 1250 | 2 运行程序时总是有这个出错信息:
OS version: 5.1.2600.196608
okeoke version: 2.3.2.0
Program Folder: G:\OkeOke.Net\
Object reference not set to an instance of an object.
at OkeOke.Net.Controls.PlayListPanel.<_player_OnPlayerStopped>b__1() in D
:\Dev\OkeOke\OkeOke.Net\Controls\PlayListPanel.xaml.cs:line 566
at OkeOke.Net.Execute.<>c__DisplayClass2.b__0(
Action action) in D:\Dev\OkeOke\OkeOke.Net\Utilities\Execute.cs:line 26
at OkeOke.Net.Execute.OnUIThreadAsync(Action action) in... 阅读全帖 |
|
r****x 发帖数: 1250 | 3 运行程序时总是有这个出错信息:
OS version: 5.1.2600.196608
okeoke version: 2.3.2.0
Program Folder: G:\OkeOke.Net\
Object reference not set to an instance of an object.
at OkeOke.Net.Controls.PlayListPanel.<_player_OnPlayerStopped>b__1() in D
:\Dev\OkeOke\OkeOke.Net\Controls\PlayListPanel.xaml.cs:line 566
at OkeOke.Net.Execute.<>c__DisplayClass2.b__0(
Action action) in D:\Dev\OkeOke\OkeOke.Net\Utilities\Execute.cs:line 26
at OkeOke.Net.Execute.OnUIThreadAsync(Action action) in... 阅读全帖 |
|
S******n 发帖数: 617 | 4 Background: BoA merged ML at the end of 2008.
1st, Cuomo letter to Senate & CONgress:
http://charlotte.bizjournals.com/charlotte/stories/2009/04/20/daily43.html?ana=yfcpc
2nd, Paulson now blames Bernanke:
Hank Paulson admitted to Andrew Cuomo that he threatened to oust Ken Lewis
and the Bank of America board if Bank of America invoked a Material
Adverse Change (MAC) clause to block the deal, Cuomo says. Paulson also
added, however, that he made this threat at the request of Ben Bernanke.
3rd, Be |
|
p********r 发帖数: 1980 | 5 Do not invoke conspiracy as explanation when ignorance and incompetence will
suffice, as conspiracy implies intelligence. |
|
|
h****8 发帖数: 599 | 7 昨天刚拿到 感谢版上所有战友的面经 我也来写我的
background: EE fresh MS,学校一般,成绩一般
1。phone screen
1. introduce your past projects, whats your input and output, how do you
handle exceptions
2. class base{ base() {}; ~base() {};};
class derived : base { derived() {}; ~derived() {};);
base* ptr = new derived;
explain what will happen
3. hows virtual table constructed
4.hows virtual function invoked
5. whats the difference between struct and class
6. whats the purpose of declaring a function const
7. class A{}; what |
|
|
|
A*******1 发帖数: 985 | 10 Is that a Java question?
Then I think e is right.
you can not use protected constructor in a class that extends the
constructor's class. You have to call super() in inheriting class to invoke
the protected constructor in base class. for example:
Class B extends SomeClass
{
public B()
{
super();
}
somemethod()
{
SomeClass a = new SomeClass(); //wrong, unless SomeClass's constructor is
public
B b = new B(); // right
}
} |
|
t****t 发帖数: 6806 | 11 the title reads "C++ Q47..."
invoke |
|
t****a 发帖数: 1212 | 12 O(n) time, O(n) space (just the result vector)
void game(int w[][], int order[], int result[], int n) {
# compare 1 v 2, 3 v 4, 5 v 6 and fill the losers to the tail of result,
and winners to the head of order
# recursively invoke game(w, order, result, n/2)
# until n = 0
} |
|
l**********0 发帖数: 16 | 13 1. hows virtual table constructed?
2. hows virtual function invoked?
3. if free an obj initiated on stack, what happened? what about on heap
4. can I use free() instead of delete to delete an "newed" object?
会的人帮忙解一下啊,谢谢了
第一题第二题知道原理 但是感觉表达不出来 |
|
h*****1 发帖数: 435 | 14 invoke Systerm call to terminate the other one |
|
C***U 发帖数: 2406 | 15 if you want the first thread invoke system call to terminate the second
thread, I think the first thread need know the thread ID and some other
information. |
|
a*******y 发帖数: 1040 | 16 2 Answers
Design a online Auction system (similar to e-bay)
Functionalities include enlisting a product for auction by bid owner,
Placing bid for a product by bidders,Bid winner selection,Notification of
bid winner etc ). Interviewer was mainly looking for Objects involved in the
system and their relationship and use of design patterns
class BidManager
class Bidder
class Item
so use command design? BidManager would be the Invoker, Item is the receiver
, Bidder is the client. Bid Manager would ha... 阅读全帖 |
|
c****7 发帖数: 13 | 17 我也整了个, 请大家提提意见。
public static void connect1(TreeLinkNode root) {
if (root==null)
return;
// index variable for the current level
TreeLinkNode curLevNode = root;
// scan the tree node level by level
while(curLevNode!=null){
// index variable for the next level,
// which is used to connect with previous sibling node
TreeLinkNode nxtLevPreNode=null;// initialize as null
// the first node of the next level, (which will
// be passed to connect() for... 阅读全帖 |
|
z******t 发帖数: 59 | 18 谢谢指正。这个题目的确引发了不少争议。
atoi这个API在Windows和在Linux上的实现略有不同。书中提到的观点是参考了Windows
的实现。下面是这两段话从MSDN上拷贝下来的:
Each function returns the int value produced by interpreting the input
characters as a number. The return value is 0 for atoi and _wtoi, if the
input cannot be converted to a value of that type.
In the case of overflow with large negative integral values, LONG_MIN is
returned. atoi and _wtoi return INT_MAX and INT_MIN on these conditions. In
all out-of-range cases, errno is set to ERANGE. If the param... 阅读全帖 |
|
e****e 发帖数: 418 | 19 多谢lolhaha大牛指点,non-duplicate修订版如下。
client invoke: permute( new char[]{'a', 'b', 'c'}, 0 );
void permute(char[] perm, int level){
if ( level == perm.length ) {
System.out.println( new String( perm ) );
for ( int i = level, i < perm.length; i++ ) {
if ( level != i )
swap( perm, level, i );
permute( perm, level + 1 );
if ( level != i )
swap( perm, level, i );
}
}
void swap(char[] arr, int i, int j) {...} |
|
e****e 发帖数: 418 | 20 多谢lolhaha大牛指点,non-duplicate修订版如下。
client invoke: permute( new char[]{'a', 'b', 'c'}, 0 );
void permute(char[] perm, int level){
if ( level == perm.length )
System.out.println( new String( perm ) );
for ( int i = level; i < perm.length; i++ ) {
if ( level != i )
swap( perm, level, i );
permute( perm, level + 1 );
if ( level != i )
swap( perm, level, i );
}
}
void swap(char[] arr, int i, int j) {...} |
|
e****e 发帖数: 418 | 21 Assume there is only one value got duplicated.
global variable: int count = 0;
void inorderDFS(Node n, MutableInt prev) {
if ( node == null )
return;
inorderDFS( node.left, prev );
if ( n.val == prev.val )
count++;
pre.val = node.val;
inorderDFS( node.right, prev );
}
invoke: inorderDFS( root, new MutableInt() );
return: count
class MutableInt {
int val;
} |
|
p*****p 发帖数: 379 | 22 例如funcA, funcB, funcC,funcA传C的名字到funcB由B调用C,java里能用invoke之类
的做到,C++貌似不行?当然用个hash_map记录名字到指针的对应是可以,但是B可能不
知道具体有哪些func |
|
s*****n 发帖数: 5488 | 23 it may be possible to use typeid
to get class name, with the class time swtich for some options
to dynamic cast it a class. then invoke. |
|
r******r 发帖数: 700 | 24 /**
* Using {@link AppleExercise.Problem1.SampleCache} as a starting point,
answer questions 1-3 by
* creating 3 new inner classes within {@link AppleExercise.Problem1}
below.
*/
public static class Problem1 {
public interface Cache {
public void put(Object key, Object value);
public Object get(Object key);
}
public static class SampleCache implements Cache {
private Map map;
public SampleCache() {
... 阅读全帖 |
|
l**h 发帖数: 893 | 25 来自主题: JobHunting版 - A家面试题 做手机的那个A,希望对同胞们有用。
每次都是两个人一起面,总共五六组,所以总共要见十个还是十二个。记得的问题:
1. Find the lonely celebrity(celebrity: everyone knows him, he knows no one)
. Given a function boolean knows(A, B), which tells you if A knows B.
Implement function: List getLonelyCelebrity(Set names).
2. You got 2^40 positive 4 byte integers on disk, 16M memory, how to find
the first missing integer.
3. Implement the merge of multiple inputs. (I assumed each input implements
hasNext(), next())
4. Reverse a byte array, Reve... 阅读全帖 |
|
r********9 发帖数: 1116 | 26 来自主题: JobHunting版 - BB店面经 declare from new only, means allocation from stack should be forbidden.
This can be achieved by making constructors private. In addition to that,
you should define a static wrapper function within which to invoke
constructor and return a dynamically allocated object.
class heapObject{
private:
heapObject(){}
public:
static heapObject* create(){ return new heapObject;}
};
int main(){
heapObject* sample=heapObject::create();
} |
|
t****e 发帖数: 279 | 27 What is iterator invalidation?
Answer:
Insertion
Sequence containers
vector: all iterators and references before the point of insertion are
unaffected, unless the new container size is greater than the previous
capacity (in which case all iterators and references are invalidated) [23.2.
4.3/1]
deque: all iterators and references are invalidated, unless the inserted
member is at an end (front or back) of the deque (in which case all
iterators are invalidated, but references to elements are unaffe... 阅读全帖 |
|
j********x 发帖数: 2330 | 28 补两道
一面
最长回文,只要求实现N^2
online stream 最长回文,记录最右端在目前字符串最右端的所有回文,依次扩展
讨论大数据处理中应该用什么system,考虑storm, mapreduce, kafka
最后一题问给定一个queue,两个接口put(int), findSum(T), 找出当前时刻结束的长
度为T(T有给定的最大值)的时间窗口内的值的总和,多线程;按每秒的边界组成子区
间,put 更新最右端区间,findSum顺序查找
二面
LRU cache,考虑实现get(key)的接口如何处理cache miss
Linux System call,write(file descriptor)从invoke到return发生了什么 |
|
S**********n 发帖数: 264 | 29 Driver development under windows mostly also involve kernel development.
Yes, windows do have kernel mode. (Ntdll.dll is part of it). Most of the
Win32 ApI under user mode would invoke kernel mode functions(unpublished
APIs). Sometimes, one could directly use those APIs in user mode code,
those apis started with k**', this practice is not recommended though.
The model used to be WDM, now it is called WDF, short for "What de fcuk" |
|
s********u 发帖数: 1109 | 30 一直对设计题比较头疼,虽知道这个没什么标准答案,但是跟答案元素差的比较多的话
,也不知道自己做到什么程度。如果强迫自己“背”答案,又会发现不符合自己的思路
,比如这道题目的答案中vehicle和spot都有parkVehicle这样的函数,让人很费解。
题目就一句话:Design a parking lot using object-oriented principles.
所以想把自己第一反应写出来的设计拿出来请教下。有些地方省略了,反正
implementation也不重要。
class ParkingLot{
private:
level* lvl;
int max_level;
static ParkingLot* pInstance;
public:
static ParkingLot* getInstance();
pair parkVehicle( Vehicle* v){
//iterate all levels, i... 阅读全帖 |
|
n****e 发帖数: 43 | 31 You are given a paragraph , which contain n number of words, you are given m
threads. What you need to do is , each thread should print one word and
give the control to next thread, this way each thread will keep on printing
one word , in case last thread come, it should invoke the first thread.
Printing will repeat until all the words are printed in paragraph. Finally
all threads should exit gracefully. What kind of synchronization will use?
I have no idea how to solve this question. Any guru h... 阅读全帖 |
|
s********x 发帖数: 914 | 32 这个应该只会在相同length的string的bucket里才会invoke这个function |
|
c****m 发帖数: 179 | 33 第四个invoke event什么意思? 是说同一个event同时给用户发提醒吗?这个是只读不
写吧?除了记录用户是否收到? |
|
c****m 发帖数: 179 | 34 第四个invoke event什么意思? 是说同一个event同时给用户发提醒吗?这个是只读不
写吧?除了记录用户是否收到? |
|
a**********0 发帖数: 422 | 35 继续consumer和producer的例子
package jc;
import java.util.*;
//what about there are two things to be synchronized?
public class ProCon2nd {
// a class object to store the strings
static List myListOne = new ArrayList();
static List myListTwo = new ArrayList();
// this is the thing getting synchronized
// it is static as it is the same for all instances
static Object myLock = new Object();
public void produce(){
... 阅读全帖 |
|
y**********a 发帖数: 824 | 36 没有问题,以下是 hashcode 的 contract:
Whenever it is invoked on the same object more than once during
an execution of a Java application, the {@code hashCode} method
must consistently return the same integer, provided no information
used in {@code equals} comparisons on the object is modified.
This integer need not remain consistent from one execution of an
application to another execution of the same application.
If two objects are equal according to the {@code equals(Object)}
method, then calling the ... 阅读全帖 |
|
y**********a 发帖数: 824 | 37 没有问题,以下是 hashcode 的 contract:
Whenever it is invoked on the same object more than once during
an execution of a Java application, the {@code hashCode} method
must consistently return the same integer, provided no information
used in {@code equals} comparisons on the object is modified.
This integer need not remain consistent from one execution of an
application to another execution of the same application.
If two objects are equal according to the {@code equals(Object)}
method, then calling the ... 阅读全帖 |
|
r*******e 发帖数: 971 | 38 有,看我的。
public class Solution extends Reader4k {
private int offset;
private int size;
private char[] buffer;
public Solution(){
offset=0;
size=0;
buffer = new char[4096];
}
/**
* @param buf Destination buffer
* @param n Maximum number of characters to read
* @return The number of characters read
*/
public int read(char[] target, int n) {
int readbytes=0,step=0;
boolean isEnd = false;
whil... 阅读全帖 |
|
N**********i 发帖数: 34 | 39 从7月份到现在,磕磕盼盼终于拿到了FB的offer,准备从了。就此做个总结,希望能对
还在找工作的朋友们有所帮助...
准备: lc(没刷完,但是有些高频题做了好几遍,还有水中的鱼的博客),cc150(先
刷了一遍,然后又看了好几遍,反复看了书中的一些不错的解法),g4g(稍稍做了一
些题),各大面经、版上大牛总结帖。我不是new grad(2年工作经验),所以简历上的
工作时的projects好好准备了一下。
整体感觉就是:
1. 被拒多半还是实力问题+少许运气问题。onsite interview最好保证每一轮都不差(
哪怕都没有很突出),否则就很容易悲剧。所以还是得要多做题甚至多面试找感觉
2. 最有用的是lc+面经+大牛总结,面试时至少有30%-50%会遇到类似甚至一样的
3. bug free很难做到,也没啥必要. 之前有人说FB要求bug free被吓到了,但是感觉
思路+clean code更重要
4. 在三三面试官面前不要害怕,反正你做的多好他们都可以想办法阴你,还不如放松
心态跟他们好好一战
L(电面跪了)
HR分组的时候有点奇怪,分到了类似Site Reliabil... 阅读全帖 |
|
o****i 发帖数: 1706 | 40 A machine known as, equivalence tester, can determine whether two bank cards
correspond to the same
account by taking two cards at a time as input and outputting whether they
are equivalent. Give an
algorithm which invokes equivalence tester at most O(n lg n) to determine
whether there is a set of
more than n/2 equivalent cards in the given n bank cards. |
|
t******n 发帖数: 354 | 41 是不是员工的提前6个月辞职?否则有法律问题
Final and Binding Arbitration
Claims and disputes submitted under this Agreement for arbitration shall be
decided by a neutral Arbitrator whose decision shall be final and binding on
the Employee and HFHS when made in accordance with his/her jurisdiction and
authority. Judgment on any award by the Arbitrator may be entered in any
court within Wayne County, MI.
Conditions that Must be Satisfied before Submitting a Claim for Arbitration
Non-leadership Employees may not submi... 阅读全帖 |
|
a*********i 发帖数: 86 | 42 国人哥们主面, 小印跟班. 面Backend infra
给了一道这样的题
/*
Question Description: You are to write an abstraction layer for a persistent
buffer. Provide an implementation of the following abstract class:
*/
public abstract class pBuffer {
protected final int BLOCK_SIZE = 1024;
protected final int BLOCK_COUNT = 1024;
protected byte[] buffer = new byte[BLOCK_COUNT * BLOCK_SIZE]; // A sample
1mb buffer, to be allocated in 1k chunks.
public pBuffer() {
fillBufferFromFile(); // Reads the buffer from file an... 阅读全帖 |
|
e********3 发帖数: 229 | 43
后者.thread1 6点开始执行,然后马上invoke那个dowork method. |
|
l******s 发帖数: 3045 | 44 My Chinese input stopped working on computer, so let me explain it in
English.
I understand your question here which is to confirm if the interval between
the 2 running of same threads are based on the time point of the beginning
of thread running, while your questions in last post made me think you are
asking if the thread will sleep/delay/suspend 59 minutes then run it, and I
thought that's what that interviewer understood so he answered "it's invoked
at start of the thread running".
So, we di... 阅读全帖 |
|
e********3 发帖数: 229 | 45
between
I
invoked
it should be the latter one. there will be 58 mins that nothing is happening
for both of the threads. |
|
p****e 发帖数: 3548 | 46 LinkedHashMap
A special constructor is provided to create a linked hash map whose order of
iteration is the order in which its entries were last accessed, from least-
recently accessed to most-recently (access-order). This kind of map is well-
suited to building LRU caches. Invoking the put or get method results in an
access to the corresponding entry (assuming it exists after the invocation
completes). The putAll method generates one entry access for each mapping in
the specified map, in the or... 阅读全帖 |
|
p****e 发帖数: 3548 | 47 LinkedHashMap
A special constructor is provided to create a linked hash map whose order of
iteration is the order in which its entries were last accessed, from least-
recently accessed to most-recently (access-order). This kind of map is well-
suited to building LRU caches. Invoking the put or get method results in an
access to the corresponding entry (assuming it exists after the invocation
completes). The putAll method generates one entry access for each mapping in
the specified map, in the or... 阅读全帖 |
|
g*******e 发帖数: 107 | 48 Integer 是对象,下面比较的是两个对象的reference address, 是不同的。
map.get(s_char) != map.get(t_char)
println 会invoke Integer 对象 toString() method,
toString() return a String object representing this Integer's value
所以打印的值是相同的。 |
|
j*******t 发帖数: 123 | 49 一个queue里会有很多很多future, 包括future放进来的时间。要求一个处理这个queue
的thread,(也可以多个)凡事超过一定时间的都认为time out, 要invoke other
function 重新处理。做完的要record 做完了就行了。没做完的,但没超时接着等。
我觉得既然这样就肯定不能用future.get (timeout).
我只能不停的检查queue, 看每个future.isdone, 和future产生的时间,做完的和超
时的处理好说,但是没做完的还得放回来。但是如果只有一两个job的话还没time out
的话,就会不停的dequque, enqueue. 显然会waste a lot of computer power,
问问大牛有什么更好的方法吗? |
|
p**f 发帖数: 3549 | 50 Airbnb is suing its hometown to allow users to break the law
Published: July 5, 2016 2:14 p.m. ET
Protesters fight the use of short-term home rentals in San Francisco, Airbnb
’s hometown where housing is at a premium.
San Francisco, ground zero in the tech startup boom, has also become one of
the costliest housing markets in the U.S., thanks to a housing shortage that
frustrates residents and motivates landlords and property owners to evict
tenants and replace them with tech workers at sky high ... 阅读全帖 |
|