1answer.
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
Neko [114]
2 years ago
7

If a TextView has not been displayed yet, it is possible to retrieve measurements about its width and height using the _________

_________ method.
Computers and Technology
1 answer:
Illusion [34]2 years ago
6 0
What language are we talking about here? What platform? Android? Web? Kotlin?
You might be interested in
Please help me on this coding problem :)
Vesnalui [34]

Answer:

a=4 , b=1

Explanation:

I'm not a computer science major at all but I think I can help you with this code.

Our program wants us to add 2 to a get new a value while also subtracting 1 from b value to obtain new b value. We we want to for for as long b is not 0 and a/b is nonnegative.

One round we get:

New a=0+2=2

New b=3-1=2

Let's see if we can go another round:

New a=2+2=4

New b=2-1=1

We can't go another round because b would be negative while a is positive which would make a/b negative. So our loop stops at this 2nd round.

a=4 , b=1

Other notes:

2nd choice makes no sense because a is always going to increase because of the addition on a and b was going to decrease because of the subtraction on it.

Third choice makes no sense because a/b doesn't even exist.

Fourth choice a/b is negative not nonnegative.

4 0
3 years ago
Suppose you have two arrays of ints, arr1 and arr2, each containing ints that are sorted in ascending order. Write a static meth
telo118 [61]
Since both arrays are already sorted, that means that the first int of one of the arrays will be smaller than all the ints that come after it in the same array. We also know that if the first int of arr1 is smaller than the first int of arr2, then by the same logic, the first int of arr1 is smaller than all the ints in arr2 since arr2 is also sorted.

public static int[] merge(int[] arr1, int[] arr2) {
int i = 0; //current index of arr1
int j = 0; //current index of arr2
int[] result = new int[arr1.length+arr2.length]
while(i < arr1.length && j < arr2.length) {
result[i+j] = Math.min(arr1[i], arr2[j]);
if(arr1[i] < arr2[j]) {
i++;
} else {
j++;
}
}
boolean isArr1 = i+1 < arr1.length;
for(int index = isArr1 ? i : j; index < isArr1 ? arr1.length : arr2.length; index++) {
result[i+j+index] = isArr1 ? arr1[index] : arr2[index]
}
return result;
}


So this implementation is kind of confusing, but it's the first way I thought to do it so I ran with it. There is probably an easier way, but that's the beauty of programming.

A quick explanation:

We first loop through the arrays comparing the first elements of each array, adding whichever is the smallest to the result array. Each time we do so, we increment the index value (i or j) for the array that had the smaller number. Now the next time we are comparing the NEXT element in that array to the PREVIOUS element of the other array. We do this until we reach the end of either arr1 or arr2 so that we don't get an out of bounds exception.

The second step in our method is to tack on the remaining integers to the resulting array. We need to do this because when we reach the end of one array, there will still be at least one more integer in the other array. The boolean isArr1 is telling us whether arr1 is the array with leftovers. If so, we loop through the remaining indices of arr1 and add them to the result. Otherwise, we do the same for arr2. All of this is done using ternary operations to determine which array to use, but if we wanted to we could split the code into two for loops using an if statement.


4 0
3 years ago
What did the strict study generally find about the effect of internet use on sleep?
rjkz [21]
A. should be the answer hope this helps :)
4 0
3 years ago
Read 2 more answers
What refers to the protocolâ s ability to ensure that data hasnâ t been modified in any way?
Tamiku [17]

Answer:

Option (b) Integrity

Explanation:

  • Data Integrity refers to the data which is not modified over the process, system.
  • Data Integrity here refers to which is not corrupted over the system in any way.
  • Throughout the life cycle of the process, system the data is intact and can be trusted for the future use.So, option (b) Integrity is the correct option.
  • Option (a) Confidentiality means the data that is kept secret, private but that doesn't mean it is not modified. So, option (a) confidentiality is wrong option.
  • Option (c) Authentication means the user is authenticated to use the data. It means the user has access to the data or not.So, option (c) is wrong option.
  • Option (d) Auditing means to examine, inspect a thing to find it fit for a purpose. Here, data auditing means verifying, inspecting,assessing the quality of data for a process.So, option (d) is wrong option.
3 0
3 years ago
On which tab are import and export commands located in Access? A. Home B. Database Tools C. External Data D. Create
Ann [662]

Answer:

C. External Data

Explanation:

On the External Data tab, you can find import and export commands located in Access.

7 0
3 years ago
Other questions:
  • In file hashing, a file is read by a special algorithm that uses the value of the bits in the file to compute a single number ca
    13·1 answer
  • Write the Python code to implement each step of the following algorithm. Your code should use descriptive variable names and per
    7·1 answer
  • Today when Dylan turned on his computer, he noticed that the monitor was very dim. He could still see the desktop icon and text.
    15·1 answer
  • Your program will search for prime numbers. You will first ask the user for the range of values to search, and use for loops to
    6·1 answer
  • Explain steps in creating a main document for from letter. <br>​
    5·1 answer
  • An office uses an application to assign work to its staff members. The application uses a binary sequence to represent each of 1
    9·1 answer
  • You were recently hired by a small start-up company. The company is in a small office and has several remote employees. You have
    15·1 answer
  • What is the name for data generated by a computer using an algorithm?
    7·1 answer
  • Write a program that produces the following output: CCCCCCCCC ++ ++ CC ++ ++ CC ++++++++++++++ +++++++++++++++ CC ++++++++++++++
    14·1 answer
  • Mention and discuss specific professional ethics related to augmented reality, artificial intelligence, and the internet of thin
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!