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

You need to post the entire code as it is for someone to help you out. Posting in bits and pieces would just make it difficult.

And BTW, that kind of error is normally given when the variable 'w' doesn't refer to any window, i.e. function is called before window is created.

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

No one can mess with ~s.o.s~. ;-)

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

> Have you always resided in India?
Yes I was born and brought up in India, though I am planning to visit US or UK someday. ;-)

> Your english is appears to be that of a natural speaker/typer
Thanks. I am trying to clear the misconception that all Indians are l337 speakers or have bad English. :)

> yes you speak better english than i do
Aha...

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

> whenever you hover over a link a little tooltip pops up with a screenshot of the site, so you can see
> where you're going before you click.
Yes, it was fun while it lasted. Pity I don't like those pesky hovering beasts.

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

Hehe, what an apt name given to that rogue of a smiley. ;-)

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

But my real name _is_ Sanjay. My previous post was aimed at Vishesh.

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

I didn't mean 'Sanjay', I was referring to my profile name, '~s.o.s~'. :)

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

> can you tell us how its done, dani?
AJAX, if that makes you happy. :)

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

*Ahem* Again offtopic...Atleast let it not be a programming forum. ;-)

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

> What's your real name s.o.s.? I know most people's by now, but not yours
Sanjay it is. :)

Its a pity my name in the google search comes up with weird results. I guess its time to change my profile name. ;-)

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

Normally such a thing is almost always done using a server side script (you know why), but since you have been nice in your conduct on Daniweb, I would try something out for you. :)

How about something like:

<!--
author: Sanjay aka ~s.o.s~ 
A simple redirection script which runs on the client side.
-->
<html>
<head>
<style>
 .myDiv
 {
  text-align: center;
  font: italic small-caps 900 14px arial
 }
</style>
<script>
 var count = 5;
 var timerHandle;
 var URL = "[URL]http://www.yahoo.com[/URL]";
 var SITE_NAME = "Yahoo";
 
 function startCountDown()
 {
  update();
  timerHandle = setInterval("update()", 1000);
 }
 
 function update()
 {
  if(count <= 0)
  {
   clearInterval(timerHandle);
   document.getElementById('txt').innerHTML = 'Redirecting, please wait...';
   window.location.assign(URL);
   /*
   You can also use the window.location.replace() function with the difference
   being you won't be able to hit the back button once the new page has been
   loaded. Use the function which suits your purpose
   */
  }
  else
  {
   //you can also embed the entire message in a 'anchor' tag so that the user can decide not to
   //wait and click on the link to go to the site.
   document.getElementById('txt').innerHTML = 'You would be redirected to '+ SITE_NAME + ' in ' + count + ' seconds.';
   --count;
  }
 }
 
</script>
</head>
<body onload="javascript:startCountDown();">
<br /><br /><br />
<div class="myDiv" id="txt"></div>
</body>
</html>

Just let me know if it works for your cause. ;-)

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

AFAIK, the use of default values is for the flexible creation of objects, not identifying which objects have been created by _mistake_. And BTW, how would you justify that an object is created 'unintentionally', after all, its in the hands of the developer to dictate when an object should be created.

> Also I said "usually", this is because there would be specific
> scenarios when the functionality supported by your class requires
> a valid default value
I would rather not call it usually, but more like 'sometimes' in 'specific' cases'. :)

> e.g. ifstream c'tor.
Example with justifications please ;-)

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

I don't get it, whats so special about the normal link, inserted using the link tag. Either that, or something sure is wrong on my side. :)

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

Are you talking about the thumbnails of featured sites? Yes, they look kawai. :)

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

Maybe the one who called Linux a 'sissy' must be comparing it with FreeBSD... ;-)

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

> So the following does NOT have any effect in Java
The same would have no effect in C++, you are after all passing primitives. Since no reference variable here, hence no side effects.

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

Yes, we all like beautiful nurses. ;-)

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

> no
There are pointers in Java, just no pointer arithmetic.

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

