Questions tagged [flush]

Flush means clearing all the buffers for a stream. This will cause any buffered data to be written to the underlying device.

Flush means clearing all the buffers for a stream. This will cause any buffered data to be written to the underlying device.

1132 questions
-1
votes
1 answer

GUI is getting hanged after calling the reader thread

GUI is getting hanged after calling the reader thread for Telnet Client read operation through Jbutton. Telnet read and write operation: public class Telnet { static TelnetClient telnet; public static void halt() { telnet = new…
Archana
  • 1
  • 2
-1
votes
1 answer

UICollectionView + FetchResultsController sometimes crashes when i flush CoreData entity

I have an issue with UICollectionView that linked to CoreData Entity via FetchResultsController. I have a screen with search results, so i need to get records from API, flush Core Data Entity and add new records. It works fine, but sometimes when i…
-1
votes
2 answers

How to echo counts of for loop just once without multiple echoing?

I guess the question is clear. What i want is to print count and update the same echo for the next loop or after certain sleep. But when i run the below code multiple echo is done. I just want to echo once and update/replace the last echo. I don't…
Jeeva
  • 632
  • 1
  • 12
  • 21
-1
votes
1 answer

cin.ignore() is producing undesired behavior

For the following code: #include using namespace std; int main() { int t; cin >> t; while(t--) { string s; getline(cin,s); cout << s << "\n"; cin.ignore(1000,'\n'); } return…
Shivam Arora
  • 476
  • 5
  • 18
-1
votes
1 answer

Strange behavior of cin

I've been practicing a bit of C ++. It is a simple program, however i've playing with the terminal and I noticed a strange behavior when entering the password in 'input'. It appears that the buffer 'triggers' before the 'Give me the password'…
ed9uardo0
  • 49
  • 5
-1
votes
2 answers

Python Dynamic Printing with different loops

I have a segment of a function below: if x > thickness: transmission.append(energy[0]) count += 1 alive = 0 if LOUD: print("{} %".format(count/N)) elif x < 0: …
Sterling Butters
  • 1,024
  • 3
  • 20
  • 41
-1
votes
1 answer

Flushing pipe without closing in C

I have found a lot of threads in here asking about how it is possible to flush a pipe after writing to it without closing it. In every thread I could see different suggestions but i could not find a definite solution. Here is a quick summary: The…
Antonis Paragas
  • 45
  • 1
  • 10
-1
votes
2 answers

why is flush() not executing data right away? php

I'm writing a PHP script but getting stuck on the flush() function. This is my script: I want my script to send the '1', then wait 5 seconds, then send the '2'. But instead the script…
Mendy
  • 7,612
  • 5
  • 28
  • 42
-1
votes
1 answer

Problems with flush and printwriter

I have the following code: while (true) { in = new BufferedReader(new InputStreamReader(socket.getInputStream())); out = new PrintWriter(socket.getOutputStream()); String result = null; while (result != "string") { …
Alex
  • 325
  • 7
  • 16
-1
votes
1 answer

(Pycharm mac os x) can't flush to file

I want to write to the file in real time(instead of waiting for the code to finish) by flushing, but it doesn't seem to change anything. Here's the code: dataFile =open("json",'a+') def write(data): dataFile.write(data) …
Tom Giro
  • 1
  • 1
-1
votes
1 answer

C++ recursive function with switch() returns bad data

I'm working on a project which requires some menus to be displayed some of them have sub-menus. So far i have created a function which returns the character that the user has selected, the problem is that after a couple and more back and forth…
Peter
  • 1
  • 4
-1
votes
1 answer

ob_flush works offline, not online

I'm trying to display an image while photos are uploading, so users know my website is doing something instead of just sitting there. I can get it to work properly offline, but not online, for some reason. Here's the relevant part of my…
-1
votes
1 answer

Saving only one value in preferences file - libgdx

I would like to save the player's best score in the game's preferences file. Now, I know I need to call the flush() method in order for the values to get persisted, but I have other values( options) such as "music on/off" and "sound on/off" which I…
David Lasry
  • 1,407
  • 4
  • 26
  • 43
-1
votes
2 answers

Testing for disk cache buffers being flushed

I currently have a video file that's being converted to a different format via a shell_exec() call. No problems with the call or with the format conversion, that all works correctly; but my next step is to push that file up to an s3 bucket. However,…
Mark Baker
  • 209,507
  • 32
  • 346
  • 385
-1
votes
1 answer

Spring with hibernate dont flush the session after exception error

I am using Spring transaction management with Hibernate. My service layer methods are transactional. This error is occurring when am testing a use case when user is trying to create a company with an already existing ID. Here is my…
user3008362
  • 51
  • 1
  • 5
1 2 3
75
76