Questions
1. How do you feel about reading books compared to watching movies? Is there one experience...

1. How do you feel about reading books compared to watching movies? Is there one experience you enjoy more than the other or do you enjoy them equally? What are some things you like about reading? What are some things you enjoy about movies? You can refer to specific books and movies in your answer.

2. How do you feel about documentary and non-documentary films? Is there one genre you prefer more than the other or do you like them equally? Why? What do you feel are some of the similarities and differences between documentary and non-documentary films?

In your answer you can mention some specific documentary films you have seen or are familiar with

In: Economics

What is the product of 4-tert-butyl phenol reacted with p-bromobenzyl bromide when potassium hydroxide and ethanol...

What is the product of 4-tert-butyl phenol reacted with p-bromobenzyl bromide when potassium hydroxide and ethanol is added with microwave heating.

In: Chemistry

Explain why chemogenetic based methods of regulating cellular signaling result in poor temporal control of biochemical...

Explain why chemogenetic based methods of regulating cellular signaling result in poor temporal control of biochemical pathways relative to optogenetic based methods.

In: Biology

Thomas Abramson is a quality control manager for Capitol-IZE Pharmaceutical Company, Inc. The company is headquartered...

Thomas Abramson is a quality control manager for Capitol-IZE Pharmaceutical Company, Inc. The company is headquartered and has its principal production facility in Indianapolis, Indiana. For several years, Capitol-IZE Pharmaceutical has been engaged in the research and development of a new cancer drug, Izerion. As part of the federal regulatory procedure for mass-marketing a new drug, Capitol-IZE Pharmaceutical applied to the Food and Drug Administration (FDA) for final approval of Izerion.

Yesterday, Abramson's supervisor informed him in somber fashion that the FDA had rejected the company's application for final approval of Izerion. Apparently, the FDA was concerned about serious side effects that manifested during the drug's clinical trials. Abramson's supervisor further advised him that next Monday Capitol-IZE Pharmaceutical is scheduled to go public with a press release concerning the FDA's rejection of Izerion.

Abramson is frantic. He owns approximately 6,000 shares of Capitol-IZE Pharmaceutical stock, and he knows that news of the FDA's rejection of Izerion will be disastrous to the company, its employees, and its shareholders. Capitol-IZE Pharmaceutical stock is currently valued at $47.50 per share, and news of the FDA's disapproval of Izerion will likely drive the stock down to one-half of its current value.

Abramson quickly runs the numbers on his calculator. A reduction of 50 percent of the stock's value would represent a personal loss of $142,500. Abramson's Capitol-IZE Pharmaceutical stock is his only retirement plan, aside from a modest pension he will receive from the company (assuming the company survives the announcement).

Abramson has a plan. Today, he will instruct his financial planner to immediately sell all 6,000 shares of his Capitol-IZE Pharmaceutical Company, Inc., stock. Abramson rationalizes his decision by assuring himself that anyone else in his position would do the same thing.

Is Thomas Abramson plan legal? Is it ethical?

In: Operations Management

Done in C++ please. And use #include iostream, string, and fstream. do not use #include algorithm....

Done in C++ please. And use #include iostream, string, and fstream. do not use #include algorithm.

Question 1 In this question, you will read words from a file and place them into an array of type string.

1- Make a data text file “words.txt” – that contains one word on each line. Use at least 20 words.

2- Now write a program that reads the words in the file into an array of strings (a repeated word should not be inserted into the array – your program should not allow that and you should make sure your data file has duplicate words to test this functionality). Make your array size enough to hold 1000 words. To read the words into the array, you should make a function that takes a string array, a data size integer (dsize) by reference and an ifstream – please look at the example we did in class.

3- Declare your array and file streams in main and call the function that reads the data into the array.

4- Write a printArray function that takes a string array, the dsize and an ostream object so that you could print to the console or to an output file.

5- Print your array from main by calling the printArray function – once to the console and once to a file “wordsoutput.txt”.

6- Use the selectionSort Algorithm that we covered in class to sort the array.

7- Repeat #5 and make sure the array is sorted.

8- Find the maximum string and the minimum string in the array (remember arrays are compared based on the ASCII value).

9- Write a function that takes a string and converts every character of it to uppercase. Now call that function from a function that you pass the array and dsize to, to uppercase all words in the array (convert all words in the array to uppercase letter) and call that from main passing your array to that function. Print the array.

In: Computer Science

A thin-walled, hollow spherical shell of mass m and radius r starts from rest and rolls...

