3,892 Posted Topics
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: > 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 … | |
Re: 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 … | |
Re: > 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 … | |
Re: What's the type of array `outputArray`? If it's a Question array, each reference would be of type Question which kinda explains everything. | |
Re: 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]. ![]() | |
Re: 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. | |
Re: > 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: [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... :-) ![]() | |
Re: Maybe [URL="http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro12.html"]this[/URL] would help. | |
Re: 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 … | |
Re: [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" … | |
Re: 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. | |
Re: 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 … | |
Re: [url]http://javaswamy.blogspot.com/2007/08/binding-jboss-to-specific-ip.html[/url] | |
Re: [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 … | |
Re: Pleasing changes, i agree but not necessary. | |
Re: > 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 … ![]() | |
Re: Yes, post the user name you desire along with an alternate one in case the former is already taken. | |
Re: [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. … | |
Re: 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 … | |
Re: > 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 … | |
Re: > 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 … | |
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) … | |
Re: > 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 … | |
Re: Yes Matlab has such a function. Look here: [URL]http://www.math.duke.edu/education/ccp/materials/mvcalc/mlabtutor/mlabtut8.html[/URL] | |
Re: Narue would never start a thread in the Community Introductions. ;-) | |
Re: > 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: … | |
Re: > 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... | |
Re: 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. | |
Re: [URL="http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html"]Varargs[/URL] | |
Re: 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 … | |
Re: The question is about [I]rounding off the returned value[/I] and not rounding off while displaying. Read the first post. | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: 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. | |
Re: 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 = … | |
Re: 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... :) | |
Re: "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 … | |
Re: 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 … | |
Re: [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] | |
Re: > 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. | |
Re: 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. |
The End.