Re: where is dbcp-1.4RC1 repository?
tommy wang wrote: hi all: I need run dbcp-1.4RC1 by maven in OSGi envirement. Please tell me where I can get it. what is dbcp-1.4 release schedule? thanks! The tag is here: http://svn.apache.org/repos/asf/commons/proper/dbcp/tags/DBCP_1_4_RC1/ Release should be next week, assuming all goes well with final RC and VOTE. Phil - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [dbcp] 1.3/1.4 RC1 available for review
Jörg Schaible wrote: Hi Phil, Phil Steitz wrote at Donnerstag, 10. Dezember 2009 12:42: Jörg Schaible wrote: Hi Phil, Phil Steitz wrote: I have prepared release candidates for DBCP 1.3 and 1.4. Please all interested parties have a look and test. If all goes well, I will kick off a release VOTE based on these artifacts in the next couple of days. I see these as really two sets of artifacts associated with one release, so I am inclined to just do one VOTE including both versions. If anyone disagrees with this, please speak up. I am happy to run two VOTEs. 1.3 (JDBC 3) version: http://people.apache.org/~psteitz/dbcp-1.3-rc1 http://people.apache.org/~psteitz/dbcp-1.3-rc1/site http://people.apache.org/~psteitz/dbcp-1.3-rc1/maven http://svn.apache.org/repos/asf/commons/proper/dbcp/tags/DBCP_1_3_RC1/ Like Nial I changed geronimo-jta_1.1_spec to version 1.1. My compiler zoo fails though for blackdown-jdk-1.4.2.03, jrockit-jdk-1.4.2.16 and sun- jdk-1.4.2.19. IMHO you must update the xerces version to a release that contains the driver implementation in the Java-SPI (META-INF/services): Thanks, Jorg. I really appreciate your running this through the zoo. Can you identify a suitable Xerces version? Actually I tried that yesterday. I've upgraded to xercesImpl-2.9.1 that contains the SPI entry for sure, but the test still fails. After looking into the code I've seen that the test explicitly sets the system property already. Even after moving that code from constructor into setUp the failure still occurs. This left be somewhat baffled, but I ran out of time to have a further look :-/ I am going to make this and the jta spec change and cut another RC. Thanks all for testing. Did you also see those: Yes. Investigating... [snip] I do not see those using IBM-JDK 1.5.0.10. With this I had a casually 1 failure, but no test reports are generated with Ant nor could I see on the console which test actually failed. Is there a failure in the Ant build that prevents the junit reports to be written? Additionally the Ant build filters-out the JDBC4 stuff ?!? I thought it's not there in 1.3. The 1.3 build does the filtering, though I guess the filtering could be removed from the build in the 1.3 branch, since as part of the branch/release process, I check in the filtered sources. The filtering is left in so that on first build from branched sources, the build does the filtering and succeeds. I guess I could cut the filtering out of the 1.3 build, but then I would have to maintain a separate build script just to do the in-place filtering. Simply wondering, nothing serious. [snip] 1.4 (JDBC 4) version: http://people.apache.org/~psteitz/dbcp-1.4-rc1 http://people.apache.org/~psteitz/dbcp-1.4-rc1/site http://people.apache.org/~psteitz/dbcp-1.4-rc1/maven http://svn.apache.org/repos/asf/commons/proper/dbcp/tags/DBCP_1_4_RC1/ Builds from source and runs tests with IcedTea6 1.6.2, Sun JDK 1.6 and Sun JDK 1.7.0.0.alpha69 (add to README.txt ?!?). However it fails with IBM 1.6.0.6: == % --- Test set: org.apache.commons.dbcp.managed.TestBasicManagedDataSource --- Tests run: 46, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.398 sec FAILURE! testReallyClose(org.apache.commons.dbcp.managed.TestBasicManagedDataSource) Time elapsed: 0.066 sec FAILURE! junit.framework.AssertionFailedError: Expecting SQLException - XAResources orphaned at junit.framework.Assert.fail(Assert.java:47) at org.apache.commons.dbcp.managed.TestBasicManagedDataSource.testReallyClose(TestBasicManagedDataSource.java:72) == % Seems that the IBM JDK is behaving differently. Yes. Investigating... The build setup itself looks good though, except a minor nit: == % [WARNING] While downloading xml-apis:xml-apis:2.0.2 This artifact has been relocated to xml-apis:xml-apis:1.0.b2. == % xml-apis-2.0.2 is simply a wrong release and we should refer the correct one. I've replaced it with the latest release 1.3.04. Thanks! Phil - Jörg - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [dbcp] 1.3/1.4 RC1 available for review
Phil Steitz wrote: Jörg Schaible wrote: Hi Phil, Phil Steitz wrote at Donnerstag, 10. Dezember 2009 12:42: Jörg Schaible wrote: Hi Phil, Phil Steitz wrote: I have prepared release candidates for DBCP 1.3 and 1.4. Please all interested parties have a look and test. If all goes well, I will kick off a release VOTE based on these artifacts in the next couple of days. I see these as really two sets of artifacts associated with one release, so I am inclined to just do one VOTE including both versions. If anyone disagrees with this, please speak up. I am happy to run two VOTEs. 1.3 (JDBC 3) version: http://people.apache.org/~psteitz/dbcp-1.3-rc1 http://people.apache.org/~psteitz/dbcp-1.3-rc1/site http://people.apache.org/~psteitz/dbcp-1.3-rc1/maven http://svn.apache.org/repos/asf/commons/proper/dbcp/tags/DBCP_1_3_RC1/ Like Nial I changed geronimo-jta_1.1_spec to version 1.1. My compiler zoo fails though for blackdown-jdk-1.4.2.03, jrockit-jdk-1.4.2.16 and sun- jdk-1.4.2.19. IMHO you must update the xerces version to a release that contains the driver implementation in the Java-SPI (META-INF/services): Thanks, Jorg. I really appreciate your running this through the zoo. Can you identify a suitable Xerces version? Actually I tried that yesterday. I've upgraded to xercesImpl-2.9.1 that contains the SPI entry for sure, but the test still fails. After looking into the code I've seen that the test explicitly sets the system property already. Even after moving that code from constructor into setUp the failure still occurs. This left be somewhat baffled, but I ran out of time to have a further look :-/ I am going to make this and the jta spec change and cut another RC. Thanks all for testing. Did you also see those: Yes. Investigating... [snip] I do not see those using IBM-JDK 1.5.0.10. With this I had a casually 1 failure, but no test reports are generated with Ant nor could I see on the console which test actually failed. Is there a failure in the Ant build that prevents the junit reports to be written? Forgot to respond to this. Yes, there is a missing format element that makes the build effectively silent. I will add that. Phil Additionally the Ant build filters-out the JDBC4 stuff ?!? I thought it's not there in 1.3. The 1.3 build does the filtering, though I guess the filtering could be removed from the build in the 1.3 branch, since as part of the branch/release process, I check in the filtered sources. The filtering is left in so that on first build from branched sources, the build does the filtering and succeeds. I guess I could cut the filtering out of the 1.3 build, but then I would have to maintain a separate build script just to do the in-place filtering. Simply wondering, nothing serious. [snip] 1.4 (JDBC 4) version: http://people.apache.org/~psteitz/dbcp-1.4-rc1 http://people.apache.org/~psteitz/dbcp-1.4-rc1/site http://people.apache.org/~psteitz/dbcp-1.4-rc1/maven http://svn.apache.org/repos/asf/commons/proper/dbcp/tags/DBCP_1_4_RC1/ Builds from source and runs tests with IcedTea6 1.6.2, Sun JDK 1.6 and Sun JDK 1.7.0.0.alpha69 (add to README.txt ?!?). However it fails with IBM 1.6.0.6: == % --- Test set: org.apache.commons.dbcp.managed.TestBasicManagedDataSource --- Tests run: 46, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.398 sec FAILURE! testReallyClose(org.apache.commons.dbcp.managed.TestBasicManagedDataSource) Time elapsed: 0.066 sec FAILURE! junit.framework.AssertionFailedError: Expecting SQLException - XAResources orphaned at junit.framework.Assert.fail(Assert.java:47) at org.apache.commons.dbcp.managed.TestBasicManagedDataSource.testReallyClose(TestBasicManagedDataSource.java:72) == % Seems that the IBM JDK is behaving differently. Yes. Investigating... The build setup itself looks good though, except a minor nit: == % [WARNING] While downloading xml-apis:xml-apis:2.0.2 This artifact has been relocated to xml-apis:xml-apis:1.0.b2. == % xml-apis-2.0.2 is simply a wrong release and we should refer the correct one. I've replaced it with the latest release 1.3.04. Thanks! Phil - Jörg - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: Commons BeanUtils: RowSetDynaClass.setUseColumnLabel() useless?
Shameless self-bump... El Tonno wrote: Hello, Just a quick question. about Jakarta Commons BeanUtils 1.8.2 (the latest) I have to slurp a ResultSet into a RowSetDynaClass, but I have to use the JDBC column labels instead of the JDBC column names. It seems that the instance method RowSetDynaClass.setUseColumnLabel() is what I want, as its stated purpose is to make a RowSetDynaClass instance use the column labels. However, this instance method is useless. Indeed, the flag saying whether column labels are used is useful at initalization time only, when a RowsSetDynaClass is initialized from a ResultSet, and not later. It seems that the constructors have to take the useColumnLabel flag instead - but they don't. Either I don't get the API at all or this is a bug. Is it? I'm off patching the source a bit. Best regards, -- David - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: Commons BeanUtils: RowSetDynaClass.setUseColumnLabel() useless?
On Fri, Dec 4, 2009 at 9:50 PM, El Tonno el.to...@m-plify.net wrote: Hello, Just a quick question. about Jakarta Commons BeanUtils 1.8.2 (the latest) I have to slurp a ResultSet into a RowSetDynaClass, but I have to use the JDBC column labels instead of the JDBC column names. It seems that the instance method RowSetDynaClass.setUseColumnLabel() is what I want, as its stated purpose is to make a RowSetDynaClass instance use the column labels. However, this instance method is useless. Indeed, the flag saying whether column labels are used is useful at initalization time only, when a RowsSetDynaClass is initialized from a ResultSet, and not later. It seems that the constructors have to take the useColumnLabel flag instead - but they don't. Either I don't get the API at all or this is a bug. Is it? Its a bug, can you create a bug report please: http://commons.apache.org/beanutils/issue-tracking.html This was added in 1.8.2, but obviously not well thought out - apologies. http://issues.apache.org/jira/browse/BEANUTILS-344 Niall I'm off patching the source a bit. Best regards, -- David - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
primitives work
Folks, Given that Mahout has forked and sorted out a copy of the COLT collections and the math it depends on, I think it makes sense to do the substantive work in their fork (sadly, that means patches instead of a sandbox, but I'll survive), and then, which it's all working, reopen a discussion about the future of the existing primitives and how / if to combine, and commit things into the sandbox based on the results of that discussion. Ahem, just a little, 'code before community.' :-) --benson - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
[g...@vmgump]: Project commons-jelly (in module commons-jelly) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project commons-jelly has an issue affecting its community integration. This issue affects 42 projects. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - commons-jelly : Commons Jelly - commons-jelly-tags-ant : Commons Jelly - commons-jelly-tags-antlr : Commons Jelly - commons-jelly-tags-avalon : Commons Jelly - commons-jelly-tags-bean : Commons Jelly - commons-jelly-tags-beanshell : Commons Jelly - commons-jelly-tags-betwixt : Commons Jelly - commons-jelly-tags-bsf : Commons Jelly - commons-jelly-tags-define : Commons Jelly - commons-jelly-tags-define-test : Commons Jelly - commons-jelly-tags-dynabean : Commons Jelly - commons-jelly-tags-email : Commons Jelly - commons-jelly-tags-fmt : Commons Jelly - commons-jelly-tags-fmt-test : Commons Jelly - commons-jelly-tags-html : Commons Jelly - commons-jelly-tags-http : Commons Jelly - commons-jelly-tags-interaction : Commons Jelly - commons-jelly-tags-jaxme : Commons Jelly - commons-jelly-tags-jface : Commons Jelly - commons-jelly-tags-jms : Commons Jelly - commons-jelly-tags-jmx : Commons Jelly - commons-jelly-tags-jsl : Commons Jelly - commons-jelly-tags-jsl-test : Commons Jelly - commons-jelly-tags-junit : Commons Jelly - commons-jelly-tags-log : Commons Jelly - commons-jelly-tags-memory : Commons Jelly - commons-jelly-tags-quartz : Commons Jelly - commons-jelly-tags-regexp : Commons Jelly - commons-jelly-tags-soap : Commons Jelly - commons-jelly-tags-sql : Commons Jelly - commons-jelly-tags-swing : Commons Jelly - commons-jelly-tags-swt : Commons Jelly - commons-jelly-tags-threads : Commons Jelly - commons-jelly-tags-util : Commons Jelly - commons-jelly-tags-validate : Commons Jelly - commons-jelly-tags-velocity : Commons Jelly - commons-jelly-tags-xml : Commons Jelly - commons-jelly-tags-xml-test : Commons Jelly - commons-jelly-tags-xmlunit : Commons Jelly - commons-jelly-test : Commons Jelly - maven : Project Management Tools - maven-bootstrap : Project Management Tools Full details are available at: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Sole output [commons-jelly-11122009.jar] identifier set to project name -DEBUG- Dependency on jakarta-servletapi-5-servlet exists, no need to add for property maven.jar.servletapi. -DEBUG- Dependency on jakarta-taglibs-standard exists, no need to add for property maven.jar.jstl. -DEBUG- Dependency on xml-xerces exists, no need to add for property maven.jar.xerces. -DEBUG- (Gump generated) Maven Properties in: /srv/gump/public/workspace/commons-jelly/build.properties -INFO- Failed with reason build failed -DEBUG- Maven POM in: /srv/gump/public/workspace/commons-jelly/project.xml -DEBUG- Maven project properties in: /srv/gump/public/workspace/commons-jelly/project.properties -DEBUG- Extracted fallback artifacts from Gump Repository The following work was performed: http://vmgump.apache.org/gump/public/commons-jelly/commons-jelly/gump_work/build_commons-jelly_commons-jelly.html Work Name: build_commons-jelly_commons-jelly (Type: Build) Work ended in a state of : Failed Elapsed: 7 secs Command Line: maven --offline jar [Working Directory: /srv/gump/public/workspace/commons-jelly] CLASSPATH: /usr/lib/jvm/java-6-sun/lib/tools.jar:/srv/gump/public/workspace/apache-commons/beanutils/dist/commons-beanutils-11122009.jar:/srv/gump/public/workspace/apache-commons/cli/target/commons-cli-11122009.jar:/srv/gump/public/workspace/commons-collections-3.x/target/commons-collections-3.3-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/discovery/dist/commons-discovery.jar:/srv/gump/public/workspace/commons-jexl-1.x/target/commons-jexl-1.1.1-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/lang/target/commons-lang-3.0-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-11122009.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-11122009.jar:/srv/gump/public/workspace/dom4j/build/dom4j.jar:/srv/gump/packages/forehead/forehead-1.0-beta-5.jar:/srv/gump/public/workspace/jakarta-servletapi-5/jsr154/dist/lib/servlet-api.jar:/srv/gump/public/workspace/jakarta-taglibs/standard/spec/target/taglibs-stand
[g...@vmgump]: Project commons-configuration-test (in module apache-commons) failed
To whom it may engage... This is an automated request, but not an unsolicited one. For more information please visit http://gump.apache.org/nagged.html, and/or contact the folk at gene...@gump.apache.org. Project commons-configuration-test has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 115 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - commons-configuration-test : Apache Commons Full details are available at: http://vmgump.apache.org/gump/public/apache-commons/commons-configuration-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -WARNING- Overriding Maven2 settings: [/srv/gump/public/workspace/apache-commons/configuration/gump_mvn_settings.xml] -DEBUG- (Gump generated) Maven2 Settings in: /srv/gump/public/workspace/apache-commons/configuration/gump_mvn_settings.xml -INFO- Failed with reason build failed -DEBUG- Maven POM in: /srv/gump/public/workspace/apache-commons/configuration/pom.xml -INFO- Project Reports in: /srv/gump/public/workspace/apache-commons/configuration/target/surefire-reports The following work was performed: http://vmgump.apache.org/gump/public/apache-commons/commons-configuration-test/gump_work/build_apache-commons_commons-configuration-test.html Work Name: build_apache-commons_commons-configuration-test (Type: Build) Work ended in a state of : Failed Elapsed: 6 mins 53 secs Command Line: mvn --batch-mode --settings /srv/gump/public/workspace/apache-commons/configuration/gump_mvn_settings.xml test [Working Directory: /srv/gump/public/workspace/apache-commons/configuration] CLASSPATH: /usr/lib/jvm/java-6-sun/lib/tools.jar:/srv/gump/public/workspace/apache-commons/configuration/target/commons-configuration-1.7-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/jexl/target/commons-jexl-2.0-SNAPSHOT.jar - testInitCopy(org.apache.commons.configuration.TestXMLConfiguration) testSaveWithDelimiterParsingDisabled(org.apache.commons.configuration.TestXMLConfiguration) testSetRootAttribute(org.apache.commons.configuration.TestXMLConfiguration) testLoadAndSaveFromFile(org.apache.commons.configuration.TestXMLConfiguration) testSaveToURL(org.apache.commons.configuration.TestXMLConfiguration) testSaveToStream(org.apache.commons.configuration.TestXMLConfiguration) testAutoSave(org.apache.commons.configuration.TestXMLConfiguration) testSaveAttributes(org.apache.commons.configuration.TestXMLConfiguration) testCloneWithSave(org.apache.commons.configuration.TestXMLConfiguration) testEmptyElements(org.apache.commons.configuration.TestXMLConfiguration) testSaveWithEncoding(org.apache.commons.configuration.TestXMLConfiguration) testSaveWithNullEncoding(org.apache.commons.configuration.TestXMLConfiguration) testSaveWithDoctype(org.apache.commons.configuration.TestXMLConfiguration) testSaveWithDoctypeIDs(org.apache.commons.configuration.TestXMLConfiguration) testSubsetWithReload(org.apache.commons.configuration.TestXMLConfiguration) testConfigurationAtWithReload(org.apache.commons.configuration.TestXMLConfiguration) testConfigurationsAtWithReload(org.apache.commons.configuration.TestXMLConfiguration) testGetKeysWithReload(org.apache.commons.configuration.TestXMLConfiguration) testSetTextRootElement(org.apache.commons.configuration.TestXMLConfiguration) testClearTextRootElement(org.apache.commons.configuration.TestXMLConfiguration) testAutoSaveWithSubnodeConfig(org.apache.commons.configuration.TestXMLConfiguration) testAutoSaveWithSubSubnodeConfig(org.apache.commons.configuration.TestXMLConfiguration) testSaveDelimiterParsingDisabled(org.apache.commons.configuration.TestXMLConfiguration) testSaveDelimiterParsingDisabledAttrs(org.apache.commons.configuration.TestXMLConfiguration) testMultipleAttrValuesEscaped(org.apache.commons.configuration.TestXMLConfiguration) testAutoSaveWithReloadingStrategy(org.apache.commons.configuration.TestXMLConfiguration) testAutoSaveAddNodes(org.apache.commons.configuration.TestXMLConfiguration) testAddNodesAndSave(org.apache.commons.configuration.TestXMLConfiguration) testRegisterEntityId(org.apache.commons.configuration.TestXMLConfiguration) testSaveAfterCreateWithCopyConstructor(org.apache.commons.configuration.TestXMLConfiguration) testCopyRootName(org.apache.commons.configuration.TestXMLConfiguration) testCopyRootNameNoDocument(org.apache.commons.configuration.TestXMLConfiguration) testSaveWithValidation(org.apache.commons.configuration.TestXMLConfiguration) testSaveWithValidationFailure(org.apache.commons.configuration.TestXMLConfiguration) Tests run: 1456, Failures: 0, Errors: 60, Skipped: 0 [INFO]
[MATH] Proposal to add semivariance to StatUtils.java
Hi - this is my first email to the commons-math group. I've been using commons-math for quite some time, but this is the first time I've attempted to contribute. I've added semivariance calculations to my local build of commons-math and I would like to contribute them. Semivariance is described a little bit on http://en.wikipedia.org/wiki/Semivariance , but a real reason you would use them is in finance in order to compute the Sortino ratio rather than the Sharpe ratio. http://en.wikipedia.org/wiki/Sortino_ratio gives an explanation of the Sortino ratio and why you would choose to use that rather than the Sharpe ratio. (There are other ways to measure the performance of your portfolio, but I wont bore everybody with that stuff) I've already got the coding completed along with the test cases and building using mvn site. The only two files I've modified is src/main/java/org/apache/commons/stat/StatUtils.java and src/test/java/org/apache/commons/math/stat/StatUtilsTest.java Is this something that people would like added to commons-math? If so, how do we proceed? Thank you very much Larry Diamond _ Hotmail: Trusted email with Microsoft’s powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141664/direct/01/
Re: svn commit: r889641 - in /commons/proper/jexl/trunk: src/main/java/org/apache/commons/jexl2/ src/main/java/org/apache/commons/jexl2/introspection/ src/site/ src/test/java/org/apache/commons/jexl
On 11/12/2009, hen...@apache.org hen...@apache.org wrote: Author: henrib Date: Fri Dec 11 14:38:03 2009 New Revision: 889641 URL: http://svn.apache.org/viewvc?rev=889641view=rev Log: Fixed JEXL-93; optional flag at UberspectImpl creation allows to consider public fields as properties [snip] == --- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/PublicFieldsTest.java (added) +++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/PublicFieldsTest.java Fri Dec 11 14:38:03 2009 @@ -0,0 +1,124 @@ +/* + * Copyright 2009 henri. + * Please don't add copyright to the AL header ... + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: svn commit: r889641 - in /commons/proper/jexl/trunk: src/main/java/org/apache/commons/jexl2/ src/main/java/org/apache/commons/jexl2/introspection/ src/site/ src/test/java/org/apache/commons/jexl
On 11/12/2009, sebb seb...@gmail.com wrote: On 11/12/2009, hen...@apache.org hen...@apache.org wrote: Author: henrib Date: Fri Dec 11 14:38:03 2009 New Revision: 889641 URL: http://svn.apache.org/viewvc?rev=889641view=rev Log: Fixed JEXL-93; optional flag at UberspectImpl creation allows to consider public fields as properties [snip] == --- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/PublicFieldsTest.java (added) +++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/PublicFieldsTest.java Fri Dec 11 14:38:03 2009 @@ -0,0 +1,124 @@ +/* + * Copyright 2009 henri. + * Please don't add copyright to the AL header ... + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. Same applies to ClassCreator, ClassCreatorTest, PublicFieldsTest in src/test/java/org/apache/commons/jexl2 - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: svn commit: r889516 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear: AbstractRealVector.java OpenMapRealVector.java
billbar...@apache.org a écrit : Author: billbarker Date: Fri Dec 11 06:38:20 2009 New Revision: 889516 URL: http://svn.apache.org/viewvc?rev=889516view=rev Log: Initial fixes to the iterators. Thanks a lot for your help, Bill. Luc This fixes the default sparseIterator problem where a RealVector only contains zero elements, and add a sparseIterator to the OpenMapRealVector. Still TODO: 1) add unit tests 2) remove *mapTo and *mapToSelf from OpenMapRealVector 3) fix javadocs 4) remove support for non-zero default values in OpenMapRealVector Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealVector.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealVector.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealVector.java?rev=889516r1=889515r2=889516view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealVector.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/AbstractRealVector.java Fri Dec 11 06:38:20 2009 @@ -769,9 +769,15 @@ if (current.getValue() == 0) { advance(current); } -next = new EntryImpl(); -next.setIndex(current.getIndex()); -advance(next); +if(current.getIndex() = 0){ +// There is at least one non-zero entry +next = new EntryImpl(); +next.setIndex(current.getIndex()); +advance(next); +} else { +// The vector consists of only zero entries, so deny having a next +current = null; +} } /** Advance an entry up to the next non null one. Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java?rev=889516r1=889515r2=889516view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/OpenMapRealVector.java Fri Dec 11 06:38:20 2009 @@ -1250,4 +1250,70 @@ return (double)entries.size()/(double)getDimension(); } +/** @{InheritDoc} */ +public java.util.IteratorEntry sparseIterator() { +return new OpenMapSparseIterator(); +} + +/** + * Implementation of codeEntry/code optimized for OpenMap. + * pThis implementation does not allow arbitrary calls to codesetIndex/code + * since the order that entries are returned is undefined. + */ +protected class OpenMapEntry extends Entry { +private final Iterator iter; + +protected OpenMapEntry(Iterator iter) { +this.iter = iter; +} +/** {...@inheritdoc} */ +@Override +public double getValue() { +return iter.value(); +} + +/** {...@inheritdoc} */ +@Override +public void setValue(double value) { +entries.put(iter.key(), value); +} + +/** {...@inheritdoc} */ +@Override +public int getIndex() { +return iter.key(); +} +} + +/** + * Iterator class to do iteration over just the non-zero elements. + * pThis implementation is fail-fast, so cannot be used to modify any zero element. + * + */ + +protected class OpenMapSparseIterator implements java.util.IteratorEntry { +private final Iterator iter; +private final Entry current; + +protected OpenMapSparseIterator() { +iter = entries.iterator(); +current = new OpenMapEntry(iter); +} + +/** {...@inheritdoc} */ +public boolean hasNext() { +return iter.hasNext(); +} + +/** {...@inheritdoc} */ +public Entry next() { +iter.advance(); +return current; +} + +public void remove() { +throw new UnsupportedOperationException(Not supported); + } + +} } - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [MATH] Proposal to add semivariance to StatUtils.java
Hello Larry, The best way to contribute would be to create a JIRA issue describing the enhancement, with your code attached as a patch. (URL for Commons-Math JIRA: http://issues.apache.org/jira/browse/MATH) Regards, Julien 2009/12/11 Larry Diamond larry_diam...@hotmail.com: Hi - this is my first email to the commons-math group. I've been using commons-math for quite some time, but this is the first time I've attempted to contribute. I've added semivariance calculations to my local build of commons-math and I would like to contribute them. Semivariance is described a little bit on http://en.wikipedia.org/wiki/Semivariance , but a real reason you would use them is in finance in order to compute the Sortino ratio rather than the Sharpe ratio. http://en.wikipedia.org/wiki/Sortino_ratio gives an explanation of the Sortino ratio and why you would choose to use that rather than the Sharpe ratio. (There are other ways to measure the performance of your portfolio, but I wont bore everybody with that stuff) I've already got the coding completed along with the test cases and building using mvn site. The only two files I've modified is src/main/java/org/apache/commons/stat/StatUtils.java and src/test/java/org/apache/commons/math/stat/StatUtilsTest.java Is this something that people would like added to commons-math? If so, how do we proceed? Thank you very much Larry Diamond _ Hotmail: Trusted email with Microsoft’s powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141664/direct/01/ - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [MATH] Proposal to add semivariance to StatUtils.java
Done. Please feel free to contact me if anybody has any questions about the work I'm contributing. Thank you very much Larry Diamond On Fri, Dec 11, 2009 at 3:24 PM, Julien Aymé julien.a...@gmail.com wrote: Hello Larry, The best way to contribute would be to create a JIRA issue describing the enhancement, with your code attached as a patch. (URL for Commons-Math JIRA: http://issues.apache.org/jira/browse/MATH) Regards, Julien 2009/12/11 Larry Diamond larry_diam...@hotmail.com: Hi - this is my first email to the commons-math group. I've been using commons-math for quite some time, but this is the first time I've attempted to contribute. I've added semivariance calculations to my local build of commons-math and I would like to contribute them. Semivariance is described a little bit on http://en.wikipedia.org/wiki/Semivariance , but a real reason you would use them is in finance in order to compute the Sortino ratio rather than the Sharpe ratio. http://en.wikipedia.org/wiki/Sortino_ratio gives an explanation of the Sortino ratio and why you would choose to use that rather than the Sharpe ratio. (There are other ways to measure the performance of your portfolio, but I wont bore everybody with that stuff) I've already got the coding completed along with the test cases and building using mvn site. The only two files I've modified is src/main/java/org/apache/commons/stat/StatUtils.java and src/test/java/org/apache/commons/math/stat/StatUtilsTest.java Is this something that people would like added to commons-math? If so, how do we proceed? Thank you very much Larry Diamond _ Hotmail: Trusted email with Microsoft’s powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141664/direct/01/