CS 008 Final

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

The code segment outputs "<p>How are you?</p>".function askQuestion() { echo "<p>$question</p>"; } $question = "How are you?"; askQuestion();

FALSE

The code segment outputs 6.function multiplyNumbers($x, $y) { $answer = $x * $y; return $answer; } $z = multiplyNumbers(2, 3); echo $answer;

FALSE

The developer can change the emulated width and height when the emulator is in Device mode.

FALSE

The emulator is only capable of emulating the iPhone.

FALSE

The fac_id column can have a NULL value.

FALSE

The following INSERT statements add two students into the students table. INSERT INTO student VALUES (777, 'Red', 'Rosy', 4.0); INSERT INTO student VALUES (777, 'White', 'Willow', 3.1);

FALSE

The following code uses the getData() function from the figure above and provides sufficient data validation for a 16 digit credit card number.$creditCardNum = getData("creditCardNum"); if (strlen($creditCardNum) == 16) { // Valid number } else { // Invalid number }

FALSE

The geolocation (latitude and longitude) of the emulated device is modified by moving the desktop computer to a different location.

FALSE

The height property is often used in the viewport meta tag.

FALSE

The include statement inserts the contents of another file before the PHP script executes.

FALSE

The max-width property should never be used in a fluid layout.

FALSE

The number 5 billion may be stored in an INTEGER column.

FALSE

The pool company will not know that the water level is too low unless the customer calls or someone happens to check the system status web page.

FALSE

The pool company would have to send a technician to the pool to change the control system settings.

FALSE

The range and number widgets are interchangeable choices for entering numbers.

FALSE

The record 123, 1004, C can be added to the enroll table.

FALSE

The sass command-line tool creates a .scss file from a .css file.

FALSE

The student table has a field for storing student addresses. True False

FALSE

The students table may contain two students with the same stuId.

FALSE

The text is horizontally centered in the web browser. <body> <div style="width:300px; margin:auto;">Some text</div> </body>

FALSE

The web browser will always create a new window for hyperlinks whose target attribute is _blank.

FALSE

The word "CREATE" must be capitalized in a CREATE statement.

FALSE

The www.whitehouse.gov home page looks identical in desktop Chrome and in an emulated iPhone 6 browser.

FALSE

To copy the functionality of another web page found on the web, just copy the HTML from the view source page.

FALSE

Two tags within the same HTML document may have the same id.

FALSE

TypeScript code is executed by the web browser.

FALSE

UI libraries always use JavaScript to govern the behavior of the UI widgets.

FALSE

Unlike the blind, people who are deaf do not need special accommodation for websites.

FALSE

Video is often played automatically on mobile websites.

FALSE

Web applications typically use the same physical database in both the development environment and deployment environment .

FALSE

Web developers typically create web pages using new features available exclusively on a particular browser.

FALSE

Web hosting companies generally charge more for hosting on Linux servers than for hosting on Windows servers.

FALSE

When an HTML form uses method="post" and submits to a PHP script, the form values appear in the URL's query string.

FALSE

What is $_SERVER["REQUEST_METHOD"] the first time a script is loaded in the web browser? GET POST

GET

What does the code below output?sayGoodbye("Sam"); function sayGoodbye($name) { echo "Goodbye, $name"; } Goodbye, Sam Goodbye, $name Goodbye,

Goodbye, Sam

What shows are selected by the following query?SELECT * FROM shows WHERE DATEDIFF('2016-08-01', releaseDate) > 365 * 10; All shows No shows Grey's Anatomy

Grey's Anatomy

Which expression evaluates to true if the user does not check any checkboxes?if (_______) { echo "No titles selected"; } count($_POST["books"]) == 0 !isset($_POST["books[]"]) !isset($_POST["books"])

!isset($_POST["books"])

Which expression evaluates to true if the user does not select any radio buttons?if (_______) { echo "No team selected"; } $_POST["team"] == "" isset($_POST["team"]) !isset($_POST["team"])

!isset($_POST["team"])

What is the second most preferred font for the <p> element?

"Arial"

Add Tim's grade to the $grades array.$grades = ["Beth" => "B", "Lance" => "C", "Jose" => "A"]; $grades[_____] = "D";

"Tim"

What is the most preferred font for the <p> element?

"Verdana"

What argument is missing? $sql = "SELECT * from songs WHERE artist LIKE :artist"; $stmt = $pdo->prepare($sql); $stmt = $pdo->bindValue(_____, "Black%"); $stmt->execute();

"artist"

What selector matches all elements with the mfg class attribute?

*.mfg

Assume a directory called "junk" is located in the hobbies directory, and the junk directory contains the file stuff.html. What relative URL would stuff.html use to link to index.html?

../../index.html

.highlight { border: { width: 2px; } }

.highlight { border-width: 2px; }

Cause all elements with the class name logbase to be displayed as superscript text. { vertical-align: super; font-size: smaller; }

.logbase

What CSS selector matches the numbers class attribute?

.numbers

What file extension does a PHP script have?

.php

$a = 2; if ($a == "2") { if ($a === "2") { $x = 1; } else { $x = 0; } }

0

$x = 0; if ($x > 10) { $x = 1; }

0

$x = 30; if ($x < 0) { $x++; } elseif ($x < 10) { $x--; } else { $x = 0; }

0

"3" - "2too" + "sixty6" = ?

1

if ("history" < "math") { $x = 1; } else { $x = 0; }

1

In what year did web browsing first become more likely on mobile rather than desktop?

2016

An image that is 50 x 50 logical pixels will use how many total device pixels on a 3 DPR display?

22,500

What is the total <div> width? <style> div { width: 200px; padding: 10px; border: 2px solid green; margin: 5px; } </style> <div>How wide am I?</div>

234 pixels

$value: 20pt + (10 / 2) ;

25pt

Add the name "Stacy" to the end of the $names array. $names = ["Beth", "Lance", "Jose"]; $names[___] = "Stacy";

3

How many JavaScript files are necessary for some Bootstrap components to work?

3

Write a heading for a book chapter titled "Introduction".

<h1>Introduction</h1>

Assuming no other CSS properties apply to the images below, the images appear directly next to each other. <img src="dog.jpg" class="img-fluid"> <img src="cat.jpg" class="img-fluid">

FALSE

Because Chrome is by far the leading browser worldwide, testing a web page only really needs to be done using Chrome

FALSE

Browser fallbacks are only used to make new features work on old browsers.

FALSE

Buttons always submit form data to a server.

FALSE

CSS front-end frameworks are required to build responsive websites that work well on mobile devices.

FALSE

Changing the device in the emulator changes the user agent in the "Network conditions" tab.

FALSE

Client-side data validation makes server-side data validation unnecessary.

FALSE

Color blindness is so rare that web developers do not have to consider the issue when selecting colors for a web page.

FALSE

Developers normally create 1x, 2x, and 3x SVG images to target various DPR devices.

FALSE

Every student is enrolled in at least one class

FALSE

Haml code can be rendered directly in a web browser.

FALSE

Hyperlinks may only contain text.

FALSE

If <h1> text appears too big, <h2> or <h3> tags should be used to decrease the text size.

FALSE

If disk cache is disabled, the cache remains disabled when the DevTools are closed.

FALSE

If two elements are stacked on top of each other and both have margin:20px, the total margin between the two elements is 40px.

FALSE

In the animation above, footer.php used a variable defined in header.php. header.php could also have used a variable defined in footer.php.

FALSE

Inline styles cannot be used with embedded stylesheets or external stylesheets.

FALSE

Which tag creates a text box widget?

<input>

It is better to avoid new HTML5 elements and attributes because of incomplete support for some new HTML5 features.

FALSE

Navigation links are often just as visible on mobile websites as on desktop websites.

FALSE

Only PHP files may be included with the include statement.

FALSE

PHP code runs in a web browser.

FALSE

Passwords from the password widget that are sent to the server using HTTP are safe from prying eyes.

FALSE

Phone numbers and addresses are typically of equal importance to desktop and mobile website users.

FALSE

RWD requires the web server to examine the user agent string in HTTP requests.

FALSE

RWD uses JavaScript to alter the page contents to fit the browser.

FALSE

Really small businesses are exempt from web accessibility requirements.

FALSE

Refer to the figure above that uses an UPDATE statement. If $stuid is not in the students table, a PDOException is thrown.

FALSE

Referring to the figures above, if the user submitted the name as "<h1>Pam</h1>" and howmany as 4 , the browser would display: "Pam ordered 4 widgets."

FALSE

Relational databases will likely not be used for many web applications in the future.

FALSE

SCSS is syntactically different than the original Sass syntax.

FALSE

SQL syntax from one RDBMS usually works without modification in another RDBMS.

FALSE

SVG is ideal for photographs.

FALSE

StatCounter is able to track mobile and desktop browser usage by using a device's camera to watch users accessing the web.

FALSE

The :focus selector normally selects more than one element at a time.

FALSE

The <br> tag has a closing tag.

FALSE

The <div> element from the example above always occupies the same percent of the browser width.

FALSE

The <p> tag can have another <p> tag inside.

FALSE

The audio element's audio can always be paused by the user.

FALSE

The business logic of an SPA should generally be encoded in the front-end.

FALSE

The W3C Markup Validator indicates the HTML below has an error. What attribute is missing from <meta>? <!DOCTYPE html> <html lang="en"> <meta> <title>Learning HTML</title> <body>Some HTML tags have attributes.</body> </html>

charset

Underline the first line in each blockquote. <blockquote>To be or not to be...</blockquote> { text-decoration: underline; }

blockquote::first-line

If the user clicks the "Rate 4" button, to what color is the fourth rating star set?

blue

What is the body's background color on an iPhone 8 in landscape mode with a viewport width of 667px?

blue

What Bootstrap file contains the definition of the bg-success CSS class?

bootstrap.min.css

Enables document interaction

JavaScript

A set of rules describing how to write HTML.

Language

A random website is more likely to have a visitor with low vision than a visitor who is totally blind.

TRUE

A relational database can be used to store documents, objects, graphs, and key-value pairs.

TRUE

A small company may host the company's own website on the company's own web server.

TRUE

A table commonly has at least one column that uniquely identifies each row.

TRUE

A technician installs devices that measure and report water chemical concentrations, water level, pump status, and water flow through the filter system.

TRUE

A website should use an external stylesheet to create styles that apply to all web pages.

TRUE

According to StatCounter, the Safari mobile web browser is most often used to access the web in North America.

TRUE

After the customer reports the water level, the receptionist could inform the caller that a service technician was already dispatched and was six minutes from arriving at the house. True False

TRUE

All the words in the paragraph below appear on the same line when rendered in a browser. <p> Aspire to inspire before you expire. </p>

TRUE

An RDBMS may be commercial or open-source software

TRUE

An SVG image may be defined in a .svg file or in the HTML with the <svg> tag.

TRUE

An advantage to using an SCSS variable to store a color value used multiple times in a stylesheet is that if the color needs to be changed in the future, only the variable needs to be changed.

TRUE

An attacker could use an XSS attack to redirect the user's browser to a malicious website.

TRUE

An inline style does not use a selector.

TRUE

Best practice is to set the initial-scale property to 1

TRUE

Both relational and non-relational databases have been implemented with open source software.

TRUE

COMP-245 has 2 enrolled students

TRUE

CSS preprocessors allow developers to write much less code compared to writing straight CSS.

TRUE

Changing the Network throttling dropdown to "Offline" allows the developer to test how the website behaves with no Internet connection.

TRUE

Changing the div CSS selector width to 30% makes the <div> resize when the browser width is resized.

TRUE

Column databases are generally faster than relational databases for accessing vast amounts of data.

TRUE

Decreasing a desktop browser's width is an easy way to determine if RWD techniques are being used.

TRUE

Developers use ASP.NET, Java, PHP, Python, Node.js, and Ruby on Rails to create web APIs.

TRUE

Each MySQL user is assigned a username and password

TRUE

Every class has at least one enrolled student.

TRUE

Having users enter dates, colors, email, and numbers using the specialized widgets is preferable when an appropriate widget is available.

TRUE

If $_POST["name"] == "" then the user submitted the form without typing their name.

TRUE

If a form submits data with method="get" then $_POST will be empty.

TRUE

If the customer notices the low water level and calls, the company receptionist's browser can have the customer's pool status web page loaded by the time the receptionist answers the phone.

TRUE

If two elements are horizontally adjacent to each other and both have margin:20px, the total margin between the two elements is 40px.

TRUE

In the example above, removing the background-repeat property causes the background image to display repeatedly on the search input.

TRUE

JavaScript does not run as quickly on a mobile web browser.

TRUE

JavaScript frameworks often simplify the use of web APIs in the browser.

TRUE

Keeping the content on a desktop website and a separate mobile website consistent can be a challenge.

TRUE

Links are generally larger on mobile websites.

TRUE

Loading footer.php from the animation above in a web browser results in a warning.

TRUE

Many PHP applications run on Linux with an Apache web server and MySQL as the database.

TRUE

Many browsers add a border around an input when the input has the focus.

TRUE

Mobile websites often show less information than their desktop counterparts.

TRUE

Mobile websites should not rely on mouse hovering to trigger actions on the website.

TRUE

Most RDBMSs use SQL as the system's query language. True False

TRUE

Multiple <source> tags can be used to specify different video formats.

TRUE

MySQL is a popular choice for web hosting companies that provide an RDBMS for their customers.

TRUE

Only one student has less than a 3.0 GPA.

TRUE

PHP is used by Facebook, Wikipedia, and WordPress.

TRUE

Playing video uses significantly more network bandwidth than playing just audio.

TRUE

Progressive enhancement helps designers to simplify the amount of text displayed on a web page and remove unnecessary clutter.

TRUE

Referring to the figures above, if the user typed a space in the name field, the required attribute would allow the form to be submitted, but the server-side data validation would produce an error message.

TRUE

SPAs generally result in less data being sent over the network than web applications developed with dynamically generated web pages.

TRUE

Setting the viewport meta tag property user-scalable=no disables zooming.

TRUE

Some plug-ins are not available for all web browsers.

TRUE

The AAC and MP3 formats are supported by nearly all web browsers

TRUE

The Chrome browser seems to be replacing the Android browser on many phones.

TRUE

The Chrome screen emulator can display a mobile website in portrait or landscape.

TRUE

The SCSS below results in CSS that sets a web page's background color to blue. $theme-color: blue; body { background-color: $theme-color; }

TRUE

The University database has three tables.

TRUE

The audio element can play audio as soon as the audio file has downloaded to the browser.

TRUE

The default value for the target attribute is _self.

TRUE

The embedded stylesheet from the animation above makes all paragraphs in the web page orange.

TRUE

The example above uses the float property to place two containers next to each other.

TRUE

The following INSERT statements add two students into the students table. INSERT INTO student VALUES (999, 'Black', 'Bill', 3.9); INSERT INTO student VALUES (888, 'Green', 'Gary', 3.1);

TRUE

The fragment identifier for the <p id="location"> opening tag is location.

TRUE

The hire_date column can have a NULL value. True False

TRUE

The letters A and B appear on separate lines with a blank line in between when rendered in a browser. <p> A<br><br>B </p>

TRUE

The pool control system periodically transmits summary data over the Internet to a pool service company's web server.

TRUE

The rounded-circle class makes an image appear in an ellipse.

TRUE

The size of the video displayed by a video element is configurable.

TRUE

The student table has 4 records. True False

TRUE

The students table is empty after the table is created

TRUE

The students table may contain two students with the same name.

TRUE

The web server detects mobile browsers by examining the User-Agent request header.

TRUE

To see how a web page is constructed, a user can view the page source in the browser.

TRUE

Web developers can sometimes ignore really old web browsers.

TRUE

Web hosting companies provide various levels of security.

TRUE

When an HTML form uses method="get" and submits to a PHP script, $_GET will contain all the values entered in the form.

TRUE

When implementing separate websites, a mobile browser accessing the desktop website may redirect the mobile browser to the mobile site automatically.

TRUE

mouse.jpg resizes when the <div> resizes. <div class="container-fluid"> <img src="mouse.jpg" class="img-fluid"> </div>

TRUE

rowCount() returns 0 if the executed DELETE statement does not delete any rows.

TRUE

rowCount() returns the number of rows selected by a SELECT statement.

TRUE

Referring to the animation above, why might the PDO constructor throw an exception? The username and password are correct. The MySQL server is running on localhost. The "test" database does not exist.

The "test" database does not exist.

What is $c when the loop terminates? $c = 10; while ($c <= 20) echo $c; $c += 5;

The loop never terminates.

What is $c when the loop terminates?$c = 10; while ($c <= 20); { echo $c; $c += 5; }

The loop never terminates.

An HTML _____ is a program that indicates whether a document follows the HTML standard.

Validator

What selector matches <cite>, <span>, and <a> elements?

cite, span, a

What DSN value was omitted from the animation above? DSN prefix host port dbname

port

Enter the command to exit the mysql tool.

quit

Allow the user to use a slider to select a number between 0 and 10. <input type=" " min="0" max="10">

range

What is the id of the span containing the third rating star?

rating3

What is the body's background color for a desktop browser that is 900px wide?

red

Set the text color to blue for any links where the rel attribute contains nofollow. <a rel="abstract nofollow" href="https://example.com"> a[] { color: blue;

rel~="nofollow"

Which statement terminates the script if util.php is not found in the current directory? include "./util.php"; require "util.php"; require "./util.php";

require "./util.php";

Ensure the user enters a value in the input field. <input type="number" >

required

What CSS style floats an element to the right?

right

What is the third most preferred font for the <p> element?

sans-serif

section { article { &:hover { color: blue; } } }

section article:hover { color: blue; }

Complete the SQL command to display all the songs in the songs table.____ * from songs;

select

Enter the command to display all the tables in the music database.

show tables;

What CSS Bootstrap class makes the text red?

text-danger

What is the width of a block tag?

the full width of the block's parent container

How do the changes below affect the web page? nav { flex: 1 1 auto; } main { flex: 3.5 1 auto; } aside { flex: 1 1 auto; }

the layout will be the same as before

How wide must the browser be to display A and B each occupying 50% of the row? <div class="row"> <div class="col-md-9 col-sm-6">A</div> <div class="col-md-3 col-sm-6">B</div> </div>

≥ 576px and < 768px

666, 'Pratt', 'Becky', 'ENGG', '2017-07-16', FALSE Valid Invalid

INVALID

888, 'Gomez', 'Victor', 'PHY', '1990-12-16', TRUE Valid Invalid

INVALID

Create a combo box that uses the datalist with id "states". <input ="states">

list

$value: #ff1150 - #001120;

#ff0030

$value: #ff1150 + 2;

#ff1352

Cause the element with the ID special to be displayed with the text color red. { color: red; }

#special

Which variable is illegally named?

$2b_

Which constant is illegally named?

$A1_

What condition makes the loop output even numbers 2 through 20?$c = 2; while (_____) { echo $c; $c += 2; }

$c <= 20

Which code segment produces a notice error message?

$count = 2; echo $COUNT;

Output Jose's grade from the $grades array. $grades = ["Beth" => "B", "Lance" => "C", "Jose" => "A"]; echo ______;

$grades["Jose"]

Complete the foreach loop to output all the names and grades in the $grades array.$grades = ["Beth" => "B", "Lance" => "C", "Jose" => "A"]; foreach ($grades as __________) { echo "$name's grade is $grade.\n"; }

$name => $grade

Complete the foreach loop to output each name. $names = ["Beth", "Lance", "Jose"]; foreach (_______ as $name) { echo "$name\n"; }

$names

Output "Jose" from the $names array. $names = ["Beth", "Lance", "Jose"]; echo _____;

$names[2]

Which statement produces a parse error? $owner = "Pam's"; $owner = 'Pam's'; $owner = 'Pam"s';

$owner = 'Pam's';

Select the expression to complete the code below.$statement = $pdo->query("SELECT gpa FROM students"); foreach (_____ as $row) { echo "<p>$row[gpa]</p>"; } $statement $statement->fetch() $pdo

$statement

Select the function call to complete the code below.$statement = $pdo->query("SELECT gpa FROM students"); while ($row = _____) { echo "<p>$row[gpa]</p>"; } $statement->query() $statement->fetch() $statement->fetchAll()

$statement->fetch()

If the textarea below was added to the form in the animation above, what would be added to the query string when the form is submitted?<textarea name="comment">This is a gift</textarea> &comment=This is a gift &comment=This+is+a+gift

&comment=This+is+a+gift

What should C be replaced with? 123, 'Wallace', 'William', 'HIST' 'Wallace', 'William', 'HIST' 'Wallace', 'William', 'HIST', '2017-07-10'

'Wallace', 'William', 'HIST', '2017-07-10'

Which media query is true for a viewport width 1000px width?

(min-width: 500px)

Make the C item occupy the top 2 rows in the 2nd column. #grid-item-c { grid-column: 2 / 3; grid-row: ; }

1/3

Make the A item occupy the entire top row. #grid-item-a { grid-column: ; }

1/4

What does the code below output?$nums = [6, -3, 10, 2]; echo find_max($nums); function find_max($nums) { $max = $nums[0]; foreach ($nums as $n) { if ($n > $max) { $max = $n; } } return $max; } 6 -3 10

10

What is the text size for the <p> element?

10 pt

What are the first and last numbers output by the code segment? $c = 100; while ($c > 0) { echo $c; $c -= 10; }

100 and 10

If an image that is 50 x 50 logical pixels was modified for a 2 DPR display, how large is the new image?

100 x 100

A browser on a 3x screen downloaded dog-large.jpg, which was 300 x 225 pixels. What is the image size in logical pixels when displayed in the browser?

100 x 75

If a column uses the class col-lg-6, how much of the row does the column occupy when the browser is 900px wide?

100%

Which record contains correct values for a new Data Structures class? 1003, COMP-245, 1, MWF 2pm, SCI 200 1004, COMP, 1, MWF 2pm, SCI 200 1004, COMP-245, 1, MWF 2pm, SCI 200

1004, COMP-245, 1, MWF 2pm, SCI 200

In the animation above, the query() method throws a PDOException indicating the MySQL error 1146 occurred because the test.students table does not exist. What MySQL error does the SELECT statement below cause?$sql = "SELECT gpa IN students"; 1054 - Unknown column name 1064 - Parsing error, bad syntax 1336 - Bad value being inserted

1064 - Parsing error, bad syntax

Put a 10 pixel gap between each row and 20 pixel gap between each column. grid-gap: ;

10px 20px

$points = 10; $points--; $points + 2 = ?

11

What is the text size for the <span> element with the band id?

12 pt

What is the total <div> height? <style> div { height: 100px; margin: 10px 5px; } </style> <div>How tall am I?</div>

120 pixels

The default <strong> content width is 115px. What is the total <strong> width? <style> strong { width: 200px; margin: 5px; } </style> <strong>How wide am I?</strong>

125 pixels

3 + 5 * 2 = ?

13

5 + 3 ** 2 = ?

14

What is the total <div> width? <style> div { width: 100px; margin-left: 10px; margin-right: 15px; padding: 2px 5px 10px 20px; } </style> <div>How wide am I?</div>

150 pixels

(3 + 4) % 5 = ?

2

If #grid-container is modified, how many columns will the grid have? #grid-container { display: grid; grid-template-columns: auto auto; }

2

If Hamilton and Grit are the only books checked, what is the output? echo count($_POST["books"]);

2

The INSERT statement adds a student to the student table. How many clauses are in the INSERT statement? INSERT INTO student VALUES (888, 'Smith', 'Jim', 3.0); 1 2 3

2

What argument is missing?$sql = "SELECT * from songs WHERE title LIKE ? AND year > ?"; $stmt = $pdo->prepare($sql); $stmt = $pdo->bindParam(1, $title); $stmt = $pdo->bindParam(_____, $year); $stmt->execute();

2

Make the B item occupy 2 rows and 2 columns in the bottom-right grid corner. #grid-item-b { grid-area: ;

2 / 2 / 4 / 4

What does the code below output?function special_nums() { return [3.142, 2.718, 1.618]; } list($pi, $euler, $phi) = special_nums(); echo $euler; 3.142 2.718 1.618

2.718

If a browser viewport is 400px wide and 300px high, how wide is an element with width:50vmax?

200px

If a browser viewport is 400px wide, how wide is an element with width:50vw?

200px

If the grid container has 10 grid items, what grid-template-columns value creates a grid with 2 rows and 5 columns? #grid-container { width: 600px; display: grid; grid-template-columns: _____; }

200px auto auto auto 200px

What dates are selected? SELECT release_date FROM tv_show WHERE title = 'Arrow'; No dates 2012-10-10 2012-10-10 and 2009-04-09

2012-10-10

If the students table contains 10 students and 7 students have a GPA less than 3.0, how many names does the foreach loop output?$sql = "SELECT name FROM students WHERE gpa >= 3.0"; $statement = $pdo->query($sql); foreach ($statement as $row) { echo "<p>$row[name]</p>"; } 10 7 3

3

If a browser viewport is 300px high, how wide is an element with width:10vh?

30px

In the example on the right, what z-index value would make the green square appear on top of the orange and blue squares?

4

What number is returned by the following query?SELECT COUNT(*) FROM shows; 0 4 1

4

If #grid-container is modified, how wide is the second column? #grid-container { width: 600px; display: grid; grid-template-columns: 200px auto; }

400 px

"4e3" + 1 = ?

4001

If #grid-container is modified, how wide is the second column? #grid-container { width: 600px; display: grid; grid-template-columns: 20% auto; }

480 px

How many cars, machines, meters, and other IoT devices did Cisco, a major network equipment manufacturer, predict would be connected to the Internet in 2020?

49 BILLION

If a column uses the class col-lg-6, how much of the row does the column occupy when the browser is 1000px wide?

50%

What record must be added to the enroll table to give Tye a C in COMP-245? 555, 1001, C 555, 1004, C

555, 1004, C

$value: 20px - 15;

5px

How many columns does A span? <div class="row"> <div class="col-sm">A</div> <div class="col-sm">B</div> </div>

6

What is output? function addNumber($num) { global $sum; $sum += $num; } $sum = 0; addNumber(2); addNumber(5); echo $sum;

7

What is the grid's width if the browser is 800px wide? <div class="container"> <div class="row"> <div class="col-sm-10">A</div> <div class="col-sm-2">B</div> </div> </div>

768px

Change the text color to green for any text that is currently selected using the mouse. { color: green; }

::selection

Which element can create a button with an image?

<button>

What tag includes a picture in a web page?

<img>

The W3C Markup Validator indicates the HTML below has an error. What deprecated tag is causing the error? <!DOCTYPE html> <html lang="en"> <meta charset="UTF-8"> <title>Learning HTML</title> <body> <center>This page uses deprecated HTML.</center> </body> </html>

<center>

Which tag is a generic block tag without any implied meaning?

<div>

What output is produced by the PHP script?<h1>This is a test</h1> echo "This is only a test";

<h1>This is a test</h1> echo "This is only a test";

What tag is used for subchapter titles?

<h2>

Write an HTML fragment that creates a title for the fourth level of a document hierarchy. The title should be "Exquisite details"

<h4>Exquisite details</h4>

Start a table with the caption "store information".

<table><caption>store information</caption>

Create a table cell with datum of "open".

<td> open </td>

Which tag creates a text area widget?

<textarea>

Create a table cell with header of "hours".

<th> hours </th>

Create an empty table row with no content.

<tr> </tr>

What is missing from the parameterized SQL? $sql = "SELECT * from songs WHERE title = _____"; $stmt = $pdo->prepare($sql); $stmt = $pdo->bindValue(1, "Twist"); $stmt->execute();

?

Which media query matches devices with a 320px width screen that are in landscape mode?

@media screen and (device-width: 320px) and (orientation: landscape) { . . . }

If a browser viewport is 400px wide, how wide are the two inner <div> elements?<div width="300px"> <div width="50vw">A</div> <div width="50%">B</div> </div>

A = 200px, B = 150px

What default body font does Reboot use?

A sans-serif font

An <option> tag must have a value attribute.

FALSE

What is wrong with the SQL statement below? SELECT first_name from student "from" must be "FROM". The WHERE clause is missing. A terminating semicolon is missing.

A terminating semicolon is missing.

Assuming warnings and error messages are set to output to the browser, what would be displayed in the browser if require in the figure above was replaced with include, and color.php was not in the current directory? "That's so random!" A warning message only A warning message and fatal error message

A warning message and fatal error message

Visual clues that guide the user in figuring out how to use an app.

Affordances

What is the value of $_POST["team"] if the user selects Texas A&M University? Texas A&M University Aggies Impossible

Aggies

What dates are selected? SELECT release_date FROM tv_show WHERE NOT title = 'The Office'; No dates All dates 2012-10-10

All dates

What shows are selected by the following query?SELECT * FROM shows; All shows Arrow No shows

All shows

How do the changes below affect the web page? #container { display: flex; flex-direction: row; justify-content: center; } nav { flex: 0 1 auto; } main { flex: 0 1 auto; } aside { flex: 0 1 auto; }

All three flex items are default width and centered horizontally in the flex container.

How does the change below affect the web page? #container { display: flex; flex-direction: column; }

All three flex items are stacked on top of one another

What shows are selected by the following query?SELECT * FROM shows WHERE seasons <= 10 AND seasons >= 5; All shows Arrow and Parks and Recreation Grey's Anatomy

Arrow and Parks and Recreation

What shows are selected? SELECT * FROM tv_show WHERE seasons <= 10 AND seasons >= 6; All shows Arrow and Parks and Recreation Grey's Anatomy

Arrow and Parks and Recreation

What shows are selected? SELECT * FROM tv_show WHERE seasons = 6 OR release_date > '2013-01-01'; All shows Arrow and Parks and Recreation Arrow and The Blacklist

Arrow and The Blacklist

In what order are the shows retrieved by the following query?SELECT * FROM shows ORDER BY title; Grey's Anatomy, Arrow, The Blacklist, Parks and Recreation Arrow, Grey's Anatomy, Parks and Recreation, and The Blacklist The Blacklist, Parks and Recreation, Grey's Anatomy, Arrow

Arrow, Grey's Anatomy, Parks and Recreation, and The Blacklist

What is the last name output by the for loop?$names = ["Beth", "Lance", "Jose"]; for ($i = count($names) - 1; $i >= 0; $i--) { echo $names[$i], "\n"; }

Beth

What types of tags can be inside a block tag?

Both inline and block tags

Which of the media queries evaluate to true on a desktop browser that is 900px wide?

Both media queries.

Which table should be modified to add an instructor? course class

CLASS

Manages document presentation

CSS

The process of combining multiple style rules and resolving conflicts between those rules.

Cascading

The _____ data type is ideal for creating a column that stores a student's date of birth. DATETIME DATE

DATE

Document Object Model

DOM

An INSERT statement must name the table's columns.

FALSE

An inline style uses curly braces ({}).

FALSE

What is the title for the class with class_id 1002? English Composition European History Data Structures

English Composition

"123" !== "123"

FALSE

"123" === 123

FALSE

"bat" < "ball"

FALSE

2 > 10 || 1 > 2

FALSE

A developer that modifies an existing desktop website for a mobile device is using a progressive enhancement design strategy.

FALSE

A mobile user should never have access to the desktop version of a website when a mobile version is available

FALSE

A single INSERT statement can insert only one row into a table.

FALSE

A web hosting company that hosts websites for free is likely to provide services like automated backups, unlimited disk space, and 24-hour customer support.

FALSE

A website should serve a 3x image to a 2 DPR device even if a 2x image is available.

FALSE

According to StatCounter, mobile browsers will likely account for more web traffic than desktop browsers in the next year.

FALSE

An <h3> tag should be placed inside a <p> tag.

FALSE

What is selected by the following query?SELECT title, YEAR(releaseDate) FROM shows; Grey's Anatomy 2005 2005, 2012, 2013, 2009 Grey's Anatomy 2005, Arrow 2012, The Blacklist 2013, Parks and Recreation 2009

Grey's Anatomy 2005, Arrow 2012, The Blacklist 2013, Parks and Recreation 2009

What shows are selected? SELECT * FROM tv_show WHERE (seasons >= 6 AND seasons <= 10) OR release_date = '2005-03-27'; All shows Arrow and Parks and Recreation Grey's Anatomy, Arrow, and Parks and Recreation

Grey's Anatomy, Arrow, and Parks and Recreation

Which record contains correct values for a new history course? HIST-120, HIST, History and Culture of Africa, 3 HIST-211, COMP, History and Culture of Africa, 3 HIST-211, HIST, History and Culture of Africa, 3

HIST-211, HIST, History and Culture of Africa, 3

Specifies document structure

HTML

What is the current recommended version of the HTML standard?

HTML5

Which method will the browser use to communicate with the server?

HTTP GET request

What does the below code output?sayHello("Sam"); sayHello("Juan", "Hola"); function sayHello($name, $greeting = "Hello") { echo "$greeting, $name\n"; } Hello, Sam Hello, Juan Hello, Sam Hola, Juan Hola, Sam Hola, Juan

Hello, Sam Hola, Juan

What values are required to create a PDO object? Username and password only Hostname only Hostname, database name, username, and password

Hostname, database name, username, and password

Text that contains connections to other documents.

HyperText

Are human doctors or IBM's Watson more likely to keep up with new medical information in 2020?

IBM'S WATSON

Which browser lost the most market share between 2010 and 2015?

IE

A polyfill is code that creates a browser fallback for a feature if the web browser does not support that feature.

TRUE

Where should the data validation code be placed?if ($_POST["num"] == "") { echo "<p>You didn't type a number.</p>"; } Before if ($_SERVER["REQUEST_METHOD"] == "POST") { ... } Inside if ($_SERVER["REQUEST_METHOD"] == "POST") { ... } After if ($_SERVER["REQUEST_METHOD"] == "POST") { ... }

Inside if ($_SERVER["REQUEST_METHOD"] == "POST") { ... }

Part of a document that explains how to interpret or structure other parts of the document.

Markup

If Hamilton and Grit are the only books checked, what is the output?echo $_POST["books"][0]; Miranda Hamilton: The Revolution Miranda and Duckworth

Miranda

A web development approach that advocates first creating a reduced-feature version of a website for mobile users. Then, the developer creates a full-featured website for visitors using desktop computers.

Mobile first

Are columns A and B ever on the same row? <div class="row"> <div class="col-sm-9">A</div> <div class="col-sm-4">B</div> </div>

NO

Can two classes with the same course_id have a different number of credit hours?

NO

Must every primary key value be used in a foreign key?

NO

Does removing the keyword "only" from the media queries have any effect on the latest Chrome browser?

No

Is there a media type that specifically targets mobile devices?

No

Must media queries have at least one expression after the media type?

No

What dates are selected? SELECT release_date FROM tv_show WHERE title = 'The Office'; No dates 2012-10-10 2012-10-10 and 2009-04-09

No dates

Assuming the students table has only the three students in the animation above, what is output by the code below?$sql = "SELECT name FROM students WHERE stuId = 999"; $statement = $pdo->query($sql); $row = $statement->fetch(); if ($row) { echo $row["name"]; } else { echo "Not found"; } A PDOException is thrown. Sue Not found

Not found

Greys Anatomy 12 drama The Blacklist 5 drama Parks and Recreation 7 comedy Community 6 comedy Arrow 6 action ORDER BY seasons DESC ORDER BY genre ORDER BY genre DESC

ORDER BY genre DESC

Arrow 6 action Community 6 comedy Parks and Recreation 7 comedy The Blacklist 5 drama Greys Anatomy 12 drama ORDER BY seasons, genre ORDER BY genre, seasons ORDER BY genre, title

ORDER BY genre, seasons

The Blacklist 5 drama Arrow 6 action Community 6 comedy Parks and Recreation 7 comedy Greys Anatomy 12 drama ORDER BY title ORDER BY seasons ORDER BY genre

ORDER BY seasons

Arrow 6 action Community 6 comedy Greys Anatomy 12 drama Parks and Recreation 7 comedy The Blacklist 5 drama ORDER BY title ORDER BY seasons ORDER BY genre

ORDER BY title

What types of tags can be inside an inline tag?

Only inline tags

Referring to the figure above, what is $_SERVER["REQUEST_METHOD"] when the user clicks the "Guess" button a second time? GET POST

POST

A/an _____ executes SQL statements. RDBMS table

RDBMS

A web design approach that creates web pages that automatically move and resize parts depending on the display size and orientation.

Responsive Web Design

What is output when the user selects University of Arkansas?if ($_POST["team"] == "razorbacks") { echo "Woo Pig Sooie!"; } else { echo "Roll tide!"; } Woo Pig Sooie! Roll tide!

Roll tide!

Choose the correct call to the function below.function sayGoodbye($name) { echo "Goodbye, $name"; } sayGoodbye(); SAYGOODBYE("Sam"); say_goodbye("Sam");

SAYGOODBYE("Sam");

A dynamic web page might look different for two different users who are accessing the same page.

TRUE

A fluid layout widens to fit the browser's width.

TRUE

A pinch gesture usually zooms in and out of the web page

TRUE

A plug-in is often required to play media embedded in a web page using <embed> or <object>.

TRUE

Physical dimension in pixels of a device's screen.

Screen Size

A language describing the visual presentation of structured documents.

Style Sheet

!(2 > 10 && 5 > 0)

TRUE

"123" == 123

TRUE

("10" <=> "010") == 0

TRUE

("bat" <=> "ball") > 0

TRUE

2 > 10 || (3 % 2 != 2 && 5 > 0)

TRUE

A 1x image looks pixelated on a 2 DPR device.

TRUE

A 2x image will look the same as an equivalent 1x image on a 1 DPR device.

TRUE

A <fieldset> can group drop-down menus, buttons, and other widgets.

TRUE

A NULL value in the last_name column may indicate the faculty member has no last name. True False

TRUE

A VPS generally runs slower than a dedicated host.

TRUE

A developer can drag the image that looks like a mobile device to modify the accelerometer's alpha (rotation around the z-axis), beta (left-to-right tilt), and gamma (front-to-back tilt) values.

TRUE

A drop-down menu only allows one option to be selected.

TRUE

What shows are selected by the following query?SELECT * FROM shows WHERE seasons < 5; All shows Arrow and The Blacklist The Blacklist

The Blacklist

What shows are selected? SELECT * FROM tv_show WHERE seasons < 6; All shows Arrow and The Blacklist The Blacklist

The Blacklist

What is wrong with the SQL statement below? SELECT gpa --FROM student; The FROM clause is a comment. The WHERE clause is missing. gpa should be a table name.

The FROM clause is a comment.

What happens when the Modal is displayed and the user clicks the dark part of the screen outside of the Modal or presses the ESC key?

The Modal hides, and no Alerts are displayed.

What is wrong with the SQL statement below? SELECT first_name FROM student WHERE last_name = Smith; The identifier Smith must be surrounded by single quotes. first_name should be a table name. No students have the last name "Smith".

The identifier Smith must be surrounded by single quotes.

How will a website image that looks good on a standard display look like on a Retina display?

The image will look pixelated or blocky.

What is the value of $_GET["comment"] for the query string below?http://localhost/order.php?name=Bob&howmany=1&comment=This+is+a+gift This is a gift This+is+a+gift

This is a gift

777, 'Cruise', 'Tommy', 'COMP', '1999-01-20', TRUE Valid Invalid

VALID

999, 'Jones', 'Pam', 'ART', '2000-02-10', FALSE Valid Invalid

VALID

What organization defines web standards?

W3C

Must PHP statements be terminated by a semicolon?

YES

Must every foreign key value come from an existing primary key value?

YES

Should column classes always be nested inside of a row class?

YES

What argument is missing that makes the prepared statement select songs with artists that start with "Black"?$sql = "SELECT * from songs WHERE artist LIKE :artist"; $stmt = $pdo->prepare($sql); $stmt->execute(____);

["artist" => "Black%"]

What does the code output?$test = "adios"; echo "$test test";

adios test

Center each grid items vertically in the grid. : center;

align-content

What media type is used if no media type is specified?

all

Create a border for images where the alt attribute starts with test. <img src="pic1.jpg" width="50" height="50" alt="testing"> img[] { border: red 1px solid; }

alt^="test"

Which field cannot have duplicate values? dept_code class_id credit_hrs

class_id

What CSS class initially hides an Alert?

collapse

Allow the user to select some combination of red, blue, and green. <input type=" ">

color

Allow the user to enter a day, month, and year. <input type=" ">

date

Which statement is equivalent to const EMAIL = "[email protected]";?

define("EMAIL", "[email protected]");

Cause the text background of any div to be changed to light blue when the mouse hovers (moves over) any part of the div contents. { background-color: lightblue; }

div::hover

Which image is requested by a device with a 1.5 DPR?

dog-medium.jpg

Which image is requested by an old browser that doesn't understand the "srcset" attribute?

dog-small.jpg

What image is requested by a 1x device with width = 600px?

dog400.jpg

What image is requested by an old browser that does not know what the "sizes" and "srcset" attributes are?

dog400.jpg

What image is requested by a 2x device with width = 400px?

dog800.jpg

What image is requested by a 3x device with width = 800px?

dog800.jpg

What should A be replaced with? fac_id faculty table_name

faculty

In which file would you expect to find the hyperlink below? <a href="index.html">Home page</a>

family.html

What property makes the Main flex item wider than Nav and Aside?

flex-basis

The var_dump(variable) function outputs the data type of a variable. What is the output of the code below?$x = 1.23; var_dump($x); int(1.23) float(1.23) number(1.23)

float(1.23)

Which attribute inside the <label> tag is used to associate the label with a widget?

for

In which file would you expect to find the hyperlink below? <a href="../family.html">Family</a>

geocaching.html

To which server will the browser send the form data?

google.com

If all three squares are given the same z-index value of 5, which square appears on top?

green

What is the body's background color on an iPhone 8 in portrait mode with a viewport width of 375px?

green

Add a CSS declaration to #grid-container so the first row is 20 pixels tall and the second row is 30 pixels tall. : 20px 30px;

grid-template-rows

Cause all heading 1 text to be displayed with the bold font-weight attribute. { font-weight: bold; }

h1

What alteration to the CREATE TABLE statement prevents hire_date from having a NULL value? hire_date NOT NULL DATE, hire_date DATE NOT NULL,

hire_date DATE NOT NULL,

Assume a directory called "junk" is located in the hobbies directory. What relative URL would index.html use to link to a file called stuff.html in the junk directory?

hobbies/junk/stuff.html

Make the first letter uppercase in all list items. <li>Bread</li> { text-transform: uppercase; }

li::first-letter

Which statement generates a warning if util.php is not found? include "util.php"; require "util.php"; require "./util.php";

include "util.php";

The W3C Markup Validator warns that the HTML below is missing an attribute. What attribute is missing from <html>? <!DOCTYPE html> <html> <meta charset="UTF-8"> <title>Learning HTML</title> <body>A warning is not as serious as an error </body> </html>

lang

What should B be replaced with? fac_id, last_name, first_name, dept_code, hire_date last_name, first_name, dept_code, hire_date fac_id

last_name, first_name, dept_code, hire_date

What CSS style avoids left-floating elements? clear:

left

What CSS selector matches all list items?

li

What CSS selector matches all the <li> elements?

li

What CSS declaration sets the margin to have a uniform space of 20 pixels?

margin: 20px

Ensure that the date entered will not be greater than the end of 2025. <input type="date" ="2025-12-31">

max

Which input element attribute limits the number of characters the user can type in a text box or password field?

maxlength

What CSS Bootstrap class only affects an element's margin?

mb-0

Ensure that the temperature entered will not be less than -273.16. <input type="number" ="-273.16">

min

What data-target attribute value makes a button display a Modal?

modal's ID

Allow the user to enter a month, and year. <input type=" ">

month

Which attribute must be set to create a text box widget?

no attribute

Ensure the user types a valid number between 0 and 10. <input type=" " min="0" max="10">

number

What selector matches list items of ordered lists but not unordered lists?

ol > li

What selector matches ordered and unordered lists?

ol, ul

p { em { color: red; } }

p em { color: red; }

Add a red asterisk at the end of each paragraph. <p>Turn the switch on.</p> { content: "*"; color: red; }

p::after

What CSS declaration changes the right padding to be 10 pixels wide?

padding-right: 10px

What CSS declaration changes the top and bottom padding to be 20 pixels and right and left to be 30 pixels?

padding: 20px 30px

Ensure that the user types only one letter in the range A through F. <input type="text" ="[A-F]">

pattern

What is the text variant for the <span> element with the music id?

small-caps

A browser that is only capable of playing MP3 audio will download which file?

sound.mp3

Place an equal amount of horizontal space between each grid item, including the grid edges. justify-content: ;

space-evenly

Which media type targets users who are blind?

speech

Which image tag attribute specifies the image's URL?

src

Ensure that the value will change by multiples of 100. <input type= "range" ="100">

step

Cause all hyperlinks inside a table to be displayed with the bold font-weight attribute. { font-weight: bold; }

table a

Which is NOT a required attribute for images?

title

Set the text color for input buttons of type submit. <button type="submit">Submit</button> button[] { color: green; }

type="submit"

Set the input area width for any text input elements to 300 pixels. <input type="text" name="firstName"> input[] { width: 300px; }

type="text"

What CSS selector matches the span elements contained in <ul> elements?

ul span

Enter the command to select the music database.

use music;

What CSS Bootstrap class only affects an element's width?

w-50


Kaugnay na mga set ng pag-aaral

Chapter 4: Clinical Assessment, Diagnosis, and Treatment

View Set

Combo with "SOC 220: The Strategies of Prevention and Rehabilitation" and 5 others

View Set

Ch 61: Match the term with the definition

View Set