32,199 Topics

Member Avatar for
Member Avatar for london-G

Hello, I am developing a database system and as part of a project I have been asked to look into fault tolerance. From what I understand a fault tolerant program is a program that is not vulnerable to errors. Any ideas how I can ensure that the program I am …

Member Avatar for Schol-R-LEA
0
186
Member Avatar for shockwave_05

Implement a shape hierarchy. you must have your superclass [B]shape[/B] and 2 subclasses [B]two-dimensional shape[/B] and [B]three-dimensional shape[/B]. Under two-dimensional shape, you have other subclasses, [B]circle, square, and triangle[/B]. Under the three-dimensional shape you have the [B]sphere, cube, and tetrahedron[/B]. Each two-dimensional shape should contain a method [I]getArea[/I] to calculate …

Member Avatar for wiggles29
0
5K
Member Avatar for Joseph_13

Can someone kindly help me with a solution to this assignment http://math.hws.edu/eck/cs225/s09/lab9/ CPSC 225, Spring 2009 Lab 9: Sets in the Java Collection Framework For this week's lab, you will use two of the classes in the Java Collection Framework: HashSet and TreeSet. You will use these classes to implement …

Member Avatar for stultuske
0
793
Member Avatar for kovacsakos

I have a 2D arraylist, named as adjLists, which contains arraylists, containing values like these. Each two values are a "pair" and each third is a "flag" for the pair. [278, 106, 0, 397, 36, 0, 59, 208, 0, 366, 221, 0] [366, 221, 0, 397, 36, 0, 132, 390, …

Member Avatar for kovacsakos
0
684
Member Avatar for Levellous

Hellooo, Is there a way to compare a datagram packet's IP address with the host's IP address? Because i have a client/server (client is acting as a client & server) class that uses multisocket to broadcast to every host it'll send the datagram to itself as well, which i don't …

Member Avatar for Levellous
0
252
Member Avatar for Vanquish39

How can I rewrite this with java config? <int-kafka:outbound-channel-adapter id="mainOutboundChannelAdapter" kafka-producer-context-ref="kafkaProducerContext" channel="mainOutboundTopicChanel"> </int-kafka:outbound-channel-adapter>

0
141
Member Avatar for XodoX

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 ?

Member Avatar for sepp2k
0
117
Member Avatar for srikanth2321

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 …

0
79
Member Avatar for ahtisham.baloch.3

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

Member Avatar for JamesCherrill
-2
124
Member Avatar for divinity02

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 …

Member Avatar for JamesCherrill
0
218
Member Avatar for sam_7

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 …

Member Avatar for JamesCherrill
0
179
Member Avatar for nananini

Hello..can anyone help me on how to make application flood using java coding?

Member Avatar for JamesCherrill
0
57
Member Avatar for Abdullah_7

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

Member Avatar for JamesCherrill
0
186
Member Avatar for Levellous

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

Member Avatar for JamesCherrill
0
355
Member Avatar for Mbusi

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 …

Member Avatar for Mbusi
0
574
Member Avatar for ali11

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

Member Avatar for stultuske
0
148
Member Avatar for TekknoDraykko

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 …

Member Avatar for TekknoDraykko
0
99
Member Avatar for spud91

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 …

Member Avatar for JamesCherrill
0
395
Member Avatar for pars99

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

Member Avatar for mKorbel
0
380
Member Avatar for sing1006

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 …

Member Avatar for sing1006
0
332
Member Avatar for iris91

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 …

Member Avatar for JamesCherrill
0
388
Member Avatar for usiyalla

Can any one send me the config setting for jdbc and mysql using apache server setting in netbean. i wanna use jsp with xampp and jdbc

Member Avatar for hemeneugene
0
813
Member Avatar for berryandcherry

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 …

0
192
Member Avatar for sing1006

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 …

Member Avatar for JeffGrigg
0
338
Member Avatar for divinity02

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

Member Avatar for stultuske
0
220
Member Avatar for Mike1986

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 …

Member Avatar for JamesCherrill
0
469
Member Avatar for noobjavacoder

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 …

Member Avatar for noobjavacoder
0
162
Member Avatar for sing1006

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

Member Avatar for JeffGrigg
0
341
Member Avatar for sing1006

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 …

Member Avatar for sing1006
0
221
Member Avatar for sing1006

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 …

Member Avatar for sing1006
0
1K

The End.