32,199 Topics
| |
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 … | |
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 … | |
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, … | |
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... | |
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 … | |
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........... | |
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. | |
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 … | |
[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 … | |
Does anyone the code to convert a JPEG colour image into a gray scale image??... | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 { … | |
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 … | |
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 … | |
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.......... | |
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 … | |
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++; … | |
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> … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … |
The End.