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
erica [24]
2 years ago
8

1. what is the purpose of giving an id to an html element when using javascript?

Computers and Technology
1 answer:
bazaltina [42]2 years ago
3 0

Answer:

It is also used by JavaScript to access and manipulate the element with the specific id.

You might be interested in
Which of the following is an easy steps to take to avoid ESSD well working on your computer?
Monica [59]

C.) Keep your body in contact with the metal area of the computer


Generally, you want to keep contact with something metallic with clear path-to-ground. For instance, painted metal can do the job, but not as efficiently.

There are other ways to go about avoiding ESD, but this is the best option given in your question.

7 0
4 years ago
Papa Mario of Mario's Pizzeria has baked a huge pizza and cut it into n slices, but he is clumsy and the pizza wasn't evenly sli
rosijanka [135]

Suppose there are n student: 1, 2, 3, ..., i, ..., n.

Now, let's say each want slice size to be: t1, t2, ..., ti, ..., tn.

Let's pizza slices be : s1, s2, ..., si, ..., sn.

Now, it can be said that a student ' i ' will accept a slice of pizza ' si ' only if the size of slice is more then ' ti '.

Logic to distribute: what can be done is we can sort the demand i.e ti of students and also sort the size of pizza slices si. Now, Papa Mario can distribute the sorted slices to students sorted demand(smallest to heighest) one by one as they appear in sorted lists. Now, it will only be possible to distribute the slices to make everyone happy, if and only if in sorted lists of both s and t for each index k, it holds the condition: tk <= sk.

Let me explain you with example:

Lets says size of whole pizza is 100.

Now number of students n = 4.

Let there demands be : 20, 35, 15, 10.

This means 1st student atleast require the slice size of 20 and so on.

Case 1: Papa Mario divides the pizza into slices of size: 25, 20, 20, 35.

=> Now, we sort both lists.

Thus t => 10, 15, 20, 35

and s => 20, 20, 25, 35

Now, as we can see that for all index  tk <= sk, hence pizza can be distrubeted so that everyone can be happy.

Case 2: Papa Mario divides the pizza into slices of size: 30, 20, 20, 30.

=> Now, we sort both lists.

Thus t => 10, 15, 20, 35

and s => 20, 20, 30, 30

Now, as we can see that, for last student with demand of 35, the pizza slice alotted is of size 30, thus he is unhappy, and pizza cannot be distributed so that everyone becomes happy.

Now, after the approach, let's discuss question.

(a) Greedy algorithm paradigm is most appropriate for this problem, as what we are doing is greedily distributing small slices to those students which have least demands first then tackling bigger demands of students, by remaining bigger slices.

(b) As we are mainly sorting thel ist of sizes of pizza slices and student demands, thus we need to use an efficient algorithm to sort the lists. Such an efficient algorithm can be QuickSort() or MergeSort().

(c) Asymptotic running time of our algorithm would be O(n*logn).

3 0
3 years ago
Features present in most GUIs include _____.
atroni [7]
Forms, Icons, Menus, Windows
3 0
4 years ago
Read 2 more answers
Which of the following components was a significant development featured in the Macintosh LISA computer?
Free_Kalibri [48]
I believe that the Apple Lisa computer was the first production microcomputer to have a GUI.
3 0
3 years ago
An animation effect that moves an object along a predefined path that you create for it
lutik1710 [3]
Answer is a Motion Path. Hope this helps :D
8 0
3 years ago
Other questions:
  • Which activity constitutes legal computer activity?
    12·1 answer
  • Who controls communication ethics?
    13·1 answer
  • How to remove info from a broken laptop and transfer?
    5·1 answer
  • A user receives a phone call from a person claiming to be from technical support. This person knows the users name and that the
    12·1 answer
  • Is it more beneficial to have many folders or is it better to " nest subfolders? Explain your response
    5·1 answer
  • Answer these two if u can❤️
    5·2 answers
  • The compound known as butylated hydroxytoluene, abbreviated as BHT, contains carbon, hydrogen, and oxygen. A 1.501 g sample of B
    11·1 answer
  • Pls help I will give points
    7·1 answer
  • Why are computer manufacture constantly releases fast computer and do user benefit from ths speed
    9·1 answer
  • Please help me on this please i am giving all of my points so please help me
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!