CSCI571 Final Spring2022
CSCI571 Final Spring2022
Attempt 1
Written: Apr 26, 2022 6:00 PM - Apr 26, 2022 6:40 PM
Submission View
Released: Apr 27, 2022 8:00 AM
JQuery Questions
Question 1 2 / 2 points
[2 points] Which of the following objects are abstracted by jQuery? Select all that apply.
DOM
JSON
XMLHttpRequest
Question 2 2 / 2 points
[2 points] What is the jQuery code that corresponds to the following DOM code?
kids = $("body").childnodes();
kids = $("body").children();
Question 3 2 / 2 points
[2 points] What type of selector is the ‘element’ selector, as in the following example:
Basic selector
Question 4 2 / 2 points
[2 points] Which of the following selectors are part of the Basic Filter selectors category?
Select all that apply.
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSubm… 1/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
:first
:header selector
:multiple selector
Question 5 2 / 2 points
[2 points] Which of the following selectors are part of the Basic selectors category? Select all
that apply.
Form
Element
Multiple
Question 6 2 / 2 points
[2 points] Consider the following CSS, jQuery and HTML. Will the image properties be
changed by the jQuery code?
.bigImg {
border: 1px solid black;
}
$("img.userIcon" ).load(function() {
if ( $( this ).height() > 100 {
$( this ).addClass("bigImg");
}
});
<body>
<img src="/uploads/media/default/0001/01/47951.jpeg" width="500"
height="600">
</body>
True
False
REST Questions
[2 points] When comparing REST with other Web Services approaches, what statements are
TRUE? Select all that apply.
Question 8 1 / 1 point
[1 Point] In REST Web Services, except in very specific cases, HTML is not acceptable as a
response format.
A) True
B) False
Question 9 1 / 1 point
[1 Point] In REST Web Services, POST and PUT may be used for "updating" items.
A) True
B) False
Question 10 1 / 1 point
A) http://www.parts-depot.com/parts/00345
B) http://www.parts-depot.com/parts?part-id=00345
Question 11 1 / 1 point
[1 Point] In REST Web Services, POST requests should be used for creation of data.
A) True
B) False
HTML5 Questions
Question 12 2 / 2 points
[2 points] Which of the following are removed elements in HTML5? Select all that apply.
embed
center
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSubm… 3/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
footer
font
frameset
Question 13 2 / 2 points
<!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.beginPath();
ctx.moveTo(20, 20);
ctx.lineTo(20, 70);
ctx.lineTo(70, 70);
ctx.lineTo(70, 20);
ctx.lineTo(20, 20);
ctx.strokeStyle = "red";
ctx.stroke();
</script>
</body>
</html>
Question 14 2 / 2 points
[2 Points] Select all statements that are true of JSON. Select all that apply.
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSubm… 4/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
JSON data can easily be sent between computers, and used by any programming
language
You can receive pure text from a server and use it as a JavaScript object
The JSON format is syntactically similar to the code for creating JavaScript objects
JavaScript has a built in function for converting JSON strings into JavaScript objects
JavaScript has a built in function for converting a JavaScript object into a JSON string
JavaScript has a built in function for converting an XML object into a JSON string
Question 15 2 / 2 points
>>> x = "awesome"
>>> def myfunc():
>>> global x
>>> x = "fantastic"
>>> myfunc()
>>> print("Python is " + x)
A) Python is fantastic
B) Python is awesome
View Feedback
Question 16 2 / 2 points
A security feature that lets a web site tell browsers that it should only be
communicated with using HTTPS
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSubm… 5/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
Question 17 1 / 2 points
<!DOCTYPE html>
<html>
<head>
<style>
.flex-container {
display: flex;
flex-direction: column;
background-color: DodgerBlue;
}
<h1>Hello Flex!</h1>
<div class="flex-container">
<div>1</div>
<div>2</div>
<div>3</div>
</div>
</body>
</html>
Select all the actual behaviors of this code. Select all that apply.
View Feedback
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSubm… 6/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
Question 18 2 / 2 points
<!DOCTYPE html>
<html>
<body>
<script>
function myFunction() {
var t = document.createTextNode("Hello World");
document.body.appendChild(t);
}
</script>
</body>
</html>
Question 19 2 / 2 points
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
const myObj = {name:"John", age:30, city:"New York"};
document.getElementById("demo").innerHTML = myObj.name;
</script>
</body>
</html>
John
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSubm… 7/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
New York
No string is displayed
$ (dollar sign)
Frameworks Questions
Question 21 2 / 2 points
[2 points] Which of the following are true of ReactJS? Select all that apply.
Question 22 0 / 2 points
[2 points] Which of the following are true of Node.js? Select all that apply.
Question 23 2 / 2 points
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSubm… 8/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
app.listen(80, function () {
console.log('CORS-enabled web server listening on port 80')
});
cors.use(cors());
app.send(cors());
app.use(cors());
app.load(cors());
Question 24 2 / 2 points
[2 points] Select which of the following is true of React. Select all that apply.
Question 25 2 / 2 points
res.end('Hello World')
res.send('Hello World')
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSubm… 9/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
req.send('Hello World')
Serverless Questions
Question 26 2 / 2 points
/**
* Responds to any HTTP request.
*
* @param {!express:Request} req HTTP request context.
* @param {!express:Response} res HTTP response context.
*/
exports.helloWorld = (req, res) => {
let message = req.query.message || req.body.message ||
'Hello World!';
res.status(200).send(message);
};
What is it?
Question 27 2 / 2 points
[2 points] Which of the following are true of AWS Lambda? Select all that apply.
Question 28 2 / 2 points
[2 points] Select the components of a Microservice. Select all that apply.
a Container
a REST endpoint
a FaaS
a data store
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSub… 10/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
Question 29 2 / 2 points
try {
switch (event.httpMethod) {
case 'DELETE':
body = await
dynamo.delete(JSON.parse(event.body)).promise();
break;
case 'GET':
body = await dynamo.scan({ TableName:
event.queryStringParameters.TableName }).promise();
break;
case 'POST':
body = await
dynamo.put(JSON.parse(event.body)).promise();
break;
case 'PUT':
body = await
dynamo.update(JSON.parse(event.body)).promise();
break;
default:
throw new Error(`Unsupported method
"${event.httpMethod}"`);
}
} catch (err) {
statusCode = '400';
body = err.message;
} finally {
body = JSON.stringify(body);
}
return {
statusCode,
body,
headers,
};
};
What is it?
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSub… 11/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
[2 Points] Select all reasons why you should make JavaScript and CSS files external. Select all
that apply.
Help compression
Helps minification
Question 31 2 / 2 points
[2 points] Select the types of files should be compressed to improve web site performance.
Select all that apply.
JPG files
PDF files
XML files
Text files
JSONP files
[2 points] Select all ways to "opt out" of cookies. Select all that apply.
[2 points] Which of the following are different types of cookies? Select all that apply.
Conversion-tracking cookies
Non-secure cookies
Client-side cookies
Server-side cookies
Persistent cookies
Fourth-party cookies
Non-secure cookies
Question 34 2 / 2 points
[2 points] Select all true properties of cookies. Select all that apply.
Secure cookies are erased when the user closes the browser
Question 35 2 / 2 points
[2 points] Which of the following are authentication attacks?
Insufficient Authentication
Content Spoofing
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSub… 13/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
Question 36 2 / 2 points
[2 Points] Select all techniques used to bypass the same-origin policy. Select all that apply.
XMLHttpRequest
FRAME tag
CORS
Browser plugins
VIDEO tag
Browser extensions
JSONP
Question 37 2 / 2 points
[2 points] Which of the following are client-side attacks? Select all that apply.
Insufficient Authentication
Clickjacking
Question 38 2 / 2 points
[2 points] Which of the following are Injection Attacks?
SQL Injection
Search Worms
Content Spoofing
JavaScript Hijacking
DDoS attack
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSub… 14/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
Question 39 2 / 2 points
[2 Points] A DDoS attack occurs when a system is overwhelmed with malicious electronic
traffic.
a) True
b) False
Ajax Questions
Question 40 2 / 2 points
[2 Points] Traditional web sites and Ajax web APPS, have different behavior. Select all that
apply.
D) In Traditional web sites, user interaction via HTTP requests occur 'behind the
scenes'
Question 41 2 / 2 points
[2 points] What are some of the characteristics of Ajax applications? Select all that apply.
Question 42 2 / 2 points
respons2
responseText
responseXML
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSub… 15/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
Question 43 1 / 1 point
[1 Point] The web browser displays a visual progress indicator while the XMLHttpRequest is
being processed.
True
False
Question 44 0 / 1 point
[1 Point] Netscape 7 and Mozilla Firefox 1.0 were the first browsers to "clone"
XMLHttpRequest functionality from Internet Explorer.
A) True
B) False
Question 45 0 / 1 point
A) True
B) False
View Feedback
Question 46 1 / 1 point
[1 Point] Fonts on a web page may be requested across domains using CORS.
True
False
Question 47 0 / 1 point
[1 Point} To request CORS, with XMLHttpRequest, the client JavaScript must issue an
Origin header.
A) True
B) False
View Feedback
Question 48 1 / 1 point
[1 Point] During AJAX open(), what does it mean to pass in <false> to the third parameter and
why is it poor practice?
A) False means the request will be executed asynchronously. It is bad because the
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSub… 16/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
flow of the application gets disrupted and the order of code execution becomes
ambiguous
C) False means the request will be executed synchronously. It is bad because a time-
consuming synchronous request on the main thread will crash the browser.
D) False means the request will be executed synchronously. It is bad because a time-
consuming synchronous request on the main thread will degrade UX.
View Feedback
Question 49 1 / 1 point
[1 Point] What are solutions to the cross-domain issue for resources such as JavaScript of
JSON?
View Feedback
Question 50 1 / 1 point
[1 Point] What are the main differences between Ajax and the "classic" application model?
A) In classic model, the web server responds with CSS and HTML
View Feedback
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSub… 17/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
Question 51 1 / 1 point
A) this.currentState
B) this.readyState
C) this.state
D) this.currentStatus
View Feedback
Question 52 1 / 1 point
It requires redirect
Question 54 2 / 2 points
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSub… 18/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
[2 points] Select RWD usability guidelines on mobile devices.
change navigation
Question 55 2 / 2 points
[2 Points] The major difference between different versions of Bootstrap is the number of grid
tiers.
a) True
b) False
Question 56 2 / 2 points
[2 points] Consider the following media queries:
What different device sizes they fail to support? Select all that apply.
Question 57 2 / 2 points
[4 points] Select which concepts are the basis of Responsive Website Design. Select all that
apply.
flexible images
fluid grids
content reduction
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSub… 19/20
4/27/22, 10:18 AM : Quiz Submissions - CS571 Spring 2022: Web Technologies Exam 2 - CSCI571 - 20221 - Web Technologies - USC Viterbi School of En…
Done
https://courses.uscden.net/d2l/lms/quizzing/user/quiz_submissions_attempt.d2l?isprv=&qi=48987&ai=138896&isInPopup=0&cfql=0&fromQB=0&fromSub… 20/20