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

Offhand it would be difficult to point out the actual cause of your application _not working_ but I guess the collection used to hold values is not getting updated or the DAO methods are returning rogue values in your case. Without more code, I don't think anyone would be as such able to lend a helping hand.

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

Looking at your code, I can clearly see that you are desperately struggling with the language. Maybe you should try to get a firm grip over the langauge(or computer science concepts) rather than diving into problems straight away.

This link has some good resources for beginner C programmers.

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

> Now that's perfect question to be answered with someone's signature
:-)

Just because it is possible to push twigs along the ground with one’s nose does not necessarily mean that that is the best way to collect firewood.

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

Also you should consider using JSTL instead of embedding business logic / scriptlets inside your JSP file.

Read the following:
http://java.sun.com/products/jsp/jstl/
http://www.developer.com/java/ejb/article.php/1447551

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

Hey, whatever happened to 'everyone should get a fair chance' thing. ;-)

PS: I am happy I use code tags. Martians give me the creeps...

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

> Maybe I like to masturbate.
On a serious note, I think you should keep such things out of discussion. There are better way of being sarcastic / putting across your point.

~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
<%
  String pGoal = rs.getString("pGoal");
  if(pGoal.equals("met"))
    out.println("<td style='background-color: green;'>" + pGoal + "</td>")
  else
   out.println("<td style='background-color: red;'>" + pGoal + "</td>")
%>

I would not recommend scriptlets but I don't think you care about it though...

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

I can churn out alternatives only if you provide me with the code you have so far. What I presented in my previous post was a fairly easy thing to have done. If you are not able to achieve it, post the most recent code.

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

> But I know that in our product, for O&M GUI we use Apache Tomcat
Apache Tomcat is a web container which knows how to handle Servlets and JSP's and has all the capabilities of a normal web server.

Apache Web Server and Apache Tomcat are two different things.

> webserver doesnt support business logic
Thats not a generic statement. It does when your server side logic is written entirely is PHP. AFAIK, there is no app server for PHP, though I admit my understanding of PHP even fails me. Also when you have a small scale project, using a web container gets the job done. Low complexity projects seldom require the power of an Application server.

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

AFAIK, due to security reasons, no. Plus Javascript has an event driven model, moving around the cursor with 'Javascript' wouldn't make sense either.

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

> Maybe that's what this magician was doing.
Maybe you didn't see how he removed his shoes, exactly at the same spot at which he was standing. The only way I think this was possible is by assuming that those people were in this hoax.

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

> Bright Girl!
Yeah, I had to put my sunglasses on... ;-)

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

Depends on what kind of project is under consideration. Some combinations I have seen are:

  • Web server and database server
  • App server and database server
  • Web server, Application server and database server

And BTW, a web server is different from a Servlet container considering that the latter is required if you want to host Servlets and JSP's. Basically its like:

Application Server <- Web Container <- Web Server

Application server incorporates everything.

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

Post #2.

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

Look into the documentation of the File class and try something on your own. Post your code if you still aren't able to figure out things.

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

The "properties doesn't exists" error is usually thrown when no such element by the given element id or name exists or when you are trying to call a function which the object doesn't possess. (eg. length function on RegExp instead of String).

Something like this. In the code below, it looks for an element with an id 'a' which doesn't exists before the page has loaded. Hence the error message.

<html>
<head>
<script>
    alert(document.getElementById('a').value);
</script>
</head>
<body>
    <form>
        <input type="text" id="a" name="a" value="sanjay" />
    </form>
</body>
</html>
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

It would be really better if you post the same question with the CSS solution I have provided to you to the ASP.NET section since this has ceased to be a CSS problem and is more of ASP thing.

Once you get what you are looking for, using the class attributes and applying the style of your choice is pretty easy.

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

Is it really _that_ necessary to input the exact information?

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

Seeing that you are using ASP, you can use the ASP constructs to do selective rendering.

<html>
<head>
    <style>
        .wrong
        {
            color: red;
        }
        .right
        {
            color: green;
        }
    </style>
    <title>Example</title>
</head>
<body>
    <table style="border: 1px solid green;">
    <tr>
    <%
        dim i
        for i = 1 to 6
           if text = 'NO' then
                response.write("<td class='wrong'>" & text & "</td>")
           else
                response.write("<td class='right'>" & text & "</td>")
           end if
        next
    %>
    </tr>
    </table>
