5,727 Posted Topics
Re: banks still try to run their own cables like that? Thought they'd stopped doing that over a decade ago and now use microwave or satellite links. Much cheaper to set up :) | |
Re: The only ways would be to either make a class containing the index and value, as James suggests, to create a separate array containing the indices of the values in sorted order, or to create a new array of the values in sorted order. The very concept is weird btw, … | |
Similarly, you can add more fields to an enum and simply provide accessor methods to retrieve them. For example you could change it to have an extra field indicating an output directory to write specific types of data to, and a getter method to return that directory. | |
Re: switch (x.toUpperCase) { case "YES": ... break; case "NO": ... break; ... } much clearer overall than a jungle of nested if statements. Just about the only thing added to the Java language I like since generics. | |
Re: and don't forget that calling the method that increases or returns the counter introduces a call to the class :) | |
Re: [QUOTE=PirateTUX;302688]Call me old-skool, but I'm going to say that C++ is the only only only way to go.[/QUOTE] Modern kids, thinking C++ is old-school... In my youth we thought C was too modern, it would never take off :mrgreen: | |
Re: Done that in the past, but last time was 10 years ago. Hotels+rental car is far more flexible than campervan, as you're far more mobile (especially in towns and cities where the large size of the campervan makes for problematic driving, and there tend to be fewer if any reasonably … | |
Re: snippets is fine, but entire solutions to common homework problems is not. For example the following is helpful to a lot of people in real situations, but useless to a schoolkid trying to get away with not doing his homework: String requestUri = request.getRequestURI(); StringBuffer requestURL = request.getRequestURL(); requestURL.delete(requestURL.length()-requestUri.length(), requestURL.length()+1); … | |
Re: And for formating the output of the enum (rather than just returning a String containing the exact value like MARS in this code). Mind this might under some conditions cause side effects, if there's something that relies on Foo.F being "F" exactly. public enum Foo { F("f1"), G("f2"), H("f3"); private … | |
Re: and what's stopping you from finding that code? It's not as if there's not a gazillion examples of just that out on the web, in tutorials, books, your course notes, etc. etc. etc. | |
Re: You should ask your teacher, not us, what the scope and requirements of his course work are. | |
Re: you actually understood the question? | |
Re: what do you have thus far? Best thing you can do is talk to your users, ask them what they do right now and how they expect the new application to do it for them. | |
Re: if you're too stupid to find the button to post a new thread, you're far too stupid to create anything like a chatbot. | |
Re: and oh, youtube videos are notoriously bad as a teaching tool. While they can help, in combination with written material, to make concepts clearer, they're not to be used as your sole source of information, especially (because the average quality is very poor) if you don't have prior knowledge and … | |
Re: not compiler version, file format version. Java 6 has compiler version 1.6.x, file format version 50. Java 7 has compiler version 1.7.x, file format version 51. Java 8 has compiler version 1.8.x, file format version 52 (I think, don't have that one installed to check). A Java 6 compiled class … | |
Re: `cout << "you're morbidly obese!" << endl` There you go. | |
Re: as you're having a requirement for scalability, php becomes a poor choice (it's generally less (easily) scalable and maintainable than other technologies). Of course it all depends on how scalable it needs to be, both JEE and ASPx are designed for scaling into the near unlimited requests per second :) … | |
Re: well said, thread closed. | |
Re: yes, seems like the print statement is placed outside the method, which is illegal and generates a compiler error. | |
Re: hmm, I'd make some small changes to the User class as well. Declare the data fields to be final, and declare the constructor arguments to be final as well. If it were a realistic User you'd also not have a getPassword() method but a validatePassword(final Object candidate) method that simply … | |
Re: well, it is a valid email address, just not an existing one. That validator probably knew about a lot more address forms than just the (now) normal name@domain.tld form. E.g. Lotus Notes, Novell Netware, and many other network systems all had/have their own addressing systems and while now seeming archaic … | |
Re: you can access jars on remote systems IF you can add the location of the jars to the application classpath. Now to find a JVM that allows for classloading using UNC paths (Windows drive shares with an assigned letter would work fine, they're seen as local drives to software running … | |
Re: they'd better not try, or they'll have a fight on their hands. I'm not giving the place up that easily :) | |
Re: public class Grading { public static void main(String... args) { System.out.println("you fail!"); } } That's pretty much the standard grade for the typical homework question... In your case, right off the bat you fail to set "bigTemp" to the right number. Stopped looking there. | |
Re: might help if you tell us what the error is... | |
![]() | Re: and oh, make sure to do all that while you're not connected to any network, including the internet. Physically unplug network cables and turn off WiFi hotspots. |
Re: It is. In fact it's stereotypical and handing them any code at all is doing a great disservice to the entire profession. For anyone who does a few minutes of experimenting and reading these should be no problem at all to solve. | |
Re: good luck! | |
Re: A company were to set that requirement for "security" I'd hand back the assignment and tell them I won't be responsible for the inevitable breach of security. | |
Re: > database program for a school small and big, which i use c++ or java? what your teacher tells you to use. | |
Re: I think you missed the intent of your teacher which is for you yourself to come up with an idea rather than to just browse the internet and ask others to think for you. | |
![]() | Re: There's ample evidence that "gender specific toys" are far from evil, they're natural. As late as last year there was for example a study where newborns and toddlers were placed in a room and allowed to choose their own toys. Girls ended up choosing dolls, boys ended up choosing traditional … ![]() |
Re: and the library has major flaws in that it's very hard to use, and has no way to rapidly (if at all) convert to and from the old Date logic. It's simply Joda time bolted on to the core libraries, and just changing the package names and license statements in … | |
Re: seeing as the solution to the problem is contained in the official Sun tutorial, I wonder what the problem is :) | |
Re: however, 1.441 will AFAIK box to a Float, not a Double. 150 might box to a Byte. This is of course a specific problem here because of the use of hardcoded magic numbers rather than fields, and not having those magic numbers forced to a specific type. Forcing double through … | |
Re: Nothing wrong with Microsoft products, but don't stare blindly at any one product when building experience. If you want to switch jobs, and there's an offer open using something else that you wouldn't mind learning, jump on it and broaden your horizons. And there's always work for people who know … | |
Re: coders aren't the ones inventing business plans. There's a lot of ideas out there, problem is getting funding. You might have noticed the world's in a bit of an economic slump, which isn't helping to get investment capital for radical new business ideas. | |
Re: it won't be, he's just a spammer... | |
Re: Visual Studio has a lot of very useful features, but most only become useful in fairly large products with multiple developers working on it as a team, and of course a lot of things only come into play for specific types of applications like web applications. | |
Re: Today's prices for one representative type of modern RAM in a normal price store (so no stunt prices): 4GB 41 Euro 8GB 78 Euro 12GB 135 Euro 16GB 179 Euro 32GB 344 Euro 64GB 662 Euro As you see, it roughly doubles as the size doubles. This type doesn't come … | |
Re: making any assumption about equality between floating point numbers is a mistake. http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html read this for the nitty gritty details. To summarise: it's impossible to map a floating point number with exact precision, therefore all you'll ever get is an approximation. How good an approximation depends on hardware, operating system, … | |
![]() | Re: There is no "best". Therefore asking for "the best" is a by definition useless exercise. There might be something that's more appropriate for specific purposes in specific scenarios than something else, but you never tell us what your specific scenario is so again it's impossible to answer your question. Ruby … |
Re: hmm, a Smart is a Mercedes, technically (they own the brand...), not a BMW. Now a Mini, that is a BMW :) OP, there are a ton of introductory tutorials available on Java, I strongly suggest you work your way through at least the one's on Oracle's own site at … | |
Re: yes, you can do that but it takes up a lot of extra memory and CPU cycles as supposed to simply looping through the already existed and sorted array in reverse order. | |
Re: And even if you make something that contains no flaws of its own, it's going to be compiled by a compiler that might have flaws, run on a runtime that has flaws, which exists on an operating system with flaws that runs on hardware with flaws and is used by … | |
The End.