2,040 Posted Topics

Member Avatar for filch

Did you add the link right after the display? I do not know what you use in order to create the pop up. Would it be reading from the server? Please show me the code portion where you display the portion of the description after clicking on the flag.

Member Avatar for filch
0
152
Member Avatar for incubus9x9

You could use compareTo() for string function. If compareTo() return -1, the string which calls the function is less than (shorter or alphabet comes before) the comparing string which is passed as an argument. It should find 0 or return -1 if it returns 1. [CODE] public int find(final String[] …

Member Avatar for Taywin
0
3K
Member Avatar for SchemeStarter

You need to attach the event to your page as well. You could attach the event at onload of body tag or you could simply run it. [CODE] function attachKeyEventToPage() { if (document.addEventListener) { // anything but IE // passing event to function as closure document.addEventListener("keydown", function(e) { convertEnterKey(e) }, …

Member Avatar for Taywin
0
1K
Member Avatar for gazzy1

1)Your variable 'myTime' should be declare without quotations. It is better to do it as integer rather than a string. 2)Your attempt to display time is odd. You must not hard-coded the prefix of the display or you would get it wrong no matter what. What you really need to …

Member Avatar for tinymark
0
135
Member Avatar for lorettah
Member Avatar for Taywin
0
123
Member Avatar for BroonoVilliam

Hmm... That's one thing I missed from C++ in Java. :( @BroonoVilliam If you are allowed to use compareTo(), then go for it as [i]JamesCherill[/i] said. Otherwise, you may have to implement your own string comparison method.

Member Avatar for Taywin
0
136
Member Avatar for Mabyboi

You are done with the reading data from file. :) The next step is to actually store the read-in data to a variable in order to do the sort & print out. Look at your FileLine class, you should have a constructor and class's variables. The constructor is to create …

Member Avatar for Taywin
0
1K
Member Avatar for CommDave

It's nice to see someone trying to share his/her idea. However, please be careful when you do this. First, your code works only on IE because other browsers do not have 'document.all' in JavaScript. Second, the way you implement CSS is a bit redundant. You could pull out the font-family …

Member Avatar for Taywin
0
527
Member Avatar for kudenv

I am not sure how you want to 'hide' your menu item. In your doShow(), you hide it if it is being displayed when mouseover. Is that what you really want? In doHide(), I see nothing about hiding because you only remove the onFocus... Also, your code works only on …

Member Avatar for kudenv
0
198
Member Avatar for sneha mehta

@sneha_mehta Your code handle only SQLException which is not complete. You still need to handle ClassNotFoundException which is the exception you got from your code...

Member Avatar for masijade
0
148
Member Avatar for new_developer

@new_developer Use regular expression to check. However, do you want to check that name has no number presented only? Are you sure about that? I will give you the solution for it first, and then I will tell you why you should not do it... [CODE] var str1 = "mystring" …

Member Avatar for Taywin
0
139
Member Avatar for sam.udo

(-_-) You are killing him in a long run... How would he actually learn how to implement? Reading other people's code doesn't really help learning but more on copying... Also, giving code like this would just keep leading him to your approach while his may not be this way at …

Member Avatar for Taywin
0
234
Member Avatar for New2Java2010

It actually works, but the way you write out your array is wrong. You cannot print the array object out right if it is not char[]. You need to iterate through your array before you print out. [CODE] // change your line 31 to String taxes = "" for (int …

Member Avatar for New2Java2010
0
207
Member Avatar for Transcendent

