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
aniked [119]
4 years ago
10

Consider a text editor that saves a file whenever you click a save button. Suppose that when you press the button, the editor sim

ply (1) animates the button "down" event (e.g., by coloring the button grey), (2) uses the write() system call to write your text to your file, and then (3) animates the button "up" event (e.g., by coloring the button white). What bad thing could happen if a user edits a file, saves it, and then turns off her machine by flipping the power switch (rather than shutting the machine down cleanly)
Computers and Technology
1 answer:
Monica [59]4 years ago
6 0

Answer:

The answer to this question can be defined as follows:

Explanation:

  • The write() method guarantees you to updates the memory of both the kernel, and may not ensure which updates were flushed through stable storage.
  • Unless the client instead switches on either the monitor but views the file, it displays the file, to combines from older and newer versions will be shown.
  • The very first two cases will be deemed "bad" because the user probably can not expect them after completing the save.
You might be interested in
Write a python program stored in file extra_credit.py that takes three different inputs from the user where : First Input: The p
LUCKY_DIMON [66]

Answer:

Check the explanation

Explanation:

print("************************************************************")

sentence = input("Enter a sentence : ").split()

replace_words = input("\nEnter the words that should be replaced : ").split()

special = input("\nEnter the replacing special Character : ")

result = []

for word in sentence:

   if word not in replace_words:

       result.append(word)

   else:

       result.append(special * len(word))

result = ' '.join(result)

print("\nThe Sentence with words censored is : " + result)

print("************************************************************")

4 0
3 years ago
Which format is used for audio files?<br><br> avi<br> jpg<br> ogg<br> xml
Ghella [55]

Answer:

avi

Explanation:

AVI stand for Audio Video Interleav,avi filename extension is a multimedia container format introduced by Microsoft in November 1992 as part of its Video for Windows software.

3 0
3 years ago
Read 2 more answers
If a filesystem has a block size of 4096 bytes, this means that a file comprised of only one byte will still use 4096 bytes of s
mars1129 [50]

Answer:

def calculate_storage(filesize):

   block_size = 4096

   full_blocks = filesize // block_size

   partial_block = filesize % block_size

   if partial_block > 0:

       return (full_blocks + 1) * block_size

   return filesize

print(calculate_storage(1))

print(calculate_storage(4096))

print(calculate_storage(4097))

Explanation:

The python program defines the function 'calculate_storage' that calculates the block storage used. It gets the number of blocks used to store the data by making a floor division to get the integer value, then it checks for remaining spaces in the block. If there are spaces left, it adds one to the full_blocks variable and returns the result of the multiplication of the full_blocks and block_size variables.

8 0
3 years ago
Please convert this for loop into while loop
spayn [35]

Answer:

The code segment was written in Python Programming Language;

The while loop equivalent is as follows:

i = 1

j = 1

while i < 6:

     while j < i + 1:

           print('*',end='')

           j = j + 1

     i = i + 1

     print()

Explanation:

(See attachment for proper format of the program)

In the given lines of code to while loop, the iterating variables i and j were initialised to i;

So, the equivalent program segment (in while loop) must also start by initialising both variables to 1;

i = 1

j = 1

The range of the outer iteration is, i = 1 to 6

The equivalent of this (using while loop) is

while ( i < 6)

Not to forget that variable i has been initialized to 1.

The range of the inner iteration is, j = 1 to i + 1;

The equivalent of this (using while loop) is

while ( j < i + 1)

Also, not to forget that variable j has been initialized to 1.

The two iteration is then followed by a print statement; print('*',end='')

After the print statement has been executed, the inner loop must be close (thus was done by the statement on line 6, j = j + 1)

As seen in the for loop statements, the outer loop was closed immediately after the inner loop;

The same is done in the while loop statement (on line 7)

The closure of the inner loop is followed by another print statement on line 7 (i = i + 1)

Both loops were followed by a print statement on line 8.

The output of both program is

*

*

*

*

*

3 0
3 years ago
How does Technology impact any profession or occupation?
Brrunno [24]

Technology can create or dimish occupations.

Technology can also make the job easier

8 0
3 years ago
Other questions:
  • What possible reason would explain why you are unable to connect to the intranet site on your computer’s web server, using a bro
    13·1 answer
  • With ________, website programmers can import data from other sources to create new functions and features that we associate wit
    14·1 answer
  • My computer have black spots and line
    7·2 answers
  • What are two great ways to find clues to locate commands on the ribbon?
    13·1 answer
  • ________ is/are used to temporarily hold small units of program instructions and data immediately before, during, and after exec
    11·1 answer
  • You have just installed a SOHO router in a customer's home and the owner has called to say his son is complaining that Internet
    5·1 answer
  • Which of the following is not a protocal? <br><br>A) HTTP<br>B) FTP<br>C) WWW<br>D) HTTPS​
    15·2 answers
  • A web application that is designed as a single piece of software with multiple features that are fully integrated into the main
    9·1 answer
  • How do you detect my account for brainly?
    14·1 answer
  • Who is responsible for developing the physical background for the characters by creating buildings, landscapes, and interiors?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!