Hi Dian
I figured that out now. I had lots more problems which I have now solved. My dev environment was set up wrong, missing includes, missing knowledge...mostly missing knowledge lol.
Once I've figured it all out I might write a tutorial for people moving over from PHP to Java. Its just all...
Hi people
Not sure if this is the right forum as its a struts\jsp question.
I am new to Java web development. I know Java quite well (applets and command-line apps) but never used it for web tech. I am more used to developing in PHP. Moving over to Struts\JSP is proving harder than I thought...
Thanks everyone for your help. Now I know that floats can be messy I wrote a simple function to round my numbers to 1 decimal place. I now get the results I expect. Thanks again people you are all amazing.
erm...it did not fix the problem. It only appeared to fix the problem. Again I am confused as to why -0.1 + 0.1 = anything other than 0. Like wise 0.1 - 0.1 should in my mind always = 0. Why am I getting results that are not 0? And why does this only occure some times? Some times in my code a...
Hello everyone
I have a strange problem with floating points
This is keep track of x and y coords and change them randomly when reqested.
#include <RandGen.hpp>
using namespace std;
#ifndef _POINT_HPP_ //Check if this file has been included or not
#define _POINT_HPP_ //It has not so include...
Hello everybody
I am now begging for someone to help me...when did I last post? since then I have been trying EVERYDAY to get this to work. If I dont find the answer soon I am going to go mental! PLEASE PLEASE PLEASE HELP ME????? PLEASE!!!!!
All I want to know is how do I take the files of my...
Hello everybody
I have been banging my head against a brick wall with this for hours now. I have googled lots and lots and lots and I need a simple answer specifically for tomcat 6.
I have read the tomcat docs but they just confuse me to the point of frustration. I am therefore asking for your...
Another note...I have been reading the recent post of classpath and have hacked around with ideas suggestion in them but no luck...I am not being lazy and I am honestly stuck. Anyways thanks again everybody :)
Thanks for the quick reply. I have added the class path option to my run command but now I get a different error. I think the problem is in the way I am phrasing the run command. Here is what I have
java -classpath /media/ExpansionDrive/java_include/hsqldb.jar DatabaseTest
This gives me an...
Hello everybody
I have a very simple question...how do include a jar file into my code? I am more used to c++ and I would just tell my code where to find the library I want and then I just use it.
I am using Ubuntu if that makes any difference.
This is really frustrrating me. I've looked on...
Thanks uolj.
That really helped and thats kind of what I did in the end. I did not make a generic object but a generic Tic-Tac-Toe player and then derived from that. Thats what I thought xwb meant.
I did not use virtual a destructor though. I shall amend this as I believe the reason is without...
Hello All,
I am working on a project, a Tic-Tac-Toe game. I have written objects to represent 3 different players, a human player and two different computer AI players.
I want to be able, at run-time, to select which of these three player types are playing. Ideally I would want two pointers...
Hi everybody,
I am quite new to security. I've programmed PHP for some time now but have never needed any really robust security for my projects. However, I've undertaken a rather large project and now need some fancy security features.
I want a PHP script that can create PHP files on my web...
Hello everybody.
When I write the code...
cout << 83865.5657 / 0.01;
...it outputs 8.38656e+006 yet when I do it with Windows Calculator I get 8386556.57. Why is this? I'm not very good at maths and don't really understand what the e+006 on the end of my result means. Also not being very...
Hello everybody
I've been tring to find a function or method for converting a posative float like -45.67 to a possative float (45.67). Using the NOT bitwise operator I can convert ints and using the abs function I can convert a negative float to a positive float but it won't work the other way...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.