server_crash 64 Postaholic

Have you decrypted and shrank the dvd first?

server_crash 64 Postaholic

What do you mean use a data file, text file and the other stuff? An interface is implemented like this:

class Test implements MyStackInterface
{
    //now it must override the methods
}
server_crash 64 Postaholic

Never heard of a vaw file?

If you mean raw, then it can't be much more than using an File object, FileOutputStream, BufferedReader, DataInputStream, or something along those lines.

server_crash 64 Postaholic

And to you to, in 2 days :)

server_crash 64 Postaholic

I turn 17 in 7 days!

server_crash 64 Postaholic

Simple global constants should do.

server_crash 64 Postaholic

I got 18 out of 15 right.

server_crash 64 Postaholic

I think you're doing a fine job. What I don't like about this site is the community in general. What I mean by that, is the people here are not that friendly. Yes, there are a few, but for the most part they are not friendly. It just seems you are attracting the wrong kind of people. Either they're not very nice, or simply make one post which asks for their work being done, and then they're gone.

Just my opinion.

server_crash 64 Postaholic

Math.pow(base, power);
Math.sqrt(x);

server_crash 64 Postaholic

Where are you making a connection to the DB?

server_crash 64 Postaholic

Do you mind telling us the steps you've taken? It would be easier to diagnose a problem that way.

server_crash 64 Postaholic

That's part of it, but best practice extends to code written...In my opinion. For example, use methods and utility classes as much as you can, rather than re-inventing the wheel. Also, definately leave out repetitive code.

The list could go on and on, but that's just a few points.

server_crash 64 Postaholic

You never know ;)
Was wondering when you'd gone for the exam though.

I haven't taken it yet. If I do, it will be a while from now. I've been studying C++ and I'm kind of rusty on the more harder subjects of java...which I hever had a good grasp on. Overall, I'd say maybe another 1.5 or two years, but still I don't think I would ready by then.

server_crash 64 Postaholic

I made 91% when I took it.

You do know I'm joking, right?

server_crash 64 Postaholic

Create a style with some imageicons and whatever else you need in html.

server_crash 64 Postaholic

I made 91% when I took it.

server_crash 64 Postaholic

Maybe it's just me, but I wouldn't "modify" anything to be static unless it's a utility class like Math, or if I really have to. I've seen a few people that say make everything static unless you don't need to, which I don't agree with. I guess a lot of people get tripped up when using the main method since it cannot reference anything but static contexts.

server_crash 64 Postaholic

Have you tried using gridwidth or ipadx?

server_crash 64 Postaholic

yes but it is a java problem ;)

Ummmm.....Are you trying to use the "new" construct to instantiate an abstract class????

The root cause error should give it away.

server_crash 64 Postaholic

Oh, I see. I appreciate the help sunny.

server_crash 64 Postaholic

Well, I knew that would work, but I'm trying to split functionality up as much as I can. Is there not a way to have this Store class as an external source code and import it into the Person class?

I've tried this:

#include <Store>

and

#include <Store.cpp>


Both of which didn't work, but they are in the same directoryl

server_crash 64 Postaholic

I have a class Person and a Class Store. I didn't find any way to really inherit Store in class Person, so I created Class Store in a namespace called StoreClass.

In the person class this doesn't work:

using namespace StoreClass;

it says that namespace StoreClass is undeclared.
I also tried to include the actual File which is called Store.cpp, but it says it couldn't find that either. Both classes are in the same directory.

Is there something I'm doing wrong?

server_crash 64 Postaholic

Here's an excellent article on tuning the GC:


http://java.sun.com/docs/hotspot/gc1.4.2/

server_crash 64 Postaholic

I hope you are asking for this....
when you do something like this

cout<<obj;//object of class

it is equivalent to

cout.operator<<(obj);

first argument passed is implicit this pointer and second one is obj

Ok, I think I got it. Correct me if I'm wrong:

The first parameter(ostream&) is actually on the right side of the operator << and the object it's operating on is on the right side of the << operator. Is that correct?

server_crash 64 Postaholic

Maybe you should test lowercase letters instead of uppercase?

