3,892 Posted Topics

Member Avatar for black_berry

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 …

Member Avatar for ~s.o.s~
0
111
Member Avatar for arjunsasidharan
Member Avatar for WaltP

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 …

Member Avatar for WaltP
0
227
Member Avatar for ceyesuma

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 …

Member Avatar for ceyesuma
0
120
Member Avatar for pore

> why can I not use 2 different variables and display the interger values > of each array? [icode]System.out.println(Arrays.toString(myIntArray));[/icode]. > 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 …

Member Avatar for pore
0
117
Member Avatar for vitroblue

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. [URL="http://stackoverflow.com/questions/2104217/why-two-date-classes-one-in-java-util-date-and-java-sql-date"]Read this[/URL]. 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 …

Member Avatar for javaAddict
0
89
Member Avatar for pankajagar2002

> 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 …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for m1dnight

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

Member Avatar for JamesCherrill
0
96
Member Avatar for bwall256

Yes, there is a certain limit imposed by the system when it comes to adding/editing tags. Read all about it [URL="http://www.daniweb.com/forums/thread227065-2.html"]here[/URL].

Member Avatar for diafol
1
160
Member Avatar for albert1901

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.

Member Avatar for ~s.o.s~
0
83
Member Avatar for lllllIllIlllI

> Do we need a new thread every time someone achieves x or y > amount of post No, we don't, really. But you chose to post a "yawn" instead of looking at the thread, shaking your head and moving on. There are some things you mustn't do and one …

Member Avatar for bumsfeld
10
248
Member Avatar for ceyesuma

It kind of seems clunky and complicated at best. A couple of questions: [LIST] [*]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 …

Member Avatar for ceyesuma
1
155
Member Avatar for ceyesuma

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.

Member Avatar for ceyesuma
0
116
Member Avatar for msr

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 …

Member Avatar for ~s.o.s~
0
95
Member Avatar for Graphix

[quote]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?[/quote] More work for mods? Oh noes... :-)

Member Avatar for diafol
0
174
Member Avatar for nschessnerd

Maybe [URL="http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro12.html"]this[/URL] would help.

Member Avatar for peter_budo
0
126
Member Avatar for ceyesuma

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 …

Member Avatar for ceyesuma
0
2K
Member Avatar for tyson.crouch

[quote]Is there another possible method as i am not very confident with using JScript?? [/quote] Keep the same name for both the buttons and let them have different values. [code]<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" …

Member Avatar for ~s.o.s~
0
218
Member Avatar for veroniclake

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.

Member Avatar for ~s.o.s~
0
73
Member Avatar for besart

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 …

Member Avatar for Jasmine_Pearl
0
171
Member Avatar for Pradeep Nayak

[url]http://javaswamy.blogspot.com/2007/08/binding-jboss-to-specific-ip.html[/url]

Member Avatar for ~s.o.s~
0
40
Member Avatar for teg1989

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

Member Avatar for ~s.o.s~
0
2K
Member Avatar for Rashakil Fol
Member Avatar for zandiago

> 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 …

Member Avatar for diafol
2
382
Member Avatar for PatrixCR

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

Member Avatar for happygeek
0
267
Member Avatar for CurtisBridges

