Research the different hash algorithms (Message Digest, Secure Hash Algorithm, and RIPMD) and then compare them. Do a write up on the each one of them (3 paragraphs total). Be sure to include the size of the digest, the number of rounds needed to create the hash, block size, who created it, what previous hash it was derived from, and its strengths and weaknesses. For your fourth paragraph, pick one hash algorithm and explain what you would use it for and why you would prefer to use that hash.
Be creative. I am looking for thoughtful responses, they do not necessarily have to be true.
In: Computer Science
Hi this is Assembly Language MASM x86 program. Please write it in the language and please explain it with comments thank you
Please answer it I really need help this question was refunded before so please answer. Thank you so much also these are two separate programs thank you.
1) Write a procedure to read in decimal or hex number (byte-sized) Then write a procedure using shifts and ANDS to convert the string to a binary number (if is backward, that ok)
2) Put the first (byte) 10 terms of the Fibonacci series into the byte array FIB 1 1 2 3 5 … Us num1 = 1 and num2 = 1 to start, NO other numbers allowed)
In: Computer Science
C#
Create a console application that asks the user for two numbers in the range 0-255 and then divides the first number by the second: Enter a number between 0 and 255: 100 Enter another number between 0 and 255: 8 100 divided by 8 is 12 Enter a number between 0 and 255: apples Enter another number between 0 and 255: bananas FormatException: Input string was not in a correct format.
In: Computer Science
3. Translate the following C code to MIPS assembly code (in two separate files). int main() { printf(“before subroutine!\n”); Subfunc(); printf(“after subroutine!\n!”); } void Subfunc() {printf(“I am subroutine!\n”);}
4. Translate the following C code to MIPS assembly (in two separate files). Run the program step by step and observe the order of instructions being executed and the value of $sp. int main() { int x=2; z=Subfunc(x); printf(“Value of z is: %d”, z); } int Subfunc(int x) { return x+1;}
In: Computer Science
PHP Question:
Write the PHP code to list out all of the dates of the current month and assign them to their given days. As an example, for the month of October 2020, the output should look something like this:
October 2020
Monday: 5, 12, 19, 26
Tuesday: 6, 13, 20, 27
Wednesday: 7, 14, 21, 28
Thursday: 1, 8, 15, 22, 29
Friday: 2, 9, 16, 23, 30
Saturday: 3, 10, 17, 24, 31
Sunday: 4, 11, 18, 25
IMPORTANT: The code MUST use the current month,
whatever the current month is at the time (so if I used this PHP
code during July of 2020, it would use all of the dates of July
2020 and assign them to the proper days). Do NOT
use tables for this code.
In: Computer Science
Please use your own words, don't copy and paste
Any implementation of IoT is going to have risks associated with it. Risks could range from fairly insignificant to very destructive depending on the market, equipment, number of people affected, and numerous other factors. Please discuss the following: what are some of the known vulnerabilities in the healthcare industry? what type of data is being transmitted or stored? what is the security risk with the data being compromised? Is the security risk life-threatening? In what way is safety impacted?
Please use your own words, don't copy and paste
In: Computer Science
USE Python 2.7(screen shot program with output)
the task is: takes in a list of protein sequences as input and finds all the transmembrane domains and returns them in a list for each sequence in the list with given nonpolar regions and returns the lists for those.
1. This code should call two other functions that you write: regionProteinFind takes in a protein sequence and should return a list of 10 amino acid windows, if the sequence is less than 10 amino acids, it should just return that sequence. (initially it should grab amino acids 1-10…the next time it is called it should grab amino acids 2-11…) for each sequence in the list.
testcode:
"protein='MKLVVRPWAGCWWSTLGPRGSLSPLGICPLLMLLWATLR''
the regionProteinFind
returns:['MKLVVRPWAG','KLVVRPWAGC','LVVRPWAGCW','VVRPWAGCWW','VRPWAGCWWS','RPWAGCWWST','PWAGCWWSTL','WAGCWWSTLG','AGCWWSTLGP','GCWWSTLGPR',
'CWWSTLGPRG','WWSTLGPRGS','WSTLGPRGSL','STLGPRGSLS','TLGPRGSLSP','LGPRGSLSPL','GPRGSLSPLG','PRGSLSPLGI','RGSLSPLGIC','GSLSPLGICP','SLSPLGICPL','LSPLGICPLL','SPLGICPLLM','PLGICPLLML','LGICPLLMLL','GICPLLMLLW','ICPLLMLLWA','CPLLMLLWAT','PLLMLLWATL','LLMLLWATLR']
2nd testcode;
protein=MP
region protein sequence should return: ['ME']
2. A second function called testForTM , which should calculate and return the decimal fraction of ten amino acid window which are nonpolar for each sequence in the list. the nonpolar regions are (A,V,L,I,P,M,F,W). my code for this is:
def testForTM(AAWindow):
totalNP= 0
nonPolarList=['A', 'V', 'L', 'I', 'P', 'M', 'F', 'W']
for aa in AAWindow:
if aa in nonPolarList:
totalNP+=1
return totalNP/10.0 #THIS SHOULD DEVIDE BY len(AAWindow) so
it works for sequences less than 10 length like 'MP'
3. The last function,tmSCANNER should call the get protein region and test for TM and Ultimately, as a result the code should be used to scan each protein sequence in the list as input generating list of numbers of non polar for each protein sequence which measures the fraction of nonpolar residues in each 10bp window(it slides 10 amino acids at a time until it is at the last aa window of a protein sequence with any length and give the lists for those. The code should output what is displayed below.
#Test code for TMFinder
input=> listOfProtein=['MKLVVRPWAGCWWSTLGPRGSLSPLGICPLLMLLWATLR', 'MARKCSVPLVMAWLTWTTSRAPLPH', 'MPWPTSITXXXXXXSWSPEWLSSGLRSILGWEQPRVSHKGHSHEWHRRP']
tmValuesList=TMFinder(listOfProtein)
print 'The list of TM values are:', tmValuesList
as a result it should print out this list:
["protein 1:'MKLVVRPWAGCWWSTLGPRGSLSPLGICPLLMLLWATLR'", 'TMValue:[0.7, 0.6, 0.7, 0.7, 0.6, 0.5, 0.6, 0.5, 0.5, 0.4, 0.4, 0.4, 0.4, 0.3, 0.4, 0.5, 0.4, 0.5, 0.4, 0.5, 0.6, 0.7, 0.7, 0.8, 0.8, 0.8, 0.9, 0.8, 0.9, 0.8]',"protein2:'MARKCSVPLVMAWLTWTTSRAPLPH'", 'TMValue:[0.6, 0.6, 0.6, 0.7, 0.8, 0.8, 0.9, 0.8, 0.7, 0.6, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]',"protein3:'MPWPTSITXXXXXXSWSPEWLSSGLRSILGWEQPRVSHKGHSHEWHRRP'",'TMValue:[0.5, 0.4, 0.3, 0.2, 0.1, 0.1, 0.2, 0.1, 0.2, 0.2, 0.3, 0.4, 0.4, 0.4, 0.4, 0.5, 0.4, 0.4, 0.4, 0.5, 0.4, 0.4, 0.4, 0.4, 0.5, 0.4, 0.5, 0.5, 0.4, 0.3, 0.3, 0.2, 0.2, 0.2, 0.1, 0.2, 0.1, 0.1, 0.1]']
This is time sensitive.Thank you for the help!!!
In: Computer Science
2. Create a new project named named lab5_2. You will prompt the user for an amount of names to enter, and then ask for that amount of names. You’ll store these names in a vector of strings. Then you’ll sort the vector. Finally, you’ll print the results.
How many names?: 4
Enter a name: Leonardo
Enter a name: Donatello
Enter a name: Michelangelo
Enter a name: Raphael
====================
Alphabetized
====================
Donatello
Leonardo
Michelangelo
Raphael
In: Computer Science
you will create a dynamic two dimensional array of mult_div_values structs (defined below). The two dimensional array will be used to store the rows and columns of a multiplication and division table. Note that the table will start at 1 instead of zero, to prevent causing a divide-by-zero error in the division table!
struct mult_div_values { int mult; float div; };
The program needs to read the number of rows and columns from the user as command line arguments. You should check that the user actually supplied a number before converting the input string to an integer. Continue to prompt the user for correct values if the number isn't a valid non-zero integer. At the end of the program, prompt the user if they want to see this information for a different size matrix.
// One approach to handling the command line arguments... rows=atoi(argv[1]); cols=atoi(argv[2]); // Now check that rows and cols are valid non-zero integers // ...
For example, if you run your program with these command line arguments
./prog 5 5
Your program should create a 5 by 5 matrix of structs and assign the multiplication table to the mult variable in the struct and the division of the indices to the div variable in the struct. The mult variable is an integer, and the div variable needs to be a float (or double).
Your program needs to be well modularized with functions, including main, with 10 or less lines of code. This means you will have a function that checks if the rows are valid, non-zero integers:
bool is_valid_dimensions(char *m, char *n)
and another function that creates the matrix of structs given the m times n dimensions:
mult_div_values** create_table(int m, int n)
In addition, you need to have functions that set the multiplication and division values, as well as delete your matrix from the heap:
void set_mult_values(mult_div_values **table, int m, int n) void set_div_values(mult_div_values **table, int m, int n) void delete_table(mult_div_values **table, int m)
Then create functions to print the tables. After your code is functioning, test it using the following approach.
Example Run:
./prog 5 t You did not input a valid column. Please enter an integer greater than 0 for a column: 5 Multiplication Table: 1 2 3 4 5 2 4 6 8 10 3 6 9 12 15 4 8 12 16 20 5 10 15 20 25 Division Table: 1.00 0.50 0.33 0.25 0.20 2.00 1.00 0.67 0.50 0.40 3.00 1.50 1.00 0.75 0.60 4.00 2.00 1.33 1.00 0.80 5.00 2.50 1.67 1.25 1.00 Would you like to see a different size matrix (0-no, 1-yes)? 0
(5 pts) Separation of Files & Makefiles
Since we now have function prototypes and a struct that is a global user-defined type, then we might want to begin making an interface file that holds all of this information for us.
Create a mult_div.h interface file that will contain all the function and struct declaration information we need:
struct mult_div_values { int mult; float div; }; bool is_valid_dimensions(char *, char *); mult_div_values** create_table(int, int); void set_mult_values(mult_div_values **, int, int); void set_div_values(mult_div_values **, int, int); void delete_table(mult_div_values **, int);
After creating this mult_div.h file you need to #include it in your implementation file (the one with a .cpp extension). You also need to remove the prototypes and struct definition from your implementation file (e.g. delete the original prototype/struct definition lines from the .cpp file).
#include “./mult_div.h”
Now compile your program normally:
g++ mult_div.cpp –o mult_div
Let's take this a step further, and keep only your function definitions in the implementation file (mult_div.cpp), and put your main function in a separate file called "prog.cpp" Your prog.cpp file will have to #include the mult_div.h file as well. To put these files together, they need to be compiled together:
g++ mult_div.cpp prog.cpp –o mult_div
What if we had 1,000 implementation (.cpp) files? Manually compiling all of them together would take forever and have a high chance for error. Luckily, UNIX/Linux has a built in script that makes compiling multiple files together easy called a Makefile. Just type
vim Makefile
on the command line to create it. Now modify the file following the pattern shown below:
<target>: <compiler> <file1.cpp> <file2.cpp> -o <target>
Note that the leading whitespace MUST be a tab (you can't just use spaces). An example of what this could look like for this lab would be:
mult_div: g++ mult_div.cpp prog.cpp -o mult_div
Save and exit the file. You can type "make" in the terminal to run it.
One of the other benefits of makefiles is that you can add variables to it and make compiling happen in different stages by stopping g++ after compiling and before running it through the linker. This creates object files (.o files), which you can link together
CC = g++ exe_file = mult_div $(exe_file): mult_div.o prog.o $(CC) mult_div.o prog.o -o $(exe_file) mult_div.o: mult_div.cpp $(CC) -c mult_div.cpp prog.o: prog.cpp $(CC) -c prog.cpp
Try to make your program again. Notice all the stages. In addition, we usually add a target for cleaning up our directory:
clean: rm –f *.out *.o $(exe_file)
Now we can run the specific target by typing "make <target>.
make clean
Makefiles are a useful way to automate and control the program building process as your projects grow in size.
In: Computer Science
An arithmetic expression can be represented in three different formats: infix, prefix, and postfix. In the infix notation, the operator comes between two operands. In the postfix notation, the operator comes after its two operands. For example, an expression a/b can be transformed to ab/. The following are some examples of the postfix expressions:
2+6*4 Its postfix notation is 2 6 4 * +
2-3+5/4*9-1 Its postfix expression is 2 3 – 5 4 / 9 * + 1 -
For this assignment, write a JAVA program that reads an postfix expression and evaluates the postfix expression. Your program should display the following menu repeatedly:
1. Read an expression in postfix notation.
// Read an infix expression and print out the string for verification.
2. Evaluate the postfix expression.
0. Exit.
For the input string, you can make the following assumptions:
Input strings are error-free
+, -, *, / are the only operators used
All operand are positive integers consisting of one or more digits.
Space appears in the input string to separate the operands and operators.
Implement a class StackLink, which is a stack implemented by a linked list (Do not use the JAVA predefined class java.util.LinkedList). Your program should use stack operations to evaluate the postfix expression. The following figure shows how stacks can help.
The following are some results when your run the program:
C:'>java Homework4
Select from:
1. Read an expression in postfix notation.
2. Evaluate the postfix expression
0. Exit.
1
Enter a postfix expression: 32 15 2 * + 36 4 / -
The entered infix expression is: 32 15 2 * + 36 4 / -
Select from:
1. Read an expression in postfix notation.
2. Evaluate the postfix expression
0. Exit.
2
32 15 2 * + 36 4 / - = 53
Select from:
1. Read an expression in postfix notation.
2. Evaluate the postfix expression
0. Exit.
1
Enter a postfix expression: 3 4 / 15 * 9 / 6 8 * + 7 - 54 +
The entered infix expression is: 3 4 / 15 * 9 / 6 8 * + 7 - 54 +
Select from:
1. Read an expression in postfix notation.
2. Evaluate the postfix expression
0. Exit.
2
3 4 / 15 * 9 / 6 8 * + 7 - 54 + = 95
Select from:
1. Read an expression in infix notation.
2. Convert infix to postfix.
3. Evaluate the postfix expression
0. Exit.
0
Goodbye.
In: Computer Science
-- Creating table ProjDept:
create table ProjDept (
ProjDeptID NUMBER(10) primary key,
ProjDeptName varchar2(20),
OfficeLocation varchar2(20),
PhoneNumber varchar2(20)
);
INSERT INTO ProjDept (ProjDeptID, ProjDeptName, OfficeLocation,
PhoneNumber) VALUES
(1001, 'Accounting','ITCC01-400','888-285-8100');
(2001, 'Human Resources','ITCC01-200','888-285-8100');
(3001, 'Marketing','ITCC02-300','888-285-8100');
(4001, 'Information Techn','ITCC02-100','888-285-8100');
(5001, 'Legal','ITCC01-100','888-285-8100');
-- Creating table Employee:
create table Employee(
EmployeeID NUMBER(10) primary key,
FirstName varchar2(20),
LastName varchar2(20),
ProjDeptID NUMBER(10),
PhoneNumber varchar2(20)
);
INSERT INTO Employee (EmployeeID, FirstName, LastName,
ProjDeptID, PhoneNumber, Email) VALUES
(10, 'Mark','Columbus',1001, '888-285-8101',
'[email protected]');
(29, 'Elvin','Wahl', 2001, '888-285-8201', '[email protected]');
(38, 'Taylor','Noel', 3001, '888-285-8303',
'[email protected]');
(47, 'Ariel','Colby', 4001, '888-285-8401',
'[email protected]');
(56, 'Riley','Peterson', 4001, '888-285-8402',
'[email protected]');
(65, 'Terence','Ferdinand', 1001, '888-285-8102',
'[email protected]');
(74, 'Bryce','Daley', 5001, '888-285-8501',
'[email protected]');
(83, 'Eva Myers','Myers', 2001, '888-285-8203',
'[email protected]');
(92, 'Lyn Lorenzo','Lorenzo', 3001, '888-285-8305',
'[email protected]');
(11, 'Jamaal Holt','Holt', 3001, '888-285-8307',
'[email protected]');
-- Creating table Project:
create table Project (
ProjectID NUMBER(10) primary key,
ProjectName varchar2(20),
ProjDeptID NUMBER(10),
MaxHours varchar2(20),
StartDate date,
EndDate date
);
INSERT INTO Project (ProjectID, ProjectName, ProjDeptID,
MaxHours, StartDate, EndDate) VALUES
(901, 'Product Plan',3001,'135',TO_DATE
('10-May-12','DD-Mon-YYYY'),TO_DATE
('15-Sep-12','DD-Mon-YYYY'));
(902, 'Tax Preparation',1001,'120',TO_DATE
('05-Jul-12','DD-Mon-YYYY'),TO_DATE
('15-Oct-12','DD-Mon-YYYY'));
(903, 'Portfolio Analysis',5001,'145',TO_DATE
('10-Aug-12','DD-Mon-YYYY'),TO_DATE ('','DD-Mon-YYYY'));
-- Creating table ProjectTask:
create table ProjectTask (
ProjectID NUMBER(10),
EmployeeID NUMBER(10),
--TaskDetails varchar2(20),
HoursWorked varchar2(20),
primary key(ProjectID,EmployeeID)
);
INSERT INTO ProjectTask (ProjectID, EmployeeID, HoursWorked)
VALUES
(901,47, '30');
(901,56,75);
(901,38, 55);
(902,65, 40);
(902,10, 45);
(902,74, 25);
(903,74, 20);
(903,83, 45);
(903,29, 40);
(901,74, 35);
--ALTER table employee
ALTER table Employee
Add foreign key (ProjDeptID) references ProjDept(ProjDeptID);
--ALTER Table Project
ALTER table Project
Add foreign key (ProjDeptID) references ProjDept(ProjDeptID);
-- ALTERTable projectTask
ALTER table ProjectTask
Add foreign key (ProjectID) references Project(ProjectID);
ALTER table ProjectTask
Add foreign key (EmployeeID) references Employee(EmployeeID);
-- SQL statement to add a unique column that holds an email address
in Employee table is as follows-
ALTER TABLE Employee ADD Email varchar(255);
ALTER TABLE Employee ADD UNIQUE(Email);
INSERT INTO Employee (EmployeeID, FirstName, LastName, ProjDeptID, PhoneNumber, Email) VALUES
(10, 'Mark','Columbus',1001, '888-285-8101',
'[email protected]');
(29, 'Elvin','Wahl', 2001, '888-285-8201', '[email protected]');
(38, 'Taylor','Noel', 3001, '888-285-8303',
'[email protected]');
(47, 'Ariel','Colby', 4001, '888-285-8401',
'[email protected]');
(56, 'Riley','Peterson', 4001, '888-285-8402',
'[email protected]');
(65, 'Terence','Ferdinand', 1001, '888-285-8102',
'[email protected]');
(74, 'Bryce','Daley', 5001, '888-285-8501',
'[email protected]');
(83, 'Eva Myers','Myers', 2001, '888-285-8203',
'[email protected]');
(92, 'Lyn Lorenzo','Lorenzo', 3001, '888-285-8305',
'[email protected]');
(11, 'Jamaal Holt','Holt', 3001, '888-285-8307',
'[email protected]');
UPDATE Project
SET ProjectName = 'Product Plan' , MaxHours = 250,
WHERE LastName = 'Chris'
AND LastName = 'Martin';
How do i fix the issue because it is not running
In: Computer Science
What is the running time of QUICKSORT on an array A of length n containing all the same values? What is the running time if A contains distinct elements sorted in decreasing order? Explain your answers in detail, referring to the source code for PARTITION and QUICKSORT.
In: Computer Science
Animal class
Create a simple class called Animal instantiated with a name and a method toString which returns the name.
Cat class
Create a simple class Cat which extends Animal, but adds no new instance variable or methods.
RedCat class
Create a simple class RedCat which extends Cat, but adds no new instance variable or methods.
WildCardTester class
Create a class with the main method and methods addCat, deleteCat and printAll as follows.
addCat method
Has two parameters, an ArrayList with a lower bound of RedCat, and a String with the name of a Cat. Adds the identified Cat reference to the ArrayList, and prints out a line as shown in the sample output below.
deleteCat method
Has two parameters, an ArrayList with an upper bound of Cat, and a String with the name of a Cat to be deleted. Deletes the identified Cat reference to the ArrayList, and prints out a line as shown in the sample output below.
printAll method
Has a single parameter of an ArrayList with a wildcard type. Prints out all the items in the ArrayList.
main method
Create two ArrayLists, one for Animal, and one for RedCat.
Use addCat to add “Tiger” to the animal ArrayList.
Use addCat to add “Tom”, “Siamese” and “Tiger” to the redCats ArrayList.
Use printAll to print the list in the animal ArrayList.
Use printAll to print the list in the redCat ArrayList.
Use deleteCat to delete the first item in the redCat ArrayList.
Use printAll to print the list in the redCat ArrayList.
Sample Output:
Cat Added named Tiger was added
Cat Added named Tom was added
Cat Added named Siamese was added
Cat Added named Tiger was added
The list of animals:
Tiger
The list of redCats:
Tom Siamese Tiger
Removed cat named Tom
The list of redCats after a deletion:
Siamese Tiger
In: Computer Science
Decision Structures in Java
You are the owner of a company that sells designer desks. Your program will create a user friendly interface (company name, labeled prompts, neat output) that calculates the cost of constructing desks for customers. After the customer enters the appropriate prompted values, the program will calculate the cost of the desk based on the specifications outlined below. The program should allow the user to order a second desk if desired.
Class Name: Desk
Instance Variables: length – float (representing inches)
(Fields) width – float (representing inches)
type – char (valid values P, O, or M for Pine, Oak, or Mahogany)
drawers – integer (representing the number of desk drawers)
Static Variable: count – tracks the number of desks created
Instance Methods: A constructor that accepts no arguments and sets default values as follows: the length to 6, width to 12, Oak type, and 1 drawer
A constructor that accepts 4 arguments, and sets the fields appropriately.
getArea( ) A method to calculate and return the area of the desk.
getType( ) A method to return desk type.
getDrawers( ) A method to return the number of drawers.
toString() Displays the object’s attributes
main(): This method should:
Class methods: createDesk( ) A function to prompt the user for inputs and accept the four (4) input values needed to create an instance of a Desk. It instantiates a Desk object and returns the object to the calling method.
CalculatePrice() This function has a Desk object as its formal argument and returns the price of the desk to be determined as follows:
Additional Notes:
In: Computer Science
In: Computer Science