Questions
1. How are a buffer and a NOT gate similar? 2. How are a buffer and...

1. How are a buffer and a NOT gate similar?

2. How are a buffer and a NOT gate different?

3. When interfacing an Arduino output to a higher voltage, explain how a buffer could be used.

4. What diagram do we use to code the AND function?

5. What diagram do we use to code the OR function?

6. Draw the international diagram for an AND gate.

7. Draw the international diagram for an OR gate.

8. Draw, the truth table for a 3 input AND gate, including the output.

9. Draw the truth table for a 3 input OR gate, including the output.

10. When does 1 + 1 = 1?

In: Computer Science

Cybersecuirty Describe the different types of firewalls that are on the market and how they differ...

Cybersecuirty

Describe the different types of firewalls that are on the market and how they differ from one another. Please write one paragraph fully explaining.

In: Computer Science

Submission Guidelines This assignment may be submitted for full credit until Friday, October 4th at 11:59pm....

Submission Guidelines

This assignment may be submitted for full credit until Friday, October 4th at 11:59pm. Late submissions will be accepted for one week past the regular submission deadline but will receive a 20pt penalty. Submit your work as a single HTML file. It is strongly recommended to submit your assignment early, in case problems arise with the submission process.

Assignment

For this assignment, you will write a timer application in HTML and JavaScript.

Your HTML document should contain the following elements/features:

  1. HTML tags:
    1. An <input> tag labeled "Timer Duration" with the initial value 0
    2. A <button> tag labeled "Start"
  2. Script: When the user presses the button (1b), a function will begin that does the following:
    1. Reads the value from the input field (1a)
    2. Removes the <input> and <button> tags (1a & 1b)
    3. Creates a new <p> tag, initialized to show the input value
    4. Starts a timer that ticks down to zero. For every second that elapses, the paragraph tag (2c) will show the updated timer value (i.e., one less)
    5. When the timer reaches zero, the countdown will stop and the paragraph tag (2c) will be removed and be replaced by a <button> tag labeled "New Timer"
    6. When the <button> tag (2e) is pressed, it will be removed and the <input> and <button> tags (1a, 1b) will be recreated with their original formats

Evaluation

Your assignment will be graded according to whether all the required elements are present and in the correct formats and all required functionalities are operable.

In: Computer Science

Need to program a maze traversal program using dynamic array and stacks. The problem is faced...

Need to program a maze traversal program using dynamic array and stacks. The problem is faced in setting up the data structure and due the problem in setting the data structure other functions like moving in all direction, marking the current cell that is visited are showing the error.

The work so far is below:

const int R = 5; //Number of rows
const int C = 5; //Number of columns

class coordinate
{
public:
int v;
int h;
};

class stack
{
public:
coordinate x;
coordinate y;
};

The maze looks like:

# # S _ #

_ _ _ # #

_ # # _ #

_ _ # # #

_ _ _ _ G

where S = starting point, G = end point, _ = space for moving around and # = wall

In: Computer Science

Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Follow...

Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Follow each number by a space. Example output for userNum = 40:

20 10 5 2 1

In java

import java.util.Scanner;

public class DivideByTwoLoop {
public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
int userNum;

userNum = scnr.nextInt();

*insert code*

System.out.println("");
}
}

In: Computer Science

Question 1 Discuss the key functions of an operating system, and how these functions make it...

Question 1

Discuss the key functions of an operating system, and how these functions make it possible for computer applications to effectively utilize computer system resources.

Compare and contrast the Windows API and the POSIX API and briefly explain how these APIs can be applied in systems programming.

Write a C/C++ program to create a file in a specified folder of the Windows file system, and write some text to the file. Compile and run the program and copy the source code into your answer booklet.

In: Computer Science

PLEASE MODIFY CODE IN JAVA In-line comments denote your changes and briefly describe the functionality of...

PLEASE MODIFY CODE IN JAVA
In-line comments denote your changes and briefly describe the functionality of each method or element of the class
Appropriate variable and method naming conventions are used throughout your code.
modify the Driver.java class file to do the following:
Implement the method you have chosen
Add attributes, as needed, to support the required functionality
SYSTEM REQUIREMENTS-

Each dog goes through a six- to nine month training regimen before they are put into service. Part of our process is to record and track several data points about the rescue animals.

Dogs are given the status of "intake" before training starts. Once in training, they move through a set of five rigorous phases: Phase I, Phase II, Phase III, Phase IV, and Phase V. While in training, a dog is given the status of its current training phase (e.g., "Phase I"). When a dog graduates from training, it is given the status of "in service" and is eligible for use by clients. If a dog does not successfully make it through training, it is given the status of "farm," indicating that it will live a life of leisure on a Grazioso Salvare farm.

