Q: Provide JavaScript code to change the font family of the first h1 heading in the document to Arial?
In: Computer Science
Show the code in matlab to display an ECG graph
(I do not want code that simply calls the ecg function in matlab
but how to write that kind of code)
In: Computer Science
A plant manager is considering buying additional stamping machines to accommodate increasing demand. The alternatives are to buy 1 machine, 2 machines, or 3 machines. The profits realized under each alternative are a function of whether their bid for a recent defense contract is accepted or not. The payoff table below illustrates the profits realized (in $000's) based on the different scenarios faced by the manager.
Alternative Bid Accepted Bid Rejected
Buy 1 machine $10 $5
Buy 2 machines $30 $4
Buy 3 machines $40 $2
Refer to the information above. Assume that based on historical bids with the defense contractor, the plant manager believes that there is a 65% chance that the bid will be accepted and a 35% chance that the bid will be rejected.
a. Which alternative should be chosen using the expected monetary value (EMV) criterion?
b. What is the expected value under certainty?
c. What is the expected value under perfect information (EVPI)?
(I need an Excel Spreadsheet)
In: Computer Science
Q: Provide the expression to create an object collection of all objects referenced by the CSS selector div#intro p?
In: Computer Science
a) Provide a comprehensive response describing naive
Bayes?
(b) Explain how naive Bayes is used to filter spam. Please make
sure to explain how this process works.
(c) Explain how naive Bayes is used by insurance companies to
detect potential fraud in the claim process.
Need 700 words discussion
Your assignment should include at least five (5) reputable sources,
written in APA Style, and 500-to-650-words.
In: Computer Science
Write a Java program to convert decimal (integer) numbers into their octal number (integer) equivalents. The input to the program will be a single non-negative integer number. If the number is less than or equal to 2097151, convert the number to its octal equivalent.
If the number is larger than 2097151, output the phrase “UNABLE TO CONVERT” and quit the program.
The output of your program will always be a 7-digit octal number with no spaces between any of the digits. Some of the leading digits may be 0.
Use a while loop to solve the problem. Do not use strings.
Sample Program Run
Please enter a number between 0 and 2097151 to convert:
160000
Your integer number 160000 is 0470400 in octal.
Please enter a number between 0 and 2097151 to convert:
5000000
UNABLE TO CONVERT
In: Computer Science
Remove the minimum element from the linked list in Java
public class LinkedList {
// The LinkedList Node class
private class Node{
int data;
Node next;
Node(int gdata)
{
this.data =
gdata;
this.next =
null;
}
}
// The LinkedList fields
Node head;
// Constructor
LinkedList(int gdata)
{
this.head = new Node(gdata);
}
public void Insertend(int gdata)
{
Node current = this.head;
while(current.next!= null)
{
current =
current.next;
}
Node newnode = new
Node(gdata);
current.next = newnode;
}
public void Listprint()
{
Node current = this.head;
while(current!= null)
{
System.out.print(current.data + " ");
current =
current.next;
}
System.out.println();
}
public void Removemin() {
// Complete this method to remove the minimum value in
a linkedlist
}
public static void main(String[] args) {
LinkedList exlist = new
LinkedList(8);
exlist.Insertend(1);
exlist.Insertend(5);
exlist.Insertend(2);
exlist.Insertend(7);
exlist.Insertend(10);
exlist.Insertend(3);
exlist.Listprint();
//output: 8 1 5 2 7 10 3
exlist.Removemin();
exlist.Listprint();
//output should be: 8 5 2 7 10
3
}
}
In: Computer Science
Write the MIPS assembly version of this C code:
int weird(char[] s, int x) { int i; for (i = 0; i < x; i++) { if (s[i] == ‘A’) { return power(10, i); } } return -1; } int power(int base, int i) { int j = 0; while (j < base) { base = base * base; j++; } return base; }
In: Computer Science
Q1) Given the following sentences:
Part 1:
Part 2:
In: Computer Science
You must change file HelloWorld.java in hello-java so that the tests all pass
HelloWorld.java
package hw; public class HelloWorld { public String getMessage() { return "hello world"; } public int getYear() { return 2019; } }
Main.java
package hw; import java.util.Arrays; public class Main { public static void main(final String[] args) { System.out.println("args = " + Arrays.asList(args)); final HelloWorld instance = new HelloWorld(); System.out.println(instance.getMessage()); System.out.println(instance.getYear()); System.out.println("bye for now"); } }
TestHelloWorld.java
package hw; import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; public class TestHelloWorld { private HelloWorld fixture; @Before public void setUp() throws Exception { fixture = new HelloWorld(); } @After public void tearDown() throws Exception { fixture = null; } @Test public void getMessage() { assertNotNull(fixture); assertEquals("hello world", fixture.getMessage()); } @Test public void getMessage2() { // this test is broken - fix it! assertNull(fixture); assertEquals("hello world", fixture.getMessage()); } @Test public void getYear() { // this test is OK, fix HelloWorld.java to make it pass! assertNotNull(fixture); assertEquals(2019, fixture.getYear()); } }
In: Computer Science
Write a MATLAB *function* that draws a spiral by using the plot() command to connect-the-dots of a set of points along the spiral's trajectory. The function should have three input arguments: the number of points along the trajectory, the number of rotations of the spiral, and the final radius of the spiral. The function does not need any output arguments. Use nargin to provide default values for the input arguments. The spiral should begin at the origin. At each step (i.e.,going from one point in the spiral to the next), the angle about the origin and the distance from the origin should increase by a constant increment as defined by the function's inputs.
In: Computer Science
(2) Companies like Symantec, McAffee, Trend Micro, Kaspersky, etc. provide enterprise-level malware protection. Choose a major anti-virus company and familiarize yourself with their product line. Using what you learned from your research create an executive presentation of 8-12 PowerPoint slides on the product and on how you would install an enterprise malware solution on a hypothetical network with 50 Windows servers and 2000 Windows 7 computers. Provide sufficient detail about hardware devices and software and where they would be installed. Create a high-level diagram to accompany your proposal that shows the layout of your software. It is not necessary to diagram your complete network, just a high level representation of it. For example, you could represent the 2000 Windows 7 computers with one Icon labeled Windows 7 Workstations (2000). However, if you include a security appliance that provides malware protection, it should be included as a separate icon. Also, indicate location of software components (clients, servers, databases, management tools, etc) on your diagram, as well.
In: Computer Science
In: Computer Science
Unit 4: Discussion - Part 1
Question
Read the lecture for Chapter 4, and then answer the following:
Think of a brief example where you can use conditional
statements and write it in correct Java syntax. You may use
if-else-if statements or the switch statement. You may also use the
example you wrote in pseudo code for the discussion thread
2 during week 2 and convert it to Java, if you think it is
appropriate. Be mindful that we are not talking about
homework here. Do not post homework in this or any other discussion
thread. As always, show a screen capture of the
program running.
After writing your example, please explain if you think your
example could also be written in the other conditional statement
you did not chose. Explain why you think so, or why
not.
In: Computer Science
In: Computer Science