1,678 Posted Topics
Re: Well, this isn't really the correct forum for job advice, and furthermore, most of the members here are either from the US or the UK. | |
Re: Considering mods aren't ever bots, I think it'd be safe to write a quick script to let them do their job quickly. (It can't be that hard to write a check for the user's usergroup?) | |
Re: Yes, there is a problem, because these threads could potentially access/modify the data at 'unfortunate' times. For example, thread 1 modifies variable A to 2, then thread 2 immediately modifies A to 3 (as a simple but stupid example). Another possibility being that threads 1 and 2 are both using … | |
Re: Ok and? I think it's pretty obvious how java and mySQL can work together to put together a generic idea like a "project management system" that doesn't even have any specific guidelines. | |
Re: It makes sense that private variables wouldn't show up in a javadoc because only the class itself has access to private variables. So it is just not necessary. | |
Re: True enough, vega. I buy small hard drive sizes and I have a 1TB external and neither are ever anywhere close to full. | |
Re: This is one of the most - amusing? - threads in a while. | |
Re: Just use the drawString method to draw your words. g.drawString(parameters go here) [url]http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Graphics.html[/url] You can set the Graphics contexts' font and color and stuff before you draw the string, and it will draw in that font and color. At least so says the API if you read that link. | |
Re: Yeah, I got rated R too, but that quiz sucks. The options don't even make sense in half the questions because they don't cover every possible case. | |
Re: It'd be extremely helpful if you mentioned [I]how[/I] you want to split the Strings into substrings (e.g., do you want them to be split around spaces? Around a particular letter? Or what?) If you read the [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html"]String class documentation[/URL] you'll see a method called split() that takes a regular expression … | |
Re: [CODE]return (float)((x+y)/2.0); OR return ((float)(x+y))/2.0;[/CODE] | |
Re: You can't use == (or !=) to test for equality against Objects. You have to use the .equals() method. And your method is intended to return true if you successfully added the event to the calendar and false if adding the event to the calendar was not successful. Presumably, an … | |
Re: Let me get this straight before I dive into trying to help you. So you are displaying the String as "_ _ _ _" initially, where every second character is a space? Then once the user guesses a correct letter, you replace the String with it? (So like "_ _ … | |
Re: edit: nvm, comment I was responding to was in response to one post in particular | |
Re: Are we supposed to read your mind? What do you need help doing? | |
Re: Yes, it would work - you are correct. See [URL="http://cs.wellesley.edu/~cs230/spring07/lectures/lec19_bsts/lec19_bsts.pdf"]here[/URL] for definitions of predecessor and successor. | |
| |
Re: If an alternate approach helps at all: strstr in this case, since it returns "a pointer to the located string (or null ptr if it isn't found)" you can (hypothetically) read your entire file into an array, then use strstr to find the first occurrence of whatever you're searching for. … | |
Re: [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class ComboBoxFrame extends JFrame { /***/ private static final long serialVersionUID = 1L; private JComboBox b; private String s; private int x = 0; private JButton g[] = new JButton[10]; private ComboBoxFrame me; private String courses[] = { "Advanced Functions", "Calculus", "Chemistry", "Physics" … | |
Re: [url]http://www.daniweb.com/forums/thread235793.html[/url] You need to mark solved threads as solved - not to do so (and not even a thank you post)? is rude. [CODE]collections.sot(values); [/CODE] There is no sot method. Or collections class. It's Collections.sort(values). . the case is important. And you should only call Collections.sort() [I]after[/I] you add [I]all[/I] … | |
Re: I think you mean this: [url]http://www.j2ee.me/developer/technicalArticles/Programming/serialization/[/url] (And related articles about Java Object Serialization) | |
Re: [QUOTE=chandini.david;1035842] I can't figure this out!! I am using removeMouseListener right after a click is done (provided its the right person's turn)[/QUOTE] I would say that this is a logical error. It might work if done properly, but in my opinion, the proper way to do this would be to … | |
Re: You should switch to using a struct to represent your ticket class, destination, seat, and time. . All four of those things are obviously related data. You're only going to cause yourself headache trying to use a 4d array for this purpose, and using a 4d array like that doesn't … | |
Re: Because Strings are immutable, so every time you say string+= in the background, another String is being created and all of the contents are copied into memory. This process takes a lot of time once the String gets large. Use the StringBuilder class instead. P.S. I made that mistake on … | |
Re: Daniweb usually seems pretty fast to me. Well, fast enough, anyway. But I did get the same message the other day. . not complaining, I've been on forums that get them much more frequently. | |
![]() | Re: If by convert, you mean rewriting the code so that the original intention of the program is still there, then yes, you can do it. Usually. If it is just a text input/output program as opposed to a GUI program then you should be able to rewrite the program in … |
Re: Don't post questions in code snippets. Go read daniweb's rules. Specifically about which forums are appropriate to post in, what kind of questions are appropriate, and how to post a thread. | |
Re: You could use a Timer to help you draw your lines at specific intervals. You could also use Thread.sleep(), as you mentioned - if that isn't working there must be something wrong in your implementation. Can you post all of your (relevant) code, such as your repaint() method, everywhere you … | |
Re: I would make a guess and then try the substitution method. I'm not very good with recurrences though so use this advice at your own risk (of failure). But the guess I'd make first would take into consideration that for large n, n/2 + root n is controlled by n/2. … | |
Re: By bit operation I think he literally means an operation that [I]directly[/I] operates on/manipulates bits. Although the only way I see to do this is to set aside an array of that many bits (via creating an array of 4 integers, which are 32 bits each in Java), then by … | |
Re: Duplicate local variable 'target' means exactly what it says - you have the same variable declared twice in the same method, which is not allowed. In your method header you have "ArrayList AccountList, String target" but then below, you said "int target" which is attempting to re-declare the variable target. … | |
Re: [QUOTE=StarZ;1035938]I'm supposed to merge a ordered data of two files into a third file, keeping the data in order. I'm suppose to create a MergeFiles application that merges the integers ordered from low to high in two files into a third file, keeping the order from low to high. Then … | |
Re: They just gave you a more than sufficient reply. If you don't understand the reply either go study about for loops and arrays, or ask a specific question if there is something you don't understand. We can't read your mind. | |
Re: Again, refer to javaaddict's post for more information on why nobody is helping you. | |
Re: Rugby is definitely a simpler game than American football. It has fewer rules and fewer plays (in terms of coaching) and fewer formations. How could such a game not be simpler? | |
Re: It seems like you have three Strings, firstName, middleName, and lastName. If that is the case, use [CODE]String initials = firstName.charAt(0) + middleName.charAt(0) + lastName.charAt(0);[/CODE] instead of the substring method you're using. | |
Re: You should probably actually write a helper method to do this. The helper method would figure out all of the numbers that divide perfectly into a given integer. It would return an ArrayList/array of these results. Then your other method add these numbers together to see if the Integer was … | |
Re: [url]http://www.coders2020.com/can-we-do-a-binary-search-on-a-linked-list[/url] | |
Re: All I can say to this whole post is hahahahah Because I find your choice of forums to post this on incredibly inappropriate and funny | |
Re: I'd agree that using netbeans would be helpful, but which editor he uses is ultimately up to him. Seems strange to me to respond that you found errors but not to bother mentioning any though. edit: sorry Also, OP, I don't have any advice to really offer you right now, … | |
Re: [QUOTE=COKEDUDE;1019184]I really don't understand what you are saying. How would I initialize "phrase" if i put [CODE]while (!phrase.equals("quit")) {[/CODE] so soon? I'm really new with java so please be kind to me.[/QUOTE] Phrase [I]is[/I] initialized in the code that you posted. It is initialized to "", which is the empty … | |
Re: Spanking is fine. If you want to be really technical and define a spank that is fine, anything that does not leave a bruise is ok by me. | |
Re: Post in a regular thread. This is a code snippet which is not used for posting questions. And next time post with code=Java tags | |
Re: I hear the terms used interchangeably, they have no difference in meaning to me except that geek seems a little stronger since nerd is used more often. A nerd could also be anyone I suppose, whereas a geek is typically someone whose hobbies & life 100% revolves around geeky/nerdy activities. … | |
Re: You'll definitely find this community a pretty nice place, good to have you here, and hopefully you'll enjoy it. But you can expect the occasional jab also when you post threads in the wrong forums, :) | |
Re: Considering that you just said you will be receiving a struct, as long as you know the format of the struct, you can use an array of structs to handle your message queue. This link describes how to create/use arrays of structs. [url]http://www.asic-world.com/scripting/structs_c.html[/url] As for the threading question, you would … | |
Re: If you want to find a specific word from within a file, another way to do it would be to use Scanner's next() method, then use String.equals to see if they match. | |
Re: Post in code=java tags. And post what error you're getting, we can't really do mind reading. |
The End.