buffering

Prevent FLV Buffering (AS FLVPlayback component)

Hi folks, I have a client who is insisting on having a 65Mb FLV on her home page. I talked her down off of the auto-play ledge but I am concerned about wasting bandwidth on a movie that one in 30 visitors might play. In looking at the docs for the FLVPlayback component here the only buffer related parameter I found was bufferTime Nu...

Java page flipping not supported on Mac OS?

Dear developers, I'm hoping someone happens to have stumbled upon the following issue before. My Java application has graphics performance issues on Mac, so I made a simple test application (code below). When I run this on Windows, the console tells me: GraphicsConfiguration flipping? true BufferStrategy flipping? true When I r...

StreamReader and buffer in C#

I've a question about buffer usage with StreamReader. Here: http://msdn.microsoft.com/en-us/library/system.io.streamreader.aspx you can see: "When reading from a Stream, it is more efficient to use a buffer that is the same size as the internal buffer of the stream.". According to this weblog , the internal buffer size of a Stream...

PHP echo issue while in a while loop

I read in a csv file by using a while loop: while (($data = fgetcsv($handle, null, ",")) !== FALSE) and i want to skip the first row because this is the title row and i want to display on the screen "first line skipped". if($data[0]=="title") echo "Title row..skipping<br />"; else //do stuff The problem is since its in a while ...

PHP's ob_flush() causing error

When I call PHP's ob_flush() function on my localhost (via MAMP) I get the following error: Notice: ob_flush() [ref.outcontrol]: failed to flush buffer. No buffer to flush. The only solution I can find is to prefix it with @, but this doesn't seem like a real solution to me. What's causing the problem? ...

JTextFields on top of active drawing on JPanel, threading problems.

Dear developers, Has anyone ever tried to use Swing to construct a proper multi-buffered rendering environment on top of which Swing user interface elements can be added? In this case I have an animating red rectangle drawn onto a background. The background does not need to be updated every frame so I render it onto a BufferedImage an...

Close connection in PHP but keep executing script

Anyone know how to close the connection (besides just flush()?), but keep executing some code afterwards. I don't want the client to see the long process that may occur after the page is done. THANK YOU! ...

Quicktime Object Embed Without Buffering

i have a site [here][link removed] (IE8 and Google Chrome 5 only). i was wondering for the quicktime object if there was a way to not start buffering unless the user clicks the play button? i hope to insert other movie files in the future and having them all buffer is not reasonable unless there is no way of getting this done. thank y...

prevent user fom logging back in after logging out by hitting back button

I am using a PHP login script that challenges user for username & password. Once authenticated program stores a session value. On logout, session value is set to blanks. Once logged out I want to avoid allowing user hitting the back button a few times and and betting allowed to see screen of data or accidentaly logging himself back in....

How do I receive command output immediately?

Hi, I'm using perl back-ticks syntax to run some commands. I would like the output of the command to written to a file and also printed out to stdout. I can accomplish the first by adding a > at the end of my back-ticked string, but I do not know hot to make the output be printed as soon as it is generated. If I do something like prin...

Buffer underrun logic problem, threading tutorial?

Ok, I tried all sorts of titles and they all failed (so if someone come up with a better title, feel free to edit it :P) I have the following problem: I am using a API to access hardware, that I don't coded, to add libraries to that API I need to inherit from the API interface, and the API do everything. I put in that API, a music gene...

how to check how much youtube buffered

please help me how to check how much youtube buffered when it playing php or python ...

Should I buffer the InputStream or the InputStreamReader?

What are the differences (if any) between the following two buffering approaches? Reader r1 = new BufferedReader(new InputStreamReader(in, "UTF-8"), bufferSize); Reader r2 = new InputStreamReader(new BufferedInputStream(in, bufferSize), "UTF-8"); ...

Threading newbie with issue with runaway threads...

Ok, to you understand I will explain the problem: I am using a library called ClanLIB (not my choice), that library, SEEMLY (I am not certain, even reading the sourcE), creates a thread that handles sound. This thread, when the buffer is empty, tries to fetch more data, usually this cause a underrun when the data generating library is t...

How to make output of any shell command unbuffered?

Is there a way to run shell commands without output buffering? For example, hexdump file | ./my_script will only pass input from hexdump to my_script in buffered chunks, not line by line. Actually I want to know a general solution how to make any command unbuffered? Thanks, Boda Cydo. ...

Setting smaller buffer size for sys.stdin?

I'm running memcached with the following bash command pattern: memcached -vv 2>&1 | tee memkeywatch2010098.log 2>&1 | ~/bin/memtracer.py | tee memkeywatchCounts20100908.log to try and track down unmatched gets to sets for keys platform wide. The memtracer script is below and works as desired, with one minor issue. Watching the inter...

PHP CLI: How to read a single character of input from the TTY (without waiting for the enter key)?

I want to read a single character at-a-time from the command line in PHP, however it seems as though there is some kind of input buffering from somewhere preventing this. Consider this code: #!/usr/bin/php <?php echo "input# "; while ($c = fread(STDIN, 1)) { echo "Read from STDIN: " . $c . "\ninput# "; } ?> Typing in "foo" as the...

Parse text- Scanner or BufferedReader?

For my data structures class, the first project requires a text file of songs to be parsed. An example of input is: ARTIST="unknown" TITLE="Rockabye Baby" LYRICS="Rockabye baby in the treetops When the wind blows your cradle will rock When the bow breaks your cradle will fall Down will come baby cradle and all " I'm wondering the bes...

Perl: avoid greedy reading from stdin?

Consider the following perl script (read.pl): my $line = <STDIN>; print "Perl read: $line"; print "And here's what cat gets: ", `cat -`; If this script is executed from the command line, it will get the first line of input, while cat gets everything else until the end of input (^D is pressed). However, things are different when the i...

Getting buffering progress value in HTML5 video player

In Firefox when I see simple video element in this example (http://bit.ly/ki7hm), it has default browser controls. Right after page is loaded video starting to load, and I see how buffering (loading) line is moving to the right side of the default browser controls. I wish to ask how to get this value of a buffer?! Because I have tried ...