35,618 Topics

Member Avatar for
Member Avatar for HelloMe

Hello guys... I have a strange problem on my calculation for a First in First Out Algorithm. The problem is, when i have to calculate 4 processes and above, the waiting time on my processes are wrong, but when i have to calculate only up to 3 processes it is …

Member Avatar for HelloMe
0
103
Member Avatar for rjdelight

Hi all, I'm trying to get the information from a text file to show up in the JTextArea I have in a GUI. I'm using the GUI editor in NetBeans, because I'm a Java newb. I've been reading a lot of things on the web and can't seem to figure …

Member Avatar for sirlink99
0
3K
Member Avatar for gunjannigam

I am using JPQL to write queries. I have an SQL as [CODE] SELECT * FROM `powergenerationdatapoint` AS pgdp INNER JOIN ( SELECT MAX( TIMESTAMP ) TIME FROM powergenerationdatapoint GROUP BY solarpanel_id )maxtime ON pgdp.timestamp = maxtime.time WHERE solarpanel_id IN ( SELECT id FROM solarpanel WHERE solar_plant_id =1 ) GROUP …

Member Avatar for mKorbel
0
97
Member Avatar for gedas

hey, i have created a project in netbeans that contains an applet, later i use that projects jar file in web project and i embed the applet in the html file. the annoying thing is that once i change something in my applet project the and i run the web …

Member Avatar for gedas
0
77
Member Avatar for kandyhyatt

I'm new to java and seriously needing some help..I'm having problems deciding accessor and mutator methods.. and how to create an ArrayList. Write a program that uses an ArrayList of parameter type Contact to store a database of contacts. The Contact class should store the contact's first and last name, …

Member Avatar for kandyhyatt
0
237
Member Avatar for shapam

how can i open .java extension file in jdk software.. i used edit keyword to open the .java file but jdk is not allowing me to open the .java file.. please any one fix this problem...

Member Avatar for stultuske
0
96
Member Avatar for gingerfish

i have this 2d array: String[][] testData= { {"s", "y", "r"}, {"s", "n", "r"}, {"w", "y", "r"}, {"s", "n", "r"} }; how can i count the occurrence of a particular element in the column of an array? for example i want to know how many "s" are in first column …

Member Avatar for gingerfish
0
3K
Member Avatar for joseph.roy9

i hav developed a java swing desktop application in eclipse & ubuntu;From where should i get the jar file of my appication or how to create jar file of my application??? thanks in advance...........

Member Avatar for JamesCherrill
0
212
Member Avatar for sirlink99

Is there a way to diplay a web page like google in an application in a JLabel for example. Kind of like the new minecraft launcher where it shows the update in a window about the login area. Thanks for any help.

Member Avatar for mKorbel
0
78
Member Avatar for keiteqq

if a word begins with a vowel (a-e-i-o-u), then "ay" is added to the end of the word (so "idle" -> "idleay", and "often" -> "oftenay"); on the other hand, if a word begins with a consonant, then the first letter is removed, and is placed at the end of …

Member Avatar for keiteqq
0
499
Member Avatar for arjuncc

hi, i am a newcomer in jsp. straight to the matter, my problem is, i have a parent page. one child pop-up is loaded from it say child1, and then next child child2 is loaded from child1. the problem is at the session out i need to close these two …

Member Avatar for youwill
0
130
Member Avatar for Slyvr

[CODE]PointerInfo a = MouseInfo.getPointerInfo(); Point b = a.getLocation(); int x = (int) b.getX(); int y = (int) b.getY(); System.out.print("Y: "+y); System.out.print("X: "+x+"\n");[/CODE] Right now I'm using this, but it gives me the coordinates relative to the entire monitor. Since you can move the program frame anywhere on the monitor, this …

Member Avatar for Slyvr
0
4K
Member Avatar for yo123
Member Avatar for valiandra
0
560
Member Avatar for gedas

hey, i have been trying to sign jar file in order to use my applet to connect to mysql database. i am using netbeans and i have been looking for the turorials how to sign jar file but all of them tend to skip steps and i am not sure …

Member Avatar for Ezzaral
0
105
Member Avatar for SeanC

Hi all, I'm currently trying to solve a problem with a JList. I've got an actionPerformed event applied to the JList (also tried the item updated event but it has the same effect), and whenever this event is fired, (i.e. the user makes a selection), something happens. Now, the problem …

Member Avatar for Ezzaral
0
402
Member Avatar for SMITA6076

