~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Thanks a lot Aia. Its good that my post helped someone become a better programmer and join Daniweb full time. ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes it belongs to the cctype header in C++ and ctype.h in C.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You need to be more precise when you say its not working. You either need to paste a working example here or try to put a lot of alert statements here and there in your code to see which part is creating problems for you.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

A servlet is a normal Java class extending the HttpServlet class. You can import your 'proprietary' class the way you import normal classes in Java.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Software development, Web Development, Coffee House, Moderator's Place, Community Introductions...*phew* ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> What do you mean?
You should at least look at the date the last post was made before replying to it. Next time you find an interesting old thread, create a new one instead of resurrecting the dead.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

But the question here is which method. You can always write a servlet which would handle the client request when the 'submit' button is pressed.

After that, its a simple thing of pulling out the text box values using request.getParameter("textBoxName") .

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Start off with hibernate tutorials.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

...not to mention it requires a really good hand-eye co-ordination. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You forgot to open the <script> tag for the second function i.e. put a script tag after the second </form>.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It doesn't work is pretty vague description. You need to tell me what error or output it gives. BTW, I have tested it on Firefox so you might want to try that out. The event model of IE is pretty broken up.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

1030 / 2000 '-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Writing a whole class is JSP file is a total nightmare...

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> Now it is going to be IMPOSSIBLE to catch back up..
Spend a little more time online, create your own game threads, post lots and lots and it won't be difficult for you to overtake Dani.

Yep, thats the key to success. ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes, marking solved thread as solved certainly saves the time one spends browsing it.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It depends on the way you created those 'authorized' files. Your explanation is very vague here. You need to supplement it with some code examples or explain the scenario in depth.

The problem appears not with your session since it is automatically destroyed when:
1. The user closes the browser
2. The session.invalidate() is called
3. The session has timed out.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You are welcome. :)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Frames are evil. Whatever you are planning to do can be very well achieved without the help of frames.

As for the return key detection, here is a small example:

<html>
<head>
<script>
    var ENTER_KEY = 13;

    function myKeyPressed(e)
    {
        if(!e)
            var e = window.event;
        if(e.keycode)
            code = e.keycode;
        else if(e.which)
            code = e.which;

        if(code == ENTER_KEY)
        {
            alert('You pressed the ENTER key');
            //call the function which performs calculation
        }
        else
            alert('Press the correct key');
    }
</script>
</head>
<body>
<form>
    <label>Box</label><input type="text" name="txt" id="txt" onkeypress="javascript:myKeyPressed(event)" />
</form>
</body>
</html>
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

FYI, SouthPark is not an anime.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> What do you think the dark matter/dark energy is?
Someone the pastor thought he would make up so he could prevent you people from sleeping? ;-)

Sturm commented: lol nice one +1
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Rather than trying to reinvent, take a look at the source code of Mozilla Firefox browser and build your own one from that point. This way you can actually implement some of the custom features you so much wanted with the plus being you don't have to code the same thing.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You would need a third party API to achieve since standard C/C++ doesn't cater to GUI requirements of the programmer like modern languages.

wxWidgets and GTK+ are a few famous names you get to hear.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

How about something like:

<html>
<head>
    <script>
    setDifference = function(form)
    {
        var x = document.getElementById('dtTxt1').value;
        var y = document.getElementById('dtTxt2').value;
        
        //assuming that the delimiter for dt time picker is a '/'.
        var arr1 = x.split('/');
        var arr2 = y.split('/');

        var dt1 = new Date();
        dt1.setFullYear(arr1[2], arr1[1], arr1[0]);
        var dt2 = new Date();
        dt2.setFullYear(arr2[2], arr2[1], arr2[0]);
        
        document.getElementById('resultTxt').value = (dt2.valueOf() - dt1.valueOf()) / (60 * 60 * 24 * 1000)
    }
    </script>
