Questions
what are some considerations for using cryptography for healthcare data?

what are some considerations for using cryptography for healthcare data?

In: Computer Science

write a simple c program to reverse pairs of characters in a string. For exaple, "notified"...

write a simple c program to reverse pairs of characters in a string. For exaple, "notified" becomes "edfitino". The reversal should be in this order in a simple easy to understand c program.

In: Computer Science

How can B2C e-commerce businesses utilize the Internet to further enhance their CRM initiatives? How can...

How can B2C e-commerce businesses utilize the Internet to further enhance their CRM initiatives?

How can B2B e-commerce businesses utilize the Internet to further enhance their CRM initiatives?

In: Computer Science

Three employees in a company are selected for a pay increase. You are given a file...

Three employees in a company are selected for a pay increase. You are given a file (salaries.txt) that contains three lines. Each line in the file consists of an employee’s last name, first name, current salary, and percent pay increase. For example, in the first line, the last name of the employee is Miller, the first name is Andrew, the current salary is 65789.87 and the pay increase is 5%. Write a program that reads data from the file and stores the output in another file. The output data must be in the following format: FirstNameInitial lastName updatedSalary Format the output of decimal number to two decimal places. For example, the first line in the output may look like the following: A. Miller 69079.36 I want help to solve it on netbeans


java programing language

In: Computer Science

Create an “About Me” HTML webpage. Use the <h2> Tag to give the page a header...

Create an “About Me” HTML webpage.

Use the <h2> Tag to give the page a header with your Full name. The header needs to be in Plum color(Any color other than black, blue – Make the page look good).

The webpage should have a background color that compliments the header color.

Set the content(Anything about yourself!) of the page inside <p> tags and use a different color for it.

Save your file as “AboutMe.html” and upload the file to BB under Exercises/Assignments.

Be as creative as possible !

can you please send me all the codes accordingly so i can use it and for the name and content just use john doe and i'll change accordingly thank you

In: Computer Science

The following VHDL code has errors and is not working in Umhdl. please solve the errors...

The following VHDL code has errors and is not working in Umhdl. please solve the errors for the following code and rewrite the code here and show the output.

The code:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.std_logic_unsigned.all;
entity Car_Parking_System_VHDL is
port 
(
  clk,reset_n: in std_logic; -- clock and reset of the car parking system
  front_sensor, back_sensor: in std_logic; -- two sensor in front and behind the gate of the car parking system
  password_1, password_2: in std_logic_vector(1 downto 0); -- input password 
  GREEN_LED,RED_LED: out std_logic; -- signaling LEDs
  HEX_1, HEX_2: out std_logic_vector(6 downto 0) -- 7-segment Display 
);
end Car_Parking_System_VHDL;

architecture Behavioral of Car_Parking_System_VHDL is
-- FSM States
type FSM_States is (IDLE,WAIT_PASSWORD,WRONG_PASS,RIGHT_PASS,STOP);
signal current_state,next_state: FSM_States;
signal counter_wait: std_logic_vector(31 downto 0);
signal red_tmp, green_tmp: std_logic;

begin
-- Sequential circuits
process(clk,reset_n)
begin
 if(reset_n='0') then
  current_state <= IDLE;
 elsif(rising_edge(clk)) then
  current_state <= next_state;
 end if;
end process;
-- combinational logic

process(current_state,front_sensor,password_1,password_2,back_sensor,counter_wait)
 begin
 case current_state is 
 when IDLE =>
 if(front_sensor = '1') then -- if the front sensor is on,
 -- there is a car going to the gate
  next_state <= WAIT_PASSWORD;-- wait for password
 else
  next_state <= IDLE;
 end if;
 when WAIT_PASSWORD =>
 if(counter_wait <= x"00000003") then
  next_state <= WAIT_PASSWORD;
 else -- check password after 4 clock cycles
 if((password_1="01")and(password_2="10")) then
 next_state <= RIGHT_PASS; -- if password is correct, let them in
 else
 next_state <= WRONG_PASS; -- if not, tell them wrong pass by blinking Green LED
 -- let them input the password again
 end if;
 end if;
 when WRONG_PASS =>
  if((password_1="01")and(password_2="10")) then
 next_state <= RIGHT_PASS;-- if password is correct, let them in
  else
 next_state <= WRONG_PASS;-- if not, they cannot get in until the password is right
  end if;
 when RIGHT_PASS =>
  if(front_sensor='1' and back_sensor = '1') then
 next_state <= STOP; 
 -- if the gate is opening for the current car, and the next car come, 
 -- STOP the next car and require password
 -- the current car going into the car park
  elsif(back_sensor= '1') then
   -- if the current car passed the gate an going into the car park
   -- and there is no next car, go to IDLE
 next_state <= IDLE;
  else
 next_state <= RIGHT_PASS;
  end if;
