Questions
What is a deadlock in SQL Server transaction processing? Are they preventable, if so how?

What is a deadlock in SQL Server transaction processing? Are they preventable, if so how?

In: Computer Science

MATLAB QUESTION HOW TO FOLLOW TO EACH STEPS PLEASE GIVE TO EXPLAIN EACH SECTION THANKS! %...

MATLAB QUESTION

HOW TO FOLLOW TO EACH STEPS PLEASE GIVE TO EXPLAIN EACH SECTION THANKS!

% Section 1

clear variables;
close all;
clc;

% Use the "Run Section" button as you complete this script

% Given the matrix A and the vector B

A = [ 1 -4 2
-2 3 3
5 2 1];

b = [ -2
3
5];

% Calculate the product of A x B in the space below (grade = 10 points)


% Calculate the product of inverse(A) x B in the space below (10 points)


% Calculate c = the numeric value in the second row and
% first column of matrix [A] in the space below (10 points)

%% Section 2

clear variables;
close all;
clc;

% Create a variable x = range of 10 numbers
% between -pi and pi (radians) (grade = 10 points)

% Set y = sin(x) in the space below (10 points)


% Set z = x * sin(x) in the space below (10 points)
% HINT: You will need the .* for this operation instead of *

% Plot y and z versus x between the "hold on" and "hold off" commands
% Label the x and y axes properly and use appropriate units (10 points)
% use xlabel('Angle (Radians)')
% use ylabel('sin(x) and x sin(x)')
% Plot y using a blue line with circular markers (10 points)
% On the same plot, include z using a red line with triangular margers
% (1 point)
% use legend('sin(x)','x sin(x)') (10 points)
hold on

hold off


% After completing your script, click the "PUBLISH" tab
% Click the button in the "PUBLISH" tab, which is labeled Publish  

In: Computer Science

Consider Saudi Telecom Company (STC) as an example. 1- Define Critical Success Factors ( CSF )...

Consider Saudi Telecom Company (STC) as an example.

1- Define Critical Success Factors ( CSF ) and Key Performance Indicators ( KPI ).
2- Explain how managers use them to measure the success of the Management Information System ( MIS ) projects.

In: Operations Management

Explain the difference between the CPU and I/O cycles that make up a program. Can a...

  1. Explain the difference between the CPU and I/O cycles that make up a program.
  2. Can a process run during an I/O cycle?
  3. Explain how the Process Control Block (PCB) is used to manage a process within the system.

In: Computer Science

4. Space-multiplexed sharing is the division of a resource into two or more distinct units and...

4. Space-multiplexed sharing is the division of a resource into two or more distinct units and then the allocation of the individual units to processes. Time-multiplexed sharing is when one process can use the entire resource for a period of time and then another process uses it at a later time. Identify the following as either space-multiplexed sharing or time-multiplexed sharing. Can the usage of some resources be both space-multiplexed sharing and time-multiplexed sharing depending on the resource is used?

a. The land in a residential subdivision

b. A personal computer

c. A whiteboard in a classroom

d. A bench seat on a bus

e. A single-user file in UNIX

f. A printer on a timesharing system

g. The heap in the C/C++ runtime system

In: Computer Science

Exercise 2. Automate the boring stuff, page 77, Input Validation. Add try and except statements to...

Exercise 2. Automate the boring stuff, page 77, Input Validation. Add try and except statements to the previous project to detect whether the user types in a noninteger string. Normally, the int() function will raise a ValueError error if it is passed a noninteger string, as in int('puppy'). In the except clause, print a message to the user saying they must enter an integer.

THis is the previous project

