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

Search:

Type: Posts; User: AlbertGM

Page 1 of 15 1 2 3 4

Search: Search took 0.03 seconds.

  1. Re: How to insert the value inside an array's cell into a char variable?

    Hi,
    You can't switch on char arrays, and if you are using a JRE version prior to Java7 not even on Strings.
    So, you can't do:

    switch (cArray) {[....]}
    Look at this site

    Try something like:
  2. Replies
    3
    Views
    646

    Re: serious help needed, java code

    I think you almost get it, just fix syntax in System.out.print, and do it after read all variables, because you can't use a variable before being declared.

    For example, assuming you already read...
  3. Re: Help: Proxy authentication and multiple proxies connection

    Try this... I guess this could work...



    HttpClient httpClient = new HttpClient();

    HostConfiguration config = client.getHostConfiguration();
    config.setProxy(proxyUrl, proxyPort);
    ...
  4. Replies
    3
    Views
    1,307

    Re: Use string contains for multiple checks

    Something like this should work:


    Pattern p = Pattern.compile("[?!]");
    Matcher m = p.matcher(value);

    if (m.find()) {
    System.out.println("value = " + value + " matches");
    }
    else {
  5. Thread: Send_Email

    by AlbertGM
    Replies
    5
    Views
    845

    Re: Send_Email

    Hi,

    I have never used that library. I use to work with Java Mail to send e-mails.

    You are right, watching javadoc, it looks like there is no method setSSLOnConnect. Although I know nothing...
  6. Thread: Send_Email

    by AlbertGM
    Replies
    5
    Views
    845

    Re: Send_Email

    Hi,

    Eclipse always (almost) gives an explanation about why a program doesn't compile in 'problems' tab. So, first read it.
    If you still don't have a clue, post the error compiler says. With...
  7. Replies
    2
    Views
    399

    Re: Throwing string exception with integers

    This seems homework. Please, read this

    We are here to help, not to do your homework. If we give you the answer, you'll never learn. Tell us what you tried, what you don't understand or where you...
  8. Replies
    2
    Views
    468

    Re: Constructor not being called

    I think you made a perfect explanation.

    Expression
    Num [] x = new Num[7] only tells de JVM to allocate a block of contiguous memory. Num constructor is NOT called.

    Albert.
  9. Re: Printing literal quotes with strings and variables

    System.out.println("Case \"" + caseNum + "\""); Regards,

    Albert.
  10. Replies
    1
    Views
    298

    Re: Responses from UDP Server

    Hi,

    First of all: Please, use code tags properly. Learn how to use here. Click on "preview post" to ensure.

    1) To read port from command line, just read args parameter:
    public static void...
  11. Re: Reversing letters of a words in a sentence keeping the words in the same order

    Hi,


    System.out.println("Reversing the words in the sentence: " + original + ", looks like: " + newSentence );
    newSentence is an array of Strings. It doesn't use toString() method of String...
  12. Replies
    3
    Views
    3,893

    Re: Error: Could not find or load main class

    Hi,
    You are right, this error happens when you try to run a compiled java class using an older JRE. You always can check major and minor version of a compiled java class using "javap -verbose"...
  13. Replies
    3
    Views
    3,893

    Re: Error: Could not find or load main class

    Did it work before cleaning your workspace? Occasionally eclipse gets crazy, so try to restart it.
    It's difficult to say without any other information.
    You can also click on run manager (Button...
  14. Replies
    2
    Views
    1,501

    Re: edit .conf file in /etc linux (java SE)

    Are you talking about an Apache HTTP Server, right?
    To find out where is located you can check using "httpd -V", or "ps auxww | grep httpd", to know where the process is running.
    Config file is...
  15. Replies
    2
    Views
    324

    Re: Polymorphism without inheritance in java

    Can't you be a little more specific?
    I don't want to be rude, but if you know nothing about a concept you should first read a manual or a book and then, ask what you don't understand, don't you...
  16. Replies
    1
    Views
    1,382

    Re: mean, median and mode problem

    Hi,

    You only have to check each value read. For example:
    [...]
    for (int i = 0; i < num.length; i++, size++) {
    System.out.println("Enter a number: ");
    num[i] = nums.nextInt();
    if (num[i]...
  17. Replies
    3
    Views
    868

    Re: Socket Programming over the Internet

    Understood.
    I guess it's just a communication problem, which I'm not sure if I can answer.
    Nevertheless, as far as I know, the reason why you can't connect could be:
    The internet route from...
  18. Replies
    3
    Views
    868

    Re: Socket Programming over the Internet

    Hi,

    If your server runs on 192.168.1.100, why your client tries to connect to 112.134.190.41?

    s=new Socket("112.134.190.41",9999);

    Albert.
  19. Replies
    0
    Views
    966

    Understanding encoding

    Hi all,

    Part of my code have to send an email written in Spanish or Catalan, depending of language selected. Both languages have accents and other non-ASCII (7bit) printable characters. That's why...
  20. Replies
    1
    Views
    1,724

    Re: Jsch invoking multiple unix commands

    I think, I don't get it. Your list has more than 500 commands, right? Each command sleeps 1 sec, right? I takes more than 500 secs. So, what's the problem?

    Post the code.... I guess it's the best...
  21. Replies
    1
    Views
    638

    Re: How to use Map

    There are no templates in Java 1.4, which are called 'Generics'. They are part of Java 1.5.

    What do you mean by "What is objects?"? There are thousands of sites to find out how to use a Map. ...
  22. Replies
    2
    Views
    593

    Re: Java Compiling Help

    Hi,
    Did you really download developer (JDK) version? In user version (JRE) there is no 'javac' command.
    javac use to be located in $JAVA_HOME/bin (&#37;JAVA_HOME%/bin in Windows), so you should add...
  23. Replies
    4
    Views
    1,575

    Re: Sign a jar file in JDK 6.0_U32

    Try tools.jar in $JAVA_HOME/lib using JDK_1_5_22. I'm not sure using Java 6.

    Regards,
    Albert.
  24. Replies
    27
    Views
    1,502

    Re: Algorithm problem

    It could be because of my terrible english, but what this has to do with your compiler errors? I don't get it.

    Albert.
  25. Replies
    27
    Views
    1,502

    Re: Algorithm problem

    Hi,
    Although I'm not sure what you are attempting to do next line is wrong:
    for (int i = 0, i < 5; i++ ;); /// line 17
    It should be
    for (int i = 0; i < 5; i++);
    Anyway, above expression is...
Results 1 to 25 of 366
Page 1 of 15 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center