In Kylix TEvent.WaitFor(Timeout) method only accepts Timeout of $FFFFFFFF, otherwise it generates an error. Internally it uses sem_wait function which doesn't have a timeout parameter. It there any way around this? I need to set a timeout parameter.
...
I'm trying to get the "0 of success, nonzero if error" return code from make in Vim. Specifically, I am on Ubuntu and using v:shell_error does not work.
After digging around and looking at this question, it seems to be because of my shellpipe setting, which is
shellpipe=2>&1| tee
The tee pipes the make output back into vim. The shel...
Hi,
I am building an application using clang libraries, I running to a
problem, it will be very helpful if somebody can give some directions.
#./a.out /home/nmathew/Desktop/algorithms/array.cpp gives
In file included from /home/nmathew/Desktop/algorithms/array.cpp:1:
In file included from /usr/include/c++/4.4.3/iostream:39:
In file i...
I copied all my resource into the main path with my aspx files.
I also copied my js folder in there. With linux my webpage loads /test.js but not /js/jquery.js. How do i make mono find the path to query?
-edit-
Nevermind, i found a solution with rewrite. ~/App_Data doesnt work though.
HttpContext.Current.RewritePath("/App_Data/" + fn...
Hi all
dear friends
The following test script has a problem. When I add the line (sleep 5 ) & in the script then the "while read" loop does not read all lines from the file, but only prints the first line.
But when I remove the ( sleep 5 ) & from the script, then the script prints all lines as defined in the file.
Why the ( sleep 5 ) ...
Hey there. I'm having a very strange problem with creating sha256 hashes. I made a simple C console program that takes a file path as an argument and uses the standalone sha256 code that can be found here. I compiled the program using MinGW 5.1.6 on Windows 7 x64.
When testing the program on a file, the resultant hash is wrong. I made s...
Hi folks,
I wanted to use DevC++ on Linux, so I've started it with wine and everything is OK until it came to run the file.
The C file compiles well and a .exe files generated that is able to run on Linux (without wine)
$ file '/media/F6AC746BAC74286F/Dev-Cpp/work/hello_on_nix.exe'
/media/F6AC746BAC74286F/Dev-Cpp/work/hello_on_nix.ex...
I have a new Ubuntu Linux Server 64bit 10.04 LTS.
A default install of Mysql with replication turned on appears to be leaking memory.
However, we've tried going back to an earlier version and memory is still leaking but I can't tell where.
What tools/techniques can I use to pinpoint where memory is leaking so that I can rectify the p...
I've been puzzled by a RTC problem for several days: i couldn't write to the RTC register.
Following is the code snippet and the value I read from the reg(last line) is always different from what i just wrote to the reg. Anyone can help me understand this ?
val = CMOS_READ(RTC_FREQ_SELECT);
printk(KERN_INFO "reading val=%d from...
hello. please forgive me if the question were asked before.
after some research on netfilter there are few loose ends that i cant comprehend.
where is the memory of the queue is and how is it being handled?
when you are using the queue is it being copied to the userspace or that you map the memory and how it influences the system perfo...
Hello,
gcc 4.4.3
vc++ 2008
I would like to make a timer application would be portable on windows and linux. However, would be suffice to start with.
My idea is to start a timer and set it for a specified number of seconds. When the time expires call a callback function.
Is that the best way to do this?
Many thanks,
...
I use libssh2 to login a remote computer, then call libssh2_channel_exec to execute a daemon program, the daemon program will then select a available tcpip port and print the selected prot to console(stdio). Then, the daemon will listen the port for the incomming connect.
After these step, the client will read the selected tcp port from...
Hello,
I'd like to start a piece of python script a thousand times! instead of trying to start them one-by-one how can I do that from linux command line?
Right now, I am doing it like this:
nohup python test.py &
nohup python test.py &
nohup python test.py &
nohup python test.py &
nohup python test.py &
...
Thanks in advance.
...
Hi,
I am using C language and Linux as my programming platform. And I have problems in setting up the serial port(/dev/ttyS0). In my small program, I set my serial port using tcgetattr and tcsetattr
options.c_cflag |= B115200;
options.c_cflag &= ~PARENB;
options.c_cflag &= ~CSTOPB;
options.c_cflag &= ~CSIZE;
options.c_cflag &= ~CRTSCTS...
I have absolute values of time(as in stopwatch not date/time) in various cells and I would like to add them and keep them the same format(as an absolute value). I have formatted the cells using hh:mm:ss time format. But when I add two values like,
22:34:00
4:00:00
I get,
2:34:00
because of wrapping around the 24-hour tim...
dpkg: dependency problems prevent configuration of liblaunchpad-integration1:
liblaunchpad-integration1 depends on libgtk2.0-0 (>= 2.8.2); however:
Package libgtk2.0-0 is not configured yet.
dpkg: error processing liblaunchpad-integration1 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent con...
Possible Duplicate:
C++ IDE for Linux?
I'm looking for a suitable for me IDE for C/C++. I'd like not to use projects etc, the main idea that I've accustom is to compile a file (not build a project) and run a compiled program then. So things like code::blocks as well as M$ VC are not for me... well, there is FreePascal IDE that...
After installing a full version of Cygwin, I open up the MinTTY shell and I like the green on black. However, when I do an 'ls', I get a dark blue for directories. It's not very readable. I found that the LS_COLORS environment variable controls the output of ls. Here is my current default:
no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=...
Hi, In some cases, I'd like to explicitly discard packets waiting on the socket with as little overhead as possible. It seems there's no explicit "drop udp buffer" system call, but maybe I'm wrong?
The next best way would be probably to recv the packet to a temporary buffer and just drop it. It seems I can't receive 0 bytes, since man s...
Hello,
Whats the best way to add a user/group in linux using C++ is there a library I can call on? I dont want to start doing things like:
fopen("/etc/passwd", "a");
fprintf(tmp, "%s:x:%d:1:%s:/%s/%s:/bin/ksh\n", username, usernumber, commentfield, userdir, username);
fclose(tmp);
fopen("/etc/shadow", "a");
fprintf(stmp, "%s:*LK*::...