Questions
 In this exercise, you will create two external style sheet files and a web page. You...

 In this exercise, you will create two external style sheet files and a web page. You will experiment with linking the web page to the external style sheets and note how the display of the page is changed.

Create an external style sheet (call it format1.css) to format as follows: document background color of white, document text color of #000099, and document font family of Arial, Helvetica, or sans-serif. Hyperlinks should have a background color of gray (#CCCCCC). Configure the h1 selector to use the Times New Roman font with red text color.

Create an external style sheet (call it format2.css) to format as follows: document background color of yellow and document text color of green. Hyperlinks should have a background color of white. Configure the h1 selector to use the Times New Roman font with white background color and green text color.

Create a web page about your favorite movie that displays the movie name in an <h1> tag, a description of the movie in a paragraph, and an unordered (bulleted) list of the main actors and actresses in the movie. The page should also have a hyperlink to a website about the movie. Place an e-mail link to yourself on the web page, email link. This page should be associated with the format1.css file. Save the page as moviecss1.html. Be sure to test your page in more than one browser. Modify the moviecss1.html page to link to the format2.css external style sheet instead of the format1.css file. Save the page as moviecss2.html and test it in a browser. Notice how different the page looks!

In: Computer Science

Write a C++ program, all the answers so far on this site have been wrong when...

Write a C++ program, all the answers so far on this site have been wrong when I compiled them.. Desired outputs at the end.

--In this exercise, you are to modify the Classified Numbers programming example in this chapter. As written, the program inputs the data from the standard input device (keyboard) and outputs the results on the standard output device (terminal screen). The program can process only 20 numbers. Rewrite the program to incorporate the following requirements:

a) Data to the program is input from a file of an unspecified length named Ch06_Ex20Data.txt; that is , the program does not know in advance how many numbers are in the file.

b) Save the output of the program in a file named Ch06_Ex20Out.txt.

c) Modify the void function getNumber so that it reads a number from the input file (opened in the function main), outputs the number to the output file (opened in the function main), and sends the number read to the function main. Print only 10 numbers per line. Assume all numbers are between -9999 and 9999.

d) Have the program find the sum and average of the numbers.

e) Modify the function printResult so that it outputs the final results to the output file (opened in the function main). Other than outputting the appropriate counts, this new definition of the function printResult should also output the sum of the numbers

Outputs in the program should look like this:

Processing Data

There are 27 evens, which includes 12 zeros

Total number of odds are: 16

The sum of numbers = 558

The average is 12

press any key to exit.

The OutFile should look like this

E:\FolderName\Lab\Ch06_Ex20> type Ch06_Ex20Out.txt

43 67 82 0 35 28 -64 7 -87 0

0 0 0 12 23 45 7 -2 -8 -3

-9 4  0 1 0  -7 23 -24 0 0

12 62 100 101 -203 -340 500 0 23 0

54 0 76

There are 27 evens, which includes 12 zeros

Total number of odds are: 16

The sum of numbers = 558

The average is 12

E:\FolderName\Lab\Ch06_Ex20>

In: Computer Science

CS 430 Internet Multimedia Program This individual project is open-topic. Games, Animations, Commercial business sites, Blogs,...

CS 430 Internet Multimedia Program

This individual project is open-topic. Games, Animations, Commercial business sites, Blogs, anything is acceptable! Use the knowledge we have learned, your creativity and imagination!

I need to write a code for creating a website of my own

Please provide the links to the picture

In: Computer Science

Do a bit of research on the hearsay rule in legal proceedings. In your own words,...

Do a bit of research on the hearsay rule in legal proceedings. In your own words, explain the hearsay rule and describe how it relates to the concept of an expert witness. Write a short paper, 300-400 words

In: Computer Science

(Linear time algorithm for finding duplicates of two sorted arrays, 20pt) Devise a linear time O(m+n)...

(Linear time algorithm for finding duplicates of two sorted arrays, 20pt)

