32,199 Topics

Member Avatar for
Member Avatar for intes77

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 …

Member Avatar for mr_bit
0
171
Member Avatar for anglaissam

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 …

Member Avatar for doubi
0
201
Member Avatar for abra_ka_dabra

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)...

Member Avatar for JamesCherrill
-1
329
Member Avatar for khairullah.kazimi.1
Member Avatar for ganges

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

Member Avatar for stultuske
0
122
Member Avatar for angelivanov

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 …

Member Avatar for JamesCherrill
0
1K
Member Avatar for pooh1234qwerty

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); …

Member Avatar for JamesCherrill
0
160
Member Avatar for vinnitro

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 …

Member Avatar for vinnitro
0
148
Member Avatar for london-G

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 …

Member Avatar for london-G
0
162
Member Avatar for moeketsi.mathe_1

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 …

Member Avatar for JamesCherrill
0
91
Member Avatar for Pobunjenik

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 …

Member Avatar for JamesCherrill
0
2K
Member Avatar for Anas Shahid

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**

Member Avatar for JamesCherrill
0
216
Member Avatar for Jorox03

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(); …

Member Avatar for Jorox03
0
218
Member Avatar for xxmp

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

Member Avatar for peter_budo
0
171
Member Avatar for Violet_82

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")

Member Avatar for Violet_82
0
269
Member Avatar for sushants
Member Avatar for JamesCherrill
-4
222
Member Avatar for abra_ka_dabra

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 …

Member Avatar for JamesCherrill
0
253
Member Avatar for london-G

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 …

Member Avatar for JamesCherrill
0
158
Member Avatar for game06

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. …

Member Avatar for pbj.codez
0
252
Member Avatar for Start4me

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. …

Member Avatar for Start4me
0
352
Member Avatar for karan.rks

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???

Member Avatar for stultuske
0
196
Member Avatar for abra_ka_dabra

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"); } }

Member Avatar for stultuske
0
173
Member Avatar for ganges

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.

Member Avatar for stultuske
0
64
Member Avatar for trisha mehta

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 …

Member Avatar for trisha mehta
0
5K
Member Avatar for laguardian

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 …

Member Avatar for stultuske
0
521
Member Avatar for CoilFyzx

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 …

Member Avatar for CoilFyzx
0
448
Member Avatar for poopuh

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?

Member Avatar for JamesCherrill
0
637
Member Avatar for abra_ka_dabra

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). …

Member Avatar for JamesCherrill
0
6K
Member Avatar for sirlink99

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. …

Member Avatar for sirlink99
0
541
Member Avatar for hashim5003

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 …

Member Avatar for hashim5003
0
4K

The End.