100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSE 3901_ Midterm 2. $9.79   Add to cart

Exam (elaborations)

CSE 3901_ Midterm 2.

 6 views  0 purchase
  • Course
  • Institution

CSE 3901_ Midterm 2.

Preview 2 out of 13  pages

  • June 17, 2024
  • 13
  • 2023/2024
  • Exam (elaborations)
  • Questions & answers
avatar-seller
CSE 3901: Midterm 2

STATIC SITES SECTION - ANS----

What is static site generation? - ANS-Using a program to produce HTML pages
(kind of like compiling programs)
Middleman

what are the source files used in SSG? - ANS-.md
.erb
.scss

What is Middleman? - ANS-A ruby Gem
the project is its own directory
lots of subdirectories for css, images, etc
Compile the source files like a program
can then copy to any location

What are the three benefits of using a program for Static Site Generation? - ANS-1.
Code reuse and single point of control (visual identity)
2. Authoring of content in a language that is more human-friendly (improved syntax)
3. Parameterized generation of markup and content (content generation)

Describe Visual Identity (code reuse/single POC) Motivation - ANS--Having common
headers and footers and making the whole website have a base design for every page
-duplicated code ruins single POC
-Solution: putting common HTML in one file (a partial) and every page includes it

What is ERb? - ANS-Embedded Ruby
-things like <% code %> <%= expr %> and <%# text %>

How to generate a site - ANS-save source files as html.erb
>> bundle exec middleman build
this then makes them .html

what is a partial - ANS-a document fragment included in other documents
-include in template as <%= partial "navigation" %>

, what is special about naming a partial? - ANS-they always start with _ and end in .erb
still (no html)

How to customize arguments with a partial - ANS-in the normal page when you call the
partial:
<%= partial "banner", :locals => { :name => "Syllabus", :amount => 34 } %>

in the partial file:
<h3> ,%= name %> </h3>
<p> Costs <%= "$#{amount}.00" %></p>

What is Layout - ANS-It is a file that can make a consistent structure across every page
in a website

How do you label where there's page specific stuff in Layout.erb? - ANS-<%= yield =>

How do you fix the issue of using a layout when each page needs a diff <title>? -
ANS-Ruby variable current_page
ie: current_page.path

So in the actual page file you put:
<title><%= current_page.data.title %> </title>

and in the layout.erb:
---
title: "Contact Info"
---

What is the main difference in syntax when using middleman? - ANS-Not having to use
tags because that part is in layout

What are some common plain text conventions? - ANS-blank lines between paragraphs
Underlining: - or =
Emphasize: *words*, _words_, **words**
Links: [text](url)
unordered lists: * or -
ordered lists: 1. 2. 3.

What formalizes these shortcuts? - ANS-Markdown

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller denicetho. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $9.79. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73243 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$9.79
  • (0)
  Add to cart