7,116 Posted Topics

Member Avatar for Diogo_2
Member Avatar for clarkkent021

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 …

Member Avatar for Aatulya
0
2K
Member Avatar for divinity02

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

Member Avatar for JamesCherrill
0
183
Member Avatar for ka-ii

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

Member Avatar for JamesCherrill
0
15K
Member Avatar for umutcanergun

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.

Member Avatar for JamesCherrill
0
114
Member Avatar for Justin Kent

Probably mis-matched brackets, but unless you format your code properly it's going to be hard to see.

Member Avatar for JamesCherrill
0
630
Member Avatar for ahmedrizwan1

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.

Member Avatar for JamesCherrill
0
255
Member Avatar for DeanMSands3

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 …

Member Avatar for rproffitt
0
393
Member Avatar for Andrew_39

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.

Member Avatar for Johan_1
0
7K
Member Avatar for nadiam

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.

Member Avatar for JamesCherrill
0
672
Member Avatar for Joe_10
Member Avatar for hegindra

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

Member Avatar for JamesCherrill
0
580
Member Avatar for Gamal_3

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

Member Avatar for Gamal_3
0
321
Member Avatar for Sameer_8

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 …

Member Avatar for JamesCherrill
0
269
Member Avatar for k2k

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]

Member Avatar for JamesCherrill
0
14K
Member Avatar for subhaac

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.

Member Avatar for JamesCherrill
0
1K
Member Avatar for Sameer_8

A decrease is just a negative increase. So a decrease of 5% is the same as `adjSalary(-0.05);`

Member Avatar for Sameer_8
0
1K
Member Avatar for Violet_82

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 …

Member Avatar for Violet_82
0
318
Member Avatar for Mohammed_9
Member Avatar for George_22

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.

Member Avatar for JamesCherrill
0
267
Member Avatar for Dani

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 …

Member Avatar for Dani
6
1K
Member Avatar for kangaroodle
Member Avatar for Goldfinch

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 …

Member Avatar for JamesCherrill
0
243
Member Avatar for Siberian

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`

Member Avatar for Siberian
0
213
Member Avatar for palash_1
Member Avatar for PulsarScript

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 …

Member Avatar for JamesCherrill
0
304
Member Avatar for Anel_1

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/

Member Avatar for Anel_1
0
6K
Member Avatar for davy_yg

I tried it. A form was displayed but near the bottom it said: An internal error occurred: 54996B8988A80.A1468C4

Member Avatar for Dani
0
235
Member Avatar for can-mohan

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)

Member Avatar for JamesCherrill
0
407
Member Avatar for Shereen_1

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

Member Avatar for JamesCherrill
0
332
Member Avatar for macdonald12

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 …

Member Avatar for JamesCherrill
0
314
Member Avatar for Saboor880

As usual Oracle have the answers on their web site. For example: https://docs.oracle.com/javadb/10.8.3.0/devguide/cdevdeploy32171.html

Member Avatar for JamesCherrill
0
610
Member Avatar for ADENIJI_1
Member Avatar for Er_3

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 …

Member Avatar for Nisha_6
0
427
Member Avatar for Priti_2

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 …

Member Avatar for ddanbe
0
114
Member Avatar for Dani
Member Avatar for batoolhussain

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.

Member Avatar for Mohamed_82
0
398
Member Avatar for sankar_2
Re: java

https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question

Member Avatar for JamesCherrill
0
132
Member Avatar for trono
Member Avatar for Bernardo_3

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 …

Member Avatar for Bernardo_3
0
365
Member Avatar for Violet_82

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

Member Avatar for Geoff_3
3
311
Member Avatar for kasis

Yes, Java always passes parameters by value. But sorry, your question is not clear. Please explain exactly what you want to know.

Member Avatar for JamesCherrill
0
476
Member Avatar for vivekH
Member Avatar for aditya_20
0
12K
Member Avatar for Saif_7
Member Avatar for Sherwin_4

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

Member Avatar for JamesCherrill
0
783
Member Avatar for charles_23
Member Avatar for JamesCherrill

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 …

Member Avatar for JamesCherrill
0
387
Member Avatar for fo2sh

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?

Member Avatar for JamesCherrill
0
2K
Member Avatar for Dhelandel

http://bfy.tw/9xSH and then https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question

Member Avatar for JamesCherrill
0
262
Member Avatar for Saboor_1

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 …

Member Avatar for rproffitt
0
260

The End.