[quote=CurtisBridges;292157][COLOR=#008000]//I need to change this program from using inheritance to using composition.[/COLOR] [COLOR=#008000]//Could someone please show me how? I have two other programs that I can surely do myself. [/COLOR] [COLOR=#008000]//I'm really in search of a sample.[/COLOR][/quote] I don't see any inheritance in your program, just a single point class. …

Member Avatar for wayne_b
0
155
Member Avatar for cwarn23

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 …

Member Avatar for WaltP
0
355
Member Avatar for systemsbiology

> I need to integrate the python script with a java application to put > all the tools in a single pipeline to function as a continuous workflow There are a few things I can think of: - If only one component of the workflow executes at a given time …

Member Avatar for ~s.o.s~
0
981
Member Avatar for emteez

> 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 …

Member Avatar for ~s.o.s~
0
66
Member Avatar for ~s.o.s~

A new anime season is just round the corner; preview [URL="http://projectgenesis.kokidokom.net/wp-content/uploads/2010/01/0013cd4h.jpg"]here[/URL]. My favorites would be: [LIST] [*]Angel Beats (My type -- romance, action, harem) [*]Arakawa Under the Bridge (crazy work by Shaft) [*]Mayoi Neko Overrun (Neko-chan!) [*]Working! (Interesting Slice of life) [*]Ichiban Ushiro No Dai Maou (reminds me of ZNT) …

Member Avatar for ~s.o.s~
0
246
Member Avatar for David22

> 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 …

Member Avatar for ~s.o.s~
0
118
Member Avatar for pumba

Yes Matlab has such a function. Look here: [URL]http://www.math.duke.edu/education/ccp/materials/mvcalc/mlabtutor/mlabtut8.html[/URL]

Member Avatar for Nick Evan
0
114
Member Avatar for jephthah
Member Avatar for jephthah
3
681
Member Avatar for claudiu_is

> 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: …

Member Avatar for masijade
0
1K
Member Avatar for cwarn23

> 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...

Member Avatar for jephthah
0
168
Member Avatar for Privoxy

That piece of code won't compile given that the println method of PrintStream returns void. Look into [URL="http://kickjava.com/218.htm"]some[/URL] [URL="http://www.rgagnon.com/javadetails/java-0101.html"]examples [/URL]which use the Calendar API for adding/subtracting dates/months/years.

Member Avatar for ~s.o.s~
0
110
Member Avatar for solomon_13000

[URL="http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html"]Varargs[/URL]

Member Avatar for AndreiDMS
0
77
Member Avatar for gt.ang

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 …

Member Avatar for ~s.o.s~
0
105
Member Avatar for vbcielle

The question is about [I]rounding off the returned value[/I] and not rounding off while displaying. Read the first post.

Member Avatar for WaltP
0
210
Member Avatar for apegram

I've always worked on critical financial systems used by banks and top-notch financial organizations which deal with millions/billions so the "user satisfaction" is never an issue. I'm personally in favour of self-satisfaction, the learning gained and the moolah over user-satisfaction; I'd rather have the employer worry about the latter. And …

Member Avatar for geekgoddess
1
242
Member Avatar for Salem

IMO giving a thread title like "[URL="http://www.daniweb.com/forums/thread267557.html"]Hijack Attempt #2 -- Do this for me. I can't be bothered[/URL]" doesn't solve anything. At best, it seems like an attempt to make others laugh by mocking at the OP, certainly not expected of a group of people who are responsible for looking …

Member Avatar for ~s.o.s~
2
339
Member Avatar for xhollowpointx

[code]String[] myarray; string myarray = new String[20];[/code] `string` is the unknown type here; I think you'd want something like: [code]String[] myarray = new String[20];[/code] Also, you are missing a closing brace for the `if` statement and an extra brace after the `else` statement. Indenting your code might help you out …

Member Avatar for stultuske
0
282
Member Avatar for vAshunk

When it comes to reference types, [icode]==[/icode] compares references and not the actual objects. If you want a logical comparison (equal check), use the equals method of the String class. Read Javadocs for more details.

Member Avatar for ~s.o.s~
0
143
Member Avatar for FireNet

An oversimplified example would be: [code] Parent.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv"Script-Content-Type" content="text/javascript"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Expires" content="0"> <!-- disable caching --> <title>Parent</title> <script type="text/javascript"> targetElement = null; function makeSelection(frm, id) { if(!frm || !id) return; targetElement = frm.elements[id]; var handle = …

Member Avatar for kareem.ramos
0
2K
Member Avatar for PhiberOptik

When you define an array, the array elements are given their default values which depends on the type of elements the array holds. For booleans it is false, for integers it is 0, for reference types it is... :)

Member Avatar for ~s.o.s~
0
101
Member Avatar for maverick_ymca

"Almost refuses to start up" is not so good a description. Have you analyzed your logs? Any stack traces/warnings? Are you deploying your application from eclipse or by firing off the shell script? [ICODE]<listener>[/ICODE] is a standard tag and so ideally shouldn't any problems. Is the JAR with the class …

Member Avatar for ~s.o.s~
0
99
Member Avatar for houlahan

jDom and Dom4j are pretty generic libraries aimed at easing the interaction with DOM. There is a class of libraries called O/X Mappers aimed specifically at object to xml conversion and vice-versa. Look into libraries like Jaxb, XStream, XMLBeans, JiBX for more details. Of the ones mentioned, JAXB is a …

Member Avatar for ~s.o.s~
0
77
Member Avatar for winbach

[code=javascript] <script> function changeStyle(id, newClass) { document.getElementById(id).style.className = newClass; } </script> .... <td id="oneTd" class="style1" onclick="changeStyle(this.id, 'style2');" > Hello </td> // Or simply in one line <td id="oneTd" class="style1" onmouseover="this.style.className='style2';"> Hello </td> [/code]

Member Avatar for Bubbleboy
0
405
Member Avatar for Geekitygeek

> btw, how do we view a list of past 'members of the month You can view the newsletter archive [URL="http://www.daniweb.com/newsletter/"]here[/URL] which also has the member of the month interviews.

Member Avatar for Geekitygeek
0
185
Member Avatar for llemes4011

You seem to be confused as to the way generics work in Java. Here E is a type-parameter which is used during compile time checks; there is no `E' when it comes to your generated .class files. Search for "type erasure" in java generics for clarification.

Member Avatar for ~s.o.s~
0
354

The End.