Search:

Type: Posts; User: Perd1t1on

Page 1 of 2 1 2

Search: Search took 0.63 seconds.

  1. [SOLVED] Re: simple question, coding unrelated, how to delete multiple tabs?

    nevermind, i read around and figured it out. sorry to take up space, but i wanted an answer asap.
  2. [SOLVED] simple question, coding unrelated, how to delete multiple tabs?

    I didn't know where to put this, but I have been having a tediousness problem with deleting multiple tabs. Is there someway to delete multiple tabs at once. For example, if you selected 10 lines of...
  3. Re: Can you make new data types, just as efficient as built in (ie int, byte)

    what do you mean by a four bit primitive? and do you have a pseudo example of your last sentence? And about the boolean, I've always read that it is simply 1 bit and so it's value is either 1 or 0....
  4. Can you make new data types, just as efficient as built in (ie int, byte)

    Is it possible to create a new data type in java? My idea for how it could be done is to create an object that holds holds a boolean array of n size and translates the number you make only when...
  5. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    K, well since you've settled the precision loss problem for float, I'm going to use long for sure now. The reason both x and y have to fit into it is so I can use the smallest data type possible. for...
  6. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    The objective is kind of difficult to explain properly to someone who hasn't seen all of the code but that's not really important. I was originally seeing if it would be possible to use float instead...
  7. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    I'm not sure what you mean by using a long instead but I redid the code using a long instead of a double. I know that double and long also both require 8bytes so I'm not sure if this is more...
  8. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    And here is the undo portion of my code:


    System.out.println("mag: "+mag+", and yx: "+yx+", and y: "+y+", and x: "+x);
    String breaknum=Double.toString(yx);
    short newy;
    short...
  9. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    the range is also a potential problem, it seems using double, I cannot exceed an x value beyond 99999, if I'm using my current method. But that's probably okay, because I can see other ways around...
  10. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    Well I need the precision more so I'll have to use doubles for this. The y and x are not a million right now, I've been working with around 200x100 max just to weed out errors. But it can be expanded...
  11. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    well I'm not super experienced, but the I have already seen the out of memory exception so far. I forget where, it may have been a mess up with a while loop. In terms of a rough estimation of the...
  12. [SOLVED] Re: Why is my float automatically rounding and how do i get it to stop

    Well this program is going to be gigantic so I'm trying to use the smallest data types possible at every opportunity.
  13. [SOLVED] Why is my float automatically rounding and how do i get it to stop

    I don't want to use double if I don't have to because I want to save memory. Here is the code using double:

    short mag;
    int magx;
    short y=154;
    short...
  14. Replies
    13
    Views
    3,047

    [SOLVED] Re: Help; algorithm to determine 'range'

    byte[]array=new byte[10];
    for(byte i=0;i<10;i++){
    array[i]=(byte)((i*2)+(2*Math.random()));
    System.out.println(array[i]);
    }
    boolean even=false;
    byte next=0,range;...
  15. [SOLVED] Re: logic error: cpu assigning incorrect values in for loop

    haha, i can't believe I forgot about else if. thanks aussiemcgr
  16. [SOLVED] Re: logic error: cpu assigning incorrect values in for loop

    First of all, ta[0][0]=30. I didn't add a system out println to that one.

    But you can tell there's an error even if you don't know what the code is about. I'll explain:
    ta[0][3] should not = 30,...
  17. [SOLVED] logic error: cpu assigning incorrect values in for loop

    Hello, I have no idea why this is happening, but the computer is assigning incorrect values in my loop:



    byte ran;
    for(short y=0;y<yt;y++){
    for(short x=0;x<xt;x++){
    //...
  18. [SOLVED] Re: paintComponent is not reading my private variables

    sorry i didn't think the code would be enough, but I figured it out.
  19. [SOLVED] paintComponent is not reading my private variables

    Just to simplify, I'll leave out the details to my code:



    public class Theclass{

    private short a,b;

    public Theclass(short a,short b){
    }
  20. Re: arraylist, hashtable, and 1~2 dimension arrays

    thanks, after playing around with it I realized that a hashset can only add members and check if a member is inside the hashset. So it's limited but fast. I'm guessing you would convert it to an...
  21. arraylist, hashtable, and 1~2 dimension arrays

    I've always been confused about hashtables/hashmaps. What are they?

    I thought they may be like a 2 dimensional version of an arraylist which is like a 1 dimensional array. If not, what is it, or...
  22. [SOLVED] Re: "possible loss of precision", except not, code doesn't work, simple question

    thank you Norm, it's fixed
  23. [SOLVED] "possible loss of precision", except not, code doesn't work, simple question

    Hello,

    I'm trying to make my array as compact as possible. since a calculation will not go above 60, i used byte data type, but the compiler says 'possible loss of precision' and then doesn't run...
  24. Replies
    4
    Views
    4,945

    [SOLVED] Re: Convert JFrame graphics into a jpeg file

    THANK YOU SIR!!!! I have no idea why this was so hard for me to find, but you pointed me in the right direction and I figured it out. I have been wandering around this site today a bit, and I have...
  25. Replies
    4
    Views
    4,945

    [SOLVED] Re: Convert JFrame graphics into a jpeg file

    So would I make a method to replace my savePic method and use ImageIO.write instead of FileWriter? could you give some sample code regarding ImageIO.write?
Results 1 to 25 of 26
Page 1 of 2 1 2