2,040 Posted Topics

Member Avatar for Syrne

1)You are attempting to create methods inside the main() method. You need to take them outside the main(). Then you call them in main() instead. 2)Each method outside the main(), you may not need "static" keyword to make the method static. You should learn how to use "static" method in …

Member Avatar for Taywin
0
153
Member Avatar for lbgladson

You have already done it correctly (without any help I believe & congrate) in the other post, so you should mark this post as solved. :)

Member Avatar for Taywin
0
172
Member Avatar for lbgladson

If you use "clear()" from coins which is an ArrayList, you will remove all elements! Take line 44 in your Purse class out of the loop. A better idea is to implement a method that clear the purse for you (to hide the information). Implement a method inside your Purse …

Member Avatar for Taywin
0
253
Member Avatar for shawntheking

Hmm... There are so many things to talk about your code... But I will keep it for your later improvement of your own code. Anyway, when you want to keep looping for playing, you need the while-loop to cover the whole part from random guessing numbers (and why numbers anyway???) …

Member Avatar for Taywin
0
1K
Member Avatar for I<LateNupurGuha

My first question is... What would happen if you call the System.exit() in the finally clause from the middle of the exception stack level? Would that terminate the program without going up to the top level? [CODE] try { ... } catch (Exception e) { ... } finally { System.exit(1); …

Member Avatar for I<LateNupurGuha
0
118
Member Avatar for fredfletcher

This is Java forum... Not JavaScript... Also, the script has window.open which will open a new windows. You could, however, use frame/iframe tag to display the content of link. The down side is that you loose the ability to bookmark the page.

Member Avatar for ddymacek
0
235
Member Avatar for ChaseRLewis

Off topic first, even though JavaScript is very loose in type checking, your design should not use typeof() too much. It could get tricky in the future. On topic, how about convert the typeof() to a string and compare each string with it instead of using Debug.log()? [CODE] var typeOfTime …

Member Avatar for ChaseRLewis
0
107
Member Avatar for vinay.bharadhwa

The events you are looking for may be onunload & onbeforeunload (non-standard) events. However, these events are tricky and may not be able to achieve what you want. The reason is that these events would be fired when you leave the site via links or click on the "back" button. …

Member Avatar for vinay.bharadhwa
0
1K
Member Avatar for Procx

If you want to keep it that way, you need to get rid of the for(int i=0... loop. Instead of that loop, declare a variable type int and initial it to 0 outside the while-loop ( i.e. int cnt=0; ). Then use it in place of "i" variable in the …

Member Avatar for Procx
0
91
Member Avatar for rayden150

If you want to find a largest number which is always a positive number, declare a variable outside the do-while loop and initial it with any value below 0. Then right after each input from a user, compare the value with the variable of largest number you have. If the …

Member Avatar for Taywin
0
210
Member Avatar for tawboiid

Hmm... I can't recreate the event you are talking about... I always get the focus with document.getElementById(commentid).focus(). Not sure... But could you delete the closing tag of "input"? There is no closing tag for "input" by the way (and never was). PS: What browser are you using?

Member Avatar for tawboiid
0
364
Member Avatar for Hikari123
Member Avatar for tape enterprise
Member Avatar for Taywin
0
94
Member Avatar for daniel1977

How about... [CODE] for (int n=1; n<5; n++) { do something } .-----. | Start | '-----' | V +-------+ | n = 1 | +-------+ |<---------------------------------------------+ V | ' ' | / \ +--------------+ +---------+ | ' n<5? ' --yes--> | do something |-->| n = n+1 |--+ \ …

Member Avatar for Taywin
0
169
Member Avatar for applejax77

And what it is supposed to be for a negative value? Also, it wouldn't work because the returned string has a "-" sign in front. If you want to sum only, then use Math.abs() on your "aNum" before you use the String.valueOf()???

Member Avatar for applejax77
0
151
Member Avatar for 9tontruck

Use view source and you should see .php links... If you try to enter an invalid URL, you would see a link to support with .php in it.

Member Avatar for Fortinbra
0
113
Member Avatar for Dwillich87

1)Line 21, The clockid should be initial to 0, not a function. [CODE]var clockid = 0;[/CODE] 2)Line 23, This is an odd way of your implementation. You could simply use... [CODE]seconds += 1;[/CODE] 3)Line 24, The document.quiz does not exists. This is an incorrect reference to an element of HTML …

Member Avatar for Dwillich87
0
405
Member Avatar for Mylsamy

