3 java questions: debugging, templating and Swing app for Texts cleansing

L

lbrtchx

// __ how do you debug debug:
~
Exception in thread "main" java.lang.OutOfMemoryError: Java heap
space
~
kinds of errors?
~
// __ How can you make this method taking in an array on ints and
enlarging it, make the same thing for long[]('s), byte[]('s) in fact
any possible array.
~
// __ (((iAr != null) && ((iArL = iAr.length) > 0)) || (iNwL > 0))
public int[] _enlargeIntArr(int[] iAr, int iNwL) throws
InputContextException{
boolean Is = false;
int[] iNwAr = null;
int iArL;
// __
if((iAr != null) && ((iArL = iAr.length) > 0)){
if(iNwL > iArL){
iNwAr = new int[iNwL];
System.arraycopy(iAr, 0 , iNwAr, 0, iNwL);
iAr = null;
System.gc();
}// (iNwL > iArL)
else{
String aX = "// __ New Length must be greater than previous one.
iNwL: |" + iNwL + "|, iArL: |" + iArL + "|";
throw new InputContextException(aX);
}
}// ((iAr != null) && ((iArL = iAr.length) > 0))
else if(iNwL > 0){ iNwAr = new int[iNwL]; }
else{
String aX = "// __ New Length must be greater than 0. iNwL: |" +
iNwL + "|";
throw new InputContextException(aX);
}
// __
return(iNwAr);
}
~
// __ Do you know of any swing application to compare two text files,
partially programatically, partially by eyeballing them?
The j app. should syncronize teh scrolling of both texts to that the
same section would be visible even if you scroll one of them
~
thanks
lbrtchx
 
D

Daniel Pitts

// __ how do you debug debug:
~
Exception in thread "main" java.lang.OutOfMemoryError: Java heap
space
There are heap profilers out there which will tell you what objects
are allocated.
~
kinds of errors?
~
// __ How can you make this method taking in an array on ints and
enlarging it, make the same thing for long[]('s), byte[]('s) in fact
any possible array.
~
[snip code]
You can't really... Java Generics are not like C++ Templates. They may
have a similar appearance, but their functionality is quite different
except in the most basic cases. If you need to support multiple types
of arrays of primitives, you have to manually support it.
~
// __ Do you know of any swing application to compare two text files,
partially programatically, partially by eyeballing them?
The j app. should syncronize teh scrolling of both texts to that the
same section would be visible even if you scroll one of them
I don't know about a swing application specifically, but there are
plenty of graphical diff programs available. google is your friend.
~
thanks
lbrtchx

Hope this helps.
 
S

shterke

~
Exception in thread "main" java.lang.OutOfMemoryError: Java heap
space

There are heap profilers out there which will tell you what objects
are allocated.> ~
kinds of errors?
~
// __ How can you make this method taking in an array on ints and
enlarging it, make the same thing for long[]('s), byte[]('s) in fact
any possible array.
~

[snip code]
You can't really... Java Generics are not like C++ Templates. They may
have a similar appearance, but their functionality is quite different
except in the most basic cases. If you need to support multiple types
of arrays of primitives, you have to manually support it.> ~
// __ Do you know of any swing application to compare two text files,
partially programatically, partially by eyeballing them?
The j app. should syncronize teh scrolling of both texts to that the
same section would be visible even if you scroll one of them

I don't know about a swing application specifically, but there are
plenty of graphical diff programs available. google is your friend.
~
thanks
lbrtchx

Hope this helps.

cool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top