flush

Flash AS3 - Can I prevent my shared object from saving on the .swf close?

I have a program with a save feature - the user clicks a button, and everything is saved to a local Shared Object with the flush(); command. My problem is that Flash .swf files automatically save to the local Shared Object when the movie is closed, overwriting their previous, manual save. Is there anyway to prevent flash from saving to...

Flush Enterprise library cache block data of one ASP .NET web site from another

I have two ASP .NET Web sites using one same static instance of a cache manager. The first web site fetches data from a database and caches it using the forth mentioned cache manager object. My problem is that i am unable to flush this cached data from my second Web site using the same cache manager static object. Is there anything ...

I created a PrintWriter with autoflush on; why isn't it autoflushing?

My client is a web browser, and sending request to myserver using this url: http://localhost This is the server side code. The problem lies in the run method of the ServingThread class. class ServingThread implements Runnable{ private Socket socket ; public ServingThread(Socket socket){ this.socket = socket ; System....

How to flush the io buffer in Erlang?

How do you flush the io buffer in Erlang? For instace: io:format("hello") or io:format(user, "hello") This post seems to indicate that there is no clean solution. Is there a better solution than in that post? ...

NHibernate.ISession.Flush() is taking a long time after a Delete()-Operation

In my application I would like to clear/empty a table (which is the only one) in my SQLite-DB. I am programming in C#. _session is of type NHibernate.ISession. Here is my code: string queryFmt = "FROM {0}"; string query = String.Format(queryFmt, typeName); _session.Delete(query); _session.Flush(); My example-DB consists of over 5000 e...

Bash: How to flush output to a file while running

I have a small script, which is called daily by crontab using the following command: /homedir/MyScript &> some_log.log The problem with this method is that some_log.log is only created after MyScript finishes. I would like to flush the output of the program into the file while it's running so I could do things like tail -f some_log....

NHibernate not picking up changes

I am wondering under what circumstances the following NHibernate code could fail: var session = NHibernateSessionManager.CurrentSession; var foo = session.Linq<Foo>.ToList()[0]; foo.SomeProperty = "test"; session.SaveOrUpdate(foo); var reloadedFoos = session.Linq<Foo> .Where(x => x.SomeProperty == "test"); ...

Simple C Program

Ok so I am trying to learn C and I want my user to input a value so I am using scanf. I started off not having the flushes, because nothing was comming up until I typed in two values. Now that I have them though I get the same problem there still is no output until after I type in two numbers. Here is my code: #include <stdio.h> usin...

How do I flush output to file after each write with a gfortran Fortran 90 program?

I am running a loop in a Fortran 90 program that outputs numerical values to an output file for each iteration of the loop. The problem is that the output is not saved to the file but every so many steps. How do I get it to flush each step? Example code: open(unit=1,file='output') do i = 1, 1000 write(1,*) i end do close(unit=1) ...

Why does bash sometime not flush output of a python program to a file

I have a crontab job calling a python script and outputting to a file: python run.py &> current_date.log now sometimes when I do tail -f current_date.log I see the file filling up with the output, but other times the log file exists, but stays empty for a long time. I am sure that the python script is printing stuff right after it...

dd conv=sync and flushing

Hi Will the conv=fsync flag when using dd, flush the data directly? /Jesper ...

How to make sure that a file was permanently saved on USB, when user doesn't use "Safely Remove Hardware"?

When I save a file on a USB within my delphi application, how can I make sure the file is really (permanently) saved on the USB, when "Safely Remove Hardware" is not performed (especially forgotten to use)? Telling our customer to use the windows feature "Safely Remove Hardware" doesn't work. Is there a windows API command to flush the b...

How do you flush Python sockets?

I've written a server in Python that is meant to send data to the client in the form "Header:Message" I would like to be able to have each message sent individually so that the client will need to perform minimal work in order to read the "header" and the "message" Unfortunately, I can't figure out how to properly flush a python socke...

How to set a timer in PHP?

For example, my goal is to test the code given here: http://stackoverflow.com/questions/863268/php-script-that-reports-progress-to-client <?php waitalittle(); echo 'Task one finished'; flush(); waitalittle(); echo 'Task two finished'; flush(); ?> My objective is to create the waitalittle() function, which should take 5 seconds to ...

flush in java.io.FileWriter.

I have a question in my mind that, while writing into the file, before closing is done, should we include flush()??. If so what it will do exactly? dont streams auto flush?? EDIT: So flush what it actually do? ...

Does NH guarantee the cache will not return invalid or stale data for query methods other than ISession.Find()...?

The ISession.Find()... methods are now deprecated. Does the statement about NH guaranteeing the Find()... methods will not return stale or incorrect data extend to ICriteria based queries? See this post for reference. ...

Flush NHibernate whilst still allowing transaction rollback

I am trying to use NHibernate with legacy entities that are not mapped with NHibernate. On occaisson this means that I need to manually flush NHibernate data to the database so that I don't receive foreign key exceptions when I try to connect the legacy entities with NHibernate-mapped entities. A problem occurs when this takes place wit...

Flash - Why doesn't my SharedObject get saved on disk when closing IE?

I have a Flash application that uses SharedObject to save and read some data locally. As it is said everywhere Flash saves the data from the shared object to disk when the application is closed. And indeed it does when I test it with the stand-alone Flash Player or all of these browsers: Firefox, Opera, Safari, Chrome, Flock... But it do...

PHP sleep() inside loop not updating DB

Hello, I have a php file that is fired by a cronjob every minute. When the php file is fired it updates the database, sleeps, etc It is programmed like this: $start = microtime(true); set_time_limit(10); for($i=0;$i<5;$i++) { updateDB(); time_sleep_until($start + $i + 1); } If this piece of code is run i don't see any chan...

Can I flush the event stack within Firefox using Javascript?

I have a hierarchy of tags within my HTML which all contain onclick event handlers. The onclick is pushed onto the event stack from the leaf back through the root of the hierarchy. I only want to respond to the leaf onclick event. Can I flush the event stack rather than using a flag? For instance... <ul> <li onclick="nada(...