CSCI 3308 Exam 1

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Which of the following characters are used for pattern matching in SQL Queries? Select all that apply. Note: There is negative marking for incorrectly chosen options. So please be careful when selecting your answers. $ % ^ _

% and _

Which of the following commands will you use to exit docker, cleanup the containers and remove the associated volumes? docker compose down docker compose up -d docker compose down -v docker rm <container_name>

docker compose down -v

You are the tech lead for your team. Your team has been working on different tasks in individual branches. You want to view the changes made on branches and check new branches they are working on, what should you do? Remove + checkout Fetch + checkout Merge + checkout Rebase + checkout

fetch + checkout

Which method is commonly used in JavaScript to access an HTML element by its ID? findElementById() selectElement() getById() Correct! getElementById()

getElementByID()

While viewing commit history, Sam wants to view the difference between changes in each commit, which of the following git commands he should execute? git --patch git log --p git patch -c git log -p

git log -p

On running git stash list, which of the following options show you how the stash listing looks like? The latest stashes (stash@{1}) will be at the top of the stack. None of the above The latest stashes (stash@{0}) will be at the bottom of the stack. The latest stashes (stash@{0}) will be at the top of the stack.

the latests stashes (stash@{0}) will be at the top of the stack.

What is the purpose of the <div> element in HTML? To embed images. To create a division or a section in an HTML document. To create links to other web pages. To emphasize text.

to create a division or a section in an HTML document.

What character is used to match any one character in a pattern-matching regular expression? * + ? .

.

How many docker services are being created using the docker-compose.yaml file? 2 None 1 3

2

In the following snippet of the docker-compose file, which is the host port and which is the container port for web database? version: "3.9"services:web:build: .ports:- "8001:8002"db:image: postgres ports: - "5432" container port host port

8002 8001

In HTML, how can you create a hyperlink to another webpage? <link href="url">text</link> <url>text</url> <hyperlink source="url">text</hyperlink> <a href="url">text</a>

<a href="url">text</a>

Which of the following is the correct syntax for referring to an external CSS file in an HTML document? <style src="style.css"></style> <link rel="stylesheet" type="text/css" href="style.css"> <stylesheet>style.css</stylesheet> <css src="style.css">

<link rel="stylesheet" type="text/css" href="style.css">

Which among the following will help me delete a folder, SampleDir, that isn't empty? You cannot delete a non-empty folder rm -r SampleDir rmdir SampleDir mkdir SampleDir

rm -r SampleDir

The following is a 2 part question. a) You are currently working on a branch and have uncommitted code. Your teammate has added new code to that branch in the remote repository. You would like to pull those changes to your local repository without losing the changes you've made so far. You are not ready to commit those changes yet either since they are incomplete. Which git operation can you perform in such a scenario? Stash Merge rm Pull request

stash

Which statement below best describes the DOM? The method used by HTML to interface with Java Script An extension to the Java Script library which supports manipulation of objects within a web page. A platform and language independent interface that aids programs and scripts in dynamically accessing and updating the content, structure, and style of a document. DOM stands for "Distributed Object Model"

A platform and language independent interface that aids programs and scripts in dynamically acessing and updating the content, structure, and style of a document

Which of the following best describes Handlebars.js? A JavaScript library for creating web components A framework for building server-side applications A database management system A templating engine for generating HTML markup

A templating engine for generating HTML markup

How can you view the console in Google Chrome? All of the above Press Ctrl + Shift + J (Windows/Linux) or Cmd + Option + J (Mac) Right-click and select "Inspect" Click on the 3 dots on the right hand side in the toolbar > More Tools > Developer Tools

All of the above.

Match the following properties of standard database transactions: Atomicity, Consistency, Isolation, Durability

Atomocity: The entire of the

What is nodemon primarily used for in Node.js development? Managing database connections Automatically restarting the server upon file changes Handling HTTP requests and responses Bundling JavaScript modules

Automatically restarting the server upon file changes

Which of the following best describes the purpose of Express.js in Node.js development? Managing database connections Handling HTTP requests and responses Automating server deployment Generating frontend HTML templates

Handling HTTP requests and responses

Which statement inserts a new row into the products table? INSERT INTO products VALUES ('101', 'Laptop', 'Electronics'); ADD INTO products VALUES ('101', 'Laptop', 'Electronics'); NEW ROW IN products VALUES ('101', 'Laptop', 'Electronics'); INSERT products ('101', 'Laptop', 'Electronics');

INSERT INTO products VALUES ('101', 'Laptop', 'Electronics');

Which of the following is required to correctly include Bootstrap in your website? Linking to any external CSS file. Including Bootstrap's CSS and JavaScript files via CDN links. Adding a link to a JavaScript file. Copying Bootstrap's entire source code into your HTML file.

Including Bootstrap's CSS and JavaScript files via CDN links.

What are some helpful things that version control enables? The ability for large teams to work on the same code Keeping track of code history Log who makes which changes Rigorous testing of code Code completion within IDEs Hints at variable naming

Keeping track of code history Log who makes which changes Rigorous testing of code

