Skip to main content
Filter by
Sorted by
Tagged with
1636 votes
14 answers
1.2m views

How do I force Python's print function to flush the buffered output to the screen? See also: Disable output buffering if the goal is to change the buffering behaviour generally. This question is ...
Walter Nissen's user avatar
298 votes
5 answers
306k views

How often does Python flush to a file? How often does Python flush to stdout? I'm unsure about (1). As for (2), I believe Python flushes to stdout after every new line. But, if you overload stdout ...
Tim McJilton's user avatar
  • 7,434
161 votes
7 answers
319k views

In Java, flush() method is used in streams. But I don't understand what are all the purpose of using this method? fin.flush(); tell me some suggestions.
Venkat's user avatar
  • 21.6k
123 votes
20 answers
543k views

I have the following program: int main(int argc, char *argv[]) { char ch1, ch2; printf("Input the first character:"); // Line 1 scanf("%c", &ch1); printf("...
ipkiss's user avatar
  • 13.7k
104 votes
5 answers
266k views

When creating new tables and a user to go along with it, I usually just invoke the following commands: CREATE DATABASE mydb; GRANT ALL PRIVILEGES ON mydb.* TO myuser@localhost IDENTIFIED BY "...
kojow7's user avatar
  • 11.6k
81 votes
21 answers
167k views

I have a php script that only produces logs to the client. When I echo something, I want it to be transferred to client on-the-fly. (Because while the script is processing, the page is blank) I had ...
cusspvz's user avatar
  • 5,321
66 votes
2 answers
78k views

I have code such as the following: std::cout << "Beginning computations..."; // output 1 computations(); std::cout << " done!\n"; // output 2 The problem, however, is ...
synaptik's user avatar
  • 9,609
60 votes
3 answers
29k views

I'm using log4net with AdoNetAppender. It's seems that the AdoNetAppender has a Flush method. Is there anyway I can call that from my code? I'm trying to create an admin page to view all the entries ...
Henrik Stenbæk's user avatar
48 votes
5 answers
23k views

In Python, and in general - does a close() operation on a file object imply a flush() operation?
Adam Matan's user avatar
  • 138k
40 votes
7 answers
38k views

I have a program in Octave that has a loop - running a function with various parameters, not something that I can turn into matrices. At the beginning of each iteration I print the current parameters ...
Nathan Fellman's user avatar
36 votes
5 answers
30k views

In the C++ primer book, in chapter (1), it mentions the following: endl is a special value, called a manipulator, that when written to an output stream has the effect of writing a newline to the ...
Simplicity's user avatar
  • 49.4k
31 votes
9 answers
30k views

Is it possible to echo each time the loop is executed? For example: foreach(range(1,9) as $n){ echo $n."\n"; sleep(1); } Instead of printing everything when the loop is finished, I'd like to ...
Roger's user avatar
  • 8,686
30 votes
7 answers
33k views

Can I close a file stream without calling Flush (in C#)? I understood that Close and Dispose calls the Flush method first.
HelpME's user avatar
  • 301
30 votes
10 answers
43k views

I often see, that tqdm progress bar is broken by other print, like: 93%|█████████▎| 28/30 [00:02<00:00, 13.44it/s]Subject S9 100%|██████████| 30/30 [00:02<00:00, 12.94it/s] 93%|█████████▎| 28/...
Dims's user avatar
  • 51.8k
27 votes
4 answers
19k views

Here is my snippet I tested it in Chrome 11, and Firefox 4: var http = require('http'); http.createServer(function(request, response){ // Write Headers response.writeHead(200); // Write ...
Adam Halasz's user avatar
  • 58.5k
26 votes
7 answers
51k views

I have some C++ code that uses cout statements for debug purposes and for some reason I can't get all the data to print unless I do a std::cout.flush(); at the end. I don't quite understand why this ...
Dixon Steel's user avatar
  • 1,061
25 votes
2 answers
40k views

Can anyone tell if there is a difference between >manage.py flush # or reset and >manage.py sqlclear appname | python manage.py dbshell >manage.py syncdb
Jibin's user avatar
  • 3,102
24 votes
7 answers
21k views

I understand that .NET FileStream's Flush method only writes the current buffer to disk, but dependent on Windows' disk driver and the hard disk firmware this is no guarantee that the data is actually ...
Stefan Schultze's user avatar
22 votes
5 answers
33k views

Is there any way to get an entity ID before the persist/flush? I mean: $entity = new PointData(); $form = $this->createForm(new PointDataType(), $entity); If I try $entity->getId() at this point,...
Xavi's user avatar
  • 1,595
20 votes
4 answers
35k views

When is it necessary to flush a file? I never do it because I call File.Close and I think that it is flushed automatically, isn't it?
user avatar
20 votes
6 answers
6k views

stdout is line-buffered when connected to a terminal, but I remember reading somewhere that reading (at least from stdin) will automatically flush stdout. All C implementations that I have used have ...
Thomas Padron-McCarthy's user avatar
19 votes
1 answer
30k views

I'm pondering on the same issue as HENRI COOK did. It's been reported as a bug on Apache Jira as far as we can tell from the short description. My problem in essence is that events are only logged ...
Robert Cutajar's user avatar
18 votes
14 answers
52k views

<?php for($i=0;$i<20;$i++) { echo 'printing...<br />'; ob_flush(); flush(); usleep(300000); } ?> Url that contains the code: http://domainsoutlook.com/sandbox/delayed....
Speedy Wap's user avatar
17 votes
3 answers
5k views

Here is the code (valid C and C++) #include <stdio.h> int main() { printf("asfd"); // LINE 1 return 0; } If in line 1 I put segfaulting expression the program would just crash ...
sasha.sochka's user avatar
  • 14.7k
16 votes
2 answers
5k views

The Context I am using the subprocess module to start a process from python. I want to be able to access the output (stdout, stderr) as soon as it is written/buffered. The solution must support ...
Yani's user avatar
  • 1,545

1
2 3 4 5
23