5,031 Posted Topics
I have directory which is used to temporary store images while working with them. Once all process are done and images are not need it anymore I would like to delete them. I tried following code but it didn't work. Where is problem? [code] Runtime comPrompt = Runtime.getRuntime(); String[] execStr … | |
Re: The idea with using String is good [QUOTE=mr.sweetchuck;341970] [code] String mySubString = s.substring(0, 1); int newInt = mySubString; [/code] [/QUOTE] but you forgot to parse Integer [INLINECODE]int newInt = Integer.parseInt(mySubString)[/INLINECODE]. Yes I know this work but it is bad habit. Why did SunMicrosystem made the method parseInt()? Just to have … | |
Re: [CODE] public static char[] CharacterCheck(char userAnswer, String[] dictionary, String hidden_word) { char[] correctLetters; //int mistakeCounter; String answer_check; answer_check= correctLetters.charAt(); for(int i= 0; i < hidden_word.length[COLOR="Red"]()[/COLOR]; i++) { if(hidden_word.charAt(i)== userAnswer) { correctLetters[i]=userAnswer; } } return correctLetters; } [/CODE] hidden_word is missing bracklets on the method call However I do not know … | |
Re: You should not make any changes to instalation of your Java! No adding new folders or files. So place your folder MyPack somewhere else on the disk. My only experience with package are that the package have to be in same folder us program with main method and you can … | |
Re: Your first question is not very clear to me, what I understand is you want to find all even numbers in the array and add them together, plus you wish to keep a track of have many even numbers are in the array [code] int total = 0; int evenCount … | |
Re: Put your images in array, use random generator to get number between 0 to 5 and then display the image which is on position in array of your random generated number | |
Re: In the case that line is horizontal x1 == x2, if line is vertical y1 ==y2. 1) So what you do collect pointer position(a,b) 2) Find out if your line is horizontal or vertical A) If horizontal a == x1 && ( b >= y1 && b =< y2) B) … | |
Re: As dukane sais it is realy easy. Your assignment actualy point to one. Encryption from Julius Caesar so called Caesar cipher read more [url]http://en.wikipedia.org/wiki/Caesar_cipher[/url] plus here is a presentation on basic encryption randomly found on google [url]http://www.eecg.toronto.edu/~lie/Courses/ECE1776-2005/Lectures/Lecture7.pdf[/url] It is nothing difficulty you just play with letters order | |
Re: Welcome bondo, hope you enjoy our huge community and find answer to your questions | |
Re: Instalation will take care of everything, just download the one without JDK as you have one already installed on your system | |
Re: Nicely done, we would be able to help you as that wasn't part of the code and rest which you provided does look fine | |
Re: This sound to much as homework question. Plagiarism is highly punished everywhere! | |
Re: This is not very good practice [INLINECODE]line.charAt(x) == mark[/INLINECODE] you should use Character methods [B]compareTo()[/B] which return integer [QUOTE]the value 0 if the argument Character is equal to this Character; a value less than 0 if this Character is numerically less than the Character argument; and a value greater than … ![]() | |
Re: I would suggest to sort the array first and then it is simple just reguest number on second possition. Also keep in mind that you may have first two number of same value so the second smallest should be on 3rd position(but that is just extra feature of your program) | |
Re: For such complex idea you provided very short explanation Also what you expect from us? To do all coding for you? | |
Re: Make shure your MySQL database is runnig ( I sometimes forget I switch it off) I'm using Windows XP and my JDBC connector is in "[I]C:\Program Files\Java\jdk1.6.0\jre\lib\ext[/I]" plus you should place there [I]servlet-api.jar[/I] and [I]jsp-api.jar[/I] which you can find in your Tomcat directory (in my case [I]C:\Tomcat 5.5\common\lib[/I]) This should … | |
Re: NEVER try to connect to database from JSP! If you need data from DB use servlet and then pass them to your JSP... | |
Re: Is this question related to Java programming or you just want to know how to use some FTP application to upload your file? | |
Re: You are trying to run a program without "main" method. Check your class if it has "main", if yes check your spelling. If your class hasn't got "main" method, does this class is called by another class which has "main"? If you think my answer was sufficient post the code … | |
Re: If you using Apache Tomcat with instalation of examples you can find simple example in one of their examples. This one actualy let you name event and time of event, but if you clever you can make it worj your way | |
Re: Pet.class is product of Pet.java, that what you get once you compile your source code in java file. Pet class can't be find because you are not calling that class properly, maybe mistake in spelling or your constractor is not right. Can you please post your code, I think we … | |
Re: I don't see a reason to set the CLASSPATH, JAVA is absolutely happy to run just on PATH setup. Your CLASSPATH seting are strange `.;C:\Program Files\Java\jdk1.6.0\bin;.;C:\World` What is purpose of that extra semicolon and dot which I marked with red? And why did you set this CLASSPATH when after restart … | |
Re: [QUOTE=jbennet;334845]how about programming challenges? whoever makes the program (could be a website too i suppose) that fits the sepcification best gets say, some webspace or some coding tools or a book[/QUOTE] Good idea, but I can spot there some possible problems... Will moderators and admins be allow to enter? If … | |
Re: It is bad idea to setup conection to DB in JSP. It is all fashioned and left only for back compability from dark age of Java Web Development. You better of using servlets to handle connection and changes to DB | |
Re: I think you come to wrong forum. We do not do others people homework/coursework/assigments, we try to help and solve problems with in code you already writen. So if you did your work and have problem with code, please kindly post your code with problem description and we will try … | |
Re: [QUOTE=iamthwee;333847][url]http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Java/Chapter09/chooser.html[/url] [/QUOTE] very interesting website... | |
Re: Isn't this going out of topic???? OK, I have newer edition of narue keybord, its [URL="http://www.logitech.com/lang/images/0/12248.jpg"]Logitech G15[/URL] wouldn't belive it on the begining but it is realy practical keybord Mice, I have another product of Logitech [URL="http://www.logitech.com/lang/images/0/12347.jpg"]MX518[/URL], love the side buttons for moving backward&forward, I always miss them on any … | |
Re: You better to edit your code, or nobody will read this mass of characters to find out what is what | |
Re: Use JavaScript for example | |
Re: If you can be specific about confusion on loops, arrays and if/else we can try to help you. Also there is always java tutorial site [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/if.html"]if/else[/URL] [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/switch.html"]switch[/URL] [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/while.html"]do-while/while[/URL] [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html"]for[/URL] [URL="http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html"]array[/URL] and do lot of practice | |
Re: I don't know any free download of Java books and if you get any most likely their are illigal However Sun website hold complite reference for each version of java. You can even download it on your pc if you want to but it is not necessary. Here is link … | |
Re: Firstly you need to know the size of array before you create one, so I would suggest to chalenge user to insert first number of values he wants to add to gether Secondly once you get that info create array of that size Third run for loop to get your … | |
Re: Try this way ;) [code] public String ins_Deposit(String userid,int amount,String branch,String bank) throws SQLException { Statement ps = null; [COLOR="Red"][B]String output;[/B][/COLOR] try { ps = conn.createStatement(); String query="INSERT INTO BANK_TRANSACT VALUES('"+userid+"',sys_date,"+amount+",'D','"+branch+"','"+bank+"')"; int result = ps.executeUpdate(query); if(result>0) [COLOR="Red"][B]output = [/B][/COLOR]"Transaction successfully completed,amount will be credited to your account within 24hrs. "; … | |
Does any of you can recomend some usefull resorces on native compilers? | |
![]() | Re: [QUOTE=san_fran_crisko;329569] [code] if (iInput == 1) { newcd(); } if (iInput == 2) { artistdisplay(); } if (iInput == 3) { genredisplay(); } if (iInput == 4) { yeardisplay(); } if (iInput == 5) { ratingdisplay(); } else { System.out.println("Thank you for using CDSystem"); } } } [/code][/QUOTE] If I … ![]() |
| |
Re: Is done with use of JavaServerPages(JSP) or PHP? If your answer is PHP, click on Flag Bad Post link and request your post to be moved into PHP section. However if it is to be done in JSP you may need to provide some extra info... | |
Re: [QUOTE=jbennet;329446]Hit f8 repeatedly as soon as the pc starts up and choose safe mode. Wait until it boots into safe mode then log in as administrator go into control panel, select your user and choose to get rid of your password[/QUOTE] That will work only in case if nanasei want … | |
Re: Well you will have to submit data and let controler(servlet) compare it against DB, if Employee ID already exist you will have to go back and display error message. Otherwise you continue with data processing. Other option is to have this ID's retrived from DB before any page displayed, something … | |
Re: on each post there is option "flag bad post", in message just write something like "please move to different forum" best give it name of forum. So now you can do it | |
Re: You are mixing AWT with SWING, that is the problem [QUOTE=talablink;328493]i don't know how to add buttons to the code , it already has two buttons on it but i don't know how to add more...i just editted this one i've tried adding one more but it just won't work..it … | |
Re: I would love to contribute, but still didn't develop skills to write a proper tutorials. So at least I try to make a difference by posting on this forum | |
Re: We will help you as soon you show us what you did so far. However, [B]NOBODY[/B] will do your homework for you | |
Re: [QUOTE=Anaa;326804]i hav calculated a value(years).Now i want 2 merge it with an attribute of table(ml_y2 wher 2 is year).So i want 2 merge ml_y and 2.then i want 2 find the value of ml_y2 frm a table....plzzzzzzzz help me .can i do somthing like this in MY SQL???[/QUOTE] Try to … | |
Re: [QUOTE=Narue;316474]>so are you normal in real life then? It depends on what you would call normal...[/QUOTE] but we still love you (even then you kicked my butt on C++ forum couple times :cheesy: ) [quote=jbennet]im always "online" thanks to the wonders of a bluetooth conencted phone and my pda (hehehe … | |
How do I call JAR which is in same folder as my java file? BUT I don't want to place this JAR file into JRE>lib>ext and also I don't want to create CLASSPATH for it. | |
Re: don't you think is funny you able to do GUI but not simple calculations?? anyway there are some examples of vending machine in Java section posted not long ago plus there is list of similar threads just bellow post | |
I'm trying to display text on GlassPane in front of image which I read in. There is no problem with image which does display but my text doesn't appear. What is wrong???? [code] import java.io.File; import java.io.IOException; import java.awt.*; import java.awt.image.RenderedImage; import javax.swing.*; import javax.media.jai.widget.ScrollingImagePanel; import javax.media.jai.NullOpImage; import javax.media.jai.OpImage; import … | |
Re: If I understand corectly, you try to open html document with Java. If so, you may want to read this [url]http://today.java.net/pub/a/today/2004/10/14/jdic1.html[/url] |
The End.