I've found solution to this issue.
Apparently XP SP3 and later throttle back transmission of UDP datagrams that are larger than 1024 bytes (by default). This can be changed by setting the following DWORD registry variable...
I have a multicast file transfer program which seems to be having some issues with speed on particular versions of Windows.
I had a user of the software email me saying he was unable to get efficient file transfer speeds when running the sender under Vista SP2 or XP SP3, but good speeds on XP...
The sort would work if your version of ls outputs the time as 'yyyy-mm-dd HH:MM', although many (like the OP's) output it as 'mon d [HH:MM| yyyy]' (time is displayed if the file is < 6 months old, otherwise year is displayed). Of course, even then you still have to have the full output of the...
The prototype for fgets (from the man page) is as follows:
char *fgets(char *s, int size, FILE *stream);
You would pass the size of the buffer in the second parameter, and stdin for the third.
As for trimming the newline, just check the last character in the string, and if it's '\n' zero it out.
You're reading in more characters than your buffer can handle. You read in 5 characters, but the buffer is also 5 meaning there's no space for the null terminator.
What you really should be doing is using fgets() instead of gets() to read from stdin. fgets() allows you to specify the size...
Even though the function doesn't have a return value (i.e. the C function returns void and in VB it's a Sub instead of a Function), that doesn't mean it doesn't return anything.
The Sub declaration in VB says that the argument "array" is passed by reference (via the ByRef keyword). This means...
The most straightforward way is to boot the system from CD, mount the root filesystem manually, and clear root's password entry in /etc/shadow. I don't know if an E10K is different than other system in regard to doing that, though.
If you have rlogin access from another server, you can also...
Writing a VB macro on the client is definitely the way to go. I did something similar to this to allow me to run a program or script on my PC when a specially crafted email arrives in my inbox.
I came across an interesting issue related to this.
I have a C program which opens a log file, then dups the file descriptor to stderr (fd 2) and closes the original fd. I then can call fprintf(stderr,....); to write to the log file.
On Solaris and Red Hat, this works fine. However, when I...
This is something I stumbled across once while trying to cut and paste text in IE. This trick works in IE 5.5 and IE 6.0.
Open up any web page in IE that contains a standard button. Drag over a portion of the page so that a button is highlighted (or press ctrl-a to select all). Now drag over...
The idea was to have something that works under either Unix or Windows, which is why I was looking for something within Java to do this.
We do have some java apps on production Solaris machines that essentially run "java class &" from a script. However, if an SA needs to manually restart the...
I kinda figured as much. Thanks for the connfirmation.
That said, where would a daemon thread typically be used? Is it just a way to avoid having to wait for certain threads to exit?
I'm trying to find a way to have a java program put itself in the background, rather than having the shell do it via "nohup java class" or "java class &". I tried creating a sample program that calls setDaemon() as follows:
public class jthread extends Thread
{
public void run()
{
int...
In UNIX environments, a process can be put in the background by first calling fork(), which creates a new process identical to the caller. The new process then calls setsid() or setpgrp() to detach from the terminal, and the parent process exits. This results in the command issued by the user...
I wrote something like that myself once. Here's some source:
http://www.tcnj.edu/~bush/longmult.c
http://www.tcnj.edu/~bush/bigint6.C
The first is C, the second a set of C++ classes. It's not as efficient as GMP, but it at least works. Should give you a good starting point.
You can also have the script call "at" on itself at the end to reschedule. That way, you don't have to worry about it getting killed off while its sleeping.
An quick way around this is to break up the declaration of the constant. Instead of doing this:
char MyConstant[] = "value";
Try this:
char MyConstant[6];
MyConstant[0]='v';
MyConstant[1]='a';
MyConstant[2]='l';
MyConstant[3]='u';
MyConstant[4]='e';
MyConstant[5]=0;
If you have a socket marked as non-blocking and you attempt to either accept() or read() when nothing is available, the function will return -1 with errno set to EWOULDBLOCK (or EAGAIN). If the socket is marked as blocking, then accept() will wait until a connection is established, and read()...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.