3,892 Posted Topics
Re: [quote]Reason: not getting desired result. sorry I really tried.:) [/quote] You can always "view" what you have written by pressing the preview button. Given that you are learning, it would be worth it to *never* type out your responses in the "quick reply" editor (the small text area which you … | |
Re: [quote]tell me if there are any other commands other than rcp and scp . [/quote] You can try `rsync`. Assuming you want to transfer files from server 1 to server 2:[code] rsync -avz user1@server1:/src/path/ user2@server2:/dest/path[/code] You can ignore the user@host syntax for a particular server if you are already logged … | |
Re: Post the minimalistic code here which reproduces your problem instead of attaching a zip file. | |
Re: They are different yet there is no v/s IMO, there are a few tricks to persisting enums to databases out there, namely writing out the enum name and reading it back by passing the same name to valueOf() method for that enum. The most obvious difference is that enums are … | |
Re: [quote]bump..[/quote] Bumps, and that too soon after posting your thread is rude. It's weekend in almost all parts of the world with Christmas just round the corner. You sure your homework/question is more important than people's personal life? Have some patience. Anyways, back on topic, regarding your code, a few … | |
Re: Thoroughly read the [URL="http://download.oracle.com/javase/6/docs/api/java/lang/Thread.html"]Javadocs of the Thread class[/URL]; do you still think your answers are correct? If yes, give reasons rather than just saying "I think A,C,D are correct". | |
Re: Better than using [inlinecode]scanf[/inlinecode] which is a pretty complicated function which leaves the input stream dirty try out the alternative functions [inlinecode]fgets[/inlinecode] along with [inlinecode]atoi[/inlinecode] to take the input from user. For the function prototypes look here: [URL="http://www.cplusplus.com/"]http://www.cplusplus.com[/URL] And why are you using the age old Turbo Compiler? If you … | |
Re: There are some ready to use free chat widgets out there which you can use for your site; have a look at: [url]http://www.readwriteweb.com/archives/10_chat_widgets.php[/url] If you are specifically looking for code which you can deploy on your servers, take a look at [URL="http://alexmaccaw.co.uk/posts/2010/10/24/holla.html"]Holla[/URL]. Disclaimer: I haven't used any of those so … | |
Re: I don't think saving files in a deployment directory would be a good idea. Two solutions come to mind: [LIST] [*]Use a persistent storage solution like a database (e.g. SQLite) or some other NoSQL solution like Cassandra [*]If you want to go for a simpler file system based solution, read … | |
Re: Post the complete exception stack trace and if possible *formatted* source code. | |
Re: [quote] Because with only one or two posts new members are so far down the list that they might be ranked #90,000 or something. They will be only interested in obtaining an answer to their posted question, not in any of the stats that appear in the user profile. And … | |
Thats it.. Are you married or not ? If not then what are your views on marriage, how do you people see marriage as ? If yes then what did marriage change in your life, are the new found responsibilities burdening you or making you a better person ? Regards, … | |
Re: This topic has been debated a lot in the past and the conclusion is that there is always a possibility of false positives i.e. a positive conclusion that user has posted code but not used code tags when that isn't really the case. This is a risk Dani isn't ready … | |
Re: @Nitin: What happens if you need to perform this 'discounting' check multiple times? What if the requirement changes to allows for only fixed set of 'memberIds' to avail the discount? IMO, you should ask this question from to the entity in consideration rather than querying/deducting it yourself. One solution would … | |
Re: This probably seems to be more of a MySQL problem rather than a Java one; you might also want to try posting this to the official MySQL forum or Daniweb's MySQL forum. Some interesting threads which I stumbled upon which make it seem as if this is a problem with … | |
Re: `n` is an integer (primitive type) and doesn't have a `length` property/attribute. You just need to check whether the passed in number (probably the number of animals in a Zoo) is a valid number; if not, use 1 as the default. [code] class Animal {} class Zoo { private Animal[] … | |
Re: [quote]I think it is strange that someone would try to turn a compliment into something negative or am I just being baited.[/quote]This is "teh Internet"; where reason fails, where a wolf doesn't require a sheep's clothing and 10 year olds claim to have a house in Hollywood city (OK, maybe … | |
Re: [quote]Unfortunately, we do not live in a perfect world, and this doesn't work because of type erasure.[/quote] Why doesn't it work? Instantiating a type parameter won't work, but instantiating parameterized classes which accept a type argument will. The below snippet won't work, but what you posted will. [code] // doesn't … | |
Re: The problem is with the statement [icode]reverse(s.substring(1) + s.charAt(0));[/icode]. This effectively ends up passing the same string to the 'reverse()' function because of which it never breaks out. A proper way of doing it would be [icode]return(reverse(s.substring(1)) + s.charAt(0));[/icode]. But as such this solution seems memory intensive since strings in … | |
Re: FTP supports a mget command which can be used for retrieving multiple files based on the passed in file name/pattern. Look into your FTP client documentation for such support. | |
Re: The [ICODE]deleteRow(index)[/ICODE] approach used here is much better than the ad hoc [ICODE]removeChild()[/ICODE] approach IMO. Here is my stab at it (untested) [code] <!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>Example</title> <script type="text/javascript"> function … | |
Re: AFAIK, there is no standard way of sending encrypted passwords to the database. Why does passing data between validation code to the db connection code seem icky; after all, it's just in-memory transient plain text data that you are passing between classes and not something you are writing out to … | |
Re: The annoyance with the 'Back' button, I fear is not universal. There are cases (read Intranet applications) where the client has requirements for the web application to look like a desktop application, making the removal of toolbars necessary. [URL="http://www.daniweb.com/forums/member160921.html"]BalagurunathanS[/URL], the only way to disable the back button is to remove … | |
Re: Don't create multiple Scanner objects for the same underlying stream. As far as the "VM just stays there" is concerned, `nameScanner.nextLine()' is a blocking call which waits for a line to be entered via the stdin. | |
Re: What exactly is the problem that you are facing? Are you facing compile time or runtime errors? If compile time, what are the errors you are getting? If runtime, what's the expected output, what are you getting instead? Provide more details. | |
Re: > 1. Line endings are still hacked as there is no readLine. Raw input streams shouldn't be used for reading character data anyways so this is a moot point. Byte based streams don't have a notion of "line" hence no "readLine()" method. You make the mistake of assuming streams would … | |
Re: The error is exactly what is says: the system can't find the file "C:\Program%20Files%20(x86)\glassfish-3.0.1\glassfish\modules\gf-client.jar" because of spaces being interpolated to %20 (this might happen when the file path is treated as a URI). This seems to be a bug in Glassfish as said mentioned here: [url]https://glassfish.dev.java.net/issues/show_bug.cgi?id=12769[/url] and has been fixed … | |
Re: Don't compare Strings using the [icode]==[/icode] operator; when used with primitives it compares values whereas when used with reference types it compares references. If you need a logical comparison (comparing values), use the `equals()' method for objects (which falls back to reference comparison if the object in consideration doesn't override … | |
Re: The warning comes up when a class whose objects are capable of being serialized is missing an explicit version ID (very much similar to giving version numbers to your software releases). This must be because either JFrame or the superclass/super-interfaces of JFrame implement the Serializable interface. You can do away … | |
Re: Depends on the kind of updates you are making; are they for the entire file or only parts of the file? If for the entire file, read the file line by line and write out the modified line to a new file. If the updates are targeted updates and only … | |
Re: Yes which seems pretty logical given the context in which mark() and reset() methods are used i.e. the "going back" to a mark would be only supported if the underlying stream supports either random FP seeks(RandomAccessFile) or a buffered nature (BufferedInputStream). | |
Re: Too little information to help you out. Have you got a small standalone code which reproduces your problem which I can run? | |
Re: [quote]But how could I delete the file exactly after closing Notepad (or any other lookup program)? [/quote] In that case, you need to ditch the Desktop class and look into the Process/ProcessBuilder classes and the `waitFor()' method. Some sample code: [code]public class ProcessTest { public static void main(final String[] args) … | |
Re: [quote]i thought it would work ok too if i use in.next() inside the parseInt()[/quote] [icode]next()[/icode] leaves the newline character in the stream which is consumed by the [icode]nextLine()[/icode] call. Use [icode]nextLine()[/icode] call throughout your code and you should be good to go. | |
Re: Show us the entire IOException stacktrace instead of just the error message. Also, if it works locally, it seems more of a networking issue. Are you able to "ping" to that host? Are you able to "telnet" to that host on the given port(21)? | |
Re: I think due to faulty design you are facing the problem of different seat allocation. YOur class "air" is an abstraction of the airline company but there is no facility for accomodating multiple flights and hence you have to create different instances of "air" for different flights. Create a new … | |
Re: The format acceptable by the Naming.lookup method is mentioned in the [URL="http://download.oracle.com/javase/1.4.2/docs/api/java/rmi/Naming.html"]javadocs of the Naming class[/URL]. For more information on binding a service to a given name and looking it up when writing the client, refer: [URL="http://download.oracle.com/javase/tutorial/rmi/server.html"]rmi server tutorial[/URL], [URL="http://download.oracle.com/javase/tutorial/rmi/client.html"]rmi client tutorial[/URL] Follow the instructions mentioned and re-post again if … | |
Re: ...says the person who ranks 4th. Hah. [j/k ;-)] | |
Re: The exception probably says that a database operation was attempted on a closed connection. Are you using some sort of connection pool? Also, try removing the listeners which initialize quartz and then check if you can issue a simple query to your database in your servlet. | |
Re: Why does the client only read a single image whereas the server writes out 5 images? Why doesn't the server run in a headless mode i.e. why doesn't it accept the image number from the client or via a configuration rather than popping up a box? The error probably means … | |
Re: Tip: Try breaking your posts into logical paragraphs and adding additional line breaks for better readability. The way it is written as of now, it seems like a big "wall of text". :-) | |
Re: [quote]Um..... if this is a Java question you may want to post it in the Java (not C++) forums. [/quote] Please use the "Flag Bad Post" button to help us tackle such things. Making a post saying "it's not the correct forum" might lead to double posting by the OP. | |
Re: Cross posted at [url]http://www.javaprogrammingforums.com/jdbc-databases/5896-cannot-locate-sun-jdbc-odbc-jbcodbc-driver.html[/url] and already solved. | |
Re: Are you directly serving pages via Tomcat or using some sort of webserver as front end (e.g. Apache web server, Nginx etc.)? If you are using Apache, use something along the lines of mod_rewrite for Apache. I've never personally used it but heard that it can do wonders when it … | |
Re: That's an Area 51 link which everyone might not be able to access given that this is the "Community Feedback" forum. :-) | |
Re: The "Top Members by Rank" link next to the member count in the left hand corner at the top of the page works for me, though it doesn't give you the same "relative" personalized view as the one given by your profile page. But then again, since I'm on the … | |
Re: Implement the way employee records are handled in an organization. The organization consists of Managers, Clerks and Salesmen. Managers receive bonus, clerks get paid for overtime and salesmen get commission depending on their sales. Also write a method which will calculate the net salary of any type of employee. For … | |
![]() | Re: Which OS are you on and how were you trying to execute the program? |
Re: With all due seriousness, the [URL="http://www.timeanddate.com/worldclock/"]world time[/URL] at your disposal... ;) |
The End.