Devise a linear time O(m+n) algorithm to find the duplicates between two sorted arrays (m, n are the sizes of two arrays). For instance, for inputs {1,3,5,7} and {1,2,3,4}, the correct outputs should be {1,3

In: Computer Science

Python 3: Write a function called Interest with floating point parameters Amount and InterestPercent that calculates...

Python 3:

Write a function called Interest with floating point parameters Amount and InterestPercent that calculates the simple interest on Amount using InterestPercent as the interest rate.The function should return the interest amount.

In: Computer Science

In Visual Studio in C#, you will create a simple calculator that performs addition, subtraction, multiplication,...

In Visual Studio in C#, you will create a simple calculator that performs addition, subtraction, multiplication, and division. Your program should request a numerical input from the user, followed by the operation to be performed, and the second number to complete the equation. The result should be displayed to the user after each equation is performed. For example, if the user performs 3+3, the program should display 6 as the result.

The program should continue running so the user can perform multiple operations. For example, if the user wants to add, subtract, and then multiply they should be able to do each of these without exiting the program. If you need a reference use the simple calculator on your computer. You do not need to include a function for clearing the result.

In: Computer Science

In this program, there are 3 bugs and 2 syntax errors. Please identify them! The source...

In this program, there are 3 bugs and 2 syntax errors. Please identify them! The source code is below.

The source code is in C:

/*------------------------------------------------------------------

File:  CylinderVolume.c  (Lab 3)

Author: Gilbert Arbez, Fall 2018

Description: Calculates how the volume changes for different depths

              in a horizontal cylinder.

------------------------------------------------------------------*/

#include <stdio.h>

#include <stdlib.h>

#include <math.h>

// Define symbolic constant

#define N       50    // number of points to compute

#define TRUE    1

#define FALSE   0

// Prototypes

void computeDisplayVolume(double, double);

/*--------------------------------------------------------------------

Function: main

Description:  Gets from the user the radius and length of the cylinder,

              calls computeDisplayVolume to compute and display a table

              of how the volume changes with depth of a liquid in

              the cylinder.

----------------------------------------------------------------------*/

void main()

{

    // Variable declarations

    double radius;  // cylinder radius

    double length;  // cylinder length

    int flag;   // sentinelle for controlling data input

    // Get input from user, the cylinder radius and length

    do

    {

        flag = TRUE;

        printf("Please give cylider radius and length: ");

        scanf("%lf %lf",&radius, &length);

        if(radius <= 0.0 || length <= 0.0)

          {

              printf("Both values must be greater than zero.\n");

              flag = FALSE;

          }

    } while(flag == TRUE)

    // Compute/display depth/volume data

    computeDisplayVolume(radius, length);

}

/*------------------------------------------------------------------------

Function: computeDisplayVolume

Parameter

    radius - radius of the horizontal cylinder

    length - length of the horizontal cylinder

Description: Computes and displays depth/volume data points in a table

             that varies the depth of the liquid from 0 to the cylinder diameter.

             N such data points are computed (i.e. the increment in the

                                              value of h is 2r/N).

------------------------------------------------------------------------*/

void computeDisplayVolume(double radius, double length)

{

    // Declaration of variables

    double increment;   // how to increment the depth

    double h;           // depth value

    double volume;      // volume value

    int i ;             // loop counter

    // setup the variables

    increment = radius/N;

    h = 0.0;

    // Table Header

    printf("The change in liquid volume of the cylinder with radius %.2f \nand length %.2f as depth changes is as follows.\n",

            radius, length);

    printf("%10s    %10s\n","Depth", "Volume");

    printf("------------------------\n");

    // Loop for calculating each of the n depth/volume points.

    for(i = 0 i < N; i = i + 1)

    {

       volume = pow(radius,2)*acos((radius-h)/radius);

       volume = volume - (radius - h)*sqrt(2.0*radius*h - pow(h,2));

       volume = volume*length;

       // Display the row with ocmputed values

       printf("%10.2f    %10.2f\n", h, volume);

    }

}

In: Computer Science

Gui calculator in Java with additon, subtraction, multiplication, division, sine, cosine, tangent, square, cube, raise to...

Gui calculator in Java with additon, subtraction, multiplication, division, sine, cosine, tangent, square, cube, raise to x to the power of y functionality. It should also have memory button, memory recall button and clear.

In: Computer Science

An employee’s total weekly pay equals the hourly wage multiplied by the total number of regular...

An employee’s total weekly pay equals the hourly wage multiplied by the total number of regular hours plus any overtime pay. Overtime pay equals the total overtime hours multiplied by 1.5 times the hourly wage. Write a python program that takes as input the hourly wage, total regular hours, and total overtime hours and displays an employee’s total weekly pay.

The script must start with comments about the author, assignment and submission date. Save the script using the following naming convention: Name_SID_Assignment#.py. Please submit pseudocode, flow chart and screenshot of the output.

In: Computer Science

Java Programming Write a program that displays the following pattern *                         *       &nbsp

Java Programming

Write a program that displays the following pattern

*

                        *          *          *

*          *          *          *          *         

*          *          *          *          *          *          *

            *          *          *          *          *

                        *          *          *

                                    *

Printing Pattern A

*

**

***

****

*****

******

*******

Printing Pattern B

*******

******

*****

****

***

**

*

Printing Pattern C

*

**

***

****

*****

******

*******

In: Computer Science

Workshop: SQL Simple Retrieval For this workshop, you are to submit the SQL statements. Do not...

Workshop: SQL Simple Retrieval For this workshop, you are to submit the SQL statements. Do not submit the output produced by running the query. However, you may wish to examine the output to ensure the correctness of the query. When writing a query, do not rely exclusively on the current content of the database. Remember that when working with a real-world company’s database there can be far too many rows to allow you to visually examine the content of a table and validate your query. The following exercises all pertain to the FACULTY table. This table has the following columns: FNO, FNAME, FADDR, FHIRE_DATE, FNUM_DEP, FSALARY, and FDEPT. The table is owned by the user STUDENT.

1. Display the entire FACULTY table.

2. Display all information about any employee whose yearly salary is less than $40000.

3. Display all information about any employee who is employed by the Computer and Information Systems (CIS) Department.

4. Display the department, faculty number, and name of all faculty members.

5. Display the name and date of hire for any faculty member whose department alphabetically precedes THEO.

6. Display the departments to which faculty are assigned. Do not show duplicate values.

7. Display the name and salary of any employee earning less than $36000. Present the result set such that the highest paid employee is listed first, the second highest is listed next, and so on - that is, show the result with salaries in descending sequence.

8. Display the department, employee name, and salary for every employee. The output should be presented such that rows are arranged by salary within department. (Employees assigned to the same department will appear next to each other, but these rows will be sorted by salary.)

In: Computer Science

1. Write a program that includes a function search() that finds the index of the first...

1. Write a program that includes a function search() that finds the index of the first

element of an input array that contains the value specified. n is the size of the array. If

no element of the array contains the value, then the function should return -1. Name your

program .C The program takes an int array, the number of elements in the array,

and the value that it searches for. The main function takes input, calls the

search()function, and displays the output.

int search(int a[], int n, int value);

Example input/output #1:

Enter the length of the array: 4

Enter the elements of the array: 8 2 3 9

Enter the value for searching: 3

Output: 2

Example input/output #2:

Enter the length of the array: 6

Enter the elements of the array: 4 7 1 0 3 9

Enter the value for searching: 5

Output: -1

2. Modify the part 1 program so that it deletes all instances of the value from the array. As

part of the solution, write and call the function delete() with the following

prototype. n is the size of the array. The function returns the new size of the array after

deletion (The array after deletion will be the same size as before but the actual elements

are the elements from index 0 to new_size-1). In writing function delete(), you may

include calls to function search(). The main function takes input, calls the

delete()function, and displays the output. Name your program .C

int delete(int a[], int n, int value);

Example input/output #1:

Enter the length of the array: 6

Enter the elements of the array: 4 3 1 0 3 9

Enter the value for deleting: 3

Output array:

4 1 0 9

In: Computer Science

Step 1) Following the steps from prior weeks, add a new page to your website. Save...

