Search:

Type: Posts; User: flp1969

Page 1 of 15 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    15
    Views
    165

    Here a simple example on how you can test your...

    Here a simple example on how you can test your regex:

    $ echo "\"$(echo "SPEAKER: Hello there, my friend. SPEAKER2: How are you, friend?" | grep -oE '[A-Z]+:(.)')\""
    "SPEAKER: "
  2. Replies
    15
    Views
    165

    Yes it is... For your example: "SPEAKER: Hello...

    Yes it is... For your example: "SPEAKER: Hello there, my friend. SPEAKER2: How are you, friend?" the regex:

    [A-Z]+:(.)
    Should match only a single space.
  3. Replies
    12
    Views
    152

    Bitmap File Format...

    Bitmap File Format
  4. Replies
    15
    Views
    165

    GNU Libc...

    GNU Libc, page 247. If you are using GCC and glibc...
  5. Replies
    17
    Views
    253

    For Windows: Charles Petzold - Programming...

    For Windows: Charles Petzold - Programming Windows 5th ed
    For Linux (or any other platform if you want portability): GTK+
  6. Replies
    24
    Views
    415

    Well....There is a pure mathematical solution....

    Well....There is a pure mathematical solution.
    If you want an expoent, you can use logarithm...


    int getexp( double d )
    { return floor(log2(fabs(d))); }

    But, of course, you have to add...
  7. Replies
    24
    Views
    415

    Actually, there is one solution, but it isn't...

    Actually, there is one solution, but it isn't pretty and match all the requirements. You are doing arithmetic and logical instructions, but not in C! :)
    You can use assembly (not inline assembly,...
  8. Replies
    24
    Views
    415

    Well... in that case, you cannot use frexp()...

    Well... in that case, you cannot use frexp() either (it's on math.h as you have to include using #include <math.h>, which uses #, < and >).
    And if you cannot use any arithmetic or logical operators...
  9. Replies
    20
    Views
    312

    /* the argument 'tree' is LOCAL to the function....

    /* the argument 'tree' is LOCAL to the function. It is a COPY from the
    original pointer!!! */
    void destroy(Bin_Tree *tree)
    {
    Bin_Node *root = tree->root;

    destroy_tree(root);
    ...
  10. Note, you don't get it... the right way, in this...

    sorry line 7 of your post should read then they can type: myvar->some_member[/QUOTE]
    Note, you don't get it... the right way, in this case, is:

    struct some_name { ... };
    typedef struct some_name...
  11. This is wrong... You are defining a type, not a...

    This is wrong... You are defining a type, not a var.
  12. Replies
    6
    Views
    192

    Historical fact: Dijkstra, in 1968, published an...

    Historical fact: Dijkstra, in 1968, published an article in ACM titled Go To Statement considered harmful, a couple of years before C.
  13. All the way? "Twenty two million, three hundred...

    All the way? "Twenty two million, three hundred and forty thousand, nine hundred and seventy six".
    And 1012? "One thousand and twelve" (no commas)...?
  14. Yep... I've got this hence I told not applying...

    Yep... I've got this hence I told not applying "qualifiers" or objects to the spelling.
    One can argue that since quantities greater than a unit are already expressing more then 1 thing, it doen't...
  15. Ok... Even when there are no sub units? For...

    Ok... Even when there are no sub units? For exemple: 2000 = two thousand or two thousands? Which one is wrong?

    Notice, I'm not qualifying the numbers as in "two thousand dollars"...
  16. Ok... coloquial way it is... so thousands,...

    Ok... coloquial way it is... so thousands, millions and so forth follow the same rule, right?

    What about the "and"s? They NEED to be counted as well...
  17. This is the coloquial way. In the formal way...

    This is the coloquial way. In the formal way there is more then ONE hundred in 300, there is 3 hundreds, plural...
    Even if one accepts the coloquial way for hundreds, what about thousands, millions,...
  18. I didn't skim the codes, but you have to account...

    I didn't skim the codes, but you have to account for the hundreds and above, when the magnitude is greater than 1 too:

    100 = one hundred
    200 = two hundreds

    1000 = one thousand
    2000 = two...
  19. Replies
    17
    Views
    599

    Yep... but bidimensional arrays are shortcuts to...

    Yep... but bidimensional arrays are shortcuts to unidimensional ones. a[3][5], in an array a defined as a[10][10] is the same as *(a + 10*3 + 5):


    #include <stdio.h>

    // Show the array using...
  20. Thread: qsort

    by flp1969
    Replies
    6
    Views
    219

    Notice: You get the pointers to two elements from...

    Notice: You get the pointers to two elements from the original array. If you are dealing with an array containing pointers to arrays of chars (strings), these void pointers need to be cast to char...
  21. Replies
    18
    Views
    562

    In another question we told you about precedence...

    In another question we told you about precedence and associativity of expressions. laserlight draws my attention to my confusion about "evaluation" and "grouping", and she's right (just remember, I...
  22. ODD is 2n+1, not 3n+1.

    ODD is 2n+1, not 3n+1.
  23. If you want speed, there is no way to avoid...

    If you want speed, there is no way to avoid this...
  24. Excluding tests against values above sqrt(N). ...

    Excluding tests against values above sqrt(N).

    Two of the greatest values multiplied which will give N are a*a=N, or a=sqrt(N). So, if you test N against values greater then 'a' you are...
  25. Replies
    14
    Views
    200

    The 999th character is at offset 998. The offset...

    The 999th character is at offset 998. The offset 1000 is always '\0'. Take a look:

    #include <stdio.h>

    int main( void )
    {
    char buff[11];

    fgets( buff, sizeof buff, stdin );
    printf(...
Results 1 to 25 of 359
Page 1 of 15 1 2 3 4