In this assignment, you will use regular JavaScript and the Fetch API to read an external JSON data file from the server and then add the data from each student object into new rows in an existing HTML table.
This assignment is very similar to the Adding Rows to a Table assignment. The main difference is that you will:
Set Up This Assignment
Add this HTML to your "week11/index.html" file. Put your name in the meta author tag (highlighted below).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Using Fetch to read a JSON file</title>
<meta name="description" content="This is a simple example using Fetch to read a
JSON string then add student data as rows in an HTML table.">
<meta name="author" content="Your name here">
<!-- link to external CSS file -->
<link rel="stylesheet" href="css/styles.css?v=1.0">
</head>
<body>
<!-- Content of the page goes here. -->
<main>
<h1>Use Fetch to read JSON data</h1>
<section class="intro">
<h2>Introduction</h2>
<p>In this assignment you will use Fetch to read in an external JSON data file.
You will then display the contents in a web page as new rows in an existing table.
</p>
</section>
<section class="student-info">
<h2>Student Information from JSON file</h2>
<p class="loading">Loading student data...</p>
<table id="student-table">
<thead>
<tr><th scope="col">Name</th><th scope="col">Favorite Hobby</th><th scope="col">Favorite Color</th></tr>
</thead>
<tbody>
</tbody>
</table>
</section>
</main>
<!-- link to external JS file -->
<script src="js/scripts.js"></script>
</body>
</html>
JSON Data
You will also use the same students.json file that you used in the
week9 assignment. Put the JSON file in a "data" subdirectory:
"week11/data/students.json"
CSS Stylesheet
You will also use the same CSS file that you used in the week9
assignment. Put the CSS file in a "css" subdirectory:
"week11/css/styles.css"
JavaScript
Your "week11/js/scripts.js" file
will use the fetch API to read an external JSON data file, then add
student data as rows to an existing table. This page contains
sample code that uses the fetch API: Fetch API: An Example
This displayData function needs to do these things:
In: Computer Science
In: Statistics and Probability
The null and alternate hypotheses are:
H0 : μ1 =
μ2
H1 : μ1 ≠
μ2
A random sample of 9 observations from one population revealed a sample mean of 24 and a sample standard deviation of 3.7. A random sample of 6 observations from another population revealed a sample mean of 28 and a sample standard deviation of 4.6.
At the 0.01 significance level, is there a difference between the population means?
a. State the decision rule. (Negative values should be indicated by a minus sign. Round your answers to 3 decimal places.)
b. Compute the pooled estimate of the population variance. (Round your answer to 3 decimal places.)
c. Compute the test statistic. (Negative value should be indicated by a minus sign. Round your answer to 3 decimal places.)
d. State your decision about the null hypothesis.
e.The p-value is
In: Math
The Big Red Company sold merchandise to a customer for 500,000 on January 1st, 2004 with a cost of 100,000. A payment of 100,000 is due at date of sale and annual payments of 100,000 due each succeeding January. The expected collectibility is exceptionally uncertain. Use the installment method of accounting and the cost recovery method to journalize the necessary entries.
In: Accounting
Apple recently had a stock split, so I decided to buy a few shares of Apple stock. As of today, Apple's beta is 1.28, the treasury yield is around 1.42%, and the market risk premium is 5.6% (Rudden, 2020). What is my expected return on Apple stock? Please explain your work.
| Economic State | Probability | Sony | McDonald's |
| Recession | 50% | 5% | 6.00% |
| Normal | 30% | 7.69% | 5.28% |
| Expansion | 20% | 15% | 5.80% |
In: Finance
Why the market tends to fail when dealing with environmental issues? It is said many externalities in environmental economics have features that are similar to that of public goods. We know that the provision of some public goods such as lighthouse can be solved through the market rather effectively. What makes environmental goods such as clean air different from lighthouse? Why is it more difficult to solve the provision of clear air through the market? (Please state your opinion and explain why)
In: Economics
Skittles Original Fruit bite-size candies are multicolored candies in a bag, and you can "Taste the Rainbow" with their five colors and flavors: green, lime; purple, grape; yellow, lemon; orange, orange; and red, strawberry. Unlike some of the other multicolored candies available, Skittles claims that their five colors are equally likely. In an attempt to reject this claim, a 4-oz bag of Skittles was purchased and the colors counted. Does this sample contradict Skittle's claim at the .05 level?
| Red | Orange | Yellow | Green | Purple |
| 16 | 24 | 25 | 30 | 27 |
(a) Find the test statistic. (Give your answer correct
to two decimal places.)
(b) Find the p-value. (Give your answer bounds
exactly.)
< p <
In: Statistics and Probability
In your own words, what is consideration? Provide an example (real life or hypothetical, but not a published online case) of adequate consideration OR lack of consideration. Explain the circumstances surrounding your example - e.g. what did each person say, etc. Then explain how the facts you detail constitute adequate consideration or lack of consideration.
For example:
My two year-old is precariously holding his Winnie the Pooh cup (with no lid) filled with milk. He's standing on the carpet with that look in his eye (parents, you know THE LOOK) as if to say, if you don't do what I want RIGHT NOW, I'm going to dump this entire cup of milk on the carpet. I quickly say "I promise to feed you, clothe you, and pay for your boxes & boxes of diapers (since no, you aren't potty trained yet), if you please refrain from pouring your Winnie the Pooh cup of milk on the carpet."
This is an example of a lack of consideration. I have a preexisting legal duty (p.215) to feed, clothe, and pay for all of those diapers for my 2 year-old, thus, there was no legally sufficient value given. Also, although I felt like I was 'bargaining' with my 2 year-old, per the objective theory of contracts, there was no actual 'bargained-for exchange.' (This is all besides the fact that a 2 year-old cannot be a contracting party.). Consequently, there was a lack of consideration in my hypothetical & he poured the milk on the carpet anyway …
In: Psychology
discuss one of the services Windows offers. Give a quick
description of the service, how to configure and enable it, whether
the system uses it all the time, or just when you turn it on, and
what your opinion is of the service. Does it do everything it needs
to do for the user? What about ease of use?
In: Computer Science
| Click here to read the eBook: The Cost of Retained Earnings,
rs Problem Walk-Through COST OF COMMON EQUITY The future earnings, dividends, and common stock price of Callahan Technologies Inc. are expected to grow 4% per year. Callahan's common stock currently sells for $22.75 per share; its last dividend was $2.50; and it will pay a $2.60 dividend at the end of the current year.
|
In: Finance