answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Hatshy [7]
1 year ago
11

12) Suppose you wanted a subroutine to return to an address that was 3 bytes higher in memory than the return address currently

on the stack. Write a sequence of instructions that would be inserted just before the subroutine’s RET instruction that accomplish this task.
Computers and Technology
1 answer:
Snezhnost [94]1 year ago
8 0

Answer:

.code

main proc

mov ecx,ebp

mov ecx, 787878

push ecx

call MySe7en

invoke ExitProcess,0

main endp

MySe7en PROC

pop ecx

sub ecx, 3

mov

push ecx

ret

end main

You might be interested in
B.) Define latency and jitter for service flow in a fixed wireless system.
yuradex [85]
The answer would be between the base station and the subscriber station.
7 0
2 years ago
Instead of sending an entire file in one big chunk across the​ Internet, __________ is used which dices the file up into little
azamat

Answer:

TCP/IP

Explanation:

TCP/IP which stands for Transmission Control Protocol and Internet Protocol are network protocols which divide your message into smaller chunks or fragments known as network packets and sends them out onto the Internet. When the chunks arrive at the intended destination, TCP/IP on the receiving end reassembles the network packets into the original message.

TCP/IP are the main protocols used for sending data over the internet.

7 0
1 year ago
Problem 2 - K-Best Values - 30 points Find the k-best (i.e. largest) values in a set of data. Assume you are given a sequence of
masya89 [10]

Answer:

See explaination

Explanation:

/**KBestCounter.java**/

import java.util.ArrayList;

import java.util.List;

import java.util.PriorityQueue;

public class KBestCounter<T extends Comparable<? super T>>

{

PriorityQueue heap;

int k;

public KBestCounter(int k)

{

heap = new PriorityQueue < Integer > ();

this.k=k;

}

//Inserts an element into heap.

//also takes O(log k) worst time to insert an element

//into a heap of size k.

public void count(T x)

{

//Always the heap has not more than k elements

if(heap.size()<k)

{

heap.add(x);

}

//if already has k elements, then compare the new element

//with the minimum element. if the new element is greater than the

//Minimum element, remove the minimum element and insert the new element

//otherwise, don't insert the new element.

else if ( (x.compareTo((T) heap.peek()) > 0 ) && heap.size()==k)

{

heap.remove();

heap.add(x);

}

}

//Returns a list of the k largest elements( in descending order)

public List kbest()

{

List al = new ArrayList();

int heapSize=heap.size();

//runs O(k)

for(int i=0;i<heapSize;i++)

{

al.add(0,heap.poll());

}

//Restoring the the priority queue.

//runs in O(k log k) time

for(int j=0;j<al.size();j++) //repeats k times

{

heap.add(al.get(j)); //takes O(log k) in worst case

}

return al;

}

}

public class TestKBest

{

public static void main(String[] args)

{

int k = 5;

KBestCounter<Integer> counter = new KBestCounter<>(k);

System.out.println("Inserting 1,2,3.");

for(int i = 1; i<=3; i++)

counter.count(i);

System.out.println("5-best should be [3,2,1]: "+counter.kbest());

counter.count(2);

System.out.println("Inserting another 2.");

System.out.println("5-best should be [3,2,2,1]: "+counter.kbest());

System.out.println("Inserting 4..99.");

for (int i = 4; i < 100; i++)

counter.count(i);

System.out.println("5-best should be [99,98,97,96,95]: " + counter.kbest());

System.out.println("Inserting 100, 20, 101.");

counter.count(100);

counter.count(20);

counter.count(101);

System.out.println("5-best should be [101,100,99,98,97]: " + counter.kbest());

}

}

5 0
2 years ago
Write the addReview method, which adds a single product review, represented by a ProductReview object, to the ReviewCollector ob
Allisa [31]

Answer:

{

private String name;

private String review;

/** Constructs a ProductReview object and initializes the instance variables. */

public ProductReview(String pName, String pReview)

{

name = pName;

review = pReview;

}

/** Returns the name of the product. */

public String getName()

{ return name; }

/** Returns the review of the product. */

public String getReview()

{ return review; }

}

The ReviewCollector class, shown below, is used to represent a collection of reviews to be analyzed.

public class ReviewCollector

{

private ArrayList<ProductReview> reviewList;

private ArrayList<String> productList;

/** Constructs a ReviewCollector object and initializes the instance variables. */

public ReviewCollector()

{

reviewList = new ArrayList<ProductReview>();

productList = new ArrayList<String>();

}

/** Adds a new review to the collection of reviews, as described in part (a). */

public void addReview(ProductReview prodReview)

{ /* to be implemented in part (a) */ }

/** Returns the number of good reviews for a given product name, as described in part (b). */

public int getNumGoodReviews(String prodName)

{ /* to be implemented in part (b) */ }

// There may be instance variables, constructors, and methods not shown.

}

6 0
2 years ago
Please help, Tech class!!
IRISSAK [1]

Answer:

Explanation:

1=A

2=A

3=A

4=True

5=A

6=D

7=D

8=B

9=True

10=C

3 0
1 year ago
Other questions:
  • As an information user you should be skeptical of
    7·1 answer
  • Which of the following attributes of a website indicates a more reliable source for information?
    15·1 answer
  • Discuss how the user-designer communications gap can cause a good project to go bad.
    8·1 answer
  • What are threats to computer system
    6·1 answer
  • Write a function named "list_concat" that takes a list of strings as a parameter and returns the concatenation of all the values
    13·1 answer
  • In mathematics, the notation n! represents the factorial of the nonnegative integer n. The factorial of n is the product of all
    7·1 answer
  • When an author produce an index for his or her book, the first step in this process is to decide which words should go into the
    8·1 answer
  • 1.2.2: Output variable value. Jump to level 1 Write a statement that outputs variable userAge. End with a newline. 1 2 3 4 5 6 7
    12·1 answer
  • __________ access control is a form of __________ access control in which users are assigned a matrix of authorizations for part
    8·1 answer
  • Use the single-server drive-up bank teller operation referred to in Problems 1 and 2 to determine the following operating charac
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!