m******n 发帖数: 51 | 1 Total 4 questions.
--------------------------------------------------------------
Question 1:
1. What is the runtime complexity for the code below?
2. What is the space complexity for the code below?
Queue queue = new LinkedList() ;
public void myMethod(TreeNode root) {
if (root == null)
return;
queue.clear();
queue.add(root);
while(!queue.isEmpty()){
TreeNode node = queue.remove();
if(node.left != null) queue.add(node.left);... 阅读全帖 |
|
x***o 发帖数: 253 | 2 我来提一个土办法:
host1: ping host2
host1: tcpdump dst host2 -vvv
host2: tcpdump src host1 -vvv
比较tcpdump的timestamp来算出单向延迟。 |
|
k***r 发帖数: 4260 | 3 Just tell the network person to forward HTTPS to this host1:port1
and HTTP to host2:port2 (host1 and host2 can be the same as long
as port1 and port2 are different.)
Then you should be able to figure out the rest. You should be able
to replace the HTTPS apache instance with a squid, though.
I'm not sure how LB works. Wouldn't you lose the source IP in
the logs?
I'd use a lightweight web server as software load balancer. |
|
d*****y 发帖数: 12 | 4 Hi,
I am writing a Korn Shell program now on host1, but I need to run
some commands and retrieve the results from host2, my question is how
to implement this in Korn Shell:
1. telnet to host 2 from host 1
2. run a command line from host 2
3. retrieve the result to host1.
4. close the connection.
Thanks a lot! |
|
w****f 发帖数: 1420 | 5 http://docs.oracle.com/cd/E18752_01/html/819-5461/gbchx.html#gb
You can use the zfs send command to send a copy of a snapshot stream and
receive the snapshot stream in another pool on the same system or in another
pool on a different system that is used to store backup data. For example,
to send the snapshot stream on a different pool to the same system, use
syntax similar to the following:
# zfs send tank/data@snap1 | zfs recv spool/ds01
If you are sending the snapshot stream to a different sys... 阅读全帖 |
|
a*********a 发帖数: 22 | 6 1. If your system supports rsh, use rsh to excute the command:
host1%> rsh host2 command
then use rcp command to copy the result from the remote host.
2. Or you can use expect to non-interactively log into the remote
host and excute the command, then also use expect to non-interactively
ftp the results back. |
|
f***y 发帖数: 98 | 7 Right, but you need to create a public key on the host1 and copy it into
host2, make sure enter nothing when prompted for password.
then run ssh user2@host2 -x "command". Otherwise, you will keep
getting prompted for password. |
|