Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
50% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
2 Commented Posts
~8K People Reached
Favorite Tags

55 Posted Topics

Member Avatar for I<LateNupurGuha
Member Avatar for Chaster

Hi all! My problem is the following: I'm using Spring MVC, and trying to use several controllers (one for each jsp). My controllers are defined in the xml like: <bean id="/login.htm" class="controllers.LoginController" /> <bean id="/menu.htm" class="controllers.MenuController" /> inside LoginController's onSubmit I do a ModelAndView("menu", ...). That is OK, the menu …

0
83
Member Avatar for IMtheBESTatJAVA

Well, if you know for sure that the license plate has the format "LLL NNN" (I mean letter by L and number by N), then you can get the integer value like this: [CODE] int anIntegerValue = Integer.parseInt(inputString.substring(4, 7)); [/CODE] provided that inputString is a variable of type String, which …

Member Avatar for camcamcam
0
312
Member Avatar for Chaster

Hi all, I have a JTree (JXTreeTable actually, but anyway, it should be similar). I use setShowsRootHandles(true), but the handles are not displayed. Do you know what may cause the problem? My current look and feel settings support these kinds of things. Thanks in advance.

0
69
Member Avatar for Chaster

Hi all, I've been struggling with a Swing issue for days now, maybe someone can help me :) I would like to see several icons at the left hand side of a JTree element. Is that possible? I mean i know that I have to create some tricky cell renderer …

Member Avatar for Ezzaral
0
90
Member Avatar for pavani2006

Just an idea: Two words are usually separated by " "(SPACE). So, you have a string, containing some words. Now you start from the end of the string, and put the character into a new string's 0th position. Test if the next character is space. If not shift the new …

Member Avatar for devaru2003
0
222
Member Avatar for Chaster

Hi all, I've been searching for some time without any success. Here's the problem: I have an SWT GUI, which contains some UI elements placed onto a Composite. I would like to dynamically add a new Composite to the old one, when a certain event is triggered. Fine everything works …

Member Avatar for mostafaelshafei
0
463
Member Avatar for Chaster

Hi all, I have two strings, in which the order of words may differ. I would like to hash both of them and obtain the very same hash code for them. So I need a hash that returns the same value for "Hello world" and " world Hello". Does such …

Member Avatar for javaAddict
0
80
Member Avatar for Chaster

Maybe not the best forum to post this, but anyway; The problem is that I have a DB table that has a composite PK.This composite key is built up from an id, and a foreign key which is another id in another table. I have the mappings for these tables, …

0
49
Member Avatar for aumi

[QUOTE=aumi;665583]Hi, i need some help. i have an assignment on "Airline Ticket Reservations System". i have to submit it on 10th August, 2008. I tried but can't solve it. please help me. The question is given below : 1. Consider a new airline agency “BEST AIR” that launches recently in …

Member Avatar for ithelp
0
321
Member Avatar for Chaster

Hello guys, I don't really need a solution, just answer - some Swing insight. So I have a panel, and a list on it. The list is populated with strings. The problem is the following: If I add the list elements too fast, I end up with different kinds of …

Member Avatar for quuba
0
127
Member Avatar for Chaster

Hello, In my application, as a result of P2P communication, I receive a String object, which is the serialized representation of a Hashtable. Can I somehow recover my original object? I've never done such thing before, and I couldn't find any example which would help. Thanks in advance, Chaster

Member Avatar for verruckt24
0
85
Member Avatar for daniellamae

