User Profile

Collapse

Profile Sidebar

Collapse
blazedaces
blazedaces
Last Activity: Jun 28 '12, 11:26 PM
Joined: May 18 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • What is the output of this program? I don't see an array or an arraylist being used. Is the current program shown above working fine?

    -blazed
    See more | Go to post

    Leave a comment:


  • I believe I found the answer:

    "Array variables are references to a block of elements

    When you declare an array variable, Java reserves only enough memory for a reference (Java's name for an address or pointer) to an array object. References typically require only 4 bytes. When an array object is created with new, a reference is returned, and that reference can then be assigned to a variable. When you assign one array...
    See more | Go to post

    Leave a comment:


  • Why does this ArrayList act like a pointer?I thought all variables in java are refere

    Before we begin let me say that I already found the solution to the problem, but I am still unable to explain why it solved the problem, so I am here to ask you experts why this java code produces the results I indeed see.

    The two pairs of code I am going to show are meant to find all the prime factors of a number (it is not my original code, I took it from Project Euler, and I'm further using it solve a later, harder problem in the...
    See more | Go to post

  • HSSFWorkbook is for excel files with the .xls extension (Excel 97-2003 documents). XSSFWorkbook supposedly acts the same way for Excel 2007 documents that use the .xlsx extension.

    No, I don't know enough about it to explain it thoroughly as the current examples on XSSFWorkbooks is minor at best. I had to basically go back and forth looking at examples of work done using HSSFWorkbook and HSSFRows, cells, etc. and looking at the XSSFWorkbook...
    See more | Go to post

    Leave a comment:


  • I'm not saying the problem isn't in my code... but I'm showing you my code. Where is the problem?

    -blazed...
    See more | Go to post

    Leave a comment:


  • Can you run jstat or jconsole on a very short process?

    So in another thread I posted someone suggested I monitor the heap space usage using jstat, which lead me to jconsole which does something similar, but is more of a GUI.

    The problem I'm having with both of these is that the process I'm running with java is a short lived program that reads data from one file, does something with that data, and then creates a new file.

    This program lasts somewhere between 30 and 120 seconds...
    See more | Go to post

  • I ended up doing what I suggested earlier, which is instead of creating one file with multiple sheets just create a few files for each sheet separately. This was successful. Each file was approximately 16kb in size.

    The largest file (which would be the largest sheet) was 20kb, used 745 rows, and up to the S column. That's what's so odd. If I was creating an excel sheet with a ridiculous amount of data that would be one thing, but...
    See more | Go to post

    Leave a comment:


  • Attempt to write an excel file with Apache POI causing OutOfMemoryError

    So I have a program below which writes an excel file with multiple sheets based on inputs of sheet names, data, cell types, etc. It uses Apache POI, which is currently the only thing I found (correct me if I'm wrong about this) that can write excel 2007 files. The program works. I've tested it out on very small files (I will include the commented out main method that you can use to test this out yourself if you'd like, that is assuming you download...
    See more | Go to post

  • blazedaces
    replied to Error while Decrypting the String
    in Java
    Also from now on please post your code in code tags (look to the top right corner when you're replying for instructions).

    It makes code a lot more readable (like adding indentations, etc.)

    -blazed
    See more | Go to post

    Leave a comment:


  • Alright, I found a solution to the problem:

    While it's nice to be able to use PyQt's I/O capabilities python has its own, so I used those instead and it worked just as needed:

    [code=python]def loadFile(self, fileName):
    try:
    file = open(fileName, 'r')
    except IOError, (filename, message):
    QtGui.QMessageB ox.warning(self , 'Application', QtCore.QString( 'Cannot...
    See more | Go to post

    Leave a comment:


  • If no one can help me with this can someone please tell me what would be a good source for this problem?

    Thanks a bunch,

    -blazed
    See more | Go to post

    Leave a comment:


  • blazedaces
    replied to String.split() not giving proper results
    in Java
    Question, are you going through many lines of code, each of which may or may not have blanks at the end? Is it that you want them all to be the same size?

    I'm still confused as to why seeing the blanks or not is helping you in any way. It can only show you a lack of information.

    If you, for example, want all the arrays you obtain from a set of many strings, to be the same size, you could find the length of the longest...
    See more | Go to post

    Leave a comment:


  • blazedaces
    replied to String.split() not giving proper results
    in Java
    Trailing spaces are automatically ignored when you use the split method... this is exactly what it's supposed to do.

    My question is, why do you need it to write the remaining space? What information does a remaining space give you?

    If you know that the number of strings in the array produced by split should be a minimum of, let's say in this case, 8, then why not make that for loop go 8 times and have an if/else statement...
    See more | Go to post

    Leave a comment:


  • PyQt4 trouble with save and load file dialogs...

    I'm designing a GUI for autonomous robot interaction, but that's not so important. To figure out the ins and outs of a certain aspect of PyQt I usually just do what I did when I learning Qt, I grab an example from the site and literally copy the code.

    Unfortunately, PyQt isn't written exactly word-for-word as Qt is written in C++, obviously. So there's a slight conversation that I do to make it work. This can lead to errors at times....
    See more | Go to post

  • blazedaces
    replied to What is your OS and Python Version
    My OS is Ubuntu 7.15

    Python version is 2.5

    GUI Toolkit: PyQt 4

    -blazed
    See more | Go to post

    Leave a comment:


  • blazedaces
    replied to How Can I parse a xml file ?
    in Java
    What have you done to solve this problem on your own? We're not here to do your work for you.

    Why use both? One is much more suitable than the other for specific situations.

    SAX parses through one element at a time. It is often much more useful when you want to parse very large files or not even finish the entire file. DOM creates a sort of hierarchy and stores it, so it is more useful in smaller files (like this...
    See more | Go to post

    Leave a comment:


  • blazedaces
    replied to How to parse XML file by j2me
    in Java
    Aren't there many web pages with tutorials/examples using j2me for parsing XML (I know there are)?

    Go look for those.

    Good luck,
    -blazed
    See more | Go to post

    Leave a comment:


  • blazedaces
    replied to Sending SMS via JSP/Servlet
    in Java
    Have you tried looking up any information on this at all? The first thing I would do "for" you would be to literally google that and see what I come up with. I guarantee it'll bring you closer to your goal...

    -blazed
    See more | Go to post

    Leave a comment:


  • blazedaces
    replied to Seperating numbers
    in Java
    Yes, much easier...

    -blazed...
    See more | Go to post

    Leave a comment:


  • blazedaces
    replied to Seperating numbers
    in Java
    Make a class with an int cent variable and an int dollar variable.

    As for your specific question, if you are inputted 123456 and you want to get 1234 and 56 extracted from it you should do the following:

    First realize that 123456 = 6 *10^0 + 5*10^1 + 4*10^2 + 3*10^3 + 2*10^4 + 1*10^5.

    AND realize that when you divide an integer will truncate the remainder.

    With this you can do the following:...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...