32,199 Topics

Member Avatar for
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
95
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
76
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
232
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
94
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
202
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
76
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
496
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
556
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
103
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
397
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
921
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
176
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
180
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
229
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
108
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
161
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
116
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
86
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
189
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
226
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
194
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
101
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
111
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
237
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
Member Avatar for sikelesS

Hi there, first post! First off, I apologise for asking such a basic question, but I am new to Java (done VB before..) and was wondering if you could please help me out with a little problem I'm having! I have a method that reads data from a text file, …

Member Avatar for Slimmy
0
191
Member Avatar for gstavreski

In one European country there are two types of music festivals national and international. All take place in one or more (sometimes random) days, but all days are in the same calendar year. For the national festival is significant whether or not have jury (that is giving additional prizes). For …

Member Avatar for gstavreski
-3
146
Member Avatar for Slyvr

This is my first time trying to use KeyListener and I just need it to move an image over 20 px every time I press the right arrow key. After 400px, it should move down to the next line vertically 'playery.' For Some reason it prints out the console output …

Member Avatar for Slyvr
0
133

The End.