There is as such nothing absolute when it comes to one's opinions. Better use the OS which suits your needs, thats the best advice someone can offer.

If you feel like contributing to the community of OS developers and the idea of free OS, go with Linux. If you have enough money to buy a decent OS with lots of support and gaming capabilities, go for Windows.

The difference between opinions are just the bias of people against one OS or another, nothing else.If you must know, some consider MS as evil, while others consider Linux as sissy.

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

> The hospital will hire me, but a nursing home will not -- just
> because I don't have my certification.
Because in this particular case, certification is the only way to advance, whereas in normal scenarios you have stepping stones like BS, MS, PhD etc.

Simply put, in your case its the only certification and a requirement and hence its a must.

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

> No employer is going to hire you just because you say you have
> "good experience" backed up with no certifications.
Thats an ass backward way of saying things. You need certifications only when you don't have enough experience to cover your back and that too, to fool employers who think certification is more important.

If you must know, experience beats 'just certification' hands down. Of course, if you have a piece of paper with your experience, it changes the scenario.

PS: This topic is going way offtopic James, Josh.

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

If the server side interaction is required, you would need to use AJAX. If only client side, then Javascript would suffice the purpose. Also unless the third window is in some way related to the main "index.html" page, I don't think there is any way of passing data between two unrelated HTML pages.

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

Hey, I am not that old... ;-)

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

> you should try what AD suggested..
AD?

> Default values, usually, should be invalid values
Give a real life example with reasons why this should be the case. Default values actually contain _default_ values which the class instance is supposed to have. The way you put in, leaving off values would become meaningless since they would contain invalid values, not something the programmer intended.

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

= is the assignment operator, and is basically used for assigning values to variables. What you need is the comparison operator == to compare values.

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

In that case, instead of accepting the input from user in the form of integers, accept the input in the form of string. Parse to string and find out whether the user has entered one, two, three values.

Extract the values from the string using a string stream. If he has entered less than three values, print out the default, if not, then print out the values as entered by the user.

To facilitate this, give default values out to the constructor as 0.0 so that if any one parameter is not supplied, the default value will be bound to the instance members.

Angle(int i = 0, double d = 0.0, char c = 0)
{
   inclination = i;
   degree = d;
   choice = c;
}

Also better seperate the class declaration from the definition in real scenarios.

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

> day=(x.day).operator- (day); There is a reason we do operator overloading. Don't you think the code above looks a bit illogical.

Read up on some good operator overloading tutorials to actually understand what it is used for. And BTW, operator overloading is used as: obj1 = obj2 - obj3; where all objects are instances of the same class and you have specifically overloaded the minus(-) operator.

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

It doesn't make a difference. Both can be used. Are you facing problems with any of the above mentioned approaches?

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

Write your own function which has the same functionality as that of putpixel. If you have no idea how to go about it, maybe it is too difficult a task for you to undertake, not to mention you would have to dwell into Assembly. Maybe this would help you in some way.

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

Matt, don't use deprecated headers and[("pause");](http://www.gidnetwork.com/b-61.htmlsystem). They call for bad programming.

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

> string isn't a keyword in ANSI C.
Neither in C++, its a class name. ;-)

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

> Who knows?
Being the moderator, I know the rules. It would be pretty wrong to give out email addresses, if its my job here to snip out email id's from posts to prevent spam.

> Um, so did you ask everyone, before you posted their addresses?
Umm..so has anyone of them objected after I posted their approximate addresses.

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

> Great, so you probably have access to our email account
> addresses we signed up with as well
Email accounts have got nothing to do with this discussion. Don't sway the discussion off-topic.

> Don't abuse your mod status.
Like I stated before "Of course if you people find it offending I could just delete my post.". And anyways, don't go haywire. Your name was not on the list and the people whose names are listed have as such not raised an objection. Don't make up for your lack of humour by hammering perfectly normal posts. Don't make pointless and random accusations.

End of discussion.

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

> im not bothered
One shouldn't be. Of course if you people find it offending I could just delete my post.

