Code modifications :
// modified code
window.addEventListener("DOMContentLoaded", function () {
document.querySelector("#showCircleBtn").addEventListener("click", showCircleClick);
});
function showCircleClick() {
// TODO: Add modifications here
showCircle(160, 180, 120).then(function(div) {
div.innerHTML = "Ta da!";
}, function(error){
alert(error);
});
}
// Do not modify the code below
let timerId = null;
function showCircle(cx, cy, radius) {
// Only allow one div to exist at a time
let div = document.querySelector("div");
if (div !== null) {
div.parentNode.removeChild(div);
}
// Create new div and add to DOM
div = document.createElement("div");
div.style.width = 0;
div.style.height = 0;
div.style.left = cx + "px";
div.style.top = cy + "px";
div.className = "circle";
document.body.append(div);
// Set width and height after showCircle() completes so transition kicks in
setTimeout(() => {
div.style.width = radius * 2 + 'px';
div.style.height = radius * 2 + 'px';
}, 10);
let promise = new Promise(function(resolve, reject) {
// Reject if showCircle() is called before timer finishes
if (timerId !== null) {
clearTimeout(timerId);
timerId = null;
div.parentNode.removeChild(div);
reject("showCircle called too soon");
}
else {
timerId = setTimeout(() => {
resolve(div);
timerId = null;
}, 1000);
}
});
return promise;
}
These are the modifications to be done in the code to make it properly work to get the outcome.
What is code ?
For the purposes of communication and information processing, a code is a set of principles that technology is getting as a letter, word, sound, picture, or gesture—into another form, often shorter or secret, for storage on a storage device or for transmission over a channel of communication. An early example is the development of language, which allowed people to express verbally what they were thinking, seeing, hearing, or feeling to others. However, speaking restricts the audience to those present at the time the speech is delivered and limits that range of communication towards the distance a voice may travel. The ability to communicate across space and time was greatly expanded by the discovery of printing, which converted spoken language into pictorial symbols.
To know more about code
brainly.com/question/1603398
#SPJ4
What is the stdio.h header file ?
You have been asked to investigate a web server for possible intrusion. You identify a script with the following code. What language is the code in and does it seem likely to be malicious? import os, sockets, syslog def r_conn(ip) s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.connect(("logging.trusted.foo",514))
The code below is written in JavaScript and does not seem malicious.
What is a Malicious Code?A Malicious code is one that is not designed for any productive end but to cause disruptions in the computer with the objective of
harming the workstation; or destroying the data stored therein.There are numerous classifications of malicious codes and they can be identified and removed by an application called an Anti-Virus or malicious app remover.
Learn more about JavaScript at:
https://brainly.com/question/16698901
as a software engineer do i need to know off the top of my head the inner workings of a programming language
Yes, you do. You have to the inner workings of a programming language instead of memorize the code. As long as you understand the inner working of a programming language you can easily understand the code.
Why programming logic is more important than the code itself?As a software engineer, before you are working on code, you required to turn the imagine of what your client need into reality in form of a software. Hence, the most important part of building a software is research phase that are use in computer architecture. After that find the logic of each business process then imply it in form of code. Even if you did know how to write it in code, you still can make the software by asking in programming community or code website as long as you understand to read the code.
Learn more about software engineer here
https://brainly.com/question/7145033
#SPJ4
A man is charged a fee by the city for having numerous broken cars and auto parts in his front yard. Which of the following correctly describes why the city punishes him? He has committed a crime. He is in violation of a city statute. He has violated an amendment of the U.S. Constitution. A judge has decided that he is in violation of civil law.
Answer:
Violation of city Statute
Answer:
B
Explanation:
In this lab, you use what you have learned about searching an array to find an exact match to complete a partially prewritten C++ program. The program uses an array that contains valid names for 10 cities in Michigan. You ask the user to enter a city name; your program then searches the array for that city name. If it is not found, the program should print a message that informs the user the city name is not found in the list of valid cities in Michigan.
The file provided for this lab includes the input statements and the necessary variable declarations. You need to use a loop to examine all the items in the array and test for a match. You also need to set a flag if there is a match and then test the flag variable to determine if you should print the the Not a city in Michigan. message. Comments in the code tell you where to write your statements. You can use the previous Mail Order program as a guide.
Instructions
Ensure the provided code file named MichiganCities.cpp is open.
Study the prewritten code to make sure you understand it.
Write a loop statement that examines the names of cities stored in the array.
Write code that tests for a match.
Write code that, when appropriate, prints the message Not a city in Michigan..
Execute the program by clicking the Run button at the bottom of the screen. Use the following as input:
Chicago
Brooklyn
Watervliet
Acme
Based on your instructions, I assume the array containing the valid names for 10 cities in Michigan is named michigan_cities, and the user input for the city name is stored in a string variable named city_name.
Here's the completed program:#include <iostream>
#include <string>
int main() {
std::string michigan_cities[10] = {"Ann Arbor", "Detroit", "Flint", "Grand Rapids", "Kalamazoo", "Lansing", "Muskegon", "Saginaw", "Traverse City", "Warren"};
std::string city_name;
bool found = false; // flag variable to indicate if a match is found
std::cout << "Enter a city name: ";
std::getline(std::cin, city_name);
for (int i = 0; i < 10; i++) {
if (city_name == michigan_cities[i]) {
found = true;
break;
}
}
if (found) {
std::cout << city_name << " is a city in Michigan." << std::endl;
} else {
std::cout << city_name << " is not a city in Michigan." << std::endl;
}
return 0;
}
In the loop, we compare each element of the michigan_cities array with the user input city_name using the equality operator ==. If a match is found, we set the found flag to true and break out of the loop.
After the loop, we use the flag variable to determine whether the city name was found in the array. If it was found, we print a message saying so. If it was not found, we print a message saying it's not a city in Michigan.
When the program is executed with the given input, the output should be:
Enter a city name: Chicago
Chicago is not a city in Michigan.
Enter a city name: Brooklyn
Brooklyn is not a city in Michigan.
Enter a city name: Watervliet
Watervliet is a city in Michigan.
Enter a city name: Acme
Acme is not a city in Michigan.
Read more about programs here:
https://brainly.com/question/26134656
#SPJ1
you have a 10vdg source available design a voltage divider ciruit that has 2 vdc , 5vdc , and 8 vdc available the total circuit current is to be 2mA
If you try to divide 10V in three voltages, the sum of the three voltages must be equal to the total voltage source, in this case 10V. Having said this, 2 + 5 + 8 = 15V, and your source is only 10V. So you can see is not feasible. You can, for example, have 2V, 5V and 3V, and the sum is equal to 10V. Before designing the circuit, i.e, choosing the resistors, you need to understand this. Otherwise, I suggest you to review the voltage divider theory.
For instance, see IMG2 in my previous post. If we were to design a single voltage divider for the 5VDC, i.e, 50% of the 10V source, you generally choose R1 = R2., and that would be the design equation.
Match the definitions of different business communication to the type of document
Answer:
Convey more factual data that helps facilitate decision making - REPORTS
Reports are made with factual data to show the condition of the subject so convey more factual data that helps in decision making.
Are one page long - MEMORANDUMS
Memorandums are used to convey new information and are usually brief which means they take one or two pages.
Are written in a block style, with the body text aligned along the left margin - BUSINESS LETTERS
Business letters are to be as formal as possible and this includes writing them block style and aligning the text to the left margin.
Allow attachments of files, such as images - EMAILS
As emails are softcopy and computer based, they allow for the attachment of other files such as images, documents, audio, etc.
Answer:
emails -> allow attachments of files, such as images
reports -> convey more factual data that helps facilitate decision making
memorandums -> are one page long
business letters -> are written in a block style, with the body text aligned along the left margin
Explanation:
Hopes this helps.
Code to be written in R language:
The Fibonacci numbers is a sequence of numbers {Fn} defined by the following recursive relationship:
Fn= Fn−1 + Fn−2, n > 3
with F1 = F2 = 1.
Write the code to determine the smallest n such
that Fn is larger than 5,000,000 (five million). Report the value of that Fn.
Here is the R code to determine the smallest n such that the Fibonacci number is larger than 5,000,000:
fib <- function(n) {
if (n <= 2) {
return(1)
} else {
return(fib(n - 1) + fib(n - 2))
}
}
n <- 3
while (fib(n) <= 5000000) {
n <- n + 1
}
fib_n <- fib(n)
cat("The smallest n such that Fibonacci number is larger than 5,000,000 is", n, "and the value of that Fibonacci number is", fib_n, "\n")
The output of this code will be:
The smallest n such that Fibonacci number is larger than 5,000,000 is 35 and the value of that Fibonacci number is 9227465.
Learn more about R language here: https://brainly.com/question/14522662
#SPJ1
I really need help with coderZ does anyone kno?
Answer:
Easy-to-use virtual robotics and STEM platform tailored to serve every student at every level!
CoderZ is a powerful, award-winning online platform.
Explanation:
CoderZ is a powerful, award-winning online platform through which students learn valuable STEM skills such as coding, robotics, and physical computing. CoderZ is highly flexible and designed for use in the classroom or through a wide range of remote learning environments. Computers and technology are everywhere. Studying science, technology, engineering and math gives kids valuable skills for the future and develop life-skills like computational thinking, critical thinking and problem-solving as well.
STEM and CS education focuses on how to approach complex problems, break down the challenges into small pieces and approach resolving them in a logical manner – critical skills for any career path.
In what year was napier bone invented
The Napier's Bones is a manually-operated calculating device, invented by the Scottish mathematician John Napier in the early 17th century, around the year 1617.
What is Napier bone used for?Napier's Bones, also known as Napier's rods, are used for multiplication, division, and square root calculations. The device consists of a set of rectangular rods or bones with each bone representing a single digit in the multiplication table.
By manipulating the rods, users can quickly perform calculations that would otherwise be time-consuming to complete by hand. The Napier bone is an early example of a calculating device and is considered a predecessor to modern mechanical calculators.
Learn more about Napier bone at:
https://brainly.com/question/24242764
#SPJ1
Perform the following for each 8 bit binary addition:
add the two binary numbers
interpret all there 8 bit binary numbers as a signed number (2’s complement)
interpret all three 8 bit binary numbers as unsigned numbers
Binary Number
Signed Decimal Value
Unsigned Decimal Value
Number 1
01111001
Number 2
00011110
Sum
Binary Number
Signed Decimal Value
Unsigned Decimal Value
Number 1
00011011
Number 2
00010100
Sum
Binary Number
Signed Decimal Value
Unsigned Decimal Value
Number 1
11110110
Number 2
10000011
Sum
Answer:
Where are options?
Explanation:
After reviewing your slide, you realize that the visual elements could be improved. Which of the following options would help you make the visual elements on this slide more effective? Select all that apply.
A
Choose one data visualization to share on this slide, then create another slide for the second data visualization
B
Use more colors in the map
C
Provide a detailed written explanation of both data visualizations
D
Use a consistent font size and color for data visualization titles
Make the visual elements on this slide more impactful by using a consistent font style, size, and color for the names of the data visualizations.
Which of the following would make the visual components on this slide more impactful?Selecting one data point to present, followed by another slide for the second data visualization, can help the visual aspects be more impactful. The font size and color for names of data visualizations should also be consistent.
Which components of an effective visualization should you pay particular attention to?Choosing the ideal visual, balancing the design, concentrating on crucial regions, keeping the visuals basic, utilizing patterns, comparing characteristics, and providing interaction are a few of the essential elements of an efficient data visualization.
To know more about visual elements on slide visit:-
https://brainly.com/question/29376198
#SPJ4
You are a systems analyst. Many a time have you heard friends and colleagues complaining that their jobs and businesses are being negatively impacted by e-commerce. As a systems analyst, you decide to research whether this is true or not. Examine the impact of e-commerce on trade and employment/unemployment, and present your findings as a research essay.
E-commerce, the online buying and selling of goods and services, has significantly impacted trade, employment, and unemployment. This research essay provides a comprehensive analysis of its effects.
What happens with e-commerceContrary to popular belief, e-commerce has led to the growth and expansion of trade by breaking down geographical barriers and providing access to global markets for businesses, particularly SMEs. It has also created job opportunities in areas such as operations, logistics, customer service, web development, and digital marketing.
While certain sectors have experienced disruption, traditional businesses can adapt and benefit from e-commerce by adopting omni-channel strategies. The retail industry, in particular, has undergone significant transformation. E-commerce has empowered small businesses, allowing them to compete with larger enterprises and fostered entrepreneurial growth and innovation. However, there have been job displacements in some areas, necessitating individuals to transition and acquire new skills.
Read mroe on e-commerce here https://brainly.com/question/29115983
#SPJ1
PLEASE HELP ME ANSWER THIS QUESTION. I REALLY REALLY NEED IT.
. According to IEEE, what is software engineering? (A) The study of
approaches (B) The development of software product using scientific
principles, methods, and procedures (C) The application of engineering
to software (D) All of the above
IEEE (Institute of Electrical and Electronics Engineers) describes software engineering as:
(D) All of the above.
Software engineering encompasses the study of approaches, and the development of software products using scientific principles, methods, and procedures. It also encompasses the application of engineering principles to software. It is a multidisciplinary field that combines technical knowledge, problem-solving skills, and systematic processes to design, develop, and maintain software systems efficiently and effectively.
Write a function pop element to pop object from stack Employee
The function of a pop element to pop object from stack employee is as follows:
Stack.Pop() method from stack employee. This method is used to remove an object from the top of the stack.What is the function to pop out an element from the stack?The pop() function is used to remove or 'pop' an element from the top of the stack(the newest or the topmost element in the stack).
This pop() function is used to pop or eliminate an element from the top of the stack container. The content from the top is removed and the size of the container is reduced by 1.
In computer science, a stack is an abstract data type that serves as a collection of elements, with two main operations: Push, which adds an element to the collection, and. Pop, which removes the most recently added element that was not yet removed.
To learn more about functional pop elements, refer to the link:
https://brainly.com/question/29316734
#SPJ9
Internet radio probably uses UDP because it is a connection-less protocol and streaming media typically does not require an established connection.
a. True
b. False
Answer:
True
Explanation:
Please mark me as the brainiest
An array called numbers contains 35 valid integer numbers. Determine and display how many of these values are greater than the average value of all the values of the elements. Hint: Calculate the average before counting the number of values higher than the average
python
Answer:
# put the numbers array here
average=sum(numbers)/35 # find average
count=0 #declare count
for i in numbers: #loop through list for each value
if i > average: #if the list number is greater than average
count+=1 #increment the count
print(count) #print count
Use the drop-down tool to select the word or phrase that completes each sentence.
The manipulation of data files on a computer using a file browser is
.
A
is a computer program that allows a user to manipulate files.
A
is anything that puts computer information at risk.
Errors, flaws, mistakes, failures, or problems in a software program are called
.
Software programs that can spread from one computer to another are called
.
Answer:
file management file manager security threat bugs virus
Explanation:
similarities between incremental and
prototyping models of SDLC
Prototype Model is a software development life cycle model which is used when the client is not known completely about how the end outcome should be and its requirements.
Incremental Model is a model of software consequence where the product is, analyzed, developed, implemented and tested incrementally until the development is finished.
What is incremental model in SDLC?
The incremental Model is a process of software development where conditions are divided into multiple standalone modules of the software development cycle. In this model, each module goes through the conditions, design, implementation and testing phases.
The spiral model is equivalent to the incremental model, with more emphasis placed on risk analysis. The spiral model has four stages: Planning, Risk Analysis, Engineering, and Evaluation. A software project frequently passes through these phases in iterations
To learn more about Prototype Model , refer
https://brainly.com/question/7509258
#SPJ9
what is a computer modem?
Answer:
A modem modulates and demodulates electrical signals sent through phone lines, coaxial cables, or other types of wiring.
odify the guessing-game program so that the user thinks of a number that the computer must guess.
The computer must make no more than the minimum number of guesses, and it must prevent the user from cheating by entering misleading hints.
Use I'm out of guesses, and you cheated and Hooray, I've got it in X tries as your final output.
The guessing-game program that the user thinks of a number that the computer must guess is illustrated below.
How to illustrate the program?The appropriate program for the guessing game will be:
import random
import math
smaller = int(input("Enter the smaller number: "))
larger = int(input("Enter the larger number: "))
count = 0
print()
while True:
count += 1
myNumber = (smaller + larger) // 2
print('%d %d' % (smaller, larger))
print('Your number is %d' % myNumber)
choice = input('Enter =, <, or >: ')
if choice == '=':
print("Hooray, I've got it in %d tries" % count)
break
elif smaller == larger:
print("I'm out of guesses, and you cheated")
break
elif choice == '<':
larger = myNumber - 1
else:
smaller = myNumber + 1
Learn more about programs on:
https://brainly.com/question/16397886
#SPJ1
Which of the following are activities that represent inefficient and/or unethical uses of the Internet? Check
all of the boxes that apply.
Seems like a multiple choice question... could you give me the different choices?
Answer:
A. taking a break from working by playing an online game
C. behaving in a way that is unacceptable in person
Explanation:
Adding a border to an image is one way to manipulate media to spice up a project. Where do you find the Picture Styles command to add a border in Word Online?
Group of answer choices
Image Toolbox Insert tab
Picture Tools Format tab
Insert Media Home tab
Picture Tools Review tab
The place to find the Picture Styles command to add a border in Word Online is Picture Tools Format tab.
What is Picture Tools Format tab?Picture Tools Format tab is known to be a hidden tab that one have to insert or select when there is a Picture as it helps Adjust, and make changes to Picture Styles, etc.
Note that The place to find the Picture Styles command to add a border in Word Online is Picture Tools Format tab.
Learn more about border line from
https://brainly.com/question/2263629
#SPJ1
which of the following is not an operating system a) boss b) window xp c) linux d) bindux
Answer:
boss is not an os
Explanation:
boss is a former of Linux hope this helped
In order to place something into a container you must:_______.
a. double-click on the container and type a command.
b. drag the container onto the materials or instruments shelf.
c. double-click on the material or the instrument.
d. click on the material or instrument and drag it onto the container.
Answer:
Option (d) is the correct answer to this question.
Explanation:
The container is a class, data structure, or abstract data type, the instances of which are compilations of many other particles. In several other words, they store objects in an ordered manner that meets strict rules about access. The reviewing information depends on the number of objects (elements) contained therein. To put any material or instrument in the container, it would be easy to select the material or instrument by clicking them and then dragging them onto the container. The other option won't be able to perform the required task.Other options are incorrect because they are not related to the given scenario.
How do technologies such as virtual machines and containers help improve
operational efficient?
Answer:
Through the distribution of energy usage across various sites, virtual machines and containers help to improve operational efficiency. A single server can accommodate numerous applications, negating the need for additional servers and the resulting increase in hardware and energy consumption.
Hope this helps! :)
dofemines the colour Hoto to Windows - Frome
You can use these techniques to figure out the colour photo in Windows. Open the image or photo file on your Windows computer first.
Then, check for choices or tools linked to colour settings or modifications, depending on the picture viewer or editor you're using.
This could be found under a menu item like "Image," "Edit," or "Tools." You can adjust a number of factors, including brightness, contrast, saturation, and hue, once you've accessed the colour options, to give the shot the appropriate colour appearance.
Play around with these options until you get the desired colour result.
Thus, if necessary, save the altered image with the new colour settings.
For more details regarding Windows, visit:
https://brainly.com/question/17004240
#SPJ1
Your question seems incomplete, the probable complete question is:
determine the colour photo to Windows
in a list of 10 words, print all the words that are at even positions
This is a coding question, so copy-paste your answer directly from python
Syntax in Python for even: if number%2 == 0 Second requirement: An odd number is one that cannot be divided by two. We can infer from this that strange places begin with 1, 3, 5, 7, 8, and so forth. Even places, however, begin with 2, 4, 6, 8, 10, and so forth.
What is meant by python?Python is a popular computer programming language for creating websites and software, automating processes, and performing data analysis. Python is a general-purpose language, which means it may be used to make a wide range of programmes and isn't tailored for any particular issues. Python is an interpreted, object-oriented, high-level programming language that Guido van Rossum created. It has dynamic semantics.Guido van Rossum read the published scripts from the 1970s BBC comedy series "Monty Python's Flying Circus" as he started using Python. Van Rossum chose the name Python for the language because he wanted it to be short, distinct, and a little mysterious.To learn more about python, refer to:
https://brainly.com/question/26497128
If you could design a different type of virtual memory addressing system, mapping physical memory to virtual memory, what would that look like? Please explain what you would do differently and what you would keep the same as what is normally done.
In your responses to your peers, compare and contrast your answer to those of your peers.
Your Discussion should be a minimum of 200 words in length and not more than 500 words. Please include a word count. Provide references.
The physical memory will be divided into segments in a segmentation-based system, and each sector will be translated to a different area of the memory space.
How much memory can be addressed?The number of equipped in the CPU is just one of several variables that affect a device's memory capacity. 32-bit CPUs can only address memory with a size of up to 4 GB. A 64-bit computer has a limitless amount of memory. Memory capacity is also influenced by operating systems.
What kind of address is in memory?A memory address's data type is a reference, which is indicated by the type to which it points and an asterisk (*).
To know more about memory address visit:
https://brainly.com/question/22079432
#SPJ1
Statistics on Cybersecurity Issues??
According to the statistics on the Cybersecurity issue, it is found that the cost of cybercrime has risen by 10% in the past year.
What is Cybersecurity?Cybersecurity may be characterized as the significant and consistent practice or method of protecting critical systems and sensitive information from digital attacks. It is generally categorized into five distinct types.
According to the context of this question, the average cost of a data breach that generally holds the reason or concern of cybercrime in the United States in 2022 was $9.44 million, according to IBM data. Cybersecurity Ventures predicts cybercrime will cost $10,5 trillion annually by 2025.
Therefore, according to the statistics on the Cybersecurity issue, it is found that the cost of cybercrime has risen by 10% in the past year.
To learn more about Cybersecurity, refer to the link:
https://brainly.com/question/28004913
#SPJ9