Search:

Type: Posts; User: Yonut

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Ty for the links, the letter spacing doesn't help...

    Ty for the links, the letter spacing doesn't help much but the `em` page helps. I will admit, when I first saw a reference to `em`, I wrote it off as `css` crap, as that is the only context, up...
  2. Is there a way to determine string width (not string length)?

    Hi,

    I'm trying to create a scrolling feature for a webpage index. I'm trying to find a way to determine the width of a string.

    For example, I have two strings with 20 characters:...
  3. Hi, thanks for the reply. It is actually for...

    Hi, thanks for the reply.

    It is actually for Linux and then (down the road) Mac OS.

    For an example, just in case I wasn't making sense...

    I can load a pdf with `evince`, scroll down a bit so...
  4. Focus initial instance from a secondary instance

    Hi,

    I want to recreate a feature I have seen before, but I can't find any reference of how to implement it.

    I have a dropbox application (custom, encrypted, ftp-like client), and I want to make...
  5. What about removing the ability to use images? I...

    What about removing the ability to use images? I mean this is a code site, right?
  6. Replies
    2
    Views
    766

    Testing pipe for data

    Hi,

    I have opened a pipe (popen) to a program (ir-keytable), and need a way to test whether there's more data in the pipe or if it's empty.

    Failing that, I need a way to clear all data in a...
  7. Replies
    3
    Views
    857

    The short story is I'm setting up a remote...

    The short story is I'm setting up a remote control for a credit card size computer. While setting it up, I found out that I don't need the hassle of setting up LIRC anymore, thanks to ir-keytables...
  8. Replies
    3
    Views
    857

    I've tried the following without success: ...

    I've tried the following without success:

    if(setvbuf(pp, NULL, _IONBF, 0) != 0)

    I'm not understanding this, because when I run the command on a terminal, it's line buffered.
  9. Replies
    3
    Views
    857

    Fully buffered popen?!?

    Hi,

    I'm having trouble with `popen`, it seems like it's fully buffered instead of line buffered. I have the following code:

    // Declare includes.
    #include <errno.h>
    #include <stdio.h>...
  10. Sorry to go off topic... Don't worry,...

    Sorry to go off topic...





    Don't worry, you won't ever see it like that. :wink:
  11. After adding the following: #include ...

    After adding the following:

    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>


    I get the following error:

    encrypt.c: In function 'xorFile':
  12. Replies
    3
    Views
    888

    For me, programming is about structure. When...

    For me, programming is about structure. When declaring variables, I
    just always initialize them to


    {0} or NULL

    for pointers. And the declaration is just that, no adding value, just...
  13. Replies
    3
    Views
    888

    InfoBox with a FIFO file.

    Hi,

    I will try to not be long winded, but I do want you to have a proper understanding...

    I have an `info-box` on my desktop, which is nothing more than a `xterm` window which displays the...
  14. Thread: Median of 3

    by Yonut
    Replies
    5
    Views
    1,090

    Sorry to hijack this thread, but is `-pedantic`...

    Sorry to hijack this thread, but is `-pedantic` just useful if you're worried about porting? Are there any benefits if the code it staying put?
  15. Replies
    16
    Views
    2,254

    The compiler will let you know. I just think...

    The compiler will let you know.

    I just think sorting through a bunch of strings to find a variable name seems harder in your expample than to just look for a percent sign (%) which isn't a usual...
  16. Replies
    16
    Views
    2,254

    I don't know if this is a standard, but most...

    I don't know if this is a standard, but most people would write this:

    printf("%s%d%s%s\n", "The number you entered is ", number1, " and the character is ", string1);

    Like this:

    printf("The...
  17. Replies
    7
    Views
    1,251

    Sorry, I should have included more info. It's...

    Sorry, I should have included more info.

    It's for a webpage, and I need to output all the head information (CSS, Javascript, meta tags). I just didn't want to have to type out `printf` for every...
  18. Replies
    7
    Views
    1,251

    Best way to print a large amount of text.

    I have been experimenting with C in a cgi environment. What a difference from php.

    Anyway, I'm wondering what's the best way to print a large amount of text? The best I have been able to come up...
  19. Replies
    13
    Views
    1,495

    Wow Salem, it's like you can see into the future....

    Wow Salem, it's like you can see into the future. I shouldn't have writen off your comment so quickly. I now use the following for my main function template:


    int main (int argc, char *argv[]...
  20. Replies
    13
    Views
    1,495

    Ty all, this has been interesting.

    Ty all, this has been interesting.
  21. Replies
    13
    Views
    1,495

    I have no idea how to invoke a program without...

    I have no idea how to invoke a program without using it's filename. It's my understanding that argv[0], when declared in the main function header, will always contain the program filename.
  22. Replies
    13
    Views
    1,495

    You're right, I just used what was reported from...

    You're right, I just used what was reported from the compiler without giving any thought to the flags I use.

    compilation terminated due to -Wfatal-errors.

    For the record, I always use the...
  23. Replies
    13
    Views
    1,495

    I feel I might not have been as clear as I could ...

    I feel I might not have been as clear as I could have. I always test for the number of command line arguments because I don't like misusing one of my programs. If a program takes no arguments, I...
  24. Replies
    13
    Views
    1,495

    Using argc without argv. (-Wfatal-errors)

    Hi,

    I'm starting to notice how much I reuse certain code. For instance, this is a common `test` in many of my programs:

    if(SOME_TEST == FAILED)
    {
    fprintf(stderr, "%s: FUNCTION_NAME...
  25. Replies
    3
    Views
    1,031

    You might also want to try and make the variable...

    You might also want to try and make the variable you use with `malloc` and `realloc` initialized to `NULL`. Then you can just use `realloc` in a loop without the initial call to `malloc`.
Results 1 to 25 of 73
Page 1 of 3 1 2 3