2,040 Posted Topics
Re: ??? Are you doing GUI? Or are you displaying out on a console??? Also, you need to implement as well, not just a skeleton like this with nothing to help understanding at all... | |
Re: One problem to keep in mind, using JavaScript to decide a value is bad because anyone can manipulate the outcome of the random value. However, using JavaScript to display the wheel and the value decided from the server is fine. | |
Re: You may want to read [URL="http://web-design.lovetoknow.com/Javascript_PDF_Viewer"]http://web-design.lovetoknow.com/Javascript_PDF_Viewer[/URL] for possibility of using JavaScript to view a PDF file. | |
Re: The problem is that you use "numNeighbors" variable as the class's variable, and then you do not reset the value each time in the loop. As a result, the number keep increasing... What you need to do is to reset the numNeighbors variable to 0 right before you check for … | |
Re: One way to do is to keep dividing it by 10 until you get to the digit number you want? | |
Re: This computation is awkward... Also, the way you learn how to use JavaScript is actually interfering with how to create a web page. It will ruin how you design a web page... Anyway, I have changed certain things and give you a skeleton of what you need because I cannot … | |
Re: Code tag please ... Also, a homework is supposed to be given a long time ago. Please don't tell me that you didn't wait until today to do it... Anyway, you didn't compute your DiscountSales value before you display it. Isn't it supposed to be DiscountSales = Units*Price*Rate; ?? Also, … | |
Re: Err... read: # <-- a number? then read: base <-- you mean base number, such as 2 (binary), 8 (octa), etc.??? print: decimal representation <-- you mean base 10 number??? If so, you should start with write down a step-by-step of what you would do when you want to create … | |
Re: Is that the same as this [url]http://www.stanford.edu/class/cme305/Assignments/pmidtermIsoln.pdf[/url] ? It already has the solution in it... | |
Re: Do your array variables global? If you declare them as global (inside script tag but outside all functions), you can use it anyway you want. One way to do it without changing your original data structure is as follows: [CODE] var arrA=new Array("fox.com","nbc.com","abc.com", "google.com"); var arrB=new Array("car","bike","boat", "plane"); var arrC=new … | |
Re: The problem may not be the event firing from "onmouseover" event listener, but it could be from certain commands in the script itself where IE and Chrome do not support. You know that when an error from JavaScript occurs while a page is rendering, the script will stop and nothing … | |
Re: Next time please use the code tag around your code. It is very difficult to read without it. :( When you are talking about writeLetter(), does it mean that the method will display only 1 letter at a time? If so, what you are doing inside the method is incorrect … | |
Re: @ajaxx195 Actually the code sets the size of array to 1. [code] double[] numbers = {0}; // means numbers is now [0] [/code] The problem is that using array with [] is a static size array. The array size cannot be changed during the program unless you redeclare it... In … | |
Re: To me, it sounds possible; however, it depends on how you hide your data and how you retrieve it. Though, it is likely impossible to guarantee that a modified image would retain the exactly the same data you can retrieve from. The reason is that you cannot predict or assume … | |
Re: I think you should change your question. The thing is that JS can do what you want, but should you do it? It depends on how you design a page and how you use it. It may be suitable for one case but may not be on the other. In … | |
Re: Hmm... Does the Cell object ever move its location? From what you said, you could simply check the Cell at board[x][y]. What it means is that the value inside the array is the "Cell" object itself. Therefore calling board[x][y].getLive() would return the value of Cell itself. | |
Re: Next time, please copy & paste whatever compiler complains or error you got after running. Saying that you have trouble doing it doesn't really help anyone to understand your problem. Many of us do not have time to go through your code and look for error. Anyway, get back to … | |
Re: The error said that your object does not have childNodes to be called. In your code line 30, 34, 38, 42, and 46, they all try to call this childNodes. You didn't check for existent of the children, so it throws an error when there is no child node at … | |
Re: I think you are going on a wrong way when you debug a program. What you should do are... 1)Compile it and see what the 3 bugs are (from the URL comment on the top), and fix them first. This mean, they are compile errors which are not difficult to … | |
Re: Hmm.... should this => if (length >= 0 || length <= 20.0) be => if (length>=0 && lenght<=20.0) ?? You are getting "true" with any value using the current condition in your if statement. Also, do you really need a deconstructor??? I don't see that you use any pointer (memory … | |
Re: You can convert the string to integer by... [CODE] alert('The sum :'+parseInt(num1,10)+parseInt(num2,10)); [/CODE] | |
Re: scanner.next() return only 1 character each time. You should use nextLine() instead. Oh wait... Is that what you want though? If not, you need to loop through instead of doing like that. The problem is that if the line you are calling has only 3 characters, the last one will … | |
Re: You could do it if you know the value of x & y. [CODE] int x=0, y=0; int[][] myArray; // just declare the variable but not initiate it yet // some code before you create the 2D array // you could change values of x & y along the way … | |
Re: Could you post any related code (while loop, call, display, etc)? | |
Re: I think so. Maybe he wants to use the variable in PHP as well. I believe, you can concatenate the variable to the string in the echo in order to pass the variable value to the new window. | |
Re: It depends on how you accept the answer? Assume that spelling of all combined words is correct and the number of words coming in are the same. For example, the answer is 'body,hips,knees' 1)The incoming string must not be 'bidy,hips,knees' or 'body,hips,knee' or etc. 2)The incoming string must not be … | |
Re: The reason is that you are passing the URL which is the whole page to the view-source. As a result, what you see is the whole page regardless you place and click the button anywhere on the page. I have an idea but need to test it before I show … | |
Re: Old thread... Please create a new post for this. This is different issue even though it looks similar. The original thread was talking purely on JavaScript... | |
Re: An easy way to check is using regular expression. Though it is not really a complete validation for email. [CODE] if (email.match(/@/)) { return true } [/CODE] What you may want is to complete the regular expression for an email. However, it is difficult to create a really complete one … | |
Re: What OS are you using? You could google for the answer using keywords "how to load fonts" but you need to specify what OS you use. If it is Windows, there are different ways to do with different Windows version... | |
Re: Are you talking about whether or not the library use an algorithm that optimized its performance for all their functions? | |
Re: There is no such a NPE (NullPointerException) on primitive type variable. In this case, you are talking about number, number1, and number2 variables. Anyway, line 17 is calling a different method which is not line 22. Look closely how you declare the method. | |
Re: I'm not familiar with JQuery. Though, you can use Div inside TD without a problem. Do you have FF browser? If so, install firebug and look at your rendered code to see whether or not the page is rendered correctly. | |
Re: Do you want to make it dynamic in JavaScript or in PHP? They are different... | |
Re: Nope. Killing a request or process cannot be done via JavaScript. Also, you should not try to kill a process which is being processed on the server side. The only thing to terminate a process is to let it timeout. Once a request sent by client is out from the … | |
Re: Before going further, I need to clarify something. The word method in Java is the same as function in C or C++. [QUOTE] 1- these are lines that i did not understand it. <could any one explain> a. private static DataInputStream k = new DataInputStream(System.in); //what is DataInputStream [/quote] The … | |
Re: I may need to look into your function definition. Only HTML part won't give anything because normally all browsers would use the same syntax to call script functions (and that means your HTML part won't show anything). | |
Re: You seem to use variable "y" all over the place. Even though it is not crashed with each other, it is very unclear when you read the program. [CODE] // what is "y" here? EasterSunday easter = new EasterSunday(y); ... ... // why are you declaring another "y" here? int … | |
Re: Scanner class is fine if you accept it as a String using nextLine(). Because you accept it as a string, you can check whether or not the string can be parsed as integer or any type matched your LinkedList node object. If it cannot be matched, reject the input and … | |
Re: I got an error in your main.js file at line 425 saying a is null [CODE] function yf(a){for(var b;b=a.firstChild;)Eg(b),a.removeChild(b)} [/CODE] Don't know how you call the function... | |
Re: To answer your first question, the "notice board" is still there, but it is hidden. The problem is not from your page but from the current browser set up. If a user has changed certain configuration especially font size display, the size of your menu will become too large to … | |
Re: Hmm... Do you know what flowchart is? What in the flowchart you are asking to do is the step-by-step of the flow starting from calling a method until it ends or returns. By the way, no one would be able to guess what ConverterMenu1 class looks like but you. And … | |
Re: The problem is that you didn't do it in a string way. :) [CODE] window.setTimeout("move(" +obj.id[COLOR="Red"]+","+[/COLOR]obj2.id+ ");",10); [/CODE] | |
Re: Is that a requirement to implement the insert() function as recursive??? Why not implement it in iterative format which is much more robust? Anyway, you do not have a structure of a tree Node, but you have variables of pointers... They are not a Node if they are separated variables … | |
Re: Hmm... Your code at line 8, I think your loop syntax is incorrect. To access each item in an array, you need... [CODE] for (int i=0; i<data.length; i++) { } [/CODE] I assume that "data" is the class's variable. What do you want to do with method1() and method2() by … | |
Re: You could chain it using javascript calls as ddymacek, or you could do it on the server side. I prefer calling the info from the server side because it is being transferred once. What you need to do on your client side is to know how to break the response … | |
Re: Hmm... There are many places you need to update in your code. I will start with "main" method first. In main() method: 1.You declared [b]K[/b] but I don't see you use it anywhere? What criteria are you going to use? 2.In line 117, 122, and 125, you are [b]assigning[/b] the … | |
Re: Which platform are you talking about? Is it Linux? If so, which distro? | |
Re: GUI is just a shell wrapping around your real work. In other words, it is more like a presentation. If you have done any program that displays results on monitor, you can add GUI to it, such as replace how you enter inputs or display the output. | |
Re: What does makeChange() method do??? Currently, what it does is to reset the "balance" variable to 0 and return 0. Nothing else? [CODE] public int makeChange() { int change = balance; // copy balance value to "change" local variable balance = 0; // reset balance to 0 return balance; // … |
The End.