I wrote the following method to get the current date for an invoice: [CODE] public String getDate() { DateFormat dateFormat = new SimpleDateFormat("MMMMMMMMM d, yyyy"); Date orderDate = new Date(); return dateFormat.format(orderDate); }[/CODE] but now I have to add two weeks (14 days) to that date (to get the expected …

Member Avatar for SMITA6076
0
922
Member Avatar for lu25

i have a file that contains hexadecimal values and i want to convert them to int how do u do that exactly?? [CODE] import java.util.Scanner; import java.io.File; import java.io.IOException; public class CacheSimulation { public static void main(String args[]) throws IOException { int hexAdd [] = new int [32]; //array to …

Member Avatar for Slyvr
0
177
Member Avatar for 24x24

Hey guys I had some homework in a Java class on Friday. I completed it so I am not looking for answers (I also don't think it will be graded). I was just curious, as a learning exercise, how would you guys improve this and why? Now remember I'm a …

Member Avatar for 24x24
1
182
Member Avatar for Aepexx

So what I'm aiming for here is to take the user's input as float and write code to split up that input into individual digits and use an array. How would I go about doing this? Here is what my code looks like currently: [CODE]import java.util.Scanner; public class Asn8 { …

Member Avatar for FRGT/10
0
230
Member Avatar for madhavipoudala

Hi everyone, i want to know the information about apache activemq which we are using as a broker for sending the messages using jms and websphere server from one server to another server which is the requirement of our project how to send the messages , how to do configiration …

Member Avatar for mKorbel
0
109
Member Avatar for arshi9464

i am designing a small client server system for a hospital, in this system a receptionist will forward the details of patients as they come to the particular doctor, like i go with a problem related to skin disease, my case would be transferred to that particular doc, I am …

Member Avatar for arshi9464
0
162
Member Avatar for D Silent KilLeR

Hi frnds............. I want to implement audio chat feature in my chat server ............ can anybody tell me how to implement it!!!!!!!!!! It's gud if anyone can provide me a small code for implement it..........

Member Avatar for hertze_bogdan
0
117
Member Avatar for HelloMe

Hello everybody...!!! I got a little but bothering problem. I create a First in First out algorithm schedule but somehow i have a problem in computing the WT(Waiting Time). Actually i have a WT but it only considers the current AT(Arrival Time) of the current process and does not include …

0
87
Member Avatar for pooran.c

import java.io.*; class InputDiagnosis{ public static void main(String args[]) throws IOException { char ch; int digit=0; int upper=0; int lower=0; int other=0; BufferedReader inputstream =new BufferedReader(new InputStreamReader(System.in)); System.out.println(" Type some text. When done, press Enter to Quit:"); do{ ch=(char) inputstream.read(); if(Character.isDigit(ch)) digit++; else if(Character.isUpperCase(ch)) upper++; else if(Character.isLowerCase(ch)) lower++; else other++; …

Member Avatar for abhishek20
0
191
Member Avatar for j_kathiresan

Hi, I'm having XML content as a string. I'm using W3C dom for getting values from the XML. I've a very large XML file with attributes, elements similar like below [CODE=xml]<Shares> <bookDetails bookName="How to Learn English" bookAuthor="English Writer"> <Chapter chapterName="From Alphabetes" chapterPage="23"/> </bookDetails> <company> <name>test</name> <address>test address</address> <contact>test contact</contact> <C02>10.5</C02> …

Member Avatar for thekashyap
0
230
Member Avatar for Galois77

Hello All, I have a question related to synchronization in java; there's more like a confirmation. Let's start with the simplified version of my class: [CODE]class MyClass { private List<MyObject> myList = new ArrayList(); public void addEntry(MyObject obj) { myList.add(obj); } public void removeEntry(MyObject obj) { myList.remove(obj); } public double …

Member Avatar for thekashyap
0
197
Member Avatar for spidey32

Hi, im new to this forum and also Java. Im currrently doing my degree 1st year. My lecturer gave me a question on factorial and im unable to solve it. i need to explain why any number of threads can be executing inside of it without causing interference in the …

Member Avatar for spidey32
0
104
Member Avatar for mjavaid

Hi all. How would I modify my current program to make it perform the conversion with the main method calling other methods instead of performing the conversion in the main method itself? I have attached a .pdf file that has a list of all the methods that must be used …

Member Avatar for mjavaid
0
112
Member Avatar for MWE_QUE

This JFrame opens and puts in the empty questions and answers when it starts as it should, but it doesn't print the questionList.size() at line 191. The next button also won't go to the next question which should be retrieved from the text file. I'm not sure if the questionList …

Member Avatar for MWE_QUE
0
238
Member Avatar for nickcolb

So far my professor has given us code and we basically "fill in the blanks" of the methods below the main code. I've done all the other methods, but am now stuck on the Taylor series portion. The code below is to calculate angles, and one of the methods called …

Member Avatar for Slimmy
0
1K

The End.