Questions
1. Obtain the 1’s complement, 2’s complement and sign magnitude system representation in 7 bits for...

1. Obtain the 1’s complement, 2’s complement and sign magnitude system representation in 7 bits for the following decimal numbers:

a) 1510

b) -2110

c) 3510

d) -2710

2. Use 1’s and 2’s complement system to perform the following calculations and mention if
there will be overflow or not:
a) 1100 – 0101
b) 1010 + 0100
c) 01100 + 00111

In: Computer Science

1. For each of the following, write a single SELECT query against the TSQLV4 database that...

1. For each of the following, write a single SELECT query against the TSQLV4 database that returns the result set described. Each of these queries involves two tables and can be written using a join operation.

a. One row for each order shipped to France or Germany, showing the order ID, the last name of the employee for the order, and the customer ID for the order.

b. One row for each employee who handled orders to Belgium, showing the employee’s initials (for example, for an employee named Yael Peled, this would be YP) and the number of orders that employee handled that were shipped to Belgium.

c. Same as part b., but include a row for every employee in the HR.Employees table, even if they did not handle any orders shipped to Belgium. (The number of orders for such an employee should be 0.)

In: Computer Science

Python 3 question Suppose that a directed and weighted graph represented as vertex-list, how could it...

Python 3 question

Suppose that a directed and weighted graph represented as vertex-list, how could it perform uniform cost search by using priority queue?

In: Computer Science

Submit a java file. Write a program where you input 4 numbers and the output generates...

Submit a java file. Write a program where you input 4 numbers and the output generates the average of the 4 numbers. The output may not be negative and <= 100. If any value is negative or >100, it should be replaced by the value of 30. For all such values, you will replace them with a value of 10. The program should produce the following output:

Today's average amount is: $xx.xx. 

In: Computer Science

Subject: Computer Networks Chapter:packets 2.0. Suppose the path from A to B has a single switch...

Subject: Computer Networks

Chapter:packets

2.0. Suppose the path from A to B has a single switch S in between: A───S───B. Each link has a propagation delay of 60 µsec and a bandwidth of 2 bytes/µsec.

(a). How long would it take to send a single 600-byte packet from A to B?

(b). How long would it take to send two back-to-back 300-byte packets from A to B?

(c). How long would it take to send three back-to-back 200-byte packets from A to B?

If there is a diagram please draw the diagram

In: Computer Science

Your network employs basic authentication that centers on usernames and passwords. However, you have two ongoing...

Your network employs basic authentication that centers on usernames and passwords. However, you have two ongoing problems. The first is that usernames and passwords are frequently lost by negligent users. In addition, adversaries have, on occasion, fooled employees into giving up their authentication information via social engineering attacks. Discuss at least two things could you do to strengthen the use of basic username and password authentication, as discussed in the course textbook.

Your answer should be approximately 200-250 words in length.

It have to be your own words and no outside sources.

In: Computer Science

I am confused with Python I have to write a specification for an email address. In...

I am confused with Python I have to write a specification for an email address. In one string a valid email address and the other without a valid email address.

Ex:

print(text_match("My teacher’s email is [email protected]"))

print(text_match("My teacher has no email address"))

In: Computer Science

Please write simple python program with explanation Problem statement: Stock markets are venues where buyers and...

Please write simple python program with explanation

Problem statement:

Stock markets are venues where buyers and sellers of shares meet and decide on a price to trade.Eddard is very interested in trading in stock market and he started gathering information of one stock.He has projected market prices for that share over the next n months.Eddard wants to purchase and resell the share to earn profits.He is much worried about the loss that might occur so he wanted to calculate "Minimum loss" according to following rules :

1.The share cannot be sold at a price greater than or equal to the price it was purchased at(i.e. it must be resold at a loss).

2.The share cannot be resold within the same month it was purchased.

Find and print the minimum amount of money Eddard must lose if he buys the share and resells it within the next n months.

Input Format:

The first line contains an integer n,denoting the number of months of share data.

The second line contains n space separated long integers describing the respective values of p1,p2,...pn.

Constraints:

1<=n<=10^5

1<=pi<=10^16

All the market prices are distinct and valid answer exists.

Output Format:

Print a single integer denoting the minimum amount of money Eddard must lose if he buys the share and resells it within the next n months.

Sample Input1:

3

5 10 3

Sample Output1:

2

Explanation:

Eddard buys the stock in month1 at price p1=5 and sells it in month 3 at p3 for a minimal loss of 5-3 = 2 .

Sample Output2:

5

77 82 76 88 80

Sample Output2:

1

In: Computer Science

Which are more important to a successful technology troubleshooter, please answer the "why" and thoroughly explain...

Which are more important to a successful technology troubleshooter, please answer the "why" and thoroughly explain for each:

  • Good technical skills vs. good people skills? Why?
  • Good listening skills vs. good speaking skills? Why?
  • What they know vs. what they can find out? Why?

In: Computer Science

Adapt the original LinkList class to use the generic Gnode class Code for LinkList below class...

  • Adapt the original LinkList class to use the generic Gnode class

Code for LinkList below

class LinkList {
    Node llist;

    LinkList( int sz ) {
   if ( sz <= 0 ) {
       llist = null;
   }
   else {
       // start with list of size 1
       llist = new Node( "0", null ); 
       Node current = llist; // temp node for loop
       // add further nodes
       for ( int i=1; i<sz; ++i ) {
      // create node and attach it to the list
      Node node2Add = new Node( Integer.toString(i), null );
      current.setNext(node2Add);   // add first node
      current=node2Add;
       }
   }
    }
    
    /**
     * Print all the elements of the list assuming that they are Strings
     */
    public void print() {
   /* Print the list */
   Node current = llist; // point to the first node
   while (current != null) {
       System.out.print((String)current.getElement() + " ");  
       current = current.getNext(); // move to the next
   }
   System.out.println();  
    }

