Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Cybertronic

    Having trouble with Java web browser

    Hi all, I apologise for creating another thread but I would love to have some help with my problem I'm currently having please. I've created a web browser in Java where I have several different classes to help separate the code for ease of coding. I'm currently stuck on a Java class issue...
  2. Cybertronic

    How to create a separate Java class?

    Hi all, In my previous thread I posted a few days ago about JEditorPane regarding my Java web browser, now I've got another problem which is that I would like to separate some of my coding into several classes to prevent my code from getting too long. Below is my current code I have for my...
  3. Cybertronic

    JEditorPane web browser problem

    Tim, my web browser buttons fires the actionPerformed event handler. I've fixed the problem now, what I had to do was wrap the "contentPane = new JEditorPane();" line in a try and catch block and then put the URL in the JEditorPane brackets and create an error message for websites not supported...
  4. Cybertronic

    JEditorPane web browser problem

    I have the following code (including the the code in my previous post) in my web browser program: public class browser extends JFrame implements ActionListener, HyperlinkListener { private JEditorPane contentPane; private JScrollPane contentScrollPane; // Code for GUI public browser()...
  5. Cybertronic

    JEditorPane web browser problem

    Hi all, I'm having a problem with my Java web browser program that I'm working on. At the moment I'm stuck on trying to get my web browser to load the home page after it has been executed. Below is my current code for the actionPerformed method: public void actionPerformed (ActionEvent ae) {...
  6. Cybertronic

    How to do secant method in Java?

    Miros, the secant method I'm doing is for locating roots of nonlinear equations :) I'm stuck on my own secant method code and I'm using the function: f(x) = x^3 - 3x +1 System.out.println("\n" + "n \t" + " xn \t" +...
  7. Cybertronic

    How to do secant method in Java?

    Hi Tim, That helps a lot! Thanks :) Jonathan
  8. Cybertronic

    How to do secant method in Java?

    Hi all, I was wondering how can I create a secant method function in Java? I've seen a few examples of secant methods created in different programming languages such as Fortran: http://www.ce.udel.edu/faculty/kaliakin/secant_method.html I've tried converting the code in the above link into...
  9. Cybertronic

    Haskell help please

    Thanks Dian, I'll try posting on there :)
  10. Cybertronic

    Haskell help please

    I thought this would be the best place to ask about for Haskell, I apologise if I've put it in the wrong place, sorry! I'm trying to create a function called display where I type in a product name, e.g. dvd1, it returns the string and the total value of the stock held for the product: Here's...
  11. Cybertronic

    How to match a specific element from an array?

    Thanks for the explanation KevinADC!
  12. Cybertronic

    How to match a specific element from an array?

    Thank you so much KevinADC! :) Could you please explain what the $_ parameter does?
  13. Cybertronic

    How to match a specific element from an array?

    Oops! if ($address_line_2{'address_line_2'} eq "") { print "\n"; } else { print " $address_line_2\n"; print " <br/>\n"; } I typed @ instead of $, sorry!
  14. Cybertronic

    How to match a specific element from an array?

    THanks KevinADC :) It was my mistake, I change the values by mistake! Is it possible to add the values (ones that have been selected) together as a total? On a related subject: if (@address_line_2{'address_line_2'} eq "") { print "\n"; } else { print " @address_line_2\n"...
  15. Cybertronic

    How to match a specific element from an array?

    KevinADC, I'm having a problem with the $_ parameter as it doesn't seem to be showing anything :S Is there an alternative to this $_? Please let me know :)
  16. Cybertronic

    How to match a specific element from an array?

    Xaqte, they are indeed working :) I'm new to Perl unfortunately :( Does the grep function block the out elements in the array in order to match the specific element? Is it possible for you to help me with my previous post please? You deserved the star! :)
  17. Cybertronic

    How to match a specific element from an array?

    KevinADC, thanks for your post, I was trying to fix my if statement, sorry! Regarding my previous post, for the selected values, what I mean why add the selected values is that it adds the values together to calculate a total. How can I edit my posts on these forums? :S
  18. Cybertronic

    How to match a specific element from an array?

    Xaqte, thanks for the welcome and for the help! :) I've got it working now thanks! :) Is it possible to get a value from an if statement that is true (like the one Xaqte posted) and stick it in another array which calculates the total? Here's a better explanation: if ( grep { $_ eq 'green'}...
  19. Cybertronic

    How to match a specific element from an array?

    I'm using the following code for checkboxes in my HTML form: my @color = param('color'); foreach my $color (@color) { print "You picked $color.<br>\n"; } At the moment I'm using this code to match an element from my array: if ($color[0] eq "name of color") The problem is, is there an...

Part and Inventory Search

Back
Top