1.Where does SANS get all of the information about attacks that are occurring?
2. What type of training or certification does SANS provide?
In: Computer Science
Show how the Splaying techniques (Zig, Zag, Zig-Zag, Zag-Zig, Zig-Zig, Zag-Zag) works in Splay Trees Insertion and deletion with examples.
In: Computer Science
1. Write a query in SQL to find the full name of the “Actors” who appeared in the movie titled Star Wars (using JOIN ).
2.Write a SQL query to find the movie Title that has received Lowest rating from reviewers, but whose actors have received an award for their contribution in movie. (Expected Output: Fantastic Beasts and Where to Find Them)
3.Write a SQL query that display the list of genres, Number of movies in that genre grouped by year and genre.
4.Write a SQL query that display movie titles that have received At least 3 awards.
5.Write a SQL query that display the titles, release date, distributor information of all movies whose rating is not provided (Number of star not given). Sort this list by released year.
6.Write a SQL query that display the list of movies and the category of the awards received by movies that are distributed by “Disney”
7.Write a SQL query that display all the different professions in movie industry exclude the professions that start with letter R.
PROVIDED Tables and Values:
CREATE TABLE `artists` (
`artist_id` INT NOT NULL AUTO_INCREMENT,
`first_name` varchar(45) NOT NULL,
`last_name` varchar(45) NOT NULL,
`contact_no` varchar(15) DEFAULT NULL,
`Profession` TEXT DEFAULT NULL,
`birth_date` datetime DEFAULT NULL,
`address` TEXT DEFAULT NULL,
PRIMARY KEY (`artist_id`)
) ;
CREATE TABLE `movies` (
`movie_id` INT NOT NULL AUTO_INCREMENT,
`title` varchar(45) NOT NULL,
`genre` varchar(25) NOT NULL,
`gross` decimal(6,2) DEFAULT NULL,
`Distributor` varchar(45) NOT NULL,
`release_date` datetime DEFAULT NULL,
PRIMARY KEY (`movie_id`),
KEY `genre_fk_idx` (`genre`)
) ;
CREATE TABLE `awards` (
`awards_id` INT NOT NULL AUTO_INCREMENT,
`movie_id` INT DEFAULT NULL,
`person_id` INT DEFAULT NULL,
`category` varchar(45) DEFAULT NULL,
PRIMARY KEY (`awards_id`),
KEY `person_id_idx` (`person_id`),
KEY `movie_id_idx` (`movie_id`),
CONSTRAINT `movie_awards_fk` FOREIGN KEY (`movie_id`) REFERENCES
`movies` (`movie_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `person_awards_fk` FOREIGN KEY (`person_id`) REFERENCES
`artists` (`artist_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ;
CREATE TABLE `movies_ratings` (
`rating_id` INT NOT NULL AUTO_INCREMENT,
`movie_id` INT NOT NULL,
`person_id` INT NOT NULL,
`number_of_stars` INT DEFAULT NULL,
PRIMARY KEY (`rating_id`),
KEY `movies__ratings_fk_idx` (`movie_id`),
KEY `artist_ratings_fk_idx` (`person_id`),
CONSTRAINT `artist_ratings_fk` FOREIGN KEY (`person_id`) REFERENCES
`artists` (`artist_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `movies__ratings_fk` FOREIGN KEY (`movie_id`) REFERENCES
`movies` (`movie_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ;
CREATE TABLE `movie_cast` (
`id` INT NOT NULL AUTO_INCREMENT,
`movie_id` INT DEFAULT NULL,
`person_id` INT DEFAULT NULL,
`category` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `person_id_idx` (`person_id`),
KEY `movie_id_idx` (`movie_id`),
CONSTRAINT `movie_cast_fk` FOREIGN KEY (`movie_id`) REFERENCES
`movies` (`movie_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `person_cast_fk` FOREIGN KEY (`person_id`) REFERENCES
`artists` (`artist_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ;
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (1,'Idrissa Akuna ','Elba','4706091972','Actor','1972-09-06
00:00:00','CA');
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (2,'Christopher
Hemsworth','Hemsworth','3408111983','Actor','1983-08-11
00:00:00','IL');
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (3,'Zoe ','Saldana','4106191978','Actor','1978-06-19
00:00:00','AZ');
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (4,'Christopher','Townsend','3903251976','Visual
Effects','1976-03-25 00:00:00',NULL);
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (5,'Guy','Williams','3209211985','Reviewer','1985-09-21
00:00:00',NULL);
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (6,'Jonathan','Fawkner','3011131990','Reviewer','1990-11-13
00:00:00',NULL);
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (7,'Dan','Sudick','4701201972','Visual Effects','1972-01-20
00:00:00','NJ');
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (8,'Tom','Holland','2401061996','Actor','1996-06-01
00:00:00','CA');
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (9,'Justin ','Marks','2804021992','Screenplay','1992-04-02
00:00:00','LA');
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (10,'Adam','McGay','5104171968','Director','1968-04-17
00:00:00','PA');
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (11,'Adam','McGay','5104171968','Actor','1968-04-17
00:00:00','PA');
INSERT INTO artists
(`artist_id`,`first_name`,`last_name`,`contact_no`,`Profession`,`birth_date`,`address`)
VALUES (12,'Justin ','Marks','2804021992','Screenplay','1992-04-02
00:00:00','LA');
INSERT INTO movies
(`movie_id`,`title`,`genre`,`gross`,`Distributor`,`release_date`)
VALUES (1,'Star Wars','Sci Fi',2.06,'Disney','2015-12-18
00:00:00');
INSERT INTO movies
(`movie_id`,`title`,`genre`,`gross`,`Distributor`,`release_date`)
VALUES (2,'Jurassic World','Sci Fi',1.67,'Universal','2015-05-29
00:00:00');
INSERT INTO movies
(`movie_id`,`title`,`genre`,`gross`,`Distributor`,`release_date`)
VALUES (3,'Minions','Comedy',1.15,'Universal','2015-07-10
00:00:00');
INSERT INTO movies
(`movie_id`,`title`,`genre`,`gross`,`Distributor`,`release_date`)
VALUES (4,'The Jungle Book','Adventure',9.66,'Disney','2016-04-04
00:00:00');
INSERT INTO movies
(`movie_id`,`title`,`genre`,`gross`,`Distributor`,`release_date`)
VALUES (5,'Fantastic Beasts and Where to Find
Them','Fantasy',8.14,'Warner Bros','2016-09-10 00:00:00');
INSERT INTO movies
(`movie_id`,`title`,`genre`,`gross`,`Distributor`,`release_date`)
VALUES (6,'Zootopia','Comedy',1.02,'Disney','2016-02-13
00:00:00');
INSERT INTO movies
(`movie_id`,`title`,`genre`,`gross`,`Distributor`,`release_date`)
VALUES (7,'Beauty and the
Beast','Fantasy',1.26,'Disney','2017-02-23 00:00:00');
INSERT INTO movies
(`movie_id`,`title`,`genre`,`gross`,`Distributor`,`release_date`)
VALUES (8,'Spider-Man: Homecoming','Super
Hero',8.80,'Sony','2017-06-28 00:00:00');
INSERT INTO movies
(`movie_id`,`title`,`genre`,`gross`,`Distributor`,`release_date`)
VALUES (9,'Guardians of the Galaxy Vol. 2','Super
Hero',8.60,'Disney','2017-04-10 00:00:00');
INSERT INTO movies
(`movie_id`,`title`,`genre`,`gross`,`Distributor`,`release_date`)
VALUES (10,'Thor: Ragnarok','Super Hero',8.54,'Disney','2017-10-10
00:00:00');
INSERT INTO awards
(`awards_id`,`movie_id`,`person_id`,`category`) VALUES
(1,1,1,'Actor');
INSERT INTO awards (`awards_id`,`movie_id`,`person_id`,`category`)
VALUES (2,1,2,'Actor');
INSERT INTO awards (`awards_id`,`movie_id`,`person_id`,`category`)
VALUES (3,1,4,'Visual Effects');
INSERT INTO awards (`awards_id`,`movie_id`,`person_id`,`category`)
VALUES (4,2,5,'Visual Effects');
INSERT INTO awards (`awards_id`,`movie_id`,`person_id`,`category`)
VALUES (5,2,3,'Actor');
INSERT INTO awards (`awards_id`,`movie_id`,`person_id`,`category`)
VALUES (6,5,10,'Director');
INSERT INTO awards (`awards_id`,`movie_id`,`person_id`,`category`)
VALUES (7,4,9,'Screenplay');
INSERT INTO awards (`awards_id`,`movie_id`,`person_id`,`category`)
VALUES (8,5,2,'Actor');
INSERT INTO awards (`awards_id`,`movie_id`,`person_id`,`category`)
VALUES (9,5,10,NULL);
INSERT INTO movie_cast
(`id`,`movie_id`,`person_id`,`category`) VALUES
(1,1,1,'Actor');
INSERT INTO movie_cast (`id`,`movie_id`,`person_id`,`category`)
VALUES (2,1,2,'Actor');
INSERT INTO movie_cast (`id`,`movie_id`,`person_id`,`category`)
VALUES (3,1,4,'Visual Effects');
INSERT INTO movie_cast (`id`,`movie_id`,`person_id`,`category`)
VALUES (4,2,5,'Visual Effects');
INSERT INTO movie_cast (`id`,`movie_id`,`person_id`,`category`)
VALUES (5,2,3,'Actor');
INSERT INTO movie_cast (`id`,`movie_id`,`person_id`,`category`)
VALUES (6,5,10,'Director');
INSERT INTO movie_cast (`id`,`movie_id`,`person_id`,`category`)
VALUES (7,4,9,'Screenplay');
INSERT INTO movie_cast (`id`,`movie_id`,`person_id`,`category`)
VALUES (8,5,2,'Actor');
INSERT INTO movie_cast (`id`,`movie_id`,`person_id`,`category`)
VALUES (9,5,10,NULL);
INSERT INTO movie_cast (`id`,`movie_id`,`person_id`,`category`)
VALUES (10,1,10,'Director');
INSERT INTO movie_cast (`id`,`movie_id`,`person_id`,`category`)
VALUES (11,2,2,'Actor');
INSERT INTO movie_cast (`id`,`movie_id`,`person_id`,`category`)
VALUES (12,2,7,'Visual Effects');
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(1,1,5,5);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(2,2,5,5);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(3,3,5,5);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(4,4,5,4);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(5,5,5,4);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(6,6,5,4);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(7,7,5,4);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(8,8,5,4);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(9,1,6,5);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(10,2,6,5);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(11,3,6,5);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(12,4,6,5);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(13,7,6,4);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(14,8,6,4);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(15,9,6,4);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(16,10,6,4);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(17,9,5,NULL);
INSERT INTO movies_ratings
(`rating_id`,`movie_id`,`person_id`,`number_of_stars`) VALUES
(18,10,5,NULL);
In: Computer Science
Let A = {x|x ∈ N∧x < 15}, B = {x|x ∈ Z∧x < 20∧x > −4∧x/2 ∈ Z}, C = {x|x ∈ N∧x2 ∈ A}.
Calculate the following expressions using the counting tools we have learned as appropriate. Show your work.
In: Computer Science
(Prime Numbers) An integer is said to be prime if it is divisible by only 1 and itself. For example, 2, 3, 5 and 7 are prime, but 4, 6, 8 and 9 are not. Write pseudocode and function called isPrime that receives an integer and determines whether the integer is prime or not. Write a test program that uses isPrime to determine and print all the prime numbers between 1 and 1000. Display 10 numbers per line. Twin primes are a pair of prime numbers that differ by 2. For example, 3 and 5 are twin primes, as are 5 and 7, and 11 and 13. In your test program, use isPrime to determine and print all twin primes less than 1000. Display the output as follows:
(3, 5)
(5, 7)
…
In: Computer Science
What is the relationship between RedHat and Fedora?
In: Computer Science
Programming Language Required: C
Write a multithreaded program in C (not c++) using the pthread library and dynamic memory(malloc) that multiplies two matrices together. The numbers in the matrices must be read in from a text file. The program should also check if the two matrices are capable of being multiplied together. The amount of threads used has to be dynamic. The user should be able to choose how many threads they wish to use using the command line. Finally, the result must be stored in a text file.
In: Computer Science
JavaScript is executed all on the client side within the browser. What kind of tasks or applications do you think is best to be executed completely on the client side, without communicating with the server? Give an example.
In: Computer Science
Write a program named t03.py that tests the function by asking the user to enter a number and displaying the output day, month and year. Save the function in a PyDev library module named functions.py
A sample run for t03.py:
Enter a date in the format MMDDYYYY: 05272017
The output will be:
27/05/2017
The function docstring is as follows:
def convert_date (date_int): """
-------------------------------------------------------
Converts date_int into days, month and year use: day,month,year = convert_date (date_int)
-------------------------------------------------------
Paramaters:
date_int – (int > 0)
returns
day: the day in the month in date_int (int >= 0)
month: the month in date_int (int >=0) year: the years in date_int (int >=0)
------------------------------------------------------- """
In: Computer Science
Why is it possible that when viewing images in an phone forensic extraction we may see multiple images that are visually the same?
In: Computer Science
URGENT:
USING C++:
You are given a main.cpp and a Schedule.h file. You are to write a Schedule.cpp file that implements the missing pieces from Schedule.h.
// ************************************
// ************* main.cpp ************
// ************************************
#include "Schedule.h"
void main()
{
Schedule s1(10);
s1.addEntry(1,20,"Feed Cat");
s1.addEntry(2,40,"Feed Dog");
s1.addEntry(2,50,"Walk Dog");
s1.addEntry(4,0, "Fix Dinner");
s1.addEntry(5,15,"Eat Dinner");
s1.printSchedule();
Schedule s2(s1); // Note this uses the copy constructor
cout << endl << "Output from s2 " << endl;
s2.printSchedule();
}
// **********************************************
// ************* Schedule.h ******************
// **********************************************
#include <iostream>
#include <string>
using namespace std;
class Entry{
private:
int m_hour;
int m_minute;
string m_todo;
public:
Entry()
{
m_hour = -1;
m_minute = -1;
m_todo = "N/A";
}
void setData(int hour, int minute, const char *td);
void setData(Entry & e);
//This routine prints a line that would look something like:
// 12:30 Take a Walk
void printEntry();
};
class Schedule
{
private:
// Array of Entry
Entry * m_entryArr;
// Max size of the Array
int m_maxEntries;
// Number of entries filled in with setData (starts out = 0)
int m_actualEntryCount;
public:
// This Constructor will initialize 2 ints and define the m_entryArr
Schedule(int maxEntries);
// Copy Constructor – it is done for you
Schedule::Schedule(Schedule & s) {
m_actualEntryCount = s.m_actualEntryCount;
m_maxEntries = s.m_maxEntries;
m_entryArr = new Entry[m_maxEntries];
for (int i=0; i < m_actualEntryCount; i++)
{
m_entryArr[i].setData(s.m_entryArr[i]);
}
}
~Schedule();
// addEntry returns true if it succeeds, false if we are out of space
// Note that addEntry will merely call setData to fill in the next entry
// in the array and increment the m_actualEntryCount
bool addEntry(int hour, int minute, const char *todo);
// This routine prints out all entries (i.e. as specified by m_actualEntryCount)
void printSchedule();
};
In: Computer Science
Create a system to simulate vehicles at an intersection. Assume that there is one lane going in each of four directions, with stoplights facing each direction. Vary the arrival average of vehicles in each direction and the frequency of the light changes to view the “behavior” of the intersection.
In: Computer Science
In: Computer Science
Explain the permissions for the following files:
1 drwx------ 6 monette staff 4096 Nov 18 2013 twelve
2 -rw------- 1 kliu student 2495 Sep 10 2013 who.txt
a) What type of file is it? b) Who is the owner? c) What is the group name? d) For each entry outline the permission granted to all type of users (owner, group, others)
In: Computer Science
In: Computer Science