35,618 Topics
![]() | |
Hey Guys, please I need help badly. Thank You I read a text file from my hard disk which contains as follows.... void main() { int A = 5; int B = 5; int C ; C = A + B; cout << C ; } So, what I need … | |
how do I put hexadecimal values into a byte array?? I did the following private byte[] buffer=new byte[] { (byte)0xC8, 00, 0x09, 0x4A, 32, 0x4D, 45, 76, 33, 0x2E, 30, 32, 00, 05, 00, 00 }; but when i print them using System.out.print(...), the output is -56 0 9 74 … | |
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { DefaultListModel list = (DefaultListModel) jList1.getModel(); String sql = "Select * from salesorder"; try { Class.forName("com.mysql.jdbc.Driver"); Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost/userauthentication", "root", ""); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(sql); while (rs.next()) { Integer id = rs.getInt("id"); list.addElement(id); } jList1.setModel(list); } catch (Exception e) { … | |
My professor gave us an assignment that I am not entirely sure how to start correctly. She gave us 2 java classes as well to use. Any assistance would be greatly appreciated... So basically, two things need to be done. I need to create two more classes, ExternalHashing and IndexHashTable...and … | |
I have to do a second assigment on doubly linked lists. Problem description: Create a class to implement a doubly linked list to store student records. Besides the basic operations, the class should include a sorting method that allow the user to sort the records in the list. Programming Requirements: … | |
I've been trying to install Java 3d on mac but to no avail, the official instructions don't even seem to work, does anyone know the correct and exact procedure to install Java3D on a mac. | |
![]() | hey guys, this is my code so far, it genarate 10 numbers between 100-1000 what I want to ask how I can let the program ask how many numbers I need to genarate , and whats the lowers bound, instead of 10, the i can choose any number ? also … |
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" p:packagesToScan="jpatest.engine"> <property name="dataSource"> <bean class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="org.firebirdsql.jdbc.FBDriver" /> <property name="url" value="jdbc:firebirdsql://localhost:3050/testdb" /> <property name="username" value="xxxxxxxx" /> <property name="password" value="yyyyyy" /> </bean> </property> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="database" value="DEFAULT" /> <property name="showSql" value="true" /> <property name="databasePlatform" value="org.hibernate.dialect.FirebirdDialect" /> </bean> </property> <property name="loadTimeWeaver"> <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" /> </property> … | |
HI all, please any one help,its very urgent.I need to store one table in an object (collection) then want to retrieve. so i have confusion which is the best method to use whether list,map,set........ etc and my table values are upto 11 records. | |
I am beginner on java and i am having trouble while compiling below given code on CMD. **This code is taken from a book.** > E:\sher\SkyDrive\Exercise Files\L04>javac Student.java > > E:\sher\SkyDrive\Exercise Files\L04>java Student > Exception in thread "main" java.lang.NoSuchMethodError: main > // Student.java /* Demostrates the most basic features of … | |
Part of a program I did. I don't understand why it doesn't work. import java.util.Scanner; public class Reports { public static void main(String args[]) { int[][] sales = new int[6][4]; String [] company = {"Dallas","Chicago","Boston","New York","Seattle","Washington"}; EnterData(sales,company); Highest(sales,company); } public static void EnterData(int sales[][],String company[]) { Scanner input = new … | |
I need to convert python code to javascript. do anyone here know javascript? please give your mail id i will sent the python code to your mail! thanks in advance :) | |
Well I need help one of the two questions which are similar to the topic I'm asking. The first question that I solve was "Taller method should return true if the tree on which the method is invoked has a greater height than the tree passes as a paramter". public … | |
Hey, Does anyone see anything wrong with this? I don't know what's up, it's throwing the IOException everyt time even though the mp3 is in the source folder. (I tried .wav as well). I'm trying to place this in a GUI, but testing it seperately first. import java.io.*; import sun.audio.*; … | |
when I run eclipse (just downloaded the 32 bit version from the website) it gives an error dialog that says 'a java runtime enviroment or java development kit just be available in order to run Eclipse. No java virtual machine was found after searching the following locations: " and it … | |
HI all, I am trying to validate the input in my tic-tac-toe program. I had a good look around on the net and tried a few combinations, but I couldn't get anywhere. Some people seem to be using methods like hasNextInt(), some other a try and catch statement. I tried … | |
So I have to make a java program that lets you enter test scores and then displays the test scores back to you showing the number of A's, B's' C's, 'D's F's entered based on the numbers put into the program. The program is supposed to end when you enter … | |
hey there, I have created this simple app that makes use of a Robot instance. It is a network app that I control using telnet. I have tried it in two different computers. It works fine. However, in one of my computers, I manage to start my robot app through … | |
I am making a program that does synthetic division, except for it is not showing the quotient only the remainder. I have checked my for loops so many times, and I can't understant what is happening here is my code: import java.util.*; import java.lang.*; class synthetic { static Scanner userInput … | |
How do i pass file name ("chosenFileName") from sample2 class to sample1 class? An example would be nice. here's some code from sample 2 class - private void openFile( ) { JFileChooser chooser; int status; chooser = new JFileChooser( ); status = chooser.showOpenDialog(null); if (status == JFileChooser.APPROVE_OPTION) readSource(chooser.getSelectedFile()); else JOptionPane.showMessageDialog(null, … | |
I have two textfields which are formatted for dates, i want to retrieve data from the database within a period of days which the two textfields stand for the "from" and "to" dates.Can anybody help me out? select distinct courseId,courseName,description,Date,amount from course where date>='2013/05/11' and date<='2013/05/11' for the SQL queries … | |
Let me start by saying I'm a noob. I want to get input from a text file through gui and perform some actions.the last time I did it I used command line argument to pass file name to get file input. The code in quote. It works when I uncomment … | |
I am trying to create breakout game like this below. http://www.2dplay.com/break-out/break-out-play.htm I like how when balls bounces on paddle you have control over where it is goings. i need help creating some thing like this //this is my code for when ball touch the paddle(player). i have divide the paddle … | |
Hi, I'm working on an assignment for programming class where we're supposed to create a method that takes the contents from a text file (one giant string) and stores them piece by piece in a linked list. I'm a little stuck and not sure where to go from here, or … | |
When I was going through a program of my friends, suddenly I came across a strange for loop, I was wondering about the for loop since then, the loop looked like this for(1=0,ii=result.length;i<ii;i++) Is this for loop a valid for loop? Can any one please help me? | |
package com.example.crypton; import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.Contacts; import android.provider.Contacts.People; import android.provider.ContactsContract; import android.provider.ContactsContract.CommonDataKinds; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.StructuredName; import android.provider.ContactsContract.Data; import android.telephony.SmsManager; import android.util.Log; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import android.app.PendingIntent; public class CREATEMESSAGE extends … | |
Hello, I trying to create a **messenger**(just for practice, so nothing fancy!). I created the server and client programs. Suppose a client(user A) initiated a connection with the server, so it's online. Now, another user(user B) wants to chat with that user(A). How do I give User B the IP … | |
Hello, I'm having a bit of trouble with this error. The error seems to be wih setRented but I'm not really sure what to change. This is my interface public interface Rentable{ double getRent(); void setRent (double rent); boolean isRented(); void setRented (boolean rented); } This is my abstract class … | |
**give me source code if anyone can** | |
Hi, I am currently working on project wherein I am inserting thousands of records in database using spring batch. So is there any way where I can handle exceptions in my ItemReader and ItemWriter? I need to apply logic for failure of records when job executes i.e if I am … |
The End.