2,443 Posted Topics
Re: [QUOTE=musthafa.aj;1079622]Hi! i creating java apps to edit windows registry .... it is fine in Xp but in Vista its need admin privileges.. how do get it programmatic-ally... [/quote] You don't. You'd have to execute under a different user, of course. [quote] in .net app.manifest is there..but in java anything is … | |
Re: read it and as you read it write it out to another file, but don't write the last line. | |
Re: Try "outer" joins [code]select i.code,s.date_sale from Item i, Sale s where i.code = s.code (+) and s.date_sale <='2009-01-31' (+)[/code] Edit: Although I don't know HQL, at all, I am assuming it is one of the in Java written DBs and so should still understand basic SQL. I'll probably look into … | |
Re: Okay, I know NeilCoffey explained it [i]long[/i] before, somewhat, but I, now, will still give a full explanation. It has to do with "literal" data. I.E. data that you type directly into code. Boolean data is just that, the boolean [code]true false[/code] Strings are surrounded by quotes [code]"string"[/code] If you … | |
Re: It has found the node, but the word itself, i.e. Apple is a child node of the "word" node, a TextNode type. | |
Re: So write one. If you need help getting it right post your code (and nay and all errors) here and we will help you correct it. | |
Re: [url=http://www.lmgtfy.com/?q=Java+Custom+Look+And+Feel]Here[/url] Edit: P.S. Attempting to crete your own look and feel [i]far[/i] from a "simple" task. It tasks even the best of Java Programmers (to get it right, anyway). | |
Re: Not the sort of thing Java is meant for. | |
Re: after j.add add j.validate() and j.repaint(), and then try again. | |
Re: Are you trying to say "not less than", if so why don't you just say "greater than"? [code] > // instead of <! [/code] Edit: Nevermind, I'm an idiot, they're Strings so greater than and less than are not what you want anyway. Doh! | |
Re: How are you determining that it "doesn't recognise \n"? If you are "checking" the file with Notepad, it is that notepad "doesn't recognise \n", try checking with wordpad (assuming you're on windows, and on MAC the "newline" character is "\r" on Windows it is "\r\n"). You shouldn't be using "\n" … | |
Re: Rather than Scanner use a BufferedReader, its readLine method, and String's split method. | |
Re: Showing your code [i]might[/i] help. Mainly for the overridden JPanel (which I do not know why you are doing that if you are simply adding elements to it), and for the "text change" on the button. Better would be if you took the time write a very small, compilable, and … | |
Re: As he has been told here ( [url]http://www.java-forums.org/new-java/23657-command-line-arguments-help.html[/url] ) already. | |
Re: Because the only print statement you have there refers to one specific element (and actually it doesn't refere to any of them since index is undefined there). You, of course, need to create another for loop in that case section just like under the case section 1. | |
Re: What does "User" constructor do? (IOW It's code, please.) As I find it very hard to believe that that line will throw an NPE, unless the constructor is catching one then rethrowing it, maybe, and then it should be the "throw" line in the constructor that is listed rather than … | |
Re: The "thread" is the right idea, but probably done wrong. It [i]might[/i] help to see the code. However, recreate the code in a small GUI that contains nothing but the textarea and the "loop" (and any extraneous items "in between" that actually contribute) that displays the problem you're seeing. | |
Re: One thing that might cause "strange effects" is the way that public static final (or protected/default static final for sub/package classes) are handled. Those values compiled directly into the class using them, so a change to one of those without recompiling the classes that use them will cause a "disconnect". … | |
Re: IOW we should do your work for you? Why don't we start out this way, you write out, here, what you have and we will help you refine it. How about that? | |
Re: Use LinkedList (see the API docs), or create a Custom Object that contains reference to the previous and next "edge" as instance variables as well as defining the current "edge" itself. | |
Re: That is the instance that all threads must obtain a lock on in order to access the block. | |
Re: :sigh: Is this suppossed to be some kind of crack program? In any case, there is no blanket answer to that anyway. It depends. If it is a firewall on the machine, then it depends on the software. Are there CLI command that you can use? Then ProcessBuilder/Runtime.exec(). Is there … | |
Re: They both work. Depends on how granular you want the syncronisation to be. | |
Re: The first index of an array is 0, which means the last index of an array is one [i]less[/i] than its length. So, knowing that, take a look at the condition in your for loop and see if can find and fix the problem. | |
Re: The exception tells you exactly [i]where[/i] the error occured. Somewhere directly before that point you have forgotten a ; or a closing } or are performing an action that must be contained within a method or constructor. | |
Re: For number 7, add a toString() method. In the equals method you should probably check that the parameter is not null. You may also think about properly overriding Object's equals method and just use that. The other part of number 9 is to implement Comparable. For number ten override the … | |
Re: Do you want to "set the element to 0" or do you want to remove it. The sample code will actually remove it. If all you want to do is set it to 0, then there is no reason to "record" the index when you find it, simply set it … | |
Re: And what, exactly, is the problem? You might want to try using trim on the first nextLine call to remove extraneous whitespace (to include any possible newline, but I believe the nextLine call strips that, check the API docs about that though, as I am, currently, too lazy to do … | |
Re: Implement Runnable unless you have some specific [i]reason[/i] for extending Thread. | |
Re: [QUOTE=leoeroy;1062302]Im not printing out the array. The purpose of this program is creating an array of objects. the result of this program should be a box filled with green color.[/QUOTE] Then you need to [i]show[/i] that somehow. So, your question is no longer how to create a 2d array, but … | |
Re: [QUOTE=TheDLSyrnyk;1063362]I was just wondering if someone can provide an algorithm to the following question.[/QUOTE] Yes, I am quite sure someone can. Unfortunately for you, though, that's your job in this case. | |
Re: Return a javascript onload that erases the history, or something to that effect. Another thing that you can do, is to set all pages as no-cache and a very short expires. This would force the page to be reloaded (or at least ask the user if they wish to repost … | |
Re: [url]http://java.sun.com/docs/books/tutorial/ui/features/components.html[/url] which is part of [url]http://java.sun.com/docs/books/tutorial/ui/index.html[/url] and don't forget [url]http://java.sun.com/docs/books/tutorial/uiswing/events/index.html[/url] | |
Re: [url]http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html[/url] [url]http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html[/url] [url]http://java.sun.com/docs/books/tutorial/ui/features/components.html[/url] | |
Re: We'll be glad to help, we will [i]not[/i], however, do it for you. For starters, check out HttpURLConnection. | |
Re: [QUOTE=Kreators;1062342]Hi i'm new here in daniweb i would like to ask about my program i'll make a program that show if the word is palindrome or not can you correct my program when i complie my program its say Process complete then when i run the program it doesn't show … | |
Re: For the first item Google "Java Installer Builder" (Hint install4j). For the second item [url]http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html[/url] | |
Re: Well, let us see what you've tried. We are more than happy to help you complete it, and "get it right" but, nobody here is simply going to do it for you. | |
Re: If this is that "download count" problem, then you are going about it completely the wrong way. If it is "good enough" to get the count the next day, then simply parse the servers access log. If you need it "real time", then don't give direct access to the file, … | |
Re: Well, of course you're "not getting the exact reason for this" when you ignore all errors. Add a printStackTrace to each of those catch blocks. | |
Re: Exctly as it says. Compare line 75 with line 54. What's missing at the front of the line 75 statement? | |
Re: It [i]might[/i] help to know what these nebulous "errors" are. [i]complete[/i] error message with stack traces (where applicable), please. | |
Re: Provide the full stack trace please. That message doesn't help at all, and it doesn't even seem to be produced by this piece of code. | |
Re: With the API docs for Image? With the Swing Tutorials? With the Threading Tutorial? With the "Getting Started" Tutorial? | |
Re: Because 2 and 3 are Integers, so pure Integer math is performed. Use a literal double (i.e. 2.0 instead of 2) or cast at least one of them to a double [code]double a = (double) 2 / 3; // or double b = 2 / (double) 3; // or double … |
The End.