A thin-walled, hollow spherical shell of mass m and radius r starts from rest and rolls without slipping down the track shown in the figure (Figure 1) . Points A and Bare on a circular part of the track having radius R. The diameter of the shell is very small compared to h0 and R, and rolling friction is negligible. a) What is the minimum height h0 for which this shell will make a complete loop-the-loop on the circular part of the track? b) How hard does the track push on the shell at point B, which is at the same level as the center of the circle? c) Suppose that the track had no friction and the shell was released from the same height h0 you found in part (a). Would it make a complete loop-the-loop? d) In part (c), how hard does the track push on the shell at point A, the top of the circle? e) How hard did the track push on the shell at point A in part (a)?

In: Physics

1. How does the electrical current pathway differ between monopolar and bipolar? 2. Why might a...

1. How does the electrical current pathway differ between monopolar and bipolar?

2. Why might a patient’s jewelry be hazardous in the OR?

3. What are the safety precautions to be considered with the placement of the patient return electrode?

4. What are the three properties of laser light which are different than normal light?

5. How is distention achieved in minimally invasive procedures and why is it necessary?

6. What types of trocars are used for laparoscopy and what are their advantages?

7. Why are angled rigid endoscope used and in which types of procedures would they be preferred?

8. Which types of human motions or movements are surgical robots able to replicate?

9. What are the reasons for creating hybrid rooms within the operating room suite?

In: Nursing

Was inadequate regulation the reason for the demise of Northern Rock? Support your answer with evidence.

Was inadequate regulation the reason for the demise of Northern Rock? Support your answer

with evidence.

In: Economics

In an experiment performed at the bottom of a very deep vertical mine shaft, a ball...

In an experiment performed at the bottom of a very deep vertical mine shaft, a ball is tossed vertically in the air with a known initial velocity of 10.0 m/s, and the maximum height the ball reaches (measured from its launch point) is determined to be 5.101 m. Knowing the radius of the Earth, RE = 6370 km, and the gravitational acceleration at the surface of the Earth, g(0) = 9.81 m/s2, calculate the depth of the shaft.

In: Physics

Kindly type the answer but don't copy and paste - 250 words Compare and contrast the...

Kindly type the answer but don't copy and paste - 250 words

Compare and contrast the Linear Classifier and Decision Tree Classifier

In: Computer Science

Let x be the average number of employees in a group health insurance plan, and let...

Let x be the average number of employees in a group health insurance plan, and let y be the average administrative cost as a percentage of claims.

x 3 7 15 39 73

y 40 35 30 25 20

(a) Make a scatter diagram of the data and visualize the line you think best fits the data.

(b) Would you say the correlation is low, moderate, or strong? positive or negative?pLEASE SELECT CORRECT ANSWER

moderate and positive

low and negative

moderate and negative

low and positive

strong and positive

strong and negative

(c) Use a calculator to verify that Σx = 137, Σx2 = 7133, Σy = 150, Σy2 = 4750, and Σxy = 3250. Compute r. (Round your answer to three decimal places.) r =

As x increases, does the value of r imply that y should tend to increase or decrease? Explain. SELECT CORRECT ANSWER

Given our value of r, y should tend to decrease as x increases.

Given our value of r, y should tend to increase as x increases.

Given our value of r, y should tend to remain constant as x increases.

Given our value of r, we cannot draw any conclusions for the behavior of y as x increases.

In: Math

0. Introduction. This laboratory assignment involves designing a perfect hash function for a small set of...

0. Introduction.

This laboratory assignment involves designing a perfect hash function for a small set of strings. It demonstrates that a perfect hash function need not be hard to design, or hard to understand.

1. Theory.

We’ll start by reviewing some terminology from the lectures. A hash function is a function that takes a key as its argument, and returns an index into an array. The array is called a hash table. The object that appears at the index in that array is the key’s value.The key’s value is somehow associated with the key.
      A hash function may return the same index for two different keys. This is called a collision. Collisions are undesirable if we want distinct values to be associated with distinct keys. A hash function that has no collisions for a set of keys is said to be perfectfor that set. Note that a hash function may be perfect for some sets of keys, but not perfect for others.
      Most modern programming languages use a small set of reserved names as operators, punctuation, and syntactic markers. (They’re also called reserved words or keywords.) For example, Java currently uses reserved names like if, private, while, etc.
      A compiler for a programming language must be able to test if a name in a program is reserved. Programs may be hundreds or thousands of pages long, and may contain thousands or even millions of names. As a result, the test must be done efficiently. It might be implemented using a hash table and a perfect hash function.
      Here’s how the test may work. Suppose that the hash table T is an array of strings. Each time the compiler reads a name N, it calls a perfect hash function h to compute an index h(N). If h(N) is a legal index for T, and T[h(N)] = N, then the name is reserved, otherwise it is not. Unused elements of T might be empty strings "". If we measure the efficiency of a test by the number of string comparisons it performs, then the test requires only O(1) comparisons. Of course this works only if h is perfect for the set of reserved names.
      Now suppose there is a very simple programming language that uses the following set of twelve reserved names.

