0% found this document useful (0 votes)
207 views

CSCI571 Final Fall2021

Information Retrieval Exam Paper Fall 2021

Uploaded by

The Mad Titan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
207 views

CSCI571 Final Fall2021

Information Retrieval Exam Paper Fall 2021

Uploaded by

The Mad Titan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC

ies - USC Viterbi School of Engineering

Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2


Harsh Modi (username: [email protected])

Attempt 1

Written: Dec 2, 2021 6:00 PM - Dec 2, 2021 6:40 PM


Submission View

Released: Dec 3, 2021 8:00 AM

1St Half Course Questions

Question 1 2 / 2 points
[2 Points] A drawback of the eval() function is its vulnerability.

True

False

Question 2 2 / 2 points

[2 Points] Select all statements that are TRUE of the <!DOCTYPE> declaration. Select all that
apply.

The <!DOCTYPE> declaration must only appear once

The <!DOCTYPE> declaration for HTML5 is

<!DOCTYPE html>

The <!DOCTYPE> declaration is case sensitive.

The <!DOCTYPE> declaration represents the document type, and helps browsers to
display web pages correctly

Question 3 2 / 2 points

[2 Points] Consider the following example from w3schools.com.

<!DOCTYPE html>
<html>
<body>

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 1/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering

<h2 class="example">A heading with class="example"</h2>


<p class="example">A paragraph with class="example".</p>

<p>Click the button to add a background color to the first element in


the document with class="example".</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
document.querySelector(".example").style.backgroundColor = "red";
}
</script>

</body>
</html>

What happens when one clicks the "Try it" button?

Adds red background color to the heading with text A heading with class="example"

Adds red background color to the paragraph with text A paragraph with class="example".

Adds red background color to both the header and the paragraph

Question 4 2 / 2 points
[2 Points] HTTP Strict-Transport-Security (HSTS) is a security feature that disallows insecure
communication.

True

False

Question 5 2 / 2 points

[2 Points] CSS describes how HTML elements are to be displayed on screen, paper, or in other
media.

a) True

b) False

Question 6 2 / 2 points

[2 Points] Consider the following Python code:

>>> word = 'Python'

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 2/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering

>>> word[-2]

What gets printed?

'n'

'y'

'o'

Question 7 2 / 2 points

[2 Points] Select all statements that are true of JavaScript variables and identifiers. Select all that
apply.

Identifiers can be short names (like x and y) or more descriptive names (age, sum,
totalVolume)

JavaScript variables are containers for storing data values

JavaScript identifiers are case-sensitive

All JavaScript variables must be identified with unique names

Unique variable names are called identifiers

REST Questions

Question 8 2 / 2 points

[2 Points] What is the purpose of URLs in REST design patterns. Select one answer.

Uniquely identify the server

Work in the presence of firewalls

Uniquely identify a resource

Distinguish every resource entity

Serverless Questions

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 3/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering

Question 9 2 / 2 points
[2 points] Which of the following are properties of a container like Docker? Select all that apply.

Containers on same host share single Linus kernel

Container images can be shared

Not portable

Question 10 2 / 2 points
[2 points] Select the components of a Microservice. Select all that apply.

a data store

a FaaS

a Container

a REST endpoint

Question 11 1.333 / 2 points


[2 points] Select which of the following is true of AWS Lambda? Select all that apply.

Functions are unit of deployment

Can be triggered by HTTP only

Adapts to rates of incoming requests

Question 12 2 / 2 points
[2 points] Which of the following are properties of a container like Docker? Select all that apply.
Package an application with all its dependencies into a standardized unit for software
development

Solve security issues

Independent of VM

Lightweight

HTML5 Questions

Question 13 2 / 2 points
[2 points] Which of the following are new elements in HTML5. Select all that apply.
aside

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 4/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering

applet

article

header

column

Question 14 2 / 2 points
[2 points] Which of the following attributes are not supported in HTML5? Select all that apply.

controls

align

bgcolor

colspan

border

Question 15 2 / 2 points

[2 Points] Consider the following code from W3Schools.

<!DOCTYPE html>
<html>
<body>

<canvas id="myCanvas" width="300" height="150" style="border:1px solid


#d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>

<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.fillRect(20, 20, 150, 100);
</script>

</body>
</html>

What gets displayed?

A rectangle filled with black

A square filled with black


https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 5/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering

A rectangle filled with red

A square filled with red

Cookies and Privacy Questions

Question 16 2 / 2 points

[2 points] Which of the following are ways to opt out of cookies?

Select “do not track” in browser

Upload opt-out cookies