You need to use Ajax for it. I think you are talking about Struts. You can look at this example [URL="http://www.roseindia.net/struts/struts2/struts2ajax/ajax-login-form.shtml"]http://www.roseindia.net/struts/struts2/struts2ajax/ajax-login-form.shtml[/URL] or this tutorial [URL="http://struts.apache.org/2.x/docs/ajax.html"]http://struts.apache.org/2.x/docs/ajax.html[/URL] for more information.

Member Avatar for Taywin
0
60
Member Avatar for anand01

Because your disp(Short) is not the first choice for "short" (look at "Short" is a class, not primitive)? So Java casts the "short" to "int"? If you look at it, Java cannot cast a "long" to "int" (loss of precision?) but it can do "long" to "Long"...

Member Avatar for anand01
0
85
Member Avatar for DragoDraco

Are you converting this from C++ or C by chance? The syntax of your code looks very close to C++ or C. You cannot use the syntax in Java. Also, there are certain differences between them... It looks like you are trying to print out an upper case character in …

Member Avatar for DragoDraco
0
161
Member Avatar for 9tontruck

Hmm.. How about change the way you do inside the function... Let say you get the max length of the list before hand. The condition is still there... [CODE] # the starting refnum is equal to (length of the list -1) (define (print-all(list refnum)) (cond [(>= 0 (length list)) (print-all(list …

Member Avatar for Taywin
0
348
Member Avatar for zeshansajid

Hmm... Very difficult to read what in the picture because of the low resolution. Anyway, here is what I got from it... [CODE] +---+---+---+---+---+---+ | 1 | 1 | 1 | 0 | 0 | 1 | +---+---+---+---+---+---+ | 1 | 1 | 1 | 1 | 1 | 1 …

Member Avatar for vadriaan
0
277
Member Avatar for asif49

Did you add JQuery libraries to it as in the tutorial? I'm not sure about the version, but it may not be relevant. I did mine in pure JavaScript though... But not with a little tween effect. :P

Member Avatar for asif49
0
2K
Member Avatar for harveylester

In line 16, take out the "onclick" event. [CODE] <input type="submit" name="Update" value="" class="highlight_input_btn fr"> [/CODE] Then change your line one to... [CODE] <form name="registerform" class="registerform" action="http://www.projectdisobey.com/disobeyclothing/?page=myaccount&amp;type=editprofile&amp;chagepw=1" method="post" onsubmit="return chk_form_pw()"> [/CODE]

Member Avatar for harveylester
0
155
Member Avatar for toms ace

You may want to look at this forum link [URL="http://stackoverflow.com/questions/1586341/how-can-i-scroll-to-a-specific-location-on-the-page-using-jquery"]http://stackoverflow.com/questions/1586341/how-can-i-scroll-to-a-specific-location-on-the-page-using-jquery[/URL]. It may answer what you want to do.

Member Avatar for toms ace
0
2K
Member Avatar for hiyatran

It doesn't work with "getElementById()" function because the function is being called before your dom is built (and page is not rendered yet). As a result, the function throws an error because the div element with ID "myString" doesn't exist at the point when the function is being called. The …

Member Avatar for MartinRinehart
0
92
Member Avatar for daNiUB

Well, you could start with extending the class? [CODE] public class Guitar extends StringedInstrument { ... } [/CODE] Then think about how to implement a guitar object.

Member Avatar for ceyezumma
0
124
Member Avatar for Bedjovski

C++ is not a web application language. And if I understand what you want, you could simply display other website inside a frame/iframe and have your own content over it.

Member Avatar for Bedjovski
0
101
Member Avatar for jshenn

You just need to check merge the whole response back and split them. Then put each content into the right element. An example is below. You could do it in many other ways as well. [CODE] if (xmlHttp.readyState == 4) { // you should check the status 200 as well??? …

Member Avatar for jshenn
0
2K
Member Avatar for s0bean

Hmm... You need to update this line... [CODE]document.getElementById(arrDiv[x]).style.display = disp;[/CODE] There are 2 values you can use for the display. "none" is for hiding and anything else (preferred null) to get rid of "display" style. i.e... [CODE] document.getElementById(arrDiv[x]).style.display = "none"; // for hiding document.getElementById(arrDiv[x]).style.display = null; // for showing [/CODE]

Member Avatar for Taywin
0
130
Member Avatar for cskinittest

1)Session timeout should be implemented on the server side. The server knows the time when the last HTTP request is called. If the next request is longer than the time limit, you could simply drop the request and display session time out. 2)There are many time counter in PHP and …

Member Avatar for Taywin
0
213
Member Avatar for andimiami

The problem is that you print out a message on every single check of your sub string from split(). What you may want to do is to create a boolean variable outside the loop and set it to true. Then inside the loop, if there is anything that cause the …

