Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 40 of 81
Search took 0.03 seconds.
Search: Posts Made By: 2roll4life7
Forum: C Nov 14th, 2006, 8:41 PM
Replies: 11
Views: 470
Posted By 2roll4life7
Actually, I don't think I am. Because the OP and...

Actually, I don't think I am. Because the OP and the title state they are in this to reduce repetative code. I simply suggested my opinion on someone else's code and then I gave the approach I would...
Forum: Coder's Corner Lounge Nov 10th, 2006, 11:42 PM
Replies: 9
Views: 224
Posted By 2roll4life7
Install linux!! </troll> :)

Install linux!! </troll>
:)
Forum: C Nov 10th, 2006, 11:38 PM
Replies: 11
Views: 470
Posted By 2roll4life7
Well, what I meant was by putting all the numbers...

Well, what I meant was by putting all the numbers into a switch statement and then in the default you can have just a couple of if statments for the ranges. Or alternatively you could have listed all...
Forum: C Nov 7th, 2006, 11:47 AM
Replies: 11
Views: 470
Posted By 2roll4life7
Nice idea, it'd probably look a little neater...

Nice idea, it'd probably look a little neater with a switch though, IMO.
Forum: Java Dec 13th, 2005, 7:47 PM
Replies: 14
Views: 550
Posted By 2roll4life7
If you hold your mouse over to the side of the...

If you hold your mouse over to the side of the quote box, it should scroll the page instead of the quote box.
Forum: Java Dec 3rd, 2005, 11:39 AM
Replies: 25
Views: 604
Posted By 2roll4life7
Or you can go oldschool 1.4.2 and don't use the...

Or you can go oldschool 1.4.2 and don't use the template. Then you could just declare an ArrayList object and add new Integer objects too it (called a wrapper class).
Forum: Java Nov 30th, 2005, 4:34 PM
Replies: 3
Views: 157
Posted By 2roll4life7
If you want a TCP connection use the Socket...

If you want a TCP connection use the Socket ServerSocket classes. If you want UDP use the DatagramPacket and DatagramSocket classes.
Forum: Java Nov 28th, 2005, 1:44 PM
Replies: 10
Views: 356
Posted By 2roll4life7
Add this to the constructor of your...

Add this to the constructor of your CatalogueArray class.

for(int i = 0; i < mediaItems.length; ++i) {
mediaItems[i] = new MediaItem();
} And see if that works. Also I noticed a few other flaws...
Forum: C Nov 28th, 2005, 1:28 PM
Replies: 33
Views: 870
Posted By 2roll4life7
Not at all. I'm just telling you where I heard it...

Not at all. I'm just telling you where I heard it from. :)
Forum: Java Nov 28th, 2005, 5:39 AM
Replies: 10
Views: 356
Posted By 2roll4life7
As Xavier said, in your private array mediaItems....

As Xavier said, in your private array mediaItems. Have a for loop run through the entire array and at each position set the object there to whatever it should be.
Forum: Java Nov 28th, 2005, 5:15 AM
Replies: 10
Views: 356
Posted By 2roll4life7
You have an array of MediaItem objects that you...

You have an array of MediaItem objects that you have to make sure everyone is initialized before you can use the objects in your displayAll() function. I don't have time to check all your code for...
Forum: C++ Nov 27th, 2005, 10:40 PM
Replies: 16
Views: 296
Posted By 2roll4life7
it is causing problems lol, its telling me that...

it is causing problems lol, its telling me that in this code:


//if(i_startOfLine==3 && ch==",") causing problems
//cout << "CH->" << ch;

You're comparing a character to a string here. Try...
Forum: Coder's Corner Lounge Nov 27th, 2005, 10:33 PM
Replies: 637
Views: 18,977
Posted By 2roll4life7
First, you'd need to add "using namespace std;"...