</body>
</html>

Though I am not sure on the ASP code I have written, this is pretty much what you would have to do. This will be either Javascript code or ASP code depending on where the data is coming form i.e. client side or server side.

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

> While you're there, ask them if leet and IM lingo are professional communication styles....
It would be a *cough* embarassing *cough* situation if she were to say 'YES!'. ;-)

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

FYI, the people who cause inconvenience to others by smoking or the people who make laws aren't following this discussion.

Clobbering each others feelings and views is no way to come to a conclusion. There is always a common ground and its the one on which we are standing right now.

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

See, I told ya, Joey really is observant... :)

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

First in state, nice. Good luck and happy 'thinking'. :)

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

> If we write in this "IM lingo" then as long as people understand,
Correction, "as long as IM lingo oriented people understand". Its beyond the capability of a non English person to fully decipher the meaning of a IM lingo post. Hey, but who cares as long as the message is understood by my forum friends...

> 133t speak will be the norm in 100 years time, you just watch...
Glad I wouldn't be there to see it...

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

Too bad the newsgroup folks are not interested in sites like Daniweb otherwise you would have met your match and things would have been a bit _too_ interesting. ;-)

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

Too bad, but I guess nothing can be done which would predict or stop such things.

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

Nice work. Keep up the good work guys. If this event goes successful, maybe you should come up with more such creative ideas in which Daniweb members can participate.

At least this would liven things up a bit around here, since Narue is under the impression that she is the only one who can do that by living up to her title... :-)

sk8ndestroy14 commented: Thanks for the support. +6
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

GTK+ has got nothing to do with OpenGL. GTK, wxWidgets are GUI libraries. Visit the concerned site for more information.

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

Set the color property of text for the given td based on the value fetched from the tabe.

if value is 'late'
  <td style="color: red;">late</td>
else
  <td style="color: green;">on time<td>

You can use normal conditional statements to do this work though it would be better if you use JSTL tags to do conditional branching.

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

That is called an image map. Read more about it here and here.

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

'Doesn't work' is a very generic. You need to come up with a specific problem if you want help. There are loads of AJAX tutorials out there, just read a few of them and if you are still stuck, post your code here.

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

Plus Walt has no reason to be angry with you, you always use code tags... :P

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

Why do you need Javascript if all you want to do is color the text? You can very well use CSS to do the same.

<html>
<head>
    <title>Example</title>
</head>
<body>
    <table style="border: 1px solid green; color: red">    
        <tr>    
            <td>Hello to all</td>
            <td>This is some dummy text</td>
        </tr>
    </table>
</body>
</html>
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

IMHO, when reading dummies book, you are a dummy when you start the book, and a dummy who thinks he knows everything when you end it...

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

the compiler designers can write the compiler to:
1) do nothing because the command is undefined
2) do the logical thing the command implies
3) do something they think it should do, which might be logical to them but not to us
4) do anything else they want the command to do, completely unrelated to logic.

Doesn't this sum up to...

Though it might work for you on each run, the same can't be said about it on another machine, compiler or architecture.

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

> I'm too sensitive and you're too mean. Fair enough?
Yes, even her title suggests the same. :-)

> I don't even know how to blog.. Daniweb is certainly missing out
Missing out something it never had, fair enough. ;-)

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

You can use Internet Explorer (browser) to test your VBScript code. See the first link I posted in my previous post.

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

Nothing is hard if you try, though I must admit the syntax differs a lot from C++ type languages.

There are a lot of tutorials on the internet, you just need to read them and start practicing. Writing small workable scripts would be a piece of cake. See this.

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

This <([^>]+)> would probably be what you were looking for. Since I don't know the C# Regex API (neither C#), I can't help you in that area, but as long as you know how to use back-references and extract the matched text, this shouldn't be a major problem.

For some tutorials on C# regexes see here.

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

Here is something for those people who think that 'Teach yourself xxx in yy days' can do them any good..

iamthwee commented: I agree, even the the teach yourself in so many hours books are much better! +11
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Glad it worked out for you, though I must go out to say that MS SQL sucks if it can't even allow a alias to be used with the group-by clause which is so common a thing with present databases. So much for the Enterprise level database... ;-)

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

If what you say is true, then try out this one:

