comp.lang.java.programmer
http://groups-beta.google.com/group/comp.lang.java.programmer
[EMAIL PROTECTED]

Today's topics:

* 'long' integer of 19 digits will not compile - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7f5887b55eeaa33c
* newbie RMI User - 4 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/af49b3bdfce876e4
* From 0 to "SUN CERTIFIED PROGRAMMER FOR THE JAVA 2" in 1 month? - 5 messages, 5 
authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6b63d2ac9ab490fe
* Struts Tomcat 5 Taglib issue - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6fac0a6b8d986f8f
* problem deploying cmp on jboss 3.2.5 + postgresql - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ebfc7fb22d8c2100
* method by property name - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/642915f103fe8568
* Multiple JVMs; specifying the runtime lib - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a0514c6cbf4dc13a
* Is there a known algorithm for this? - 2 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7782dfb489fc3ca6
* Java trick - 2 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bfd25be52dc6a3ad
* update doesnt´t work ? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3619d270a4e29711
* Select and Edit a Record in a Table of JSP page - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/67c119eda64e5709
* J2SE 5.0 generics question - 2 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/34434161a91e61bb
* JSP: Can I use something other than "jsessionid"? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/878ad312eb351c44
* Thread for doFilter and service - is it the same ? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4d3c0ecd8f126018
* Newbie needs help building project & loading/running an executable - 1 messages, 1 
author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb5633262bca3f87
  
==========================================================================
TOPIC: 'long' integer of 19 digits will not compile
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7f5887b55eeaa33c
==========================================================================

== 1 of 3 ==
Date:   Sun,   Sep 19 2004 9:03 am
From: "Keith Valentine" <[EMAIL PROTECTED]> 

I am learning about integer types and I have found that when I try to 
compile code that assigns the highest or lowest 'long' integers to a 'long' 
type variable I receive the errors:

"integer number too large: -9223372036854775808"

Or

"integer number too large: 9223372036854775807"

These values contain 19 digits, however values containing a maximum of 9 
digits will compile without a problem.

Does anyone know why this is?

Keith







== 2 of 3 ==
Date:   Sun,   Sep 19 2004 9:47 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Sun, 19 Sep 2004 12:03:28 -0400, Keith Valentine wrote:

> I am learning about integer types 

The best group for those learning JAva is described here..
<http://www.physci.org/codes/javafaq.jsp#cljh>

>..and I have found that when I try to 
> compile code that assigns the highest or lowest 'long' integers to a 'long' 
> type variable I receive the errors:
> 
> "integer number too large: -9223372036854775808"

long l = 9223372036854775807l; // compiles just fine, try it

> These values contain 19 digits, however values containing a maximum of 9 
> digits will compile without a problem.
> 
> Does anyone know why this is?

System.out.println(Long.MAX_VALUE);
System.out.println(Integer.MAX_VALUE);

HTH

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane



== 3 of 3 ==
Date:   Sun,   Sep 19 2004 9:59 am
From: "VisionSet" <[EMAIL PROTECTED]> 


"Keith Valentine" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am learning about integer types and I have found that when I try to
> compile code that assigns the highest or lowest 'long' integers to a
'long'
> type variable I receive the errors:
>
> "integer number too large: -9223372036854775808"
>
> Or
>
> "integer number too large: 9223372036854775807"
>
> These values contain 19 digits, however values containing a maximum of 9
> digits will compile without a problem.
>

You are probably doing this:

long lng = 9223372036854775807;

which you can't do because the literal value 9223372036854775807 is being
taken as an integer which it obviously isn't.
You must do this:

long lng = 9223372036854775807L;

which tells the compiler you wish to have the literal treated as a long.
All literals are taken as an int unless you specify otherwise.

The error message gives you a clue:

"integer number too large" it has failed to recognise that you want it to be
a long.

--
Mike W






==========================================================================
TOPIC: newbie RMI User
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/af49b3bdfce876e4
==========================================================================

== 1 of 4 ==
Date:   Sun,   Sep 19 2004 9:22 am
From: "paul.foreman" <[EMAIL PROTECTED]> 


