Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Robbie Harjes

Greenhorn
+ Follow
since Nov 09, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Robbie Harjes

So I couldn't just:

?
I understand [/understood] all that, but I guess I was just wondering if I could get around it with less code... Thanks for the help!
[ December 18, 2003: Message edited by: Robbie Harjes ]
18 years ago
I don't know exactly what to say...
Having a constructor, (with objects that I want "imported" so I can use them in the other methods of the class), that has no expressions or anything inside of it; it's sole existance is to "import" some other object..
I'm pretty sure it'll work, (I mean I could just skip this, and take the object as a parameter for each and every method, but that seems a little wasteful).
18 years ago
Ok... I want to use Object F in my new class defition. Is it okay/will it work to create a constructor with Object F (having no commands or expressions inside the constructor) so that I can have Object F available to methods declared in the new class?
Might have to read that again... Here's a little more illustrative approach:
18 years ago
Thanks for the help.
I just realized the same thing not too long after that posting, but everything works great now!
18 years ago
Hey friends?! How ya'll doin' today? I'm great. So I got me my applet here and it creates a bunch of Checkbox objects using a FOR loop and such; each Checkbox is created by the following code:

Whereas a is an Object of type Words:

But I create these, and then I can't do a cb1.getState() or anything... (Which I need to do.) I've tried some tricky clauses in my event handler, but nothing works. Is there anyway to create a bunch of Objects (the exact number is varying), using a loop, or a new class definition, so that each one has a handle? OR..Getting creative: Is there any "master command" that contains The_first_checkbox_this_program_created, The_second, etc... I need handles to my objects.. please help..
18 years ago
I don't know if this is exactly what you're asking.. but..
Compile that code into a class file...
..Although I don't know how, get your "package grades" to a jar file archive.
Then, on your html page:
18 years ago
Hi. Is there anyway to execute HTML code from within a java program (applet to be specific)? More specifically, execute a code snippet of a form, with variables from the program, inside the inputs? ... Basically.. Having an applet take the place of a plain HTML form, and yet output the same "completed" form details just like HTML would. Any help would be appreciated. Thank you.
18 years ago
Hi. Is there any command that will return the current IP of a given user? For instance, an applet that calls a function to return the IP of the user who loaded the applet? Thanks
18 years ago
I'm sorry for all who have contributed to my seemingly pointless questions, only being asked because I'm probably too lazy to go find out the answer myself... but.... YET ANOTHER question...
// if (last digit of p == 5) {continue;}
You can catch my drift.. "p" is a long
18 years ago

Sorry for the late reply
18 years ago
To all JavaRanch members: thanks for the help.
I have yet another question for you today. I have a class with a method that performs bitwise logic [int add(int a, int b) and int sub(int a, int b)]. Here's an example:

Now say I have a String of 1's and 0's(or an int composed of 1's and 0's, whichever one is more appropriate [?]). I want to process each character with the corresponding character in a second String, equal length. For instance:

I tried a lot of b.add((int)x.charAt(i), (int)y.charAt(i)); using the string method desribed, but I wound up with 97's and 98's. Do you think I should incorporate a loop into the bit class, and change it so it handles Strings? But how do I get to the point where I have an easy-to-work-with Integer = 1/0?
18 years ago
Well thanks for the help... But I've come down to just 2 compile time errors. Here's the source code for the program (It's only to find the mod function [remainder] of very large exponential monomials.)

I changed some of the code... realized that the values Y and A are going to be small, but it's only the result of Y^A that requires the BigInteger.
Finally, here are the compile-time errors:

[ December 01, 2003: Message edited by: Robbie Harjes ]
18 years ago
BigInteger's are fun!, not. To set up some initial values for some BigInteger testing...
doesn't work... So what is the "standard" format? (The best conclusion I've come to is that there not exactly standardized, seeing how the length can change..? i don't know) And how do I convert/cast/whatever method I need for this to work:

Thanks.
18 years ago
Hi. Is there anyway I can "tally up" the bytes in any file type? Already I have the following code for simple text files (it seems to work for .bmp's also for some reason, but not for .avi's)

All I really absolutely need is an integer, containing the total number of bytes. (In the above case, that would be "int all")
18 years ago
Hi everyone; two questions today.
1. I'm looking for a way to take each number from a string such as " 713 | 413 | 756 | 13 | 382 | -365 |" and put in into an appropriately sized 2 by [half as many elements] matrix/array. The input will always be an even amount of numbers. I already have a snippet of code to find out how many numbers there are total (count the |'s), divide by two, label as "temp", and you get "new int[2][temp]". The array needs to be ordered such that the
1st number is in [0][0];
2nd number is in [1][0];
3rd number is in [0][1];
4th number is in [1][1]; (and so on until all numbers have been added.)
That is if I'm stupid and can't see some easier way of doing this. As of the moment, I'm stuck on a String to Integer function or something. Say I have the string "234" and want to turn it into an integer with the value 234. Any help is appreciated. Insults on my stupidity are acceptable.
18 years ago