select substring(zip, 1, 3), sum(AvailNums) from AvailHomeZips group by substring(zip, 1, 3);
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

There can be many reason behind it, Java not being able to find your class file etc. etc. Have you tried running your applet using the console command 'appletviewer'? If it works then its definitely some problem with the location of class files.

Letting us know of the directory structure or posting the Java file here would be better if what I suggested still doesn't work.

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

I had tried the query pasted by me in my previous post on MySQL so I don't know what went wrong when the same was ported to MS SQL.

Try this:

select substring(zip, 1, 3) as Z, sum(AvailNums) as SUM from AvailHomeZips group by Z;

I guess MS SQL doesn't take into consideration the case hence the results. Post if it works or not.

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

> Bill Gates continuously finds ways of letting computer users pay for
> the same thing over and over.
Amen to that. ;-)

BTW, quintoncoert I hope you do realize that the '>' are there for a reason. They are used for quoting text. Your use of '>' makes your post confusing to read.

You should do something like:

>>Can one actually use the MFC in C++?
>I can't imagine how you've been studying MFC without realizing
> that it's a C++ library.

lol. firstly thank you. Secondly sarcasm is the lowest form of wit. Or at least that is how the saying goes. I believe that it is the opposite.

But i have to say that all the c++ programs which i have done up until now did not have GUIs. I developed visual basic screens for them and invoked them with the shell command. So i have not studied any GUIs MFC or otherwise for c++.

>>Is it possible to bypass the common language runtime and still
>>end up with a graphical user interface?
>I sure hope so, otherwise all of the programs that were written
>prior to 2000 would completely fail to work.

I am not sure that Microsoft would care. Bill Gates continuously finds ways of letting computer users pay for the same thing over and over.

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

Something like this:

<html>
<head>
    <script type="text/javascript">
    var doConfirm = function(id)
    {
        var link = document.getElementById(id);
        if(confirm("Do you really want to go to Google?"))
            return true;
        else
            return false;
    }
    </script>
</head>
<body>
    <br /><br />
    <div>
    Click on <a href="http://www.google.com" id="link" onclick="return doConfirm(this.id);">this link</a> to go to google
    </div>
</body>
</html>
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> free/open source Flash creation program
Flash is a proprietary software, you would need to buy it.

> On another note, would Java be more suited for the job or should I try to learn Flash?
You are being very vague here. Its like asking whether you would prefer salt or sugar. Both are an integral part of your daily meals. Its the same here.

Flash is a client side technology, used for adding presentation and animation to your site. Java when used in the form of Servlets, JSP's and EJB's contribute to the server side scenario of a site.

The minimum requirements to make a site are:

  • HTML
  • Client Side scripting (almost always Javascript)
  • Server side scripting (Java Technology/ .NET / PHP / Python etc.)
  • Anything else which would help you in adding value to your site.

Try to do some research on what kind of site you would like and come up with a more specific question. You might get a specific answer.

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

> However I thought that behavior underfined ment that the compiler
> doesn't know what to do, therefore it would not compile.
You are getting confused between the two of them. Using clrscr() is what constitutues non-portability since it is available only on Borland Compilers and is not a part of the language standard. In other words, change in the architecture, compiler or OS might result in the code not being able to compile.

Undefined behaviour is when people say '..but it works for me'. Returning an address of the local variable and using it is what constitutes undefined behaviour since the memory no longer belongs to the programmer. If you write such code, you are completely at the mercy of the runtime if it decides to use up the memory which was used by your local variable.

int fflush(FILE* stream); Flushes stream stream and returns zero on success or EOF on error. Effect undefined for input stream. fflush(NULL) flushes all output streams.

> where is it used and can you please explain it with a sample code
> where it is used
Output in C is normally buffered, which means that the output is not written character by character but in chunks. It might so happen that a printf statement you wrote never got printed since the code after it caused a segmentation fault. In that case you can force the output to be printed …

Aia commented: Thank you. What else can I say?. +5
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

If you don't care about the values which get deleted, then why not just use the method suggested by me above? If not, then you need to know Transact SQL to generate random numbers and delete entries with those primary keys.

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

> changeStyle(oneTd, 'navred')"
The above one should be changeStyle(this.id, 'navred').

If this still doesn't work, post some working code along with sample stylesheet and images so that we can try it out without writing the same code over again.