2,040 Posted Topics
Re: If you are getting the Blue Screen of Death, I don't think that Codeacademy is as buggy as you think. It is your OS that causes the problem. You may need to wipe out and reinstall your computer. The reason is that your computer may not be as clean as … | |
Re: HTML is not a code but it is a Mark-up language. Anyway, you need to add *style* to your box (div) elements. You could use CSS to help with your style. To add style property, simply add it to your element tag. To arrange the layout you are asking for, … | |
Re: James, do you know that the link of JavaScript forum (or anything that are in the same web-development category) is broken? I am not sure if it is from the server URL-rewriting or something else... That may be the reason why this person posted here. Anyway, to answer to the … | |
Re: The issue you are having is from the order you add components to your panel. You add a label between those 2 text field, so the next tab after your focused text field (from country) would be the label of code, and then the next is the text field of … | |
Re: There are a couple IDEs that are very simple, so it won't be too overwhelming for beginners (and I like to code w/o relying on a belt & whistle IDE either). One is [JGrasp](www.jgrasp.org/) which is quite good. Another one is [TextPad](www.textpad.com/) which is supposed to be a text-editor program … | |
Re: How about read [this](http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=458&get_params=p_track_id:JSE6Prog) before you come back to ask again? The link should at least give you some idea... | |
Re: What you need to do are obvious and stated in the CharRemover class. 1)You need to declare local variables for the class. In this case, you need at least one variable type *char* which will hold the incoming value from the constructor. 2)You need to implement a method *modifyText()* that … | |
Re: For #3, I think it is about meaning of words. I feel that *implements* is actually just a syntax for Interface and *extends* is for abstract. However, the language attempts to involve its meaning to the program language. I am not from a native English speaking country, so both words … | |
Re: Do your anagram words need to have meaning in dictionary? Anyway, yes you need to work with the string as a char. You could do a brute-force way using permutation. For example, a given string is '123'. When you look for permutation of any length, you would get '1', '2', … | |
Re: Your requirement is still unclear to me. 1)Are process A and B running concurrently? 2)If I understand correctly, the job for process A is to create folders and for process B is to create & insert files? 3)If that's the case for #2, do you have another class that tie … | |
Re: An idea for your solution... How about sort your array and then take values from the first (for ascending order) 5 indices from the sorted version? | |
Re: Where is your algorithm? It doesn't look right at all... You should push operand to your stack right away when you see it. Instead, you are printing it and attempt to push operator to your stack. That's odd... | |
Re: Let all balls loose inside a closed container at once. Then you will see balls collide one another? =) Anyway, what are you trying to do? Do you want a *REAL* collision or just an estimate (or rectangular) collision? The real collision detection needs to know the center of both … | |
Re: 1)The thread is 3 years old. 2)The thread is asking for simple number sorting. You are making it so comlicated with AffineTransform. It is unnecessary complicated. 3)Did you implement the Quick sort algorithm because you said "Try **my** quick sort algorithm" instead of "Try my quick sort algorithm implementation." 4)There … | |
Re: To make it simplier, look at this [images](http://www.google.com/search?q=complete+binary+tree&hl=en&tbo=u&tbm=isch&source=univ&sa=X&ei=OWjLUPKpDIH28wT95YGoCg&sqi=2&ved=0CD4QsAQ&biw=1003&bih=857) from Google. | |
Re: And if the list is null, create a new list with the incoming node data. If you don't find the specified ID in the list, insert it at the end of the list. | |
Re: This forum is not to give out solution but rather teach those who ask... PS: You should also follow the Java naming convension. The *Size* should be named as *size* because it is a method, not a class name. | |
Re: 1)What kind of file you split in your code? 2)Did you verify that the splitting part is correct? (i.e. the content of each file is the same as the original file) 3)I am not sure whether the EOF is included in the file size. In other words, only 1 EOF … | |
Re: Don't have time right now... Will try to take a look at it tomorrow... PS: I usually do not go through posts that past the first page. Sometimes I would go through on 2nd or 3rd page but that's it. If your post is bumped down way too far, I … | |
Re: Do you want each path from each node to the sink node to be different color? If so, you will need to reconstruct the path to get back to the sink node. If not, you imply ignore the hop value and draw only the line from itself to its parent … | |
Re: The timer is the client side which could be implemented using JavaScript. The problem is that JavaScript can be manipulated by the client side. Therefore, it is not a good idea to do so when your application required some securities like this. Anyway, you should not force clients to submit … | |
Re: When you get "*illegal start of expression*" error, it can be from many reasons. Even though it could be missing semi-colon from the previous line, often time the reason is from mismatch of curly bracket (*{* and *}*) or parenthesis (*(* and *)*) pair from lines above the error line. … | |
Re: Not sure what you mean. Please elaborate what you want to do? Give a sample code or input/output would be better. | |
Re: Just a quick google and found [this](http://www.vogella.com/articles/JavaExcel/article.html). Maybe it gives you some idea? | |
Re: Line 17, did you initiate duration again somewhere in your code? It is initially instantiated as 0 length int array? Also, why there are *x* variables which give no meaning? Then you use it again as *Event* class object in action listener... Then Lines 29-31, you rely on auto-boxing between … | |
Re: If you do some Google, you should see many links explain how to. For example, [this](http://www.thegeekstuff.com/2008/06/perform-ssh-and-scp-without-entering-password-on-openssh/) and [this](https://blogs.oracle.com/jkini/entry/how_to_scp_scp_and) may be something you can start with... | |
Re: I will show you a simple way to do using style, CSS, and (inline) Javascript. Below is a script changing color of 2 boxes using javascript but in a different way -- one is accessing 'style' property of the element and the other is to change its CSS class. <html> … | |
Re: Think about it as an array index (with 0-index). /* There are 11 indices in your hash locations. Each index is determined by the result after mod. Hashing 4371 i = 4371 % 11 = 4 +---+ | 0 | +---+ | 1 | +---+ | 2 | +---+ | … | |
Re: To add what *stultuske* suggested, your flow is a bit intuitive. What you should do could be as follows. 1)In your constructor, you need to read data from a file, map & count each word, and store the treemap data which is a class variable. 2)Go into a loop asking … | |
Re: As *rubberman* said, yes it is recursive. If you ask whether it is correct, I would say no. Have you tested it? If a string "1234" goes in, what would be your result? If a string "1234567890123" goes in, what would be your result? | |
Re: Before you attempt to implement, you need to formulate how your input and output data structure for the problem are going to be. The TSP problem itself is not too difficult to understand. You, however, need to be able to relate the problem with your search algorithm. I cannot really … | |
Re: The first problem I see here is that you use *split()* method from String class to obtain tokens. This is causing the bug you are having right now. If you look at your regex, you will see that the split() will consume the leading negative sign. I would suggest you … | |
Re: Does your class which is going to be imported belong to a package? If so, you need to use *import* in order to use the class. If it does not, you simply place the class's .java or .class file in the same folder of the caller class file. | |
Re: I am confused myself too. It seems that you ask for one thing but your requirement asks for another??? >HOW to make a series of numbers in reverse orDer In java Doesn't it mean revert a number (i.e. 12345 --> 54321)? > Will identify weather input is binary or decimal … | |
Re: Huh? Are you sure you are talking about ruby? | |
Re: Hmm... I guess you could start with this [tutorial](http://www.dzone.com/tutorials/java/struts-2/struts-2-tutorial/struts-2-tutorial.html), and then some of this [tutorial](http://www.mkyong.com/tutorials/struts-2-tutorials/) might help as well. If you want more tutorial, [this one](http://www.roseindia.net/struts/struts2/) looks OK as well. | |
Re: Hmm... You are using a library which is not a standard library? You may need to look at [JFreeChart](http://www.jfree.org/jfreechart/) site for any information. I am sorry that I cannot help you because I don't use the library. | |
Re: The way the code do the tokenizing is really bad. The code is a brute-force which is not too bad, but the way it is implemented is. I believe this code is from someone who is a student (and I hope so) who is quite new to Java. When you … | |
Re: There is no such security in JavaScript. Even if you prevent every single click from mouse or keyboard, one can get your source either via blocking JavaScript or obtaining HTTP raw data (not render on a web browser). Even though there is no way to prevent copying, you still have … | |
Re: You could use a String or StringBuffer class. If you use String, it would be simplier to check whether the incoming array is null or empty. If it is, return an empty string. Otherwise, initialise the value with the first element of the array. Then go through a loop starting … | |
Re: What do you mean by flipping? Do you mean rotating the polygon or mirroring it? If you know the center of the outter polygon, you could use the point for transform process for the inner polygon. Then rotate/mirror it the same way you did with the outter polygon. Does that … | |
Re: You created/initiated a class instance but did not associate it with input values you got from a user. As a result, it uses its initial values (primitive data type is set to 0 when you declare a variable with the data type). There are many ways to solve your problem. … | |
Re: The code is so lengthy, redundant, and overwhelming. You copy and paste a whole code section to do 1st, 2nd, and 3rd time instead of pulling the whole chunk that you are going to reuse into another method. Your variable naming is so bad that I cannot follow it even … | |
Re: You instantiate an instance from Kreis class. Later on, you attempt to access its member variable *farbe* which may be null. How is your Kreis class implemented? Kaestchen1 [3][3]=new Kreis("schwarz", 90, 150, 150); | |
Re: Huh? I am not sure about your question. I don't think a servlet uses socket connection but rather has a listener on a port. I think a HTTP request from a web browser gets through layers of Internet architecture, and the servlet picks up. Then it sends back through the … | |
Re: The method nextInt(A_NUMBER) of Random class will return a number between 0 up to A_NUMBER inclusive. It could be written in mathematic notation as [0, A_NUMBER). If you are going to pick a random value from 1 to 10, you simply need a random number of 0~9 and add 1. … | |
Re: It is 6 years old thread!!! Anyway, to answer why the JavaScript does not really fit to this task because it is pointless. If you are going to expose all of your CSS file names, why bother putting them in an array and random pick one to add to your … | |
Re: If you carefully read *stultuske* reply, you should know that the symbol *//* is the starting comment. Then you have a new line on *Here I add...* which should immediately follow the symbol, not in another line (has a new line). Because of that, the *Here i...* is the illegal … | |
Re: One way to convert an integer to String is to use Integer.toString(A_NUMBER). The static method will return a string of the number. Please read more on [Integer API](http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html). | |
Re: Then you may simply create 3 arrays for each set? That's the easiest way to store all values first, then display all of them at the same time later. |
The End.