server_crash 64 Postaholic

Thanks guys, that really helped a lot and cleared things up. It turned out that I didn't declare it as a friend. Now, one thing I don't understand is where the ostream& is passed since it's the first argument. I understand where Person& comes in, but I don't get where the ostream& is passed in. I know WHY it's there, but not sure where it comes from. Can anyone clear that up for me?

PS: I really appreciate the help from you guys and will be awarding rep points.

server_crash 64 Postaholic

Are you talking about Java?

Kathy Sierra and Bert Bates book is the best in my opinion. You read that about 2 or 3 times and you'll make at least 75 or 80.

server_crash 64 Postaholic

I have the following code:

ostream Person::operator<<(ostream& out, const Person& p)
{
           out << "/n*********************************" << endl;
           out << "Name: " << Person::getName() << endl;
           out << "Age: " << Person::getAge() << endl;
           out << "Health: " << Person::getHealthLevel() << "%" << endl;
           out << "Happiness: " << Person::getHappinessLevel() << "pts" << endl;
           out << "Sleep: " << Person::getSleepLevel() << "%" << endl;
           out << "Money: " << "$" << Person::getMoneyLevel() << endl;
           out << "Posessions: " << endl;
           out << "*********************************" << endl;

           return out;
}

It looks correct to me, but I'm getting a few errors:

