35,618 Topics

Member Avatar for
Member Avatar for Sikter

Hello! I'm in a dilly of a pickle here and can't seem to get any answers on the web. My problem is one of EOF token recognition with CUP. When I define EOF as one of my terminals, CUP complains: Duplicate terminal (EOF) created So, I take it out, and …

Member Avatar for masijade
0
1K
Member Avatar for ankiwalia

hey guys, i'm new to java servlets..i have been making a website using java servlets on stock market and stuff...now what my query is that i want to retrieve data from database(ms-access) and display it on my html page.... i don't have much knowledge about html so i took a …

Member Avatar for javaAddict
0
120
Member Avatar for kaylors

Hey, I've been doing this little program to check if a number is a Keith number, and for some reason it's not working. I've gone over the code a few times but still can't detect the error. Could you please help? [CODE]static boolean isKeith(int n) { int sz=Func.sumDg(n); int arr[]=new …

Member Avatar for javaAddict
0
122
Member Avatar for msiq08

Hi all, I am building distributed calculator using java server, corba, .net client side UI that can load plugins at server side on runtime. plugins are .class files stored on server side and on client side plugins are added by getting list of all plugins(.class) in "plugins" folder and adding …

Member Avatar for masijade
0
92
Member Avatar for rattcod

hi i have a problem in running javascript code between jsp page.. lets below is my jsp body . [code=jsp]<body> <script language="javascript" > alert("hi"); </script> <h1>hello</hello> <% System.out.println("hello"); %> </body>[/code] in the above code there is no problem in running javascipt .. it gives hi alert easily but.. for below …

Member Avatar for rattcod
0
168
Member Avatar for pradeep_09

This error is triggerred whether the bpressed objects is an Integer or a string I have defined the seatno as a number type in ms access and status as a text type in ms access I hav tried [CODE]bpressed=Integer.parseInt(ae.getActionCommand())[/CODE] But it does not make any difference to the outcome Thanks …

-1
54
Member Avatar for atul vishwakarm

if(jText.getText==" "){ } //it will not Work & a Information is come up that "Comparing String using == ,!=". So,what I do for this code please give me answer of this Question in java.

Member Avatar for moutanna
0
48
Member Avatar for ayaz.ali

I want to create a a program in which i enter a word and the program counts the number of alphabets used in the word and display as output !! I know its simple but i am just a beginner and my teacher wants to submit this as assignment this …

Member Avatar for surbhi bhasker
0
411
Member Avatar for priteshdesai

I have to teach someone XML revalidation by tomorrow morning and I don't have much idea about it. It is something about XML schema and you have to revalidate it... Can you give me some idea about how I should go about it? [CODE]Given two abstract XML Schemas, S = …

-2
61
Member Avatar for cgeier

I am trying to write a program to display the unicode character when a user enters a unicode character code. ex: If the user enters: "\u00C3" in the textfield, I want to display a capital "A" with a tilda (~) over the top of it. Here's my code so far: …

Member Avatar for cgeier
0
2K
Member Avatar for Cort3z

I am trying to make a cookie that should contain a number value. It all work fine, unless the form that sends the info to my receiver page sends and empty string. Then something strange happens. It does not seem to be empty, so my error checker does not detect …

Member Avatar for ~s.o.s~
0
142
Member Avatar for Xessa

Hello. I have two questions about iText. The pdf file exactly has to be like the word file that was sent to me. In the word file; the character is Times New Roman and its 10 puntos. But in the pdf file when i try to do Times.Roman and 10 …

Member Avatar for peter_budo
0
114
Member Avatar for halona

I suppose to write a grammar file for assembly language program by using Java in ANTLR .. but I don't know from where should I start .. and what should I do.. I am lost.. any expert with this subject could help me :( I have read a lot but …

Member Avatar for halona
0
107
Member Avatar for xonxon

[code] import javax.swing.*; import java.awt.GridLayout; import java.awt.event.*; import java.text.*; public class TFE extends JFrame implements ActionListener { public TFE() { str txtfNum1,txtfNum2,lblAnswer; setLayout(new GridLayout(3,2,5,5)); add(new JLabel("First Number:")); add(txtfNum1); add(new JTextField(10)); add(new JLabel("Second Number:")); add(txtfNum2); add(new JTextField(10)); add(new JLabel("Total Summation:")); add(lblAnswer); txtfNum1.addActionListener(this); txtfNum2.addActionListener(this); } public void actionPerformed(ActionEvent e) { String str; …

Member Avatar for JamesCherrill
0
136
Member Avatar for ahmedshayan

Write a class Employee. An employee has a private first name (string), private last name (string), private job title (string), private employment ID (string), private monthly income (double), private joining date (string), and private mailing address (string). Provide a default constructor, a parameterized constructor, and a clone constructor. Write separate …

Member Avatar for ahmedshayan
0
237
Member Avatar for asong

i have this code [code=Java]//***************************************************** //Angles.java // // // //***************************************************** import java.util.Scanner; public class Angles { public static void main (String[] args) { double degree=1/360; double minutes=1/60; double seconds=1/60; double PI=3.14159;; Scanner scan = new Scanner(System.in); // takes the first angles from the user System.out.print("Enter the Degrees of the first …

Member Avatar for Airshow
0
222
Member Avatar for Room101

I'm attempting to create an applet for teaching languages, it plays a sound, then lets you record your voice, then plays back the sound again and then your voice. It has two buttons, one to move on to the next word, and another to repeat the same word (NOTE: repeat …

Member Avatar for Room101
0
86
Member Avatar for kreshan_489

The Question is: Write, compile ad test a program that stores two integers and allow the user to enter a character. If the character is A, add the two integers, if it is S subtract the second integer from the first one and if it is M multiply the two …

Member Avatar for kreshan_489
-1
326
Member Avatar for phazlyn

Hi, I'm doing a matrix of array n I have to assign each column with a letter or number so that when I shuffle the letters/numbers, it will print out accordingly. this is like the transposition cipher. I have 2 problems. 1. my matrix is not printing out like i …

Member Avatar for phazlyn
0
93
Member Avatar for koderz

Hi, all. I use FontMetrics for giving character width and it work!, but not for all fonts. For some fonts (for example "Times New Roman") for some chars 'f', 'j' - I give wrong char width and 'f' is overlap next char on drawing (top tail is not included in …

0
56
Member Avatar for ashishdmc4

Hello everyone.. I have a problem in my project. what i have done is when i login, if the username and password is correct it will redirect to a homepage which is in a new folder called private. I have a logout link in that home page which refers to …

Member Avatar for javaAddict
0
30
Member Avatar for madmudz

hi there i have a problem where i cannot find a way to make a java program to Write a program which asks the user how many days he will be working. Then calculate and print the amount of money he will earn if he is paid £1 for day …

Member Avatar for masijade
0
94
Member Avatar for Clawsy

I'm developing a bluetooth messaging application which sends text messages between devices. My problem is when I connect more than 2 devices. After sending some data between them (let us say 3 devices) I get this exception: javax.bluetooth.BluetoothStateException: too mach concurent requests at com.sun.kvem.jsr082.bluetooth.ServiceSearcher.start(ServiceSearcher.java:67) at com.sun.kvem.jsr082.bluetooth.DiscoveryAgentImpl.searchServices(DiscoveryAgentImpl.java:226) at javax.bluetooth.DiscoveryAgent.searchServices(DiscoveryAgent.java:259) at BSearch.deviceDiscovered(BSearch.java:78) …

Member Avatar for Clawsy
0
429
Member Avatar for thescroll

Hi there, I'm a new poster to these forums. A group of amateur programmers and I, some with C++ knowledge, others with Java knowledge, are planning to create a group project. My question is, is there a way to combine segments of Java and C++ code together into one program …

Member Avatar for restrictment
0
39
Member Avatar for ki72

I want to how to to use the constructor CreditCard, how to use the method "getNumber".

Member Avatar for ithelp
-2
70
Member Avatar for baek chay

hi there! im really having a hard time dealing with this problem.. hope someone can help me. i would really appreciate it.. the problem goes like this.. conical cups are to be made from a circular paper by removing a sector. by closing the remaining part of the circle, a …

Member Avatar for masijade
0
86
Member Avatar for agentgaurav007

Hi, I'm getting a [QUOTE]java.lang.NoSuchMethodError: main Exception in thread "main" [/QUOTE] error when trying to run this code. I have some variable being returned to the main method, but I don't know how else to write this program without doing that. Any help would be greatly appreciated. Thank you. [CODE]import …

Member Avatar for quuba
0
105
Member Avatar for RejectKid

ok so i need my code to be able to have the balls on the screen detect collision and remove a ball when they collide but for some reason every time i hit the add a ball button they disappear on me. and they dont detect collision in the first …

Member Avatar for quuba
0
234
Member Avatar for Room101

I'm having problems using my AudioPlayer class. I have a class that calls it which simply contains the following: [CODE=java]public class Test { public void test() { AudioPlayer ap1 = new AudioPlayer(); ap1.printUsageAndExit(); ap1.main({"a.wav"}); } }[/CODE] I recieve the error on line 6, when I call [CODE=java]ap1.main({"a.wav"});[/CODE] Note: When I …

Member Avatar for Room101
0
101
Member Avatar for low1988

[CODE] import java.util.*; class Painting { private String title; private String name; int value; public Painting(){} public Painting(String t,String n) { title = t; name = n; } public void setValue(int v) { value = v; } public void setPrice() { value = 400; } public String getTitle() { return …

Member Avatar for masijade
0
133

The End.