On which platform should you be running the instructions in the lab? VSCode online coding.csel.io Local computer

Local computer

People Relation: Name Age Occupation Richard 27 Bartender Paul 81 Retired Christina 31 Lawyer Rachel 39 Lawyer What is the result of this SQL query on the above table? SELECT count(*) FROM People WHERE Age > 30; Age 81 31 39 count ------- 3 Name Age Occupation Paul 81 Retired Christina 31 Lawyer Rachel 39 Lawyer

count ------- 3

In SQL, how do you display all the columns from a table named "Persons"? SELECT * FROM Persons SELECT *.Persons SELECT Persons SELECT [all] FROM Persons SELECT [*] FROM Persons

SELECT * FROM Persons

What advantage does templating offer over directly embedding dynamic content into HTML files? Templating separates presentation from logic Templating reduces the size of HTML files Templating improves code readability Templating speeds up the execution of JavaScript code

Templating separates presentation from logic

What is the primary purpose of Postman in API development? Writing server-side code Testing and debugging APIs Creating database schemas Managing version control

Testing and debugging APIs

What does the command "git init" do? Creates a local repository Clones a repository from GitHub Creates a new git user Clones a repository from another developer's computer

creates a local repository

Node.js application runs on? Single thread Multiple threads Multiple Processes Single Process

Single thread

In CSS, how does the hierarchy of style rules apply from tag level, to page level, to site level? Site level styles override tag level, which in turn override page level styles. Tag level styles are overridden by page level, which are overridden by site level styles. Page level styles override both site level and tag level styles. Tag level styles have the highest priority, followed by page level, then site level.

Tag level styles have the highest priority, followed by page level, then site level.

What is the purpose of templating in web development? To structure and organize HTML files To style web pages using CSS frameworks To generate dynamic content based on data. To manage server-side database operations

To generate dynamic content based on data

What is the purpose of the package.json file in a Node.js application? To define the HTML structure of the application To store metadata about the project and manage dependencies To configure the server settings To define routing rules for the application

To store metadata about the project and manage dependencies

What is the key characteristic of a statically-typed language? Variables can change their type during runtime Variable types are checked at compile-time Type checking is done at runtime Variables can hold multiple types at once

Variable types are checked at compile-time

Which markup language is used to write Docker Configuration files? YAML JSON HTML XML

YAML

Where in the HTML file can you include a JavaScript file? Always within <body> You could include it within either, <head> or <body> tag Always within <head> You do not need to include it in the HTML

You could include it within either, <head> or <body> tag

Where is the right place to include JavaScript file? You could include it within either, <head> or <body> tag Always within <head> Always within <body>

You could include it within either, <head> or <body> tag

What function is commonly used for logging in JavaScript? log() output() print() console.log()

console.log()

The output of cp test.txt ../3308 command is __________ erroneous output copies text.txt file in 3308 folder which is in parent directory of current directory undefined behaviour copies text.txt file in 3308 folder which is subdirectory of current directory

copies t.ext.txt file in 3308 folder which is in parent directory of current directory

Gina is working on different tasks for a feature in a branch. When she did a git add . all the modified files got added to the staging index for a commit. However, files related to an incomplete task also were added in the process and she would like to remove those specific files from the staging index while retaining them in her local filesystem. Which of the following commands can she run to accomplish this task? git rm <filename>.<extension> git remove <filename>.<extension> git add <filename>.<extension> git rm --cached <filename>.<extension>

git rm --cached <filename><extension>

Which option is used to stash your untracked files? git stash --u git stash -k git stash -a git stash -u

git stash -u

In HTML, where is the standard location to include a JavaScript file? Within the <footer> section After the closing </body> tag Inside the <head> or right before closing the <body> Anywhere in the document

inside the <head> or right before closing the <body>

Jack runs the default (without modifiers) git log command to see the history of his repository. In which order will the logs be displayed? Oldest commits show up first There is no set order to the logs Most recent commits shows up first Most recent commits show up at the bottom

most recent commits shows up first

Which command is used to install dependencies defined in the package.json file? npm init npm install npm start npm run

npm install

b) What do you do to restore the work that you put away(in the previous question), after you pull the new changes ? pop pull stash revert

pop

Your team has merged multiple changes to main and now your branch is multiple commits behind main. Your team requires a linear commit history, what would you do before committing and sending a Pull Request to main? rebase rm stash merge

rebase

In Handlebars.js, what syntax is used for inserting dynamic values into templates? { dynamicValue } # dynamicValue # {{ dynamicValue }} <% dynamicValue %>

{{ dynamicValue }}

What is the correct syntax for using an if-else condition in Handlebars.js templates? {{#if condition}} ... {{else}} ... {{/if}} {{% if condition %}} ... {{else}} ... {{% endif %}} <% if condition %> ... <% else %> ... <% endif %> {{if condition}} ... {{else}} ... {{/if}}

{{#if condition}} ... {{else}} ... {{/if}}


संबंधित स्टडी सेट्स

Chapter 2 Psychology: The Nervous System

View Set

Une abominable feuille d'erable sur la glace

View Set