Questions
1. Explain why a transaction may have many cursors. Also, how is it possible that a...

1. Explain why a transaction may have many cursors. Also, how is it possible that a transaction may have more than one cursor on a given table? Support your answer with example.

2. After a DBMS has been selected, what is the DBA’s role in DBMS maintenance?

3. Do you think, splitting a table might improve performance? Why/why not.

In: Computer Science

Python Script: Question: Please edit my script for it to get to the right directory and/or...

Python Script:

Question: Please edit my script for it to get to the right directory and/or folder. How to get the right files in the folder to display under files. I don't want anymore errors. Thanks-

#Program to combine multiple excel file into one master file/spreadsheet

#import library

import os
import pandas as pd
cwd = os.path.abspath(")
files = os.listdir(cwd)

#Combine multiple excel files
#This blocks of code will loop through files in directory/folder and append/merge .xlsx files

df = pd.DataFrame()
for file in files:
   if file.endswith('.xlsx'):
       df = df.append(pd.read_excel(file),ignore_index=True

#Display first 5 rows of data/records
df.head()

#Display total columns and rows
df.shape()

df.to_excel('Output.xlsx')

In: Computer Science

Exercise 1 – Calculating factorial (n!) Design a function calledget_factorial that takes an integer n as...

Exercise 1 – Calculating factorial (n!)

Design a function calledget_factorial that takes an integer n as a parameter, and returns n!.

Note #1: 0! = 1:

Note #2: n! is calculated by the following formula: ?! = ? ∗ (? − 1)! ?? ????h?? ???? ?? ??????? ??: ?! = ? ∗ (? − 1) ∗ (? − 2) ∗ ... ∗ 3 ∗ 2 ∗ 1

Exercise 2 – Counting the number of occurrences a letter is found in a phrase

Design a function called get_occurrences that takes two strings as a parameters, and returns the number of times first string appears in the second string.

For example: get_occurrences("x","anthony") à 0 (there are no x’s in Anthony) get_occurrences("y","anthony") à 1 (there is one y in Anthony) get_occurrences("n","anthony") à 2 (there are two n’s in Anthony)

We require that you use loops in your answer. In addition to using a loop, remember the helpful string operations we learned in lecture:

name = "Anthony”

len(name) -> 7

name[3] -> "h"

Exercise 3 – Counting the number of factors of a value within a given range

Design a function called count_multiples that takes three whole positive numbers as parameters. The first two parameters return a range of values to search; the function should return how many numbers within the range are multiples of the third parameter.

For example: count_multiples(1, 9, 2) -> 4 (as 2 goes into 2, 4, 6, and 8)

count_multiples(1, 8, 2) -> 4 (as 2 goes into 2, 4, 6, and 8)

count_multiples(2, 8, 2) -> 4 (as 2 goes into 2, 4, 6, and 8)

count_multiples(20, 28, 3) -> 3 (as 3 goes into 21, 24, and 27)

count_multiples(107, 255, 7) -> 21 (7 goes into 112, 119, ..., 245, 252)

Hint: As you are solving the problem, try and print out any multiples you find as you search the range of values (given by the first and second parameters).

Exercise 4 – Printing out 10 multiples per row

Design a function called print_ten_multiples that takes an integer as a parameter. The function should print out the first 10 multiples of all numbers from 1 up to the given number.

The values printed should be formatted with "3d". Example: print(format(x, "3d"))

Examples of how the function output should look with this formatting:

print_ten_multiples(3):

1 2 3 4 5 6 7 8 9 10

2 4 6 8 10 12 14 16 18 20

3 6 9 12 15 18 21 24 27 30

print_ten_multiples(11):

1 2 3 4 5 6 7 8 9 10

2 4 6 8101214161820

3 6 912151821242730

4 81216202428323640

5 10 15 20 25 30 35 40 45 50

6 12 18 24 30 36 42 48 54 60

7 14 21 28 35 42 49 56 63 70

8 16 24 32 40 48 56 64 72 80

9 18 27 36 45 54 63 72 81 90

10 20 30 40 50 60 70 80 90 100

11 22 33 44 55 66 77 88 99 110

tests = 0
passed = 0

def main():
   test_get_factorial()
   #test_get_occurrences()
   #test_count_multiples()
   #test_print_ten_multiples()
   print("Test results:", passed, "/", tests)


def test_get_factorial():
   print("testing get_factorial...")
   result = get_factorial(0)
   #TODO: add more tests here


def test_get_occurrences():
   print("testing get_occurrences...")
   result = get_occurrences("x","anthony")
   print_test("testing with x and anthony", result==0)
   #TODO: add more tests here


def test_count_multiples():
   print("testing count_multiples...")
   result = count_multiples(1, 9, 2)
   print_test("testing with 1, 9, 2", result==4)
   #TODO: add more tests here


def test_print_ten_multiples():
   print("testing print_ten_multiples")
   print("\nTesting with 3")
   print_ten_multiples(3) # expects final row to be 3 - 30
   #TODO: add more tests here


# TODO: Complete function design
def get_factorial(n):
   ...

# TODO: Complete function design
def get_occurrences(c, text):
   ...


# TODO: Complete function design
def count_multiples(start, end, n):
   ...

# TODO: Complete function design
def print_ten_multiples(max):
   ...


# (str, bool -> None)
# takes the name or description of a test and whether the
# test produced the expected output (True) or not (False)
# and prints out whether that test passed or failed
# NOTE: You should not have to modify this in any way.
def print_test(test_name, result_correct):
   global tests
   global passed
   tests += 1
   if(result_correct):
       print(test_name + ": passed")
       passed += 1
   else:
       print(test_name + ": failed")

# The following code will call your main function
if __name__ == '__main__':
   main()

In: Computer Science

State two reasons why reviewing past case decisions is important for learning business law. Please respond...

  1. State two reasons why reviewing past case decisions is important for learning business law.

Please respond in a full paragraph and justify your answers with reasoning.

In: Economics

Given a 2 Gbps link with TCP applications A, B, and C. Application A has 32...

Given a 2 Gbps link with TCP applications A, B, and C.

  • Application A has 32 TCP connections to a remote web server
  • Application B has 4 TCP connection to a mail server
  • Application C has 15 TCP connections to a remote web server.

According to TCP "fairness", during times when all connections are transmitting, how much bandwidth should Application C have? (Give answer in Mbps, rounded to one decimal place, without units. So for an answer of 1234,567,890 bps you would enter "1234.6" without the quotes.)

In: Computer Science

For a Normal distribution N (μ, σ), if we know the population standard deviation then we...

  1. For a Normal distribution N (μ, σ), if we know the population standard deviation then we can make an inference about:

  1. Mode

  2. Range

  3. Mean

  4. Median

  1. The Normal Distribution curve of heights of a large population of people indicates that the mean height (μ) of the population is 5 feet 6 inches. The 1 standard deviation (σ) in height variation is 2 inches. The people who have the heights between 5 feet 2 inches and 5 feet 10 inches represent:

    1. the range of +1σ to -1 σ

    2. the range of +2σ to -2 σ

    3. the range of +3σ to -3 σ

  2. The Normal Distribution curve of heights of a large population of people indicates that the mean height (μ) of the population is 5 feet 3 inches. The 1 standard deviation (σ) in height variation is 2 inches. The people who have the heights between 4 feet 11 inches and 5 feet 7 inches represent:

    1. the range of +2σ to -2 σ

    2. the range of +σ to -σ

    3. the range of +3σ to -3 σ

  1. The Normal Distribution curve of heights of a large population of people indicates that the mean height (μ) of the population is 5 feet 5 inches. The 1 standard deviation (σ) in height variation is 2 inches. The people who have the heights between 5 feet 3 inches and 5 feet 7 inches represent:

    1. the range of +2σ to -2 σ

    2. the range of +σ to -σ

    3. the range of +3σ to -3 σ

CENTRAL LIMIT THEOREM (Sampling Distribution)

  1. According to the Central Limit Theorem , as the SRS increases, that is as n INCREASES, the sample mean is

  1. Closer to the population mean µ

  2. Away from the population mean µ

  1. According to the Central Limit Theorem, as the SRS increases, that is as n INCREASES, the sample distribution becomes

  1. Left-skewed distribution

  2. Right-skewed distribution

  3. Normal Distribution

A random survey test was given to 100 students. The average score (mean) x was 75. The standard deviation, σ, was 20. Answer the following questions based on this information. Note: n = 100 and look at PPT on Confidence Interval posted on BB.

  1. The ‘Law of Large Numbers’ states that as no. of observations drawn INCREASES, the observed mean gets closer to the

  1. Standard deviation of the population

  2. Probability of the population

  3. Mean of the population

  1. The standard deviation of a Normal Distribution of IQ of a population of adults is 15. For a simple random size (SRS) of 9 from this population, the standard deviation for the sampling distribution will be:

  1. 15

  2. 15/9

  3. 9

  4. 5

  1. The 95%-confidence interval means that we got these numbers using a method that gives CORRECT results …… of the times.

  1. 68%

  2. 100%

  3. 99.7%

  4. 95%

  1. The 95%-confidence interval means that the MARGIN OF ERROR is only:

  1. 95%

  2. 5%

  3. 68%

  4. 99.7%

  1. The margin of error for a sample of n =1000 will be ……. for a sample of n =50.

  1. Less than

  2. Greater than

  3. Equal to

  1. For a sample size of ‘N’ the degrees of freedom for some statistical tests can be computed from the formula:

  1. N-5

  2. N-2

  3. N-3

  4. N-4

HYPOTHESIS TESTING (Read the chapter and you will find the answers)

  1. A Hypothesis always refers to a …….of population.

  1. Mean

  2. Standard deviation

  1. The hypothesis that “The more beer you drink…the higher your blood alcohol level will be” an example of:

    1. Null Hypothesis

    2. Alternative Hypothesis

  1. The value of α = 0.05 means that we are requiring that data give evidence AGAINST the Null Hypothesis so strong that it would happen ……… of the time.

  1. No more than 95%

  2. No less than 95%

  3. No more than 5%

  4. No less than 50%

In: Math

3. Work is inputted to isothermally move a 1500 Kg mass from an elevation of zero...

3. Work is inputted to isothermally move a 1500 Kg mass from an elevation of zero to 35m and to change it velocity. The initial velocity of the mass is 0.55 m/s. The drag work for this process is described by a force which varies over the distance travel, F = ax + b; where F is in Newtons, the coefficient (a) has units of N/m and the constant (b) has units of N. For this application a = 4.1 N/m and b = 700 N. The force is applied over a distance of 1730 m. There is a heat loss from friction of 1.1(106 ) J during this process. Determine the final velocity of the mass.

3b. The input work for this process is from a combustion engine that has an efficiency of 0.28. The heating value of the fuel is 30.0 MJ/liters and its cost is $0.83/liter. Determine the volume of fuel required and its cost to perform the process described in (3.).

Please solve with sketches and clear equations. Thanks!

In: Physics

Henry Hawkins Industries of Batavia, Ohio, manufactures and sells one product. The company assembled the following...

Henry Hawkins Industries of Batavia, Ohio, manufactures and sells one product. The company assembled the following projections for its first year of operations:

Variable costs per unit:
Manufacturing:
Direct materials $ 20
Direct labor $ 16
Variable manufacturing overhead $ 4
Variable selling and administrative $ 2
Fixed costs per year:
Fixed manufacturing overhead $ 450,000
Fixed selling and administrative expenses $ 70,000

During its first year of operations Henry Hawkins expects to produce 25,000 units and sell 20,000 units. The budgeted selling price of the company’s only product is $66 per unit.

Required:

(answer each question independently by referring to the original data):

1. Assuming that Henry Hawkins' projections are accurate, what will be its absorption costing net operating income (loss) in its first year of operations?

2. Henry Hawkins is considering investing in a higher quality raw material that will increase its direct materials cost by $1 per unit. It estimates that the higher quality raw material will increase sales by 1,000 units. What will be the company’s revised absorption costing net operating income (loss) if it invests in the higher quality raw material and continues to produce 25,000 units?

3. Henry Hawkins is considering raising its selling price by $1.00 per unit with an expectation that it will lower unit sales by 1,500 units. What will be the company’s revised absorption costing net operating income (loss) if it raises its price by $1.00 and continues to produce 25,000 units?

4. Assuming that Henry Hawkins' projections are accurate, what will be its variable costing net operating income (loss) in its first year of operations?

5. Henry Hawkins is considering investing in a higher quality raw material that will increase its direct materials cost by $1 per unit. It estimates that the higher quality raw material will increase sales by 1,000 units. What will be the company’s revised variable costing net operating income (loss) if it invests in the higher quality raw material and continues to produce 25,000 units?

6. Henry Hawkins is considering raising its selling price by $1.00 per unit with an expectation that it will lower unit sales by 1,500 units. What will be the company’s revised variable costing net operating income (loss) if it raises its price by $1.00 and continues to produce25,000 units?

7. What is Henry Hawkins' break-even point in unit sales? What is its break-even point in dollar sales?

8. What is the company’s projected margin of safety in its first year of operations?

In: Accounting

price quantity TR MR TFC TVC TC MC ATC AVC Profit $2.50 0 $2.25 100 $2.00...

price quantity TR MR TFC TVC TC MC ATC AVC Profit
$2.50 0
$2.25 100
$2.00 200
$1.75 300
$1.50 400
$1.25 500
$1.00 600
$.75 700
$.50 800

Paula's Pralines produces pralines in a highly, but not perfectly, competitive market. Paula rents her commercial kitchen for $150/day. Each 100 pralines costs Paula $65 for ingredients and one hour of labor. Paula pays her workers $10/hour. Demand for Paula's Pralines is given in the demand schedule below.

  1. Fill in a table like the one below showing Paula's costs and revenues for one day. Included the values given for price and quantity, as well as total revenue (TR), marginal revenue (MR), total fixed cost (TFC), total variable costs (TVC), total cost (TC), marginal cost (MR), average total cost (ATC), and average variable cost (AVC), and profit.
  2. Graph Paula's demand, MR, MC, ATC, and AVC curves. Indicate on your graph Paula's profit-maximizing price and quantity.
  3. Write an analysis of Paula's firm, including the answers to the following questions, remembering to craft your response as a paper rather than as the answers to a series of short answer questions.
    • Identify Paula's fixed and variable expenses.
    • Explain what happens to ATC and AC as output increases and why this happens.
    • Explain what happens to MR as output increases and why this happens.
    • Explain how you determined the profit-maximizing price and quantity.
    • Illustrate why this is profit-maximizing by explaining what would happen if Paula tries to raise or lower her price while still producing the same quantity.
    • What is most likely to happen in the handmade candy market in this town?
  4. Paula's town is growing rapidly and a shortage of spaces to rent develops, so Paula's landlord, like most in town, doubles her rent.
    • Complete a new table of costs with the rent now $300/day. (Hint: Copy and paste your table from #3, then change only the numbers which will be different now.)
    • At what price and quantity should Paula operate now? What are the long-run implications for Paula's business?
  5. Because of the increase in rents, the city decides to implement a minimum wage of $15/hour.
    • Complete a new table of costs with the cost of labor now $15/hour.
    • At what price and quantity should Paula operate now? What are the long-run implications for Paula's business?
    • What will probably be happening in the industry now?

-I need help finishing the graph above

In: Economics

How can molecular genetics be applied to achieve the UN sustainable development goal on "zero goal...

How can molecular genetics be applied to achieve the UN sustainable development goal on "zero goal "

In: Biology

What methods can be used in the selection of candidates for expatriate assignments? Which are considered...

What methods can be used in the selection of candidates for expatriate assignments? Which are considered to be the most important, and why?

In: Operations Management

How would I create a network using packet tracer with these attributes?   6 workstations, 1 switch...

How would I create a network using packet tracer with these attributes?  

6 workstations, 1 switch (2950T), Subnet for the is 10.10.10.0/28 , Create 2 VLANs on each switch (VLAN 10 and 20), Add 3 workstations to VLAN 10 and 3 workstations to VLAN 20, Only workstations on the same VLAN should be able to communicate with each other

In: Computer Science

Please, list some key characteristics of public and private real estate.

Please, list some key characteristics of public and private real estate.

In: Economics

What is the intensity in W/m² of a laser beam used to burn away cancerous tissue...

What is the intensity in W/m² of a laser beam used to burn away cancerous tissue that, when 93.5% absorbed, puts 493 J of energy into a circular spot 2.13 mm in diameter in 3.70 s?

_______________W/m²

How many times more intense is this than the maximum intensity of direct sunlight (about 1360 W/m²)?

_______________

In: Physics

Given an array of integers, implement (in Java) the moveAllNegativeOne method to move all -1 present...

Given an array of integers, implement (in Java) the moveAllNegativeOne method to

move all -1 present in the array to the end. The algorithm should maintain the relative

order of items in the array and worst-case running time complexity must be linear.

Example:

Input: [6, -1, 8, 2, 3, -1, 4, -1, 1]

Output: [6, 8, 2, 3, 4, 1, -1, -1, -1]

Important Notes:

• You must add the main method in your program in Java in order to test your

implementation.

• You can use the array of the previous example to test your program, however, I

suggest that you also use other input arrays to validate the correctness and

efficiency of your solution.

• Your program MUST be submitted only in source code form (.java file).

• A program that does not compile or does not run loses all correctness points.

  • Comment on all functions purposes

In: Computer Science