35,618 Topics
![]() | |
Hi, i need help creating a fuel volume calculator to estimate the gallons of fuel required to travel 5 distances so far the 5 distances in miles the user enters are stored in an array, however i need a sum to find the average of the five numbers here is … | |
Hello, I hope someone is more knowledgeable in Java than me while still knowing PHP! The following Java code makes a hash from a string, and I need a PHP equivalent that makes the exact same hashes. Simply md5() does not do the trick, and I looked at some PHP … | |
I have basic experience in the topic, enough for smaller projects but I would like to improve my knowledge. I would highly appriciate any source about good practices (I have hard time to decide whether a solution belongs in the "good practice" or just in the "good enough to use" … | |
I have made two method ExcelCreat() which create excel file And ExcelDownload() which download that excel file. Both work separate properly but not in same time. I made a `builder.append("<"<a href='/RestSimulator/rest/userReport/download' onclick='javascript:ExcelCreate();'>Download</a>");` problem is that when I click href(Download) then excel is not created show error 500 file not found … | |
Hi can you please help me on this how i can change jcombobox in my frame to jtextfield when i click on next button.. then i get the data from database in jtextfield... thx | |
We're creating a program based on the Opportunity card game. On each of the player's turn to draw, they have a 10% chance of drawing two cards instead of one at the price of 1000. How should we implement this? Thanks | |
how to create groovy client? getting an error, below. ** # start up jboss with following paremater: # ** set JAVA_OPTS= -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=C:\Java\jdk1.7.0\jre\lib\management\jmxremote.password -Dcom.sun.management.jmxremote.access.file=C:\Java\jdk1.7.0\jre\lib\management\jmxremote.access" ** # test jboss is started: # ** http://localhost:9990/ username: abc password: abc1# ** # Groovy script: # ** import javax.management.ObjectName import javax.management.remote.JMXConnectorFactory as … | |
I need to write a class that stores a user-input date as a String in the format mmddyyyy. The constructor validates the input, but it accepts a String input and it tokenizes it into three parts, all int variables and in order to do that I have to tokenize the … | |
Hi, I have a problem with a code i have done but i just a problem..If u look at what i have attached and try to run it..It gave me a problem as i am meant to have a menu which is meant to show something inside it but the … | |
hello every body. I need a book at java swing package.i am new in java programming and i want to learn GUI so plz help me. i want to download book of herbert schildt. book name swing a beginner guide Author Herbert Schildt | |
Hi all, I was just trying to write a simple prog in which i'm trying to add multiple components to a JPanel and inturn i'm adding that to a JScrollpane. Now the problem i'm facing is when i run the prog i can see the contents of the panel(not all) … | |
I have array of objects how to iterate throw this array and delete some objects depending on the condition: ArrayList<Book>b=new ArrayList<Book>(); for(int i = 0 ; i < b.size ; i ++){ //if some condition //remove b.get(i); } what should I do?? | |
Here is a piece of C++ code that seems very peculiar. For some strange reason, sorting the data miraculously makes the code almost six times faster: #include <algorithm> #include <ctime> #include <iostream> int main() { // Generate data const unsigned arraySize = 32768; int data[arraySize]; for (unsigned c = 0; … | |
Hi, I want to do full text search in mongoDB by using gridFS, but I couldn't success even though dealing with this problem too much. Can you help me please, thanx in advance. | |
I want to change two variables at once like when i set one to a value the other one is set to the same value . i used to do it with pointers in c++ but there are no pointers in java so i don't know how to do it … | |
Hi Dw I'm making a pos app and I would like to know if the jpos can control the device which is controlled by xfs written software. The xfs has commands in this format: AFD000 CDMOpenSafeDoor which is for opening the safe door when dispensing or should I also convert … | |
Hi Guys, I was trying to write a code to send AT command to a GSM modem. But i am facing problem while sending the AT command from UI. Below is the code: SEND.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { Thread runThread = new Thread(new Runnable() { @Override … | |
Hi i m new in java trying to do a small form for creating rows.. i have a next button to scroll all my database everytimes i run it i have the first record then it says null please find my code for this issue private void AfficherStagiaire(){ try { … | |
you can compile java codes in dos environment right? is it possible that errors in the codes found by the compiler be forwarded in a .txt fie? | |
Hi to all, Im going through JDBC currently, I got struck with Java.lang.ArrayIndexOutofBounds Exception:0. I'm not getting the solution to this exception. Please help me to solve this exception, thanks in advance. import java.sql.*; class Select { public static void main(String args[]) { try { Class.forName("jdbc.oracle.driver.OracleDriver"); Connection con = DriverManager.getConnection … | |
Its a simple example but I need to use structs to dynamically create radio buttons using the data stored in the ArrayList. This is the code from the java file. public void reset(ActionMapping mapping, HttpServletRequest request) { setGender(null); setGenderList(null); ArrayList gList = new ArrayList(); gList.add(new LabelValueBean("Male", "Male")); gList.add(new LabelValueBean("Female", "Female")); … | |
HI guys, I wonder if you can help me understanding this please. Take the following code: // Fig. 14.23: ListFrame.java // JList that displays a list of colors. import java.awt.FlowLayout; import java.awt.Color; import javax.swing.JFrame; import javax.swing.JList; import javax.swing.JScrollPane; import javax.swing.event.ListSelectionListener; import javax.swing.event.ListSelectionEvent; import javax.swing.ListSelectionModel; public class ListFrame extends JFrame { … | |
i want to bold table data in pdf and want to start table from 0 margin from lefr and right.. how it will be done? i tried so much but its not working top and bottom margin is working. but write not | |
Hello Everyone, Already my web project is developed by using jsp and servlets now I would like to do security check on each and every pages. so, is there any software to check whether my all pages are robust and secure before deploying on to the live server. Eg: Like … | |
I've been trying to compare a string which is stored in two diffrent variables(but the content is same). I get the two same inputs from user.. package switchcasepgm; import java.util.Scanner; public class stringcomp { public static void main(String[] args) { Scanner getinp=new Scanner(System.in); System.out.println(); String sdr = getinp.nextLine(); System.out.println(); String … | |
**hi guy recently i created one AbstracttableModel and one class named Veiculo, and i created a vector to hold Veiculo's data, i copied veiculo's data to text file named "UniVeiculo.txt", now i want read and show some data from UniVeiculo.txt to AbstractTableModel. i tryed use this code: String cod="",mark="",year="",color="",model="",plate="",owner="", List<Veiculo> … | |
So I've been working on this project of mine and I want to refactor it. What I have is a couple of cases that change my JButttons' icons. These cases are in a method that is in my public GUI class that extends JFrame. What I want to do is … | |
What is the difference in: Set<Object> linksSet = new LinkedHashSet<Object>(); LinkedHashSet<Object> linksSet = new LinkedHashSet<Object>(); Actually, I want to create a Set, that would hold the objects in the same order, I insert into it. Many thanks for the help, in advance. | |
Hey guys! So I'm trying to make a simple program that prints out the attributes of "Person". I'm kinda still practicing with java so I'm not sure what the errors are about. Here's what I have: Driver: public class Driver { public static void main(String[] args) { Person a = … |
The End.