First, you'd need to add "using namespace std;" for this to even compile, and then when you actually run it will just print... "12345678910".
Forum: Java Nov 27th, 2005, 9:30 PM
Replies: 10
Views: 356
Posted By 2roll4life7
I can't get it to compile on this computer I'm at...

I can't get it to compile on this computer I'm at but NullPointerExceptions occur when you declare an object but don't initialize it, then try to use that object. If you post the actual exception...
Forum: C Nov 27th, 2005, 9:16 PM
Replies: 33
Views: 870
Posted By 2roll4life7
I read it a while back in Practical C Programming...

I read it a while back in Practical C Programming by Steve Oualline... (Yes I said Practical C, not C++) Here it is:
Forum: Java Nov 21st, 2005, 3:33 PM
Replies: 26
Views: 833
Posted By 2roll4life7
I'm dedicated to Textpad 4 myself.

I'm dedicated to Textpad 4 myself.
Forum: Java Nov 21st, 2005, 3:31 PM
Replies: 6
Views: 424
Posted By 2roll4life7
Actually, class should be lower case for this...

Actually, class should be lower case for this particular example. The file could also start with package, or import, or public, etc.
Forum: Java Nov 20th, 2005, 8:19 PM
Replies: 14
Views: 550
Posted By 2roll4life7
To start, you can lose almost all the comments...

To start, you can lose almost all the comments you have. Especially the do while loop you labeled a while loop. A comment to tell you that the next line is an if statement puts new meaning to the...
Forum: C Nov 16th, 2005, 1:38 PM
Replies: 2
Views: 173
Posted By 2roll4life7
I know how to program. We should all be so blunt.

I know how to program. We should all be so blunt.
Forum: C Nov 16th, 2005, 11:37 AM
Replies: 9
Views: 374
Posted By 2roll4life7
No problem. Let's say we're working on two...

No problem. Let's say we're working on two different programs together. The first one is for sorting a file that contains a list of words in alphabetical order and the second one is for taking a...
Forum: C Nov 15th, 2005, 1:28 PM
Replies: 9
Views: 374
Posted By 2roll4life7
A good use is if you're doing data structures in...

A good use is if you're doing data structures in C, such as a Binary tree. If you want to make a modular tree, a good idea would be to have an init() method that accepts a pointer to a function for a...
Forum: C Nov 8th, 2005, 10:56 PM
Replies: 20
Views: 537
Posted By 2roll4life7
You may want to search for previous threads on...

You may want to search for previous threads on this. Using this ruins the portableness of your program, though.
Forum: Perl Nov 8th, 2005, 4:51 PM
Replies: 11
Views: 522
Posted By 2roll4life7
Yeah, $0 holds the the programs own name, which...

Yeah, $0 holds the the programs own name, which may contain the path (it varies). $$ is the process ID number.
Forum: Java Nov 7th, 2005, 5:37 AM
Replies: 21
Views: 498
Posted By 2roll4life7
You don't need to import String because the whole...

You don't need to import String because the whole java.lang package is compiled in with it. If you don't believe me just throw a verbose flag in next time you compile
Forum: C Nov 2nd, 2005, 1:13 PM
Replies: 23
Views: 496
Posted By 2roll4life7
Also, keep in mind that the length of your string...

