Questions tagged [flush]

1

votes
1

answer
93

Views

Perl socket (IO::Socket::INET6) is not autoflushing

I have a very strange scenario. I have a Perl application that receives input from several connections (sockets and pipes). Than I am forwarding the message to a pre-defined destinations (sockets are already opened). see code example: our %openSockets; sub forward_message{ my ($message,$ip,$port,$...
yanger
1

votes
0

answer
63

Views

Theory: Is flushing a file ten times per second a bad idea?

I have a Python script that logs data from several sensors. The datarate for each sensor is 10Hz. I want to plot or analyze this data in approximately realtime with other programs. The brute-force way (foregoing more elegant solutions that use databases, sockets, or other fancy constructs) would be...
Martin J.H.
1

votes
0

answer
102

Views

Print to Console in Real Time Python

I am currently writing a script that attempts to bind to as many servers that are in a specific conf.ini file. I have a for loop that will attempt to bind based on the information in that file, for each server. I would like there to be a real time output of what is happening i.e . ('Attempting to b...
Alan Wilson
1

votes
0

answer
25

Views

Send coordinates beetween Server and Client (Java)

How can i send coordinates of an object ('Player') from Server to Client? Server: package it.unical.igpe.online; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; public class Server { static ServerSocke...
Antonino S
1

votes
3

answer
259

Views

NRF24L01+ RX Mode and Flush

I have been trying to write my own code for NRF24L01+. I have a problem and I can not solve it As a receiver, I use STM32F103C8T6 and as a transmitter I use Arduino Uno. The problem is related to RX Operation. As I've mentioned above, As a receiver, I use STM32F103C8T6 and as a transmitter I use Ar...
PIC16F84A
1

votes
0

answer
145

Views

Flush interval in elasticsearch bulk processor

I have an index with refresh_interval = 10s, so every 10s all buffered content is saved on disk in a newly created segment. All operations on this index go through a bulk processor. For synchronization matters between indexes and searches, what we need is to execute the bulk every 5s but without fl...
user8398650
1

votes
2

answer
252

Views

Getting Python HttpServer response instantly

I am using Python HttpServer in the server side. One GET request will take more time to respond and I want to update the user the current status of it, such as 'Fetching module X. Please wait', 'Fetching module Y. Please wait'. But, it is not getting updated in the client side even though I sending...
Dinesh
1

votes
1

answer
34

Views

Flushing AST CDT

I made some changes in AST via ASTRewrite and applied the changes via Change.perform, the C file has been update correctly with the new changes (insert new node), but in the debug mode AST object doesn't feel those changes ast.getRawSignature(); // C file code as text ASTRewrite rewriter = ASTRewrit...
Mostafa Hassan
1

votes
1

answer
66

Views

Use Flush(True) and FlushFileBuffers both?

I want to write to a file and flush to disk immediately. Other questions on SO pointed out that Flush(True) isn't reliable on .NET 4.0. I am indeed using .NET 4.0 and can't upgrade any time soon. Is FlushFileBuffers reliable? or is it known to have a bug too? Is there an option that I can use or sh...
user1071840
1

votes
0

answer
27

Views

Python3 print (something, flush=True) only working on localhost, get buffered externally

I have this python test script to print realtime to my webpage. When I run it locally, it it runs well (http://localhost/cgi-bin/test.py), but if I run it from another computer, it gets buffered and the whole page waits until completion. Here's the snippet: #!/usr/bin/python3 import time print ('C...
Rene
1

votes
2

answer
45

Views

wait synchronously for rsyslog flush to complete

I am running rsyslogd 8.24.0 with a local logfile. I have a test which runs a program that does some syslog logging (with entries from my test going to another file via rsyslog.conf setting) then exits back to a shell script to check the log has expected content. This usually works but sometimes fai...
user3775289
1

votes
0

answer
31

Views

bash tty input drain (or flush?) (again)

I messed up my previous ask, dunno how to fix it, asked moderator to supress it. I re-ask here my question in a simpler form more understandable. How to drain any type ahead on the stdin before issuing a Query/Reply sequence to a terminal emulator from bash. The demo below emulate a command loop in...
Phi
1

votes
1

answer
894

Views

Rhino UnitOfWorkApplication + Castle Automatic Transaction Management application does not flush automatically on request end

I'm building ASP.Net MVC aplication based on UnitOfWorkApplication and I'd like to use Castle ATM facility. At the moment I've problem with flushing the session on request end. My service class (which is called in my controller action method) looks like this: [Transactional] public class UserAdminSe...
Buthrakaur
1

votes
2

answer
1.6k

Views

JPA NamedQuery does not pick up changes to modified Entity

I have a method that retrieves Entities using a NamedQuery. I update a value of each entity and then run another named query (in the same method and Transaction) filtering by the old value and it returns the same Entities as if I had not changed them. I understand that the EntityManager needs to be...
1

votes
2

answer
1.6k

Views

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...
dacracot
1

votes
1

answer
349

Views

Custom stream flush type

I've had multiple questions on the matter of streams and stuff, but after thinking for a bit, I've come to the conclusion that all I need is a custom flush type. I want my stream to flush when it gets a new line. It saves having to type out std::endl. Is it possible to implement this? I'm using an o...
Jookia
1

votes
1

answer
447

Views

NHibernate & session-per-conversation in AJAX scenario: manual flush needed?

we are facing a very strange problem with our application, until now i see no option to solve the problem: The application uses NHibernate (3.1.x) in an session-per-conversation architecture, meaning at start/end of each ASP/IIS request a NHibernate session with a new transaction is opened/closed +...
johngrinder
1

votes
1

answer
1.3k

Views

Issue with objective C outputstream flushing?

Hello I'm having an issue with an NSOutputStream in Objective C. I've got a server running up on my computer and the iPhone emulator sends data to the server and the server should send it back. The only issue is, when I send it, It's not sending the text until I exit out of the Emulator, and only th...
Tyler Petrochko
1

votes
3

answer
433

Views

python bsddb doesnt flush when removing entries

I got a python BSDDB database. Obviously, it's stored on the hard drive. When I remove some entries, the file on the drive does not get any smaller (consequently - it grows quite fast...) utDelList = [] urlsDelList = [] for ut in iter(self.urls2task): tmp = string.split(ut, ':') uid = tmp[1] url =...
ejndzel
1

votes
1

answer
194

Views

Is object.__del__(self) the most appropriate place to flush a logging class?

I have a custom logging class for my Python script with a flush() method which print()s the contents of a list. I would like to include flush() in the special __del__() method in case the program ends without the log being flushed. However a note in the documentation states: [...] when del() is inv...
Samuel Harmer
1

votes
1

answer
2.3k

Views

FlushFileBuffers on already written file

I have a component that writes his structure to a file. The problem is that the data that he writes needs to be consistent at any system failure. So I need to physical write the data. The problem is that the component doesn't have such an option and to make a filesaver function from component data w...
Spider
1

votes
1

answer
1.3k

Views

Why is CGLFlushDrawable so slow? (I am using VBOs)

My application details: Running on : Macbook pro with 4GB RAM, ATI Radeon X1600 with 128MB VRAM, Opengl version: 2.1 ATI-7.0.52 Using vertical sync (via CVDisplay) : YES Programming Language: Lisp (Lispworks) with FFI to Opengl Pixel Format information ns-open-gl-pfa-depth-size 32 ns-open-gl-pfa-s...
1

votes
1

answer
1.9k

Views

Setting a delayed shutdown time on a remote LInux via SSH then exiting

I have looked at all the answers here on SOF, and not seen what would work. My goal: Have a EC2 QA server halt itself 55 minutes after last usage My strategy: Everytime the remote machine is used, it is first checked to see if it is running. If it is, then do the following: ssh into machine run 'sud...
Dennis
1

votes
2

answer
295

Views

Is output buffering possible inside of flush?

I'm trying to show function status as its looping but delete the previous status before the next one shows. Current code: // Dynamic head content as a result of the php functions above Now this works, but displays all the echos one after the other. I'd like the next status to replace the first, un...
GameDevGuru
1

votes
2

answer
10.7k

Views

Socket tcp c# how to clear input buffer?

I'm writing an application for windows phone and I need to communicate with a server and transmit data. The SERVER is written in C++ and I cannot modify it. The CLIENT is what I have to write. The Server is designed such that the client connect to it and transmit data. The connection remains open fo...
Emanuele
1

votes
2

answer
2.4k

Views

How to flush buffer data to disk when using FFmpeg to write a mp4 file?

I am using FFmpeg to write a mp4 file, I grab bitmap images from remote IP camera and encode it by h.264, the media container is mp4 file, no problem to generate the MP4 file if I only record several minutes, the problem is FFmpeg never flushs buffer data to disk when I call method av_interleaved_wr...
Sean
1

votes
2

answer
746

Views

Python stderr - fail to parse exception message

I want to parse the exception print so that not all the exception data will appear. for example, I have the following exception message: Traceback (most recent call last): File 'C:\flow_development\console_debug_sample.py', line 52, in raise Exception('Exception occur') Exception: Exception occur a...
EitanG
1

votes
1

answer
5.7k

Views

How to flush gstreamer pipeline

Case Reading from a file continuously and feeding to appsrc element. Source - appsrc I have a GStreamer pipeline in PLAYING state. Now would want the pipeline to flush / clean when I press a button that means appsrc queue should be cleared. The playback should start from whatever buffers are now...
user2618142
1

votes
2

answer
108

Views

Issue with out.flush() with a webserver

I am using out.flush() in a jsp to update regularly the results of some execution in the browser. It is a long execution, about 10 minutes, and I don't want the browser to look like it is waiting forever. (It also avoids timeout errors). It works fine, when connecting directly to tomcat port, but wh...
richardtz
1

votes
1

answer
55

Views

error while doing lseek on a timer fd

This post: Empty or 'flush' a file descriptor without read()? , says that it is possible to do a lseek() on a fd you don't want to read from, thereby avoiding unnecessary copying, but this does not apply to fds I create with timerfd_create(). Why is this so and does there exist a workaround (except...
user1095108
1

votes
1

answer
593

Views

delete() not does persist anymore in grails 2.4.1

While migrating a project from 1.3.7 to 2.4.1 I stumbled over several things. One of them is, that I found obj.delete() does not persist anymore in 2.4.1 unless I use obj.delete(flush:true). When I read the Grails UserGuide where it says '... the instance being deleted immediately' I understand that...
Andi Schweizer
1

votes
1

answer
622

Views

Flushing out Message queues in Linux systems

I am working on my codebase where I need to flush out the existing messages in my message queue .I would preferably not like to delete the message queue and create it again.(But thats like the worst case option).Can someone guide me in this regard? Thanks Satwik
Satwik Krishna
1

votes
2

answer
1.3k

Views

Doctrine2 ORM EntityManager fetch an occuring error

I have an entity named Theme, its name is not the Id, but should be indexed and unique : /** * @Entity @Table(name='themes', * uniqueConstraints={@UniqueConstraint(name='theme_unique',columns={'name'})}, * indexes={@Index(name='theme_idx', columns={'name'})}) */ class T...
Vincent
1

votes
2

answer
345

Views

flush() in rd.include vs rd.forward()

I have the following code snippet in my web app: if (request.getParameter('user').equals('luke')||session == null && !(uri.endsWith('html') || uri.endsWith('LoginServlet'))) { System.out.println('>'); pw.println('zzzzzzzzzz'); this.context.log('Unauthorized access request'); pw.flush(); tr...
jayendra bhatt
1

votes
1

answer
539

Views

Prevent timeout using flush but page not redirecting after flush

I am preventing timeout using flush. I've tried other methods but the load balancer settings are locked to me. My script processes huge amount of records fully. if (mysqli_num_rows($stream) > 0) { while($row = mysqli_fetch_assoc($stream)) { //updating user's ticket information $unique = $row[ticke...
Cody Raspien
1

votes
1

answer
469

Views

How to get the database snapshot of a Hibernate Managed Entity just before it is flushed

I wonder if Hibernate could retrieve the original field value of an Entity before updating it? For example, having the entity class StkItem { private int Qty; } After the user enters a new quantity, could I know what is the database value of Qty before saving the new value?
Nassim MOUALEK
1

votes
1

answer
406

Views

python InputDevice fflush

I use python-evdev library for detect keyboard event. But I have a problem, I need flush the keyboard event after I have detect key. example: from evdev import InputDevice, categorize, ecodes dev = InputDevice('/dev/input/event1') for event in dev.read_loop(): if event.type == ecodes.EV_KEY: print(c...
Michele Mancini
1

votes
1

answer
436

Views

C# using Streamwriter: last “buffer” is appended twice though using Flush()

I've read a lot about using the Streamwriter. At least I have a solution that nearly works - but in some files, the last line is appended twice. I tried inserting Flush() at the end of writing and even after every if statement, but the behaviour stays the same. Maybe someone knows an answer and can...
user2550641
1

votes
1

answer
917

Views

How to get python matplotlib to flush all graphics

I'm playing around with some large datasets that change as a function of some parameter i can control. I now want to plot the distributions of my data in sub-plots in the same figure. However, since the data is quite large it takes a while to construct the histograms. So, I would like the sub-plots...
Mikael Fremling

View additional questions