7,116 Posted Topics
Re: Hi Ebrahim Welcome to DaniWeb. your questions and contributions are very welcome here, but please be aware of the rules and best practices for this site, including: don't hijack someone else's topic for your question. Start you own topic. if you have a question, ask it! Simply posting code does … | |
Re: `import` is optional. You can always code the fully-qualified name `javax.swing.JRadioButton` every time you need it, but that can be very tedious. So you have the option to `import javax.swing.JRadioButton` at the start of your .java file and then you can just use the short name `JRadioButton` Similarly you can … | |
Re: Hi Amazing_2 This thread is 8 years old, and not related to your question, so the right people won't see it. Please start a new topic to ask your question and I'm sure you will get some good answers. JC Moderator | |
Re: Hi. Yes, we can help. I can see that English is not your first language, so please try to be as clear as possible and speak simply. We will need to see your code to understand your problem. Please post the part of the code that shows your problem. | |
Re: Probably mis-matched brackets, but unless you format your code properly it's going to be hard to see. | |
Re: Lines 22-32 are not needed if you fix the termination condition for the loop on line 12 The spec says you do not include the count if it is 1, but your code always includes it. | |
Re: I agree, it's a variant of agile. I've used agile-type methodologies in projects since the mid 1990's, and I'm a huge fan. The truth of software development is that nobody really knows what the product is supposed to be until they see it and use it. That's why waterfall always … | |
Re: There are more basic problems with this code. eg if (month ==1) { cout<<"Number of days Passed in the Year: "<<sum<<endl; day=31; sum=day-yy; } This displays `sum`, which has not been calculated yet It then sets `day` and `sum`, but never uses those values. | |
Re: I read the conditions. Nowhere do they say that the rate changes during the call. They say the whole call is billed at a rate that depends only on when the call started. You seem to have made an assumption that's not justified by the information you provided. | |
Re: Is there a stack trace or other error message? If so please post it. | |
Re: If you want to go fully OO then you will also need some kind of Game class that encapsulates the process of playing a game and reporting the results. `zombie` and `player` will be member variables of the Game class. Because there's a lot of interaction with the human player, … | |
Re: > is it better to use while() or do{} while? That depends on what behaviour you want! `while` tests the condition *before* entering the loop. The loop is executed zero or more times `do while `tests the condition *after* each pass of the loop. The loop is executed at least … | |
Re: It sounds to me like you are expected to produce a simple text menu on the console - not a GUI. So JOptionPane etc is not relevant here. Just print out the text as shown in the "sample menu" you were given, and read the user's reply into an int … | |
Re: The "official" way to perform the same action from different UI events is to use Java Actions. See [url]http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html[/url] | |
Re: With 4x4 matrices I'm surprised you can even measure execution time meaningfully. I'm not surprised that the overheads of a thread pool would greatly exceed the time to do a few array maipulations. I guess each thread will complete within its first time slice. | |
Re: A decrease is just a negative increase. So a decrease of 5% is the same as `adjSalary(-0.05);` | |
Re: This is a bit of an odd question. Normally patterns are used to solve specific design problems. But anyway. Most patterns are quite low level and you would use a few different patterns in any one program; even quite a small one. But by small I still mean still a … | |
Re: OK, that's neat code. Did you have a question? | |
Re: Depending on your email client you should be able to create a rule that automatically deletes all mail from the provider as soon as it arrives. | |
Re: Please put the toolbar in the full screen editor. Some of us stopped memorising bizarre formatting codes when we replaced our DOS 3.2 PCs with a WYSIWYG GUI Mac 128k in 1984. And another thing... we are being flooded with new threads that just copy someone's homework question, so we … | |
Re: There's not a lot you can do to speed up the loading, buut you can give the impression of a very fast startup by displaying a splash screen while your program is loading. By referencing the spash screen in your jar's manifest Java will display it immediatley, ie even before … | |
Re: The semi-colon on line 1 is not the correct sytax for an if/else, so when the compiler gets to line 4 it does not see it as a valid `else` | |
Re: How can we tell if we can't see the relevant code? Post the code and we will help. | |
Re: Just for clarity: There are two types of polymorphism, and one thing that isn't called polymorphism, in this discussion Overloading: You have multiple methods with the same name but different parameter types. The correct method is chosen at compile time based on the actual types of the parameters that you … | |
Re: Seems to be an implementation of "determinant expansion by minors", so Google that, eg http://mathworld.wolfram.com/DeterminantExpansionbyMinors.html or http://paulbourke.net/miscellaneous/determinant/ | |
Re: I tried it. A form was displayed but near the bottom it said: An internal error occurred: 54996B8988A80.A1468C4 | |
Re: You could simply: Close the log file Re-name it to a unique archive log file name Open a new log file (same name as previous file before it was renamed) | |
Re: That code is a good demo of how not to format code, but in various ways it's NOT a solution the requirement that was posted. Was it intended as a sort of example of how to approach it (in which case that's better)? | |
Re: It's not possible that two return statements in the same method get executed (except if the first is in a try/catch block and throws a caught exception, in which case it starts executing but doesn't finish). It sounds like one of those trace messages refers to the method from which … | |
Re: As usual Oracle have the answers on their web site. For example: https://docs.oracle.com/javadb/10.8.3.0/devguide/cdevdeploy32171.html | |
Re: Please explain exactly what it is you want to do. | |
Re: If you are using an ADSL connection then the "A" stands fo "asymmetric" - most of the bandwidth (usually 80%) is dedicated to download with typically 20% for upload. See previous post for the reasoning behind that. It's not just movies - consider an ordinary web browser request vs the … | |
![]() | Re: At DaniWeb we are all volunteers, here to help people who want to work with us to improve their skills. The more effort you put into that, the more we will want to help. I'm sure you have already thought about how to start that program so please share what … |
Re: The URL for a folder is just like the URL for a file except that it doesn't have a file name - it just finishes with the folder name (and its final /). Either way iot's just a string that you can save in a database like any other string. | |
Re: https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question | |
Re: I'm not a VB user, but just asking... is it OK to do animation in a cpu-bound loop like that, or is the use of a Timer mandatory rather than just recommended? even if it is OK, won't that code just go start stopwatch set location stopwatch is < 3000 … | |
Re: I have no idea what the answer is, but this post gets my vote as the best question of the decade. If only all our questions were so clear, so well explained, showed so much effort... I really really really hope someone can help | |
Re: Yes, Java always passes parameters by value. But sorry, your question is not clear. Please explain exactly what you want to know. | |
Re: Hi Jordi Please don't hijack old threads - start a new thread for your question JC | |
Re: Show us what you have done so far and we will help. | |
Re: You have the recursive call to `next` on line 4, which is before you test for n<=1 and terminate the recursion, so it always recurses while initialising the variables, even if n<=1. <EDIT> Above comment is wrong - I left it here so subsequent posts still make sense.. Mea Culpa. … | |
Re: Yes, we can help you do it. What have you got so far? | |
Dani: Out of curiosity I tried clicking the RollBar ads in Programming and in Community Center.. When I clicked the one at the top of the page it just refreshed the page but without that ad. When I clicked the one half way down it just refreshed my window. I … | |
Re: This may be a dumb question, but does your server have the equivalent to a Windows or Mac boot in safe mode that would get you to a working minimal OS without starting any non-essential services such as SQL or connecting to any external servers? | |
Re: http://bfy.tw/9xSH and then https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question | |
Re: That sounds like an absolutely standard little shop accounting system. It would be madness to pay for a custom application development and its ongoing support rather than simply deploy a standard supported off-the-shelf solution. Here's the first example I found in a quick Google: https://www.manager.io (Please note I know absolutely … |
The End.