Member Avatar for hfx642
0
110
Member Avatar for rihanareeza

It is your homework. Who would know better than you do about what you are talking about this somewhat pseudo code? Also, there are many unknown variables in the code... 1)Is "seq" a global variable? Because it just pops up in the function without declaration. 2)Where does "x" come from? …

Member Avatar for Taywin
-1
102
Member Avatar for Nathan_11

Do you want to show sum of each row? You are on the right track up until line 15. What you need is to add up the "sumc" with the value you just assigned to - nos[i][l] - not add the values as you are doing now (hard-coded). Also, you …

Member Avatar for Taywin
0
139
Member Avatar for ria_ria

No James, you may be misunderstanding. That's not what it should be. The person wants a user to click on "roll" button to start rolling and then click on "stop" button to stop the roll right away. So Timer should not be used in here. The problem is in RollDicePanel's …

Member Avatar for Taywin
0
180
Member Avatar for Silo45

You just dumped huge compacted code portion to the forum. Sorry, I am not going to sit down and look at it. Also, please do not hijack other's thread. You should create your own.

Member Avatar for Taywin
0
2K
Member Avatar for Joe Shmoe

It is in VBA. [CODE] Dim byt As Integer <-- declare variable Dim acc As Integer <-- declare variable If txt = "" Then lbl = "0" Else For i = 1 To Len(txt) <-- go through the loop from 1 .. text length byt = Asc(Mid(txt, i, 1)) <-- …

Member Avatar for Taywin
0
220
Member Avatar for DoubleZ

You just need to have another set of variables to keep the division. Do not reassign your variable a, b, or c at all. [CODE] // i.e. int tmpA = a; do { diga = tmpA % 10; suma+= diga; tmpA = tmpA / 10; } while (tmpA > 0); …

Member Avatar for DoubleZ
0
357
Member Avatar for london-G

The class itself doesn't seem to be wrong. How do you call or instantiate the class object in your other class/method?

Member Avatar for Taywin
0
154
Member Avatar for Onlineshade

Huh? I always use a plain text editor to code Java, Ruby, Perl, etc... Tools or IDEs are tools. This means it should not be a necessary component in your coding. It is to aid you to make life easier. Do not rely on them too much... Edited: Forgot to …

Member Avatar for Onlineshade
0
291
Member Avatar for hennelh

This looks to me very similar to a language grammar. It looks good to me. I assume that epsilon is the terminated value. OK, from this site [URL="http://web.cs.wpi.edu/~kal/PLT/PLT4.1.2.html"]http://web.cs.wpi.edu/~kal/PLT/PLT4.1.2.html[/URL] describing how to eliminate left recursion. [code] For each rule which contains a left-recursive option, A --> A alpha | beta introduce …

Member Avatar for hennelh
0
243
Member Avatar for ynwa

Maybe you need to read about java classpath when you compile a Java file? ([URL="http://download.oracle.com/javase/1.3/docs/tooldocs/win32/classpath.html"]http://download.oracle.com/javase/1.3/docs/tooldocs/win32/classpath.html[/URL])

Member Avatar for peter_budo
0
896
Member Avatar for us0343

Try this... Change... [CODE] public static void main(String args[]){[/CODE] to [CODE] public static void main(String[] args){[/CODE]

Member Avatar for peter_budo
0
183
Member Avatar for Zvjezdan23

Hmm... I'm not sure about how you use the getline() function. Does the getline() also attempts to add "\0" to the end of your array when you have already filled up each array with 3 values?

Member Avatar for mrnutty
0
329
Member Avatar for Nathan_11

1.Please use the "Code" tag next time... 2.What is your error? What does it say? 3.You declare "display()" method twice?

Member Avatar for Nathan_11
0
136
Member Avatar for newguy101

You need to form the range in your if-else statements. [CODE] if (Gal <= 4000000) { // better use less than or equal to & also number is a number ... } else if (Gal>4000000 && Gal<=10000000) { // 2nd range ... } else { // anything exceeding 10 mil …

Member Avatar for Taywin
0
990
Member Avatar for DragoDraco
Member Avatar for developers.comp

What you need is all combinations of the set. Then the break down is done after you have all the combinations. If you notice how each element arranges in the solution, you would know what I mean. Now, a link solution and explanation about how a combination works is at …

Member Avatar for Taywin
0
208
Member Avatar for nilay84
Member Avatar for kacprek

Try "Grease Monkey"? Also, you need to override the function in "window.onbeforeunload". If your site got redirected (hijacked), you need to clean your site now. Also, check all your code for vulnerabilities. PHP page is usually easy to XSS which results in adding malicious content to the page.

Member Avatar for kacprek
0
320

The End.