+ 2
What is a flush?
14 Respuestas
+ 3
It is a construct to minimize traffic between layers.
So uday kiran told you that not every key is directly sent to program but first gathered and transported on demand.
That idea is used in different contexts.
Especially in graphics programmming not each change is sent to front end. That would lead to very high traffic between backend and front end.
All changes go to front end on flush.
Also in real life:
If u buy on Amazon u dont directly buy each single item but put it into a basket.
Only if you click buy, you buy all your basket.
That buy click is similiar to flush.
+ 4
Oma Falk 10 Real-life examples of flushing. Note last one is optional to look.
1. People gathering at bus stop and get flushed in the bus when it arrives.
2. Storing your pocket money and flushing it when you want to buy something.
3. Flushing/throwing the garbage (gathered in house) all at once.
4. Gathering a lots of trust for a person, then flushing it all when that person turns against you.
5. Postponing holiday's homework and doing it on the last day.
6. Wasting your whole year at school and learning for exams on prior to the latter day.
7. [Science] Storing and releasing of potential energy in an elastic.
8. Freeing all your negative thoughts by meditation.
9. sys.stdout.flush()
10. Remember, how dinosaurs got flushed off from the universe.
#11. Loo [Sorry, I really don't want to mention this🙏🙏🙏]
+ 3
Carlos great!!!!
not all examples are completely fitting, but u got spirit of flush!
+ 3
I wish to add that flushing a keyboard buffer, a data stream, or an interprocess communication pipe means to empty the queue without processing any pending data.
An example would be the "Press any key to continue" prompt. Before showing the prompt, the program should flush any keypresses held in the keyboard buffer. Otherwise, the next key waiting in the queue will close the prompt immediately.
+ 2
Carlos yes
Sometimes hidden but....yes
Brainteaser:
Find 10 examples in real world😎
+ 2
Carlos i forgot to mention, that the basket and any other buffer are cleared after flush. It seemed clear to me.
+ 2
Intention of flush is to avoid traffic.
1,3,9 do it.
Other examples are missing this aspect.
+ 2
A buffer flush is the transfer of computer data from a temporary storage area to the computer's permanent memory. For instance if we make any changes in a file, the changes we see on one computer screen are stored temporarily in a buffer.
+ 1
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 any language you want.
+ 1
In c language we have function
fflush(stdin);
which removes the whatever buffer that is present in keyboard
0
uday kiran keyboard????
0
Oma Falk so flush is everywhere?
0
Oma Falk can you point out the errors?