>
>>>>>>>> RMI method Naming.lookup. All seemed well until I tried to
>>>>>>>> use the applet in a browser. When I did this I got a 'notinited'
>>>>>>>> message
>>>
The latest and hopefully the most helpful error message from the Java 
Console is:

java.lang.NoClassDefFoundError: tm421_2nd/FamilyViewer

 at viewer2.Applet1.viewPerson_actionPerformed(Applet1.java:220)

The viewPerson_actionPerformed is a method in the applet which calls the 
server via RMI. The file tm421_2nd/FamilyViewer directory contains the Java 
class files that the applet is trying to use.

The server and applet are running on the same PC. I have a .java.policy file 
which permits all.

I am really not sure what to try next.






== 2 of 4 ==
Date:   Sun,   Sep 19 2004 10:09 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Sun, 19 Sep 2004 16:22:20 +0000 (UTC), paul.foreman wrote:

>>>>>>>>> RMI method Naming.lookup. All seemed well until I tried to
>>>>>>>>> use the applet in a browser. When I did this I got a 'notinited'
>>>>>>>>> message

> ..error message from the Java Console is:
> 
> java.lang.NoClassDefFoundError: tm421_2nd/FamilyViewer

Try putting this..

Object o = new Object();
URL resource = o.getClass().getResource("/tm421_2nd/FamilyViewer.class");
System.out.println( "resource: " + resource );


>  at viewer2.Applet1.viewPerson_actionPerformed(Applet1.java:220)

..immediately before line 220.

> I am really not sure what to try next.

See above, and show us your applet element,
exactly as you have it in the HTML.

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane



== 3 of 4 ==
Date:   Sun,   Sep 19 2004 11:53 am
From: "paul.foreman" <[EMAIL PROTECTED]> 


>>>>>>>>>> RMI method Naming.lookup. All seemed well until I tried to
>>>>>>>>>> use the applet in a browser. When I did this I got a 'notinited'
>>>>>>>>>> message
>
>> ..error message from the Java Console is:
>>
>> java.lang.NoClassDefFoundError: tm421_2nd/FamilyViewer
>
> Try putting this..
>
> Object o = new Object();
> URL resource = o.getClass().getResource("/tm421_2nd/FamilyViewer.class");
> System.out.println( "resource: " + resource );
I have inserted the code above. When run in JBuilder it returned the path of 
the server classes for FamilyViewer 
"/C:/TM421_2nd/classes/tm421_2nd/FamilyViewer.class".
When run from the browser it returned a "null".
>
> See above, and show us your applet element,
> exactly as you have it in the HTML.
The HTML for the applet is shown below:
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<TITLE>
HTML Test Page
</TITLE>
</HEAD>
<BODY>
viewer2.Applet1 will appear below in a Java enabled browser.<BR>
<APPLET
  CODEBASE = "."
  CODE     = "viewer2.Applet1.class"
  NAME     = "TestApplet"
  WIDTH    = 400
  HEIGHT   = 500
  HSPACE   = 0
  VSPACE   = 0
  ALIGN    = middle
>
</APPLET>
</BODY>
</HTML>

Thanks for the suggestions so far.

Regards

Paul





== 4 of 4 ==
Date:   Sun,   Sep 19 2004 12:45 pm
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Sun, 19 Sep 2004 18:53:28 +0000 (UTC), paul.foreman wrote:

>> URL resource = o.getClass().getResource("/tm421_2nd/FamilyViewer.class");
>> System.out.println( "resource: " + resource );
> I have inserted the code above. When run in JBuilder it returned the path of 
> the server classes for FamilyViewer 
> "/C:/TM421_2nd/classes/tm421_2nd/FamilyViewer.class".
> When run from the browser it returned a "null".

You web-page based applet is not finding the class..
...
> <APPLET
>   CODEBASE = "."
>   CODE     = "viewer2.Applet1.class"

I forgot to ask, where is this web-page?
the codebase='.' will find your class at
(code base)/viewer2/Applet1.class

With no further information, the VM in the 
browser is looking for the other class at..
(code base)/tm421_2nd/FamilyViewer.class

So, are the packages 'viewer2' and 'tm421_2nd'*
in the same directory?

* which, by the way, is an horrific name for 
a package.

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: From 0 to "SUN CERTIFIED PROGRAMMER FOR THE JAVA 2" in 1 month?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6b63d2ac9ab490fe
==========================================================================