when STOP =>
  if((password_1="01")and(password_2="10"))then
  -- check password of the next car
  -- if the pass is correct, let them in
 next_state <= RIGHT_PASS;
  else
 next_state <= STOP;
  end if;
 when others => next_state <= IDLE;
 end case;
 end process;
 -- wait for password
process(clk,reset_n)
 begin
 if(reset_n='0') then
 counter_wait <= (others => '0');
 elsif(rising_edge(clk))then
  if(current_state=WAIT_PASSWORD)then
  counter_wait <= counter_wait + x"00000001";
  else 
  counter_wait <= (others => '0');
  end if;
 end if;
 end process;
 -- output 
 process(clk) -- change this clock to change the LED blinking period
 begin
 if(rising_edge(clk)) then
 case(current_state) is
 when IDLE => 
 green_tmp <= '0';
 red_tmp <= '0';
 HEX_1 <= "1111111"; -- off
 HEX_2 <= "1111111"; -- off
 when WAIT_PASSWORD =>
 green_tmp <= '0';
 red_tmp <= '1'; 
 -- RED LED turn on and Display 7-segment LED as EN to let the car know they need to input password
 HEX_1 <= "0000110"; -- E 
 HEX_2 <= "0101011"; -- n 
 when WRONG_PASS =>
 green_tmp <= '0'; -- if password is wrong, RED LED blinking 
 red_tmp <= not red_tmp;
 HEX_1 <= "0000110"; -- E
 HEX_2 <= "0000110"; -- E 
 when RIGHT_PASS =>
 green_tmp <= not green_tmp;
 red_tmp <= '0'; -- if password is correct, GREEN LED blinking
 HEX_1 <= "0000010"; -- 6
 HEX_2 <= "1000000"; -- 0 
 when STOP =>
 green_tmp <= '0';
 red_tmp <= not red_tmp; -- Stop the next car and RED LED blinking
 HEX_1 <= "0010010"; -- 5
 HEX_2 <= "0001100"; -- P 
 when others => 
 green_tmp <= '0';
 red_tmp <= '0';
 HEX_1 <= "1111111"; -- off
 HEX_2 <= "1111111"; -- off
  end case;
 end if;
 end process;
  RED_LED <= red_tmp  ;

VHDL testbench code:

LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
 
ENTITY tb_car_parking_system_VHDL IS
END tb_car_parking_system_VHDL;
 
ARCHITECTURE behavior OF tb_car_parking_system_VHDL IS 
 
    -- Component Declaration for the car parking system in VHDL
 
    COMPONENT Car_Parking_System_VHDL
    PORT(
         clk : IN  std_logic;
         reset_n : IN  std_logic;
         front_sensor : IN  std_logic;
         back_sensor : IN  std_logic;
         password_1 : IN  std_logic_vector(1 downto 0);
         password_2 : IN  std_logic_vector(1 downto 0);
         GREEN_LED : OUT  std_logic;
         RED_LED : OUT  std_logic;
         HEX_1 : OUT  std_logic_vector(6 downto 0);
         HEX_2 : OUT  std_logic_vector(6 downto 0)
        );
    END COMPONENT;
    

   --Inputs
   signal clk : std_logic := '0';
   signal reset_n : std_logic := '0';
   signal front_sensor : std_logic := '0';
   signal back_sensor : std_logic := '0';
   signal password_1 : std_logic_vector(1 downto 0) := (others => '0');
   signal password_2 : std_logic_vector(1 downto 0) := (others => '0');

  --Outputs
   signal GREEN_LED : std_logic;
   signal RED_LED : std_logic;
   signal HEX_1 : std_logic_vector(6 downto 0);
   signal HEX_2 : std_logic_vector(6 downto 0);

   -- Clock period definitions
   constant clk_period : time := 10 ns;
 
BEGIN
 
 -- Instantiate the car parking system in VHDL
   Car_park_system: Car_Parking_System_VHDL PORT MAP (
          clk => clk,
          reset_n => reset_n,
          front_sensor => front_sensor,
          back_sensor => back_sensor,
          password_1 => password_1,
          password_2 => password_2,
          GREEN_LED => GREEN_LED,
          RED_LED => RED_LED,
          HEX_1 => HEX_1,
          HEX_2 => HEX_2
        );

   -- Clock process definitions
   clk_process :process
   begin
  clk <= '0';
  wait for clk_period/2;
  clk <= '1';
  wait for clk_period/2;
   end process;
   -- Stimulus process
   stim_proc: process
   begin  
      reset_n <= '0';
  front_sensor <= '0';
  back_sensor <= '0';
  password_1 <= "00";
  password_2 <= "00";
      wait for clk_period*10;
  reset_n <= '1';
  wait for clk_period*10;
  front_sensor <= '1';
  wait for clk_period*10;
  password_1 <= "01";
  password_2 <= "10";
  wait until HEX_1 = "0000010";
  password_1 <= "00";
  password_2 <= "00";
  back_sensor <= '1';
  wait until HEX_1 = "0010010"; -- stop the next car and require password
  password_1 <= "01";
  password_2 <= "10";
  front_sensor <= '0';
  wait until HEX_1 = "0000010";
  password_1 <= "00";
  password_2 <= "00";
  back_sensor <= '1';
  wait until HEX_1 = "1111111";
  back_sensor <= '0';
      -- insert your stimulus here 

      wait;
   end process;