Check account preferences on registration sites

Use cookie management tools in browser

View current cookies and delete what you do not need

Question 17 2 / 2 points

[2 points] Cookies include a number of components, some required, some optional. What are the
two (2) required components? Select only those two.

Domain

HttpOnly flag

Name / value pair

Secure flag

Expiration date

Question 18 1.5 / 2 points

[2 Points} Select all valid attributes of cookies. Select all that apply.

HttpOnly

SameSite

Expires

Path
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 6/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering

SameParty

Max-age

Last Accessed

Secure

Ajax Questions

Question 19 2 / 2 points
[2 points] Fonts on a web page may be requested across domains using CORS.

True

False

Question 20 2 / 2 points
[2 points] The web browser displays a visual progress indicator while the XMLHttpRequest is
being processed.

True

False

Question 21 2 / 2 points

[2 points] Synchronous XMLHttpRequest() has been deprecated.

True

False

Question 22 2 / 2 points

[2 points] Select which XMLHttpRequest method actually triggers the request to the server?

open()

send()

Question 23 2 / 2 points
[2 points] Consider the following code snippet:

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 7/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
j = eval("(" + text + ")");

Select all answers that are TRUE for such code.

It is part of JSON.parse()

It is very unsafe

It only works with some browsers

Question 24 1.5 / 2 points


[2 points] What are some of the characteristics of Ajax applications? Select all that apply.

They have visual effects

They present live content

They are single page

They have static icons

Question 25 1.333 / 2 points


[2 points] Consider the following object:

var xhr = new XMLHttpRequest();

Which values should be checked in the callback? Select all that apply.

xhr.status is 404

xhr.statusText is OK

xhr.readyState is 4

Question 26 2 / 2 points
[2 points] Consider the following code from one of the Ajax example shown in class:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">


<html><head><title>My Third Ajax Script</title>
<script src="script03.js" type="text/javascript" language="Javascript">
</script></head>
<body><div id="pictureBar"> </div></body></html>

And this JavaScript:

window.onload = initAll;
var xhr = false;
function initAll() { same as previously except it calls getPix }
function getPix() { xhr.open("GET", "flickrfeed.xml", true);
xhr.onreadystatechange = XXXXX1;
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 8/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
xhr.send(null);setTimeout("getPix()",5 * 1000); }
function showPictures() {
var tempDiv = document.createElement("div");
var tempDiv2 = document.createElement("div");
if (xhr.readyState == 4) {
if (xhr.status == 200) {
tempDiv.XXXXX2 = xhr.responseText;
var allLinks = tempDiv.getElementsByTagName("a");
for (var i=1; i<allLinks.length; i+=2) {
tempDiv2.appendChild(allLinks[i].cloneNode(true)); }
allLinks = tempDiv2.getElementsByTagName("a");
var randomImg = Math.floor(Math.random() * allLinks.length);
document.getElementById("pictureBar").innerHTML =
allLinks[randomImg].innerHTML;
} else { alert("There was a problem with the request " +
xhr.status); } } }

What should be the values of the two items listed as XXXXX1 and XXXXX2?

callback and loadHTML

showPictures and innerHTML

Frameworks Questions

Question 27 2 / 2 points
[2 points] Select which of the following is NOT true of NodeJS.

uses blocking I/O model

is event driven

handles networking

Question 28 2 / 2 points
[2 points] Which of the following are true of TypeScript? Select all that apply.

Supports Optionals

Supports MVC

Includes support for classes and modules

Question 29 2 / 2 points

[2 Points] Consider the following Express code.

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmission… 9/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering

var express = require('express');


var cors = require('cors');
var app = express();

<< Missing code >>

app.get('/products/:id', function (req, res, next) {


res.json({msg: 'This is CORS-enabled for all origins!'})
});

app.listen(80, function () {
console.log('CORS-enabled web server listening on port 80')
});

What code is missing to use CORS?

app.use(cors());

app.send(cors());

cors.use(cors());

app.load(cors());

Question 30 2 / 2 points
[2 points] Select which of the following are true of Angular (version 8+). Select all that apply.

Supports FilterPipe and OrderByPipe

Depends on TypeScript, RxJS and Node

Includes a reactive programming library for JavaScript

Question 31 2 / 2 points
[2 points] Select which of the following is true of React. Select all that apply.

Does not implement MVC

Is a framework like Angular

Web Security Questions

Question 32 2 / 2 points

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 10/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
[2 points] Which types of hacks can cause damage to the user on the client side? Select all that
apply.

Log user keystrokes

Deface pages, altering content

Denial of Service