== 1 of 5 ==
Date:   Sun,   Sep 19 2004 10:04 am
From: [EMAIL PROTECTED] (belucky) 

Hi all,

i´m a C# Developer with good knowledge in C, Perl, JavaScript and XML.
My knowledge of Java is very fundamental. I played a weekend with it
an wrote a small swing application. So i´m a beginner in Java.

Is it possible to achieve enough knowledge about Java in a month to
pass the "SUN CERTIFIED PROGRAMMER FOR THE JAVA 2"-test?



== 2 of 5 ==
Date:   Sun,   Sep 19 2004 11:38 am
From: Paul Lutus <[EMAIL PROTECTED]> 

belucky wrote:

> Hi all,
> 
> i´m a C# Developer with good knowledge in C, Perl, JavaScript and XML.
> My knowledge of Java is very fundamental. I played a weekend with it
> an wrote a small swing application. So i´m a beginner in Java.
> 
> Is it possible to achieve enough knowledge about Java in a month to
> pass the "SUN CERTIFIED PROGRAMMER FOR THE JAVA 2"-test?

Sure, but if someone can move from zero to passing the test and actually
understanding all the information to function as professional Java
programmer in one month, he has no need for the certification. People will
be calling him up and begging him to work for them.

So, tell us why you are curious about such a stunt.

-- 
Paul Lutus
http://www.arachnoid.com




== 3 of 5 ==
Date:   Sun,   Sep 19 2004 11:39 am
From: "VisionSet" <[EMAIL PROTECTED]> 



"belucky" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> i´m a C# Developer with good knowledge in C, Perl, JavaScript and XML.
> My knowledge of Java is very fundamental. I played a weekend with it
> an wrote a small swing application. So i´m a beginner in Java.
>
> Is it possible to achieve enough knowledge about Java in a month to
> pass the "SUN CERTIFIED PROGRAMMER FOR THE JAVA 2"-test?

Since the pass mark is only 52%, I'd say it was probable rather than
possible.
But how good a score you get and how important that is to you, only you can
say in conjunction with the many mock exams floating around the net.
Have a look on javaranch.com for details of these and everything else in the
Java cert world.

-- 
Mike W





== 4 of 5 ==
Date:   Sun,   Sep 19 2004 12:06 pm
From: "Bart Verdonck" <[EMAIL PROTECTED]> 

Everything is possible!

but, don't underestimate the test. It ain't easy...

Last year my school got 40 free vouchers for the exam. As far as I know,
only two (including myself) pasted the test. The other guy even had to take
the test twice, the first time he missed one question to much. And this
after 2 year's of java programming.

So, good luck!

Greetings,
BV


"belucky" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> Hi all,
>
> i´m a C# Developer with good knowledge in C, Perl, JavaScript and XML.
> My knowledge of Java is very fundamental. I played a weekend with it
> an wrote a small swing application. So i´m a beginner in Java.
>
> Is it possible to achieve enough knowledge about Java in a month to
> pass the "SUN CERTIFIED PROGRAMMER FOR THE JAVA 2"-test?






== 5 of 5 ==
Date:   Sun,   Sep 19 2004 12:30 pm
From: Chris Smith <[EMAIL PROTECTED]> 

Bart Verdonck wrote:
> Everything is possible!
> 
> but, don't underestimate the test. It ain't easy...

You're right that the SCJP test isn't easy (or, in any case, wasn't last 
time I took it, which was over three years ago).  That said, it's not 
difficult to pass, assuming that you know Java.  That's because of the 
ridiculously low passing score.  If you wanted to make a decent score 
(say, 80% or so), then the task would become more formidable.

> Last year my school got 40 free vouchers for the exam. As far as I know,
> only two (including myself) pasted the test.

That's really scary, but I'm afraid it might say more about school 
educations in programming than about the test.

-- 
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation




==========================================================================
TOPIC: Struts Tomcat 5 Taglib issue
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6fac0a6b8d986f8f
==========================================================================

== 1 of 1 ==
Date:   Sun,   Sep 19 2004 10:06 am
From: "WJ" <[EMAIL PROTECTED]> 

