Thanks melissawm.
It's strange that TMW advises that MATLAB R2009a is compatible with this release of Ubuntu ("Ubuntu 8 and above"...
Type: Posts; User: Jessehk; Keyword(s):
Thanks melissawm.
It's strange that TMW advises that MATLAB R2009a is compatible with this release of Ubuntu ("Ubuntu 8 and above"...
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...
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...
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,...
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))....
I didn't know we were talking about segments. I should probably read the topic a bit more closely, eh? :)
#include <stdlib.h>
int main( void ) {
char *hd = NULL;
if ( (hd = getenv( "HOME" )) == NULL ) {
/* $HOME environmental variable not set */
}
/* hd contains the...
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...
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...
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.
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
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. :)
...
Either Ruby or (Common) Lisp.
Variable-length arrays are officially part of the C99 standard. GCC has had some trouble implementing it though.
#include <iostream>
typedef int integer;
int main() {
int x = 3;
integer y = 5;
std::cout << x << std::endl;
std::cout << y << std::endl;
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.
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. :)
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...
No clue. I've only been using Emacs for a few months. :)
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...
Try something like this:
~/.Xresources
Emacs.font: Consolas-11
emacs.FontBackend: xft
followed by
Look into the WITH-OPEN-FILE macro and get rid of the redundant functions. :)
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
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...
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...