2,040 Posted Topics
Re: Do you have your back-end implemented? If so, what technology are you using? Just return a plain HTML portion or use PHP? Also, how do you construct the display of all 10 posts? | |
Re: Is this "5*1*2*3*4" a requirement? I think doing 5*4*3*2*1 is much easier. Or better yet, do 5*4*3*2. The result is exactly the same and you should see how a loop works better. :) You need to modify your loop and its content inside. By the way, you know that you … | |
Re: You are calling default "toString()" method of "Point" class in your toString() method. [CODE]return "Vertex A is " + vertexA.toString();[/CODE] If you want your own format, you must not use the toString() of Point class. You can simply format it whatever way you want. i.e. vertexA.x for "x" value. | |
Re: Here you are [URL="http://www.google.com/#sclient=psy-ab&hl=en&source=hp&q=java+socket+programming&pbx=1&oq=java+socket+programming&aq=f&aqi=g4&aql=&gs_sm=e&gs_upl=624l5122l0l5133l29l14l3l1l1l1l443l3249l0.5.6.1.1l16l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=b211db0a3841d58f&biw=988&bih=831"]http://www.google.com/#sclient=psy-ab&hl=en&source=hp&q=java+socket+programming&pbx=1&oq=java+socket+programming&aq=f&aqi=g4&aql=&gs_sm=e&gs_upl=624l5122l0l5133l29l14l3l1l1l1l443l3249l0.5.6.1.1l16l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=b211db0a3841d58f&biw=988&bih=831[/URL]. | |
Re: I thought you need only 2 nested loops for each problem but each has a different initial value. :P ![]() | |
Re: You declared function as [code]public static int minNoCoins(int m,int []C)[/code] but you are calling it as [code]minNoCoins(m-C[2])+1;[/code] You are passing in only an "int" variable but no "int[]" array. | |
Re: Why do we need to laugh at your code??? Anyway, you are on the right track using matches functionality. Though, your regExs aren't quite there yet. Also, you should rearrange the check because certain condition could be checked before others. [code] //E: Must be at least one character (which is … | |
Re: You may read this post [URL="http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/385613"]http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/385613[/URL] and just look at how he controls the keyboard event. You need to modify the part where the key code is being checked. That should do it. | |
Re: You could use document.getElementsByClassName(nameOfClassName) on Firefox. However, I doubt that you want your web page to work only on Firefox. What you can do is to go through each elements by yourself. [CODE] function myGetElementsByClassName(tagname, classname) { var elems = document.getElementsByTagName(tagname) var results = new Array() if (elems.length>0 && classname) … | |
Re: What you need to do will be separated into 2 parts - find the first divisible number and a loop which is increment by X up to the max. The second part is easy and you should be able to do it. Now we need to talk about the first … ![]() | |
Re: What does it mean by "blank key"? The array type you need must be dynamic - change in size whenever an insert occurs (and may be remove). And can the value inside the array be an Object or just a plain value? | |
Re: Great to hear that you learn something new. But you should also know the limitation of this code as well. Also, this code could be susceptible to XSS attack. | |
Re: If you want the time zone, use getTimezoneOffset() to obtain the number of minutes difference. Then you just manipulate with your current local datetime? You can google for getTimezoneOffset() and javascript to see how it is used. | |
Re: Any technology is fine. It depends on how read the data and how you present your output. Each technology has its own advantages and disadvantages... | |
Re: My first guess that I would look to is how the agent learn a pattern. This also involves how you read data of each letter. When you said "change one of the pixel," it means nothing to anyone because no one knows how a letter data represent but you. Anyway, … | |
Re: If the image is in the same folder as Java file, the "/new/dice1.jpg" should be only "dice1.jpg"? Because the getResource() couldn't find the file, it returns an NPE. Also, be sure that the file name is case sensitive - exact case. | |
Re: Hmm... So many unknown function calls! Anyway, when an external link error occurs, you need to check if the libraries you include in your program are installed correctly. I don't know about your "algorithm" library. Also, the line [CODE] int formula3[2]; ... ... float Other_Slope_intercept_formula( float *formula3, float *formula4); [/CODE] … | |
Re: What is your current output? Could you copy & paste so it would be easier to pin point the problem. By the way in your Main class line 20~34, this is a dangerous habit to do that using hasNext() or hasMoreTokens() iterator. The reason is that you assume that the … | |
Re: You declared "private int monthNumber;" but you are using "monthNumb"??? | |
Re: You could try "swing" library on oracle website - [URL="http://download.oracle.com/javase/tutorial/uiswing/"]http://download.oracle.com/javase/tutorial/uiswing/[/URL] - for GUI. | |
Re: Looks like the ch.get(ch) takes each of your input character in and execute them one by one. As a result, each character is being checked in the loop. | |
Re: I'm sorry for you because of your instructor... I know that this course wouldn't teach you much because of her laziness... Also, many error prone techniques used in the class... Let's get back to square one. There are 2 major problems I am seeing right now. One is that your … | |
Re: The error you got and posted from Eclipse is garbage for debugging. You can't debug with that. Anyway, your ListNode class is fine. There are problems with your List class. There is questionable for one of your requirement in the "insertItem()" method. Should the insertion occurs after the "head" node … | |
Re: I told you before and warned you about creating 2D array with different length... Because of the odd way of creating 2D array, you cannot simply use the for-loop that way to retrieve the value from the array you created... And that's why I didn't show you how to access … | |
Re: Because the class "Timer" constructor prototype doesn't have the type you are declaring. Where is your Timer class? And what are its constructors? [CODE] // do you have this type of constructor in your Timer class? public Timer(int anInt, Morning aMonringObj) { ... } [/CODE] | |
Re: In C++, the string checking with == or != is case sensitive. In line 50, it will be true if and only if "answer" is not equal to 'N'. If you enter 'n', it will still loop because answer!='N'. If you want it to be case in-sensitive, you should do... … | |
Re: The hardest part is to find a way to implement it in non-recursive (iterative) unless you already know what to do. OK, when you implement a recursive, you always have to figure out what the "base case" is. A recursive function always tests for the value that cannot be used … | |
Re: Sounds like a rendering problem. Not sure how different the class and the other class you use are... Also, don't know how you use it in both of them??? | |
Re: Jeeze, this question is very familiar =)) | |
Re: Hmm.. I have no problem calling "order()" function in your script? Are you sure that your .js file is in the same folder as your .html file? Also, what browser are you using? There are a couple script errors I see so far is [CODE]var test= False;[/CODE] The "False" is … | |
Re: How about you need to read books? You are taught in class or have text books for that. The assignment is to make you [b]think and understand[/b] each technique of software development life cycle. I am sorry, I can't give you an easy way out because you won't learn anything … | |
Re: Copy your line 31~32 to below line 82. You forget to keep accepting the value from user after you used the value (phrase). | |
Re: In line 18, you have too many double quotation? [CODE]if(line.equals(""BASEBALL"))[/CODE] | |
Re: OK. The problem is the way a browser fires "onblur" event. In this case, you use "onblur" on both First and Last field name. When a user skips entering the first name and presses "tab" button, the "onblur" event from the first name field is fired. Because in your validate … | |
Re: Hmm... How about using "char" array of size 10^6? A char is size of byte which should be more than enough to hold that many digits? | |
Re: Line 11, using Math.random() is dangerous because of the type casting. Use nextInt() of Random class instead. [CODE] Random r = new Random(); int B = 200+r.nextInt(1000); // between 200~1200 [/CODE] You forget to give a random value to your a[0] before you go inside the loop. Also, your line … | |
Re: Depends on how you want to do it. There are many approaches to how to check. One thing you need to know is how to get your "form" element inside your JavaScript. If you use JQuery, it will be different compared to pure JavaScript. Which way are you currently using … | |
Re: Hmm... I didn't really use Java that much during my undergraduate... I used some in my graduate but not enough... Though, I can do it if I want to. I don't really find that coding is that hard, but to solve a problem by coming up with a right algorithm … | |
Re: I'm still not sure about "equals()" method for Object class. Does it really work the way you want? By the way, what are problems you are getting now? Error? Exception? By the way, to do contains, you could simply call like this... [CODE] public boolean contains(Object element) { return (indexOf(element)>=0); … | |
Re: I'm not sure about your line 64 and 70. You are creating a recursive call there. If a user click "OK"? In line 54, you declare "a" as a JOptionPane.showConfirmDialog(null, "Do you want to continue?");, so what buttons do you have there? It looks to me that the way to … | |
Re: Your code is OK but the problem is how you define your "list" variable. The problem shows that at some points, inside your "list" variable is not initialized properly. There are missing links in this code. We need to take more look of your other piece of code. | |
Re: Not sure if this is would help answering your questions. [URL="http://bobobobo.wordpress.com/2009/03/30/adding-an-icon-system-tray-win32-c/"]http://bobobobo.wordpress.com/2009/03/30/adding-an-icon-system-tray-win32-c/[/URL] | |
Re: This is too long code... You could read my comment inside your codes... You need some modification and may have to redesign certain parts of your code. [CODE] //class node #include <iostream> #include <string> using namespace std; //CLASS NODE class Node { public: string object; Node *nextNode; //next part of … | |
Re: What an expected result you want to see? And what are you seeing from your program? One thing to be noted is that you may multiply the "payment" and "total" variable with 100 before you deal with them. Then you can use "int" instead of "double" to do the computation. … | |
Re: You have declare and initialize "converter" variable outside the loop. And then, you didn't assign any value to the variable but use it right away. As a result, the value inside the variable is only whatever it is initialized - 0. What you can do are 2 ways, either keep … | |
Re: And could I see your code please??? | |
Re: You cannot set a null value to a primitive array. You could initialize an array size 0 instead... [CODE]buffer = new byte[0];[/CODE] This mean any previous declaration/used will be marked as garbage. That means the GC (Garbage Collector) will free up the memory whenever it runs. | |
Re: A simple way is to use ArrayList class ([URL="http://download.oracle.com/javase/6/docs/api/java/util/ArrayList.html"]http://download.oracle.com/javase/6/docs/api/java/util/ArrayList.html[/URL]). Vector should be used if you want to program Thread Safe type because It is slower than ArrayList. Or if you do not want to use any extra class, you may need to design a way to initialize it. For example, … |
The End.