Thanks Sudsy.  That fixed.  What blows me away is I pulled the stripped
web.xml from a work project using struts (in Weblogic).

I thought I hadn't corrupted the tags, but either I did or Weblogic
interprets these differently.  Probably the former.  :-)






==========================================================================
TOPIC: problem deploying cmp on jboss 3.2.5 + postgresql
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ebfc7fb22d8c2100
==========================================================================

== 1 of 1 ==
Date:   Sun,   Sep 19 2004 10:33 am
From: [EMAIL PROTECTED] (tmaus) 

hi there .. 

im running into problems deploying a simple entity bean .. 
i have searched the internet but it looks like the error i receive is
pretty unique ..

the descriptors look right ... the datasource is properly bound ... 

i would be very thankful for any idea about this 

thanks and greetings

19:22:26,908 INFO  [EJBDeployer] Deployed:
file:/home/maus/server/jboss-3.2.5/server/default/tmp/deploy/tmp55743im-ear-0.1.ear-contents/bd-ejb-0.1.jar
19:22:28,530 ERROR [EntityContainer] Starting failed
jboss.j2ee:jndiName=UserLocal,service=EJB
java.lang.NullPointerException
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.getInstance(JDBCQueryManager.java:88)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCJBossQLQuery.<init>(JDBCJBossQLQuery.java:39)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createJBossQLQuery(JDBCCommandFactory.java:72)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java:254)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:498)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:396)
        at 
org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:147)
        at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:337)
        at 
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
        at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
        at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown
Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)




==========================================================================
TOPIC: method by property name
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/642915f103fe8568
==========================================================================

== 1 of 1 ==
Date:   Sun,   Sep 19 2004 10:35 am
From: Timo Nentwig <[EMAIL PROTECTED]> 

Tor Iver Wilhelmsen [TeamB] wrote:

> Timo Nentwig <[EMAIL PROTECTED]> writes:
> 
>> Method m = getMethod(Test.getClass(), "thisIsMyCamelCaseProperty");
> 
> You can use java.beans.Introspector to get the BeanInfo, then get a
> particular PropertyDescriptor for your property and call
> getReadMethod() on that. The problem is that the only code that
> returns PropertyDescriptors returns an array of them, so you would
> need to put them into a Map or something indexed on getName().

java.lang.IllegalArgumentException: object is not an instance of declaring
class

?? Yes, it is an instance of declaring class (?). And doesn't getBeanInfo
filter getClass()?

   final BeanInfo beaninfo = Introspector.getBeanInfo( getClass() );
   final PropertyDescriptor[] ds = beaninfo.getPropertyDescriptors();
   for( PropertyDescriptor d : ds )
   {
    final String s = d.getName();

    final Method getter = d.getReadMethod();
    final Method setter = d.getWriteMethod();

    final Object o = EvalHelper.evalString( s,
(String)getter.invoke( getClass(), null ), this, pageContext );
    if( o == null ) continue;

    setter.invoke( getClass(), new Object[] { o } );
   }





==========================================================================
TOPIC: Multiple JVMs; specifying the runtime lib
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a0514c6cbf4dc13a
==========================================================================

== 1 of 2 ==
Date:   Sun,   Sep 19 2004 10:53 am
From: [EMAIL PROTECTED] (Scott Edward Skinner) 

Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> On 17 Sep 2004 09:22:30 -0700, Scott Edward Skinner wrote:
> 
> > <insert my original question here>
> 
> <insert my original answer here>

Your original answer was "Java Webstart" which is not relevant for
Servlets and JSPs.

Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:
> I am 99% sure that I am absolutely certain about 
> nothing.

This, at any rate, seems accurate. :-)

-S



== 2 of 2 ==
Date:   Sun,   Sep 19 2004 12:18 pm
From: Andrew Thompson <[EMAIL PROTECTED]> 

On 19 Sep 2004 10:53:04 -0700, Scott Edward Skinner wrote:
> Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:...
>> On 17 Sep 2004 09:22:30 -0700, Scott Edward Skinner wrote:
>> 
>>> <insert my original question here>
>> 
>> <insert my original answer here>
> 
> Your original answer was "Java Webstart" which is not relevant for
> Servlets and JSPs.

