In the Little Albert experiment, Watson taught a young child to associate the sight of a white rat with fear. He did this by giving the child a rat, then making a very loud sound near him, which elicited a fear response. Eventually, the sight of any white, fuzzy object (including a coat, a rabbit, and a Santa mask) elicited an immediate fear response (Cherry & Morin, 2019). Do you think this experiment by Watson was ethical? He created a lifelong fear in the child for the purposes of research. If you were going to repeat his experiment, what would you do differently to make it more ethical by today's standards?
In: Psychology
In: Physics
Anne, bob, and carol- all biostatisticians and epidemiologists- are emailing each other about plans for the weekend. Anne suggests that they all go surfing to Santa Cruz, but bob writes back indicating that he is reluctant to do so because he is terrified of sharks. Carol responds by arguing that P(great weekend | surfing) is 0.80 and P(great weekend | no surfing) is 0.50. Assuming that Carol’s probabilities are correct, further assume for this example that each person’s weekend happiness is independent of any other person’s weekend happiness:
1. Given that all friends go surfing, what is the probability that all 3 of them have a great weekend?
2. Given that all 3 friends go surfing, what is the probability that 2 of them have a great weekend and 1 of them does not have a great weekend? (Hint, how many ways could 2 of the friends have a great weekend?)
In: Statistics and Probability
In: Biology
The following adjusted trial balance contains the accounts and balances of Cruz Company as of December 31, 2015, the end of its fiscal year. No. Account Title Debit Credit 101 Cash $ 18,000 126 Supplies 8,400 128 Prepaid insurance 2,000 167 Equipment 23,000 168 Accumulated depreciation—Equipment $ 6,500 301 T. Cruz, Capital 42,725 302 T. Cruz, Withdrawals 6,000 404 Services revenue 37,000 612 Depreciation expense—Equipment 2,000 622 Salaries expense 21,571 637 Insurance expense 1,554 640 Rent expense 2,479 652 Supplies expense 1,221 Totals $ 86,225 $ 86,225
1. Prepare the December 31, 2015, closing entries for Cruz Company. Assume the account number for Income Summary is 901.
2. Prepare the December 31, 2015, post-closing trial balance for Cruz Company.
In: Accounting
XML and XSL
I'm trying to style my XML code but it's not implementing the XSL file when I run it even though the file is referenced. Any help?
XML code:
<?xml version="1.0"?>
<?xml-stylesheet href="textbooks.xsl" type="text/xsl"
?>
<textbooks>
<textbook>
<title> Introduction to Design and Analysis of
Algorithms</title>
<authors>
<author>
<firstName>Anany</firstName>
<lastName>Levitin</lastName>
</author>
</authors>
<publisher>
<name>Ed, Pearson</name>
<website>https://www.pearson.com</website>
</publisher>
<Year-of-Publication>2011</Year-of-Publication>
<ISBN>978-0132316811</ISBN>
<book-specific-website></book-specific-website>
<edition>3rd edition</edition>
<cover-type>Paperback</cover-type>
</textbook>
<textbook>
<title>Software Engineering: A Practitioner’s
Approach</title>
<authors>
<author>
<firstName>Roger</firstName>
<lastName>Pressman</lastName>
</author>
</authors>
<publisher>
<name>Ed, McGraw-Hill</name>
<website>www.mheducation.com</website>
</publisher>
<Year-of-Publication>2014</Year-of-Publication>
<ISBN>8126554274</ISBN>
<book-specific-website></book-specific-website>
<edition>8th edition</edition>
<cover-type>Hardcover</cover-type>
</textbook>
<textbook>
<title>Internet and World Wide Web: How to Program with
CD-ROM BK and CD ROM</title>
<authors>
<author>
<firstName>Harvey</firstName>
<lastName>Deitel</lastName>
</author>
</authors>
<publisher>
<name>Prentice Hall,</name>
<website>https://www.amazon.com/Internet-World-Wide-Web-Program/dp/0131450913</website>
</publisher>
<Year-of-Publication>2004</Year-of-Publication>
<ISBN> 0131450913</ISBN>
<book-specific-website></book-specific-website>
<edition>3rd edition</edition>
<cover-type>Hardcover</cover-type>
</textbook>
</textbooks>
XSL:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/textbooks">
<html>
<body>
<table border="1">
<tr>
<th>Title</th>
<th>Author First Name</th>
<th>Author Last Name</th>
<th>Publisher Name</th>
<th>Publisher website</th>
<th>Year of publication</th>
<th>ISBN</th>
<th>Book Website</th>
<th>Edition</th>
<th>Cover Type</th>
</tr>
<xsl:for-each select="textbook">
<tr>
<td><xsl:value-of
select="title"/></td>
<td><xsl:value-of
select="authors/firstName"/></td>
<td><xsl:value-of
select="authors/lastName"/></td>
<td><xsl:value-of
select="publisher/name"/></td>
<td><xsl:value-of
select="publisher/website"/></td>
<td><xsl:value-of
select="Year-of-publication"/></td>
<td><xsl:value-of
select="ISBN"/></td>
<td><xsl:value-of
select="book-specific-website"/></td>
<td><xsl:value-of
select="edition"/></td>
<td><xsl:value-of
select="cover-type"/></td>
<tr>
<xsl:for-each>
<table>
</body>
</html>
In: Computer Science
Exercise 1:
Write an XML document describing the exercises in this document: the root element is <exercises>. The root has an attribute number that has value 1. The root element has three child elements; <date> that contains as text the date of the exercise, and two <item> elements for the first two exercises (1--2). Write some text in the <item> elements.
Exercise 2:
Write an XML document describing a person: name, occupation, address and hobbies. Please do not use your own information, you can use fake data. Decide on suitable element names and nesting. Check your document for well-formedness.
Exercise 3:
Draw a tree that represents the XML document you created in task 2.
Exercise 4:
This is the books.xml file
<?xml version='1.0'?>
<!-- This file represents a fragment of a book store inventory
database -->
<bookstore>
<book genre="autobiography" publicationdate="1981" ISBN="1-861003-11-0">
<title>The Autobiography of Benjamin
Franklin</title>
<author>
<first-name>Benjamin</first-name>
<last-name>Franklin</last-name>
</author>
<price>8.99</price>
</book>
<book genre="novel" publicationdate="1967" ISBN="0-201-63361-2">
<title>The Confidence Man</title>
<author>
<first-name>Herman</first-name>
<last-name>Melville</last-name>
</author>
<price>11.99</price>
</book>
<book genre="philosophy" publicationdate="1991" ISBN="1-861001-57-6">
<title>The Gorgias</title>
<author>
<name>Plato</name>
</author>
<price>9.99</price>
</book>
</bookstore>
Using books.xml as a model, create a small xml file for a student's
program of study form called programOfStudy.xml. It should capture
the following data:
In: Computer Science
1.
If you cannot think of a better way to say what another author said, it is best to
|
keep reading the passage until you can paraphrase. |
||
|
quote the author, no matter how long or how often. |
||
|
substitute a few words in the sentence for synonyms. |
||
|
leave that source out of your paper. |
2.
When referring to the work of other authors, APA uses
|
the title of their work. |
||
|
the first and last name of the author(s). |
||
|
the last name of the author(s) and date of publication. |
||
|
the last name of the author(s), date of publication, and title of journal. |
3.
It is plagiarism if you
|
use material you heard in lecture without referencing it. |
||
|
use material from your textbook without referencing it. |
||
|
use material you found on the Internet that had no author listed. |
||
|
all of the above |
4.
Plagiarism includes
|
using someone else’s words without quotation marks. |
||
|
writing the same paragraph for two different course assignments without indicating (the second time) that you have used it before. |
||
|
unintentionally omitting a reference for something you found on the Internet. |
||
|
all of the above |
5.
Which is preferred in APA style?
|
John Smith (2009) found that elephants have teeth. |
||
|
Smith (2009) found that elephants have teeth. |
||
|
Smith, J. (2009) found that elephants have teeth. |
||
|
In his article, “Elephants Have Teeth,” Smith (2009) reported that elephants have teeth. |
In: Operations Management
In: Physics
Objective
Demonstrate composition in Python (a class that contains
another).
Overview
After completing (or while completing) the preparation material for
this week, complete the following exercise.
For this exercise, you will create a class to model books and the
author that wrote it. Note the relationship that a book has an
author.
At this point, you should put all of your classes and other code in
the same file. Don't worry about separating it out into separate
modules.
Instructions
Write a Python 3 program according to the following:
Person:
• Create a class for a Person that contains a name and a birth
year. The author of a book will be a Person object.
• Create an initializer for your Person class to set the default
name to be "anonymous" and the year to be "unknown".
• Create a method, display that displays the Person's name and
birth year in the format "name (b. year)"
Book:
• Create a class for a Book that contains a title, an author (of
type Person), and a publisher.
• Create an initializer for your Book class to set the default
title to be "untitled", the author to be a Person, and the
publisher to be "unpublished".
• Create a method, display that displays the Book's information as
follows (don't forget to have the book display method call the
author's display method):
The Great Divorce
Publisher:
Geoffrey Bles
Author:
C.S. Lewis (b. 1898)
Then, create a main function that does the following:
• Create a new book
• Call that book's display function
• Prompts the user for each of the following: author name and birth
year, and the books title and publisher.
• Sets these values for the current book and it's author.
• Calls the book's display function again.
Sample Output
The following is an example of output for this program:
untitled
Publisher:
unpublished
Author:
anonymous (b. unknown)
Please enter the following:
Name: C.S. Lewis
Year: 1898
Title: The Great Divorce
Publisher: Geoffrey Bles
The Great Divorce
Publisher:
Geoffrey Bles
Author:
C.S. Lewis (b. 1898)
Automatic Grading Script (TestBed)
This assignment is pass/fail. In order to receive credit, it must
pass the auto-grading test script (TestBed). You can run this
script as many times as you like while you are working on the
assignment. The same test script will be run by the instructor for
credit, so you should not be surprised at the result.
In addition, because the point of this exercise is to help you
practice the use of classes. You must use classes to receive credit
for this assignment.
To run the test script, log into the CS Department Linux system and
run the testBed command, providing the class and test script to run
as well as the Python program to use, for example:
testBed cs241/check04a check04a.py
Submission
Submit your program by logging into the CS Department Linux system,
and running the submit command with your filename, for
example:
submit check04a.py
You should then select the appropriate course (CS 241), instructor,
and assignment from the list.
In: Computer Science