Veitch's Profile User Rating: -----

Reputation: 27 Craftsman
Group:
Contributors
Active Posts:
59 (0.1 per day)
Joined:
05-November 11
Profile Views:
366
Last Active:
User is offline Nov 11 2011 03:07 PM
Currently:
Offline

Previous Fields

Country:
DE
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
25
Icon   Veitch has not set their status

Posts I've Made

  1. In Topic: Java Two Dimensional Array

    Posted 11 Nov 2011

    I wrote that my example is pseudocode (which is not Java). It just demonstrates an algorithm. You have to do the coding yourself.
  2. In Topic: Interfaces and Implementing classes

    Posted 11 Nov 2011

    View Postpbl, on 11 November 2011 - 12:16 PM, said:

    View PostVeitch, on 11 November 2011 - 01:49 PM, said:

    I agree with that, but that is maybe a poor design of the TOs code which we only see a part of. We can't say much about it without more information. You were citing my code, not the TO, and I don't see anything that is so bad in my code that you have to vomit about it. You gave john a +rep, so you seem to agree with his approach. What is the advantage of his code over mine? Let me know that, I want to learn and this really confuses me.

    "Yark" is not "vomit" :)
    And yard was not for your code, sorry, but for the pertinance of it.
    There was nothing wrong about your code, just saying that a better design approach should be investigate to avoid to have to produce code as the one you did.
    It does perfectly the job but I question seriously the needs to to the job.

    If a D2IC ask a trick how to identify in an actionPerformed() method how to identify which out of 6000 buttons (b1, b2, b3, b5, ...b5999, b6000) fired the action I might would suggest to put the JButtons in an array rather that finding another way. That's all.

    For the bit we know about the application, coming from a JTabbedPane you know which Tab issued the request

    I misunderstood then and I apologize for it. (btw, this is where I got the meaning of yark: http://www.urbandict...e.php?term=yark I am not a native english speaker)
  3. In Topic: Interfaces and Implementing classes

    Posted 11 Nov 2011

    View Postpbl, on 11 November 2011 - 06:52 AM, said:

    View PostVeitch, on 11 November 2011 - 04:15 AM, said:

    View Postpbl, on 10 November 2011 - 10:33 PM, said:

    Yark !!! Thera are better alternatives

    Then why don't you tell them instead of just complaining?
    No one learns a thing if you just vomit all over the place.

    Sorry, but I just can't imagine why you would need, at runtime, to figure out which classes implement a certain Interface. Most probably denotes a poor design.

    I agree with that, but that is maybe a poor design of the TOs code which we only see a part of. We can't say much about it without more information. You were citing my code, not the TO, and I don't see anything that is so bad in my code that you have to vomit about it. You gave john a +rep, so you seem to agree with his approach. What is the advantage of his code over mine? Let me know that, I want to learn and this really confuses me.

    Quote

    Where I is the interface you're interested in.
    Should do it, right?

    Yes it does. But you have to call contains() for an array which loops through the array. What is the advantage over instanceof? However I don't know how instanceof is implemented. So there might be something I am not aware of.

    Quote

    Though I agree with pbl, I'd find it easier to address this problem if I understood why someone was interested in this.
    I can only think that it's either for practice, or for some sort of code analysis application. The latter might be interesting to know more about.

    I agree with that too.
  4. In Topic: Exception in thread "main" java.lang.NullPointerException

    Posted 11 Nov 2011

    You do this in main:
    BackpropagationNet bpn = (new BPN()).new BackpropagationNet();
    

    But bpn is a local variable here. It is not the same bpn that is used in output().
    output() uses the static bpn that is declared here:
    public class BPN {
    
         static BackpropagationNet bpn; 
    

    You never initialize that.
  5. In Topic: i am having a hard time writing a java program using while loops

    Posted 11 Nov 2011

    Can you give some examples how the output shall look like for given inputs?

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Programming Languages:
Java, C, Haskell

Contact Information

E-mail:
Private

Friends

Veitch hasn't added any friends yet.

Comments

Veitch has no profile comments yet. Why not say hello?