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

    Using reflection

    Hi Diancecht, Thanks for the reply. I did fear the performance issue. However, as far as coding goes, I am already done with it and I have tested it as well. Seems to work really well. Its a really basic utility. All it does is: 1. Look up the class, create a new instance of the class. 2...
  2. nirajj

    Using reflection

    Hello everybody! I have never used reflection before is my first time even playing around with it. I was thinking about a utility that will take a pojo as a parameter and them split a delimited line based on the fields defined in the pojo, create a new instance of the pojo and set the fields...
  3. nirajj

    Counter... Please help For Loop???

    Integer x; for (x=0; x<2; x++) Wouldn't that be a type mismatch? Were you able to compile your code?
  4. nirajj

    Number compressor

    I would convert the number to String... then I can check the length and add or remove the digits as required.
  5. nirajj

    Declaring and instantiate values

    I am no guru at this stuff but the way I normally do is public class MyBean { private String fname = StringUtil.EMPTY; public MyBean(String fname) { this.fname = fname; } public String getFname() { return fname; } public void setFname(String fname) { this.fname = fname; } }...
  6. nirajj

    Upload servlet

    org.apache.commons.fileupload If you google, you will find exactly what you are looking for. Just remember not to code all that into your JSP though.
  7. nirajj

    Checking for null objects

    RoadCond rc = rc.getUniqueQuery(); // How can you use rc.getUniqueQuery() in the same line where you are initiallizing and assigning value to the object. Basically rc is not initialized. Hence null pointer. What you need is something like: RoadCond rc = new RoadCond(); Object o =...
  8. nirajj

    Custom JButton

    JButton myButton = new JButton(new ImageIcon("my image") ); Border noBorder = new LineBorder(Color.WHITE, 0); myButton.setBorder(noBorder); I think that should work.
  9. nirajj

    Read &amp;&amp; Modify a excel cell value in HSSF

    In that case my next approach would be to use RandomAccessFile. I would also try something like creating a new temp file for write and once you are done then delete the original file and rename the temp file. PS: I am just throwing random ideas here. I have not really tried them.
  10. nirajj

    Read &amp;&amp; Modify a excel cell value in HSSF

    You should be able to use the Fileinputstream and fileoutputstream on the same file simultaneously. Have you tried it?
  11. nirajj

    Retaining DB values as well as Dynamically generated Values.. Help Ne

    When you say that you the values are lost when page reloads, what kind of page is it? Is it a JSP page? You need to give little more information. You can set attributes to save the list and use that to get the dynamic values entered. The primary key should never be adjusted. If any record is...
  12. nirajj

    Sending email

    Try the new line char instead. Either "/n " OR for system independence use System.getProperty("line.separator");
  13. nirajj

    Map vs quering DB?

    I tried both the ways and I was able to cut 20 secs off the total processing by pulling up all the data beforehand than single query for each employee. Thanks for all the inputs!
  14. nirajj

    Play MP3s/WAVs in Java

    I would use third party libraries to play the MP3 file. Check out the following link. They have a good example as well. http://www.cs.princeton.edu/introcs/faq/mp3/mp3.html
  15. nirajj

    Map vs quering DB?

    Diancecht, Unfortunately the type of work I am doing, I am not allowed to add any objects in the DB. That violates the contract. So the only solution I have is through the java.
  16. nirajj

    Map vs quering DB?

    Hi all, The program that I am working on requires that each employee's value be checked against a table. The 2 different approaches that I have in mind are... 1) Pull up values for all the employees ahead of time and store in a HashMap. (about 12000 employees) 2) Query the DB each employee at...
  17. nirajj

    read integer

    I agree tom62 that GUI is the way to go. However, I want to follow the proper learning pattern and not skip any part. Yes sedj, it is part of my learning exercise. I have actually moved on to GUI now. So far no major queries. But I am sure the Java gurus out here will be ready to help when I...
  18. nirajj

    read integer

    Thanks! I appreciate the inputs. :)
  19. nirajj

    read integer

    Hi all... This may sound novice but I am new to Java.. actually still learning. I have the following lines of code to get an input InputStreamReader reader = new InputStreamReader(System.in); reader.read(charBuff); However, I want to restrict the user input to only integer or float values...
  20. nirajj

    User accounts

    OS: Windows XP Pro Service pack 2 This may sound stupid but yesterday I created admin user 'New' on my computer. All these days I was using the default 'Administrator' account. Today when I logged in, the 'Administrator' account was deleted. The files are still there. I only have 'New' account...

Part and Inventory Search

Back
Top