Stealing cookies

Install malicious software

Question 33 1.667 / 2 points


[2 points] What are common ways that websites get infected? Select all that apply.

Using Social networks to infect users

Attacks on Back-end virtual hosting companies

Cross-site Spoofing

Cross-site Scripting

XSP Scripting attacks

SQL Injection attacks

Question 34 1.667 / 2 points


[2 points] Which of the following are Injection Attacks?

JavaScript Hijacking

SQL Injection

Content Spoofing

Search Worms

Cross Site Request Forgery (CSRF)

DDoS attack

Question 35 2 / 2 points
[2 points] Which of the following are authentication attacks?

Cross-Site Request Forgery (CSRF)

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 11/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
Insufficient Authentication

Brute Force Attacks

Content Spoofing

Weak Password Recovery Validation

Question 36 2 / 2 points

[2 Points] The major reason to deprecating V2 Onion Service is exposure to attacks.

a) True

b) False

High-Performance Websites Questions

Question 37 2 / 2 points
[2 points] Select the types of files should be compressed to improve web site performance.
Select all that apply.

JSONP files

PDF files

XML files

JPG files

Minified JavaScript files

Text files

Question 38 2 / 2 points
[2 points] Select all conditions where a “cached object” is fresh.

A proxy cache has seen the object recently, and it was modified long ago

It has expire header with time set in the future

Current age is greater than age value given in cache-control header

If browser cache has seen the object recently, and has been set to check once per
session
The origin server is asked to validate the object

Question 39 2 / 2 points

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 12/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
[2 points] Which of the following are ways to reduce the number of HTTP requests? Select all
that apply.

Use Image Maps

Combine cookies

Combine Style Sheets

Split images

Combine scripts

JQuery Questions

Question 40 2 / 2 points
[2 points] jQuery has fairly complex ajax support functions.

True

False

Question 41 2 / 2 points
[2 points] Which of the following objects are abstracted by jQuery? Select all that apply.

XMLHttpRequest

JSON

DOM

Question 42 2 / 2 points
[2 points] What type of selector is the ‘contains’ selector, as in the following example:

$("div:contains('John')" ).css( "text-decoration", "underline" );

Basic Text selector

Content Filter selector

Basic Filter selector

Question 43 1.333 / 2 points


[2 points] Which of the following selectors are part of the Basic Filter selectors category? Select
all that apply.
:header selector
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 13/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering

:multiple selector

:first

Question 44 2 / 2 points
[2 points] What type of selector is the ‘header’ selector, as in the following example:

$(":header").css({ background: "#ccc", color: "blue" });

Basic selector

Basic Filter selector

Basic Color selector

Question 45 2 / 2 points
[2 points] What type of selector is the ‘:contains()’ selector, as in the following example:

$( "div:contains('John')" ).css( "text-decoration", "underline" );

Select one correct answer.

Content Filter category

Child Filter category

Child Contains category

Responsive Website Design (RWD) Questions

Question 46 1 / 2 points
[2 points] Select RWD usability guidelines on mobile devices.

change navigation

maximize text entry

use single or two columns

reduce amount of content

Question 47 2 / 2 points

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 14/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering
[2 points] Consider the following media queries:

<link rel="stylesheet" media="only screen and (min-width:320px) and


(max-width: 760px)" href="css1.css">

<link rel="stylesheet" media="only screen and (min-width:761px) and


(max-width: 1100px)" href="css2.css">

What different device sizes they fail to support? Select all that apply.

Devices with small screens

Devices with large screens

Question 48 2 / 2 points
[4 points] Select which concepts are the basis of Responsive Website Design. Select all that
apply.

CSS3 media queries

content reduction

fluid grids

flexible images

Question 49 2 / 2 points
[2 points] What are properties of fluid grids? Select all that apply.

Define grids based on number of rows and columns

Defined using relative dimensions

Have to adjust width manually for certain devices

Elements will adjust their widths and heights by the specified proportions to their parent
container

Question 50 2 / 2 points

[2 Points] The major difference between different versions of Bootstrap is the number of grid
tiers.

a) True

b) False

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 15/16
12/3/21, 9:54 AM : Quiz Submissions - CS571 Fall 2021: Web Technologies Exam 2 - CSCI571 - 20213 - Web Technologies - USC Viterbi School of Engineering

Attempt Score:95.33 / 100 - 95.33 %


Overall Grade (highest attempt):95.33 / 100 - 95.33 %

Done

https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=41106&ai=123867&isInPopup=0&cfql=0&fromQB=0&fromSubmissio… 16/16

You might also like