4,084 Posted Topics
Re: @Farheen_3: not by reviving dead threads. start a new thread, show what you've tried, and we'll start from there. | |
Re: the error message is actually quite clear on what is going wrong. > Error Full Text: [ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. The indices that are valid for a(ny) collection are 0 to length-1. So, if your collection contains … | |
Re: what is this supposed to be: public virtual int UserId { get; set; } ? Is there a reason why this part of your mapping file: table=""USER"" has two double quotes? | |
Re: Your code is quite a bit ... goofy. Take a close look at what you have written, and see what you can improve where. An example: public void getGas() { double gas2 = 1.0/2.0 * tankCapacity ; if(gasInTank <= gas2) { gasInTank = tankCapacity ; } } why is this … | |
Re: I've just posted in your other topic on that class, pointing out several issues with your code. (The thread you should have posted this in, btw, since having what is basically one question in several threads is confusing). I'm not going to copy paste it here, but just add a … | |
Re: I very much doubt your code will compile. `if(null[ip] = = null)` what is that all about? to begin with? | |
Re: is this a > Please do my homework for me post? then, no. first, be clear in what you are looking for. secondly, don't post C++ questions tagged with Java. but, just to help you out, I'll give you an implementation in pseudoCode: call spellOutAPositiveNumberWorthLessThan1000000 : spellOutAPositiveNumberWorthLessThan1000000 => return 75000000 … | |
Re: easiest way, build a list with firstnames, build a list with lastnames,pick one of each at random and combine them. How is this a programming problem? | |
Re: actually, no, we can't. databases don't have 'Arrays'. They have columns and records. I recommend looking over the basics of relational DB's (or, DB's in general) before even trying this. Spending five minutes more analysing it beforehand, can save you hours of reworking if after creation you realized you messed … | |
Re: asking more experienced developers whether they would be willing to do code reviews could also help. also: when finished coding, run it through a sonar cheking and see if you can solve any code-smells or issues that are detected. | |
Re: also, just some remarks: public boolean equals(NewspaperSubscriber subscriber){ boolean result; if(street_address.equals(subscriber.street_address)){ result = true; }else result = false; return result; } 1. it is better to limit the number of lines code. it makes the code easier to read and understand, and it decreases the risk of typo's or other … | |
Re: JFrame frame = new JFrame("Calculator"); You are creating a new instance of JFrame to which you are adding all the components you want to show, but you only call `setVisible(true)` on the class itself. You haven't added the internally created instance of JFrame (which you don't really need at all) … | |
Re: what do you mean by 'the tost error message' ? | |
Re: mnyah, but since the last post is (almost) three years old, I doubt they haven't upgraded yet. | |
Re: I think Person is the right place, but it should take into account more possibilities: For instance, an appartment: can a housenumber only be numerical (1, 2, 3, ...) or do you take living units into account (1, 2a, 2b, 2c, 3/101, 3/102, ... ) What when you encounter a … | |
Re: Abhishek: welcome to the DaniWeb fora. Allow me, however, to explain something about the rules of this forum, which are upheld to keep it (easier) maintainable: 1. don't hijack a Thread. if you have a question of your own, start your own Thread. DaniWeb doesn't get billed per Thread started, … | |
Re: Start on the official website: [http://developer.android.com](http://developer.android.com/index.html). There you can get the tools, and information on how to get started. | |
Re: Just one answer for this: > NEED more EFFORT, don’t GIVE UP! | |
Re: why not explaining what (you think) went wrong before providing copy-ready solutions? | |
Re: as far as I can tell, the comments in your code already hint to what you should do next. for `non- Integer` input, don't use the `nextInt();` method, and don't assign the value to an `int`. | |
Re: I hate to tell you, but if you are planning to use a UI framework (Vaadin) to implement business logic, you should first learn basic OO principles. | |
Re: and storing the values is as easy as just saving values in an array/list. let's assume you take James' advice and use a list: @Override public void actionPerformed(ActionEvent event){ // if those buttons have the numbers as text on them JButton b = (JButton)event.getSource(); char text = b.getText().getChar(0); if ( … | |
Re: That's a nice assignment. Do you have an actual question about it? When you registered to DaniWeb, you accepted the [posting rules](https://www.daniweb.com/welcome/rules), among which, you'll find: > Do provide evidence of having done some work yourself if posting questions from school or work assignments Copy pasting an assignment is usually … | |
Re: Your unit tests should be able to tell you whether something in the application was 'impacted' on the migration to the new version. | |
Re: Himanshu_8, Welcome to DaniWeb. Just let me point out a few things: 1. When using code blocks, put the entire code in them, it makes it clearer 2. Don't just post code, it doesn't explain anything. Rather answer with an explanation of how to get to the correct code, or … | |
Re: also: it's good that you show the startTime and stopTime methods, but as far as we can tell, they're not called anywhere. | |
Re: so, if I get it straight: You read all the data from the database then you create a report based on that data then you want to read all the data of that report (the data you already had) and display that data? | |
Re: Not to mention the fact that there is no "law" that states a project HAS TO provide information about it's version or build. | |
Re: So ... what is your actual question? | |
Re: one is a complete programming language, that can be used to create stand alone and web applications, the other is a scripting language, which can only run front-end in a webbrowser. it would be easier to answer the question: what do they have in common? 1. they both have 'Java' … | |
Re: IMO it's not really a good recommendation. First of all, don't look for a book that's "for beginners". Look for a book that decently teaches and explains the material, so it can be used by both beginners and more advanced developers. A lot of books and tutorials out there that … | |
Re: durgaselvam: start a new thread. also realize: html is static. you'll need another language, jsp, jsf, .. but not html. | |
Re: ... by following James' suggestion: `if ( t[0][3].equals(t[1][1])` | |
Re: you could've created your own thread in which you ask for this, especially while showing your code. but since this is about jsp, you might as well post it in the jsp sub-forum. | |
Re: Govind: your answer is not correct ('\u0020' is NOT the same as null) and a year overdue. no reason to revive a dead thread. | |
Re: Josh Bloch's Effective Java (2nd edition) is a good read. | |
Re: > Who can tell what is in the if statement and what is not with this formatting? Everybody who looks at the opening and closing brackets. The OP clearly stated: > My program was working fine until i introduced the if statement, without this "if" there are (java.lang.NullPointerException) errors . … | |
Re: by putting the dependencies you need in your pom.xml file. after that, you can import (and use) the classes as if they were in the same module. | |
Re: please understand that copy-pasting your school assignment here will not make us eager to help you cheat, especially if you don't bother to put some effort in it yourself. | |
| |
Re: [ReCaptcha](https://www.google.com/recaptcha/intro/index.html) is recommended quite often. (Also by authors of other captcha libraries) so it must be worth a look. | |
Re: @haris.nattukal: did you add anything other than what Freshly already mentioned 5 days ago? If so, please add some explanation of what and why you changed it, so the OP can learn from it, otherwise, I hope you realise the futility of posting this code. | |
Re: change the names to AClass1_WhatIThinkShouldBeFirst AClass2_TheSecondOne But this makes no sense at all. If you're packages are hard to overview, you are using poorly chosen names, or have way too much classes in your packages. | |
Re: richardsonka: please read the previous post, you're about a year late with your response. Also: use code formatting it makes it easier to read. Besides: why would one have to be a Java expert to be able to write sql code? | |
Re: to explain a bit more James' post (he's right, btw, that is your issue) if you put `String.id` your compiler will go looking for a static variable called `id` within the `String` class. Since there's no such variable, the compiler doesn't know how to deal with it. It's not a … | |
Re: quote from the Java4K homepage: > ANNOUNCEMENT > Unfortunatly there will be no 4K contest for the period Dec 2014 to Feb 2015, and beyond. The reality is that Java has been in decline for a long time and now it's almost impossible for ordinary people to play Java games … | |
Re: do you expect us to download your code totally? just post the relevant parts here, with an explanation of what it should be. | |
Re: I have no idea on which line the Exception is thrown, nor through what variable, but I'll try to explain what is going wrong. After that, check the line mentioned in the stacktrace and see if you can resolve your issue. Let's say you have a class Person: public class … | |
Re: SZJX: you do realize this thread is over five years old, and nobody is still following it, right? besides: "best solved by just calculating through all permutations". yes, wasting the system's resources is always "thé way to go". if you can minimize the number of permutations, you should. if you … |
The End.