Questions
Write a Python function ???????? that takes in a nonnegative semiprime number ? which is the...

Write a Python function ???????? that takes in a nonnegative semiprime number ? which is the product of two prime numbers ? and ? and returns the tuple ( ?, ? ) where ?≤? . Example: ????????(22)=(2,11) Example: ????????(3605282209)=(59447,60647) This problem has a time-out limit of 1 second and a memory limit of 1MB. The number ? in all test-cases will satisfy 4≤?≤800000000000000

For example:

Test Result

print(factorMe(22)) (2, 11)

print(factorMe(3605282209)) (59447, 60647)

In: Computer Science

Create a static method with the appropriate inputs and outputs. Call each of them in the...

Create a static method with the appropriate inputs and outputs. Call each of them in the main method.

Write a method called unique() which takes in a List and returns true if all the items in the List are unique. All the items are unique if none of them are the same.Return false otherwise.

Please do this in Java.

In: Computer Science

Q1. Classify and explain the Bell LaPadula and Biba Security Models policy and properties in detail....

Q1. Classify and explain the Bell LaPadula and Biba Security Models policy and properties in detail. Describe how vital these models are to the security and information security services as a whole. How are security services linked, and how do they support the security of information?

Q2. You offer storage services as a corporation and own a data warehouse estimated at USD 5,000,000 (including information & infrastructure). It is expected that 80% of the warehouse (including customer data) would be damaged/lost if the risk of a fire breaking out were to occur. For this warehouse-type, the probability of a fire breaking out is known to be 6% annually. Suppose you wanted to mitigate the risk to your data warehouse by implementing controls (safeguards) to decrease 50% (exactly half). Still, the cost of implementing these safeguards would be $40,000 per year. Explain why you should or should not buy the safeguards in a definitive quantitative case.

In: Computer Science

Description The purpose of this challenge is to use the IF statement to control program flow...

Description

The purpose of this challenge is to use the IF statement to control program flow and to use basic arithmetic expressions. This challenge simulates a rudimentary stock chart.

Requirements

Take a glance at the Sample Interaction below to get an idea of how the code runs
Declare a double variable called previous_price
Declare a double variable called current_price
Declare a string variable called symbol
Declare a string variable called company
Ask the user to enter a value for symbol
Ask the user to enter a value for company
Ask the user to enter a value for previous_price
Ask the user to enter a value for current_price
If the price of the stock has increased, show a message “It’s a bull market”
If the price of the stock has decreased, show a message “It’s a bear market”
if the price of the stock didn’t change, show a message “It’s a flat market”
Also, as part of the message for steps 10 and 11, indicate the percentage change. (see below)
Hints

Include the <iomanip> header file. This will allow you to use various options to format your output
#include <iomanip>
It’s good practice to initialize variables to default values that make sense (for example, set fee to 0.00)
Include the code below before any other cout lines. The setprecision(x) will display your decimal output with x decimal places.
cout << fixed << setprecision(2);
Sample Interaction / Output

-- Welcome to CSUB Brokerage --
What is the stock symbol? GOOG
What is the company name? Google
What was the previous stock price? 850
What is the current price? 1000

It's a bull market! Google (GOOG) went up 17.65%
RUN IT AGAIN:

-- Welcome to CSUB Brokerage --
What is the stock symbol? GOOG
What is the company name? Google
What was the previous stock price? 850
What is the current price? 425

It's a bear market! Google (GOOG) went down 50.00%.
RUN IT AGAIN:

-- Welcome to CSUB Brokerage --
What is the stock symbol? GOOG
What is the company name? Google
What was the previous stock price? 850
What is the current price? 850

It's a flat market! Google (GOOG) stock price didn't change.

In: Computer Science

(Please answer in C++ ) This approach is similar to Task 2B. The only difference is,...

(Please answer in C++ )
This approach is similar to Task 2B. The only difference is, the computer will generate a random integer in the range as a guess.
In this strategy, a guess is a random int in a given range. Hence, for the same range and same answer, the number of guesses will be different. For example, suppose the range is in [0, 10] and the answer is 7. These are possible outputs.
The following running takes 8 tries to get the answer.
Enter left end in range: 0
Enter right end in range: 10
User has an int in [0, 10]. Computer will guess.

guess #1: 10. How is my guess?
1. too big 2. too small 3. just right
Enter only 1, 2, or 3: 1

guess #2: 1. How is my guess?
1. too big 2. too small 3. just right
Enter only 1, 2, or 3: 2

guess #3: 9. How is my guess?
1. too big 2. too small 3. just right
Enter only 1, 2, or 3: 1

guess #4: 2. How is my guess?
1. too big 2. too small 3. just right
Enter only 1, 2, or 3: 2

guess #5: 4. How is my guess?
1. too big 2. too small 3. just right
Enter only 1, 2, or 3: 2

