|
fly904 wrote: there may be a problem with you logic
That's a very kind way of putting it.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
In a good mood today
hmmm pie
|
|
|
|
|
hiii
please give me the code and srs for the project of "WEBSITE DEVELOPMENT IN JAVA"....
thnk you
shalabh bindal
|
|
|
|
|
See point 2 in the posting guidelines.
|
|
|
|
|
What's the best solution for doing non blocking sockets in Java? The Socket class in and of itself doesn't support this. I'm aware of NIO but have heard rumors that's not very good or perhaps tricky to use?
I found Apache's MINA (http://mina.apache.org[^]) which looks promising, but wondered what people here have used.
|
|
|
|
|
Jim,
the easiest is to create the ServerSocket listening on it's own thread. The listening thread is blocked, but you can still call the close() method.
This will cause a SocketException to be thrown on the listening thread to allow for graceful exit.
See Class:ServerSocket [^] for details.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
i have a table where there are two columns.the first column has hard-coded values in a JComboBox. Upon selection of the value in the first column, the values for the second column combobox has to change(in the second column combobox values has to be dynamic).
someone kindly assist me
|
|
|
|
|
|
|
Have you thought about saving it in a file?
hmmm pie
|
|
|
|
|
thanks man.. will work on it
|
|
|
|
|
please help me in reading pixels from a black n white image.
thanks in advance
|
|
|
|
|
Have you actually researched anything?
Anyway, look at BufferedImage.[^]
If you can't find what your looking for on there then you should choose something else to do.
hmmm pie
|
|
|
|
|
what would be the use of the strong tokenizer?
|
|
|
|
|
It breaks a sentance into words, is a simple way of putting it.
Have a look at the Documentation.[^]
hmmm pie
|
|
|
|
|
Thanks a lot now I trluy uderstand it now
|
|
|
|
|
Hello,
I'm new to JSP but have experience with .NET, and was wondering if someone could help me with this.
I am trying to encode an ID value that is being passed in a querystring. This value (assuming it isn't null) will then be printed out to a page. In .NET I'd use the HttpUtility.HtmlEncode method but was wondering if there is something similar in Java. Please find an example of my code below.
<param name="movie" value="swf.swf<%= request.getParameter(" id=") != null ? "?id=" + request.getParameter("id") : "" %>">
</param>
Any advice you could give me would be greatly appreciated.
modified on Monday, March 16, 2009 11:32 AM
|
|
|
|
|
please suggest some sample coding done in aglets environment which is a development environment produced by IBM
|
|
|
|
|
hi i trying to write code of capturing image through web cam using java lang. plz. help me.....
|
|
|
|
|
Hi all,
i want to write a java script which will remove duplicates in html page.
scenario:- i am having html page that can be acessed by all my team members when ever they want to write some thing new they will just write in webpage directly in webbrowser and they will click the submit button.
i want to write a java script such that whenever they click on that submit button it should show a warning message and then delete if the data that is newly added already exists.
Thanks in advance.
|
|
|
|
|
You are in the wrong forum.
What you want is complicated. JavaScript cannot access your server database, so it cannot decide if "data already exists".
Do you even have a server database? Or was your idea that every user is actually modifying the web page that serves as the input form?
Ideally, you have some sort of web server that allows updates to a database and sends dynamic web pages out to users. If you don't know what I am talking about, stop here and get a web developer into your office.
Now, you have two choices: submit the form to the web server and have JavaScript check the response message in an OnLoad event handler, OR use AJAX to do the same thing without refreshing the page.
The second option is much nicer looking, but a little more complex.
Again, if you don't know what I am saying, you need a person sitting in your office who does. You will not be able to do this yourself without a LOT of research.
Don't let my name fool you. That's my job.
|
|
|
|
|
I can't find the nullpointer error I'm having with netbeans and it's getting to me, any help would be appreciated. Below is my code of a class that will evaluate a RPN expression given in prefix form. I included one of the methods. they all look the same except either it has .minus .plus .times. The stack declared, can only hold Object types which is why the casting was neccessary. I know a little bit about Generics but I can't use them. I really, would appreciate any help. Thanks in advance hopefully.
public class PrefixEvaluator
{
private final int MAX_SIZE = 60;
private BufferedReader stdin;
private Stack evaluate = new Stack(MAX_SIZE);
private boolean valid = true;
private Object answer1 = new Object();
void run() throws IOException
{
String toEval = stdin.readLine();
while( toEval != null && valid )
{
Object op1 = new Object();
Object op2 = new Object();
int eqns = 1;
System.out.println( "Raw Expression " + eqns + " is: " + toEval );
ReverseTokenizer equation = new ReverseTokenizer( toEval, " ");
String token = equation.nextToken();
if( token.charAt(0) == '(')
{
evaluate.push( token );
}
else if ( token.charAt(0) == '+' ||
token.charAt(0) == '*' ||
token.charAt(0) == '-' )
{
if( evaluate.isEmpty() )
System.out.println( "Invalid Expression" );
else
{
op2 = evaluate.pop();
op1 = evaluate.pop();
if( token.equals("+"))
addition(op1, op2);
else if( token.equals("-"))
subtract(op1, op2);
else if( token.equals("*"))
multiply(op1, op2);
else
System.out.println( "Invalid Expression" );
}
eqns++;
}
toEval = stdin.readLine();
}
answer1 = evaluate.pop();
}
public void addition( Object op1, Object op2)
{
Fraction operand1 = new Fraction();
Fraction operand2 = new Fraction();
Fraction addAns = new Fraction();
Object answer = new Object();
operand1 = (Fraction)op1;
operand2 = (Fraction)op2;
addAns = operand1.plus(operand2);
answer = (Object)addAns;
evaluate.push(answer);
}
|
|
|
|
|
|
are you trying to tell me you see that somewhere in my code? am i just browsing over it or something?
|
|
|
|
|
I gave you the reason why it's doing it!
It's up to you to debug it line by line and seeing where you get the error, now that you know what the problem is.
hmmm pie
|
|
|
|