Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Boolean
Why job interviewer always like to ask "what other jobs did you apply for?"?
What are the interviewer trying to find out? And how should I answer such a question?
3 AnswersSociology8 years agoQuestion on undo and redo list in transaction?
When the system recovers from a crash, it constructs an undo-list and a re-do list. Choose the correct statements to explain the processing done during recovery.
I. The log records for transactions on the undo-list must be processed in reverse order.
II. The log records for transactions on the undo-list must be processed in forward order.
III. The log records for transactions on the re-do list must be processed in reverse order.
IV. The log records for transactions on the re-do list must be processed in forward order.
(a) II and IV.
(b) I and III.
(c) I and IV.
(d) II and III.
I think should be I and IV. Can someone verify?
Thanks
1 AnswerProgramming & Design8 years agoWhich transaction property is not upheld?
Begin
UPDATE branch
SET cash = cash - 1000
WHERE branchCode = 56
<crash>
Suppose that the system crashes half way through processing a cash transfer and the first part of the transfer has been written to disc/storage.
For this case, name the transaction property that is not upheld.
(a) isolation
(b) atomic
(c) consistent
(d) durable
Is it atomic?
1 AnswerProgramming & Design8 years agoQuestion on X.509 digital certificate?
If you receive an X.509 digital certificate that has a unique identifier, but has no extensions, what version is the certificate:-
(a) It is a Version 2 certificate
(b) It is a Version 3 certificate
(c) It is a Version 1 certificate
(d) All X.509 digital certificates have unique identifiers
(e) The unique identifier is determined by implementation, not version number
1 AnswerSecurity8 years agoWhy is S/MIME (instead of PGP) recommended in such a scenario?
A large MNC with approximately 50,000 employees, and with offices in Asia, Europe and North America. This MNC operates its own PKI environment, with a self-signed Certificate Authority based at its head quarters in North America and Registration authorities distributed across the regions. Non- repudiation needs to be enforced in secure email exchanges.
2 AnswersSecurity8 years agoHow to format WORD data using edit field?
My source data in EXCEL show 0.1. But when I merge into WORD, it show 9.15....E-2b. How can I make it show 0.1 and exactly to 1 decimal place?
1 AnswerProgramming & Design8 years agoQuestion on JAVA concurrency?
Original question is here.
Need help badly! Please help if you can. I have been trying and trying for more than 2 weeks :(
http://sg.answers.yahoo.com/question/index;_ylt=Aq...
I have modified the program but still not getting what I want.
Cook class:
https://dl.dropbox.com/u/104150374/Cook.java
Savage class:
https://dl.dropbox.com/u/104150374/Savage.java
Admin class:
https://dl.dropbox.com/u/104150374/Admin.java
My wrong output:
https://dl.dropbox.com/u/104150374/my%20output.txt
The correct output suppose to look like this:
https://dl.dropbox.com/u/104150374/Correct%20outpu...
Why does my method getAServing() gets interrupted even though I already have synchronized keyword?
I thought when a Savage thread run, it calls the getAServing. when it finds that numOfServings[0]==0, it should complete
numOfServings[0]+=c.putServingsInPot(); goes on the next line until the method is complete with numOfServings[0]--; All these is in a synchronized method.
But my output seems like before the assignment to numOfServings[0], the next thread run n check that numOfServings[0]==0 and print "There are no more missionaries in the pot!"
But I have already used synchronized.
Thanks very much!
1 AnswerProgramming & Design8 years agoProducer Consumer Problem in JAVA?
I'm suppose to write a program to simulate concurrent processing.
A tribe of savages eats communal dinners from a large pot that can hold M servings of stewed missionaries. When a savage wants to eat, he helps himself from the pot, unless it is empty. If the pot is empty, the savage wakes up the cook and then waits until the cook has refilled the pot.
Admin class: This class creates the cook and generates arrival of 10 savages. The class also keeps track of the number of servings in the pot (using an array of size 1) and prints the number of servings left in the pot after all the savages have eaten. (An incomplete class is provided below)
Cook class: This class models the cooking done by the cook.
It should have a method putServingsInPot() that performs the following:
- generate a random number M (between 1 and 5 inclusive)
- show a message the cook has put M missionaries into the pot.
- include a timing delay to represent the cooking relative to M.
This method is invoked only when the pot is empty.
Savage class: This class models the behaviour of the savages.
It should have a suitable method that performs the following:
- get a serving from the pot
- include a timing delay to represent the time spent eating
- deduct one serving from the pot
- show messages that the savage starts eating and has finished eating
When getting a serving from the pot, if the pot is empty, the cook’s method putServingsInPot() needs to be invoked.
These are my codes but the output is totally wrong. But I just can't understand where goes wrong. My wait() and notifyAll() doesn't work. Please help!
https://dl.dropbox.com/u/104150374/Admin.java
https://dl.dropbox.com/u/104150374/Cook.java
https://dl.dropbox.com/u/104150374/Savage.java
https://dl.dropbox.com/u/104150374/Timer.java
This is the expected output:
https://dl.dropbox.com/u/104150374/Expected%20outp...
But I got this: :(
https://dl.dropbox.com/u/104150374/My%20wrong%20ou...
This is the incomplete Admin class provided as part of the question:
public class Admin
{
public static void main (String[] args)
{
Cook cook = new Cook();
Savage[] savage = new Savage[10];
int[] numOfServings = new int[1];
//supply codes for running the objects here
System.out.println("Ending...There are " + numOfServings[0] + " missionarie left in the pot");
}
}
2 AnswersProgramming & Design8 years agoHow can I replace row 99 with a variable?
I want to replace row 99 below with newBizLastRow. What is the syntax to do this?
Sub HideNewBizRows()
With ActiveSheet.PivotTables("YTDNewBizComm").TableRange2
newBizLastRow = .Cells(.Cells.Count).Row
End With
With ActiveSheet.PivotTables("YTDComm").TableRange2
'how to replace 99 with variable?
.Rows(.Rows.Count + 2 & ":99").Select
End With
Selection.EntireRow.Hidden = True
End Sub
1 AnswerProgramming & Design8 years agoIs it possible to execute the code by multiple threads simultaneously?
public class Counter
{
protected long count = 0;
public void add (long value)
{
this.count = this.count + value;
}
}
a) Yes. Code will execute without problem.
b) No. Code will not be able to compile at all.
c) No. Code will create race condition.
d) Yes. Code will execute with correct output.
2 AnswersProgramming & Design8 years agoHow to avoid race conditions?
a) Ensure that the blocked thread gets running when the awaited event occurs.
b) Threads must immediately release resources when not in use.
c) Each thread must get all resources before it can execute.
d) Threads must be synchronized.
2 AnswersProgramming & Design8 years agoQuestion on password management?
One of the common practices to prevent intruders is to lock an account if a few wrong passwords are presented. The network traffic can also be encrypted as well. Are these forms of preventive practice sufficient to deter intruders from obtaining the password? Why or why not?
2 AnswersSecurity8 years agoHow cryptography may have used security attacks and achieve a secure e-commerce environment?
In recent years, security has become an important aspect in e-commerce. Security attacks have also grown in sophistication.
How cryptography may have used to address some of these attacks and achieve a secure e-commerce environment and what are some of the issues that may be encountered (in introducing and using cryptography)?
2 AnswersSecurity8 years agoHow to make macro run at a click of a button in EXCEL?
I have a macro in my excel workbook. Now in order to run the macro, I need to go to Macro and click on it. I tried creating a button using ActiveX Control. But I don't know how to make the button click to run my Macro. Please help.
3 AnswersSoftware8 years agoExcel help needed!! How to insert dotted line in between bar in chart?
I have 9 horizontal bars that are all less than 200, and 1 bar that is 1800. Is it possible to show like first 200 value, and maybe last 200 values, in between represented by zig zag line?
1 AnswerSoftware8 years agoIn database design, can alternate key be set to NULL?
2 AnswersProgramming & Design9 years agoThe keyword ALTER is never used to make change to which definition in SQL Server?
a) table definition
b) trigger
c) column definition
d) user data
I think it might be user data, because user data should be changed using UPDATE. But could be trigger too. I never seen command like ALTER trigger. I'm not sure which is be the answer. Please help!
1 AnswerProgramming & Design9 years agoWhich of the follow about trigger and stored procedure in SQL server is false?
a) A trigger cannot have parameter but a stored procedure can have.
b) A trigger does not contain application logic but a stored procedure can contain application logic
c) A trigger is not explicitly called but a store procedure is
d) A trigger is attached to a table or a view but a stored procedure is not
I'm rather sure that d is true. But for the other 3. Please help.
2 AnswersProgramming & Design9 years ago