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

1. What is the best way to manage such project so that we won't collide?

Use a version control system. Having your code placed at a central repository which would then be used by collaborating developers is probably the best way to track of changes made to files and share code in a clean way without mailing each other 'zip' files. That being said, how you implement this in your project depends on a couple of things. Do you have problems with your code being publicly exposed/published?

If not, then head over to Google code which is basically a free project hosting solution provided by Google. You can to choose between two version control systems (VCS); SVN which is a centralized VCS and Mercurial which is a distributed VCS. Though the concept and adoption of the latter is gaining pace among the developer community I'd still recommend going with SVN since it seems to be version control of choice used all the "enterprisy" organizations out there. Learning SVN would would probably give you an upperhand over the other beginner programmers when it comes to trying out professional programming since it looks good on resume. Assuming you would be developing using Eclipse, there are plugins available for both the VCS's so it would definitely provide a pleasant experience when it comes to developing and committing your code.

If this *isn't* an open source project, you might have to shell out a bit and buy a code hosting …

peter_budo commented: Nicelly writen +13
kvprajapati commented: awesome! +9
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Look into the Apache HttpClient project.

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

> Buggy the Clown

No; it's Luffy who is a 'rubberman'. Buggy can just take out his body parts and move them around. :)

> She is extremely demanding and can seem unappreciative of others.
> Her favorite words are "tea", "servant" and "What?"

No idea. :(

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

The standard library implementation of Priority queues is such that their elements are ordered based on the natural ordering of elements (in case of numbers, it would be in ascending order as per the contract of Comparable interface) or based on the external Comparator passed in. In that case, getting the smallest element would be a matter of removing the element present at the head of the queue.

Look into the implementation of PriorityQueue of the standard library for more details.

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

Inu Yasha!

Here's one from my side:

He's an adventurer in search of a treasure. He has a rubber body which is a result of having eaten a devil fruit.

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

Kakashi sensei! :)

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

Are you still facing the problem? Tried with a different browser? Though it might sound crazy, try logging out of the site, clearing your cookies and browser history, closing the browser and then try logging in again. I really can't come up with a logical explanation when it comes to the description you posted. :)

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

I'm not sure if I understand your question here but to get around the tedious act of escaping properties-file-sensitive-characters, consider writing your properties file in XML format. The entire code remains the same with the exception of the way you write down your properties. Not requiring the user to escape spaces, quotes, double quotes when configuring data in a properties file is a big win IMO.

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

What's up with the INT(3) for the age column? If you explicitly plan on specifying the precision and scale, use the NUMERIC data type since INT doesn't support it or else just stick with INT (without the precision in brackets) which has a defined range. Read more about numeric data types in Derby here.

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

> why can I not use 2 different variables and display the interger values
> of each array? System.out.println(Arrays.toString(myIntArray)); .

> how can I continue work with the return value false/true from
> Arrays.equals(initialstate, goalstate).

Sorry but this isn't clear. What exactly do you mean by 'how can I continue'? Post the code which are trying to run along with what is expected and what you are getting.

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

> i want to know that whether Calender.getInstance() method is
> threadsafe or not.

AFAIK, yes, it is. Thread safe concerns normally crop up when you have destructive updates happening to an object. Calendar.getInstance() is a static method and doesn't alter any static fields of the Calendar class and hence is thread safe.

A word of advice though; just because a method is labeled thread safe doesn't mean you can use the corresponding class and always have correctness in your application. A classic example is the Vector class which has its `get`, `set, `size` methods synchronized but still has the possibility of exhibiting incorrect behaviour when used in your *custom* scenario. E.g.

if(vector.size() > 0) {
  // some complicated processing
  Element e = vector.get(0); // can fail!
  // Since by the time the control reaches here,
  // some other thread might have already modified the vector.
}
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

For all regular usage, you would want to use the Calendar and java.util.Date classes. java.sql.Date class is normally used in JDBC context. Read this. You get the error because java.sql.Date doesn't have a no-arg constructor.

BTW, which class has this 'SendFile' method of yours? Is it in a separate class or in the same servlet? If it's in the servlet, post the entire servlet class definition.

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

Your question isn't very clear, which `score` are you talking about? BTW, you can't access instance variables like `chooseGrade` from within `main` since it's a `static` method. Also, post complete class definitions to get better responses/suggestions.

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

What's the type of array `outputArray`? If it's a Question array, each reference would be of type Question which kinda explains everything.

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

Yes, there is a certain limit imposed by the system when it comes to adding/editing tags. Read all about it here.

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

Not noticing a mistake and then saying, 'Well it's in common usage now', is just rubbish