The Animals Through years of experience, we have narrowed the list of dog breeds eligible for rescue training to the following:

• American pit bull terrier

• Beagle

• Belgian Malinois

• Border collie •

Bloodhound

• Coonhound

• English springer spaniel

• German shepherd

• German shorthaired pointer

• Golden retriever

• Labrador retriever

• Nova Scotia duck tolling retriever

• Rough collie

• Smooth collie

When we acquire a dog, we record the breed, gender, age, weight, date, and the location where we obtained them. There is usually a short lag time between when we acquire a dog and when they start training, which we document as well. Additionally, we track graduation dates, dates dogs are placed into "service," and details about the dogs' in-service placement (agency, city, country, and name, email address, phone number, and mailing address for the agency's point of contact).

DRIVER JAVA CODE

public class Driver {

public static void main(String[] args) {

// Class variables

// Create New Dog

// Method to process request for a rescue animal

// Method(s) to update information on existing animals

// Method to display matrix of aninmals based on location and status/training phase

// Method to add animals

// Method to out process animals for the farm or in-service placement

// Method to display in-service animals

// Process reports from in-service agencies reporting death/retirement

}

}


im not sure what store in databse or files means. just follow the //comments on what to put

In: Computer Science

/* complete javascript file according to the individual instructions given in the comments. */ // 1)...

/* complete javascript file according to the individual instructions
given in the comments. */

// 1) Prompt the user to enter their first name. 
// Display an alert with a personal greeting for the user 
// with their first name (example: Hello, Dave!)



// 2) Create a Try code block that will cause a ReferenceError.  
// Create a Catch code block that will display the error in the  
// console with console.error() 



// 3) Prompt the user to enter a number. If the user input is 
// not a number, throw a custom error to the console and alert 
// the user. 



// Solving a Problem!
// 4) Create a function named productOf() that accepts 
// two numbers as parameters: productOf(num1,num2)
// Create a Try block in the function that checks to see if 
// num1 and num2 are numbers.
// If both parameters are numbers, return the product of 
// the two numbers: num1 * num2
// If either num1 or num2 are not numbers, throw a custom 
// error to the console and alert the user.
// After defining the function, ask the user to enter a number. 
// Then ask the user to enter a second number.
// Call the function with the values entered by the user.



// Solving a Problem!
// 5) Create a loop that counts from 1 to 20. 
// If the current number is even, add it to this empty array:
var myArray = [];
// If the current number is odd, log an odd number warning to 
// the console.
// However, if the number equals 19, set a debug breakpoint.
// After the loop completes, print the array to the console.

In: Computer Science

I am needing to initialize a server socket and wait for incoming connections in C programming....

I am needing to initialize a server socket and wait for incoming connections in C programming. I am also required to create a thread to handle my client and able to pass messages between them asynchronously. I would ideally like to start my server with pthreads to allow for multiple connections.

I have 2 functions started:

int serverRun(){

this will be the meat of the server code with sockets

}

int serverStart()

{

This is where I want to initiate the server

}

In: Computer Science

