How to fit an example of non-stationary data into GARCH model in R programming.
In: Computer Science
Description of the Assignment: Write a Python program to create a deque and append few elements to the left and right, then remove some elements from the left, right sides and reverse the deque.
Please use the following comments in your python script:
# *************************************************
# COP3375
# Student's full name ( <<< your name goes here)
# Week 9: Assignment 1
# *************************************************
# Write your code below:
# Create a deque
# Print a deque
# Append to the left
# Print a deque
# Append to the right
# Print a deque
# Remove from the right
# Print a deque
# Remove from the left
# Print a deque
# Reverse the dequeue
# Print a deque
Sample Output - Your output should look like something similar to the following:
deque(['Red', 'Green', 'White'])
Adding to the left:
deque(['Pink', 'Red', 'Green', 'White'])
Adding to the right:
deque(['Pink', 'Red', 'Green', 'White', 'Orange'])
Removing from the right:
deque(['Pink', 'Red', 'Green', 'White'])
Removing from the left:
deque(['Red', 'Green', 'White'])
Reversing the deque:
deque(['White', 'Green', 'Red'])
In: Computer Science
In: Computer Science
algorithms coures
In: Computer Science
Week 1 - Map and Critique a Control Flow.
Initial Post
Describe and map a sample of a control flow.
Group Discussion Critique the control flow of two other submissions.
This should include why it is either an effective or ineffective control flow.
If effective, describe why. Examples would be its thoroughness of structures, substantial interactions and flows, etc.
If ineffective, describe why. Examples would be missing steps, flow is incorrectly lined, etc.
In: Computer Science
Java
Algorithmic Performance as you are aware, consists (mainly) of 2 dimensions: Time and Space. From a technical perspective, discuss the following:
In: Computer Science
Question 1 (1 point)
4-3 (True/False) There are major differences between firewalls for wired ad wireless uses.
Question 1 options:
True |
|
False |
Question 2 (1 point)
4-14 Which of the following terms best describes the following diagram?
Question 2 options:
DMZ |
|
Intranet |
|
Public LAN |
|
Extranet |
Question 3 (1 point)
4-13 Which of the following is the BEST definition of dual-homed?
Question 3 options:
Can filter on two OSI layers |
|
Contains two NICs |
|
Performs filtering and logging |
|
Performs packet and content filtering |
Question 4 (1 point)
4-10 Which of the following is the name for a lower-end (small business grade) firewall appliance that is capable of packet filtering, content filtering, intrusion detection, proxy, and application layer filtering?
Question 4 options:
UTM |
|
All-in-one |
|
SMB device |
|
NGFW |
Question 5 (1 point)
4-11 Which of the following is most often used for protecting a single computer?
Question 5 options:
hardware firewall |
|
virtual firewall |
|
software firewall |
|
firewall appliance |
Question 6 (1 point)
4-7 Which of the following were generation one firewalls capable of?
Question 6 options:
Filtering by IP header |
|
Filtering by session layer header |
|
Filtering by data content |
|
Filtering by protocol being used |
Question 7 (1 point)
4-6 the earliest firewalls were only capable of which of the following kinds of filtering?
Question 7 options:
Application layer |
|
Stateless |
|
Stateful |
|
Circuit layer |
Question 8 (1 point)
4-1 Which of the following were firewalls originally conceived to perform?
Question 8 options:
Block incoming unsolicited traffic |
|
Block outgoing traffic |
|
Both of the above |
|
Neither of the above |
Question 9 (1 point)
4-8 Which of the following is the word describing a firewall that is aware of a packet's place in an established and ongoing conversations
Question 9 options:
Content filter |
|
Proxy |
|
Stateless |
|
Stateful |
Question 10 (1 point)
4-20 Which of the following refers to a software firewall places on a dedicated server to create an internal hardware firewall?
Question 10 options:
Firewall system |
|
Constructed firewall |
|
Spare part firewall (SPF) |
|
Virtual firewall |
In: Computer Science
Describe fully three implementations the company can adopt to resolve this.
(9marks)
In: Computer Science
In: Computer Science
Why do you want to join COOP and why are you interested in participating in the data analytics program?
In: Computer Science
Make CSS code for ping flood attack of the United States
** zoom in and out of the map, background color, states listed, scrollbar, title Ping Flood attack in US Map, etc.
Design whatever you would want to
programming language can be any
In: Computer Science
C++ Project
The following is a simple implementation of the circular queue
Important: for this project, you must complete the work based on this initial code.
1. Fix the full() method.
2. Fix the empty() method.
3. Place "X" in the front position using a statement in the constructor.
4. Adjust the DEQ() method so that the front position in the array would always have "X" in it and
the previous X should be blanked out.
5. Write the code for displayArray() method in a such a way that it should display the contents of the
Queue as shown in the array, from location 0 up to and including the last position.
6. Write the code for displayLine() method in a such a way that it should display the contents of the
Queue, from the rear position to the front position as in a waiting line.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#include
using namespace std;
class Queue{
private:
int front;
int rear;
int capacity;
string *array;
public:
Queue(int capacity){
// Place "X" in the front position
front = capacity;
rear = capacity;
(*this).capacity = capacity;
array = new string[capacity + 1];
}
/*** You need to fix the method full, so that it would only return
* true if front and rear have the same value.
*/
bool full(){
return false;
}
void ENQ(string element){
if (!full()){
if (rear == 0){
rear = capacity;
}
else{
rear--;
}
array[rear] = element;
}
else{
cout<<"Queue is full "<
}
}
/**
* You need to fix the method empty, so that it would only return
* true if the next rear position is the same as the front position.
*/
bool empty(){
return false;
}
/**
* Adjust DEQ so that, the front position in the array would
* always have "X" in it and the previous X should be blanked out.
*/
string DEQ(){
if (!empty()){
if (front == 0){
front = capacity;
}
else{
front--;
}
return array[front];
}
else{
cout<<"Queue is empty\n";
return "Nothing";
}
}
/**
* Write the code for displayArray() method in a such a way that it should display the contents
* of the Queue as shown in the array from location 0 up to and including the last position.
void displayArray(){
}
/**
* Write the code for displayLine() method in a such a way that it should display the contents of the
* Queue from the rear position to the front position as in a waiting line.
*/
void displayLine(){
}
};
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Main Code
int main() {
cout<<"\nTesting Q1 ...\n";
Queue Q1(5);
//displayArray(); test, once it is done
Q1.ENQ("B");
//displayArray(); test, once it is done
Q1.ENQ("D");
//displayArray(); test, once it is done
Q1.ENQ("C");
//displayArray(); test, once it is done
cout<
Q1.ENQ("P");
//displayArray(); test, once it is done
Q1.ENQ("H");
//displayArray(); test, once it is done
Q1.ENQ("N");
//Q1.displayArray(); test, once it is done
//Test if your full method works since M should be rejected
//Q1.ENQ("M")
cout<
//Q1.displayArray(); test, once it is done
cout<
//Q1.displayArray(); test, once it is done
//Q1.displayArray(); test, once it is done
cout<<"\nTesting Q2 ...\n";
Queue Q2(6);
Q2.ENQ("H");
Q2.ENQ("P");
Q2.ENQ("M");
Q2.ENQ("W");
Q2.ENQ("Z");
Q2.ENQ("N");
//Test if your full method works since Z should be rejected
//Q2.ENQ("Z");
//Q2.displayArray(); test once it is done
for (int i = 1; i<=6; i++){
cout<
}
//Test if your full method works since M should be rejected
cout<
//Q2.displayArray(); test, once it is done
//Q2.displayArray(); test, once it is done
}
In: Computer Science
In: Computer Science
CAN YOU CORRECT THIS CODE PLS.
Scanner in = new Scanner (System.in);
// EXAMPLE 1
System.out.println("****************** EXAMPLE 1 *****************"
);
int x = 4, y = 9;
int a = 99, b = -22;
if (x > y)
System.out.println("x > y");
if (x < y)
System.out.println("x < y");
if (x >= y)
System.out.println("x >= y");
if (a <= 10023)
System.out.println("a <= 10023");
if (b == y)
System.out.println("b == y");
if (b == 5)
System.out.println("b == 5");
if (x != 4)
System.out.println("x != 4");
System.out.println();
// EXAMPLE 2
System.out.println("****************** EXAMPLE 2 *****************"
);
boolean even = false;
x = 6;
if (x % 2 == 0)
even = true;
if (even)
System.out.println("x is even.");
if (even == true)
System.out.println("x is even.");
if (even == false)
System.out.println("x is not even.");
if (true)
System.out.println("This statement WILL output.");
if (false)
System.out.println("This statement will NOT output.");
System.out.println();
// EXAMPLE 3
System.out.println("****************** EXAMPLE 3 *****************"
);
System.out.print("Select an option:\n" +
" 1. Have Time\n 2. Work Hard\n" +
" 3. Socialize\n\n> ");
int choice = in.nextInt(); // user enters 2
if (choice == 1)
System.out.println("Here's time!");
else if (choice == 2)
System.out.println("Keep it up!");
else if (choice == 3)
System.out.println("Nice weather we're having!");
else
System.out.println("Well, you can't do all three.");
System.out.println();
// EXAMPLE 4
System.out.println("****************** EXAMPLE 4 *****************"
);
int grade = 90;
if (grade >= 90)
System.out.println("You got a A!");
if (grade >= 80)
System.out.println("You got a B!");
if (grade >= 70)
System.out.println("You got a C!");
System.out.println();
// EXAMPLE 5
System.out.println("****************** EXAMPLE 5 *****************"
);
a = 4;
if ( a== 4 ) {
System.out.println ( "a is equal to 4!" );
}
System.out.println();
// EXAMPLE 6
System.out.println("******************** EXAMPLE 6
*****************" );
b = 483;
if ( b == 4 )
System.out.println ( "b is equal to 4!" );
}
// EXAMPLE 7
System.out.println("********************* EXAMPLE 7
*****************" );
a = 483;
if( a == 4 ) {
System.out.println( "a is equal to 4!" );
System.out.println( "That's right -a is equal to 4!" );
if (a == 483 );
System.out.println ( "a is equal to 483!" );
System.out.println ( "That's right -a is equal to 483!" );
System.out.println();
}
// EXAMPLE 8
System.out.println("********************* EXAMPLE 8
*****************" );
b = 483;
if( b == 4 );
{
System.out.println ( "b is equal to 4!" );
}
System.out.println ( "That's right -b is equal to 4!" );
else if ( b == 483 )
{
System.out.println ( "b is equal to 483!" );
}
System.out.println ( "That's right -b is equal to 483!" );
System.out.println();
// EXAMPLE 9
System.out.println("********************* EXAMPLE 9
*****************" );
int number1, number2;
System.out.print ( "Enter first integer: ");
number1 = in.nextInt();
System.out.print ( "Enter second integer: ");
number2 = in.nextInt();
if (number1 == number2)
System.out.println( number1 + " == " + number2 );
if (number1 != number2)
SSystem.out.println( number1 + " != " + number2 );
if (number1 < number2)
System.out.println( number1 + " < " + number2 );
if (number1 > number2)
System.out.println( number1 + " > " + number2 );
if (number1 <= number2)
System.out.println( number1 + " <= " + number2 );
if (number1 >= number2)
System.out.println( number1 + " >= " + number2 );
System.out.println();
// EXAMPLE 10
System.out.println("********************* EXAMPLE 10
****************" );
grade = 65
String message;
if ( grade >= 60 ) {
message = "You passed";
}
else
message = "You failed";
System.out.println( message );
System.out.println();
}
}
In: Computer Science
In Java...
Create a class named _MyArrays which has a main( ) and other static methods.
Part I (30%) [Main method] In the main() - Request the number of reviewers (r) and movies (m) - Declare a r x m two-dimensional array of integers - Allow the user to enter distinct values , row by row to fill the two dimensional array - Display the two-dimensional array using a _displayArray method. - Using the _printHighestLowestMovieRating method print the highest and lowest rating for each movie. - Using the _printAverageReviewerRating method print the average reviewer rating for each reviewer. - Test your program with the information in the example on the first page.
Part II (20%) [_displayArray] The _displayArray method must have the following specifications and functionality: o Only Takes the two-dimensional array as a formal parameter/argument o Displays the array data as a matrix (i.e. Rows and Columns) ( you know how to find the row and column without (r ) and (m) ) o Does not return any value.
Part III (20%) [_printHighestLowestReviewerRating] The _ printHighestLowestReviewerRating method must have the following specification and functionality: o Takes the two-dimensional array as a formal parameter/argument as well as r and m o Displays each reviewer code and the highest and lowest rating. o Sample output “Highest rating for review # 1 is 6 and Lowest is 2”
Part IV (20%) [_ printAverageMovieRating] The _ printAverageMovieRating method must have the following specification and functionality: o Takes the two-dimensional array as a formal parameter/argument as well as r and m o Displays each Movie code and the average Movie rating. o Sample output : “ The average rating of the movie #4 is 6.67“
In: Computer Science