-
Posts
1.383 -
Joined
-
Last visited
Posts posted by goldenratiophi
-
-
-
I used to be really good with ascii art.
But now I'm not. oh well. I just use those programs that automatically convert pictures to ascii.
-
After having to order a new motherboard because my other one got scratched, the computer my brother and I built now works! Linux installation... 10 more minutes.... I have pictures too (but I can't find the cable to connect the digital camera to the computer oh well )!
-
The first sentence of a report of stuff:
Therefore, stuff are very blue to use as waters.
-
@Dnas:
Please talk to your brother and see.
@Klaas:
The switch code came straight from the book's CountDays function they wanted him to use so he didn't bother to improve it
Thanks everyone
-
Hello,
My brother is trying to learn java from Sams Teach Yourself Java 2 in 21 Days and is stuck on a problem:
Using the countDays() (not listed here) from the DayCounter application (also not listed), create an application that displays every date in a given year in a single list from January 1 to December 31Here's his source code:
class DayList {
public static void main(String[] args) {
int[] cal= new int[365];
int i = 0;
int day = 0;
int month = 1;
int yeer = Integer.valueOf(args[0]).intValue(); /* Line 14 */
while (i<cal.length & month <= 12) {
while (day < countDays(month, yeer)) {
day++;
System.out.println(month + "/" + day);
}
month++;
}
}
static int countDays(int month, int year) {
int count = -1;
switch (month) {
case 1:
case 3:
case 5:
case 7:
case 10:
case 12:
count = 31;
break;
case 4:
case 6:
case 9:
case 11:
count = 30;
break;
case 2:
if (year % 4 == 0)
count = 29;
else
count = 28;
if ((year % 100 == 0) & (year % 400 != 0))
count = 28;
}
return count;
}
}Unfortunately, me not being a Java programmer, I can't help him. So.... any tips? The compiler throws an exception saying "ArrayIndexOutOfBoundsException:14" (line 14 labeled by a comment), which seems to imply that args[] doesn't exist, but public static void main(String[] args) gaurentees that it does. Help!
-
-
UN = user name
IZ = is
-
nO MY UN IZ 1337Z0RXZR THAN URZ n000000000000000b LOLOLOLOLLOLO !!! i pWNZ yoR ALLz!!!!!!!!!1111!!111!!!!!!111 heheh im g00dz at th15 i shud b3 at t3|-| aomheaven w00t
-
The first question was a joke based on your username
-
So.... what would you say? AH HAHAHAHAHAHA Ok that was lame....
PS: Any links to real flame wars on AOMH?
-
Hello other Dnas relative AKA I_Would_Say
-
Hmm... syntax highliting for HTML and SQL...
<HTML></HTML>
SELECT from BLAH WHERE 2 > 3
I wonder if there is that for C...
[C]
#include <stdio.h>
#include <stdlib.h>
int
main (argc, argv)
int argc;
char** argv;
{
FILE *out = fopen("hello.out", "w");
fprintf(out, "Hello, world.");
exit (0);
}
[/C]
Darn.
Hehe... spoilers!
-
LOL! Nice...
-
8 here.
-
My mom's having the opposite problem: Her computer keeps turning off at random times
-
Ha, at my HIGH SCHOOL, there are 9th and 10th grade classes on word-processing in WORD!
-
I tested wildfiregames.com/forum and it came up with 43 errors
-
Is a texture artist
-
roflol g2g kbye
^
|| b00m
Hehehehe.... nice find
-
Welcome! :S
-
Errors: 41
LOL!
-
They don't have a mac version! EEEEEEEEEEEVVVVVVVIIIIIILLLLL!!!!!!
-
If a homeless person asks me for money... I'd probably give him some money and a list of cheap colleges so he could go to college and not be homeless.
Now... any nice, cheap colleges? Probably not... thats the only problem...
AND I don't have any money
So excited!
in Computer Desk
Posted
Yep. Linux comes w/ KDevelop, which automatically generates my Makefile.am's, configure.in's, and other stuff which makes me very happy. I'm having one little problem - every so often the screen goes blank, but unscrewing part of the case makes it suddenly start working. Odd....