3,892 Posted Topics
| |
Re: > But it is giving error that x is null. Can any one please correct it? Because the `style' property is only set when inline style sheets are used. To get the style details of the element whose style is set using linked or embedded style sheets, you need to … | |
Re: > would anyone explain the difference among "public static int " and > "public final int " and "public static final int" ? Make an attempt at answering that and we would provide corrections if needed. Giving out answers to queries without an effort is against the forum rules. | |
Re: > However, the program runs without any problems in JCreator. Check for possible hardcodings in your Java source files and the .bat files. Do a text search for the old directory name in your project directory and you might just stumble upon something. | |
Re: Sifting through that massive piece of code would be time consuming. If developing on Firefox, look into the Firebug addon which adds capabilities like Javascript debugging, error detection etc. Look at the errors which pop up in the Error Console; it will point you to the exact source of the … | |
Re: [ICODE]defaultWriteObject[/ICODE] is equivalent to the default serialization performed in the absence of a [ICODE]writeObject[/ICODE] method and is normally used in conjunction with custom writes to persist transient or extra data. Hence you might want to resort to something else. One solution might be to grab the contents of the entire … | |
Re: > Yes, I am taking a class You should convey to your professor the problems you are facing and ask him to help you out even if it means spending some extra time for it. One-to-one help is far better than trying to understand the same by asking on message … | |
Re: You would of course have to use the provided installer, there is no easy way of bypassing it. You would have the option of spawning OS processes from Java using the [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ProcessBuilder.html"]ProcessBuilder [/URL]class. | |
Re: Use the [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#split(java.lang.String)"]split()[/URL] method of the String class which returns a String array; loop over the array and apply the Integer.parseInt() method on each String token. If an exception is thrown; the string token isn't a valid integer. | |
Re: [URL="http://www.computerhope.com/issues/ch000549.htm"]This[/URL] should considerably ease your pain. | |
Re: > I want the BufferedReader object to read from a variable If you are talking of having a Reader sort of wrapper for a target String, look into StringReader and Scanner. | |
Re: [QUOTE=dyollretsel08;784492]i have a homework. do a program using java that will ask a user to input a infix expression , and the program will convert it to postfix expression... help!![/QUOTE] Read the forum rules and announcements; help is provided if and only if an attempt is made by the poster. … | |
Re: For comparison its == or === [strict type safe equals] and not = [assignment operator].[code] var op = document.getElementById("someId").value; switch(op) { //switch by default using === operator case "add": alert("addition"); break; case "sub": alert("subtraction"); break; // and so on }[/code] You are using an improper way of accessing form elements; … | |
Re: Rather than using the window.open() function, use the URL passed in the function as the value of the HREF attribute of the ANCHOR element.[code]document.write('<a href="<?php echo $product_flypage ?>">');[/code] assuming that the echo part writes out the URL. | |
Re: Use the focus() function of the DOM element to focus on the given element. | |
Re: > Why is it too hard to find a girl friend who is as smart as Narue(dont > take this one seriously ) Because for you "Life is much simpler without women." :-) | |
Re: > there is a function in c++ called strlen() which tells you the length of an array That would only be for char arrays, not any array. | |
![]() | Re: > how can you convert a string, which is stored in a vector, into an > integer? Consider [URL="http://www.google.co.in/search?q=convert+string+to+int+java"]searching the archives on the web[/URL] as a first resort before posting a question. This question has already been answered numerous times. It'll save you a lot of time and will be … |
Re: A bit more explanation [URL="http://www.daniweb.com/forums/post721829.html#post721829"]here[/URL]. | |
Re: > I know that you do 6.83783 * 10^3 as 6.83783E3, but how do I do > that number times 10 to the negative third? [icode]6.83783E-3[/icode] | |
Re: It would be better if you posted the code as it is rather than posting it in bits and pieces. Here is a small working example which is almost like yours and is working fine: [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; … | |
Re: The problem is with the inner classes present in the Base64.java file. Post the code present in the Base64.java file. Also a little background on what exactly are you doing in Training.java would be helpful. | |
Re: Since this is yet another 'gimme a project' thread with no real value, locked. | |
Re: Make sure your database/table is created with Unicode as the encoding. Refer the Postgresql forums/documentation for more details. Also try getting the connection with the URL which also specifies the character set explicitly.[code] jdbc:postgresql://localhost:5432/testdb?charSet=YOUR-ENCODING-HERE[/code] | |
Re: > how can I do it? By reassigning the [ICODE]out[/ICODE] member of the [ICODE]System[/ICODE] class using [ICODE]setOut(PrintStream)[/ICODE].[code] System.setOut(new PrintStream(new OutputStream() { public void write(int b) { // NO-OP } }));[/code] Or simply redirect the output to a file or /dev/null [unix] when running the Java command:[code] java your.pkg.your.class > log.txt … | |
Re: > if i use a different domain name then it works but not otherwise, What do you mean by it works when using a different domain? Does using the complete URL instead of just 'storeSubject.jsp' seem to work? I can't think of any problems with code which might cause this … | |
Re: [QUOTE=britto;792715]is there any method or class for getting the datatype of a variable???? After the variable is declared i must get the datatype...... hw can i do .... any ideas??[/QUOTE] You can get the type of any member variable or local reference type variables using reflection; for local primitive variables, … | |
Re: > Any body please send me a complete java project on Read the forum rules regarding the same; we don't provide free code. Put in some effort and get back if you face any problems. Locked. | |
Re: > Why? Simply because end users of your application need no frigging stack traces. ;-) It also seems to indicate that the programmer isn't very clear on the kind of contingencies that can arise in the application and he plans on getting away by either having a generic catch-all block … | |
Re: What have you got so far? Help will only be rendered if you show some effort on your part. Since the specification looks pretty hefty I am sure you are good to go with Java and JEE. | |
Re: Read the stickies at the top of this forum; they contain all the information required for a beginner to get started with Java - from scratch. | |
Re: As per the specification, in a HTML document, the ID attribute must be unique. Assign a different ID and NAME to each INPUT element. Don't use GET, use POST for sending your form data. | |
Re: > Please help. . I'm just a beginner. . Thanks! Start by reading the stickies at the top of the forum to get started with Java. The forum rules forbid / discourage ready solutions to the problem posted by members and help is rendered only if an effort is shown … | |
| |
Re: Read [URL="http://www.dannyg.com/ref/javavsjavascript.html"]this[/URL]. | |
Re: [QUOTE=kin89;779418]can anyone plz help me. i m not able to compile source code.the problem is javac not recognised as internel or externel command.[/QUOTE] Consider doing a simple web search for the exact error message and 9 times out of 10 you would surely land up with a solution. It would … | |
Re: [INLINECODE]cin.get()[/INLINECODE] in case of c++ and [INLINECODE]getchar()[/INLINECODE] for C | |
Re: Simply run an infinite while loop, wait for user input, process that input and make your decision accordingly.[code] // create Scanner etc. while(true) { if(in.hasNext()) { String str = in.next(); if(str == null || str.trim().equals("no")) { System.out.println("Thank you"); System.exit(0); // or break; } } }[/code] | |
Re: > The public type global must be declared in its own file. Make sure the name of the file is the same as your public class/interface; also make sure a single file doesn't contain more than one top level public class / interface. > Cannot make a static reference to … | |
Re: > So I'll be grateful if anyone can help me with some sample code in > Ajax with Java related technologies. Ajax is a set of technologies and hence doesn't depend on a single language for its implementation. Ajax is simply a asynchronous request sent by the browser using the … | |
Re: > but when I start the client nothing happens Put a few debugging statements to monitor the entire conversation and post where exactly your program hangs. For e.g. print out a debugging statement to the console when the server receives a client request [i.e. after accept()] and so on. Alternatively, … | |
Re: If you are developing in Java 1.5 consider using generics in which you can make[ICODE] toArray()[/ICODE] of [ICODE]Set[/ICODE] return an array of [ICODE]T[][/ICODE] where [ICODE]T[/ICODE] is the type of element you have stored in your Set.[code] Set<String> s = obj.someMethod(); String[] sArr = s.toArray(new String[s.size()]);[/code] Alternatively, you can create a … | |
Re: > As I said I'm new to java Then you should try reading the stickies at the top of this forum and get your Java basics cleared up before messing around with complicated stuff like GUI etc. | |
Re: You need to check if an integer can be read from the Scanner before actually reading it; the same applies to any kind of token, always. A proper mix of [ICODE]hasNext()[/ICODE] and [ICODE]hasNextInt()[/ICODE] provides a relatively better and appropriate way of implementing the given functionality. A sample snippet is as … | |
Re: *sigh* And what do you all think happens when the OP *does* end up with something? Wait, let me guess, I would have to delete the off-topic posts and preachings to make this thread seem on-topic, right? Though we all agree that a few deviations/off-topic discussions foster a healthy forum … | |
Re: >Now I do not wish to be rude here but if you use common sense I >guess any one can decipher that you cannot check whether a value >is negative or positive BEFORE YOU HAVE EVEN READ IT from the >console. That's an excessively harsh post there; I would really … | |
Re: > For that, I need to map all the java datatypes to sqltypes. This largely depends on the database engine in consideration and is normally taken care by the database driver. If the database to be used is known in advance, a simple global search and replace should do the … | |
Re: > but whats problem with this syntax? The changes to internal implementation of the model [business logic + data] which affect the view which shouldn't be the case. Also a design which employs separation of concern is far more easier to maintain, change and troubleshoot. | |
Re: > writer.write(line); [ICODE]writer.write(line.toUpperCase());[/ICODE] Since you are reading in a line from the file in a String, consider looking at the [ICODE]java.lang.String[/ICODE] class documentation. | |
Re: Consider using a mature Javascript library like jQuery or Prototype which abstracts away almost all browser inconsistencies and quirks. That way, you would be able to build web applications which work on almost all browsers out there. |
The End.