3,927 Posted Topics
Re: [quote=wilkin;433763]Hi Eiolin I know a good resource of solving these types of issues. <url snipped> Hope it's helpful to you! [wilkin][/quote] I don't think advertisements were what he was looking for... and that site has to be the most ridiculous I have seen in a long time! Thanks for the … | |
Re: I think you want to increment "countChar "instead of "count" in this statement[code] if(Character.isWhitespace(NB.charAt(i))) { ++count; }[/code]:) | |
Re: Store the session id, or other uniquely assigned number, in a cookie. | |
Re: I assume you have already tried `scrollPathToVisible (TreePath path)`, which will ensure that the path is visible, but not necessarily at the top. You will probably have to play a bit with `scrollRectToVisible (Rectangle aRect)` and creating a Rectangle that produces the desired result. Beyond that you could work directly … | |
Re: Two free online books: [URL="http://hudzilla.org/phpwiki/index.php?title=Main_Page"]Main Page - Practical PHP Programming[/URL] [URL="http://www.techotopia.com/index.php/PHP_Essentials"]PHP Essentials - Techotopia[/URL] Since you have been programming before, those should get you up to speed pretty quickly. For specific examples of many things try [URL="http://www.goodphptutorials.com/"]http://www.goodphptutorials.com[/URL] | |
Re: Are you wanting to highlight the parent of the file node or the file node itself? Your code should be selecting (and highlighting) the last node of the path you specified. Are you certain the path extends all the way to the node you are wanting to select and isn't … | |
Re: Acutally, this is line 8:[code] $interest = ($balance x 6) / 100;[/code] and you need to use * for multiplication instead of 'x'. | |
Re: Why not simply return the empty array from the function? It's easier to work with than a null or an exception. | |
Re: You don't mention what OS you are using, but most of them have a way from the command line to pipe the output of a program to another source, such as a text file. On windows this can be done like[code]SomeProgram > Output.txt[/code] to write the output of SomeProgram to … | |
Re: [inlinecode]echo "<a href='index.htm?pic=$num1'>Link text</a>"; [/inlinecode] | |
Re: First off, please use code tags around any code that you post. See the announcement at the top of the forum for more info. Now to your question, did you run that with the Applet Viewer? Applets are not executed from the command line like a regular java class. [URL]http://java.sun.com/applets/[/URL] … | |
Re: You will want to use [URL="http://java.sun.com/javase/6/docs/api/java/util/Calendar.html"]Calendar[/URL] (or perhaps specifically [URL="http://java.sun.com/javase/6/docs/api/java/util/GregorianCalendar.html"]GregorianCalendar[/URL]) class for that. This site has a lot of info on using it: [URL]http://mindprod.com/jgloss/calendar.html[/URL] Adding time (days, weeks, months, whatever) is a simple matter of using the add() method or the roll() method depending on your needs. [inlinecode]Calendar now = … | |
Re: Also, see these threads: [url]http://www.daniweb.com/forums/thread87238.html[/url] [url]http://www.daniweb.com/forums/thread82784.html[/url] | |
Re: You should be able to just setBorder(null)[code] ImageIcon cup = new ImageIcon("pics/pots.gif"); JButton button1 = new JButton(cup); // button1.setBackground(false); [B]button1.setBorder(null);[/B] button1.setBorderPainted(false); button1.setPreferredSize(new Dimension(111,51));[/code] | |
Re: This is easily done with the java.util.regex package. [code]String temp="Vendor number modified from 12345 to 00056789"; Pattern pattern = Pattern.compile("Vendor number modified from (\\d+) to (\\d+)"); Matcher matcher = pattern.matcher(temp); if (matcher.matches()){ String fromNumber = matcher.group(1); String toNumber = matcher.group(2); System.out.println("from: "+fromNumber); System.out.println("to: "+toNumber); }[/code] | |
Re: Your braces and semicolons are out of place. Look through your if () else if () block and check them. | |
Re: Well, you would probably have better luck asking this over in the javascript forum, as this one is just Java. From the php standpoint though, here is a simple login form and verification for a small site I put together for a local grayhound group. Maybe it will help you … | |
Re: You really don't need to. Just be sure that you are doing expensive calculations and such outside of the paint() method and only painting the results. Paint will be called any time the OS needs to update the screen (ie moving, resizing, etc) so try to keep it as lean … | |
Re: This forum is to discuss game programming, not cheating. | |
Passed along from my wife: [url]http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=130144061675&ru=http%25[/url] Those of you who voted Single in the poll may want to consider this additional information. | |
Re: Though it is written for Java, you might take a look through this oop tutorial as well: [url]http://sepwww.stanford.edu/sep/josman/oop/oop1.htm[/url] The concepts are the same though language implementation is different. | |
Re: This site has good tutorials for 2D and 3D rendering for Java games: [URL]http://www.cokeandcode.com/tutorials[/URL] This site has links to other 2D and 3D graphics tutorials that are not in a gaming context: [URL]http://www.freeprogrammingresources.com/java-graphics-tutorial.html[/URL] | |
Re: [quote=3xxx;429117][URL]http://www.gurusistemas.com/indexdatagrid.php?page=download[/URL] this seems to be an easy datagrid for the IE browser I can't make the MYSQL thing work -- and it should not be difficult -- please TRY , and tell us how (I use XAMPP software -- and got a HTDOCS folder in my computer);)[/quote] Post the code … | |
Re: Are you certain that the cookies are actually being accepted by the client? Since you already checked that your auth script isn't checking the IP, the session cookie should suffice as you are expecting - unless the cookie is getting refused and the app is not noticing. Also, have you … | |
Re: Currently using Adblock Plus, Cookiesafe, Googlebar, and Research Word. I like all of them. | |
Re: Please edit the post and add code tags around the code. Also, what is it doing that is incorrect? It helps to have some idea of the problem instead of examining every line looking for any trace of a potential error. | |
Re: [quote=3xxx;428273]ya, usually, it takes FEW MONTHS to have a few reply from daniweb.com Unless you offer Materialistic goods shipped from amzon.com, you won't get a quick answer[/quote] So you drug up a two-year-old thread to post this inane and utterly inaccurate comment? Brilliant. | |
Re: Looks to me like an extra end brace here, but it is difficult to say since you only posted a fragment of the code[code]} $tSQL->Disconnect(); unset($tSQL); }[/code] Side note: proper indentation of your code blocks would help you spot these things more easily. | |
Re: Yes, the web.xml file goes in the WEB-INF directory of your app. | |
Re: Drop the compiled classes in the /WEB_INF/lib folder. If they have a package structure you will need to duplicate that under the lib folder. | |
Re: I'm sure Huw would have found this information very helpful - three years ago :P Still, perhaps someone else will have a similar need and find it here now. | |
Re: You just have your html and java code intermingled here and need to fix the tags[code] while (rst2.next ()) { %> <option value='<%= rst2.getString("state") %>'></option> <% } rst2.close();[/code] or use out.write() to generate the html option tags instead. (if jwenting pops in though he will tell you not to be … | |
Re: Applets are not started from the command line like a regular java program. You need to use the Java Applet Viewer or embed them in a small test web page. If you typed this program from a book then there are probably instructions there on how to run the applet. … | |
Re: What language are you working in? "Module" is not very specific. | |
Re: Well, you have three conditions there that could be causing it to fall through [code]if (($ext == "jpg") && ($_FILES["uploaded_file"]["type"] == "image/jpeg") && ($_FILES["uploaded_file"]["size"] < 350000)) {[/code] Have you checked them all individually? This is just part of basic debugging. Use echo, var_dump(), or assert() statments to check these expressions … | |
Re: [quote=apontutul;426799]hope i've made myself clear..please help guys[/quote] This is really a question that belongs in the JSP forum. You will need to read the pollId they clicked from the GET or POST request, place that variable in your query, and display the results. It is a very standard thing for … | |
Re: Yes, this is easily possible with JSP and Servlets. Please post the question over in the JSP forum, which is there for just such questions. | |
Re: This will not be very easy to debug with just the code you posted, as there are several interacting classes here. If you do not have an IDE that will let you step through the code as it executes, then you will need to place assertions or System.out.println() statements at … | |
Re: Sure, just post the code that is not working for you or specific questions on concepts you don't understand. Certainly you aren't expecting us to just write it for you? | |
Re: This is asp and javascript - not Java. Perhaps you would get more help over in those forums, as this one is for Java programming. At a glance though, those extremely long nested switch statements make me cringe. | |
Re: As long as the order of the lines does not change, why should it matter if there are gaps in the sequence? You can still sort them correctly with the gaps and generate the displayed line numbers yourself in the output as flagbarton indicated. | |
Re: [quote] * Get the path of the returned file and somehow turn it into a class name.[/quote] I think that is your best option, but there are a couple of considerations to keep in mind. 1) you can reliably know the base path to the classes they have to choose … | |
Re: Well, unless you are doing it for some algorithm assignment, then just use [URL="http://java.sun.com/javase/6/docs/api/java/lang/String.html"]String[/URL] [B][URL="http://java.sun.com/javase/6/docs/api/java/lang/String.html#toLowerCase%28%29"]toLowerCase[/URL][/B]() | |
Re: There is not really a "basic PHP template" per se, because web sites all have different needs. Granted, certain types of sites have certain standard functionality and there are templates for such things. If you merely want to use it for layout, simply using the include function can let you … | |
Re: First off, the code you posted is not even valid code. You have php and html mixed in together and no end form tag to boot. Have you even attempted to run this code yourself? As far as session, you have not set the value of 'n' in the session. … | |
Re: reCAPTCHA works well for us and was extremely easy to integrate [url]http://recaptcha.net/[/url] | |
Re: You will need to use file locking. There are methods for controlling this in FileChannel. | |
Re: The loop you are using is not actually a valid foreach. The foreach construct is used for iterating over a Collection or array. [URL]http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html[/URL] Here is one example to print each char in a String:[code] public void hello( String st) { for(char c : st.toCharArray()) { System.out.println(c); } }[/code] | |
Re: Why do you need to specify the size? Why must it be a longblob instead of just blob? If you have the answer to the questions then you know what size to set. This really depends on the data that you are going to store. Perhaps you need to read … | |
Re: You could of course just put that code in a regular method and call it from your other listeners. Why do you feel it needs to be another class? If it does need to be a class, then yes, you can call it like jwenting wrote, but of course you … |
The End.