    public void deleteFirst() {
   if ( llist != null ) {
       llist = llist.getNext();
   }
    }

    public void deleteLast() {
   if ( llist == null ) return; // no node
   Node prev = llist;
   Node current = prev.getNext(); 
   if ( current == null ) { // only 1 node
       llist = null;
       return;
   }
   while ( current.getNext() != null ) { // more than 1 node
       prev = current;
       current = current.getNext();
   }
   prev.setNext( null );
   return;
    }

    // create and display a linked list
    public static void main(String [] args){
   /* Create the list */
   LinkList llist = new LinkList( 5 );
   /* Print the list */
   llist.print();
   /* delete first and print */
   llist.deleteFirst();
   llist.print();
   /* delete last and print 5 times */
   for ( int i=0; i< 5; ++i ) {
       llist.deleteLast();
       llist.print();
   }
    }
}

Code for GNODE below

public class GNode<E> {
  // Instance variables:
  private E element;
  private GNode<E> next;
  /** Creates a node with null references to its element and next node. */
  public GNode() {
    this(null, null);
  }
  /** Creates a node with the given element and next node. */
  public GNode(E e, GNode<E> n) {
    element = e;
    next = n;
  }
  // Accessor methods:
  public E getElement() {
    return element; 
  }
  public GNode<E> getNext() { 
    return next;
  }
  // Modifier methods:
  public void setElement(E newElem) { 
    element = newElem; 
  }
  public void setNext(GNode<E> newNext) {
    next = newNext; 
  }
}

In: Computer Science

These questions ONLY relate to the Cracking WPA What vulnerabilities were demonstrated by using aircrack-ng? What...

These questions ONLY relate to the Cracking WPA

What vulnerabilities were demonstrated by using aircrack-ng?

What vulnerabilities were demonstrated by using aircrack-ng in Wireshark?

What would you tell the server administrator to do to mitigate the vulnerability from aircrack-ng?

What would you tell the server administrator to do to mitigate the vulnerability from Wireshark?

In: Computer Science

XML 1) Create an XML schema for a catalog of cars, where each car has the...

XML

1) Create an XML schema for a catalog of cars, where each car has the child elements make, model, year, color, engine, number_of_doors, transmission_type, and accessories. The engine element has the child elements number_of_cylinders and fuel_system (carbureted or fuel injected). The accessories element has the attributes radio, air_conditioning, power_windows, power_steering, and power_brakes, each of which is required and has the possible values yes and no.

2) Create an XML document with at least three instances of the car element defined in the XML schema of previous exercise. Process this document by using the previous XML schema, and produce a display of the raw XML document. Create a CSS style sheet for the XML document and use it to override the default styles of the XML document.

In: Computer Science

Subject: Computer networks and chapter :packets 1.0. Suppose a link has a propagation delay of 20...

Subject: Computer networks and chapter :packets

1.0. Suppose a link has a propagation delay of 20 µsec and a bandwidth of 2 bytes/µsec.

(a). How long would it take to transmit a 600-byte packet over such a link?

(b). How long would it take to transmit the 600-byte packet over two such links, with a store-and-forward switch in between?

if there is a diagram please draw the diagram

In: Computer Science

Please write program in c++ with using pointer. create a function that can find the number...

Please write program in c++ with using pointer.
create a function that can find the number of even numbers that are between the maximum and minimum elements of an given array.The program have to use pointer.
example
8
-1 2 2 1 9 2 4 0
output: 2

In: Computer Science

-Using MySQL Workbench Data Modeler, create three (3) models from the tables below. Show Table 1...

-Using MySQL Workbench Data Modeler, create three (3) models from the tables below. Show Table 1 in 3rd Normal Form. Show Table 2 in 3rd Normal Form. Merge the 3rd Normal Forms of Table 1 and Table 2 into a single 3rd Normal Form model. Note that you only can model table and column names and data types. The data shown is for your reference to determine functional, partial, and transitive dependencies.
-Provide a summary of the steps you took to achieve 3rd Normal form. Include your rationale for new table creation, key selection and grouping of attributes.

Table 1 Table 2
Department ProductCode AisleNumber Price UnitofMeasure Supplier Product Cost Markup Price DeptCode
Produce 4081 1 $0.35 lb 21 – Very Veggie 4108 – tomatoes, plum $1.89 5% $1.99 PR
Produce 4027 1 $0.90 ea 32 – Fab Fruits 4081 – bananas $0.20 75% $0.35 PR
Produce 4108 1 $1.99 lb 32 – Fab Fruits 4027 – grapefruit $0.45 100% $0.90 PR
Butcher 331100 5 $1.50 lb 32 – Fab Fruits 4851 – celery $1.00 100% $2.00 PR
Butcher 331105 5 $2.40 lb 08 – Meats R Us 331100 – chicken wings $0.50 300% $1.50 BU
Butcher 332110 5 $5.00 lb 08 – Meats R Us 331105 – lean ground beef $0.60 400% $2.40 BU
Freezer 411100 6 $1.00 ea 08 – Meats R Us 332110 – boneless chicken breasts $2.50 100% $5.00 BU
Freezer 521101 6 $1.00 ea 10 – Jerry’s Juice 411100 – orange juice $0.25 400% $1.00 FR
Freezer 866503 6 $5.00 ea 10 – Jerry’s Juice 521101 – apple juice $0.25 400% $1.00 FR
Freezer 866504 6 $5.00 ea 45 – Icey Creams 866503 – vanilla ice cream $2.50 100% $5.00 FR
45 – Icey Creams 866504 – chocolate ice cream $2.50 100% $5.00 FR

In: Computer Science