Started 2 months, 3 weeks ago (2009-09-11 00:00:00)
by M4rotku
Started 2 months, 2 weeks ago (2009-09-15 17:12:11)
by Habbit
Simple if you know your
basic math, just take ceil(log10(n+1)).
Started 2 months, 2 weeks ago (2009-09-15 17:11:34)
by dribeas
In the general case, if you have two classes that depend on each other and one dependency is only on references or pointers, you can forward declare one of them before declaring the other, and define the methods after both are declared:
Code:
struct X;
struct Y
{
Y( X & other ); // arguments (passed by pointer/reference/value are allowed)
X f(); // return values are ...
Started 2 months, 3 weeks ago (2009-09-12 06:58:08)
by StunnerAlpha
I have seen a similar ranking of languages from another source not too long ago... so I would imagine it is definitely in the ballpark...
Started 1 year, 6 months ago (2008-05-09 10:14:54)
by Ann.A
another way to think about it could be:
Code:
a = [1, 2, 3, 4]
b = []
b.extend(a)
a.
append(5)
print b
b would print [1, 2, 3, 4]
Started 2 months, 2 weeks ago (2009-09-15 15:23:41)
by hofsmo
A list will probably do the job
PHP Code:
>>> counter = 1
>>>for k in range ( 1 ,
11 ):
number [ counter ]= k
counter = counter + 1
Started 2 months, 2 weeks ago (2009-09-15 15:23:18)
by infestor
Started 2 months, 2 weeks ago (2009-09-14 19:22:32)
by linkmaster03
java.sh
Code:
#!/bin/bash
echo -e "//Java stuff//More java stuff" > $1
gedit $1
./java.sh <filename>
What is
happening here is you are using echo to create and insert text into the file (-e allows to be translated into actual newlines), and gedit to open that file.
Started 2 months, 2 weeks ago (2009-09-14 00:00:00)
by Johnsie
Thanks, I punched your code in and it worked fine. Must've been the
line feeds. BTW how did you get an error message? At the moment I'm just guessing what the errors are! A dubber of some sorts would be nice.