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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by llucifer

  1. llucifer

    Pulling the most recent file by file name?

    # see &quot;perldoc -f sort&quot; # sort numerically @sorted = sort {$a <=> $b} @data; # sort numerically and return greatest: $greatest = (sort {$a <=> $b} @data)[-1]; # or $greatest = (sort {$b <=> $a} @data)[0];
  2. llucifer

    Finding a previous line

    while (<>) { if (/^A/) { # print remebered lines of one of them contain 12345 foreach (@temp) { print; } if (grep /12345/, @temp); # clear temp @temp = (); } else { push @temp, $_; } }
  3. llucifer

    Two-dimensional array/While statement not exiting - very strange

    Another - more perlish - way is: foreach (@aliasdata) { print TEMP $_->[1]; } This make no use of temporary variables.
  4. llucifer

    formatting a file.

    Use perl's in-place edit (man perlrun): perl -pi '*.bak' -e 'BEGIN { print &quot;#####\n#\n# File name:\n# Author:\n#\n# Revision History:\n# --------\n######&quot;; }' fileA fileB fileC fileD
  5. llucifer

    Dynamic link problem in Navigator 4.08

    (This is off-topic here) You're producing invalid html because the value of the href attribute must be enclosed in quotation marks. Correct form: <a href=&quot;?qsymbol=DM&bid=120050&quot;>D-Mark</a> Consider using the HTML validation service provided by the W3C (http://www.w3c.org) to...
  6. llucifer

    How to find the name of a java object

    If you think of the name of the identifier in the original source, then I must dissapoint you. It is lost during compiling. Go and get a look at some Java Virtual Machine internals at sun's java site: http://java.sun.com/
  7. llucifer

    How do I make an .exe file from my java programs?

    Although there are cross compilers which produce windows executables I would not recommend that because they will not support all java features. I depends on the needs your program will address.
  8. llucifer

    j2ee

    It merely all the same question: Accessing a EJB which may run in an external (non-local) Container. Generally you will have to lookup the bean via JNDI and a full url. For JBoss as an example EJB Container a full url would be &quot;jnp://otherserver/application/beanB&quot; You have two...
  9. llucifer

    Newbie help... importing classes

    The class name ist java.util.Calender not java.util.calender Java classnames (and other identifiers) are case sensitive!
  10. llucifer

    Newbie - Class / Array question

    Declaring an array of a type does not create the actual instances in the array's &quot;slots&quot;. You have to create the instances by yourself: Class MyClass { ... } ... myClass[] = new myClass[3]; // Create the _array_ instance. myClass[0] = new myClass(); // Create the MyClass...
  11. llucifer

    JList Problem

    This depends on your model. If youre using DefaultListModel and you are putting Strings inside then customerList.getSelectedValue().toString() will work for you. If you have a custom model, say customerModel which has a method getCustomer(int id) you would use the following to extract the...
  12. llucifer

    jasper exception (tomcat)

    Jasper will create .java files in tomcat's work directory. Look for a .java file which is named similiar to your .jsp file. This generated java source will make finding errors much easier.
  13. llucifer

    About Applet and video

    This is slightly off-topic here. Go to http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/32/pid/269 for the general java forum.
  14. llucifer

    What is the best tool for portal development in java

    Perhaps Jetspeed (never used it). Look at http://jakarta.apache.org/
  15. llucifer

    JDBC problems through j2ee application

    The quoting rules might differ from DB vendor to DB vendor. The best way is to use prepared statements: PreparedStatement ps = connection.prepareStatement(&quot;select * from table where ID = ?&quot;); ps.setInteger(1, 1000); ResultSet rs = ps.executeQuery(); The setXXXX methods of...

Part and Inventory Search

Back
Top