32,199 Topics
| |
hi there, how can I change string to xml and vise verse in java, in addition how can I add values to xml according to element name , I can imagine something like "setValue(elementName, the value) ; as we are using in java, any suggestions any help , please! thanks … | |
I wrote a program to write data in a text file to another text file .what i want to do is to open that modified second text file once I've entered data in to that | |
i wanted to print random line from a file. i knows how to print out the whole file but doesnt know how should i do to print a random lines from a file!!! hope someone can give me some ideals or an example. thanks! | |
Howdy, recently I saw something very strange popping up in my catalina.out log files. Where I used to see a class name and line number for the exception I now see "Unknown Source". Does anybody have any ideas why that happened? I need to get the class name and line … | |
Java vs .NET Which platform is better according to your opinions, Java or .NET, Post your reply here | |
Hai friends, How to send and receive mail from my gmail account through java program.is there any way to access? | |
| Hey guys, In Java, there is a method called substring, but what substitute does it have in Python, or do I have to explicitly do it like: [CODE] s=raw_input("Enter a sentence: ") s2="" a=0 b=0 for a in s: if(a==' '): s2= s[b:a] b=a a+=1[/CODE] Thanks guys! |
I have just made a banner in java applets and in status window also i have used a banner but in reverse direction to that of the other banner but the banner in status window does not make use of the whole space of the window and just runs in … | |
Hi Every body Good Day with u.... Help..me for How to find the details like IP, username, any updationby him of the visitors visit my webpage in java | |
hi all!i have problem to show JPanel in netbean with button here's the code [code=java] private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed NewJPanel x = new NewJPanel(); x.setVisible(true); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 30, Short.MAX_VALUE) .addComponent(x) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 30, Short.MAX_VALUE) .addComponent(x) ); [/code] my question how … | |
Q: Write a program that will determine if a number is even. The program should ask for a number, say X and printout whether "X is even" or " X is not even". This program must use a method with the signature "public static boolean isEven(int i)". | |
Respected mem, I m struggling to make a project on inventory management system. Which has 5 option on first screen.I will tell u later the remaining. Can u plz. help on this project. | |
Hi All I want to check whether there is a record present in my database with value: StartDate="Todays's Date" where start date is the column name with datatype DATE. | |
Hi all, I hope you are well. I am trying to explain some code to a friend : [CODE]StringConcatenate StringConcatenate1 = new StringConcatenate(); StringConcatenate1.stringConcat(); [/CODE] I said that this code creates an object "StringConcatenate1 " of type StringConcatenate and executes method stringConcat() (which is from class StringConcatenate()) on object StringConcatenate1. … | |
Hi, I was wondering if any one can help me with returning a array element to the main function. The array list will be the main function. I want to send the array list to a method that adds a element to that list and then send it back to … | |
hi, Well i am planning to develop the chatting application peer to peer as front end tool java so please guide me how the data will flow? | |
Hi All, I need information of a better Java hosting service (better in terms of performance, security, storage, reliability). So if any of you know such kind of service provider thn kindly let me know ASAP. It would be great help from your side. :) Thanks, Priti | |
Hello everyone, I am doing a project in which one requirement is to play a sequence of audio files..can someone help me with this please...i am really running out of time i just have 1 month to finish my project... | |
Hi, I need the solution to the below mentioned problem: A Scroll Banner is an applet which displays 2 scrolling messages across the applet’s Window. Since the scrolling of a message is a repetitive task, it is performed by a Separate thread, created by the applet when it is initialized. … | |
import java.util.*; class FindString { public static void main(String arg[]) { Scanner ob=new Scanner(System.in); String st="I am a student, you're also a ."; String search; String st2=""; String st3=""; int i,c=0; System.out.println(st); System.out.println("Enter your word to search: "); search=ob.next(); do { i=st.indexOf(search); if(i!=-1) { st2=st.substring(0,i); st2+=st3; st2+=st.substring(i+search.length()); c=c+1; st=st2; } … | |
I am currently doing a project on LR Parsers and need to code the algorithm using Java. The code should use the parse tables and determine wheather a word is accepted using the grammar provided and using the Parser tables. I am stuck on where to start so any advice … | |
Hi, I am having problems in accessing the value of a string variable (string1 here). It is working in one way when i put it inside constructor:- [CODE] public class Demo1 extends JFrame implements ActionListener, ItemListener public string string1; Demo1 { Action a1 = new AbstractAction("Some Action") { public void … | |
Hey there everyone. I David. I am have a problem with the end of line keystroke ( Ctrl+Z ) in the Netbeans and JBuilder Compiler, when I press the buttons simultaneously nothing happens but when I do it in Eclipse it works fine. Here is a look at the code.Help … | |
Hello, I am trying to read in a tab delimited text file. Most lines in the file are in the following format: [CODE] Col1 Col2 Col3 data1 data2 data3 data1 data2 data3 [/CODE] But some lines are missing the first value: [CODE] Col1 Col2 Col3 data1 data2 data3 data2 data3 … | |
edit: I see a lot of other threads on Daniweb on this. But after 2+ hours of reading about Sound in Java, I'm even more frustrated, so I have some questions. 1. Is the Java Sound API sufficient for the following operations: Playing mp3 audio files, pausing, and fast forward/rewinding … | |
I was Writing a code to connect data base and add the following code to my action.java Connection connection=getConnection("UserBook","UserBook123","catalog","localhost"); String sql="select BookName from book"; PreparedStatement ps=null; ps=connection.PreparedStatement(sql); ResultSet set=ps.executeQuery(); while(set!=null&&set.next()) { System.out.println(set.getString("BookName")); } connection.close(); the error i get is "The method PreparedStatement(String) is undefined for the type Connection" Need to … | |
Hello, I am trying to create a simple ftp client. I'm following the instructions from [URL="http://www.nsftools.com/tips/JavaFtp.htm"]http://www.nsftools.com/tips/JavaFtp.htm[/URL](option 4) If you take look at JakartaWrapperTest.java, The first line is import JakartaFtpWrapper; So When do javac JakartaFtpWrapper.java JakartaWrapperTest.java -cp commons-net-ftp-2.0.jar I get an error saying [B]'.' expected[/B]. And if I comment out the … | |
heres the code i put [ICODE] import java.net.URL; import com.sun.j3d.loaders.*; import com.glyphein.j3d.loaders.milkshape.MS3DLoader; public class shoulders { try { Scene s = null; Loader loader = new MS3DLoader (MS3DLoader.LOAD_ALL); // .ms3d Loader java.io.File file = new java.io.File("./model.ms3d"); if (file.getParent().length() > 0) loader.setBasePath(file.getParent() + java.io.File.separator); Scene scene = loader.load(file.getName()); BranchGroup group = … | |
Hi all, I need information of a better Java hosting service (better in terms of performance, security, storage, reliability). I do not want to compromise with performance and reliability/security. So if any of you know such kind of service provider thn kindly let me know ASAP. It would be great … |
The End.