It is, but is kind of irrelevant to the discussion, given that neither the site owner nor the creators of the vbulletin have made a comment on this thread stating the same. :-)

Personally, I don't think that he's guilty of any of those

He isn't, seriously. I think he/she's pretty good given that his/her very first thread has resulted in a pretty lively/amusing discussion. I mean, come on, if someone is capable of making all the Daniweb old timers say "how dare he" without resorting to obscenities, that person must surely be... ;-)

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

When IT people make such a song and dance about technical jargon, programming semantics and syntax, it baffles me why they don't apply the same rigour to their spoken medium.

Simply because every 'song and dance' is associated with an ROI (return of investment). When programmers nitpick on some beginners code, it is with the intent of making him/her a better programmer. When languages features are battled to death, it is with the intent of working towards the goal of a better language. In this case, I really can't see any convincing ROI here if infraction is renamed to something which is more "semantically" correct, do you?

@OP
Subtle trolling FTW. :)

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

How about:

"If I am helpful, pls give me reputation points. Thanks!" ;-)

jonsca commented: That violoates the principle: "The first rule of rep club is you never talk about rep club" +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

Typically aimed at mocking newbies (in an offensive sort of way) who try out wrong things and wonder why it doesn't work (read it on some blog):

hey guys I keep shoving cucumbers up my a** but I’m still hungry

Typical state of an open source project: (some github project)

Roadmap
Step 1 — Create a roadmap

Some think tarballs are better source code management alternative than VSS (on reddit):

Tarballs don't magically corrupt themselves, VSS does.

An unique way to arrive at the universal answer:

"4" + 2 = "42"

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

The JDK implementation of PriorityQueue is backed by an array and hence ad-hoc deletions tend to be expensive (multiple invocations of System.arrayCopy etc). You can try your hand at writing a Linked list backed priority queue or use ConcurrentLinkedQueue though the added cost of synchronization might not be acceptable in your scenario. In any case, profiling is your friend here.

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

FTP supports a mget command which can be used for retrieving multiple files based on the passed in file name/pattern. Look into your FTP client documentation for such support.

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

It kind of seems clunky and complicated at best. A couple of questions:

  • What do you achieve by dynamically loading your DAO class?
  • Why is your DAO throwing business exceptions? I'm pretty sure I have at some point in time replied to your post in the JSP section and asked you not to do so.
  • Why progamatically create database tables? Table creation/data population scripts are much more logical unless you have some weird requirement in which case you might want to mention that.

Your data access layer should be as simple as possible, really. Having loads of exception handling, connection management logic isn't good. You have two ways of improving your JDBC code quality:

  • Either create a mini framework which manages connections/transactions for DAO's
  • Use an existing framework and be done with it
kvprajapati commented: N/A +9
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

OUCHH! Why put queries in properties file? If you need the ability to change queries without changing code, consider keeping your queries inside an XML file and read them back or better yet, use a framework which actually does this and in a much better way i.e. iBatis.

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

How about mods choosing good bits of code from the forums from time to time and placing them in a hall of fame type thingy?

More work for mods? Oh noes... :-)

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

This indeed is a sad and shocking news. I've known Dave for quite a long time; first as someone who helped me learn C and then as a fellow moderator/senior member. He was one of the awesomest contributors of the C/C++ forums.

He was always up for political discussions and often sent me PM's regarding his views on Indian politics and other political matters which influenced India. He was a wise man who always looked out to learn something new.

He was a IRC regular and talked a lot about his family, work and the forum in general. The fact that he never mentioned his illness to me or to anyone on IRC or forums proves how strong willed & thoughtful he was.

Whenever I think of Dave, the pic of his beautiful little daughter smiling alongside of him comes in front of me. May God give strength to his family to carry on and live a life which Dave always wished for.

Dave Sinkula, you will always be missed. Rest in peace.

Your friend,
sos

