CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: AlexVV

Page 1 of 3 1 2 3

Search: Search took 0.02 seconds.

  1. Thread: Iframe Timeout

    by AlexVV
    Replies
    2
    Views
    1,858

    Re: Iframe Timeout

    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...
  2. Replies
    2
    Views
    2,663

    Re: Increase PermGen space...?

    ORA-00257 suggests that an Oracle database problem may be the cause?
  3. Replies
    1
    Views
    5,393

    Re: Function for Input Boxes

    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,...
  4. Replies
    2
    Views
    1,201

    Re: Value-returning Method

    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...
  5. Replies
    1
    Views
    1,047

    Re: Interesting Synchronization problem

    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...
  6. Re: any help would be apreciated with arrays, exception in thread

    It is often useful to identify which line has caused the problem and skip it:


    int lineCounter = 0;
    while(sc.hasNextLine()) {
    lineCounter++;
    String line =...
  7. Replies
    8
    Views
    7,468

    Re: Finding if a Palindrom - Please review

    Good point.
  8. Replies
    8
    Views
    7,468

    Re: Finding if a Palindrom - Please review

    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...
  9. Replies
    1
    Views
    3,687

    Re: need help soon on error.

    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...
  10. Re: Help: Parse a log file and split every log entry.

    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...
  11. Replies
    8
    Views
    7,468

    Re: Finding if a Palindrom - Please review

    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...
  12. Re: Write a java program that contains a shell script

    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?
  13. Replies
    2
    Views
    3,796

    Re: help with overloading code

    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) /...
  14. Re: Write a java program that contains a shell script

    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....
  15. Replies
    1
    Views
    1,419

    Re: Need a little help with this code...

    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...
  16. Thread: GPA Program

    by AlexVV
    Replies
    4
    Views
    5,342

    Re: GPA Program

    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...
  17. Replies
    3
    Views
    6,451

    Re: write to file in loop, help please--java

    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...
  18. Replies
    1
    Views
    890

    Re: Servlet plus WebServices

    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.
  19. Replies
    3
    Views
    6,451

    Re: write to file in loop, help please--java

    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 ...

    ...
  20. Replies
    1
    Views
    1,375

    Re: Beginner needs help! Java code

    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...
  21. Replies
    1
    Views
    1,087

    Re: controlling the browser

    This sounds like a function a proxy does.
    Try googling "squid blacklist" or "squid whitelist".
  22. Re: File import and read file, HELP PLEASE!!!:) beginner coder

    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...
  23. Re: File import and read file, HELP PLEASE!!!:) beginner coder

    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...
  24. Replies
    1
    Views
    1,128

    Re: one entry line of code, Java

    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...
  25. Replies
    1
    Views
    1,039

    Re: can anyone help me please

    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...
Results 1 to 25 of 55
Page 1 of 3 1 2 3





Click Here to Expand Forum to Full Width

Featured