Search:

Type: Posts; User: patiobarbecue

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. how to link to internal functions in a library

    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...
  2. Do I need to wait in between fclose() and fopen()?

    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....
  3. Replies
    3
    Views
    4,143

    I think lfind() will call strcmp() with "aName"...

    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?
  4. Replies
    3
    Views
    4,143

    lfind() and strcmp()

    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...
  5. don't we need to release memory before exit(1)?

    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...
  6. Replies
    1
    Views
    1,697

    DIFF doesn't compare numerical values?

    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....
  7. Replies
    5
    Views
    2,430

    0 1 array? bit operation?

    (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...
  8. design pattern for information manager?

    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...
  9. Replies
    4
    Views
    6,145

    what's wrong with this map definition?

    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...
  10. YES, I thought of using an standard one, but...

    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...
  11. what design patter let me reuse this class?

    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){
  12. Replies
    1
    Views
    1,174

    makefile: not "all" are made

    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...
  13. Replies
    1
    Views
    2,786

    ldconfig not working anymore?

    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...
  14. thanks for the link. it looks like a high quality...

    thanks for the link. it looks like a high quality reference. I will go ahead and study it.
  15. which headfile has sig_atomic_t ?

    which headfile has sig_atomic_t ?
  16. I changed the line from if (signaled)...

    I changed the line from


    if (signaled) break;

    to


    if (signaled) exit(0);
  17. hey, thanks. I googled a few pages. this one,...

    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...
  18. thanks, reading binary file is much faster!

    thanks, reading binary file is much faster!
  19. hey, a example or link? I have no idea how to...

    hey, a example or link? I have no idea how to setup a handler for SIGINT. Thanks!
  20. 1 minute is not too bad, and I am not going to...

    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...
  21. You are right. I used to test it on small set in...

    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.
  22. reply: how i read the file

    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...
  23. how to let my program responds to CTRL+C (linux machine)

    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...
  24. what do you do to avoid loading large dataset again and again

    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...
  25. reference needed for socket programming with arpa/inet.h, sys/select.h, error.h

    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...
Results 1 to 25 of 48
Page 1 of 2 1 2