Search:

Type: Posts; User: Jessehk; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Re: compile fortran subroutine using matlab via mex

    Thanks melissawm.

    It's strange that TMW advises that MATLAB R2009a is compatible with this release of Ubuntu ("Ubuntu 8 and above"...
  2. Replies
    20
    Views
    824

    Re: Haskell syntax help?

    Haskell is whitespace sensitive. What that means is that you have to have a consistent indenting style composed of either tabs or spaces. If you mix them or if the code is improperly formatted, you...
  3. Replies
    143
    Views
    18,865

    Re: [Beginner] Programming Challenge: 5

    A little verbose for my personal taste, but it works. :)



    ;;;; A number guessing game.
    ;;;; Run MAIN-LOOP to run the game.
    ;;;;
    ;;;; By Jessehk, Fri. August 29 2008

    (defun...
  4. Replies
    37
    Views
    1,508

    Re: [Newbie] Java vs C++

    You're all getting ahead of yourselves.

    To the original poster: Java is an excellent choice for a (notice: not the, but a) first language with respect to library availability to do neat things,...
  5. Re: Lessons about biases learned from language flamewars

    Agreed. It's getting rather annoying (not to mention these provocative (er..."flame inducing") threads thinly-veiled as attempts at reaching common understanding (i.e., agreement with you, pmasiar))....
  6. Replies
    15
    Views
    811

    Re: Trigonometry help!

    I didn't know we were talking about segments. I should probably read the topic a bit more closely, eh? :)
  7. Replies
    4
    Views
    378

    Re: Determining user home folder

    #include <stdlib.h>

    int main( void ) {
    char *hd = NULL;

    if ( (hd = getenv( "HOME" )) == NULL ) {
    /* $HOME environmental variable not set */
    }

    /* hd contains the...
  8. Replies
    11
    Views
    582

    Re: beginner scheme question

    Look for Dr. Scheme. It's sole purpose is a learning environment for Scheme and it goes hand-in-hand with this free book on Scheme.

    I'm relatively sure there's a package for Dr. Scheme in the...
  9. Replies
    5
    Views
    355

    Re: [Scheme] Structuring code properly

    I'm really not sure if you care about this at all (since the actual factorial code might have just been a quick example to illustrate your point regarding structuring code), but you'd almost always...
  10. Replies
    15
    Views
    811

    Re: Trigonometry help!

    Two lines intersecting in 3 dimensions is a linear algebra problem, not trigonometry.

    Generally you'd construct matrices and solve them using the Gauss-Jordan method.
    See here.
  11. Replies
    26
    Views
    1,502

    Re: Small Challenge!

    Aha!

    I misread the limit to be 10E20, not 10^20.
    I'm still not sure if the logic is correct, but here's my revised answer:

    1866466866466866466833533133533133533169
  12. Replies
    26
    Views
    1,502

    Re: Small Challenge!

    My answer is 42 digits long, but I'm really not sure if it's correct or not (in terms of logic).

    EDIT: here's the answer. Like I said, I doubt it's right. :)
    ...
  13. Replies
    103
    Views
    5,354

    Poll: Re: Funnest programming language?

    Either Ruby or (Common) Lisp.
  14. Replies
    6
    Views
    546

    Re: C Pointer Question

    Variable-length arrays are officially part of the C99 standard. GCC has had some trouble implementing it though.
  15. Replies
    1
    Views
    202

    Re: Retrieving the type of a typedef

    #include <iostream>

    typedef int integer;

    int main() {
    int x = 3;
    integer y = 5;

    std::cout << x << std::endl;
    std::cout << y << std::endl;
  16. Replies
    11
    Views
    754

    Re: C++ Template thing won't compile

    All function and class templates have to be defined inline (ie, when you declare them). Move the implementation to the header file and delete utils.cpp.

    EDIT: Oops, hod139 beat me.
  17. Replies
    14
    Views
    33,951

    Re: __int64 equivalent in GCC?

    AFAIK, that's incorrect. stdint.h is a C99 header and most C++ compilers haven't bothered implementing the C99 standard. GCC might be an exception, but I'm not sure.

    I may be wrong. :)
  18. Replies
    137
    Views
    5,110

    Re: Programming troubles

    I'll try, but it's hard to explain. I don't know the correct terminology, but I can explain it in practical terms.



    ;;;; A closure in Common Lisp (Heavily Annotated)

    ;;; Define a new...
  19. Replies
    5
    Views
    2,232

    Re: Emacs font troubles

    No clue. I've only been using Emacs for a few months. :)
  20. Replies
    9
    Views
    444

    Re: C++ and The File System

    If you're on Ubuntu, an unportable way of doing it would be using the POSIX functions that come with glibc.
    You can see the documentation for them here.

    The Boost libraries are portable and would...
  21. Replies
    5
    Views
    2,232

    Re: Emacs font troubles

    Try something like this:

    ~/.Xresources


    Emacs.font: Consolas-11
    emacs.FontBackend: xft


    followed by
  22. Replies
    127
    Views
    21,716

    Re: [Beginner] Programming Challenge: 3

    Look into the WITH-OPEN-FILE macro and get rid of the redundant functions. :)
  23. Replies
    127
    Views
    21,716

    Re: [Beginner] Programming Challenge: 3

    I tried to make it clear, but it is Haskell.
    Since Haskell can be so esoteric, I don't feel I'm giving
    away much. :)



    -- By Jessehk
    -- On Saturday, August 9th 2008

    module Main where
  24. Replies
    12
    Views
    2,940

    Re: Dynamic list of items?(C++)

    Certain uses of the STL are easy, but they can easily become complicated.

    Here, an IsEven functor provides a predicate for the std::remove_if function which returns an iterator to the new end of...
  25. Replies
    216
    Views
    38,023

    Poll: Re: [Beginner] Programming Challenge: 2

    For the most part, yes.
    There are a few things that C does differently than C++ (especially in the most recent standard: C99) that would not work on a C++ compiler.

    A few examples are...
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4