Follow up question:
What's the most graceful way to detect broken pipe? Currently, if either the client and the server close() its end of the pipe, select() on the other process will unblock...
Type: Posts; User: pppbigppp
Follow up question:
What's the most graceful way to detect broken pipe? Currently, if either the client and the server close() its end of the pipe, select() on the other process will unblock...
Oh my, that was it. There is a rouge close(socket) statement in my client socket write routine(left over from the non-persistent connection design). I didn't notice it for so long cause I kept...
I didn't do anything special to the socket. By default it blocks. The first read() works perfectly fine. I think I know what the problem is, but don't know the solution yet. My guess is that the...
I'm trying to read from a socket.
READ->DISPLAY;
KEYBOARD->WRITE(send)
The problem is that read() blocks the first time, but for some reason it does not block anymore afterward(which is also...
I think I got it to work. I'm on linux.
I'm basically trying to demux socket IO and keyboard IO such that a user can send and receive message at the same time.
new question:
Is it possible to...
Hi,
Does anyone know which function/library I should use to be able to read a line of user input without Curse? And once I find this function, the following code structure should be able to pick...
Thanks for the reply, here is the bash shell code you asked for
echo "hahaha" > data.dat
Regarding timeout, amazingly, I came to the same conclusion earlier. Still not sure why alarm()...
a side question about read():
Let say I create a text file containing 6 characters. It seems like when the file is written, it will end up with 7 character. So I guess there is a file delimiter...
Hi,
I'm doing some raw socket UDP send and receive. After establishing a UDP "connection" using connect()*, I use read() and write() on the client side to send/receive char data.
My client code...
Hi,
So basically, my understanding of lagrange quadratic is this
a(T) = L0( T )a( T0 ) + L1(T)a(T1) + L2(T)a(T2)
with L0(T) = ( (T - T1)/(T0 - T1) )( (T - T2)/(T0 - T2))
etc with L1(T) and...
yeah, thanks
Still can't make the image to look right. Histogram equalization is the closest I got but it stretches the contrast a bit too much. ie. previously black background becomes grayish.
Hi,
I'm implementing a laplacian mask image enhancement in Visual studio. I'm using a simple 3x3 mask of -1 -1 -1; -1 9 -1; -1 -1 -1 on some jpg; Applying the mask is easy. But I'm not sure what's...
I agree. I don't like to use hacks on code too. But I just want to use the simplest ways to solve this problem that I thought was trivial initially (the problem won't occur at all in Java)
Rest...
Hi,
I just gave it a shot and it seems to work pretty well. Thanks
The only problem seems to be that I can no longer define a double array like
int m[][2] = { { 1, 1 }, {1, 1} }
...
Thanks for the suggestion. Both methods would work, but I don't think they are allow in my assignment. The assignment focus is not on C++ language anyways. I'm just trying to find ways to shorten my...
Hi,
I'm using Visual C++. Let say I want to pass a const NxN matrix to a function, what syntax structure would allow the function to accept multiple value of N?
Currently, if I want to pass a...