> Is this just a scare tactic or could an admin really contact
> authorities (especially considering that you don't really know where
> we live )
If its a serious thing, we can always contact your local ISP office, explain the situation to them, get hold of your address and voila, the police at at your house. ;-)

But normally, IP addresses are used for perma bans so that a person can't create duplicate accounts.

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

> What exactly would be the point of logging our addresses?
Actual addresses aren't logged. Its the IP address which gets logged. Its needed for an IP ban if a spammer gets really sneaky to deal with. How to derive addresses from IP's is a different thing. ;-)

> Yeah I'm sure everyone wants their stats broadcasted? - iamthwee
Thats why I didn't broadcast yours. A little sense of humor is absolutely must to get on this list.

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

[edit]Never mind[/edit]

;-)

iamthwee commented: Yeah I'm sure everyone wants their stats broadcasted? Don't abuse your mod status. -2
joshSCH commented: haha, it's all in good fun ;) I don't mind at all +8
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Hmm..does any of this sound familiar:

Caradog House
Cleppa Park
Newport, Gwent np10 8ug
UK

OR

Crawley Court
Winchester
Hampshire
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Yes it was directed towards you. Does the address printed above in any way near your house?

Or is it:

Address:    1021 ESE Loop 323
Address:    Suite 100
City:       Tyler
StateProv:  TX
PostalCode: 75701
Country:    US
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

I am not very sure what you need there. Are you in need of some C++ tips and tricks, or a good book which you can buy from Amazon?

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

Does this address look familiar ;-)

Boucher, Cindy        Cindy.Boucher@suddenlink.com
Cebridge Connections
12444 Powerscourt Drive
St. Louis, MO 63131
US
314-965-2020
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Plus you need to convert the character to lowercase so as not to force the user to enter 'y' in lower case only. while(tolower(continue) == 'y')

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

I guess this is what Narue gets for letting budding programmers close to her. ;-)

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

Yes.

<html>
<head>
<script>
    function add(a, b)
    {
        alert(a + b);
    }

    function takingFunction(x, y, func)
    {
        func(x, y);
    }
</script>
<head>
<body>
<form>
    <input type="submit" value="Submit" onclick="javascript:takingFunction(2, 3, add)" />
</form>
</body>
</html>
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Just by validating the extension, you can't be sure that the file uploaded by the user is actually a image file. I can always rename an executable and make it seem like an image file, if your logic performs these kind of critical validations at the client side.

Better leave off these things to the server side validation. The size restriction as well as the type of file can only be meaningfully validated at the server. Doing it at the client side is a moot point.

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

You can always peek into the header files of the compiler you are using to find out the value of those in-built constants and put the same in a JS file and include that file.

Something like:

// Vars.js
var DB_EPSILON = 0.00000000123
var DB_MIN = 0.125
<html>
<head>
  <script src="Vars.js"></script>
</head>
<body>
<!-- code -->
</body>
</html>
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Any kind of credit is appreciated. ;-)

Good luck.

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

Don't worry, it just helps in bringing the old memories back to Davey...

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

Its proprietary content. You can at the most know the name of the engine it is using which would be normally a Doom III or Half Life II engine. Not many companies are into engine development -- its an arduous task, better left off to the pros.

Almost all the games out there either buy a engine or build upon an existing one.

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

>char *p = "india"; p here points to literal. It is more like const char* p = "india" . Here it is const data, non-const pointer. Hence you can do something like ++p , --p and get away with it, while trying to manipulate the value won't work. > char[] p = "india" p here is a constant pointer pointing to a non-constant data. Here it is non-const data and constant pointer. Hence you can do something like p[0] = 't' but trying to do ++p or --p won't work.

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

Try using this:

<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');
            return true;
            //call the function which performs calculation
        }
        else
        {
            alert('Press the correct key');
            return false;
        }
    }
</script>
</head>
<body>
<form>
    <label>Box</label><input type="text" name="txt" id="txt" onkeypress="javascript:return myKeyPressed(event)" />
</form>
</body>
</html>