#function definition
def collatzSequence(number):
#
    if number % 2 == 0:
        print((number) // 2)
        return number // 2

    else:
        nextNumber = 3*(number)+1
        print(nextNumber)
        return nextNumber

n = input("Please input an integer: ")
while n != 1:
    n = collatzSequence(int(n))

In: Computer Science

Implement and test a TaskList application in Java that will allow a client to manage information...

Implement and test a TaskList application in Java that will allow a client to manage information about daily tasks.  A task has a task name, is scheduled on a specific day of the week and can have a comment attached to it. Together, the task name and day uniquely identify a task. There may be tasks with the same name scheduled for different days of the week. The application should allow the client to start with an empty TaskList and then manage it by adding, deleting, searching and displaying information about tasks from the TaskList according to the specifications below.

Your application should offer the client a menu with the following operations:

                0. Exit.

1. Add a task.

                2. Delete a task on a specified day.

                3. Delete a specified task.

                4. Print content of TaskList.

                5. Search day for tasks.

Here is the specification of the functionality of the TaskList application:  

1. Add a task: Adds information about a task to the TaskList. Requests the following input from the client: day, task name, and comment. If there is already a task with this name scheduled for that week day, the task cannot be added and the user should be notified of this fact.

2. Delete a task on a specified day:  Deletes a specified task on a specified day from the TaskList. Requests the following input from the client: task name and day. The user should be notified if there is no task with that name scheduled for that day in the TaskList.

3. Delete a specified task. Deletes a specified task from any day it may appear in the TaskList. Requests the following input from the client: task name. The user should be notified if there is no task with that name in the TaskList.

4. Display content of TaskList: Displays information about all tasks in the TaskList. Requests the following input from the client: None. For each task in the TaskList, displays task name, day it is scheduled on and comment attached to it.

5. Search day for tasks: Displays information about the tasks registered for a specified day. Requests the following input from the client: day.

Hint:  Make sure that you use object oriented design in your solution. In future applications the TaskList class may be used in an application used to manage several clients’ task lists. You should be able to extend your design without changes to the TaskList.

In: Computer Science

You are an apple farmer who sell apples by the boxes. Each box contains 6 Apples....

You are an apple farmer who sell apples by the boxes. Each box contains 6 Apples. You have 30 boxes of apples. Price of each box is $20. Using cout object as studied in the class and by use of algorithm(s), display following in the format as written below:

1. Total number of apples in all boxes are ______________
2. Total apples will be sold for $_____________________

Upload your assignment here.

using python and no copy from other assingment and it has to be only pseduco

In: Computer Science

Discuss some factors that must be considered in determining the process maximum capacity in a multiprogramming...

Discuss some factors that must be considered in determining the process maximum capacity in a multiprogramming environment.

In: Computer Science

A flywheel with a radius of 0.700m starts from rest and accelerates with a constant angular...

A flywheel with a radius of 0.700m starts from rest and accelerates with a constant angular acceleration of 0.200rad/s2

A. Compute the magnitude of the resultant acceleration of a point on its rim after it has turned through 60.0 ?.

B. Compute the magnitude of the resultant acceleration of a point on its rim after it has turned through 120.0 ?.

In: Physics

This program will store roster and rating information for a basketball team. Coaches rate players during...

This program will store roster and rating information for a basketball team. Coaches rate players during tryouts to ensure a balanced team. A roster can include at most 10 players.

(1) Prompt the user to input five pairs of numbers: A player's jersey number (0 - 99) and the player's rating (1 - 9). Store the jersey numbers in one int array and the ratings in another int array. Output these arrays (i.e., output the roster).

Ex:

 

(2) Implement a menu of options for a user to modify the roster. Each option is represented by a single character. The program initially outputs the menu, and outputs the menu after a user chooses an option. The program ends when the user chooses the option to Quit.

Ex:

 

(3) Implement the "Output roster" menu option.

Ex:

 

(4) Implement the "Add player" menu option. If the user chooses this option and the roster is full, print the following error message:

 

If the roster is not full, prompt the user for a new player's jersey number and rating, and append the values to the two arrays.

Ex:

 

(5) Implement the "Delete player" menu option. If the user chooses the option when the roster is empty, immediately print the message:

 

If the roster is not empty, prompt the user for a player's jersey number. Remove the player from the roster (delete the jersey number and rating), paying attention not to leave unused spaces in the two arrays.

Ex:

 

If the given jersey number is not found, inform the user:

 

(6) Implement the "Update player rating" menu option. Prompt the user for a player's jersey number. Prompt again for a new rating for the player, and then look up and change that player's rating.

Ex:

 

In this case, if the given jersey number is not found, no further action is taken (note that the format of the program requires both input either way).

(7) Implement the "Output players above a rating" menu option. Prompt the user for a rating. Print the jersey number and rating for all players with ratings above the entered value.

Ex:

 

If no players are found above a given rating, the program will simply produce an empty list.

BONUS

For an extra 10 points, implement a secret option s that prints the message:

 

and sorts the roster by jersey number. Do not add this option to the MENU message. And remember to move the player rating accordingly!

I need help with my HW its in C++. it also asking for an input. thank you!!

In: Computer Science

Design a class named Employee. The class should keep the following information in fields: ·         Employee...

Design a class named Employee. The class should keep the following information in fields:

·         Employee name

·         Employee number in the format XXX–L, where each X is a digit within the range 0–9 and the L is a letter within the range A–M.

·         Hire date

Write one or more constructors and the appropriate accessor and mutator methods for the class. Next, write a class named ProductionWorker that inherits from the Employee class. The ProductionWorker class should have fields to hold the following information:

·         Shift (an integer)

·         Hourly pay rate (a double)

·         Add hours and calculate pay

The workday is divided into two shifts: day and night. The shift field will be an integer value representing the shift that the employee works. The day shift is shift 1 and the night shift is shift 2. Write one or more constructors and the appropriate accessor and mutator methods for the class. Demonstrate the classes by writing a program that uses a ProductionWorker object.

In: Computer Science

The following questions are on recursion in C++ Programming. I had some trouble with these questions,...

The following questions are on recursion in C++ Programming.

I had some trouble with these questions, can you please help me? Thank you!

Consider the following recursive function

void funcEx8(int u, char v) //Line 1

{ //Line 2

if (u == 0) //Line 3

cout << u << " "; //Line 4

else //Line 5

{ //Line 6

int x = static_cast (v); //Line 7

if (v < 'A') //Line 8

v = static_cast (x + 1); //Line 9

else if (v > 'Z') //Line 10

v = static_cast (x - 1); //Line 11

cout << v << " "; //Line 12

funcEx8(u - 2, v); //Line 13 }

//Line 14 }

//Line 15 }

Identify the base case? Using line numbers

a.

Lines 3,4

b.

Lines 1 through 4

c.

Lines 7,8

d.

Lines 5,6

Consider the following recursive function

void funcEx8(int u, char v) //Line 1

{ //Line 2

if (u == 0) //Line 3

cout << u << " "; //Line 4

else //Line 5

{ //Line 6

int x = static_cast (v); //Line 7

if (v < 'A') //Line 8

v = static_cast (x + 1); //Line 9

else if (v > 'Z') //Line 10

v = static_cast (x - 1); //Line 11

cout << v << " "; //Line 12

funcEx8(u - 2, v); //Line 13 }

//Line 14 }

//Line 15 }

Identify the Recursive case? Using line numbers

a.

Lines 5 Through 15

b.

Lines 3,4

c.

1,2

d.

Lines 2,3

Consider the following recursive function

void funcEx8(int u, char v) //Line 1

{ //Line 2

if (u == 0) //Line 3

cout << u << " "; //Line 4

else //Line 5

{ //Line 6

int x = static_cast (v); //Line 7

if (v < 'A') //Line 8

v = static_cast (x + 1); //Line 9

else if (v > 'Z') //Line 10

v = static_cast (x - 1); //Line 11

cout << v << " "; //Line 12

funcEx8(u - 2, v); //Line 13 }

//Line 14 }

//Line 15 }

Valid or Invalid

funcEx8(26, '$'); is a valid call,

a.

None

b.

Yes and No

c.

No

d.

Yes

Consider the following recursive function:

void recFun(int u)

{

if (u == 0) cout << "Zero! ";

else

{

cout << "Negative ";

recFun(u + 1);

}

}

what is the output if recFun(8)

a.

Infinite loop, nonegative

b.

5

c.

0

d.

8

Consider the following recursive function:

void recFun(int u)

{

if (u == 0) cout << "Zero! ";

else

{

cout << "Negative ";

recFun(u + 1);

}

}

. what is the output if recFun(0)

a.

12

b.

infinite loop

c.

8

d.

zero

Consider the following recursive function:

void recFun(int u)

{

if (u == 0) cout << "Zero! ";

else

{

cout << "Negative ";

recFun(u + 1);

}

}

. what is the output if recFun(-2)

a.

8

b.

Negative Negative Zero!

c.

-2

d.

zero

Consider the following recursive function:

void recFun(int x)

{

if (x > 0)

{ cout << x % 10 << " ";

recFun(x / 10);

}

else

if (x != 0)

cout << x << endl;

}

what is the output of the above statement if recFun(258)?

a.

12

b.

3 4 6

c.

15

d.

8     5       2

Consider the following recursive function:

void recFun(int x)

{

if (x > 0)

{ cout << x % 10 << " ";

recFun(x / 10);

}

else

if (x != 0)

cout << x << endl;

}

. what is the output of the above statement if recFun(7)?

a.

7

b.

8

c.

8   5     2

d.

12

Consider the following recursive function:

void recFun(int x)

{

if (x > 0)

{ cout << x % 10 << " ";

recFun(x / 10);

}

else

if (x != 0)

cout << x << endl;

}

what is the output of the above statement if recFun(36)?

a.

5 3 8

b.

12

c.

6 3

d.

2 4 5

Consider the following recursive function:

void recFun(int x)

{

if (x > 0)

{ cout << x % 10 << " ";

recFun(x / 10);

}

else

if (x != 0)

cout << x << endl;

}

what is the output of the above statement if recFun(-85)?

a.

12

b.

-85

c.

8     5    2

d.

85

In: Computer Science

Let C0=[0,1]. Cn is obtained by removing the middle open interval of length α/3n from each...

Let C0=[0,1]. Cn is obtained by removing the middle open interval of length α/3n from each interval of Cn-1 where α∈(0,1).

Let C=⋂Cn. Prove that C contains only boundary points, i.e., x∈C is a boundary point of C if every neighborhood of x contains at least one point in C and at least one point not in C.

In: Advanced Math

The Eastern Washington County School Corporation is interested in comparing educational performance at four elementary schools...

The Eastern Washington County School Corporation is interested in comparing educational performance at four elementary schools and has hired you to prepare a DEA model to do so. After detailed conversations with the corporation administrative staff and the building principals, you have isolated the following input and output measurements:

Input Measures

Output Measures

Average classroom size

Percent of children in remedial classes

Percent of students on reduced-price lunch

Average first-grade score on the standard test

The average number of parent volunteer hours per week

Average fifth-grade score on the standard test

Data is collected for each school on each measure

                                   School

Archer

Hayes

Ralston

Creekside

Inputs

   Classroom size

21

28

32

20

   % reduced lunch

10

8

25

2

   Avg. vol. hours

30

46

15

64

Outputs

   % remediation

15

12

19

3

   1st grade score

83

84

62

85

   5th grade score

76

72

53

79

Develop the DEA model that would evaluate the efficiency of Ralston Elementary School.

  1. Define the decision variables.
  2. Define the objective function.
  3. Define the constraints.
  4. Determine an optimal solution.

In: Operations Management