Step 1) Following the steps from prior weeks, add a new page to your website. Save this new page as AboutUs.html. Make sure that the name of the page does not have a space (see the screenshot below of the Save dialogue box).

Step 2) Add the <body> tag, navigation, and <header> tag. The header <h1> text should say “About Us”.

Hint: Refer to Week Three, Steps 3, 4, and 5 for a refresher on how to add these elements.

Step 3) Add a link to the external CSS page.

Hint: Refer to Week Three, Step 8 for a refresher on how to add the link to the MyStyle.css page.

Step 4) Save your page and open it in a web browser, such as IE or Chrome. Your page should render like the image below with the header and the navigation on the top right of the page.

Step 5) Add a <div> tag between the closing </header> and closing </body> tags. To avoid confusion with <div> tags that you will add later, name this tag “div1”.

<div name="div1">

</div>

Step 6) Add a new file folder named media to the folder where you’ve chosen to save your Week Five files (the screenshot below shows your file structure with the media folder in the same place as your HTML and CSS files).

Step 7) Copy the file named Swiss_Mountain_House.mp4 to the “media” folder.

Note: It’s important that you have the legal right to use any and all media files you add to web pages; you automatically own all rights to media files you created yourself, most other files you must obtain permission from the owner of the file. Some copyright owners grant free use of their work just for asking. Websites that offer free media files will state on their site that the files are royalty free. Never use someone else’s work without being sure you have the right to do so. In this case, your instructor has ensured you have the right to use these files.

Step 8) Within the opening <div> and closing <div> tags for “div1”, add the following code to add a video clip to your AboutUs.html page:

<video width="400px" controls>

   <source src="media/Swiss_Mountain_House.mp4" type="video/mp4">

   Use a browser (such as IE or Chrome) that supports the HTML5 video tag for mp4 files.

</video>

Note: The source “src” tag for the path is pointing to the media folder. The line under the <source> tag is verbiage that the user may see if the browser is not compatible with the HTML5 video tag, or if the file is missing. All browsers behave differently, but it is a good practice to provide the alternate text.

