[jira] [Commented] (TEXT-25) Add a duration parser
[ https://issues.apache.org/jira/browse/TEXT-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16007528#comment-16007528 ] Bruno P. Kinoshita commented on TEXT-25: Yup, it provides a way to extend it, but I would suggest offering a few implementations, as in Commons CSV parser. The default could be English, but maybe we could provide French, Spanish, and Portuguese too. And maybe provide another strategy that would simply build the parser from a locale. We could provide ResourceBundles if there are not some available already. Then simply match ResourceBundle against the locale and create the parser. Ideally, the same approach for internationalization in Commons Text for the Duration Parser would be re-used in the Human Names Parser, and for future modules that may require such feature. > Add a duration parser > - > > Key: TEXT-25 > URL: https://issues.apache.org/jira/browse/TEXT-25 > Project: Commons Text > Issue Type: New Feature >Reporter: Bruno P. Kinoshita >Assignee: Bruno P. Kinoshita >Priority: Minor > Fix For: 1.1 > > > Duration parses interpret text such as *2 hours, 1 mn and 22sec*. > Examples exist, such as https://github.com/jchampemont/gunip, written in > Javaby Jean Champémont, inspired by https://github.com/domchristie/juration > (JavaScript). -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (NUMBERS-37) Angle class
[ https://issues.apache.org/jira/browse/NUMBERS-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16007132#comment-16007132 ] Gilles commented on NUMBERS-37: --- Oops, I've replied to a now-deleted comment; looks strange... > Angle class > --- > > Key: NUMBERS-37 > URL: https://issues.apache.org/jira/browse/NUMBERS-37 > Project: Commons Numbers > Issue Type: New Feature >Reporter: Gilles >Assignee: Gilles >Priority: Minor > Labels: api > Fix For: 1.0 > > Attachments: PlaneAngle.java > > > How about adding (to module {{commons-numbers-core}}) a class representing > the "angle" concept (see attached file)? -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (NUMBERS-37) Angle class
[ https://issues.apache.org/jira/browse/NUMBERS-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16007128#comment-16007128 ] Gilles commented on NUMBERS-37: --- bq. based \[...\] on radians It was my first thought, until I figured out that the one function I was porting from "Commons Math" (i.e. {{MathUtils.normalizeAngle}}) was more efficiently implemented with "turns". Fortunately, this is an "implementation detail"; so, if "turns" turn out :) to be a bad choice, we can change it transparently later on. bq. might we think about including "gons"? Some things should be left to die. :) I'm not even sure about "degrees". bq. prefer core should have very core part of numbers What should be in it (exhaustively)? bq. angle is the part of geometry The {{geometry}} package from "Commons Math" is not likely to become part of "Commons Numbers" because it's a library unto itself. {{PlaneAngle}} could be imported by a revamped version of that package, in the same way that {{Complex}} and {{Quaternion}} will be. At this point, I'd be careful with what to include in {{PlaneAngle}}. The original idea was to continue with emptying the "utils" classes, as per the Stian's indirect suggestion in ML thread about NUMBERS-33). The other packages you mentioned need refactoring (Ray has started that task), and should each form their own component. A first step might be to make them modules within "Commons Math". > Angle class > --- > > Key: NUMBERS-37 > URL: https://issues.apache.org/jira/browse/NUMBERS-37 > Project: Commons Numbers > Issue Type: New Feature >Reporter: Gilles >Assignee: Gilles >Priority: Minor > Labels: api > Fix For: 1.0 > > Attachments: PlaneAngle.java > > > How about adding (to module {{commons-numbers-core}}) a class representing > the "angle" concept (see attached file)? -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Issue Comment Deleted] (NUMBERS-37) Angle class
[ https://issues.apache.org/jira/browse/NUMBERS-37?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Amey Jadiye updated NUMBERS-37: --- Comment: was deleted (was: I like the idea also If you want to modularize the things in commons number I would prefer core should have very core part of numbers which is already mentioned in Commons Math. Now here angle is the part of geometry so the package should be mentioned on top like {code:java} package org.apache.commons.numbers.geometry.core; package org.apache.commons.numbers.calculus.core; package org.apache.commons.numbers.algebra.core; package org.apache.commons.numbers.trigonometry.core; {code} IMO PlaneAngle should be part of geometry.) > Angle class > --- > > Key: NUMBERS-37 > URL: https://issues.apache.org/jira/browse/NUMBERS-37 > Project: Commons Numbers > Issue Type: New Feature >Reporter: Gilles >Assignee: Gilles >Priority: Minor > Labels: api > Fix For: 1.0 > > Attachments: PlaneAngle.java > > > How about adding (to module {{commons-numbers-core}}) a class representing > the "angle" concept (see attached file)? -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (COMPRESS-391) Zip entries alignment
[ https://issues.apache.org/jira/browse/COMPRESS-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006969#comment-16006969 ] Zbynek Vyskovsky commented on COMPRESS-391: --- [~bodewig] : Thank you. Looks like I still missed few magic numbers and the style too, thanks for the update. > Zip entries alignment > - > > Key: COMPRESS-391 > URL: https://issues.apache.org/jira/browse/COMPRESS-391 > Project: Commons Compress > Issue Type: New Feature > Components: Archivers >Affects Versions: 1.13 >Reporter: Zbynek Vyskovsky > Labels: features, github-import, patch > Fix For: 1.14 > > > Similarly to COMPRESS-390, there are requirements of the zip content to be > mapped directly into memory and therefore may require special alignment on > the embedded files. E.g. libraries may be aligned to page (4096-bytes) > boundary, images on 4-bytes boundary etc. By alignment it's meant the offset > from the beginning of file where the actual data stream starts, not the > header. > One of the cases was (still is?) Android APK for which zipalign utility was > created. > It would be useful if commons-compress ZipArchiveOutputStream supports > something similar directly in its API. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (COMPRESS-391) Zip entries alignment
[ https://issues.apache.org/jira/browse/COMPRESS-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006936#comment-16006936 ] ASF GitHub Bot commented on COMPRESS-391: - Github user asfgit closed the pull request at: https://github.com/apache/commons-compress/pull/24 > Zip entries alignment > - > > Key: COMPRESS-391 > URL: https://issues.apache.org/jira/browse/COMPRESS-391 > Project: Commons Compress > Issue Type: New Feature > Components: Archivers >Affects Versions: 1.13 >Reporter: Zbynek Vyskovsky > Labels: features, github-import, patch > Fix For: 1.14 > > > Similarly to COMPRESS-390, there are requirements of the zip content to be > mapped directly into memory and therefore may require special alignment on > the embedded files. E.g. libraries may be aligned to page (4096-bytes) > boundary, images on 4-bytes boundary etc. By alignment it's meant the offset > from the beginning of file where the actual data stream starts, not the > header. > One of the cases was (still is?) Android APK for which zipalign utility was > created. > It would be useful if commons-compress ZipArchiveOutputStream supports > something similar directly in its API. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Resolved] (COMPRESS-391) Zip entries alignment
[ https://issues.apache.org/jira/browse/COMPRESS-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Bodewig resolved COMPRESS-391. - Resolution: Fixed Many thanks again. > Zip entries alignment > - > > Key: COMPRESS-391 > URL: https://issues.apache.org/jira/browse/COMPRESS-391 > Project: Commons Compress > Issue Type: New Feature > Components: Archivers >Affects Versions: 1.13 >Reporter: Zbynek Vyskovsky > Labels: features, github-import, patch > Fix For: 1.14 > > > Similarly to COMPRESS-390, there are requirements of the zip content to be > mapped directly into memory and therefore may require special alignment on > the embedded files. E.g. libraries may be aligned to page (4096-bytes) > boundary, images on 4-bytes boundary etc. By alignment it's meant the offset > from the beginning of file where the actual data stream starts, not the > header. > One of the cases was (still is?) Android APK for which zipalign utility was > created. > It would be useful if commons-compress ZipArchiveOutputStream supports > something similar directly in its API. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (COMPRESS-391) Zip entries alignment
[ https://issues.apache.org/jira/browse/COMPRESS-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006910#comment-16006910 ] Stefan Bodewig commented on COMPRESS-391: - Many thanks [~kvr], I'll merge your PR tonight with few minor (mostly formatting) tweaks added as a separate commit. I didn't expect the pkware folks to e that fast, great. > Zip entries alignment > - > > Key: COMPRESS-391 > URL: https://issues.apache.org/jira/browse/COMPRESS-391 > Project: Commons Compress > Issue Type: New Feature > Components: Archivers >Affects Versions: 1.13 >Reporter: Zbynek Vyskovsky > Labels: features, github-import, patch > Fix For: 1.14 > > > Similarly to COMPRESS-390, there are requirements of the zip content to be > mapped directly into memory and therefore may require special alignment on > the embedded files. E.g. libraries may be aligned to page (4096-bytes) > boundary, images on 4-bytes boundary etc. By alignment it's meant the offset > from the beginning of file where the actual data stream starts, not the > header. > One of the cases was (still is?) Android APK for which zipalign utility was > created. > It would be useful if commons-compress ZipArchiveOutputStream supports > something similar directly in its API. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Comment Edited] (NUMBERS-37) Angle class
[ https://issues.apache.org/jira/browse/NUMBERS-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006855#comment-16006855 ] Amey Jadiye edited comment on NUMBERS-37 at 5/11/17 5:38 PM: - I like the idea also If you want to modularize the things in commons number I would prefer core should have very core part of numbers which is already mentioned in Commons Math. Now here angle is the part of geometry so the package should be mentioned on top like {code:java} package org.apache.commons.numbers.geometry.core; package org.apache.commons.numbers.calculus.core; package org.apache.commons.numbers.algebra.core; package org.apache.commons.numbers.trigonometry.core; {code} IMO PlaneAngle should be part of geometry. was (Author: ameyjadiye): I like the idea also If you want to modularize the things in commons number I would prefer core should have very core part of numbers which is already mentioned in Commons Math now here angle is the part of geometry so the package should be mentioned on top like ``` package org.apache.commons.numbers.geometry.core;``` ``` package org.apache.commons.numbers.calculus.core;``` ``` package org.apache.commons.numbers.algebra.core;``` ``` package org.apache.commons.numbers.trigonometry.core;``` IMO PlaneAngle should be part of geometry. > Angle class > --- > > Key: NUMBERS-37 > URL: https://issues.apache.org/jira/browse/NUMBERS-37 > Project: Commons Numbers > Issue Type: New Feature >Reporter: Gilles >Assignee: Gilles >Priority: Minor > Labels: api > Fix For: 1.0 > > Attachments: PlaneAngle.java > > > How about adding (to module {{commons-numbers-core}}) a class representing > the "angle" concept (see attached file)? -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (NUMBERS-37) Angle class
[ https://issues.apache.org/jira/browse/NUMBERS-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006855#comment-16006855 ] Amey Jadiye commented on NUMBERS-37: I like the idea also If you want to modularize the things in commons number I would prefer core should have very core part of numbers which is already mentioned in Commons Math now here angle is the part of geometry so the package should be mentioned on top like ``` package org.apache.commons.numbers.geometry.core;``` ``` package org.apache.commons.numbers.calculus.core;``` ``` package org.apache.commons.numbers.algebra.core;``` ``` package org.apache.commons.numbers.trigonometry.core;``` IMO PlaneAngle should be part of geometry. > Angle class > --- > > Key: NUMBERS-37 > URL: https://issues.apache.org/jira/browse/NUMBERS-37 > Project: Commons Numbers > Issue Type: New Feature >Reporter: Gilles >Assignee: Gilles >Priority: Minor > Labels: api > Fix For: 1.0 > > Attachments: PlaneAngle.java > > > How about adding (to module {{commons-numbers-core}}) a class representing > the "angle" concept (see attached file)? -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (TEXT-25) Add a duration parser
[ https://issues.apache.org/jira/browse/TEXT-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006816#comment-16006816 ] Amey Jadiye commented on TEXT-25: - [~kinow], i'm braking the task in smaller parts here, lets start with internationalisation, the implementation Jean have is pretty straight forward, assign the Strings to particulate unit and you are done, so example for second unit you give different titles of different language in a row (which can be made configurable) Ex. * Seconds in English * Secondes in French * Segundos in Portuguese * Secondi in Italian and that's it, {code:java} public DurationParser() { super(Unit.UnitsBuilder.baseUnit( "s", "sec", "second","Seconds","Secondes","Segundos","Secondi") .addUnit(60 , "m(?!s)", "min", "minute") .addUnit(60 * 60 , "h", "hr", "hour") .addUnit(60 * 60 * 24 , "d", "dy", "day") .addUnit(60 * 60 * 24 * 7 , "w", "wk", "week") .addUnit(2628000 , "mth", "mo", "mon", "month") .addUnit(31536000 , "y", "yr", "year") .build() ); } {code} I want to know what else you are expecting here ? > Add a duration parser > - > > Key: TEXT-25 > URL: https://issues.apache.org/jira/browse/TEXT-25 > Project: Commons Text > Issue Type: New Feature >Reporter: Bruno P. Kinoshita >Assignee: Bruno P. Kinoshita >Priority: Minor > Fix For: 1.1 > > > Duration parses interpret text such as *2 hours, 1 mn and 22sec*. > Examples exist, such as https://github.com/jchampemont/gunip, written in > Javaby Jean Champémont, inspired by https://github.com/domchristie/juration > (JavaScript). -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (NUMBERS-37) Angle class
[ https://issues.apache.org/jira/browse/NUMBERS-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006726#comment-16006726 ] Rob Tompkins commented on NUMBERS-37: - I think I would have based the private constructor on radians as opposed to turns simply out of the ubiquity of radians, but the idea seems quite reasonable. Also, might we think about including "gons"? > Angle class > --- > > Key: NUMBERS-37 > URL: https://issues.apache.org/jira/browse/NUMBERS-37 > Project: Commons Numbers > Issue Type: New Feature >Reporter: Gilles >Assignee: Gilles >Priority: Minor > Labels: api > Fix For: 1.0 > > Attachments: PlaneAngle.java > > > How about adding (to module {{commons-numbers-core}}) a class representing > the "angle" concept (see attached file)? -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Created] (NUMBERS-37) Angle class
Gilles created NUMBERS-37: - Summary: Angle class Key: NUMBERS-37 URL: https://issues.apache.org/jira/browse/NUMBERS-37 Project: Commons Numbers Issue Type: New Feature Reporter: Gilles Assignee: Gilles Priority: Minor Fix For: 1.0 Attachments: PlaneAngle.java How about adding (to module {{commons-numbers-core}}) a class representing the "angle" concept (see attached file)? -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Resolved] (NUMBERS-33) Move code from "Gamma" class
[ https://issues.apache.org/jira/browse/NUMBERS-33?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gilles resolved NUMBERS-33. --- Resolution: Fixed Merged into "master" branch: commit 402e15109b23560343fa86a436dc7eb6ec8e1d4f > Move code from "Gamma" class > > > Key: NUMBERS-33 > URL: https://issues.apache.org/jira/browse/NUMBERS-33 > Project: Commons Numbers > Issue Type: Task >Reporter: Gilles >Assignee: Gilles >Priority: Minor > Labels: commons-math, move > Fix For: 1.0 > > > I propose to create a new {{commons-numbers-gamma}} module to contain the > implementations of > [Gamma|http://mathworld.wolfram.com/GammaFunction.html]-related functions > currently in "Commons Math" (in package {{o.a.c.math4.special}}). -- This message was sent by Atlassian JIRA (v6.3.15#6346)