:(

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

The database is MySQL . I am not sure of the type. I believe it is embedded.

Looking at the configuration in your first post, it doesn't seem like an embedded database to me; more like MySQL running in server mode. This setup won't work for a desktop application unless you plan on making your users run a MySQL server instance on their machines before using your application. For using embedded databases, google for 'java embedded database sample'.

On a related note, please don't ask help via PM's; since I don't have the time to render 1:1 help. Ask questions here on forums where everyone would have a look at your code and others would be benefited with the answers.

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

If you are using Glassfish, you need to configure a datasource, publish it to the JNDI server and then access it using the specified JNDI name. Read this for more details.

For standalone applications, creating a JNDI datasource seems like an overkill. For your desktop application which database are you using? Is is used in server mode or embedded mode? I can't recommend an appropriate approach unless I know this detail.

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

Is there another possible method as i am not very confident with using JScript??

Keep the same name for both the buttons and let them have different values.

<form action="addAttractions.jsp" method="post">
        <% out.println(tr); %>  // Outputs table rows of given data
        <tr>
            <td>
                 <input type="image" name="button" value ="Update" src="Images/b_edit.png" alt="Submit button1">
                  <input type="image" name="button" value ="Delete" src="Images/b_delete.png" alt="Submit button2">
            </td>
        </tr>
     </form>

In your servlet code,

String action = request.getParameter("button");
if("Update".equals(action)) {
    System.out.println("Update clicked");
} else if("Delete".equals(action)) {
    System.out.println("Delete clicked");
}

Buuuut, there is a long standing bug in IE wherein the button value is not submitted, but rather the X and Y coordinates of the button are (LOL?). This thread describes the issue pretty well with a couple of workarounds.

Hope that helped. :)

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

Looks pretty screwed confusing, I'd personally keep it as it is unless you want to uninstall java in which case removing 'Java Platform Enterprise' should IMO do the trick.

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

AFAIK, you need to have a JNDI server running to make any sense of InitialContext. This isn't a problem with managed environments like a servlet container or an application server since all the configurations needed for an InitialContext lookup are already taken care of.

How are you exactly running this application? Standalone java program? A web application? If the latter, which server are you using? Creating a Datasource and publishing it as a JNDI resource requires a bit of configuration which is different for each application server.

If it's the former, I personally haven't worked with standalone Java applications which make a reference to a JNDI resource. However, reading this might help you out.

~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 sent a pm with what this is regarding. Is there anyone I can contact who can remove or edit this?

We can't delete this thread as per the site rules/acceptable use policy. You asked for help, you got help. Deleting this thread would deprive others of the hard work done and the time spent by jcao219 in answering this thread.

Quoting the 'Acceptable use policy' of this site:

Additionally, DaniWeb LLC reserves full rights and privileges to information posted to anywhere within the daniweb.com domain by its members and staff. Any and all information posted on DaniWeb may not be copied or used elsewhere, in any way, shape, or form, either on the Internet or in print, without prior written permission from Dani Horowitz.

In case your instructor demands an explanation, you are more than welcome to re-direct him to this post.

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

Aspell is a GPL'ed spellchecker which is pretty famous and used in chat clients like Pidgin. You can try their mailing list/forums for more details on integrating it with your Java application.

There is another Java library called Jazzy which is a spin-off of the Aspell project which you might interested in having a look at.

Edit: Doh, beaten by Peter. :)

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

> Change is relative, not absolute.

But it's still good. At least for someone/something. If it weren't, it wouldn't be called change, we already have `disaster` for that. :)

Pupils lose a year or so of 'good quality' education as they act as guinea pigs

Maybe, but still doesn't tie to the topic under consideration. Though there have been numerous incidents of students losing out and getting the short end of the stick due to the so called educational "reforms", it still doesn't tie to the topic at hand. I don't think any measures taken to bring in the performance of the students as a whole in the salary equation of a teacher is going to make students lose out on anything. In fact, any change rolled out to implement the above mentioned change should be orthogonal to the way students have perceived and interacted with teachers/school.

Working around the problems I've outlined would not be a trivial matter

I never said it would be. My point being, if tying up a teachers salary (or maybe 30% of the base salary) have even a slightest chance of improving the current education system, all the teachers/parents/education committee should seriously give a collective thought to working around those *non-trivial* issues.

Believing that there would be a "change" to improve the current education system and which also would make all the teachers happy would really be an awesome pipe dream. ;)

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

It has to start somewhere, no? There always were problems with new implementations and there always will be. Change is iterative, change is subtle, change is hard but change is good. Just because trying out a new thing seems kind of impractical or difficult shouldn't be the only reason for not trying it out.

Does this new system of appraising teachers has even a tiny bit chance of improving the current education system or the way the teachers/students view the education system? If no, then that's that. If yes, then an attempt to roll in the new system in a crude way on a small scale be made. It would at least give us a rough estimate/idea as to how new things turn out to be; much better than thinking of the thousands of possible ways in which things might fail...

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

> Do you believe this is right?

Yes of course. IMO a teachers job is much more than teaching a subject. It is to guide the student, develop his interest in the subject matter and understand why the student is not performing as he should be. There are many students out there who love the subject matter but hate the way it is presented thus resulting in low academic grades.

Of course, this isn't as simple as it sounds. The system should be such that it can't be sabotaged by the students who are sour if things don't go their way. But then again, I doubt the practicality of this idea given the fast paced and *busy* life the students and their parent's these days live. :)

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