Well, we are not supposed to do your homework, but here is some code you can use as starting point. So, the code for the recursive input: [code] void readA(int A[]){ if (nr>0) { printf("\nenter an integer : "); scanf("%d",&A[--nr]); readA(A); } [/code] And also put this in the main …

Member Avatar for csurfer
0
126
Member Avatar for Chaster

Yellow, From my application - for some reason - I am able to send messages up to only 64k. I've been wondering if it is possible to split an InputStream into partitions of 64k, and then, on client side to join them again. Is this possible? Have you ever done …

Member Avatar for BestJewSinceJC
0
84
Member Avatar for Chaster

Hello, Can somebody help me out? Well, the problem is the following: I have a JSF page, and the address bar contains a query string, like "...?author=something&title=something". I also have a command button, in its action I want to extract the parameters. So, in the bean I have the following …

0
94
Member Avatar for Chaster

Hi, I'v been trying to write a simple Java EE app, which deals with car renting. The entity beans and session beans are ready, so I've created a JSP for representation. It contains a single method, for init: [CODE] <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> …

Member Avatar for shurdsfield
0
158
Member Avatar for enuff4life

[CODE] String s = new String(""); String s1 = new String(""); System.out.println("enter String : "); Scanner keyboard = new Scanner(System.in); while(!s.equals("end")){ s = keyboard.next(); s1 += s+" "; // or s1 += s+"/n"; } System.out.println("you've typed: \n"); System.out.println(s1);[/CODE]

Member Avatar for stultuske
0
313
Member Avatar for chengineer

well you have a few mistakes.. For ex. ageOf Interest is what? I mean is it a variable (and should be ageOfInterest)? Then, you define twice the variable trainingzone. The second one should be trainingzone1 or something like that. And to read double values from standard input you need first …

Member Avatar for masijade
0
146
Member Avatar for Chaster

Hello, How can I get a reference to a session? I have a page, which forms a query string, and in another page I would like to display the attributes of it. I don't want to introduce scriplets, so I am trying to do this in a pure Java file, …

Member Avatar for ~s.o.s~
0
104
Member Avatar for sbm

I've compiled and run it without problems; Enter the number corresponding to ... : 1 Please enter the number of ... : 40 Output: Gross Pay - 365.50 Payable Tax - 58.10 Net Pay - 307.40 Which was your test data for which the program crashed?

Member Avatar for sbm
0
125
Member Avatar for IrishUpstart

You could try a double variable, like this: [CODE] for (float c=0.0;c<2.1;c+=0.02) { ... } [/CODE] Inside that for, you compute the values for your function, then you save these either in an array of type double, or (if you want them to be available later) into a text file.

Member Avatar for ArkM
0
152
Member Avatar for rione

I'm sure Google will help you out. Try searching for 'Power Set Java' Why do you take OOP courses (or whatever) if you don't want to learn?

Member Avatar for Chaster
0
102
Member Avatar for nitric0

Try this: have a variable for each drink (you can have an array as well, if you want) and proceed as follows: - when a new person comes, increment the person variable - read their choice - if choice = 1, increment the variable for tea, if choice = 2, …

Member Avatar for Alex Edwards
0
122
Member Avatar for arupa

Ok, I see. What is your question? Or your contribution? Well, I tell you, nobody will help you, unless you show some effort. So please, ask (a) question(s).

Member Avatar for LizR
0
108
Member Avatar for praful_engg

Excuse me, are you looking for ideas or complete source code??? For project themes check this out: [url]http://mindprod.com/jgloss/jagg.html[/url]. If you want a complete project... then sorry, you won't take this exam.

Member Avatar for stultuske
-1
136
Member Avatar for ezkonekgal

[QUOTE=ai0372;715623]what does it mean when you say' reading a java text file?' what does it mean when you say 'writing a java text file?'[/QUOTE] Files in Java are usually holders of different kinds of data. Reading a text file usually means taking a piece of information out of the file. …

Member Avatar for stultuske
0
168
Member Avatar for Chaster

Hi, I have some project in which I have to deal with similar text files merging. Is there any java package for this task? If no, does anyone know how CVS (or any other version control tool) deals with such merging operations? I mean based on what? Any personal idea …

Member Avatar for Ezzaral
0
85
Member Avatar for Chaster

I've got some homework to do, but I cannot go through this issue. I want my .aspx page to display my database records, one below another. In order to do this I use a GridView, while the data is stored in an ArrayList. This ArrayList is composed of User objects, …

Member Avatar for serkan sendur
0
126
Member Avatar for Chaster

Hi, I have a little servlet which does the following: [CODE] package Services; import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.Random; public class Service extends HttpServlet{ private String getContinent() { Random random = new Random(); int continent = random.nextInt(6); switch (continent) { case 0: return "EUROPE"; case 1: …

0
52
Member Avatar for Chaster

Hello. Well, I've been trying to create a a web app, using JSP+JSF technologies. I've completed writing the background classes, and also created a test jsp page: [CODE] <html xmlns="http://www.w3.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xml:lang="en" lang="en"> <jsp:directive.page contentType="application/xhtml+xml; charset=UTF-8"/> <head> <title>Please log in</title> </head> <body> <f:view> <h:form id="loginform"> <h:outputText value="Something"/> <h:commandButton …

0
51
Member Avatar for Chaster

Hi guys, the thing is: suppose that there is an application (assumed that we are using Windows) waiting for some input data. This could be a password, path, search criteria (for example in the case of Google). I would like my Java application to 'enter' some text, and then to …

Member Avatar for Alex Edwards
0
123
Member Avatar for RituNimitNayal

[QUOTE=RituNimitNayal;677370]Hi, How to find out the repeating substrings in a string which is having maximum characters. eg : abc abcd a abc abcd Answer : abcd[/QUOTE] Suppose you have a variable of type string. Let's apply a string tokenizer on it (contained in java.util if i'm not mistaken), with the …

Member Avatar for Chaster
0
96
Member Avatar for AirmanTheGreat

You should read a value, parse it put in your array and then start over. You cannot have parsedouble[] (actually the correct version is parseDouble(args)). When you read a value, you cannot convert it to an array. Just put it to the next location in your array.

Member Avatar for AirmanTheGreat
0
212
Member Avatar for teh noobshow

Dude, what is this piece of code supposed to do? By the way, first you should take a look on Java syntax. And also, start with 'Hello World' type applications to learn how to write correct, readable Java code.

Member Avatar for Ezzaral
0
146
Member Avatar for hny_lyn

[QUOTE=hny_lyn;668802]hello to all!!! i really don't have any problem this time, but there's something i wanna learn more about! we are discussing classes and inheritance now!! my professor have given us quite examples of it....but it wasn't that clear!! can i ask for a simple codes that implements a class …

Member Avatar for javaAddict
0
196
Member Avatar for m_banerjeein

[QUOTE=m_banerjeein;667944]Hi All Guys few quick questions on C.. 1. What does "static void <function_name>(argument1,argument2)" means.. 2. Whether this would give a compilation error if i write this piece of code... int a =1 , b=2,c=3 ; (a=b)=c;[/QUOTE] Well, [B]static [/B]means (at least in Java, but I think it's the same) …

Member Avatar for jephthah
0
129
Member Avatar for flecture

[QUOTE=flecture;667880]i created a header file named "pop.h" and saved in tc->include folder.......the codes included in header file is shown below [code]#include<stdio.h> #include<conio.h> int ssipower(int,int); void main() { clrscr(); printf("power=%d",ssipower(3,3)); getch(); } int ssipower(int a, int b) { int i,c=1; for(i=1;i<=b;i++) { c=a*c; return c; } [/code] when i tried to …

Member Avatar for jephthah
0
83
Member Avatar for Aamit

Here is what I use:[CODE] public final class Mail { public static final void sendMessage(String mailAddress, String text, String subject) throws Exception { Properties myProperties=new Properties(); myProperties.put("mail.smtp.host", someHost); myProperties.put("mail.smtp.auth", "true"); myProperties.put("mail.debug", "false"); myProperties.put("mail.smtp.starttls.enable", "true"); LmsAuthenticator ax = new LmsAuthenticator(address, pass); Session ses = Session.getInstance(myProperties,ax); Message msg=new MimeMessage(ses); InternetAddress fromAddress = …

Member Avatar for Chaster
0
160
Member Avatar for Herd_ya

[QUOTE=Herd_ya;665215]I am relatively new to java, and i really don't understand some of the things going on. A freind gave me his java exam from his first year at universtity, and said it was relatively easy, i still do not understand it, so i thought i would ask here to …

Member Avatar for Chaster
0
137
Member Avatar for Chaster

Hi everyone, well, my problem would be:There is a database server which contains no databases. So there is nothing to connect to (as it is needed by the DriverManager.getConnection instruction). How can I create a new database under these circumstances? Thanks, Chaster

Member Avatar for Chaster
0
136
Member Avatar for dajiebuda

Hi! You could define a method, let's say popUp(): [code] private void popUp() { JFrame frame = new JFrame("aName"); frame.setSize(500, 500); frame.setVisible(true); } [/code] Now, you should have an actionPerformed method: [code] public void actionPerformed(ActionEvent event) { if (event.getSource() == button1) { popUp(); } } [/code] Assuming, you have defined …

Member Avatar for VernonDozier
0
141
Member Avatar for ~bleach~
Member Avatar for Vukinagauna
Re: GUI

The problem is very simple, and the solution is: Write a GUI program to compute the amount of a certificate of deposit on maturity. The sample data follows: Amount dep: $6000.00 Years: 15 Interest: 7.75

Member Avatar for Chaster
0
119
Member Avatar for Chaster

Hi everyone, I created a quite complex model in 3d studio max, then I converted it to an .obj file. In 3dsm I put the textures, everything looks fine. Then, when I load the object file it's gray again. I tried the following: - read the texture file (BMP) - …

0
62
Member Avatar for Chaster

Hi everyone, I have a panel which will be 'filled' with a form in runtime. My question is: how could I determine the size of the panel (becouse I want the form to change its size dinamically). thanks

Member Avatar for 4M-world
0
321
Member Avatar for Chaster

Hi guys, sorry in advance for the following question: So, I've downloaded the adequate SQL Server 2000 driver, from the Microsoft's website. I've installed it to C:\JDBC\. I've set the classpath variable using the command promt by typing: set CLASSPATH=.;c:\jdbc\lib\msbase.jar;c:\jdbc\lib\msutil.jar;c:\jdb c\lib\mssqlserver.jar; The problem is that the following error message appears, …

Member Avatar for Ezzaral
0
187
Member Avatar for denniskhor
Member Avatar for andy_i

So, assuming you aren't using arrays with thousands of elements, you can use this [code] do swap = 0; for (int i=0;i<n-1;i++) // n- nr of elements if (anArray[i]>anArray[i+1]) { temp = anArray[i]; anArray[i] = anArray[i+1]; anArray[i+1] = temp; swap = 1; } while (swap) [/code] This is the code …

Member Avatar for Rashakil Fol
0
126
Member Avatar for kpillsb39

the semicolon after the for statement is a really bad idea. This for will only count up to 5, becouse with the ";" you close the loop statement. On the other hand you should compare the elements of the collection with the searched string. #include<iostream> #include<iomanip> #include<cstdlib> #include<string> using namespace …

Member Avatar for hinduengg
0
224
Member Avatar for randomFIRE

Hi! Try this piece of code : ImageIcon image = new ImageIcon("ANYTHING.GIF"); If i'm not wrong you can add as image icon only GIF files, so try converting your bmp (you can find such programs on [url]http://softpedia.com)[/url]. Hope it works.

Member Avatar for ProgrammersTalk
0
126

The End.