Step 9) Add the following HTML comment on the line above the beginning <video> tag. Note the syntax that delineates the start and stop of the HTML comment. The HTML interpreter will ignore everything between the opening and closing comment tags so you only see this comment when you look at the source. Notice that the HTML comment syntax is different from the JavaScript® comment syntax.

<!-- Royalty-free video loops are from https://www.freeloops.tv/ -->

Step 10) Save and refresh the browser. Your page should render like the image below with an embedded video file below the header.

Step 11) Click the play arrow to test the 5-second video.

Note: There is no audio with this video.

Step 12) Copy the files named Cow-SoundBible.mp3 and Cow-SoundBible.wav to the “media” folder.

Step 13) Add a second <div> tag (named “div2”) after the closing </div> tag for “div1”, but before the closing </body> tag. Insert the <article> and <audio> element code below. Note that the source “src” tag for the path is pointing to the media folder and there is also a comment above the opening <audio> tag.

        <div name="div2">

<article >

Our cheese products come from the finest farms in Switzerland. Click the audio play button below to hear our happy cows!

</article>

<!-- Royalty-free sound clips are from http://soundbible.com/ -->

<audio controls >

   <source src="media/Cow-SoundBible.mp3" type="audio/mpeg">

   <source src="media/Cow-SoundBible.wav" type="audio/wav">

   <source src="media/Cow-SoundBible.ogg" type="audio/ogg">

   Your browser does not support the audio tag.

</audio>

        </div>

Step 14) Save and refresh the browser. The page will render like the image below with text and the embedded sound file below the video. Press the audio play arrow to test the audio.

  

Note:In Step 14, the line under the <source> tag is verbiage that users may see if their browsers are not compatible with the HTML5 audio tag, or if the audio files are missing. To simulate this situation, comment out the two lines for the MP3 and WAV files. When your interpreter cannot see the two commented-out lines, it will only read the file for the OGG file. Since that file is missing, your browser will either show the alternate text, or disable the audio control. All browsers behave differently, but providing these options allows different browsers to handle the situation gracefully. Without these options, a browser might display a broken link to a sound file with no explanation, which would confuse your users and give them the impression that your site is poorly constructed. Remember that in HTML the beginning comment tag is <!-- and the closing comment tag is -->. If you tested the missing file scenario above, be sure to uncomment the lines that point to the MP3 and WAV files.

Step 15) To float “div1” and “div2” side-by-side, use the "myColumns" CSS class from Week One to both <div> tags. Save your file after you are finished. The modified opening <div> tags will look like this:

<div name="div1" class="myColumns">

<div name="div2" class="myColumns">

Step 16) Open the MyStyle.css page in NotePad++. Add the following code to the end of the existing code, right after the closing curly brace } for the myColumns block, as follows:

.aboutUsMedia {

            width: 250px;

}

Step 17) Back in the AboutUs.html page, modify the opening <video>, opening <article> tag, and opening <audio> tags.

Note: The “aboutUsMedia” class will replace the “width” attribute for the <video> tag.

  1. Remove the width="400px" statement from the opening <video> tag and replace it with the class="aboutUsMedia" statement. The code will look like the example line below:

<video class="aboutUsMedia" controls>

  1. Add the class="aboutUsMedia" statement to the opening <article> and opening <audio> tags, as follows:

<article class="aboutUsMedia">

<audio class="aboutUsMedia" controls >

Step 18) Save and refresh the browser. The <video> tag, <article> tag, and <audio> tag are all resized to a width of 250px, and the two <div> tags are now floating side-by-side as shown in the image below.

Step 19) Add the following <footer> code between the closing </body> tag and the closing </html> tag:

<footer>

Click

<a href="https://www.nationalgrocers.org/" target="_blank">here</a>

to learn more about the National Grocers Association.

</footer>

Step 20) To push the <footer> to the bottom of the page, and to stop the floating of the footer to the right, add the following to the end of your MyStyle.css page.

footer {

            clear:both; /* this clears the float */

            display: block;

            position: absolute;

            bottom: 0;

            left: 0;

            right: 0;

background-color: lightgray;

text-align: center;

}

Step 21) Save your file and refresh it in the browser window. Your page should render like the image below with a formatted footer at the bottom of the page that includes a link. To test the external link, click the “here” hyperlink in the footer at the bottom of the page. The external page will open in a new window.

Note: Be sure to save all the files, as you modified the AboutUs.html and MyStyle.css files in the prior steps.

In: Computer Science

Write a pseudo code for an O (n7log3n) algorithm. Please write in C++.

Write a pseudo code for an O (n7log3n) algorithm. Please write in C++.

In: Computer Science