Search:

Type: Posts; User: Ronix

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    53
    Views
    8,142

    The album sold around 3 million copies overall....

    The album sold around 3 million copies overall. Like I said, it was financially more profitable than its previous album... even if you ignore its physical release afterwards.

    Link1
    Link2



    ...
  2. Replies
    53
    Views
    8,142

    Sometimes I can't tell whether people simply...

    Sometimes I can't tell whether people simply underestimate each other, or are being outright misanthropes.

    The "pay what you want" method has been tried before, and it has been successful. Aside...
  3. Thread: Lisp Help

    by Ronix
    Replies
    1
    Views
    974

    (stringp object) Common Lisp has predicates...

    (stringp object)

    Common Lisp has predicates for basically every type. They're usually of the "sometype"p.
  4. - Use libsigsegv...

    - Use libsigsegv
    - Check that it's supported in your platform
    - Install a stack overflow handler

    You can handle the stack overflow in several ways. Typically, you would longjmp back to the fault...
  5. CommonTater's code is not going to work. You...

    CommonTater's code is not going to work. You can't pass a void* and call it as if it was a function (at least not without casting the pointer).

    You can't create a function that takes a function as...
  6. Replies
    38
    Views
    4,070

    My "all-time" favorite is C. It's beautifully...

    My "all-time" favorite is C. It's beautifully designed, and it's probably the only language that succeeds at everything it tries to be - A friendly looking, portable version of assembler.

    In...
  7. Replies
    5
    Views
    6,681

    maybe something like this? struct myt { ...

    maybe something like this?



    struct myt {
    int data[4];
    };

    queue<myt> myq;
  8. Replies
    2
    Views
    1,433

    Token concatenation occurs at preprocessing time....

    Token concatenation occurs at preprocessing time. However, you're trying to make up the name by accessing the value of the variable `i', which is unavailable to the preprocessor as it can be only...
  9. Thread: portable alloca

    by Ronix
    Replies
    4
    Views
    2,650

    You should check for the alloca.h header (Maybe...

    You should check for the alloca.h header (Maybe use a config script) since it usually provides a native implementation of alloca. From what I remember, glibc provides the header for many platforms.
    ...
  10. Thread: Template trouble

    by Ronix
    Replies
    12
    Views
    1,173

    If I remember correctly: template...

    If I remember correctly:



    template<class T>
    template<class V>
    double ZLine<T>::DistanceFromPoint(std::vector<V> v)
    {
    ...
    }
  11. Replies
    1
    Views
    1,026

    Any modern OS will set all memory pages used by...

    Any modern OS will set all memory pages used by your application to "free" again.
  12. It's not really that hard, specially if you're...

    It's not really that hard, specially if you're using KDE or GNOME since you only need to add a single line to /etc/ttys (And so you can avoid manually executing `startx' each time you init a...
  13. Replies
    10
    Views
    7,352

    Compiles for me on g++ 4.4.1, although I used...

    Compiles for me on g++ 4.4.1, although I used std::auto_ptr because I don't know the correct header for std::shared_ptr.
  14. Replies
    10
    Views
    7,352

    So, make the predicate a template: ...

    So, make the predicate a template:



    template<class T>
    bool shared_ptr_lt (const std::shared_ptr<T>& left,
    const std::shared_ptr<T>& right)
    {
    return (*left.get() < *right.get());
    }
  15. Replies
    10
    Views
    7,352

    You can pass a strict weak ordering predicate to...

    You can pass a strict weak ordering predicate to list::sort:



    bool myt_lt (const std::shared_ptr<my_t>& left,
    const std::shared_ptr<my_t>& right)
    {
    return (*left.get() < *right.get());...
  16. Replies
    9
    Views
    15,424

    std::string wtoa (const std::wstring& wstr) { ...

    std::string wtoa (const std::wstring& wstr)
    {
    return (std::string(wstr.begin(), wstr.end()));
    }


    Much better, imo.

    But, all in all, I'd seriously question the idea of converting from...
  17. Replies
    2
    Views
    2,617

    You should be able to assign the first expression...

    You should be able to assign the first expression you're echoing to a variable:



    for file in `ls *.txt `; do
    x=`expr "$file" : '\([^.]\+\)'`
    echo $x
    done
  18. Replies
    14
    Views
    2,111

    The first argument to `realloc' has to be either...

    The first argument to `realloc' has to be either a pointer that has been allocated via a standard library memory call (ie: malloc, realloc, calloc) or NULL. In your example, however, the contents of...
  19. Thread: O_largefile ???

    by Ronix
    Replies
    10
    Views
    11,765

    Add the command `-D_GNU_SOURCE' to your makefile...

    Add the command `-D_GNU_SOURCE' to your makefile to have it defined. ie: `gcc foo.c' becomes `gcc -D_GNU_SOURCE foo.c'
  20. Thread: O_largefile ???

    by Ronix
    Replies
    10
    Views
    11,765

    I believe O_LARGEFILE is a GNU extension. Add...

    I believe O_LARGEFILE is a GNU extension. Add `_GNU_SOURCE' to the defined preprocessor symbols and see if it works.
  21. Replies
    2
    Views
    12,229

    Something like: char sample_str[] =...

    Something like:



    char sample_str[] = "Special \x80 character!";


    Although your first method should work just as fine.
  22. Replies
    8
    Views
    1,956

    This header won't work at all. The biggest reason...

    This header won't work at all. The biggest reason is that `sizeof' is only available at compile time, and you're using it at preprocessing time, when it's unavailable. Secondly, you've got the...
  23. Replies
    11
    Views
    1,486

    free(NULL) is benign and works on every compiler...

    free(NULL) is benign and works on every compiler that I know of.

    On the other hand, your code may leak depending on what Actor_Init does. If it allocates memory dynamically for an ACTOR, then...
  24. Replies
    4
    Views
    3,871

    You can use gcc's regparm(n) function attribute...

    You can use gcc's regparm(n) function attribute to specify arguments passed via registers. As far as I can tell, you can only use it for x86, which means no 64bit registers.
  25. Replies
    3
    Views
    2,001

    You can't do that. At most, you can create a...

    You can't do that. At most, you can create a va_list out of the ellipsis and pass it to some function similar to `log' that takes a va_list in place of variable arguments. Or if your compiler...
Results 1 to 25 of 128
Page 1 of 6 1 2 3 4