32,199 Topics
| |
im having problems with my input. i want the output to look like this [CODE] Enter first string: first <- user input Enter second string: second <- user input The contents are first and second[/CODE] but the output doesnt look like that and the input is messed up. what seems … | |
Hi, i'm trying to write a small script for the website "www.fanfiction.net." This small perl script is part of a much larger script, which is why it has to be in Perl. When you are logged in and go to any of the stories on the site there is a … | |
Can somebody explain me how to use Comparator class for sorting using Arrays.sort? I have a 2d array.. supoose i want to sort the array 4 by 4 (let us say) using column 1 of array(let us say)... | |
hi have a nice time, I want to be an expert in Hibernate and decided to do certification in hibernate if there is any good books and links for hibernate projects kindly sugggest me, thanks in advance | |
I have been trying to implement a parallel Depth First Search in Java for undirected graph. The approach I decided to implement uses one global stack which is shared by all the threads and n local stacks where n is the number of threads. Each thread stores the nodes of … | |
this is my code to get an image named "hkkl.jpg" from documents and show it on applet. but it gives error saying: illegal unicode escape at /user and /documents.... import java.applet.*; import java.awt.*; public class Test extends Applet{ Image i; public void init(){ i=getImage("C:\users\both\documents","hkkl.jpg"); } public void paint(Graphics g){ g.drawImage(i,10,10,this); … | |
class test { public static void main(String []vinnitro) { int n=5; for(int i=1;i<=n;i++) { if(i<=n/2+1) { for(int j=1;j<=i;j++) { System.out.print("*"); } } else { for(int k=n/2+2;k>=i-1;k--) { System.out.print("*"); } } System.out.println(); } } } It works as i expected but it is still very difficult to understand for me even … | |
Hello, I don't know if I am posting this in the right section, I have a Java Database application(mysql). I have used netbeans to develop it. I have one table product_tbl which stores the stock level. I want to send an email notification to a specific email when the stock … | |
Using GUI (graphical user interface, i.e. Text-Fields, Buttons, Check-boxes, Lists, Labels) you are to create a car-shop or a restaurant-menu program that guides the buyer/customer. If it’s a car-shop to select a car they want, their desired specifications for that car, and finally displays an invoice as per car and … | |
Hi everyone! So, I hereby hope to show that I've made progress in coding java (largely due to the help of this great community). I want to thank everyone for dealing with me (especially James). :) The goal: The code below is supposed to seed a layout of boats into … | |
I Am relatively new to java database accessing.. I need to access an SQL Server database..basically i need to use it in Android but I am trying to create web service in java. can i have a sample code for it?? **Please Help** | |
I am try to populate a JComboBox with the days of a particular month and year. I researched the problem and came up with this: public void actionPerformed(ActionEvent e) { //code to respond to the buttons goes here if ( e.getSource() == cmbMonth || e.getSource() == cmbYear ) { cmbDay.removeAllItems(); … | |
Hello I made a site and i would like to update it at a server. I am from greece. Do you know which is the cost per year and a good and not very expensive server? Thank you | |
Chps still having big problems uploading java files onto the forum, I keep getting the below error ![a7770cd5e7699bf618ad96734e519ad8](/attachments/small/2/a7770cd5e7699bf618ad96734e519ad8.png "align-left") | |
I am trying to read a CSV file having no. of rows=row and no. of columns=col by the following method: public static String[][] FileIntoArray(int row, int col, String FileName){ int Filerow=0; int Filecol=0; String line; String[][] FileArray= new String[row][col]; File file = new File(FileName); try{ BufferedReader bf = new BufferedReader(new … | |
Hello Daniwebers, I have my login form inwhich I read the value in mysql table to identify whether the password match with the role. I have on combobox with different roles(director, assistant...) which I have filled in manually. It does the work but I would like to do something else … | |
i can some one help me with jframe and panel. i want to create button using jpanel. i look online but they seem to have different ways to do it and i have no idea which is the best way to do this. ex some people extends jframe at top. … | |
I've wrote a game. But when I compile, and run the main method, there is an error, saying: No main methods found or something like that. I have one class called Game.java, which is supposed to be the main one, and gameLoop.java. For unknown reasons, gameLoop doesnt want to compile. … | |
hey everybody im new to java i have a book and im learning the language from it but i want to know a compiler where i can run the programs i have "IDEA" but it is really confusing can anybidy help me please??? | |
How do i get the key of "tradeid3" ? Is there any inbuilt method that does it? import java.util.Map; import java.util.HashMap; import java.util.Iterator; public class abcd{ public static void main(String args[]){ Map m= new HashMap(); m.put("TRADEID1", "tradeid1"); m.put("TRADEID2", "tradeid2"); m.put("TRADEID3", "tradeid3"); } } | |
Hi, what are the essential jar files for a hibernare 4.0 project kindly provide me the name of those jar files thanks in advance. | |
hello, i have to write a java code using socket programming to transfer all the files from one server to another server keeping the size of the files intact (i.e create a backup of the files in another server). i am new to socket programming. so i would really appreciate … | |
Hey guys! I'm trying to create a program that first asks the user for an integer input *n*. The program will then ask the user for *n* Strings and store these in the array. This is what I have so far: public static void main (String args[]){ String[] strArray; int … | |
Hello Good day. Here is the problem I am trying to solve. I have a table as seen below. ![232465554203149acd8363d3a4a127ae](/attachments/large/3/232465554203149acd8363d3a4a127ae.jpg "232465554203149acd8363d3a4a127ae") My GOAL: Columns A through G are going to be filled with integers. (I have already created an integer model so that these cells only take integers). As the … | |
I've been asked to edit the code in this post http://www.daniweb.com/software-development/java/threads/455560/java-recursion-brute-force-sim so that it "Runs the function as a thread which wouldn’t then hang the program whilst it’s waiting for the result". I've looked it up, but I'm struggling to apply it to this program, any tips? | |
I am using the following code to write to the file out1.txt: try{ FileWriter fostream = new FileWriter("out1.txt"); BufferedWriter out = new BufferedWriter(fostream); out.write("jlsdfjdlsfhsdkjf"); out.close(); }catch (Exception e){ System.err.println("Error: " + e.getMessage()); } Now i want to write to multiple files in the same code (let us say 2 files). … | |
Hello. I submitted [this](http://www.daniweb.com/software-development/java/threads/455615/java-decryption-problem) post a little while ago where I had problems with decrypting what I encrypted. Now my problem is that when I encrypt something and then decrypt it, the decryption works with txt files, but when I try to decrypt microsoft documents, then they will not open. … | |
I want to count the number of attempts the user tried to guess the correct guess. How would i do that? like I have thought of a number. Try to guess it Take a guess: 5 Your guess is higher than mine Take a guess: 3 Your guess is lower … |
The End.