Your original information was crap, 
quoting from your posts..

2004-09-16 03:18am 'test server'
2004-09-16 11:35pm 'server-side stuff.'
2004-09-18 02:33am *
2004-09-18 02:45am 'Servlets. JSPs. That sort of thing.'

The asterisk indicates the time at which
I posted that response.

Can somebody hand me the group's crystal
ball please?  

And while you are at it, get me the spoon.  
This guy's got a silver one, but he says 
he was born with it, and won't give it up.

> Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:
>> I am 99% sure that I am absolutely certain about 
>> nothing.
> 
> This, at any rate, seems accurate. :-)

Straight after the part of that post you quote, was..

>> You are going to need to get one of the server
>> gurus into this conversation, but I am still
>> pretty sure that 'batch' files is not the way 
>> to go.

Thank you for warning them not to waste their time,
their expertise is in lesser supply than the demand.

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: Is there a known algorithm for this?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7782dfb489fc3ca6
==========================================================================

== 1 of 2 ==
Date:   Sun,   Sep 19 2004 10:58 am
From: Gerald Rosenberg <[EMAIL PROTECTED]> 

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> Gerald Rosenberg coughed up:
> > Have not been able to Google very well for an answer, since I haven't
> > a usable name for the algorithm/type of problem.
> >
> > In sum, I need to determine the least common denominator for the
> > spacing of a one dimensional array of integers where the integers
> > have a noise component.
> >
> > In practical terms, I have the Y-axis pixel locations of lines of text
> > on a page (which are approximations) and need to determine whether any
> > two adjacent text lines are single spaced, 1.5 spaced, or multiple
> > spaced.
> >
> > Seems like there should be an analytic solution, but auto-correlation
> > doesn't seem right.  Some kind of quantized best-fit?
> >
> > Rather than continuing to guess, does anyone know the name of the
> > algorithm for solving this type of problem.  Is there a Java package
> > that can solve this kind of problem?  I have looked at Colt, but it
> > does not provide a direct solution.
> >
> > Thanks,
> > Gerald
> 
> You should try this post in comp.programming, if you want the algorithmic
> help, sans java-specific experience.  Many there are java guys, but many are
> not, but they're there to help with algorithms.
> 
> 

Thanks, will repost there.




== 2 of 2 ==
Date:   Sun,   Sep 19 2004 12:33 pm
From: Gerald Rosenberg <[EMAIL PROTECTED]> 

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> Gerald Rosenberg wrote:
> 
> > Have not been able to Google very well for an answer, since I haven't a
> > usable name for the algorithm/type of problem.
> > 
> > In sum, I need to determine the least common denominator for the spacing
> > of a one dimensional array of integers where the integers have a noise
> > component.
> 
> Could you state the problem more clearly? Do you need a single LCD for a set
> of integers? Do you need to find the most frequently occurring values in a
> set?
> 
> > In practical terms, I have the Y-axis pixel locations of lines of text
> > on a page (which are approximations) and need to determine whether any
> > two adjacent text lines are single spaced, 1.5 spaced, or multiple
> > spaced.
> 
> Create a histogram of all the values and examine them yourself for patterns,

Interesting.  Will look into that.  Thanks.

> then decide on an appropriate strategy to achieve what you are trying to
> accomplish, which you don't bother to say.

Did "need to determine whether any two adjacent text lines are single 
spaced, 1.5 spaced, or multiple spaced" not relate what I am trying to 
accomplish?

> 
> Another poster has recommended a fourier transform, but I think this is
> overkill. A histogram approach will work for any case except many integers
> with little in common with each other. I don't think this is what you face.
> 
> > 
> > Seems like there should be an analytic solution, but auto-correlation
> > doesn't seem right.  Some kind of quantized best-fit?
> 
> Why not state the problem to be solved before hypothesizing about a
> solution?

Sure: In practical terms, I have the Y-axis pixel locations of lines of 
text on a page (which are approximations) and need to determine whether 
any two adjacent text lines are single spaced, 1.5 spaced, or multiple 
spaced.
 
> > 
> > Rather than continuing to guess, does anyone know the name of the
> > algorithm for solving this type of problem.
> 
> What type of problem is that? You have only discussed one aspect of the data
> set, and you haven't stated a problem to be solved at all.
> 

