Explain and describe the concept of homogeneous matrix (projection) and how it is used in computer graphics
In: Computer Science
Scale-based classification for networks allows us to differentiate PANs, LANs, MANs, and WANs. Moreover, the structure of a network is defined using various network topological organizations, which include bus, ring, star, mesh, tree, and hybrid networks. Using the above two concepts, establish the relation between the various types of networks (PANs, LANs, MANs, and WANs), with the most suited network topology (bus, ring, mesh, tree, and hybrid). For each of the network types (PANs, LANs, MANs, and WANs), you may specify one or more network topology. However, for each of the cases, justify and explain why and how the specific topology is appropriate for the given context. Note: You may use external resources and readings. Make sure that you include proper references to sources that you have used to write the report. Word limit: 200 - 300 words
In: Computer Science
2 |
Insert a function in cell B2 to display the current date from your system. |
3 |
With cell B2 selected, set the width of column B to AutoFit. |
4 |
Insert a VLOOKUP function in cell C5 to display the ring cost for the first student. The cost of the ring type should be an exact match. Use appropriate relative and absolute cell references. |
5 |
Copy the formula from cell C5 to the range C6:C11. |
6 |
Apply Accounting number format to the range C5:C11. |
7 |
Insert an IF function in cell E5 to calculate the total due. If the student has chosen to personalize the ring, there is an additional charge of 5% located in cell B21 that must be added to the cost of the ring; if not, the student only pays the base price. Use appropriate relative and absolute cell references. |
8 |
Copy the formula from cell E5 to the range E6:E11. |
9 |
Apply Accounting number format to the range E5:E11. |
10 |
Insert a function in cell G5 to calculate the first student's monthly payment, using appropriate relative and absolute cell references. Ensure the result is a positive number. |
11 |
Copy the formula from cell G5 to the range G6:G11. |
12 |
Apply Accounting number format to the range G5:G11. |
13 |
Calculate totals in cells C12, E12, and G12. |
14 |
Apply Accounting number format to the cells C12, E12, and G12. |
15 |
Set 0.3" left and right margins and ensure the page prints on only one page. |
16 |
Insert a footer with your name on the left side, the sheet name in the center, and the file name on the right side. |
17 |
Save and close Exp19_Excel_Ch02_Cap_InlandJewelers.xlsx. Exit Excel. Submit the file as directed |
In: Computer Science
For this question, normalize the table to 3NF and draw the relational schema showing cardinalities.
UCLA just purchased several servers that are to be used for enterprise resource planning (ERP). The individual servers were purchased from different suppliers and these servers are running different software applications. UCLA also trained several of its staff to use these servers and each trained staff has an authentication code that allows the staff to use a specific software application on a specific server for a specific time period. Software license is for specific servers and a server could have multiple software applications at a time. Every supplier assigns a tech person with ID to support UCLA in case of any challenges. Each tech person provides a mobile phone number to be used to reach him. Servers have a purchase price.
Attributes are: ServerNo, SupplierID, SupplierName, SupplierPhone, SupplierTechID, SupplierTechName, SupplierTechPhone, SoftwareApplicationID, SoftwareApplicationName, SoftwareApplicationVendor, SoftwareApplicationLicenseExpires, SoftwareApplicationLicensePrice, StaffID, StaffName, StaffAuthenticationStarts, StaffAuthenticationEnds, StaffAuthenticationCode, PurchasePrice
In: Computer Science
Using the template given in ParallelMergeSort.c write the functions to divide the original array into equal fractions given the number of threads and perform Parallel MergeSort pThreads. Your algorithm should work for 2 threads.
ParallelMergeSort.c
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#define SIZE 100
int array[SIZE];
void fillArrayWithRandomNumbers(int arr[SIZE]) {
for(int i = 0; i<SIZE; i++) array[i] = rand()%100;
}
void printArray(int arr[SIZE]) {
for(int i = 0; i<SIZE; i++) printf("%5d", arr[i]);
printf("\n");
}
typedef struct StartEndIndexes {
int start;
int end;
} StartEndIndexes;
// Runs mergesort on the array segment described in the
// argument. Spawns two threads to mergesort each half
// of the array segment, and then merges the results.
void* mergeSort(void* args) {
return NULL;
}
int main() {
srand(time(0));
StartEndIndexes sei;
sei.start = 0;
sei.end = SIZE - 1;
// 1. Fill array with random numbers.
fillArrayWithRandomNumbers(array);
// 2. Print the array.
printf("Unsorted array: ");
printArray(array);
// 3. Create a 2 threads for merge sort.
// 4. Wait for mergesort to finish.
// 5. Print the sorted array.
printf("Sorted array: ");
printArray(array);
}
Makefile
mergeSort: ParallelMergeSort.c
gcc -std=c99 -pthread -o ParallelMergeSort
ParallelMergeSort.c -I.
In: Computer Science
Given the definition for a Point class that holds the coordinates of the point as double values x and y, write a function called pt_dist that takes two points and returns the straight-line distance between them (as a double). Use two ways, pt_dist function version and the pt_dist method version. In main, include two if else tests for each, If passed "TEST PASSED, DIST IS " else "Test Failed, dist is ".
Hint: Rhymes with Bythagorean Beorem.
#include <iostream>
#include <cmath>
using namespace std;
// given point class
class Point
{
public:
double x, y;
};
// put your function here, and name it pt_dist
//method version
int main() {
return 0;
}
In: Computer Science
Develop a program in C++, using functions, to validate a userID. Valid userID specifications:
• 5 - 10 characters long.
• must begin with a letter.
• must contain at least one upper case letter.
• must contain at least one lower case letter.
• must contain at least one decimal digit.
• must contain at least one of the following special characters: #_$
• must not contain any other characters than those specified above.
The main program should loop, inputting userIDs and outputting the userID followed by "valid" or "not valid" as appropriate until the user enters "END". At that point the program ends. You may only use the following system include files: You should develop a comprehensive test set of userIDs. Include this test set in a block comment at the end of your main program. I.e., in the main.cpp file. Write two functions as described below. These should be properly entered into the two files: ID_Functions.h and ID_Functions.cpp. I.e., two functions go into one file. Do not use a "using namespace" in the header, .h, file. Instead, use explicit namespace resolution as needed. E.g., you will have to use std::string to declare a string.
In: Computer Science
Retrieve the names of employees whose salary is within $20,000 of the
salary of the employee who is paid the most in the company (e.g., if the highest
salary in the company is $80,000, retrieve the names of all employees that make at
least $60,000)
Based on the following table:
-- drop tables
DROP TABLE EMPLOYEE CASCADE CONSTRAINTS;
DROP TABLE DEPARTMENT CASCADE CONSTRAINTS;
DROP TABLE DEPT_LOCATIONS CASCADE CONSTRAINTS;
DROP TABLE PROJECT CASCADE CONSTRAINTS;
DROP TABLE WORKS_ON CASCADE CONSTRAINTS;
DROP TABLE DEPENDENT CASCADE CONSTRAINTS;
-- create and populate tables
CREATE TABLE EMPLOYEE
(
Fname
VARCHAR(20),
Minit CHAR(1),
Lname
VARCHAR(20),
Ssn CHAR(9),
Bdate DATE,
Address
VARCHAR(30),
Sex CHAR(1),
Salary NUMBER(5),
Super_Ssn CHAR(9),
Dno NUMBER(1),
PRIMARY KEY (Ssn),
FOREIGN KEY (Super_ssn)
REFERENCES EMPLOYEE (Ssn)
);
INSERT INTO EMPLOYEE VALUES ('James', 'E', 'Borg', '888665555',
DATE '1937-11-10', '450 Stone, Houston, TX', 'M', 55000, NULL,
1);
INSERT INTO EMPLOYEE VALUES ('Jennifer', 'S', 'Wallace',
'987654321', DATE '1941-06-20', '291 Berry, Bellaire, Tx', 'F',
37000, '888665555', 4);
INSERT INTO EMPLOYEE VALUES ('Franklin', 'T', 'Wong', '333445555',
DATE '1955-12-08', '638 Voss, Houston, TX', 'M', 40000,
'888665555', 5);
INSERT INTO EMPLOYEE VALUES ('John', 'B', 'Smith', '123456789',
DATE '1965-01-09', '731 Fondren, Houston, TX', 'M', 30000,
'333445555', 5);
INSERT INTO EMPLOYEE VALUES ('Alicia', 'J', 'Zelaya', '999887777',
DATE '1968-01-19', '3321 castle, Spring, TX', 'F', 25000,
'987654321', 4);
INSERT INTO EMPLOYEE VALUES ('Ramesh', 'K', 'Narayan', '666884444',
DATE '1920-09-15', '975 Fire Oak, Humble, TX', 'M', 38000,
'333445555', 5);
INSERT INTO EMPLOYEE VALUES ('Joyce', 'A', 'English', '453453453',
DATE '1972-07-31', '5631 Rice, Houston, TX', 'F', 25000,
'333445555', 5);
INSERT INTO EMPLOYEE VALUES ('Ahmad', 'V', 'Jabbar', '987987987',
DATE '1969-03-29', '980 Dallas, Houston, TX', 'M', 22000,
'987654321', 4);
INSERT INTO EMPLOYEE VALUES ('Melissa', 'M', 'Jones', '808080808',
DATE '1970-07-10', '1001 Western, Houston, TX', 'F', 27500,
'333445555', 5);
CREATE TABLE DEPARTMENT
(
Dname
VARCHAR(20),
Dnumber
NUMBER(1),
Mgr_ssn CHAR(9),
Mgr_start_date DATE,
PRIMARY KEY (Dnumber),
FOREIGN KEY (Mgr_ssn)
REFERENCES EMPLOYEE (Ssn)
);
INSERT INTO DEPARTMENT VALUES ('Research', 5, '333445555', DATE
'1988-05-22');
INSERT INTO DEPARTMENT VALUES ('Administration', 4, '987654321',
DATE '1995-01-01');
INSERT INTO DEPARTMENT VALUES ('Headquarters', 1, '888665555', DATE
'1981-06-19');
-- this alter is needed to allow PROJECT and DEPARTMENT to reference each other
ALTER TABLE EMPLOYEE ADD FOREIGN KEY (Dno) REFERENCES DEPARTMENT (Dnumber);
CREATE TABLE DEPT_LOCATIONS
(
Dnumber
NUMBER(1),
Dlocation VARCHAR(20),
PRIMARY KEY (Dnumber, Dlocation),
FOREIGN KEY (Dnumber)
REFERENCES DEPARTMENT
(Dnumber)
);
INSERT INTO DEPT_LOCATIONS VALUES (1, 'Houston');
INSERT INTO DEPT_LOCATIONS VALUES (4, 'Stafford');
INSERT INTO DEPT_LOCATIONS VALUES (5, 'Bellaire');
INSERT INTO DEPT_LOCATIONS VALUES (5, 'Sugarland');
INSERT INTO DEPT_LOCATIONS VALUES (5, 'Austin');
CREATE TABLE PROJECT
(
Pname
VARCHAR(20),
Pnumber
NUMBER(2),
Plocation VARCHAR(20),
Dnum NUMBER(1),
PRIMARY KEY (Pnumber),
FOREIGN KEY (Dnum)
REFERENCES DEPARTMENT
(Dnumber)
);
INSERT INTO PROJECT VALUES ('ProductX', 1, 'Bellaire', 5);
INSERT INTO PROJECT VALUES ('ProductY', 2, 'Sugarland', 5);
INSERT INTO PROJECT VALUES ('ProductZ', 3, 'Houston', 5);
INSERT INTO PROJECT VALUES ('Computerization', 10, 'Stafford',
4);
INSERT INTO PROJECT VALUES ('Reorganization', 20, 'Houston',
1);
INSERT INTO PROJECT VALUES ('Newbenefits', 30, 'Stafford', 4);
CREATE TABLE WORKS_ON
(
Essn CHAR(9),
Pno NUMBER(2),
Hours
NUMBER(3,1),
PRIMARY KEY (Essn, Pno),
FOREIGN KEY (Essn)
REFERENCES EMPLOYEE (Ssn),
FOREIGN KEY (Pno)
REFERENCES PROJECT(Pnumber)
);
INSERT INTO WORKS_ON VALUES ('123456789', 1, 32.0);
INSERT INTO WORKS_ON VALUES ('123456789', 2, 8.0);
INSERT INTO WORKS_ON VALUES ('453453453', 1, 20.0);
INSERT INTO WORKS_ON VALUES ('453453453', 2, 20.0);
INSERT INTO WORKS_ON VALUES ('333445555', 1, 10.0);
INSERT INTO WORKS_ON VALUES ('333445555', 2, 10.0);
INSERT INTO WORKS_ON VALUES ('333445555', 3, 5.0);
INSERT INTO WORKS_ON VALUES ('333445555', 10, 10.0);
INSERT INTO WORKS_ON VALUES ('333445555', 20, 10.0);
INSERT INTO WORKS_ON VALUES ('333445555', 30, 5.0);
INSERT INTO WORKS_ON VALUES ('999887777', 30, 30.0);
INSERT INTO WORKS_ON VALUES ('999887777', 10, 10.0);
INSERT INTO WORKS_ON VALUES ('987987987', 10, 35.0);
INSERT INTO WORKS_ON VALUES ('987987987', 30, 5.0);
INSERT INTO WORKS_ON VALUES ('987654321', 30, 20.0);
INSERT INTO WORKS_ON VALUES ('987654321', 20, 15.0);
INSERT INTO WORKS_ON VALUES ('888665555', 20, 10.0);
CREATE TABLE DEPENDENT
(
Essn CHAR(9),
Dependent_name VARCHAR(20),
Sex CHAR(1),
Bdate DATE,
Relationship VARCHAR(10),
PRIMARY KEY (Essn, Dependent_name),
FOREIGN KEY (Essn)
REFERENCES EMPLOYEE (Ssn)
);
INSERT INTO DEPENDENT VALUES ('333445555', 'Alice', 'F', DATE
'1986-04-05', 'Daughter');
INSERT INTO DEPENDENT VALUES ('333445555', 'Theodore', 'M', DATE
'1983-10-25', 'Son');
INSERT INTO DEPENDENT VALUES ('333445555', 'Joy', 'F', DATE
'1958-05-03', 'Spouse');
INSERT INTO DEPENDENT VALUES ('987654321', 'Abner', 'M', DATE
'1988-01-04', 'Son');
INSERT INTO DEPENDENT VALUES ('987654321', 'Jennifer', 'F', DATE
'1988-01-04', 'Daughter');
INSERT INTO DEPENDENT VALUES ('123456789', 'John', 'M', DATE
'1988-02-28', 'Son');
INSERT INTO DEPENDENT VALUES ('123456789', 'Alice', 'F', DATE
'1988-12-30', 'Daughter');
INSERT INTO DEPENDENT VALUES ('123456789', 'Elizabeth', 'F', DATE
'1967-05-05', 'Spouse');
INSERT INTO DEPENDENT VALUES ('453453453', 'Joyce', 'F', DATE
'1990-04-05', 'Daughter');
-- display contents of tables
SELECT * FROM EMPLOYEE;
SELECT * FROM DEPARTMENT;
SELECT * FROM DEPT_LOCATIONS;
SELECT * FROM PROJECT;
SELECT * FROM WORKS_ON;
SELECT * FROM DEPENDENT;
In: Computer Science
I need to implement the gates on Logism, please clearly explain all steps.
Part A: Design and wire a circuit to implement the Boolean expression S (x, y, z) = ∑m (1, 2, 4, 7) usingan 8-to-1 multiplexer . Verify the operation by checking all input combinations in the Boolean function's truth table.
Part B: Implement the function S (x, y, z) from Part A using only a 4-to-1 multiplexer .You may use NOT gates as needed.
Part C: Implement the function in Part A using a decoder (your variables are used as input and you can use an OR gate after your decoder).
In: Computer Science
Database: Configure Oracle Net manager:
Create the directory E:\oracle\net to be used by Oracle Net configuration files and then set TNS_ADMIN variable to point to this. To set this variable you will need to open regedit.exe (the “Registry Editor”) first. Next, you will create and set the key TNS_ADMIN as a string variable in the registry in the Oracle Home branch. This will likely be: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDB12Home1
How to set TNS_ADMIN variable correctly.
In: Computer Science
In: Computer Science
Ex 1. Show the contents of the array of integers 5 7 4 9 8 5 6 3 each time a selection sort changes it while sorting
the array into ascending order.
Initial array: 5 7 4 9 8 5 6 3
ANSWER (Hint there are 8 lines, Show Array after each selection and swap):
In: Computer Science
answer all
(b) AI often produces accurate results as it functions based on a set of programmed rules. As for human intelligence, there is usually a room for “human errors” as certain details may be missed at one point or the other. Justify in ten points how you can relate the statement to decision making algorithms.
(c) The human brain uses about 25watts while modern computers only
generally use 2 watts in normal information processing. If this
normality becomes the other way instead, give in five points what
could be the reasons in each case of swap.
In: Computer Science
write a program that:
1) asks the user to enter grades, a negative number is the signal to stop entering. (while loop) - add each grade to a list (do not add the negative number to the list)
after the while loop to enter grades is finished:
2) use a for loop on the list to calculate the average of all numbers in the list
3) use a for loop on the list to find the largest number in the list
4) use a for loop on the list to find the smallest number in the list
your program should have 1 while loop and 3 for loops
python code
In: Computer Science
Design a c++ program to simulate the BlackJack game. Rules:
1) single deck, 52 cards -both player and dealer are taking cards off the same deck (the same 52 values).
2) display BOTH cards of the players, and ONE card of the computer.
3) Check for blackjack (starting value of 21 for computer or player) -if either side has a blackjack end of the game, next hand of blackjack 4) Computer must hit if 16 or below.
5) Computer must stay if 17 or above.
6) Ace can be 1 or 11 in value -Can not bust if you go over 21 if you are using an Ace as 11 (example: 8+11+6 =/= 25, it would convert to 8+1+6 == 15) .
For example ACE ACE ACE ACE 8.
Can't Equal 11+1+1+1+8 = 22(it's a bust! no good!) ^--that 11 would drop to 1
much better: 1+1+1+1+8 = 12,
for example, A, 2, 3, A. So for the best result, the user will choose 11 for the first A, 1 for the second A, or vise versa.
Requirements: 1. Repeat the game until the player doesn't want to play. Use a new deck for each round.
2. program must be well-documented
3. must-have functions defined (not just the main method) in the program
In: Computer Science