`Person::operator <<(ostream &, const Person &)' must take exactly one argument
new declaration `class ostream Person::operator <<(ostream &, const Person &)'
ambiguates old declaration `class ostream & Person::operator <<(ostream &, const Person &)'
In method `ostream::ostream(const ostream &)':
`ios::ios(const ios &)' is private
within this context


Is there something I'm doing wrong?

server_crash 64 Postaholic

It is really ugly. The GBL is very powerful and has a neat concept to it, but it just doesn't work for my needs.....I wish it did, but it doesn't. If there was an easy way to tie it in with arrays and loops I would love it. Take a calcualtor for example. I would much rather hold ALL the buttons in an array and work from there, rather than coding everything out seperate. It's just too much code involved and it's hard to keep up with.

Normally, my approach is to use JPanels which have their own layout. In the end, I would position the JPanels using setBounds(int, int, int, int); which gives you complete control of the positioning. That saves a lot of time, because the majority of component positioning is taken care of with the jpanels, and all that's left is positioning the few jpanels that you have holding all of that.

Overall I wouldn't mind using the GBL, but it's too much cluter involved.

server_crash 64 Postaholic

I take it the STL is very important? I was thinking people would lean toward Bjarne's book, but I guess I was wrong.

PS: Thanks for the link. I wish I had found it earlier(before I bought a few books of course).

server_crash 64 Postaholic

Well, you can only POST a message using a POST query. Any parameters passed via a URL, create a GET query.

Now, you could use JavaScript, to create a form, a lot of invisible variables, populate those variables, then call the form's "submit()" method, which will POST the form. You can only do that on a page you "own", of course.

"AJAX" is a funny little beast - it refers to scripting the XMLHttpRequest object. It doesn't do a POST, it fires off another request, "behind the scenes", so that the user doesn't see any page refresh.

I guess AJAX was it. I remember working with the XMLHttpRequest. My first intentions was to create a form, because I have seen examples of 'dummy' forms created which do basically the same thing I was looking for. Either way I appreciate the replies.

server_crash 64 Postaholic

You can always write your own renderer, but I'd guess that would be quit difficult.

Anyways, not sure I fully understand your problem.

server_crash 64 Postaholic

I'm finshed with teach yourself c++ in 21 days. It's been fairly good at teaching the basics, but I have two books I need to select from to read next:

c++ programming language --bjarne stroustrup
the c++ standard template library


I just don't which to read next. Which would you guys choose?

server_crash 64 Postaholic

Simply concatentate URL and ARGs. In fact, you don't even need a separate variable and/or call for "args". They are simply part of the URL.

You can do that, but that doesn't make it using a post method. This was actually a problem my friend had, and we used some kind of xml thing to do the job, because javascript alone can't make post calls. I wish I could remember the name of it. It may have been called ajax or something.

server_crash 64 Postaholic

I actually prefer using the GridBagLayout. It is definantly the most powerful layout and if used correctly, can produce great looking layouts. The biggest key with any GUI layout is componitizing the whole thing. E.g.: placing like components on their own JPanel and then taking all the componitized JPanels and placing them on one larger JPanel.

The only other layout manager i use is flow layout and the only time i use it is when creating a popup windows button bar.

Regards,

Nate

It's very powerful, but the problem is, what if you have 20 components? It takes a billion lines of code with GBL, when you can simply nest layout managers, use arrays, and loop through the initialization.

server_crash 64 Postaholic

how to add a menubar in an applet :rolleyes:

What's the question?

server_crash 64 Postaholic

Javascript is NOT Java. Java is NOT Javascript.

server_crash 64 Postaholic

I'm not sure there's an explanation for people who do such things. It's either an intentional mis-interpretation of their religion, or they just feel rejected by society....Who' knows?

server_crash 64 Postaholic

What's webmaster world in vegas?

server_crash 64 Postaholic

AMD executes more instructions per cycle, which means it doesn't need to be as fast as P4's.

Advanced Micro Devices all the way.


I personally have a PM which I really like. I can play any game I want with just a 1.5ghz PM processor.

server_crash 64 Postaholic

Oh, Ok. I see what's happening now. You have to start the first loop at zero, and end at a value one less than the size, and for the inner loop start at 1, end at zero. However, I would have never caught that without you guys.
Thanks for all the help!

Dragon, thanks for showing a better alogorithm, and rash, thanks for such a detailed explanation of what I was doing wrong.

server_crash 64 Postaholic

I am way sexier then all of u put toghether lol!

beat that!

I am way sexier than all of you put together.

beat that.

server_crash 64 Postaholic

I can't seem to get this sorting alogorithm to work:

#include <iostream>


void sortAssending(int nums[], int size);

int main()
{
    int nums[] = {175,167,160,164,183,187,188,179,176,175,
                  169,175,176,178,165,160,173,165,187,178};
    sortAssending(nums, 20);
    for (int i=0; i<20; i++)
    {
        std::cout << nums[i] << std::endl;
    }
    
    system("PAUSE");
}

void sortAssending(int nums[], int size)
{
     for (int start=0; start<size; start++)
     {
         for (int end=size-1; end>=0; end--)
         {
             if (nums[start] > nums[end])
             {
                 int temp = nums[start];
                 nums[start] = nums[end];
                 nums[end] = temp;
             }
         }
     }
}

It seems to do everything right except the very last number is not in place. Can anyone spot the problem?

server_crash 64 Postaholic

Process p = Runtime.getRuntime().exec("path/programname");

server_crash 64 Postaholic

Shouldn't be any different than writting something in a different language. If you are writting an online app, then java's probably the way to go. If you're worried about speed, then you shouldn't be. Since Java 1.4, it uses the Hotspot VM by default, which does pretty much the same as the .Net engine. The .Net engine simply compiles modules as it loads them. Hotspot compiles code that is frequently used only, thereby saving loads of memory and reducing startup time.

server_crash 64 Postaholic

When someone reffers you to this site.

server_crash 64 Postaholic

String s = "lowercase";
String s2 = s.toUpperCase();

Remembers Strings are immutable so this won't work:
String s = "lowercase";
s.toUpperCase();

server_crash 64 Postaholic

HI ,

can anyone tell me how i can edit rotation in my xsl?

my xml lookes something like that:
<root>
<obj col="0xff0000" xPos="25" yPos="0" widht="2" height="2" angle="30" />
</root>

my question is how can i write the angle in the xsl?

thanks

Not the right forum to ask these questions.

server_crash 64 Postaholic

If someone could help me doing a code in VB to do the following:

The output should be a list of all posible ways in which (m) different Males
and (f) different female could be line up if no two females could be together
(one female can not stand after another female in the line).

Thanks for any suggestions,

EMG

Would you like me to write the whole thing for you?

server_crash 64 Postaholic

Use saverbeans.