</head>
<body>
<form>
    <input type="text" name="dtTxt1" id="dtTxt1" />
    <br />
    <input type="text" name="dtTxt2" id="dtTxt2" />
    <br />
    <input type="text" name="resultTxt" id="resultTxt" />
    <br /><br />
    <input type="button" value="Submit" onclick="javascript:setDifference(this.form);" />
</form>
</body>
</html>
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Agree whole heartedly with you. And the thing that you can't control the rep points you give adds more hopelessness to the system. I think the suggestion offered by Salem is the best, if we need to make rep meaningful.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Maybe you need to post a bit more code, or atleast have stab at it. In case you are finding it difficult, I would recommend reading some good books and tutorials.

If you have something concrete, do come back and we would definitely help you out.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

cout << ps->first_name << ps->last_name << ps->id_no << ps->age << endl;

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

And jlb please stop posting in bold. Its not that your post would assume utmost importance if you do so.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I guess he is not that old. ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

True, but considering that his operator overloading basics are a bit off the mark, it would only mean adding to his confusion by mentioning the other ways.

coord( const int n_x, const int n_y )
            : x( n_x ), y( n_y )
        {}

Primitives are anyways passed by value. The const keyword is an overkill IMHO.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Submit the form data to the php script only if the user clicks on OK.

function checkSubmission(form)
{
    var ans = confirm("Are you sure you want to delete the row?");
    if(ans)
    {
        //perform validation
        form.submit();
    }
}

Call this function on the onclick event of the submit button and pass to it, the form object. Something like: <input type="button" value="Submit" onclick="checkSubmission(this.form);" />

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You are doing operator overloading the wrong way. The function needs to take only one parameter, not two, since one of them would be the instance on which the function is called.

Read some good operator overloading tutorials.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

What you are trying to dwell into is known as Software Engineering, which differs greatly from programming. Maybe you need to do a bit of reading to get the answer to all your theoretical questions.

Maybe this would be a good place to start off with. Click on the links and start reading. An answer shouldn't be far away.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

You can always try to use the split function, extract the three components from the given date, make a new Date out of it. Use this procedure for both the dates.

Use: (d2.getTime() - d1.getTime()) / (1000 * 60 * 60 * 24) formula to get the number of days.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> I know you! Hang around here more.
Yeah there are not a lot of people who Joey knows, so you better listen to him. :-)

Welcome to Daniweb.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I was just joking Mel. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes, please don't listen to others and start this already. Keep notifying us of your progress from time to time. After all, we wouldn't mind a fair bargain. ;-)

Aia commented: Alright +2
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Oh and BTW, you can't answer a poll more than once, if thats what you have kept as your 6th option.

And me, 'I hate and refuse to participate in them'. ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Along with RGB there is a fourth channel called the alpha channel which decides the transparency. I guess this is what UNOwen is talking about.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I don't know what you are trying to convey here. Maybe posting some example or coming up with a better example would be more like it.

Is it that you want to dynamically load a different class file in different situation? You can trying keeping a command line parameter which would decide which class file to load based on the switch supplied at the command line.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> Unless you want boiled meat balls for dinner I suppose.
YUCK !! ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> Yes, but slightly more expected.
Hey doesn't this amount to tainting our image? Its not that only men fight... ;-)

> It is babaric and exposes that part of man that should be worked upon to be better.
Reality is always barbaric. Our ancestors were barbaric, we are barbaric, its just that we don't recognize it.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yeah man. ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Good luck with your school days dcc , hope this turns out to be a fine experience for you. :-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I guess its the bots which make Daniweb popular. :P

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

The links I posted in my previous post are for downloading a free compiler. You need to install the JDK on your machine to run Java programs.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

COM is enough of hell to deal with, no need to throw in any more complexity. Though I agree a bit of Windows Application development won't hurt. ;-)

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

union in C/C++ is basically a mechanism to store more than one of variable at a given memory location. It has a variety of uses. Look here and here.