Use python 2.7 & plotly (dash) to draw bar/line graph for below data OrderedDict([('0K', 7.239253544865276), ('PK',...

Use python 2.7 & plotly (dash) to draw bar/line graph for below data

OrderedDict([('0K', 7.239253544865276), ('PK', 3.236322216916338), ('1', 6.415793586505012), ('2', 6.020145027564326), ('3', 5.658685936530415), ('4', 5.37435274038192), ('5', 5.1860079887723085), ('6', 5.035941053040876), ('7', 5.1264549715408), ('8', 5.553318856838249), ('9', 12.200551540951867), ('10', 11.195203964258715), ('11', 8.990680759944928), ('12', 12.767287811888968)])

Make sure all keys, especially the 0K & PK, are showing in the x-axis.

In: Computer Science

Please code the following, using the language java! Build a simple calculator that ignores order of...

Please code the following, using the language java!

Build a simple calculator that ignores order of operations. This “infix” calculator will read in a String from the user and calculate the results of that String from left to right. Consider the following left-to-right calculations:

"4 + 4 / 2"
"Answer is 4"   //not 6, since the addition occurs first when reading from left to right
“1 * -3 + 6 / 3”
“Answer is 1”   //and not -1Start by copying the driver code below.

Read this program and notice the comments before you proceed –your assignments in the lecture section will require you to comment accordingly, or they will drop a complete letter grade! Begin tracing the program in main, and your code will go in the calculate() function, so start writing code there. Hints:

  • Build the starter code using a snippet below.
  • Assume spaces between all numbers and operators.
  • If a number is negative (like -3), there will be no space between the sign and the number. Use Scanner and nextInt() to read each integer. Use Scanner and what operation to read a single character? (our operator?).
  • You can also use StringTokenizer to do these tasks as well.
  • Using the comments below, can you write the regular expression that would recognize this grammar?'
import ?; /*
 * InFixCalc, V0.0 (concept borrowed from Carol Zander's Infix Calculator)
 * Complete the calculate() function below to build a simple, infix
 * calculator that evaluates a compound expression from left to right,
 * regardless of operator precedence
 *
 * Example: " 1 * -3 + 6 / 3"
 * Execution: calculate 1 * -3 first, then -3 + 6 next, then 3 / 3
 * last to obtain the value 1
*
* Solution by 
*/
public class InFixCalc {
    //example pattern: "3 + 5"
    //general pattern: <lhs='3'> <operation='+'> <rhs='5'> //extended pattern:     ...  
    //special case: 
    //other special cases?

    public static void main(String[] args) { //String input = "4 + 4";
        //String input = "4 + 4 / 2";
        //String input ="1 * -3";
        String input ="1 * -3 + 6 / 3";
        //String input ="5";
        //String input ="-5";
        int answer = calculate(input);
        System.out.println("Answer is " + answer);
    }

//preconditions: all binary operations are separated via a space
//postconditions: returns the result of the processed string
    public static int calculate(String input) {
        int lhs,rhs; //short for left-hand & right-hand side
        char operation;
        /*todo: your name and code goes here*/
        /*You need a Scanner(or StringTokenizer) to get tokens
          *Then you need a loop, and switch inside that loop*/
        return lhs;
    }
}

In: Computer Science

Let’s give a formal proof that RadixSort works and give a bound on its runtime. We...

Let’s give a formal proof that RadixSort works and give a bound on its runtime.

We start with correctness:

Lemma RadixSort will properly sort any n natural numbers.
Prove this statement. You can use any strategy you want, but we recommend using induction on l (the number of digits that each value has).

In: Computer Science

Consider the following if statement, where doesSignificantWork​, ​makesBreakthrough​, and nobelPrizeCandidate​ are all boolean variables: if doesSignificantWork...

Consider the following if statement, where doesSignificantWork​, ​makesBreakthrough​, and nobelPrizeCandidate​ are all boolean variables:
if doesSignificantWork : if makesBreakthrough :
nobelPrizeCandidate = True else
nobelPrizeCandidate = False elif not doesSignificantWork:
nobelPrizeCandidate = False
(assume that ​doesSignificantWork and ​makesBreakthrough ​have been initialized, there is no error)
First, write a simpler ​if statement that is equivalent to this one. Then write a single assignment statement that does the same thing.
(Hint: Try to trace this piece of code with all possible initial values for makesBreakthrough and ​doesSignificantWork​. It helps you to understand the code and then you can simplify it and rewrite it).
CODE FOR PYTHON

In: Computer Science

CREATE TABLE campaign ( cmte_id             varchar(12), cand_id             varchar(12), cand_nm     &nbsp

CREATE TABLE campaign

(

cmte_id             varchar(12),

cand_id             varchar(12),

cand_nm             varchar(40),

contbr_nm           varchar(40),

contbr_city         varchar(40),

contbr_st           varchar(40),

contbr_zip          varchar(20),

contbr_employer     varchar(60),

contbr_occupation   varchar(40),

contb_receipt_amt   numeric(6,2),

contb_receipt_dt    varchar(20),

receipt_desc        varchar(40),

memo_cd             varchar(20),

memo_text           varchar(20),

form_tp               varchar(20),

file_num            varchar(20),

tran_id             varchar(20),

election_tp         varchar(20)

Write SQL queries using the campaign data table.

-- 4. show the candidate name and number of contributions, for each candidate

-- Order by decreasing number of contributions.

-- 5. show the candidate name and average contribution amount for each candidate,

-- looking at positive contributions only

-- Order by decreasing average contribution amount.

-- 6. show the candidate name and the total amount received by each candidate.

-- Order the output by total amount received.

In: Computer Science

Python Explain what happens when a user clicks a command button in a fully functioning GUI...

Python

Explain what happens when a user clicks a command button in a fully functioning GUI program.

In: Computer Science