Search Results

Showing results 1 to 40 of 885
Search took 0.10 seconds.
Search: Posts Made By: ~s.o.s~
Forum: JSP 1 Day Ago
Replies: 2
Views: 126
Posted By ~s.o.s~
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

It seems that you are using a pre JSTL 2.0 URI; in pre 2.0 JSTL, the set action is configured to not accept run-time expressions...
Forum: Java 1 Day Ago
Replies: 3
Views: 143
Posted By ~s.o.s~
> Why use abstract classes at all? Why not just declare a class and
> then make sure you never instantiate any variables of that type?

...because compile time checks are far superior/efficient...
Forum: Java 3 Days Ago
Replies: 2
Views: 171
Posted By ~s.o.s~
You can either modify the properties of the command window [cmd] to show more than 500 lines [ALT + SPACE + P -> Screen Buffer Size -> Height] or pipe the output of your java program to some text...
Forum: DaniWeb Community Feedback 9 Days Ago
Replies: 3
Solved: Dear Adatapost
Views: 294
Posted By ~s.o.s~
Consider the possibility of Adatapost giving the green rep for the following content:


No where does adatapost specify that the solution is a *good solution*. Overzealous, much? :P
Forum: Java 14 Days Ago
Replies: 8
Views: 238
Posted By ~s.o.s~
Try using the DocumentBuilderFactory instead of explicitly instantiating the parser.public static void main(String args[]) throws Exception {
DocumentBuilder builder =...
Forum: Java 17 Days Ago
Replies: 2
Views: 251
Posted By ~s.o.s~
NumberFormat is an abstract class; use its static factory method to get your choice of number formatter.public class MainTest {

public static void main(String args[]) throws Exception {
...
Forum: Java 18 Days Ago
Replies: 2
Views: 375
Posted By ~s.o.s~
The commas and the brackets are a part of the ArrayList class's toString() implementation. If you need your own row representation, either write your own method which does so or better yet, create a...
Forum: Java 21 Days Ago
Replies: 20
Views: 558
Posted By ~s.o.s~
Use getValues().nextLine().equals("n") instead. The Scanner name is confusing BTW, just name it scanner instead of getValues which is more appropriate for a method name.
Forum: Java 21 Days Ago
Replies: 20
Views: 558
Posted By ~s.o.s~
You are comparing a Scanner object with a String object.
Forum: JSP 21 Days Ago
Replies: 4
Views: 909
Posted By ~s.o.s~
This doesn't seem to be a JSTL problem since the class missing belongs to the jsp-api.jar library which is a part of the standard distribution [i.e. part of the specification, placed in Tomcat/lib]....
Forum: Java 30 Days Ago
Replies: 16
Solved: Append to array
Views: 887
Posted By ~s.o.s~
What's wrong with the getTime() method of the Date class which returns the number of milliseconds elapsed since January 1970 as long? To get the seconds, just divide by 1000.
Forum: Java 31 Days Ago
Replies: 16
Solved: Append to array
Views: 887
Posted By ~s.o.s~
> is it possible to loop through the contents of two arrays to populate a
> third array with the combined content?

In my code I'm using looping through two Lists and populating a third list...
Forum: Java 31 Days Ago
Replies: 16
Solved: Append to array
Views: 887
Posted By ~s.o.s~
Sadly, this simple a thing becomes pretty clunky to implement when it comes to Java. A sample implementation might be something like:
class YourClass {

private static final List<String>...
Forum: Java 32 Days Ago
Replies: 16
Solved: Append to array
Views: 887
Posted By ~s.o.s~
> Does anybody know how I can append to the array

You can't. The best you can do is perform a copy-on-write if the content to be written is more than the initial capacity with which the array was...
Forum: Java Oct 21st, 2009
Replies: 6
Views: 361
Posted By ~s.o.s~
IMO, though the analysis is correct, the solution provided isn't because an Iterator over a collection of elements of type E isn't the same as an Iterator over a collection of elements of type F...
Forum: DaniWeb Community Feedback Oct 21st, 2009
Replies: 9
Views: 795
Posted By ~s.o.s~
Hmmm...insanely strange. If you are talking about the 'Flag Bad Post' link, see it in the attached screeny.
Forum: DaniWeb Community Feedback Oct 21st, 2009
Replies: 9
Views: 795
Posted By ~s.o.s~
Have you tried clearing your cache? Because I can see the 'Flag Bad post' link...
Forum: DaniWeb Community Feedback Oct 21st, 2009
Replies: 9
Views: 795
Posted By ~s.o.s~
I can see both the links. Try clearing the cache using a force refresh.
Forum: DaniWeb Community Feedback Oct 11th, 2009
Replies: 5
Solved: Duplicate posts
Views: 773
Posted By ~s.o.s~
> Can i remove that duplicated post ??

Just report that post using the "Flag Bad Post" option and it should get appropriately handled.
Forum: DaniWeb Community Feedback Oct 5th, 2009
Replies: 6
Views: 602
Posted By ~s.o.s~
Yes, as long as it's not a space, it would work. For a more standardized naming approach, trying replacing the underscore with a hyphen.
Forum: Java Oct 5th, 2009
Replies: 4
Solved: Business Apps
Views: 3,349
Posted By ~s.o.s~
There are many good books, blog posts and articles out there for getting started with JEE; your best bet would be the free JEE 5 tutorial (http://java.sun.com/javaee/5/docs/tutorial/doc/)hosted by...
Forum: Java Oct 2nd, 2009
Replies: 4
Solved: Business Apps
Views: 3,349
Posted By ~s.o.s~
> also, would this be something to do with JavaEE instead of JavaSE?

Depends on what you need to learn and where your expertise lies, but yeah, nowadays the core business functionality *is*...
Forum: Java Sep 24th, 2009
Replies: 2
Views: 400
Posted By ~s.o.s~
> But in second, I am getting exception that filenotfound.

Because the file "spring.xml" is not present at the root of the class path; you need to state the hierarchy or the path to your config...
Forum: JSP Sep 23rd, 2009
Replies: 2
Views: 1,018
Posted By ~s.o.s~
"Stops running" is a pretty vague description; have you looked at the server logs? BTW, reading this (http://techtracer.com/2007/09/12/setting-up-ssl-on-tomcat-in-3-easy-steps/)article might help...
Forum: Java Sep 21st, 2009
Replies: 10
Views: 1,114
Posted By ~s.o.s~
Your second file is missing the class imports. I don't see the declaration of your `Convert' enum class. Your naming conventions are still off.

These are pretty simple error messages to hunt down...
Forum: Java Sep 21st, 2009
Replies: 10
Views: 1,114
Posted By ~s.o.s~
A few observations:
- Always perform resource cleanup in the `finally' block to be rest assured that the cleanup indeed is performed even if the code ends up throwing an exception.
- The way you...
Forum: JavaScript / DHTML / AJAX Sep 20th, 2009
Replies: 8
Views: 493
Posted By ~s.o.s~
Thinking about it in this way might help your cause:

power(2, 3) =>

- 2 * power(2, 2)
- 2 * (2 * power(2, 1))
- 2 * (2 * (2 * power(2, 0)))
- 2 * (2 * (2 * 1))
- 2 * (2 * 2)
Forum: Java Sep 20th, 2009
Replies: 10
Views: 1,114
Posted By ~s.o.s~
>Thanks a lot guys for the help!

Good luck with the remaining exercises.

> I will flag this as solved when I get my account fixed.

Done and done. :-)
Forum: Java Sep 20th, 2009
Replies: 10
Views: 1,114
Posted By ~s.o.s~
Read the contract of the substring method; substring(4, 6) == 2 characters.

Also get in the habit of using uppercase characters for enums i.e. `BIN' instead of `bin'.
Forum: Java Sep 14th, 2009
Replies: 4
Views: 483
Posted By ~s.o.s~
> How do I do that....I'm very new to Java

Steps:

Declare a TreeSet<String> instance variable for your class
Read the file using Scanner
For each line read, create the PublisherRecord...
Forum: Java Sep 13th, 2009
Replies: 4
Views: 483
Posted By ~s.o.s~
> Using the TreeSet class, how do I accomplish this

It's pretty simple; just keep on reading the lines from the text file and add the last entry i.e. the publisher name to a TreeSet<String>. So...
Forum: Java Sep 13th, 2009
Replies: 2
Views: 635
Posted By ~s.o.s~
> I think I need multiple loops to get rid of the commas, dollar sign, and
> end bracket separately.

Not required IMO; a single application of the replaceAll method of the String class on each...
Forum: JSP Sep 13th, 2009
Replies: 2
Views: 990
Posted By ~s.o.s~
You essentially throw away almost all the records read by reading the database entries in the ResultSet loop by not doing anything. If you want to compare the user entered value with the ones present...
Forum: Java Aug 8th, 2009
Replies: 5
Views: 357
Posted By ~s.o.s~
>The Java platform supports a simple, deterministic scheduling
>algorithm called fixed-priority scheduling

Any official links? AFAIK, the JVM specification makes no such claim and leaves the...
Forum: Computer Science Aug 1st, 2009
Replies: 9
Views: 1,045
Posted By ~s.o.s~
>Would Ruby be a good choice?

Yes, given that it's not just another scripting language but a fun language which *has* an enterprise standing. Ruby seems to be living up to its name of a "fun...
Forum: Oracle Jul 29th, 2009
Replies: 23
Views: 2,427
Posted By ~s.o.s~
>it successfully got compiled but did run and gave the following
>errors!!!!

This is no longer a problem with your classpath setting which you were initially facing. Since it's an IOException,...
Forum: Oracle Jul 29th, 2009
Replies: 23
Views: 2,427
Posted By ~s.o.s~
So, you were expecting a MySQL Driver class in ojdbc14.jar? How about looking for that class in mysql-connector-java.jar file? ;-)
Forum: Oracle Jul 29th, 2009
Replies: 23
Views: 2,427
Posted By ~s.o.s~
>This is getting interesting.

I don't think so. :-)

Post the entire command you are using as it is.
Forum: Oracle Jul 28th, 2009
Replies: 23
Views: 2,427
Posted By ~s.o.s~
C:\Test>java -cp .;ojdbc14.jar OracleConnect
Forum: Oracle Jul 28th, 2009
Replies: 23
Views: 2,427
Posted By ~s.o.s~
>java OracleConnect(name of my file)

Read my previous reply; just typing the class name won't do; you have to set the classpath.
Showing results 1 to 40 of 885

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC