3,892 Posted Topics

Member Avatar for darling332001

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

Member Avatar for tong1
0
268
Member Avatar for jiraiya

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?

Member Avatar for Taywin
0
100
Member Avatar for WargRider

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

Member Avatar for WargRider
0
348
Member Avatar for torkolort

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 …

Member Avatar for ~s.o.s~
0
358
Member Avatar for ddanbe

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.

Member Avatar for diafol
0
66
Member Avatar for divya bangroo

@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]

Member Avatar for steph47
0
111
Member Avatar for java_programmer

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 …

Member Avatar for java_programmer
0
329
Member Avatar for makan007

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.

Member Avatar for java_programmer
0
138
Member Avatar for yuvi2288

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 …

Member Avatar for ~s.o.s~
0
76
Member Avatar for yuvi2288
Re: How

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 …

Member Avatar for ~s.o.s~
0
76
Member Avatar for akshayparopkari
Member Avatar for maceman
0
233
Member Avatar for jiraiya

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

Member Avatar for jiraiya
0
126
Member Avatar for curdiMan

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.

Member Avatar for curdiMan
0
143
Member Avatar for Lusiphur

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 …

Member Avatar for Lusiphur
0
250
Member Avatar for Dani

Daniweb has an IRC channel. [URL="http://www.daniweb.com/forums/thread256409.html"]Read me[/URL].

Member Avatar for daviddoria
0
483
Member Avatar for Lusiphur

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 …

Member Avatar for Lusiphur
0
158
Member Avatar for TrustyTony
Member Avatar for TrustyTony
0
192
Member Avatar for hims4u

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

Member Avatar for ~s.o.s~
0
242
Member Avatar for adams161

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 …

Member Avatar for askkuber
0
159
Member Avatar for prem2

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

Member Avatar for prem2
0
101
Member Avatar for Stefano Mtangoo
Re: JDBC

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.

Member Avatar for Stefano Mtangoo
0
490
Member Avatar for leiger

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.

Member Avatar for leiger
0
2K
Member Avatar for happygeek

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 …

Member Avatar for WolfPack
0
641
Member Avatar for Viruthagiri

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 …

Member Avatar for Viruthagiri
0
110
Member Avatar for nikhilgotan

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

Member Avatar for nikhilgotan
0
244
Member Avatar for alsoumahi

That and much more in the [URL="http://download.oracle.com/docs/cd/E17477_01/javaee/5/tutorial/doc/"]Java EE 5 tutorial[/URL].

Member Avatar for ~s.o.s~
0
41
Member Avatar for AbhikGhosh

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

Member Avatar for AbhikGhosh
0
369
Member Avatar for amjones

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 …

Member Avatar for fxm
0
251
Member Avatar for Rick The Mad

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 …

Member Avatar for ~s.o.s~
0
89
Member Avatar for iamar
Member Avatar for vikramchopda

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.

Member Avatar for neha mhatre
-1
263
Member Avatar for amishosh

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.

Member Avatar for leduduong
0
430
Member Avatar for nileshgr

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

Member Avatar for nileshgr
0
258
Member Avatar for mihir.p

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

Member Avatar for ~s.o.s~
0
171
Member Avatar for prem2

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 …

Member Avatar for prem2
0
100
Member Avatar for OffbeatPatriot

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 …

Member Avatar for OffbeatPatriot
0
93
Member Avatar for balaji153
Member Avatar for mexabet

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 …

Member Avatar for fxm
0
138
Member Avatar for karanits

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 …

Member Avatar for karanits
0
138
Member Avatar for daudiam

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

Member Avatar for daudiam
0
297
Member Avatar for shoikatroy

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.

Member Avatar for ~s.o.s~
0
82
Member Avatar for vishantpoeran

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

Member Avatar for ~s.o.s~
0
293
Member Avatar for Stefano Mtangoo

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

Member Avatar for ~s.o.s~
0
90
Member Avatar for MaestroS

PHP is open source. You can browse through its source code and see the way it is implemented.

Member Avatar for Stefano Mtangoo
0
887
Member Avatar for leiger

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 …

Member Avatar for leiger
0
179
Member Avatar for blue6dImension

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

Member Avatar for bbman
0
182
Member Avatar for EverydaySunday

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 …

Member Avatar for Stefano Mtangoo
0
1K
Member Avatar for mjoshi

Stop using floating point variables as your for loop counter and you should be good to go.

Member Avatar for arld101
0
136
Member Avatar for ceyesuma

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"?

Member Avatar for ceyesuma
0
718
Member Avatar for Viruthagiri

So, which line exactly has the NPE? Also, have you taken a look at the generated servlet for this JSP?

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

The End.