2,040 Posted Topics
Re: How about declare a variable counter and assign it to 1. Then inside the while loop right behind the class="img#", echo the counter value instead of hard-code the number? | |
Re: Hmm.. In what sense do you want it to be improved? At least, the add() part can be improved by using a for-loop. I am not sure why you need a while-loop to display that? You could simply take out the existing for loop and use it to print the … | |
| |
Re: Actually, I've not seen how the OP models his problem yet but rather jumps into programming. This will be very messy and clueless when it gets further and further; besides, this is a bad idea of teaching programming... Before getting into programming, why not outline what you will be using … | |
Re: It depends on how you render your page. Is your page a static HTML? Or is it rendered via the backend (i.e. PHP, JSP, ASP, etc.). If it is a simple static HTML, you need to place cookies in your client's in order to pass the values for display in … | |
Re: @Slavi, you need to point out what is wrong and give a guide, not simply give away the answer... @OP, look at your code portion... while (index < length) { if (myStr.indexOf(s , 0) == 's' ) { countS = countS + 1; } index = index + 1; } … | |
Re: Your `ul.MenuBarHorizontal` has `left:312px` property in it... A good way to debug things like this should be on either Firefox (with Firebug) or Chrome. | |
Re: My simple answer is to ignore the coding part for now and look at how this application model works. You need to be able to look at the code (and this one is very small), and then create something like a flow chart. Once you have the model (flow chart), … | |
Re: If you are looking for all paths possible, DFS or BFS can do. DFS and BFS are not about the shortest path but they are simply a way to go through the path in different way. It is incorrect to say that DFS is to find the shortest path. The … | |
Re: What do you mean by "not working"? When you ask or report a bug or not working program, you should explain 3 things -- 1)Input data, 2)Expected output, and 3)What error you are getting, and 4)Explain what is not working (i.e. no alert display, the browser hung up, etc). At … | |
Re: If a client can view your content, the client can "print" as many as the client wants. You may try to disable the "print" functionality on your display but that does NOT stop those who can manipulate with your display page (i.e. using plug-in) to enable the functionality, or even … | |
Re: I agree with hericles. However, remember that you may also widen your menu area as well if the menu area is not directly rely on your content area. | |
Re: Also, one more question. Has your image a.png loaded to the page after the page is displayed? If not, it won't work because the call is looking for the already loaded image. You could load and hide the image when the page is loaded. Then it should still work; however, … | |
Re: @Slavi, you shouldn't give away the whole method definition. Besides, there is a bug which could cause an infinite loop if the e.getActionCommand() returns a value that cuases the result of "append()" to go over the length of 3 (may not occur in this application but easily mislead in other … | |
Re: Sadly, there is no command or functionality like that in the language. You could however call the system command to execute the console command, but that may not be what you want. | |
Re: Unless you can access the DOM of the page, you may not be able to edit the title. Once your page is loaded, it is your choice to manipulate it (including stop any scripts on the page that may keep refreshing). Have you ever tried that? | |
Re: Well, your DFA is unknown to others. In other words, I am not sure what you are doing in each of the DFA state. Anyway, there is a questionable call `tokenclass.chartoken(t)` which gives no information to us. Does the method return and consume the character which is being looked at? … | |
Re: 1) your to_array() definition is missing an argument. 2) What do you want to do inside the to_array()?? You could simply use split(//) to create an array from string! (i.e. `"abcde".split(//) #=> ["a", "b", "c", "d", "e"]` 3) Why permutation function has number 3 in it? Do you want only … | |
Re: Are you asking for an algorithm to do this work? If yes, I will give you one. If you are looking for codes, then show me what you have got so far. One algorithm which is easy but not very efficient is to use a hash-like structure. Each character is … | |
Re: Have you tried adding 'www.' in front of your domain name? It happened to me with some browser in the past. Not sure IE8 requires 'www.' in order to recognize it as a URL. | |
Re: Before going into coding, I would want to take you back to building concept first. Think about it as if you are building a hotel and how you would create a simple management process. Each object (i.e. hotel, room, client) would be a class. Each class may have properties/attributes. Those … | |
Re: I guess I would have to answer your question because it seems that no one is interested in doing so. First, your question is to vauge. There is no specific server side technology that use Java language. There are so many different one to choos from including framework. The simpliest … | |
Re: If you want the size of table cell to be fixed when the rendering exceeds the view, add `min-width:100px;` to your td CSS in order to force table rendering to keep the cell width size. | |
Re: Huh? From what I understand, cookies values are stored on the **client side** and session values are stored on the **server side**. So does your script store the value on the client side? You need Javascript to manipulate with the cookies and send their values back to the server side, … | |
Re: Which handler are you using to draw? If you use the same one to draw, it will be overwritten everytime you draw a rectangle. It is similar to overwrite the same variable with different values in a loop. Once you are out of the loop, you have the last value … | |
Re: OK, first you need to find out how to creat a 3D display for a project tile. You can look at an [example here](http://people.sc.fsu.edu/~jburkardt/m_src/xyz_display/xyz_display.html). Then apply whatever you need to deal with the display. And that should be it! You should use Google to look for help in the future... | |
Re: I am not sure those tag names are recognized by older browser (especially IE). Also, the default display behavior of custom tags would be similar to <span>, so you may need to specify the display as block in your CSS... | |
Re: The reason the gap between your "about_content" and "about_image" will never be decrease is because you are setting content element to the far left and the image element to the far right. If you want the image element to be next to the content, you need to float it to … | |
Re: I am guessing that your goal is to represent a hash in tabular format for writing into a data file (i.e. CSV). If this is a one time use or a dirty quick convertion project, you don't need to look for an elegant solution. However, if you want to use … | |
Re: Do you mean the sample format is the content of the file? And the number in the front represent the line number? If so, you simply read in the file line by line. Now, it depends on how you deal with it. One way is that you read the whole … | |
Re: You want the script or a concept? If you want a whole script then ... no. But how to do it, OK. Do you know how to read in File? If not, then you may look at this [example](http://perl.about.com/od/perltutorials/a/readwritefiles.htm). Then you take the "data" you got and call from Oracle … | |
Re: By the way, you need to take a look at positionSetter() method again... You are wrongly check for values... | |
Re: It could also be your matlab file as well. What is the code in matlab? | |
Re: There is no sample input, so it is very difficult to define how your "empty" data looks like. RegEx is a good idea to go, but it is very difficult to manipulate string with it because you must be able to find the common based (uniform) format. Even with one … | |
Re: Also, your program will never go into the loop in line 55. Your *numPlayers* is always greater than 0, but the condition checks if it is less than 0 to be true. You need to change it to be greater than... More... Line 53, you initialize *visits* array to size … | |
Re: 1)Please do not hijack old thread. 2)The answer of how to run it should already be in those posts (using *AudioStream* class). | |
![]() | Re: Did it compiled and print out the result? Anyway if I remember correctly, the array created should be... a00 a01 a02 ==> 1 2 3 a10 a11 a12 4 5 6 Even though it looks like a 2 dimentional array, it can be seen as 1 dimentional array as well. … ![]() |
Re: If you want to do a split (and the purpose is to obtain only digit characters), use regular expression that splits at any non-digit character (i.e. "[^\\d]+"). Then you would get an array containing only digit characters. If you are dealing with mathematic expressions, spliting a string into a char … | |
Re: Do you have JavaSDK installed in your computer? If so, did you configure TextPad to run the right command for it? You need to look at the tool's configuration. | |
Re: 1)Where is the idea about using Queue coming from? Why do you think you need a queue for the sort? 2)Have you read and compared your implementation with this [WikiPedia](http://en.wikipedia.org/wiki/Radix_sort) for the algorithm? Look closely at the C-language implementation. It should be the easiest one to follow. Ignore the C-syntax … | |
Re: Are you sure that your external JS file (sha512.js) contains functions that compatible with IE as well? I don't know what hex_sha512() does, so it is hard to say what causes it to stop working... What does IE error say? At least it may help you find the incorrect call … | |
Re: Are you talking about multiplying by 0.51 after the total value is computed (added 2 values)? Where do you want the output to be in your page? Different element? I can see that the way you call the function & the implementation are not going well together. If you explicitly … | |
Re: When you talked about kinetic, at first I was thinking about kinetic movement. I did implement an animation of kinetic movement in JavaScript a couple years ago. The name of this library may be a pun though. Anyway, displaying using HTML5 canvas and display animation are two different tasks. The … | |
Re: The program you want to do looks like a keylogger to me... | |
Re: If you follow Zero13 suggestion, your script lines 9~22 would be eliminated, and the needed script will be 1 line... $("#dvContent").html($("#dvContent").html().replace(/(\W)(jquery)(\W)/ig, "$1<span>$2</span>$3").replace(/^(jquery)(\W)/ig, "<span>$1</span>$2")); What the regular expression does is to match anything that is not a letter, number, or underscore before the word jqueury (case-insensitve) which follows by anything that … | |
Re: Have you take a look at this [site](http://agylen.com/2006/02/27/ruby-for-java-programmers-part-v/) yet? Not sure what limitation you are talking about. The site seems to explain quite well for thsoe who are from Java to go to Ruby. | |
Re: I do not understand why you attempt to store data in the server memory which should rather be stored in database. Anyway, someone has given some ideas [here](http://stackoverflow.com/questions/539372/persistence-in-ruby-on-rails). | |
Re: Please read oracle [tag embeded](http://docs.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/using_tags.html). In your website, you need to structure (folders & file locations) similar to whatever in your development. If your main class is in the same location as your page, you need copy exactly the same folder structure and file location on to your web server … | |
Re: I found this [UDP hole punching](http://en.wikipedia.org/wiki/UDP_hole_punching) from googling. There is no example, so you need to read the algorithm and try to follow it. Still, there is a reason why the client needs to do port forwarding. | |
Re: You won't be able to run the script with that comment on because of the curly bracket pair... Anyway, your doesn't give all of the script... Where are those variables from (i.e. expire, path, secure, domain, etc.)? Did you declare them somewhere? How is the script supposed to be called … |
The End.