END;

In: Computer Science

IN C++ PLEASE: (1) Extend the ItemToPurchase class per the following specifications: Parameterized constructor to assign...

IN C++ PLEASE:

(1) Extend the ItemToPurchase class per the following specifications:

  • Parameterized constructor to assign item name, item description, item price, and item quantity (default values of 0).
  • Public member functions
    • SetDescription() mutator & GetDescription() accessor
    • PrintItemDescription() - Outputs the item name and description in the format name: description
  • Private data members
    • string itemDescription - Initialized in default constructor to "none"

(2) Create three new files:

  • ShoppingCart.h - Class declaration
  • ShoppingCart.cpp - Class definition
  • main.cpp - main() function (Note: main()'s functionality differs from checkpoint A)

Build the ShoppingCart class with the following specifications. Note: Some can be function stubs (empty functions) initially, to be completed in later steps.

  • Default constructor
  • Parameterized constructor which takes the customer name and date as parameters
  • Private data members
    • string customerName - Initialized in default constructor to "none"
    • string currentDate - Initialized in default constructor to "January 1, 2016"
    • vector < ItemToPurchase > cartItems
  • Public member functions
    • GetCustomerName() accessor
    • GetDate() accessor
    • AddItem()
      • Has parameter ItemToPurchase. Does not return anything.
      • Adds the item to cartItems vector as long as the quantity is not zero.
    • IsItemInCart()
      • Has a string (an item's name) parameter. Checks if that item is in cart. If so, returns True else False.
      • Has an integer parameter passed by reference. If the item exists, populates it with index in cartItems vector. ((I ESPECIALLY NEED HELP WITH THIS PART PLEASE)))
    • RemoveItem()
      • Removes item from cartItems vector. Has a string (an item's name) parameter. Does not return anything.
      • If item name cannot be found, output this message: Item not found in cart. Nothing removed.
    • ModifyItem()
      • Modifies an item's description, price, and/or quantity. Has parameter ItemToPurchase with updated data members. Does not return anything.
      • If item can be found (by name) in the cart, check if the input parameter has default values for data members: description, price, and quantity. If not, modify that data member of the item in cart.
      • If item cannot be found (by name) in cart, output this message: Item not found in cart. Nothing modified.
    • GetNumItemsInCart()
      • Returns quantity of all items in cart. Has no parameters.
    • GetCostOfCart()
      • Determines and returns the total cost of items in cart. Has no parameters.
    • PrintTotal()
      • Outputs total of objects in cart.
      • If cart is empty, output this message: SHOPPING CART IS EMPTY
    • PrintDescriptions()
      • Outputs each item's description.

In: Computer Science

How might you test for possible interface misunderstanding in software? Here “interface misunderstanding" refers to calling...

How might you test for possible interface misunderstanding in software? Here “interface misunderstanding" refers to calling functions on an interface with the correct function signatures but with incorrect intent.

pls state what u need. the question is pretty straight forward.

In: Computer Science

How to write a quick sort using just one recursive call in Java?

How to write a quick sort using just one recursive call in Java?

In: Computer Science

python . The two csv files will contain lines in the following format: Angle, time, speed...

python .

The two csv files will contain lines in the following format: Angle, time, speed - where each action will be specified as:
• A, t, s = Move at an angle of A degrees with respect to East direction (positive horizontal axis) for t seconds with speed s meters per second.
  
The function should return 3 numpy arrays:
• The expected horizontal displacements for each microcar
• The expected vertical displacements for each microcar
• The expected distances travelled by each microcar

All displacements and distances are to be presented in meters and rounded to 2 decimal places for the final returned lists. Keep the data rounded to at least 10 decimal places for all intermediate computations.

please make a code ignoring cvs files

In: Computer Science

what are the most important things of Audit Policies and Event Viewer in windows?

what are the most important things of Audit Policies and Event Viewer in windows?

In: Computer Science

mySQL database question.. I have a database that has the following tables: User (Id, Name, Gender)...

mySQL database question.. I have a database that has the following tables:

User (Id, Name, Gender) Primary key = Id

Friends (Id1, Id2, Startdate) Primary key = (Id1, Id2) Foreign keys are also Id1, Id2 pointing to User(Id)

Comments (CommentId, Poster, Recipient, Text, PostDate) Primary key = (CommentId) Foreign Keys are Poster, Recipient pointing to User(Id)

I need to answer the following queries:

5. List Users who have posted comments to all female users

6. List User(s) who have received comments from the most number of users

When finding users, all I need to list is the Id of the user.

In: Computer Science

Describe how the Liskov Substitution Principle can influence the way that you might implement the Open...

Describe how the Liskov Substitution Principle can influence the way that you might implement the Open Closed Principle in software. (Describe how it might help but also how it might constrain implementations of the OCP.)

In: Computer Science

Please SOLVE EXERCISE 4.20 Programming Exercise 3.20 required you to design a PID manager that allocated...

Please SOLVE EXERCISE 4.20

Programming Exercise 3.20 required you to design a PID manager that allocated a unique process identifier to each process.

Exercise 4.20 requires you to modify your solution from Exercise 3.20 by writing a program that creates a number of threads that requested and released process identifiers. Modify your solution to Exercise 4.20 by ensuring that the data structure used to represent the availability of process identifiers is safe from race conditions. Use Pthreads mutex locks.

Please SOLVE EXERCISE 4.20

My Programming Exercise 3.20)  

package com.company;

import java.util.HashMap;

/*

dip manager manages process identifiers, which are unique.

Several active processes can not have same pid.

It creates unique pid, which is assigned to ti.

When process completes execution pid is returned to pdd manager.

pdd manager reassigns this pid.

--first method:

  creates and initializes the map in order to maintain the list of available pids.

--second method:

  finds next avialable pid and assigns them to active processes

--third method:

  releases old identifiers by making them available again for new processes.

*/

public class PID_MAP {

    /*

    Variables that will specify the range of pid values

    basically it says that process identifiers are constant

    integers (final key word) between 300 and 500.

    */

    public static final Integer MIN_PID = 300;

    public static final Integer MAX_PID = 5000;

    /*

    variables that identify availability of a particular process identifier

    with 0 being available and 1 being currently in use

    */

    public Integer available = 0;

    public Integer notAvailable = 1;

    /*

    I decided to use hash map data structure named PID_map to represent the availability of process identifiers with Key/Value principle

     */

    public HashMap PID_map;

    /*

     int allocate_map(void) - Creates and initializes a data structure for representing pids; returns -1 if unsuccessful and 1 if successful

     This method allocates a hash map of possible pid-s.

     The map has Key/Value principle.

     Key is an Integer, Value is "available (0) /not available (1)" for allocation to an active process.

     */

    public int allocate_map(){

        //allocated map for certain capacity

        PID_map = new HashMap(MAX_PID - MIN_PID + 1); //checks if system has enough resources to allocate a map of the capacity mentioned above

        if(true) {

            for (int i = MIN_PID; i <= MAX_PID; i++) {

                PID_map.put(i, available); //values for all the keys are set to 0, because non of the process will be active if I do not allocate the map first.

            }

        }

        else {

            return -1; //if returns integer "-1" means hash map did not created, initialized and allocated successfully.

        }

        return 1; //if returns integer "1" means hash map successfully created, initialized and allocated.

    }

    /*Process Synchronization means sharing system resources by processes in a such a way that, Concurrent access to shared data is handled thereby minimizing

    the chance of inconsistent data. Thats why we use key word Synchronized.

    */

    /*

    int allocate_pid(void) - Allocates and returns a pid; returns -1 if if unable to allocate a pid (all pids are in use)

     */

    public int allocate_pid(){

        for (Integer i = MIN_PID; i <= MAX_PID; i++){ //traverses through the map to find available pid

            if (PID_map.get(i).equals(available)){ //once the available process identifier is found

                PID_map.put(i,notAvailable); //the process identifier is updated from avialeble to unavialable

                return i; //returns the "new unavailable pid"

            }

        }

        return -1; //returs -1 if all process identifiers are in use.

    }

    /*

    void release_pid(int_pid) - Releases a pid.

     */

    public void release_pid(Integer k){ // method releases used process identifier which is passes as parameter-Integer K

        if(k > MAX_PID || k < MIN_PID){ //double checks if Pid is valid

            System.out.println("Error! not valid identifier"); //if not system notifies that its invalid process identifier

        }

        PID_map.put(k,available); //if it is valid pid, it becomes released and the pid can be used by another process. It is set to available (0)

    }

}

/*

DELETED key word SYNCHRONIZED for acllocate_pid() and release_pid() functions

*/

In: Computer Science

Write a program that will search through an array and check to see if the first...

Write a program that will search through an array and check to see if the first number in the array occurs more than once. If the first number occurs more than once, return true. Otherwise, return false. If the array is empty, return false?

You will need to use a variable, loop, and if statement.

In: Computer Science