2,040 Posted Topics
Re: If you look closely, there are a couple things in your code that are off. 1) Start from looking at line 60, what are you doing there? What is the consequence of doing that? 2) Look at how you use the loop to display your array value at line 53. … | |
Re: If you are looking for uploading from a command line with FTP, you can check FTPClient class from apache (org.apache.commons.net.ftp.FTPClient) for uploading. Remember that it reads only ASCII file type. If you want a web interface, JSP is also a way to go. | |
Re: You are confusing between front-end and back-end unless you are thinking about Java applet. Still, I think this forum is for Java core, not for a website unless (again) you are talking about the back-end algorithm. To answer your question, yes you can do JSPs for the front-end (display) of … | |
Re: Stop reviving old thread! Look at the last date posted before replying. Also, your code is not completed + not in a code tag! | |
Re: So the value in the middle of each line will be 2^(n-1)? What is the maximum you accept for the value of n? Because the n will be used to determine the height of the pyramid. Also, the value in the middle could have different length. How would you deal … | |
Re: ... Reply to your own thread instead of create a new one... Try the code below... Not sure if it is working because I didn't test. [CODE] import javax.swing.*; import java.awt.*; public class Ejer1 { public static void main(String [] args){ JTextArea jt = new JTextArea(); jt.setText("Set it this way"); … | |
Re: If you have specified a class for the element, you could simply do it as... [CODE] .myclass { color: black; } .myclass a:link { color: black; } .myclass a:hover { color: black; } .myclass a:active { color: black; } .myclass a:visited { color: black; } [/CODE] It is depending on … | |
Re: The implementation is tricky depending on how you want it to be. Do you have to implement the tree using only one ArrayList? Are you allowed to implement your own class to act as a tree node/leaf? Is there any constraints to the ArrayList you can make (i.e. limitation of … | |
Re: It is not really. What you need now is to get the width & height of the applet window every time right before you draw those ovals. The only relative X, Y position that may need to be added is when the size of applet is very close to your … | |
Re: Can you retrieve each image frame from the video? That's the first thing you need to do. After you can obtain each image frame, there are many ways to do the object detection in an image. However, there are many factors you may need to restrict your detection rules. How … | |
Re: You are passing a NULL value [icode]node *x=NULL;[/icode] to the insert() function. Then in your insert() function, you attempt to access "next" from the NULL pointer? That's the problem. They are all NULL. Do you have to pass in a node pointer to the insert() function? Is that one of … | |
Re: What you are doing is fine if you call the function only once. There are a couple things to be modified though... [CODE] function squareCube(selectRowNum, selectPower) { var rowNumber=10; // default is 10 var powNumber=3; // default power is 3 // if the value is a number and greater than … | |
Re: How do you want to validate the content? Do you want to validate on submission? Do you want to validate each of them while data is being entered? Or do you want to validate after the content in each box is changed? Please be more specific when you ask a … | |
Re: Old thread... It's annoying to see old thread gets revived for nothing... Also, I usually use setTimeout() function to deal with sleep/wait anyway. | |
Re: If you are asking for an algorithm, Knuth-Morris-Pratt algorithm is a good algorithm to search a substring in another string ([URL="http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm"]http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm[/URL]). You can search for other algorithm as well, but this algorithm is very easy to understand to me. | |
Re: You gave only fragment of codes with no comment. Anyway, after looking at your code, I have some unclear points with your code. 1)Why do you start your weight queue in descending order? Don't you need to do it in ascending order? 2)I am not sure why you need only … | |
Re: Huh? You already have the method to call for the total time for service in your Register class. What you need is to implement it by iterating through all of the customer in its own line, add all the customer's service time - getServiceTime() - and return the total value. … | |
Re: If you want an offer only once, you need the server side database. Cookies can be tampered and/or delete. You will be offering special price all the time if you use cookies. ![]() | |
Re: A few comment on your condition check... [CODE]if (strings[1] != stan && new File(files[1]).exists())[/CODE] What are "strings[1]" and "stan"? Are they String? If so, you should not use "!=" to compare but equals() method instead (as strings[1].equals(stan)). Also, what is in "files[1]"? Is it a file name or is it … | |
Re: The script replaces the original link of anchor tag ('new_file.htm') with movie link. If Javascript is off, the script will not replace the link -- the original link is used. | |
Re: I guess your set up for project properties is not correct. Look at these 2 posts from other forum [URL="http://www.velocityreviews.com/forums/t141385-how-to-create-executable-jar-in-netbeans-ide.html"]http://www.velocityreviews.com/forums/t141385-how-to-create-executable-jar-in-netbeans-ide.html[/URL] and [URL="http://forums.netbeans.org/topic12864.html&highlight="]http://forums.netbeans.org/topic12864.html&highlight=[/URL]. You may see your mistake? | |
Re: When you are talking about "slow" computer, what is the specification for that? Java also relies on memory (for JVM). So if you are talking about 486 with 66 MHz and 32 MB of RAM (I still have it tuck away in my attic :(), then it is still OK … | |
Re: How about adding z-index style to your menu? | |
Re: 1)Define a function with similar structure as your "main()" method, but the return value is "double" instead of "int" and the arguments in the parenthesis must match the incoming type of Amount, Rate, and Year. 2)Copy the whole part where you make the mark and put them inside the newly … | |
Re: In my opinion, it should be BigTheta(n^2) still. If we take a look at the average case time complexity equation, it becomes (n^2+n)/2. The upper bound is O(n^2) for sure and the lower bound is BigOmega(n). If you are talking about Big Theta of an average case, the value which … | |
Re: I don't know what "else" you are talking about. Please post the content instead of link to a file... Also, do not expect that people here will do it for you. You need to show your afford and your code first. | |
Re: In firefox, you may need...[CODE]document.getElementById('elm2').style.height = 600+"px"[/CODE] But that could break IE8 and below... So you may need to check for what browser it is being viewed from. | |
Re: The first function gives you more flexibility and ease in calling and passing variables. The second is an inline which has more control but at the same time is more difficult to construct especially when you need to pass in variables. It is good to use the call as a … | |
Re: You could use screen.width & screen.height to check for resolution. However, this doesn't mean the size of window of the browser, but the whole screen size. | |
Re: You can try this oracle link [URL="http://download.oracle.com/javase/1,5.0/docs/guide/plugin/developer_guide/using_tags.html"]http://download.oracle.com/javase/1,5.0/docs/guide/plugin/developer_guide/using_tags.html[/URL]. |
The End.