Well, HTML and JavaScript are client side as [i]Luckychap[/i] said. If you are building a static web page (no database required), these two would be enough to build a web site. If you need to deal with database, then MySQL would be needed (unless you want to use other SQL …

Member Avatar for mark4013
0
266
Member Avatar for romi_001

Why there are so many SIZE1??? Well, if I populate the random value, I may do it this way... [CODE] public static void main(String[] args) { final int SIZE1 = 100; //constant SIZE1 for the first array final int SIZE2 = 1000; //constant SIZE2 for the second array final int …

Member Avatar for Taywin
0
421
Member Avatar for amatech

Please post your code using 'code' tag. OK, here you go. 1)Are you creating 'Link' class as the inner class of your SingleLinkedCircular class? I don't think it is a good idea to put the 'Link' class inside your linked list. Take it out to be its own class. 2)You …

Member Avatar for amatech
0
565
Member Avatar for nickliutw

You have to think what actually determines the value of '1' when the power is 0? In theory, if I remember correctly anything power to 0 is equal to 1 except 0. Therefore, when you go about looking for '1', you need to test for base==0 first, and then power==0. …

Member Avatar for nickliutw
0
121
Member Avatar for jonhunter89

[QUOTE]i dont know wat codes to be use! cause our professor just gave us that output and didnt teach us how to program that LIBRARY SYSTEM.. =( now where having some trouble in doing this project because all of my classmates are still newbie in programming... [/QUOTE] I am sure …

Member Avatar for Taywin
0
141
Member Avatar for newbieJS

Good for you to try to learn this. There are many rooms in your code for improvement, but I am not going to tell you all right now because it could be too much. Anyway, there are some immediate problem in the way you try. 1)Your trial image and ball …

Member Avatar for Taywin
0
280
Member Avatar for Glenner

Because System.out.print() cannot be used right away inside a class! The class also needs a constructor. You need to put whatever you are doing inside another method for using later. In your main(), you cannot just call "new ATM();" but you need to assign it to a variable. I think …

Member Avatar for Taywin
0
223
Member Avatar for erioch
Member Avatar for imon214

What you need to do is to create an Ajax link similar to [URL="http://www.alfajango.com/blog/rails-3-remote-links-and-forms/"]here[/URL] to send the selection to the server. Then in your controller, retrieve data and render a partial which will become the response to the client. In the partial, you can render whatever you like (a form …

Member Avatar for Taywin
0
1K
Member Avatar for WolfShield

I agree with [i]JamesCherrill[/i] about the 'package'. It is annoying for me when I code something in a package and cannot test the class on its own main. I have to test it out from an outside class which imports the package class in.

Member Avatar for Taywin
0
396
Member Avatar for desert564

Hmm... Your solution is really a brute force. :P If you do it as stack-liked as [i]quuba[/i] said, it would be much easier and shorter. Also, you would go through the string only once, not twice - one for the whole string and the other for the array you created. …

Member Avatar for jon.kiparsky
0
197
Member Avatar for ndowd

Ajax is just a JavaScript. If you know JavaScript, Ajax would be just another library you use. You can use w3school website tutorial. It looks fine to me. But if you want to get deeper, search on the Internet for more information. Ajax can deal with both xml and text. …

Member Avatar for ndowd
0
322
Member Avatar for lamanne
Member Avatar for code07

[URL="http://download.oracle.com/javase/tutorial/"]Here[/URL] may be a good start. If you feel that the page is too intimidating, you may try [URL="http://www.freejavaguide.com/corejava.htm"]this one[/URL] instead. Still, you need to learn how to create a simple Java program, compile it, and run. Then, you can go on to the array part. :)

Member Avatar for Taywin
0
94
Member Avatar for Xan

The 'switch' statement cannot work with String type. It works with integer (or may be long) number only... By the way, this is not Java forum, it is JavaScript forum. Hope a moderator would move it to the right place...

Member Avatar for Taywin
0
916
Member Avatar for ETbo

Hmm... You can do it that way in Javascript because the script is a weak type language. You could simply do like... [CODE] var multiDArray = new Array(); // then either push the array or assign it directly multiDArray.push(element1) // add the element to the end of array [element1] multiDArray[3] …

Member Avatar for Taywin
0
300
Member Avatar for omaiaa0p

500 error means the problem occurs from your server side, not the browser or script code. Verify your server side code that it does not contain any error (when compile & run). There may be a certain input type that cause the exception in your server side code, and your …

Member Avatar for omaiaa0p
0
141
Member Avatar for smslive2

Please create a new thread for your own... Reviving almost 2 years old thread is not a good thing to do... Also, use the 'code' tag given by the forum to enhance your code display.

Member Avatar for Taywin
0
413
Member Avatar for sanam_1

Why there are 3 loops??? Also, the curry brackets are not correct either... You should not post the code right way but rather tell them the algorithm or idea. Unless it is unclear, you could give some sample codes.

Member Avatar for sanam_1
0
513
Member Avatar for kaneyip

@javaAddict I think it is not really too difficult because a beginner should be taught about the thinking process before starting to code. Or may be they have changed the way they teach in school about how to do the programming??? :(

Member Avatar for JamesCherrill
0
112
Member Avatar for sanam_1

Even though your code may be working, there is an unsafe part which should not be implied this way... [CODE] int [][] Board= new int [15][15]; for(int r=0;r<Board.length;r++) { for(int c=0;c<Board.length;c++) { // <-- Dangerous!!! // should at least do for(int c=0; c<Board[r].length; c++) { System.out.print(" "+"_"+" "); } System.out.println(); …

Member Avatar for Taywin
0
112
Member Avatar for .:Pudge:.

Hmm... Interesting there... Looks challenging for me to find the solution. Haven't done MIPS for 3+ years... The memory allocation is somewhat confusing but not too difficult to learn. I have already forgotten all of them though. :( #2 - If you use SPIM, you should see all the memory …

Member Avatar for Taywin
0
154
Member Avatar for tekboi

As LuckyHarp said, your problem started at line 20 in your 2nd code portion. If you really look at the color enhancement of the code block, you should at least see something is wrong there. You are incorrectly composing your string while you want to write out in document.write(). As …

Member Avatar for Taywin
0
195
Member Avatar for mangopearapples

Eh??? I am not sure what you mean here??? Also, why would it relate to Java??? Could you please explain again about this??? Are you saying you are attempting to open a java file to see its source code? Or you want to run a java class?

Member Avatar for mangopearapples
0
178
Member Avatar for drogba123

You could use HashMap, but it depends on how you want it to be. In your given example, it would work perfectly (string size of 2 for the key). However, if you have to use an ArrayList, just sort the array when you insert a new element. [CODE] ArrayList<String> list …

Member Avatar for drogba123
0
121
Member Avatar for JBeg

If I understand what you want, it means that you need to create another class which may or may not extend from the existing class. I would prefer not to extend but use it inside your new implemented class. The existing class object will become one of your class's variable …

Member Avatar for end3r
0
202
Member Avatar for kalender

What you are doing right now is not using Ajax. You just submit the form to index.php and let it reload the page (index.php) again. If you are not going to use Ajax to deal with the display, you could send the parameter back to view in PHP, and then …

Member Avatar for Akash Saikia
0
163
Member Avatar for manish250

Just implement the button or link to call your server side. Then use your server side to create the Excel file and stream it back to client.

Member Avatar for ~s.o.s~
0
229
Member Avatar for SolidSora

Just have a flag which may call goUp. Then switch it when it hits your top or bottom value. [CODE] boolean goUp = true; int cnt = 0; for (int i=0; i<18; i++) { if (goUp) { cnt++; } else { cnt--; } System.out.println(cnt); if (cnt==3) { goUp = false; …

Member Avatar for jon.kiparsky
0
3K
Member Avatar for nurulainishaher

Hmm... Maybe [URL="http://en.wikipedia.org/wiki/Neural_network"]this[/URL] and [URL="http://en.wikipedia.org/wiki/Backpropagation"]this[/URL] may help you to understand how to do it?

Member Avatar for nurulainishaher
0
82
Member Avatar for PhoenixInsilico

I am very confused with variables you used in the subroutine arguments! You keep changing it around and there is no comment at all... At least comment each input argument and gives an expected output. If you are stuck, write a pseudo code first. It looks like your algorithm is …

Member Avatar for Taywin
0
149
Member Avatar for laknew

How do you add your 2nd combo box into your form? If you do not add it as real select/option tag (modify DOM), it may not pick up the value.

Member Avatar for Taywin
0
120
Member Avatar for ToXSiK

Hmm... Do you really need double quotation when you run command line??? I never have it in my command line compilation. [CODE] //i.e. >javac -classpath foo.jar MyClass.java [/CODE]

Member Avatar for mKorbel
0
136
Member Avatar for umamahesh2020

Manipulating with 'display' property alone may not achieve what you want because the element area will still be preserved in the display but not visible to the client. In other word, it will still have an empty area for you after it has been display once even though it is …

Member Avatar for Taywin
0
119
Member Avatar for asif49

The problem is in line 10 where you keep the while loop going on forever. Even though it is possible to do it, it does not make sense at all to do it in your case. And because the loop keeps going on, finally your 'length' value will be greater …

Member Avatar for asif49
0
99
Member Avatar for pokuripavani
Member Avatar for Ezzaral
0
127
Member Avatar for SavnetSinn

Hmm... I don't know where you get the 'width' and 'height' from... By the way, line 17, I am not sure that you need 'else if' for y because it looks like you should check x and y separately. In other word, shouldn't it be 'if' instead?

Member Avatar for jon.kiparsky
0
153

The End.