3,892 Posted Topics

Member Avatar for Agapelove68

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

Member Avatar for happygeek
0
227
Member Avatar for narlapavan

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

Member Avatar for ~s.o.s~
0
107
Member Avatar for seanbp

Post the minimalistic code here which reproduces your problem instead of attaching a zip file.

Member Avatar for seanbp
0
6K
Member Avatar for sid7

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 …

Member Avatar for sid7
0
2K
Member Avatar for xecure

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

Member Avatar for xecure
0
136
Member Avatar for amit.hak50

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

Member Avatar for ~s.o.s~
0
98
Member Avatar for Colin Mac

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 …

Member Avatar for Shankye
1
284
Member Avatar for nikita.chandra

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 …

Member Avatar for ~s.o.s~
0
93
Member Avatar for anand01

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 …

Member Avatar for ~s.o.s~
0
116
Member Avatar for Ron2794

Post the complete exception stack trace and if possible *formatted* source code.

Member Avatar for Ron2794
0
631
Member Avatar for Dani

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

Member Avatar for peter_budo
3
675
Member Avatar for ~s.o.s~

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

Member Avatar for Borzoi
0
726
Member Avatar for daviddoria

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 …

Member Avatar for jon.kiparsky
0
430
Member Avatar for nitins60

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

Member Avatar for ~s.o.s~
0
160
Member Avatar for LianaN

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 …

Member Avatar for LianaN
0
306
Member Avatar for Lxyslckr

`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[] …

Member Avatar for ~s.o.s~
0
145
Member Avatar for acer07
Re: Dani

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

Member Avatar for ~s.o.s~
-3
126
Member Avatar for JDCyrus

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

Member Avatar for JDCyrus
0
183
Member Avatar for NotThereAnymore

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 …

Member Avatar for aspire1
0
586
Member Avatar for YairHa

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.

Member Avatar for zenfaraad
0
568
Member Avatar for serkan sendur

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 …

Member Avatar for bertyhell
0
52K
Member Avatar for bleedi

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 …

Member Avatar for bleedi
0
1K
Member Avatar for BalagurunathanS

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 …

Member Avatar for @developer
0
1K
Member Avatar for serph09

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.

Member Avatar for ~s.o.s~
0
126
Member Avatar for oneml

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.

Member Avatar for ~s.o.s~
0
175
Member Avatar for daudiam

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

Member Avatar for daudiam
0
250
Member Avatar for mementomori

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 …

Member Avatar for ~s.o.s~
0
286
Member Avatar for SolidSora

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 …

Member Avatar for ~s.o.s~
0
123
Member Avatar for haxtor21

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 …

Member Avatar for ~s.o.s~
0
421
Member Avatar for hazeeel

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 …

Member Avatar for ~s.o.s~
0
88
Member Avatar for daudiam

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

Member Avatar for daudiam
0
634
Member Avatar for BDev338

Too little information to help you out. Have you got a small standalone code which reproduces your problem which I can run?

Member Avatar for BDev338
0
120
Member Avatar for LianaN

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

Member Avatar for LianaN
0
1K
Member Avatar for deviliq

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

Member Avatar for deviliq
0
500
Member Avatar for LianaN

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

Member Avatar for LianaN
0
124
Member Avatar for pooja_singh

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 …

Member Avatar for sai shiva j
0
1K
Member Avatar for khaled_jawaher

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 …

Member Avatar for ~s.o.s~
0
161
Member Avatar for AndreRet
Member Avatar for Ancient Dragon
Member Avatar for sureshksk

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.

Member Avatar for levine
0
321
Member Avatar for sciprog1

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 …

Member Avatar for sciprog1
0
145
Member Avatar for Agapelove68

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". :-)

Member Avatar for Agapelove68
1
368
Member Avatar for Mona..

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

Member Avatar for Mona..
0
155
Member Avatar for birdlover2010

Cross posted at [url]http://www.javaprogrammingforums.com/jdbc-databases/5896-cannot-locate-sun-jdbc-odbc-jbcodbc-driver.html[/url] and already solved.

Member Avatar for ~s.o.s~
0
274
Member Avatar for mole363

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 …

Member Avatar for Brillig
0
131
Member Avatar for jonsca

That's an Area 51 link which everyone might not be able to access given that this is the "Community Feedback" forum. :-)

Member Avatar for Dani
0
192
Member Avatar for AndreRet

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 …

Member Avatar for AndreRet
1
171
Member Avatar for ajay_tabbu

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 …

Member Avatar for masijade
0
206
Member Avatar for ak_2005
Member Avatar for Ancient Dragon
0
2K
Member Avatar for cwarn23

With all due seriousness, the [URL="http://www.timeanddate.com/worldclock/"]world time[/URL] at your disposal... ;)

Member Avatar for cwarn23
0
123

The End.