I am using an open source library, there are quite a few interesting functions prototypes defined this way in a non-interface header file:
#define somefunction _somefunction
void...
Type: Posts; User: patiobarbecue
I am using an open source library, there are quite a few interesting functions prototypes defined this way in a non-interface header file:
#define somefunction _somefunction
void...
Dear there,
I am wondering whether a sleep(1) is necessary in the following pseudo code.
for (i=0;i<100000;i++){
1. open a file, write new content to it, and close it
2....
I think lfind() will call strcmp() with "aName" and one of obj[0], obj[1], ...int turn. However the result is not what I wanted. Any suggection?
Dear there, I got inconsistent result on using lfind() and strcmp(), can anyone help me out? Thanks.
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <search.h>
#include...
Dear there,
I learned to release everything malloced before exit. however this code from die.net doesn't do it.
tsearch(3): manage binary tree - Linux man page
is it wrong or I missed...
Dear there,
I downloaded a numerical package, which includes test code and its output txt files. After I run a few tests and eyeballed some discrepancy, I felt a thorough comparison is necessary....
(I heard of this for long... never learned it, and today it is the time...)
I have a giant M x N matrix, and I am using a M vector and a N vector to hold 0 and 1, which indicate which column or...
Dear there, my development of a numerical application involves lots of data, and various modules. Using traditional array to pass data between routines and modules have been tedious. I always forget...
The error is :
loganalyzer.cpp: In member function ‘void Loganalyzer::conditionaldistribution(size_t, size_t, size_t, size_t, size_t, double)’:
loganalyzer.cpp:1091: error: template argument for...
YES, I thought of using an standard one, but didn't find it. I need a circular queue or linked list, which doesn't seems to be in the std. so I start to make one myself.
I probably can use...
Hey , there,
I though it is an easy one, but I am stuck here: I have a class like this:
class Circulararray(){
int l;
double* data;
public:
Circulararray(int length): l(length){
hey, I must forget the syntax and got this strange phenomenon. In my makefile, I have
IB.a:errorcode.cpp EClientSocketBase.cpp EPosixClientSocket.cpp Myewrapper.cpp
all: test1 IB.a
and when...
hey, there, I am under UBUNTU. I usually put a rarely used shared library into a local directory, and put the local directory into the file /etc/ld.conf.so.d/rarely.conf, and then run ldconfig, and...
thanks for the link. it looks like a high quality reference. I will go ahead and study it.
which headfile has sig_atomic_t ?
I changed the line from
if (signaled) break;
to
if (signaled) exit(0);
hey, thanks. I googled a few pages. this one, IPC:Interrupts and Signals: <signal.h>, as it is written does not terminate itself. I updated it with the volatile variable suggested in the previous...
thanks, reading binary file is much faster!
hey, a example or link? I have no idea how to setup a handler for SIGINT. Thanks!
1 minute is not too bad, and I am not going to spend hours to squeeze a few seconds out of it. The problem is that I need to call the function many times (>=40?) during the day. And it is not fun to...
You are right. I used to test it on small set in the last a few weeks. At this time point, I need to test it over large set more often. And it becomes a pain on neck.
it is a very simple csv file with three fields:
time, double, double
but I have 11,737,015 lines. "wc" it on my machine takes more than 1 minutes. The reader uses getline() and the following...
My code is basically a infinte loop, I can check a preset time to terminate it, and call final reporting routine. however it is more convenient for me to press CTRL+C, if the code can still call the...
hey, there,
At beginning of my code , I first read a large data file and then do analysis of the dataset. I never change the dataset. The datafile is large, >=300M. I frequently change the...
Dear there,
I had difficulty to use an beta version API, which is based on the following three head files.
// LINUX
// includes
#include <arpa/inet.h>
#include <errno.h>
#include...