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 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. 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
In: Computer Science
In: Computer Science
FOR HTML Web scripting
Complete the following:
In: Computer Science
For the first three sections assume unsigned integers.
In: Computer Science
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 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 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. 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:
- 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:
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 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 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