OK.  World peace through analysis of existing imaged document 
collections.  ;-)  Documents are imaged, OCR'd, and PDF'd.  The PDF is a 
given.  Now I need to figure out the document structure from an analysis 
of the PDF command and data stream.

A big problem, much of it solved.  Now I am just tackling a very 
specific aspect where I "have the Y-axis pixel [baseline] locations of 
lines of text on a page (which are approximations [I.e., contain a noise 
component]) and need to determine whether any two adjacent text lines 
are single spaced, 1.5 spaced, or multiple spaced."

No doubt in the relm of mathematics (at least I expect) people have 
investigated this class of problem and have proposed generalized 
algorithms to solve it.  Could not guess the name or a functional 
description well enough to find it by Google.  Thought that the good 
folk here at cljp, in their acknowledged wide ranging knowledge of all 
things algorithmic, might know a name for this class of problem, or 
provide a pointer to suitable algorithms.




==========================================================================
TOPIC: Java trick
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bfd25be52dc6a3ad
==========================================================================

== 1 of 2 ==
Date:   Sun,   Sep 19 2004 11:12 am
From: "Thomas G. Marshall" <[EMAIL PROTECTED]> 

Gary Labowitz coughed up:
> "Thomas G. Marshall"
> <[EMAIL PROTECTED]> wrote in
> message news:[EMAIL PROTECTED]
>> Gary Labowitz coughed up:
>>> "Thomas G. Marshall"
>>> <[EMAIL PROTECTED]> wrote in
>>> message news:[EMAIL PROTECTED]
>>>> Michael Borgwardt coughed up:
> <<big snip>>
>>>      Data is referred to based on the class of the reference
>>>      variable. Methods are referred to based on the class of the
>>> object.
>>
>> No, you're wrong, and you've made it even more confusing.
>>
>> 1. Static data OR METHODS are referred to based upon the
>> /declaration/ of the Class (of the reference variable for example).
>>
>> 2. Non static data are ALSO referred to based upon the declaration
>> of the Class.
>>
>> 3. Non static methods are referred to based upon the type of the
>> polymorphized object underneath.
>
> I guess I have to be more precise. At the point where we are talking
> about this resolution issue the students haven't even gotten to
> static modifier yet. So, I think what I am saying is correct for
> them. However, your three point statement holds one area that I don't
> like. "3. ... polymorphized object ..." gives me a problem. Since we
> haven't covered static, and I think haven't covered overriding yet
> mention of polymorphism isn't useful. So, I still want to default
> back to my two statements, let them program a while and see the
> results, and then we introduce other notions. The first being static,
> the next being inheritance, and then overriding inherited methods to
> achieve polymorphism. They are already familiar with "stuctural
> polymorphism" due to overloading. Anyway, I'm still struggling to
> find the perfect way to introduce all topics simultaneously -- maybe
> just pass out the JLS and tell them to memorize it.

That'd be the wrong approach IMHO.

When I teach students, I'm similarly faced with being extremely careful in
my wording.  I try to give examples that exploit one issue at a time.  In
this case, I'd use something like my example program posted above, but
several incantations of it, slowly growing in size.  Top only, then Top &
Bottom.  Starting with members of objects, and then moving to statics.  In
that order, only because of /this particular/ "overriding or not who belongs
to what" issue we're talking about.



-- 
Forgetthesong,I'dratherhavethefrontallobotomy...





== 2 of 2 ==
Date:   Sun,   Sep 19 2004 11:13 am
From: "Thomas G. Marshall" <[EMAIL PROTECTED]> 

