Search:

Type: Posts; User: joshdick

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    6
    Views
    1,187

    Eureka! struct termios newtio;...

    Eureka!


    struct termios newtio;
    newtio.c_cc[VMIN]=7; // Minimum number of characters for non-canonical read.
    newtio.c_cc[VTIME]=2; // Timeout in deciseconds for non-canonical read.

    I found...
  2. Replies
    6
    Views
    1,187

    I do have a file descriptor for the serial port,...

    I do have a file descriptor for the serial port, but according to stat(), that file has size zero.

    Any other suggestions?
  3. Replies
    13
    Views
    1,545

    There's a flag for appending to a file. I think...

    There's a flag for appending to a file. I think it's ios::ate or ios::app.
  4. Replies
    6
    Views
    1,187

    Linux kernel 2.6.8.1 Mandrake 10.1

    Linux kernel 2.6.8.1
    Mandrake 10.1
  5. Thread: morals

    by joshdick
    Replies
    75
    Views
    14,273

    I swear we've had this conversation before. ...

    I swear we've had this conversation before.

    Whether you think is moral is ultimately up to how well you can rationalize it to yourself, but there's no escaping it's unethical. It clearly goes...
  6. Replies
    11
    Views
    2,543

    w00t

    w00t
  7. Replies
    6
    Views
    1,187

    read()ing larger chucks

    Is there any way to read larger chunks with read()? Normally, it will return any number of bytes it pleases less than or equal to the number provided. Currently, when reading from a serial port at...
  8. Replies
    3
    Views
    1,695

    vector v; T target; if(v.back() == target)...

    vector<T> v;
    T target;

    if(v.back() == target)
    {
    v.erase(v.back(), v.end());
    // or simply v.erase(v.back());
    }

    Does that work for you?
  9. Replies
    4
    Views
    2,059

    The answer to that likely is system-dependent. ...

    The answer to that likely is system-dependent.

    It's best to send as much as you can at once. The fewer system calls you make to write this file, the better.
  10. Replies
    4
    Views
    2,059

    It sounds like you're not on a *nix platform, so...

    It sounds like you're not on a *nix platform, so you should tell us your OS and compiler.

    I can tell you with a pretty good deal of certainty that the last thing you want to do is send one byte at...
  11. Replies
    4
    Views
    2,774

    I've read Beej's work and the man pages. I was...

    I've read Beej's work and the man pages. I was sending NULL during the first attachment, and the address I was sending the second time was page-aligned.

    It turns out that it works properly when...
  12. Replies
    4
    Views
    2,774

    Shared memory woes

    I'm searched the Web and this board, and I've read the man pages, and I've read two books that touch on this subject. I am getting a tad fustrated.

    The man pages say it's best to pass in NULL for...
  13. Replies
    4
    Views
    2,454

    I wish I had the time this summer. I think it's a...

    I wish I had the time this summer. I think it's a great move by Google. It'd be nice if Universities followed suit.
  14. Replies
    28
    Views
    5,406

    You have my sympathy. Have you talked to your...

    You have my sympathy.

    Have you talked to your RA about this? You could probably get him to arbitrate an agreement on temperature that will be warmer than 70&deg;.

    edit: What? No love for HTML...
  15. Replies
    45
    Views
    9,921

    void Function() { //myCode }I couldn't live...

    void Function()
    {
    //myCode
    }I couldn't live without lined-up braces.


    int *myPointer;
    For the obvious reason, to minimize the confusion over what's a pointer and what's not.

    if...
  16. For large programs, your flowchart should have a...

    For large programs, your flowchart should have a high-level viewpoint, probably only depicting how various modules interact.

    You don't need it here and now while you're programming something that...
  17. I'm currently writing a design document that will...

    I'm currently writing a design document that will end up well over a hundred pages. Therefore, I have no sympathy for you. Sorry.
  18. Replies
    18
    Views
    5,351

    Final Fantasy Just Final Fantasy, the original.

    Final Fantasy

    Just Final Fantasy, the original.
  19. Thread: C++ @ School

    by joshdick
    Replies
    9
    Views
    1,988

    Drexel University has Visual Studio available for...

    Drexel University has Visual Studio available for download by way of their FTP server. You should check with your college before spending your own money on it.

    Dev C++ is a very nice, free...
  20. Replies
    3
    Views
    1,016

    Yes, you can do this. platform1_debug: gcc...

    Yes, you can do this.



    platform1_debug: gcc -platform1 -debug file.c


    If that's your makefile, you can invoke that particular option like so:
    $> make platform1_debug
  21. Replies
    8
    Views
    2,767

    Combinatorics

    Combinatorics
  22. Replies
    15
    Views
    4,232

    You should hash the passwords before storing...

    You should hash the passwords before storing them. Then when a user attempts to logon, take their entered password and hash it, and compare that to what's in your record.
  23. Replies
    2
    Views
    1,024

    FAQ > How do I... (Level 3) > Accessing a...

    FAQ > How do I... (Level 3) > Accessing a directory and all the files within it
    http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046380353&id=1044780608
  24. Replies
    50
    Views
    5,969

    Speaking of simplicity, how about programming an...

    Speaking of simplicity, how about programming an AI for the Prisoners' Dilemma?
  25. Replies
    9
    Views
    1,764

    7stud's not wrong when it comes to standard data...

    7stud's not wrong when it comes to standard data types, but if you wanted, you could create a class and overload the () operator to allow for something similar to f(x) notation in code.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4