Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.36 seconds; generated 23 minute(s) ago.

  1. Thread: c posix timer

    by Salem
    Replies
    3
    Views
    1,178

    So why don't you make your serial line unbuffered...

    So why don't you make your serial line unbuffered and call read() with a single char buffer from a thread?

    The thread will block until there is a char available, and because it's unbuffered, it...
  2. Replies
    1
    Views
    257

    > I just posted a post it and already has more...

    > I just posted a post it and already has more than 4 thousand views!
    It says 14 people at the bottom.


    Besides, pressing F5 also bumps the count, so don't believe the number of "views" has any...
  3. Replies
    12
    Views
    2,126

    Perhaps put breakpoints in your coroutines. ...

    Perhaps put breakpoints in your coroutines.

    Debugging anything with any kind of internal asynchronous behaviour (processes, threads, coroutines) can be challenging.
    GDB has a lot of thread...
  4. Replies
    5
    Views
    4,072

    Are you dedicating 3 to 5 hours of your day to...

    Are you dedicating 3 to 5 hours of your day to just learning?

    The first port of call for network programming would be this -> Beej's Guide to Network Programming

    The next question would be,...
  5. Replies
    5
    Views
    4,072

    > Want to work as freelancer part time in...

    > Want to work as freelancer part time in "network programming",
    So what's your day job?

    Part time can be anywhere between 1 hour a month and 20 hours a week.
    What's your commitment?

    > 1-...
  6. Thread: c posix timer

    by Salem
    Replies
    3
    Views
    1,178

    > if timr period is short and before function...

    > if timr period is short and before function exit, another fire occurs, what would happen?.
    Signals are not queued.

    Generally speaking, you should not be doing a lot of work inside signal...
  7. > As per your advice there is no difference...

    > As per your advice there is no difference between int and short they both serve the same purpose.
    No.

    These are the minimum capability required by the standard.

    On any real machine,...
  8. The standard requires that the minimum range of...

    The standard requires that the minimum range of these types should be as follows.
    minimum value for an object of type short int
    SHRT_MIN -32767 // −(215 − 1)
    maximum value for an object of...
  9. Replies
    2
    Views
    317

    ankitdixit is a shill for interviewbit This is...

    ankitdixit is a shill for interviewbit
    This is your last warning ankitdixit - one more post from you with your spammy site will be your last.
  10. Thread: Help, please

    by Salem
    Replies
    8
    Views
    2,622

    Did you even fix the problems pointed out?

    Did you even fix the problems pointed out?
  11. Thread: variable space

    by Salem
    Replies
    1
    Views
    466

    The compiler writer looks at what the machine is...

    The compiler writer looks at what the machine is capable of, then decides on appropriate sizes for things like integers, chars etc.

    You as a user of that compiler are stuck with those choices.
  12. Replies
    1
    Views
    924

    First off, reading the standard won't teach you...

    First off, reading the standard won't teach you how to program.

    Any more than reading a dictionary can help you learn a natural language.

    For $0
    The last draft for C99 is at Index of...
  13. Bear in mind that the number of files you can...

    Bear in mind that the number of files you can have open at once is relatively small (compared say to the amount of memory you can allocate).

    File Handling | Microsoft Docs
    How to Use Ulimit...
  14. Thread: Help, please

    by Salem
    Replies
    8
    Views
    2,622

    It's the whacked font that makes 'o' and '0' look...

    It's the whacked font that makes 'o' and '0' look identical which isn't helping either.
  15. Thread: Help, please

    by Salem
    Replies
    8
    Views
    2,622

    Compile with warnings enabled. $ gcc -Wall...

    Compile with warnings enabled.


    $ gcc -Wall foo.c
    foo.c: In function ‘main’:
    foo.c:21:36: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘float *’ [-Wformat=]
    ...
  16. Replies
    1
    Views
    474

    So which compiler are you using? > void main()...

    So which compiler are you using?

    > void main()
    main returns an int.

    > Xc = 1;
    > Yc = 1;
    Surprised the compiler will do this, given they're pointers.

    > Xc = 0; //&a;
  17. Replies
    4
    Views
    617

    bytes per sample is like 2 usually.

    bytes per sample is like 2 usually.
  18. Replies
    4
    Views
    617

    > u_int32_t duration_in_second = 129; > ...

    > u_int32_t duration_in_second = 129;
    > u_int32_t kilobytes_per_second = 192;
    192 x 129 is never going to be 2.1MB

    Your calculation is plain wrong.
    channels * bytes per sample * samples...
  19. Replies
    1
    Views
    246

    > if (packetRead < 0) This will get you out of...

    > if (packetRead < 0)
    This will get you out of the loop without doing anything.

    Perhaps add some diagnostics to your code - rather than assume success and posting on a forum when it doesn't...
  20. Replies
    2
    Views
    667

    > Where is mistake, for small numbers alghortim...

    > Where is mistake, for small numbers alghortim seems to work fine.
    Because the approach of "try all the possible ways" always results in "time limit exceeded" when presenting with larger numbers....
  21. You need to at least show some attempt to solve...

    You need to at least show some attempt to solve the problem.
    That way, we can really help with the problem you're really having.



    Or we just assume you're just lazy and ignore you.
    This isn't...
  22. Replies
    5
    Views
    2,943

    Here's what C99 says:

    Here's what C99 says:
  23. Does "other languages" include C++ ? Whilst...

    Does "other languages" include C++ ?

    Whilst you can write GUI programs for windows in C, you have to write a LOT of code just to make anything remotely useful happen.

    With C++ and a GUI...
  24. The constness is lost by doing this char *p_tag ...

    The constness is lost by doing this
    char *p_tag = strstr(pData,"ticks");
  25. strtok() WRITES to the string. If the string is...

    strtok() WRITES to the string.
    If the string is read-only (which it is), then you get a segfault when you try to modify it.

    You need to make a copy of the input string in a temporary buffer, then...
Results 1 to 25 of 491
Page 1 of 20 1 2 3 4