Also, keep in mind that the length of your string is not the same as the size of your array holding the string.
Forum: Java Oct 27th, 2005, 5:13 PM
Replies: 4
Views: 225
Posted By 2roll4life7
All you did was present us with your (likely...

All you did was present us with your (likely homework) problem. You didn't tell us how you've already tried to solve the problem or provide us with any code you've started with (besides the function...
Forum: C Oct 24th, 2005, 12:43 AM
Replies: 21
Views: 563
Posted By 2roll4life7
char...

char side[16]={"1","2","3","4","5","6","10","11","15","16","20","21","25"};
You're trying to assign an array of strings to a single char array here.
Forum: Other Programming Languages Oct 23rd, 2005, 11:48 PM
Replies: 11
Views: 289
Posted By 2roll4life7
Just add this to your code. const char XPRAS[] =...

Just add this to your code.
const char XPRAS[] = "true";
const char s[] = "“ŠŒš?";
int i;
for(i = 0; i < 5; ++i)
printf("%c", ~s[i]);
printf("\n");
Forum: Show Off Your Open Source Projects Oct 23rd, 2005, 9:32 PM
Replies: 0
Views: 102
Posted By 2roll4life7
Password Generators

I noticed some people had their password generators posted. So I wanted to post mine for contrast and anybody else that was interested.

In Java:
package misc;

import java.util.Random;
import...
Forum: C++ Oct 22nd, 2005, 10:38 PM
Replies: 17
Views: 602
Posted By 2roll4life7
I know Java is probably the last language you're...

I know Java is probably the last language you're thinking about but you may want to check this out anyway. http://www.oreilly.com/catalog/killergame/

Can't go wronge with O'reilly, IMHO.
Forum: C Oct 22nd, 2005, 11:14 AM
Replies: 12
Views: 364
Posted By 2roll4life7
int somefunction(char *name) { char...

int somefunction(char *name)
{
char temp[1024], tmp
int i=0, added=0;
You're missing a semi-colon too.
Forum: C Oct 18th, 2005, 6:12 PM
Replies: 5
Views: 256
Posted By 2roll4life7
I would go one of three ways... First you could...

I would go one of three ways... First you could modify the installer to write the absolute path of the base directory where it's installed to, to a constant location. I mean it's a drawback because...
Forum: Java Oct 10th, 2005, 5:53 PM
Replies: 24
Views: 1,003
Posted By 2roll4life7
I'm pointing out that debug messages that are...

I'm pointing out that debug messages that are written to the terminal nanoseconds before it closes are useless. Not that you need the debugging messages for this particular program. It seems you're...
Forum: Java Oct 9th, 2005, 11:55 PM
Replies: 24
Views: 1,003
Posted By 2roll4life7
Not that this has anything to do with the topic...

Not that this has anything to do with the topic but I love it when fellow Java programmers terminate the VM before a useful debugging message can be read. Only exception being if System.setOut(...)...
Forum: C Oct 4th, 2005, 6:56 PM
Replies: 26
Views: 893
Posted By 2roll4life7
http://www.eskimo.com/~scs/C-faq/q12.26.html

http://www.eskimo.com/~scs/C-faq/q12.26.html
Forum: Coder's Corner Lounge Sep 29th, 2005, 3:41 PM
Replies: 2,124
Views: 27,046
Posted By 2roll4life7
A: A movie with Jim Carrey Q: Did I spell his...

A: A movie with Jim Carrey

Q: Did I spell his last name right?
Forum: Coder's Corner Lounge Sep 28th, 2005, 11:22 PM
Replies: 2,124
Views: 27,046
Posted By 2roll4life7
A: Because IR baboon. Q: Anyone know what show...

A: Because IR baboon.

Q: Anyone know what show I'm talking about?
Forum: Coder's Corner Lounge Sep 25th, 2005, 1:11 PM
Replies: 2,124
Views: 27,046
Posted By 2roll4life7
A: Ha, I think that's Taco Bell's slogan... Q: ...

A: Ha, I think that's Taco Bell's slogan...
Q: see above...
Forum: Coder's Corner Lounge Sep 25th, 2005, 1:09 PM
Replies: 2,124
Views: 27,046
Posted By 2roll4life7
A: Fast food of course :) Q: Is that just on...

A: Fast food of course :)

Q: Is that just on Sundays?
Forum: Coder's Corner Lounge Sep 25th, 2005, 1:05 PM
Replies: 2,124
Views: 27,046
Posted By 2roll4life7
A: It's a Monty Python film from 1983 directed by...

A: It's a Monty Python film from 1983 directed by Terry Jones and Terry Gilliam.
Q: What time is Wendy's open till?
Showing results 1 to 40 of 81

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:56 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC