The string expression strVar.____________________ starts at index pos, replaces the next n characters of strVar with all the characters of str.

Answers

Answer 1
Answer:

Answer:

strVar.replace(pos, n, str);

Explanation:

The strVar.replace() is a javascript function of searching and replacing a string for a defined value, whereby it finds and returns a new string where the defined values are replaced.

For example: to return a string where "Trump" is replaced with "Biden":

We have

var str = "Welcome Trump!";

var res = str.replace("Trump", "Biden", str);

Hence, in this case, the correct answer is strVar.replace(pos, n, str);


Related Questions

Obtain the 9’s complement of the following eight-digit decimal numbers:1234987689009951
The section on the Publisher screen that allows you to quickly move from one page another in a publication is the _____. View tabPage panePage Design tabZoom bar
99 POINTS HELP ASAP PLEASE!!!Select the mathematical statement that is true. A.22 % 2 > −3 B.22 % 2 < 5 C.22 % 2 == 4 D.22 % 2 != 1This is for my python coding class thank you
Which of the following function declarations correctly expect an array as the first argument?Question 1 options:void f1(int array, int size);void f1(int& array, int size);void f1(int array[100], int size);void f1(float array[], int size);All of the aboveC and DA and B
Write a java program that use multiple arrays This is a simple array program which does not use an "external class & demo program" If you wish, you may break it down into methods, but that is not required. a. Set up 4 arrays which hold data about 6 items you want to sell: [make them up] int[ ] itemnum int[ ] quantity double[ ] price double[ ] sales b. Set up loops to load the itemnum, quantity and price arrays c. Set up another loop to calculate values for the sales array. [= price * quantity] d. Set up another loop to print the item number and sales amount for each transaction . e. Set up another loop to calculate the total sales of all 6 items f. print the total sales amount

A customer has engaged your software development company to develop a new order-processing system. However, the time frames are very tight and inflexible for delivery of at least the basic part of the new system. Further, user requirements are sketchy and unclear. a. What is the best system development strategy that might be advantageous to use in this engagement? b. What is the potential downside to using the strategy described in the part a?

Answers

Sorry b. Not answered. Thanks. Rate it if this helps.

3. Problem 5. A digital computer has a memory unit with 24 bits per word. The instruction set consists of 150 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory. a. How many bits are needed for the opcode? b. How many bits are left for the address part of the instruction? c. What is the maximum allowable size for memory? d. What is the largest unsigned binary number that can be accommodated in one word of memory?

Answers

The number of bits that are needed for this operation code (opcode) is 8 bits.

What is binary encoding?

Binary encoding can be defined as a standard technique that is designed and developed for converting data in plain text (source alphabets) to a form that is easily used by different operating systems (OS), especially through the use of a binary digit (bit) or two-symbol system.

How to calculate the number of bits.

The number of bits that are needed for this operation code (opcode) is given by this mathematical expression:

2^n > 150\n\n2^8 > 150\n\n256 > 150

n = 8 bits.

b. To determine the number of bits that are left for the address part of the instruction:

  • Opcode, O, I = 8 bits.
  • Instruction size = 24 bits.

Address = I-O\n\nAddress =24-8

Address = 16 bits.

c. To determine the maximum allowable size for memory:

Based on the memory unit, this is given by 2^(16)* 24

d. The largest unsigned binary number that can be accommodated in one word of memory is given by: 2^(24)-1

Read more on binary encoding here: brainly.com/question/5381889

Answer:

a) 8 bits b) 16 bits. c) 2¹⁶ * 24 bits d) 2²⁴ -1

Explanation:

a) In order to be able to accommodate 150 different instructions, the number of bits needed must be equal to the minimum power of 2 that satisfies this equation:

2n > 150, i.e. n=8.  

b) If the total number of bits for a word is 24, and 8 are used for the op code, there are 16 bits left for the address part.

c) If the address part has 16 bits, this means that the total addressable space is just 2¹⁶, so the maximum allowable size is 2¹⁶ * 24 bits.

d) As we have 24 bits to be filled, the largest unsigned binary number is just 2²⁴ – 1.

(As we need to leave a position for all zeros).

Create a Produceclass that hasan instance variable of type Stringfor the name, appropriate constructors, appropriate accessor and mutator methods, and a public toString() method. Then create a Fruitand a Vegetableclass that are derived from Produce. These classes should have constructors that take the nameas a Stringand invoke the appropriate constructor from the base class to set the name.Also, they should override toStringmethod to display the nameof the produce and its type. For instance, Mangois a Fruitand Caulifloweris a Vegetable. Finally, create a class called TruckOfProducethat will keep track of the boxes of Vegetablesand Fruitsadded in to the truck. This class should use an array of Produceto store both Vegetableand Fruitobjects.

Answers

Answer:

you suck

Explanation:

A majority of the people whose information was compromised are homeless; therefore there is no easy way to contact them in order to alert them of the security breach. How should Data-Time Inc. manage this breach in security

Answers

Incomplete question. Here's the full question:

Data-Time Inc. is a company that manages databases for a large city in Colorado. Included in these databases is information collected from the city’s homeless shelters and free clinics. Specifically, the databases contain personal information of the users of these services over the past 10 years; this includes people’s Social Security numbers and health records.

This data is highly secure and only accessible to the employees of Data-Time Inc. Employees are given a laptop when they are hired which allows them to access the database remotely. Unfortunately, one of these laptops is stolen and the security of the database is compromised.

A majority of the people whose information was compromised are homeless; therefore there is no easy way to contact them in order to alert them of the security breach. How should Data-Time Inc. manage this breach in security?

Explanation:

Since the emphasis is not on reversing the breach that has occurred, but on managing the level of security damage that could occur, it is important measures are directed towards preventing unauthorized access to sensitive information.

For example, the Media Access Control Address (MAC address) of the laptop if known could be greylisted from accessing the server that contains the sensitive information.

The Spanning Tree Protocol operates at the Network layer of the OSI model.True

False

Answers

Answer:

False

Explanation:

The Spanning Tree Protocol operates at the Data link layer of the OSI model.

Spanning Tree Protocol (STP) is a bridge and switch (Layer 2 protocol). The STP specification is IEEE 802.1D. STP's primary aim is to guarantee that when you have redundant routes in your network, you do not generate loops. Loops to a network are fatal.

Presently we can solve problem instances of size 30 in 1 minute using algorithm A, which is a algorithm. On the other hand, we will soon have to solve probleminstances twice this large in 1 minute. Do you think it would help to buy a faster( and more expensive) computer?

Answers

Answer:

No, if the algorithm is properly written to solve problems with minimal resources like RAM and processor speed.

Explanation:

Rather than buy a faster or more expensive computer simply upgrade the RAM else you may have to buy new computer each the size of problem instances increases.