3,892 Posted Topics
Re: Maybe posting the *exact* code which is causing problems in your case would help in faster resolution of the issue at hand. And please use CODE tags when posting code to increase your chances of getting a reply since reading unindented code is a pain in the neck. Read the … | |
Re: Because [URL="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-85676760"]selectedIndex [/URL]can't be a alphabet; it has to be numeric; more specifically long. It would be better if you just passed in `this' and got the value selected using:[code] function showSomething(elem) { var val = elem.options[elem.selectedIndex].value; // process the value } // in your markup <select id="choice" onchange="showReg(this);" size="4"> … | |
Re: I guess this is meant for people who are facing problems uploading attachments but yeah, even I am confused. | |
Re: Is it really necessary to use a RandomAccessFile? Using a [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/io/FileWriter.html#FileWriter(java.lang.String,%20boolean)"]FileWriter [/URL]in append mode should do the trick. | |
Re: > whenever you access a method, it gives you a summary of what the > method does, as given in the API ...so do the online java docs. But in most of the cases we end up with a bunch of CTRL + SPACE programmers who find it too troublesome … | |
Re: The given JSON can be simplified as:[code] var json = [ {"zip" : "27603", "city" : "Raleigh", "state" : "NC"}, {"zip" : "25071", "city" : "Elkview", "state" : "WV"} ]; for(var i = json.length - 1; i >= 0; --i) { var o = json[i]; var zip = o.zip; var … | |
Re: @[URL="http://www.daniweb.com/techtalkforums/member.php?u=113517"]dc87[/URL] Please post what you have written so far ( your C code ) so we can help you out with the problems you are facing. Please dont expect a readymade answer. | |
Re: The warnings are because the specification uses all lowercase convention when specifying intrinsic event handlers; i.e. onchange in favor of onChange. Since this is some library specific issue, your best bet is to run this application in Firefox and use the Firefox Error console or the addon Firebug to trace … | |
Re: If your project was set up in Eclipse, the "[URL="http://www.java-tips.org/other-api-tips/eclipse/how-to-restore-deleted-files-in-eclipse.html"]Restore from Local History[/URL]" option might work out for you; it's worth a try. | |
Re: There is no such thing as AJAX variable. In case if you want to persist a Javascript variables' value to a persistent store by making an async request to the server, you can just append the value in consideration to the query string like:[code] http://your.server/?value=yourValue[/code] which would be read at … | |
Re: It's OK to reply in this thread; it's not as if you are replying only to promote that provider, it would be more like an answer to the question asked. | |
Re: > But this certainly requires an API defined at their end Not certainly, screen scraping is always an option and which I guess is what the OP is looking for in this case given that it's a school project. > it is difficult to find the information I need in … | |
Re: Indeed; the entire point of the exercise was to make use of basic math tricks to come up with a compact solution and to exercise the basics of OOP. Create a class which bears the responsibility of accepting a number and maintaining the state of which range appears how many … | |
Re: > although I have this "izraz.txt" file in the correct location If that were the case, the said exception won't be thrown by the Java runtime. The solution to this issue depends on how you are executing your program. Are you using an IDE, or is it a command line … | |
Re: Simply put, the list returned by the `findFlights' method seems to return a list of Object arrays rather than a list of FlightItenary. Don't mix and match type safe code with non-type safe code; either use generics all the way through or don't use it at all [not recommended]. Try … | |
Re: > I want to prevent visitors from being able to type anything in this > field altogether This isn't a JSP question but relates more to the markup language used; I guess HTML here. Use the 'readonly' attribute of the INPUT element:[code] <input name="txtInfo" value="some-info" readonly="readonly">[/code]If you don't want this … | |
Re: > one byte of storage for each character [quote]The char data type is a single 16-bit Unicode character. It has a minimum value of '\u0000' (or 0) and a maximum value of '\uffff' (or 65,535 inclusive). [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html"]Read me[/URL].[/quote] Why is it that you are required to come up with such … | |
Re: You ain't doing it right. Maybe [URL="http://www.serc.iisc.ernet.in/~amohanty/SE288/ieee754.html"]this [/URL]would help. | |
Re: > I'm working on a program that needs to store user info, then can > retrieve it In short, your program needs some sort of persistence mechanism. You have a few options: - Object persistence [search the web for java serialization API] - File persistence [saving the data in the … | |
Re: How about getting started by doing a bit of simple PHP/Javascript coding, coming across real problems and then asking for help? | |
Re: Just to get the terminology right, a string is just a sequence of unicode characters, there is nothing `binary' in it. In the end, everything is stored as a byte, the way the byte sequence is interpreted is what makes all the difference. If your intention here is to grab … | |
Re: Instead of private messaging the solution, you can attach your project here or post a link to an external site if you have your project hosted somewhere else [e.g. sourceforge] so that others can benefit from it. | |
Re: Multi posted in the [URL="http://www.daniweb.com/forums/thread163733.html"]Javascript forum[/URL]. | |
Re: > can u please help me find a way to start a new process each time i > open a new window? AFAIK, you can't. You don't get to decide how a request for a link to be opened in a new window is treated by the browser; it can … | |
Re: The twoDArray in your case is just an array of size 10 with each slot referring to a integer array i.e. two dimensional arrays in Java are just an array of arrays. Hence you can either use [icode]twoDArray[3] = oneDArray;[/icode] or [icode]System.arraycopy[/icode] if you don't want modifications in the original … | |
Re: Saying that 'XXX is not possible in Java' is pretty misleading IMO. Is I/O and Networking possible in Java? You might say yes, there are packages like [ICODE]java.io.*[/ICODE] and [ICODE]java.net.*[/ICODE] for it. But is it really possible in *java*? Both I/O and Networking libraries which are part of the standard … | |
Re: From what I understand, your web page has a text field which allows the user to enter his search criteria. Based on the user input, a new set of check boxes are fetched from the server but before doing that, you need to persist the state of the check boxes … | |
Re: Maybe have a look at [URL="http://www.daniweb.com/forums/thread99132.html"]Starting Java[/URL]? | |
Re: Any exception in Java comes with a stack trace. Try to read the entire exception trace and see on which line things are going wrong. If you are using an IDE like Eclipse, use the debugging feature to inspect the values at run time. If you are using a normal … | |
Re: All the pretty girls / women who work for Santa... | |
![]() | Re: It's pretty easy; make full use of the conditional expression which gets tested before the body of the loop is executed. When the given condition is reached or encountered within the loop body, set a boolean flag and test the same in your loop conditional.[code] for(int i = 0; i … |
Re: Yes it does, since primitive member variables are assigned their default values when the instance is created; which in case of integer numeric types is 0. | |
Re: What is food? What is water? What are the advantages of eating food and drinking water...? At least make an attempt at understanding things before posting obvious questions whose answers can be easily found out using search engine of your choice. Let's say that putting a bit of effort on … | |
Re: [URL="http://developer.yahoo.com/mediaplayer/"]Yahoo media player[/URL] might just relieve you of doing things the difficult way; it's worth a look if you plan on providing streaming audio. | |
Re: The value of `this' depends on the context in which the function was invoked and hence can only be known at runtime. Hence saying that "here `this' refers to XXX" holds little truth since I can very well have a object with its property set to func.a in which case … | |
Re: You need to mark the field of type [ICODE]MessageContext [/ICODE] as [ICODE]transient [/ICODE]so that the serialization mechanism doesn't attempt to serialize it. This only works if the state of the [ICODE]MessageContext [/ICODE]has no significance whatsoever to the newly reconstituted [ICODE]SoapPair [/ICODE]object. If it does, then you have to manually write … | |
Re: lepetitevoddy, use code tags when posting code next time; makes reading the code snippets presented easier to read. Also read the forum rules and announcements. | |
Re: In the code posted I don't see the stream/writer being closed. Variable names like cloudOut1 through cloudOut11 suggest there is something seriously wrong with your design. Try writing out a small and compilable test case which illustrates the problem at hand at post it here. | |
Re: Templates make Template metaprogramming possible; you might want to take a look at it, pretty interesting stuff. | |
Re: Read the [URL="http://www.daniweb.com/forums/thread99132.html"]sticky [/URL]at the top of the forum meant specifically for people starting out with Java. | |
Re: A few recommendations: - Javascript the definitive guide 5th edition - ppk on Javascript - Professional javascript for web developers [wrox] You can take a sneak peak at these books at [URL="http://books.google.co.in/books"]google books[/URL]. | |
Re: Proper encoding headers need to be set when requesting and serving the resource e.g. Content-Type and Content-Encoding. Just having utf-8 charset doesn't mean the content is not encoded in some other encoding. Inspect the requested .js file in a unicode aware text editor and see if it really is unicode … | |
Re: > Every call cause store whole array on the stack. No it doesn't. Arrays in Java are objects and when invoking methods with object references, copy of the reference is created and copied to the stack frame which is then pushed onto the call stack [the stack which maintains the … | |
Re: > I can't figure out how to write to a specific line of a text file. An efficient way would be to open the file using a [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/io/RandomAccessFile.html"]RandomAccessFile [/URL]in read/write mode though things can get pretty nasty if care is not exercised. Almost all other methods include reading a line … | |
Re: > Because number can be greater or smaller then other number, > however you can not apply same logic to characters Yes, you can, because characters form a part of numeric data type. There are only two primitive types in Java: boolean and numeric. Directly comparing characters can be troublesome … | |
Re: It would be appreciated if you used the actual links instead of referring them via some redirection service; read [URL="http://gojomo.blogspot.com/2006/02/tinyurls-are-evil-urls.html"]this[/URL]. Many firewalls out there block any request made via the redirection services, McAfee being one of them. BTW, even my firewall/anti-virus software blocks TinyURL links. Daniweb has a feature which … | |
Re: Read [URL="http://weblogic.sys-con.com/node/42878"]this[/URL]. | |
Re: There is as such no problem with your code; IMO the fault lies with the incompetence of the shell to render fonts correctly. I assume you are on a windows box? Anyways, this is just a rendering issue. Maybe a little more background on what you are trying to achieve … | |
Re: You have two options: - If your delimiters are simple single character sequences [. and !] in your case, you can try looping over the entire string and extracting the relevant parts using indexOf and substring - If your delimiters end up being multi-character sequences you can try to use … | |
Re: Use Apache Ant as a build tool to compile your application with dependencies or just use the command line invocation of `javac' and `java' which supports classpath options. |
The End.