guess #6: 8. How is my guess?
1. too big 2. too small 3. just right
Enter only 1, 2, or 3: 1

guess #7: 5. How is my guess?
1. too big 2. too small 3. just right
Enter only 1, 2, or 3: 2

guess #8: 7. How is my guess?
1. too big 2. too small 3. just right
Enter only 1, 2, or 3: 3
Congratulations! The answer is 7.

In the following running, it takes only three guesses to get the answer.
Enter left end in range: 0
Enter right end in range: 10
User has an int in [0, 10]. Computer will guess.

guess #1: 6. How is my guess?
1. too big 2. too small 3. just right
Enter only 1, 2, or 3: 2

guess #2: 8. How is my guess?
1. too big 2. too small 3. just right
Enter only 1, 2, or 3: 1

guess #3: The answer must be 7.

In: Computer Science

FOR HTML Web scripting Complete the following: Create and test an HTML document that has six...

FOR HTML Web scripting

Complete the following:

  • Create and test an HTML document that has six short paragraphs of text that describe various aspects of the state in which you live. You must define three different paragraph styles, p1, p2, and p3. The p1 style must use left and right margins of 20 pixels, a background color of pink, and a foreground color of blue. The p2 style must use left and right margins of 30 pixels, a background color of black, and a foreground color of yellow. The p3 style must use a text indent of 1 centimeter, a background color of green, and a foreground color of white. The first and fourth paragraphs must use p1, the second and fifth must use p2, and the third and sixth must use p3.  Modify your index.html page to include a link to this page.
  • Create and test an HTML document that describes nested ordered lists of cars. The outer list must have three entries: compact, midsize, and sports. Inside each of these three lists there must be two sublists of body styles. The compact- and midsize-car sublists are two door and four door; the sports-car sublists are coupe and convertible. Each body-style sublist must have at least three entries, each of which is the make and model of a particular car that fits the category. The outer list must use uppercase Roman numerals, the middle lists must use uppercase letters, and the inner lists must use Arabic numerals. The background color for the compact-car list must be pink; for the midsize-car list, it must be blue, for the sports-car list, it must be red. All styles must be in a document style sheet.  Modify your index.html page to include a link to this page.

In: Computer Science

For the first three sections assume unsigned integers. Convert to binary and hexadecimal 85 4563 Convert...

For the first three sections assume unsigned integers.

  1. Convert to binary and hexadecimal
    1. 85
    2. 4563
  2. Convert from binary to decimal and hexadecimal.
    1. 0b1010 1011
    2. 0b0011 0001
  3. Convert from hexadecimal to binary and decimal.
    1. 0xB2
    2. 0x11

In: Computer Science

But if you were given the responsibility of installing a Hadoop 100+ node cluster, what would...

But if you were given the responsibility of installing a Hadoop 100+ node cluster, what would you do. By the way there are lots of solutions in the marketplace both commercial and proprietary. You may want to look around. Let's say that you successfully installed a 100+ Hadoop node cluster.

During the operation of the cluster, things are bound to fail. What failures do you think may happen in the cluster and what solutions/tools do you think you may want to employ to monitor and discover the failures?

In: Computer Science

1. What is a circuit? 2.   What is Telnet, and why is it useful? 3. How is...

1. What is a circuit?

2.   What is Telnet, and why is it useful?

3. How is TCP different from UDP?

In: Computer Science

In short, you’re going to implement a linked-list class for storing integers, using a provided main...

In short, you’re going to implement a linked-list class for storing integers, using a provided main program to help you interact and test your work. You’ll want to build the linked-list class function by function, working in “Develop” mode to test out each function you write.

main.cpp is a read only file

linkedlist.h is the file to work on.

main.cpp

#include
#include

#include "linkedlist.h"

using namespace std;


int main()
{
linkedlist LL;
string cmd;
int value, key;

//
// user can enter commands to manipulate the LL:
//
// p w => push w onto the end
// i x y => insert x after y (y must exist in the list)
// r z => remove the first instance of z
// o => output the list
// q => quit
//

//cout << "Enter a command> ";
cin >> cmd;

while (cmd != "q")
{
if (cmd == "p")
{
// push:
cin >> value;

LL.push_back(value);
}
else if (cmd == "i")
{
// insert:
cin >> value;
cin >> key;

LL.insert(value, key);
}
else if (cmd == "r")
{
// remove:
cin >> value;

LL.remove(value);
}
else if (cmd == "o")
{
// output:

LL.output();
}
else
{
cout << "**Invalid command, try p, i, r, o or q" << endl;
cout << endl;
}

//cout << "Enter a command> ";
cin >> cmd;
}

return 0;
}

linkedlist.h

/*linkedlist.h*/

#pragma once

