narjes saraie | 17 Jun 15:13 2015
Picon

please help me about distribution commons math

Hi.
I am beginner in java and have some data.I want to guess a distribution for
my data then calculate goodness of fit (gof).
I find distribution commons math and use it ,if i want plot my distribution
or CDF or probability (X>x), how do it?
is it any example for distribution and plotting it.
thanks.
Dave Hammond | 16 Jun 17:51 2015
Picon

[validator] EmailValidator 1.4.1 returns true for some invalid(?) email addresses

The EmailValidator.java isValid routine was changed in version 1.4.1 and now
returns true for email addresses like these:

user <at> com

user <at> gmail

Are these valid email address forms?

javalishixml | 16 Jun 11:32 2015

[Imaging] a quick resize sample needed

Hi Gurus,

Quite a silly question this is. But I really worked for one whole day but still could not get any result.

I have below codes. I just want to finish a a simple function to resize the original picture. But I don't know
how to set  its param.. 
I tried to read the doc API and read the test code. But I still could not figure it out how to do..

Can you plz do me a favor? Looking forward to your early reply...

--------------------------------------------------------------------------------------------------------------
public class ApacheCommonImaging {
public static void main(String[] args) {
// TODO Auto-generated method stub

try
{
//!!!!!!!!!!!!!!
File someFile = new File("E:\\deleteMe\\image\\original.jpg");
File file = someFile;
BufferedImage image_3 = Sanselan.getBufferedImage(file);
File destination = new File("E:\\deleteMe\\image\\commonImaging\\destination.jpg");
ImageFormat format1 = ImageFormat.IMAGE_FORMAT_JPEG;
Map params = new HashMap(Object, Object);   //????
Map params = new HashMap(JpegImageParser.TIFF_TAG_IMAGE_LENGTH, new TagInfo()); //????
Sanselan.writeImage(image_3, destination, format1, params);

}
catch (Exception e)
{
(Continue reading)

Purshotam Shah | 16 Jun 01:12 2015

[jexl]Apache JEXL conditional execution path

I am using Apache JEXL for condition expression execution.

My expression can be like

(functionA(string[]) || functionB(string[])) &&  (functionC(string[]) ||  functionD(string[]) )
Each function will return some string. If the function returns empty string, then it consider as false.

At the end I need to have concatenated string and also which path has created the concatenated string.

(functionA(string[]) && functionB(string[])) ||  (functionC(string[]) &&  functionD(string[]) )
If functionA = true, functionB = false, functionC = true, functionD = true Final output should be of
concatenated string from functionC and functionD. It should not contain functionA output.

Any suggestion on how to do it?

  
R.C. Hoekstra | 15 Jun 22:37 2015
Picon

Re: Re: [scxml] bug with script in combination of a chain of transitions

Hi Woonsan, hi others, 

At first, sorry for the late reply. I posted the issue in april, but didn't get a response in the first two
weeks. Then I forgot about it (busy with other issues), and then just saw your reply, about a week ago. 

Anyway, I've been thinking hard about the issue, and I think I now understand what is going on here. 

Then again, sorry that my example wasn't so clear, at first. The problem is we're having very complicated
scxml schemes working with several custom classes, and I tried to bring the example back to the basics, but
probably just missed the key thing. 

It basically comes to this, I discovered. Consider this scxml: 

<state id="bla">
       <transition event="screening" target="cxr" />
</state>

<state id="cxr">
        <onentry>
                 <ntd:test id="CXR" />
        </onentry> 
        <transition event="CXR.negative" target="untreated" />
        <transition event="CXR.positive" target="somethingelse"/>
</state>
<state id="untreated" />

The custom ntd:test tag fires a CXR.negative event. 

Now the SCXMLListener reports this for the onentry's and onexit's

(Continue reading)

Thomas Neidhart | 14 Jun 11:57 2015
Picon

[math] Fitting a distribution from sample data Was: please help me

Forwarded to the user mailinglist

-------- Forwarded Message --------
Subject: 	please help me
Date: 	Sun, 14 Jun 2015 06:36:41 +0000 (UTC)
From: 	meli saraie <melisaraie <at> yahoo.com>
Reply-To: 	meli saraie <melisaraie <at> yahoo.com>
To: 	tn <at> apache.org <tn <at> apache.org>

Dear Tomas Neidhart
Hi
I am beginner in java and have some data.I want to guess a distribution
for my data then calculate goodness of fit (gof).
we see commons math and so thankful for it .
I read
http://commons.apache.org/proper/commons-math/userguide/distribution.html ,but
i cant use it!
Is there any example or document to use and learn using it?
I would be so thankful if you would help me on this.
Wish you the best.
Richard Kolb | 13 Jun 13:00 2015
Picon

Getting a List of Dates from Apache Commons DBUtils

Hello,

I am trying to get a list of dates from a table.

This kind of query works well with Strings and my own POJOs, but for some
reason does not work on java.sql.Date's.

Query :

sql = "select EVENT_DATE TIME from EVENT_TABLE";

EVENT_DATE in EVENT_TABLE is a valid date field.

Java code :

ResultSetHandler<List<java.sql.Date>> h = new
BeanListHandler<>(java.sql.Date.class);
QueryRunner db = new QueryRunner(dataSource,true);
List<java.sql.Date> sqlDates = db.query(sql, h,new
java.sql.Date(from.getTime()),new java.sql.Date(to.getTime()));

thanks,
Richard.
Brady Kelley | 11 Jun 23:08 2015

[validator]

Commons Validation with Spring MVC 3+

We looking into converting a struts 1 web app to Spring.  One of the major hurdles we ran into was the lack of
support for commons validator with the current versions of spring.  It looked like an adapter was created a
while back to support this but has since been deprecated.  Does anyone know of any options we might have to
support the  Commons Validator with Spring 3+?  We would really like to avoid having to manually convert our
extensive xml validation logic to annotated validation if possible.  Any information or suggestions
would be great.

Thanks!
Kristina Chodorow | 10 Jun 16:08 2015
Picon

[compress] Getting external attributes from a ZipArchiveEntry

ZipArchiveEntry.getExternalAttributes() is always returning 0 for me.  I
have pasted a hex dump of the zip file I'm testing with at the bottom of
email: 2 files of 0 bytes, one named x and one named y.  Both of their
external attributes are 33184 (a081 in the hex dump).  However, running the
following program gives me 0 for both of their external attributes:

import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.IOException;

public class Foo {
  public static void main(String args[]) throws IOException {
    File archiveFile = new File("myzip.zip");
    try (InputStream is = new FileInputStream(archiveFile)) {
      ZipArchiveInputStream in = new ZipArchiveInputStream(is);
      ZipArchiveEntry entry = in.getNextZipEntry();
      while (entry != null) {
        System.out.println("entry: " + entry);
        System.out.println("external: " + entry.getExternalAttributes());
        entry = in.getNextZipEntry();
      }
    }
  }
}

Do I need to do something different to get the external attributes?  Is
(Continue reading)

Sergio Hernández | 1 Jun 15:56 2015
Picon

[vfs] HDFS provider

Hi,

I'm trying to use VFSJFileChooser to browse the Hadoop Distributed
Filesystem of my cluster.

According to documentation, HDFS is supported in read-only mode but when i
download the apache-commons-vfs library hdfs provider is not included.

How I can solve this?

Thanks in advance

Sergio
Phil Steitz | 1 Jun 15:38 2015
Picon

[ANNOUNCEMENT] Apache Commons Pool 2.4.1 released

The Apache Commons Team is pleased to announce the release of Apache Commons Pool 2.4.1.

The Apache Commons Pool open source software library provides an object-pooling API and a number of object
pool implementations.

No client code changes are required to migrate from any of the 2.x versions to 2.4.1. Users of version 1.x
should consult the migration guide on the Commons Pool web site.

Source and binary distributions are available for download from the Apache Commons download site:
http://commons.apache.org/proper/commons-pool/download_pool.cgi

When downloading, please verify signatures using the KEYS file available at the above location.

Full details of all the changes in 2.4.1 can be found in the changelog:
http://commons.apache.org/proper/commons-pool/changes-report.html

For complete information on Commons Pool, including instructions on how to submit bug reports, patches,
or suggestions for improvement, see the Apache Commons Pool website:
http://commons.apache.org/proper/commons-pool/

Phil Steitz, on behalf of the Apache Commons community

Gmane