Search:
Type: Posts; User: AlexVV
Search:
Search took 0.01 seconds.
-
March 13th, 2013, 04:17 AM
Not really a java question ... but anyway
Have you tried accessing the site which times out directly, rather than through an iframe?
What is serving the site - a web server, tomcat, j2ee server...
-
March 12th, 2013, 12:37 PM
ORA-00257 suggests that an Oracle database problem may be the cause?
-
March 7th, 2013, 05:55 AM
Err ... this is javascript not java !!!
Your code might work better if you do something along the lines of: check if input 1 is blank (null or zero length string). If it is, set its contents to id,...
-
March 1st, 2013, 07:12 AM
You do not need to pass in the argument (double numberOfCups) to getCups. You should declare numberOfCups as a double within the method.
You could make the method more resilient. What would happen...
-
March 1st, 2013, 06:00 AM
You are synchronizing to two separate objects - the "this" in each case is the anonymous inner class.
If you add another object to synchronize to and change both synchronized(this) to...
-
March 1st, 2013, 05:32 AM
It is often useful to identify which line has caused the problem and skip it:
int lineCounter = 0;
while(sc.hasNextLine()) {
lineCounter++;
String line =...
-
February 22nd, 2013, 05:58 AM
-
February 22nd, 2013, 04:24 AM
OK - if you want to do it without using "built in" functions, then you could create a character array from the original string, another character array to hold the revered string, populate it and...
-
February 21st, 2013, 04:25 AM
First problem is in the sqArea function. You pass it a SquareObject argument, but it looks as if the argument should be a Square ... and not the Square class itself but an instance of the Square...
-
February 19th, 2013, 10:32 AM
1. That should meet the requirement. You need to be sure that you don't define a buffer or some other temporary storage outside the while loop and write to it inside the loop, otherwise you risk...
-
February 19th, 2013, 06:35 AM
You could make isPalindrome() take a String argument, and make it static. That way you don't need to create an instance of the Palindrome class in main.
public static void main(String...
-
February 12th, 2013, 05:41 AM
Was there an error? Did the program print a stack trace? Does the shell script work when you invoke it by hand rather than from the java program?
-
February 12th, 2013, 04:25 AM
Overloading means using the same method name but with different numbers and/or types of parameters.
public double average(int first, int second) {
double result = (first + second) /...
-
February 12th, 2013, 04:12 AM
http://stackoverflow.com/questions/525212/how-to-run-unix-shell-script-from-java-code
But not generally a good idea because it ties your (portable) java application to unix/linux systems....
-
February 11th, 2013, 08:00 AM
Outside main, you define static Console c ... inside main you create a new Console(), then call methods like readString() on c which has not been initialized.
Better to define console c = new...
-
February 6th, 2013, 04:51 AM
First thing I'd do is get rid of the big switch statement - firstly, switch(String) only works in Java 1.7 and secondly, it's only providing a map of grade (A, B+ etc) to a score (4, 3.67 etc). You...
-
February 5th, 2013, 06:01 AM
You have some code which more or less works, but is not pretty in its function or its presentation.
Indentation is seemingly random with a mixture of tabs and spaces - try to stick to one or the...
-
February 4th, 2013, 07:55 AM
Any number of things could be going wrong. Best to check the log files for the container of your servlet and the server which is doing the conversion.
-
February 4th, 2013, 07:49 AM
OK ... you need a "buffer" to hold the input and loop which repeatedly asks for input and either (1) adds this to the buffer or (2) exits when the input is "done". Something like ...
...
-
February 4th, 2013, 07:30 AM
What you need is an array of integers to hold the user input once it has been validated (i.e. converted to integers as you are doing with Integer.parseInt), a for loop to populate the array, and...
-
January 31st, 2013, 12:06 PM
This sounds like a function a proxy does.
Try googling "squid blacklist" or "squid whitelist".
-
January 30th, 2013, 12:45 PM
You should use "code tags" when posting code on the forum ... it maintains the formatting!
I assume TPar is the running total for par, TPlayer1 the running total for player 1 etc.
You are almost...
-
January 29th, 2013, 08:55 AM
Code is incomplete and not runnable!
The line:
Par = Par + Par;
probably does not do as you are expecting ... looks like you're trying to keep a running total of "par" but this is not happening...
-
January 22nd, 2013, 06:52 AM
Your "user name generator" post from 20th January contains an example of the code you need to do this ... i.e. String.split(), this time using the colon as the delimiter.
String...
-
January 21st, 2013, 10:19 AM
I'm guessing your input is a number of seconds .... so calculating hours is easy:
int hours = Total / 3600;
Minutes is where you need the modulus operator ... and divide the result by 60:
int mins...
|
Click Here to Expand Forum to Full Width
|