#include <iostream>

using namespace std;


class linkedlist
{
private:
struct NODE
{
int Data;
struct NODE* Next;
};

struct NODE* Head; // first node in list (or nullptr)
struct NODE* Tail; // last node in list (or nullptr)
int Size; // # of elements (i.e. nodes) in list

public:
//
// default constructor
//
// Creates an empty list.
//
linkedlist()
{
Head = nullptr;
Tail = nullptr;
Size = 0;
}

//
// size
//
// Returns the # of elements in the list.
//
int size()
{
return Size;
}

//
// push_back
//
// Pushes value onto the end of the list.
//
void push_back(int value)
{
struct NODE* newNode = new struct NODE();
newNode->Data = value;
newNode->Next = nullptr;

//
// TODO: a new node containing the value was created
// above. Add this new node to the end of the list.
//
  
//
// HINT #2: don't forget to increment size
//
}

//
// insert
//
// Inserts the given value in the list *after* the key. If
// the key cannot be found, nothing happens; if the key occurs
// multiple times, value will be inserted after the first
// instance.
//
void insert(int value, int key)
{
// allocate a new node to hold the value:
struct NODE* newNode = new struct NODE();
newNode->Data = value;
newNode->Next = nullptr;

//
// TODO: a new node containing the value was created
// above. Insert this new node after the node containing
// the given key (assume the key appears only once).
// If the key cannot be found (or the list is empty), do
// nothing and just return (or delete newNode and return).
//
t.
//
// HINT #2: don't forget to increment size
//
}

//
// remove
//
// Removes the first instance of value from the list; if
// the value cannot be found, nothing happens.
//
void remove(int value)
{
//
// TODO: remove the first node that contains value; if value
// is not found, do nothing. You'll need to search the list
// for the value, and then unlink that node from the list.
// Don't worry about freeing the memory, you can ignore that
// for now (or use delete ptrToNode; if you want to free).
//

//
// HINT #2: don't forget to decrement size
//
}

//
// output
//
// Outputs the size, followed by the elements one by one on
// the same line.
//
void output()
{
cout << "Size: " << Size << endl;
cout << "Elements: ";

//
// TODO: output elements with a space after each one
// (including a space after last element). Output all
// on the same line, save the end-of-line for after
// the traversal loop is over.
//
.
//

cout << endl;
}

};

In: Computer Science

1. Convert to binary and hexadecimal (PLEASE SHOW WORK) a. 35 - binary: - hexadecimal: b....

1. Convert to binary and hexadecimal (PLEASE SHOW WORK)

a. 35

- binary:

- hexadecimal:

b. 85

- binary:

- hexadecimal:

c. 128

- binary:

- hexadecimal:

d. 4563

- binary:

- hexadecimal:

In: Computer Science

Convert from binary to decimal to hexadecimal (PLEASE SHOW ALL WORK) a. 1010 1011 - decimal:...

Convert from binary to decimal to hexadecimal (PLEASE SHOW ALL WORK)

a. 1010 1011

- decimal:

- hexadecimal

b. 0011 0001

- decimal:

- hexadecimal:

c. 1110 0111

- decimal:

- hexadecimal:

d. 1111 1111

- decimal:

- hexadecimal:

In: Computer Science

Convert from hexadecimal to binary to decimal (PLEASE SHOW WORK) 1. B2 - binary: - decimal:...

Convert from hexadecimal to binary to decimal (PLEASE SHOW WORK)

1. B2

- binary:

- decimal:

2. 37

- binary:

- decimal:

3. 0A

-binary:

- decimal:

4. 11

- binary:

- decimal:

In: Computer Science

WILL UPVOTE ANSWER! Modify the given code to accept two integers from the user and print...

WILL UPVOTE ANSWER!

Modify the given code to accept two integers from the user and print one of the following messages

- the 1st number is bigger

- the 2nd number is bigger

- two numbers are equal

######################################

.data

str1 : .asciiz "enter the 1st integer "

str2 : .asciiz "enter the 2nd integer "

str3 : .asciiz "The 1st num is bigger"

str4 : .asciiz "The 2nd num is bigger"

str5 : .asciiz "Two numbers are equal"

.text

main:

li $v0, 4

la $a0, str1

syscall

li $v0,5

# read 1st int

syscall

move $t0, $v0

li $v0,4

la $a0, str2

syscall

li $v0,5

# read 2nd int

syscall

move $t1, $v0

############## DO NOT CHANGE ABOVE THIS LINE ######################

.

.

your code here

In: Computer Science

1.  What is an RFP, and why do companies use them? 2.  How does the design of the...

1.  What is an RFP, and why do companies use them?

2.  How does the design of the data center differ from the design of the LANs intended to provide user access to the network?

3. What do network management software systems do, and why are they important?

In: Computer Science