3,892 Posted Topics
Re: `this` refers to the current object in consideration. Static methods don't have an instance associated with them and hence `this` is not allowed in static methods. | |
Re: This doesn't seem to be a problem with JUnit code but more with the way data is retrieved and its size calculated. Are you sure the DataBank and DataBuilder classes are not holding some sort of global state? | |
Re: > oos.writeObject("" + new VarnaPacket(player)); This line means you are sending across a string object and not a VernaPacket object hence the cast on the receiving end fails. | |
Re: This is of course a path related issue unless you are getting an exception stack trace on your console, which might indicate some other problem. You need to provide us with the directory structure of the deployed application, the URL with which you access the registration page and the URL … | |
Re: Hovering over the graph gives you the number of posts posted for each month, but yes, the ability to display reputation received is still not present AFAIK. ![]() | |
Re: @shrekting Given that this is an international forum, please post in English since it's a violation of the rules to not do so. As per the "Keep it clean" rule: [quote]We strive to be a community geared towards the professional. We strongly encourage all posts to be in full-sentence English[/quote] | |
Re: Idempotent methods are also called pure methods; methods whose output purely depends on the passed in arguments and not any external state. Pure functions play a critical role in "pure functional languages". The [URL="http://en.wikipedia.org/wiki/Pure_function"]wikipedia entry[/URL] for pure functions describes them pretty well: [quote]The function always evaluates the same result value … | |
Re: Looking at the [URL="http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/lang/String.html"]Javadoc for the String class[/URL] and finding the required method would be a good exercise for you. | |
Re: The simplest way here would be to create a servlet ProfileServlet which handles the task of profile creation/viewing. Map this servlet to the path [icode]/profile/*[/icode]. A GET request to this path would invoke the doGet() method of this servlet which would read the username from the URL, fetch the details … | |
Re: Use Firefox when developing and look at the error console which shows all the Javascript errors on your page. Also, look at the source code generated for the above lines and see if there are any quote escaping issues which are pretty normal when spitting HTML using Servlets. It is … | |
Re: > ... or should I be using native2ascii in some way? AFAIK, native2ascii is normally used when dealing with properties file since the specification says that properties file can contain only ASCII characters as [URL="http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/util/Properties.html"]mentioned here[/URL]. IMO, instead of modifying the program text, you are better off setting the -encoding … | |
Re: Only form values are submitted when you press the submit button of the form. You need to place your form controls (text inputs, combo boxes, radio buttons) inside your form control for the values to be submitted to the server. | |
Re: Nick did a good job of coming up with the approximate formula used when deriving rep: [quote] This is how I figured it's sort of working; you get +1 power for: [LIST=1] [*]each year of membership [*]every ~1000 posts [*]every ~500 reppoints [*]negative rep power is half your +power with … | |
Re: Daniweb has an IRC channel. [URL="http://www.daniweb.com/forums/thread256409.html"]Read me[/URL]. | |
Re: Just flag the same post again requesting it to be ignored, should do the job IMO. Also, the flag bad post isn't in any way related to the age of the thread/post. If a member finds something inappropriate with a year old thread (spam/other violation), reporting it makes sense though … | |
Re: Maybe her point was that it's a long standing vBulletin bug which hasn't been fixed till now... | |
Re: You don't need to run Apache Web Server to test your servlet applications. Tomcat is a webserver as well as a servlet container and by default listens to HTTP requests on port 8080. The problem in your case is that you haven't placed your web application name in the URL. … | |
Re: 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 … | |
Re: > Can anyone tell me how to use new Instance and what mistakes i > have made in this program.? [icode]newInstance[/icode] is actually a method of the Class and Constructor classes. You need to grab the class instance to invoke this method. [code] package com.you; public class Test { public … | |
Re: Though the concept of `finalize` sounds pretty slick, they are rarely used and for a [URL="http://stackoverflow.com/questions/158174/why-would-you-ever-implement-finalize"]good reason[/URL]. A better way would be to carefully manage your connection/statement/resultset resource cleanup or [URL="http://commons.apache.org/dbutils/"]use a library[/URL] which already does that for you. | |
Re: Have you tried to understand the client examples posted on the [URL="http://ws.apache.org/xmlrpc/client.html"]official XML-RPC site[/URL]? IMO, something like [icode]client.execute("System.listMethods", new ArrayList())[/icode] or [icode]client.execute("system.listMethods", new ArrayList())[/icode] should do the trick. | |
Re: It seemed like a fun event though it was unfortunate that not many could show up due to personal/geographical reasons. BTW, Dani, you sure have changed a lot. :-) [quote]Ok. So I recognize - Davey - Dani - WASDted - Tekmaven[/quote] Ditto here. After trying to read the name tags … | |
Re: Don't use JSP's for placing your business logic; use Servlets instead for your redirection purposes. Also, for performance reasons, before going in production make sure you replace the logic of grabbing connection directly from the DriverManager class with getting connection from a connection pool. Coming to your code, you need … | |
Re: This is purely a client side issue and can be done in Javascript; read [URL="http://www.tizag.com/javascriptT/javascriptredirect.php"]this[/URL]. If you want to do it at the server side without any delay, look into the method [icode]HttpResponse#sendRedirect[/icode]. | |
Re: That and much more in the [URL="http://download.oracle.com/docs/cd/E17477_01/javaee/5/tutorial/doc/"]Java EE 5 tutorial[/URL]. | |
Re: Most likely the Ajax result is being cached; append a random tidbit to your URL, preferably something like timestamp to have a distinct URL for each request to prevent this caching. If you are using an URL like [icode]/YourApp/Upper[/icode] append it with [icode]/YourApp/Upper?t=timestamp[/icode]. | |
Re: Don't provide the print option on the coupon page. Instead create a 'print view' button at the bottom which will take the user to a page without any frills with just the coupon. I don't know what kind of technique or server side language you are using to persist the … | |
Re: There can be an indefinite amount of time between the sending of request by 'n' number of users, not to mention you need to remember who has sent a reply. There is anyways only a single servlet instance; for each user request a new thread is allocated from the container … | |
| |
Re: It means you would have to personally call up the companies interested in taking students in for out house projects. Talk with your friends from other / same college and try to get as much information as possible. That would be the best way of getting an out house project. | |
Re: Have you got the graphics.h and the BGI file in the same location as that of your program ...? And btw post all the error messages, so that it would be easier to spot the problem. | |
![]() | Re: > So you mean to say I'm lying ? *facepalm*; sarcasm detection.....failed. :-) > Its surely not anything to do with latest FF release A couple a things we'd like to confirm: - Have you tried flushing the browser cache? - Does this happen only with *nix + FF or … ![]() |
Re: > We are planning to make a commercial GUI based software (for both desktop and > mobile) targeting individual users IMO, Adobe AIR has the slickest desktop UI out there but suffers from the lack of mature libraries for almost anything when compared to Java/.NET. Personally, I find Swing applications … | |
Re: doGet method maps to the code executed when your servlet receives a "GET" HTTP request. doPost method maps to the code executed when your servlet receives a "POST" HTTP request. These methods are internally called by the `execute` method of your servlet (a lifecycle method) based on the HTTP method … | |
Re: I personally feel that the design is a bit weird: - A class called MyArray which has member variables as arrays of all types - Constructor accepting an array of type T (a specific type) along with accepting a `type` parameter? Regarding the code; [icode]byteData = input[/icode] won't work because … | |
Re: Or a better way would be to encapsulate all the functions which need to be executed inside a single function and call that function instead. [icode]<body onload="doAll();">...</body>[/icode] > It seems that one disables the other and only one is working when previewed together. We would have no way of knowing … | |
Re: AFAICT, the container has no way of knowing that it has to switch to HTTPS given that the forwarding happens within the code executing on the server. A resource is just a resource and by itself, it has no way of knowing whether it has to be served over a … | |
Re: > But why will it decide to call the finalize() of D and C before A ? AFAICT, [URL="http://java.sun.com/docs/books/jls/second_edition/html/execution.doc.html#44837"]as per the specification[/URL], the Java programming language makes no guarantee regarding the order in which finalize method is called on the "finalize eligible" objects. | |
Re: From what I've heard, calling native code using JNI is a real PITA. Look into alternatives like [URL="https://jna.dev.java.net/"]JNA [/URL]and [URL="http://www.swig.org/"]Swig [/URL]for easing this integration task. | |
Re: > Does this mean that i need to do this for every servlet? Which is not efficient. Yes, it's not efficient. The best approach when dealing with database resources would be using the connection pooling capabilities offered by your container. In case of application servers like Glassfish, Jboss etc. look … | |
Re: > So is it necessary to successful software engineering or just option? Absolutely necessary if you are working with a dynamically typed language like Python, Ruby etc. where values have types, variables don't. In the absence of unit tests, aggressive re-factoring becomes risky due to the lack of compile time … | |
Re: PHP is open source. You can browse through its source code and see the way it is implemented. | |
Re: Have you tried this on some other *nix distribution like Fedora, Gentoo etc? If they manifest the same problem, it can be confirmed that this isn't a Ubuntu specific problem and more so a problem with the Java implementation for *nix. If the same issue doesn't show up, then you … | |
Re: Look at the source code of the existing collection classes in Java to see how you can implement your own generic collection type. Also, read my reply [URL="http://www.daniweb.com/forums/post1144098.html#post1144098"]here[/URL]. | |
Re: Decide a preference for your NULL checks; should the NULL check for `login` be performed before the NULL check for `cash` or vice versa. Use ELSE IF instead of just IF for the second conditional check. When you forward, you are effectively saying that the forwarded page now has the … | |
Re: Stop using floating point variables as your for loop counter and you should be good to go. | |
Re: Which version of Derby DB are you using? I can make those statements work perfectly fine with Derby 10.5. BTW, is the name of your table actually "table"? | |
Re: So, which line exactly has the NPE? Also, have you taken a look at the generated servlet for this JSP? |
The End.