Gary Labowitz coughed up:
> "Lee Fesperman" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Thomas G. Marshall wrote:
>>>
>>> Lee Fesperman coughed up:
>>>> Thomas G. Marshall wrote:
>>>>>
>>>>> Michael Borgwardt coughed up:
>>>>>> Thomas G. Marshall wrote:
>>>>>>> The reason it works is that a variable to a class object of any
>>>>>>> value can still yield access to a static.
>>>>>>
>>>>>> Actually, there is no object involved at any point. The
>>>>>> *compiler*
>>>>>
>>>>> [snip]
>>>>>
>>>>> You're right.  What I really should have said was a "variable of
>>>>> reference of any value", not object.
>>>>>
>>>>> Basically, given the declaration & definition:
>>>>>
>>>>>         {Type} {Variable Name} = {reference};
>>>>>
>>>>> *Regardless* of the value of {reference},
>>>>>
>>>>>     {reference}.{static id}
>>>>>
>>>>> yields the same thing as
>>>>>
>>>>>     {Type}.{static id}
>>>>
>>>> It's simply a reference, you don't need a variable at all. It is
>>>> any expression producing a reference. It could be a method
>>>> returning a reference or even:
>>>>
>>>>   ((Type) null).{static id}
>>>>
>>>> The static can be a field or a method.
>>>
>>> Your example is good, and it's one I've used before, except that
>>> your explanation is missing how the thing is declared, which is why
>>> it isn't about the reference.
>>>
>>> The variable is declared with a type somewhere, or passed in as a
>>> formal parameter of some type, etc.  It is that type that
>>> determines the static used, not the actual polymorphised object
>>> underneath.
>>
>> You completely missed my point. It is about the reference. A
>> variable is not necessary. There is no 'thing' declared. Try these:
>
> I'm going to hit you with my semantic issue. There "sorta" is a
> variable involved, but it is a "constant variable" over there in the
> literal pool. And the constant variables in the literal pool have
> type.
>
> How's that for weaseling??

Criminey, I'm ashamed to admit that I love it.  LOL.


-- 
Forgetthesong,I'dratherhavethefrontallobotomy...






==========================================================================
TOPIC: update doesnt´t work ?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3619d270a4e29711
==========================================================================

== 1 of 1 ==
Date:   Sun,   Sep 19 2004 12:09 pm
From: [EMAIL PROTECTED] (gzell) 

[EMAIL PROTECTED] (gzell) wrote in message news:<[EMAIL PROTECTED]>...


> hmm, did some changes as suggestet but still missing
> my further lines ...

Puuh, I think I found my new mistake. It´s because
the ArrayList aLines doesn't hold values, but references...

thanks again for your input
Ciao, Günter Zell




==========================================================================
TOPIC: Select and Edit a Record in a Table of JSP page
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/67c119eda64e5709
==========================================================================

== 1 of 2 ==
Date:   Sun,   Sep 19 2004 12:14 pm
From: [EMAIL PROTECTED] (Colin Hartill) 

Hello All,

I am displaying the following Database records in a Table of my JSP
page.

Customer No.  FirstName     LastName

1             Tim            Hertal
2             John           Rizzo
3             Todd           Steven     

I want to select anyone of the record and perform Edit operation. When
I press Edit button, a new screen open up and take all values of the
selected row. Where I can make changes and send the data back to
database.
I am wondering if someone can help me or sends Java and JSP code or
provides any link where I can find information.

Thank you.



== 2 of 2 ==
Date:   Sun,   Sep 19 2004 12:45 pm
From: [EMAIL PROTECTED] (John Rizzo) 

Hello All,

I am displaying the following Database records in a Table of my JSP
page.

Customer No.  FirstName     LastName

1             Tim            Hertal
2             John           Rizzo
3             Todd           Steven     

I want to select anyone of the record and perform Edit operation. When
I press Edit button, a new screen open up and take all values of the
selected row. Where I can make changes and send the data back to
database.
I am wondering if someone can help me or sends Java and JSP code or
provides any link where I can find information.

Thank you.




==========================================================================
TOPIC: J2SE 5.0 generics question
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/34434161a91e61bb
==========================================================================

== 1 of 2 ==
Date:   Mon,   Sep 20 2004 12:29 pm
From: "Jeff" <[EMAIL PROTECTED]> 

Can anyone tell me why the following doesn't work?

class test <T extends ArrayList> {
     private T e = new ArrayList();
}

com\examples\test.java:28: incompatible types
found   : java.util.ArrayList
required: T
        private T e = new ArrayList();

Looking at the decompiled output from JAD, I see:

package com.examples;

import java.util.ArrayList;

class test
{

    test()
    {
        e = new ArrayList();
    }

    private ArrayList e;
}