No, the problem would be of having a relevant mod online all the time [C++ mod passing judgment over a Internet marketing forum thread might lead to disaster, been there, done that :)].

Pure spam posts/threads are pretty easy to handle but when it comes to threads/posts which *seem* as though they are violating a rule, it is the OP who suffers since the entire thing goes into a discussion and the thread doesn't make its way to the forum intended. If it breaks the rules, fine, but if it doesn't, it is the member who loses out on getting help which leaves a pretty bad impression.

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

...you played games which had no *save*. Dying typically meant more than a hour of repetitive grind. :)

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

With all due seriousness, the world time at your disposal... ;)

WaltP commented: That's a great link!! +0
jonsca commented: Is "due seriousness" like "due North"? +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

As already mentioned, look into the embedding jython section for more details, esp the usage of ScriptEngine API to invoke external scripts.

In case you are still facing problems, I'd recommend hitting the jython mailing list/forum for quick answers.

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

> i find lot of System.out.println statements in jsp and action files. could
> that be a culprit?

Possibly, given that the arguments are converted to String. How many is 'lot'?

BTW, are you getting the errors during application startup or after a specified duration of running the application. If the latter, you need to make sure you are using an appropriate garbage collection strategy though I must admit that any application which takes up more than 512 MB of permagen space is pretty much a badly coded piece of work.

Also, I get the feeling that the permagen settings are being ignored. Paste here/link us to the latest catalina.sh file just in case.

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

At least Hakuouki would be aired on the 4th as per Animecalendar. I do see a lot of potential in some of the series, so no, can't tell whether this will turn out to be a horrible season without digging in. :)

Sulley's Boo commented: subarashiiii! domo arigato, sos-san .. +0
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster

> But yes, any replies greatly appreciated

Print out the stack-trace of the exception (if thrown) instead of gobbling it up for more details.

IMO the design seems kinda wrong; you really shouldn't be persisting the data in an Observer since theoretically an Observable can have multiple observers. The right place to persist updates would be at the source of the data change i.e. in your Observable.

HTH

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

Yes, post the user name you desire along with an alternate one in case the former is already taken.

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

> but I need another solution Anyone?

As already mentioned, any library which just fetches the response for a given URI won't cut in for your needs (unless you plan to parse that response and make the necessary calls manually). I can think of two ways to tackle this problem:

  • Analyze the way the page works; which Ajax calls are made after the page loads (pretty easy with the Firefox add-on Firebug). You would most probably end up with a different URI (from the same site most probably) which accepts the data in a particular format as used by the site Javascript. After that, all you'd need to do is use *that* URL with URLConnection by passing in the data as per the contact between the loaded page and the data service
  • Use a library which emulates a browser. HtmlUnit and Lobo come to mind. By using the programmatic API of these libraries (would require a fair amount of research of course), you would definitely be able to achieve the actual *after page load* effect. You can then sanitize the response and parse it using something like Jericho.

HTH :)

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

IMO, Wikipedia belongs to a different league altogether. I mean it's *Wikipedia* which has a *lot* of voluntary contributors/moderators, maybe even a few paid ones.

Trust me, a lot of effort has gone into making Daniweb user friendly (groups, blogs, tutorials etc.) but with the amount of traffic Daniweb attracts, spammers almost always end up abusing things one way or the other. You might be surprised at the sheer amount of time we moderator spend in fixing code tags, deleting spam, moving posts around etc. With an *open* wiki, it would be nothing short of hell. :)

So, no, a wiki won't be that good an idea, at least not without a decent sized staff to keep a lid on things.

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

> I thought I would suggest and ask "Why doesn't Daniweb have a IT wiki?"

More spam to worry about for moderators/super-mods/admins maybe? Not to mention the host of questions from beginners asking/begging/demanding ready code for their assignments diluting and completely destroying the concept of a wiki...

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

That piece of code won't compile given that the println method of PrintStream returns void.

Look into some examples which use the Calendar API for adding/subtracting dates/months/years.

~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

As already mentioned, HTTP is a request/response protocol; what this implies is that the server can push updates/send a response only when requested. So you can two choices to update your data on screen:
- Use long lived connections to implement server push. The way this normally works is that the initial request which loads the data doesn't close the connection.
- Use polling as already mentioned.

Both approaches end up consuming resources. Server push keeps all the connections occupied which might lead to the server running out of connections if a lot of clients are using your application. Polling leads to the server being bombarded with constant requests even when there is no data which can be pushed to the client.

You might want to review your requirements and decide which approach suits you best. Here is an interesting read about the different async technologies BTW.