and

else    

or

begin

end

return

define  

if

then

do

not

while

We might define a perfect hash function for the reserved names in the following way. We get one or more characters from each name. Then we convert each character to an integer. This is easy, because characters are already represented as small nonnegative integers. For example, in the ASCII and Unicode character sets, the characters 'a' through 'z' are represented as the integers 97 through 122, without gaps. Finally, we do some arithmetic on the integers to obtain an index into the hash table. We choose the characters, and the arithmetic operations, so that no two reserved names result in the same index.
      For example, if we define the hash function h so that it adds the first and second characters of each name, we get the following indexes.

h("and")

  =  

207

h("begin")

  =  

199

h("define")

  =  

201

h("do")

  =  

211

h("else")

  =  

209

h("end")

  =  

211

h("if")

  =  

207

h("not")

  =  

221

h("or")

  =  

225

h("return")

  =  

215

h("then")

  =  

220

h("while")

  =  

223

This definition for h does not result in a perfect hash function, because it has collisions. For example, the strings "and" and "if" result in the index 207. Similarly, the strings "do" and "end" result in the index 211. We either didn’t choose the right characters from each string, or the right operations to perform on those characters, or both. Unfortunately, there is no good theory about how to define h. The best we can do is try various definitions, by trial and error, until we find one that is perfect.

2. Implementation.

Design a perfect hash function for the reserved names shown in the previous section. To do that, write a small test class, something like this, and run it with various definitions for the function hash. It calls hash for each reserved name, and writes indexes to standard output.

class Test  
{  
  private static final String [] reserved =  
   { "and",  
     "begin",  
     "define",  
     "do",  
     "else",  
     "end",  
     "if",  
     "not",  
     "or",  
     "return",  
     "then",  
     "while" };  
  
  private static int hash(String name)  
  {  
    //  Your code goes here.  
  }  
  
  public static void main(String [] args)  
  {  
    for (int index = 0; index < reserved.length ; index += 1)  
    {  
      System.out.print("h(\"" + reserved[index] + "\") = ");  
      System.out.print(hash(reserved[index]));  
      System.out.println();  
    }  
  }  
}

When defining hash, you might try adding characters at specific indexes from each name. You might try linear combinations of the characters: that is, multiplying the characters by small constants, then adding or subtracting the results. You might try the operator %. You might also try a mixture of these. Whatever you try, reject any definition of hash that is not perfect: one that returns the same index for two different names.
      Your method hash must work in constant time, without loops or recursions. It must not use if’s or switch’es. It must not call the Java method hashCode, because that uses a loop, and so does not work in O(1) time. It must not return negative integers, because they can’t be array indexes.
      The character at index k in name is obtained by name.charAt(k). Characters in Java Strings are indexed starting from 0, and ending with the length of the string minus 1. For example, the first character from name is returned by name.charAt(0), the second character by name.charAt(1), and the last character by name.charAt(name.length() - 1).
      Don’t worry if there are gaps between the indexes: your hash function need not be minimal. Also, try to keep the returned indexes small: they shouldn’t exceed 2000. For example, I know a perfect hash function for the reserved words in this assignment, whose indexes range from 1177 to 1413. I found it after about ten minutes of trial-and-error search.

In: Computer Science

What are the various ways you can analyze financial statements? Hint: Vertical and common-sized are the...

What are the various ways you can analyze financial statements? Hint: Vertical and common-sized are the same thing. Which method do you believe is used most often internally? Why? Which method do you believe is used most often by external stakeholders? Why? Of the different general types of ratios, liquidity, solvency, profitability, etc., which do you think are the most useful by the various stakeholders? Why?

In: Accounting

When choosing a topic, do you prefer to already know about it, or do you like...

When choosing a topic, do you prefer to already know about it, or do you like to choose topics that you know a little about? Why? What are the pros and cons of each of these choices?

In: Math

A 22- year-old woman presents to the ED with complaints of bladder fullness , incomplete bladder...

A 22- year-old woman presents to the ED with complaints of bladder fullness , incomplete bladder emptying , and severe pain in her right flank. She rates the pain a 9 on a 0-10 numeric pain scale. Patient states she has a history of kidney stones . She also states when she is able to void, it burns and has a foul odor . Vital signs: HR 85 , BP 120/80 , RR 16, SPO2 98% on RA, temp 100.9 (oral). Pt takes the following medications : Hydrochlorothiazide (HCTZ ) 25 mg PO daily , Detrol LA 2 mg PO daily Lab results : CBC : WBC 26 Urinalysis : WBC (too many to count), Bacteria (5+, large), Leukoesterase (+) Positive , Protein (-) negative , Ketones (-) negative.
Assessment? Diagnosis? Evaluation ? Implementation ? Planning?

In: Nursing