Hmmm... looks compatible to me.

P.S.

Is there a mailing list specifically for JDK 1.5 discussions?





== 2 of 2 ==
Date:   Mon,   Sep 20 2004 12:31 pm
From: "Jeff" <[EMAIL PROTECTED]> 

Can anyone tell me why the following doesn't work?

class test <T extends ArrayList> {
     private T e = new ArrayList();
}

com\examples\test.java:28: incompatible types
found   : java.util.ArrayList
required: T
        private T e = new ArrayList();

Looking at the decompiled output from JAD, I see:

package com.examples;

import java.util.ArrayList;

class test
{

    test()
    {
        e = new ArrayList();
    }

    private ArrayList e;
}

Hmmm... looks compatible to me.

P.S.

Is there a mailing list specifically for JDK 1.5 discussions?






==========================================================================
TOPIC: JSP: Can I use something other than "jsessionid"?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/878ad312eb351c44
==========================================================================

== 1 of 1 ==
Date:   Sun,   Sep 19 2004 12:49 pm
From: Steve Sobol <[EMAIL PROTECTED]> 

PHP allows you to set the name of the session parameter. It defaults to 
PHPSESSID (I believe) but you can use something else if you want.

JSP's session handling is much more transparent but I was wondering if the spec 
says there is a way to use a parameter name other than JSESSIONID to hold the 
session ID.

-- 
JustThe.net Internet & New Media Services, http://JustThe.net/
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / [EMAIL PROTECTED]
PGP Key available from your friendly local key server (0xE3AE35ED)
Apple Valley, California     Nothing scares me anymore. I have three kids.




==========================================================================
TOPIC: Thread for doFilter and service - is it the same ?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4d3c0ecd8f126018
==========================================================================

== 1 of 1 ==
Date:   Sun,   Sep 19 2004 1:01 pm
From: [EMAIL PROTECTED] (Ken Carroll) 

Sudsy <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> Ken Carroll wrote:
> > Can anyone tell me if the doFilter method is called on the same thread
> > as the servlet's service method ?
> 
> I can't. But I have to ask a question in return: does it matter? I
> would presume (but have no way of knowing without digging into the
> source) that it wouldn't. A filter merely processes the request or
> response. According to the javadocs it can choose to:
> "4. a) Either invoke the next entity in the chain using the FilterChain 
> object (chain.doFilter()),
> 4. b) or not pass on the request/response pair to the next entity in the 
> filter chain to block the request processing"
> 
> There's no obligation on the part of the servlet container to run
> filters in the same thread as the requested servlet. Obviously, if
> a request filter opts to discontinue processing then the servlet
> service method will never be invoked in the first place!
> So why would you care?
If I have something plugged in as a filter which sets some logging
context for the thread servicing the request or does something with a
ThreadLocal on that thread. Currently this is done using a master
servlet which receives the request (service) and which then delegates
real request processing to a delegate (eg struts action servlet).

Ken




==========================================================================
TOPIC: Newbie needs help building project & loading/running an executable
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb5633262bca3f87
==========================================================================

== 1 of 1 ==
Date:   Sun,   Sep 19 2004 1:08 pm
From: [EMAIL PROTECTED] (angusyoung1000) 

I am interested looking at some java FFT source code & rebuilding some
files to get an executable. I have no experience with java but am
looking to come up to speed hopefully pretty quickly. The source code
(6 .java files zipped together) is that I'm interested in studying is
for an FFT analyzer found here:

http://www.dsptutor.freeuk.com/analyser/SA11.zip

from the website:

http://www.dsptutor.freeuk.com/analyser/SpectrumAnalyser.html

I've also downloaded NetBeans IDE 3.6.

So far I've created a project which includes the 6 files and done a
rebuild with no errors. How do I actually run the executable? Any help
will be appreciated.

Thanks.



=======================================================================

You received this message because you are subscribed to the
Google Groups "comp.lang.java.programmer".  

comp.lang.java.programmer
[EMAIL PROTECTED]

Change your subscription type & other preferences:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe

Report abuse:
* send email explaining the problem to [EMAIL PROTECTED]

Unsubscribe:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe


=======================================================================
Google Groups: http://groups-beta.google.com 

Reply via email to