31,001 Topics
|
|
Hello, how does an Interpreter work ? I read up on it and it seems you just parse each line and then (somehow) execute the lines. I suppose the code needs instructions on how to execute each line ? |
|
Hi, I'm using multiset intersection function inorder to find the similar characters located in two sets. This is working good. I wanted to know if I can introduce a wild card in this intersection function such that if it finds the wild card it will ignore or consider as a … |
|
How to write a Java program to implement it. The program should be simple. It may ask for the sentence and returns the count of all parts of speech found in the sentence. Can any one idea to solve this type problem |
|
i am doing this gpa java program where I have to implement two method, one called calgpa and the next calqualitypoints, and i have also have to put in two java arrays one for the numbers of courses and the other for whats graded the problem my program is giving … |
|
I read http://www.java2s.com/Code/Java/Swing-JFC/ProgressBarDemolongtask.htm on how to do a progress bar and up to now, I am still at a loss of how to implement one progress bar. say I have I have 4 functions that stores some random text into a text file -function a stores the text in textfile … |
|
Hello..can anyone help me on how to make application flood using java coding? |
|
This is my link class fill-up form: private void cmd_updateActionPerformed(java.awt.event.ActionEvent evt) { UserClass UC = new UserClass(); String password = new String(PW.getPassword()); String confirmPassword = new String(RPW.getPassword()); try { if(!UN.getText().trim().equals("")&&!RPW.getText().trim().equals("")) { DefaultTableModel model = (DefaultTableModel) UC.table_user.getModel(); String value1 = UN.getText(); String value2 = PW.getPassword().toString(); model.setValueAt(value1, UC.table_user.getSelectedRow(), 0); model.setValueAt(value2, UC.table_user.getSelectedRow(), 1); … |
|
Hey guys, I'm working on a chat program where a UDP console-based chat program's client sends a message to the server and subsequently the server sends it to all other clients on the network. As of this moment the program is able to: 1. Client send message to server 2. … |
|
I installed Eclipse and it worked for few days and it nolonger openned giving error:- can someone help me (mbusi.ndlovu@gmail.com) Java was started but returned exit code=13 C:\ProgramData\Oracle\Java\javapath\javaw.exe -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmsx512m -jar C:\Program Files\eclipse-java-luna-SR2-win32-x86_64\eclipse\\plugins/org.eclipse.equinox.la uncher_1.3.0.v20140415-2008.jar -os win 32 -ws win32 -arch x86_64 -showsplash C:\Program Files\eclipse-java-luna-SR2-win32-x86\\plugins\org.eclipse.platform_4 .4.2v20150204-1700\splsh.bmp -launcher C:\Program Files\eclipse-java-luna-SR2-win32-x86_64\eclipse\eclipse.exe -name … |
|
Hi i am trying to make taxi meter which shows the current price.Rightnow I have to click startmeter afterevery 1 minute than it's update the new price but I want it to update automatically once the price change after 1 minute instead of me pressing startmeter everytime.thanks for your help. … |
|
Hello all: I'm teaching myself Java (but for now I'm using one of the Teach Yourself Java 7 books). I'm currently learning about channels and sockets and I'm reading about blocking an nonblocking methods. The book discusses a three steps to set up nonblocking communication, and because technology is ever … |
|
Hi Guys I have a program thats supposed to generate 9 random objects made from lines and then allow me to save the panel showing the state of all 9 objects. Currently all 9 objects are being generated and when i click save the panel is being saved to a … |
|
I need to fill an image created using a ton of QuadCurves, but they don't fill it all the way using the traditional fill method. Any suggestions? public class MonstercatComponent extends JComponent{ public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; drawGrid(g2); g2.setStroke(new BasicStroke(5)); QuadCurve2D earLeft1 = new QuadCurve2D.Double(145, 155, … |
|
I having a problem with the cloneNode tag problem. NodeList movielist = doc.getElementsByTagName("movie"); Element child = (Element)movielist.item(6); Element newNode = (Element)child.cloneNode(true); child.appendChild(newNode); newNode.setAttribute("id", "this is newnode"); code above will clone the whole set of thing. but the problem is it colne in wrong tag. i want some thing like this … |
|
I have texts (Paragraphs) and I want to replace each of annotated wrong word in the paragraph with the correct word indicated by the position (index) number of the wrong word and i need to do it for each paragraph... So, what method should I use to search by index … |
|
Below is the code i am using to create dropdown using listfields.In this i am able to create dropdown with hardcoded data binded to listfields with no Problem,but when i bind data from webservice when i clicked on horizontalfield(dropdown),first it shows the null pointer exception(White screen),by clicking middle button of … |
|
xml file <?xml version="1.0" encoding="UTF-8" standalone="no"?><movies> <movie id="1111"> <title>Blackhat</title> <genre>thriller</genre> <duration> 90 mins </duration> <age>28</age></movie> <movie id="1002"> <title>The Wedding Ringer</title> <genre>comedy</genre> <duration> 100 mins </duration> </movie> <movie id="1003"> <title>The Avengers</title> <genre>action</genre> <duration> 180 mins </duration> </movie> <movie id="1004"> <title>Taken 3</title> <genre>action</genre> <duration> 100 mins </duration> </movie> <movie id="1005"> <title>Insurgent</title> <genre>Science … |
|
here I am again, I am currently stuck on round 1 and I have two week to build this game, and I am from there, system.out.println(hello, p2 what is your name) p2name = dashin.next(); system.out.println(now tell me love, what is your age p2); p2age = dashin.nextInt(); if(age < 4 || … |
|
Hi I did a Simpletron program in GUI interface, but when I want to print the instructions in the window, it will not be as I want to. I used JGrasp to run the program and it just prints the instruction after each and not the way I wrote it … |
|
ok, so i know this is stupid and probably the easiest thing in java but my brain is not working right now. so i'll ask, how do you add the numbers after you divide them in a for loop. for example: i ask a user to enter a number, the … |
|
try { File file = new File("/Users/Alex Ting/Desktop/test2/MovieList.xml"); DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = dBuilder.parse(file); NodeList movielist = doc.getElementsByTagName("movie"); for(int i =0;i<movielist.getLength(); i++){ Node m=movielist.item(i); if(m.getNodeType()==Node.ELEMENT_NODE){ Element movie = (Element) m; String movieID = movie.getAttribute("id"); NodeList mnamelist=movie.getChildNodes(); for(int j=0;j<movielist.getLength(); j++){ Node n = mnamelist.item(j); if(n.getNodeType()==Node.ELEMENT_NODE){ Element name = (Element) … |
|
for(int i =0;i<movielist.getLength(); i++){ Node m=movielist.item(i); if(m.getNodeType()==Node.ELEMENT_NODE){ Element movie = (Element) m; String movieID = movie.getAttributes("movie id"); NodeList mnamelist=movie.getChildNodes(); for(int j=0;j<movielist.getLength(); j++){ Node n = mnamelist.item(j); if(n.getNodeType()==Node.ELEMENT_NODE){ Element name = (Element) n; //System.out.println("MovieID: "+ movie id + name.getTagName()+ ": "+ name.getTextContent()); } } } } it gave me error of … |
|
I want to pass the string from client to server and the server will display the string. First the client enter the option 1 and the server will reply ask from the movie name. My problem is i cannot enter the name from client and send it to server and … |
|
Hi, I am getting this error and just can not figure out what is causing it. I have looked at code from 2 different books. I have google searched. Here is part of my program that contains the code giving me problems. I posted the program from the beginning to … |
|
Hi everybody; I am a beginner in the BPEL development. I need tutorials that can help me to implement the parsing of a BPEL process into graph under netbeans 6.7 (the API that should be installed etc ( I have installed the JDOM API). I will be grateful if you … |
|
Hello, I've been working on this chat program which has a gui. Basically for now im just pressing start then connect to get a connection. Start is for the server window and if you press connect that will be the client window. I can send messages from the client to … |
|
Based on my understanding, both are doing the same way which also kind of override the methods. Abstract method is, both childclasses are having the same methods, but different execution code. Interface is, whenever the class implement the interface class, the class must write the execution of all the methods … |
|
I have a Task class (superclass) which inherited PracticeTest class(childclass). I'd faced question regarding my pass year question. In fact, we are allowed to declared like this Task aTask = new PracticeTest(); But i wonder why we are doing this way? Thanks for advance explanation. |
|
I want to get all the vertices from an ARC. I have all the data (for ex : start point, end point, start angle, end angle, radius) which will used to draw an arc but my need is I have to generate all the vertices from the arc data. I … |
|
I keep getting this error message when I try to run ----jGRASP exec: java DomParserExample Exception in thread "main" java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:615) at DomParserExample.getIntValue(DomParserExample.java:152) at DomParserExample.getAlbum(DomParserExample.java:111) at DomParserExample.parseDocument(DomParserExample.java:89) at DomParserExample.runExample(DomParserExample.java:35) at DomParserExample.main(DomParserExample.java:177) ----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete. Here is my code that I … |
The End.