angelochen | 1 Jan 2012 14:49
Picon

[groovy-user] shiro-groovy documentation

Hi,

where can I find shiro-groovy's documentation? Thanks,

Angelo

--
View this message in context: http://groovy.329449.n5.nabble.com/shiro-groovy-documentation-tp5113144p5113144.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Al Snow | 1 Jan 2012 15:38
Picon
Favicon
Gravatar

RE: [groovy-user] shiro-groovy documentation

http://shiro.apache.org/ 



> Date: Sun, 1 Jan 2012 05:49:23 -0800
> From: angelochen960-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> To: user-i9PBDF1N6cxnkHa44VUL00B+6BGkLq7r@public.gmane.org
> Subject: [groovy-user] shiro-groovy documentation
>
> Hi,
>
> where can I find shiro-groovy's documentation? Thanks,
>
> Angelo
>
> --
> View this message in context: http://groovy.329449.n5.nabble.com/shiro-groovy-documentation-tp5113144p5113144.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
Al Snow | 1 Jan 2012 15:53
Picon
Favicon
Gravatar

RE: [groovy-user] shiro-groovy documentation

Here are two more. 



Hope this help,
Al

From: jasnow-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org
To: user-i9PBDF1N6cxnkHa44VUL00B+6BGkLq7r@public.gmane.org
Date: Sun, 1 Jan 2012 09:38:40 -0500
Subject: RE: [groovy-user] shiro-groovy documentation

.ExternalClass .ecxhmmessage P {padding:0px;} .ExternalClass body.ecxhmmessage {font-size:10pt;font-family:Tahoma;}
http://shiro.apache.org/ 



> Date: Sun, 1 Jan 2012 05:49:23 -0800
> From: angelochen960-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
> To: user-i9PBDF1N6cxnkHa44VUL00B+6BGkLq7r@public.gmane.org
> Subject: [groovy-user] shiro-groovy documentation
>
> Hi,
>
> where can I find shiro-groovy's documentation? Thanks,
>
> Angelo
>
> --
> View this message in context: http://groovy.329449.n5.nabble.com/shiro-groovy-documentation-tp5113144p5113144.html
> Sent from the groovy - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
glenn opdycke-hansen | 1 Jan 2012 16:18
Picon

[groovy-user] open gets message "desktop api not supported"

I am running grails 2.0.0 on xubuntu.  The open command is getting the
following message:

grails> open application.properties
| Error Could not open file application.properties: Desktop API is not
supported on the current platform

Suggestions?

--glenn

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Hugues Moreau | 1 Jan 2012 18:49
Picon

Re: [groovy-user] open gets message "desktop api not supported"

I recall solving a similar issue a few years ago :

Java Desktop API is said to work on "Gnome" (so, no KDE, no Xfce...) ; I found out that I only needed (at the time) to install the "gnome-vfs" package.

Warning 1 : this is old ; maybe gnome-vfs no longer exists on your platform
Warning 2 : if it works, I'm not sure it will use your actual desktop bindings (e.g. "Open *.properties with FoobarEdit"), it will probably use some gnome defaults.

Your mileage may vary, yadda yadda. Hope you get better help :-)

Happy new year to all Groovy users.

On Sun, Jan 1, 2012 at 4:18 PM, glenn opdycke-hansen <glennoph-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I am running grails 2.0.0 on xubuntu.  The open command is getting the
following message:

grails> open application.properties
| Error Could not open file application.properties: Desktop API is not
supported on the current platform

Suggestions?

--glenn

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Wujek Srujek | 2 Jan 2012 11:19

[groovy-user] Class.newInstance() not failing for one (untyped) argument constructors

Hi. I am trying to create an instance of a class that has a default constructor. I also would like that the newInstance method throws an exception when there is no default constructor. This doesn't happen always, see the following code:

class Foo {
    def Foo(a) {
        println '>>> ' + a
    }
}

Foo.class.newInstance()

it prints '>>> null', which is incorrect behavior in this case. If I add a type to the argument, like int or String, it fails correctly, _unless_ the type is List or Map - in which case I get '>>> null' again. I am not sure what causes this, maybe a method from DefaultGroovyMethods? This of course works no matter what the type is for constructors that take more than 1 argument.

The questions are:
1. Is this expected behavior? This seems like a really nasty corner case.
2. How can I invoke the 'real' newInstance method, that fails if there is no default costructor?

wujek
Jochen Theodorou | 2 Jan 2012 12:18
Picon
Gravatar

Re: [groovy-user] Class.newInstance() not failing for one (untyped) argument constructors

Am 02.01.2012 11:19, schrieb Wujek Srujek:
> Hi. I am trying to create an instance of a class that has a default
> constructor. I also would like that the newInstance method throws an
> exception when there is no default constructor. This doesn't happen
> always, see the following code:
>
> class Foo {
>      def Foo(a) {
>          println '>>> ' + a
>      }
> }
>
> Foo.class.newInstance()
>
> it prints '>>> null', which is incorrect behavior in this case. If I add
> a type to the argument, like int or String, it fails correctly, _unless_
> the type is List or Map - in which case I get '>>> null' again.

that it fails for String is strange... that should not be the case actually

> I am not
> sure what causes this, maybe a method from DefaultGroovyMethods? This of
> course works no matter what the type is for constructors that take more
> than 1 argument.
>
> The questions are:
> 1. Is this expected behavior? This seems like a really nasty corner case.
> 2. How can I invoke the 'real' newInstance method, that fails if there
> is no default costructor?

there is a newInstance method in DGM overriding the reflection method, 
yes. This is to mirror the method call behaviour - which also uses null 
for single argument methods without a given argument. Though I have this 
one on my list of things to remove in the new MOP, because I think it is 
a quite nasty and confusing ability.

If you want to use the "real" reflection method, you will have to call a 
Java method that does it for you I'm afraid - in the worst case it means 
you have to write a small helper in java.

bye blackdrag

--

-- 
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Wujek Srujek | 2 Jan 2012 12:44

Re: [groovy-user] Class.newInstance() not failing for one (untyped) argument constructors

Hi. Yes, you are right, it doesn't fail for Strings ;d Could you explain why? What are the other types it doesn't fail for?


wujek

On Mon, Jan 2, 2012 at 12:18 PM, Jochen Theodorou <blackdrag-BA+cFGlbTmA@public.gmane.org> wrote:
Am 02.01.2012 11:19, schrieb Wujek Srujek:

Hi. I am trying to create an instance of a class that has a default
constructor. I also would like that the newInstance method throws an
exception when there is no default constructor. This doesn't happen
always, see the following code:

class Foo {
    def Foo(a) {
        println '>>> ' + a
    }
}

Foo.class.newInstance()

it prints '>>> null', which is incorrect behavior in this case. If I add
a type to the argument, like int or String, it fails correctly, _unless_
the type is List or Map - in which case I get '>>> null' again.

that it fails for String is strange... that should not be the case actually



I am not
sure what causes this, maybe a method from DefaultGroovyMethods? This of
course works no matter what the type is for constructors that take more
than 1 argument.

The questions are:
1. Is this expected behavior? This seems like a really nasty corner case.
2. How can I invoke the 'real' newInstance method, that fails if there
is no default costructor?

there is a newInstance method in DGM overriding the reflection method, yes. This is to mirror the method call behaviour - which also uses null for single argument methods without a given argument. Though I have this one on my list of things to remove in the new MOP, because I think it is a quite nasty and confusing ability.

If you want to use the "real" reflection method, you will have to call a Java method that does it for you I'm afraid - in the worst case it means you have to write a small helper in java.

bye blackdrag

--
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email



Jochen Theodorou | 2 Jan 2012 13:29
Picon
Gravatar

Re: [groovy-user] Class.newInstance() not failing for one (untyped) argument constructors

Am 02.01.2012 12:44, schrieb Wujek Srujek:
> Hi. Yes, you are right, it doesn't fail for Strings ;d Could you explain
> why? What are the other types it doesn't fail for?

it should fail only for primitives since we don't convert null to for 
example int 0 if an int is required. And that failing is then expected

bye blackdrag

--

-- 
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

wayner | 3 Jan 2012 02:45
Picon

[groovy-user] Newbie needs help with parsing log files

In Groovy I need to read in a file that looks like the file posted below. 
What I need to do is to parse some of the lower lines and assign variable
values to the integer that is found.   The file is not always the same -
occasionally it has other values at the top.  From what I have read this
should be trivially easy in Groovy using something like eachLine but I can't
figure it out.

Here is what I need help with - near the bottom of the file there are lines
that show:
Average volume:                  9
Average brightness:              0

How would I parse this and use Groovy to assign the value of 9 (or whatever
is found on this line) to an Integer variable called AvgVolume and a value
of 0 to a variable called AvgBright?

Thanks for helping!

File starts here:-----------------------------------------------------
Time at start of run:
Mon Jan 02 16:57:03 2012
################################################################

Detection Methods to be used:
	1) Black Frame
	2) Logo - Give up after 2000 seconds
	3) Resolution Change
	4) Aspect Ratio

ComSkip throttles back from -0001 to -0001.
The time is now 1657 so it's full speed ahead!
Video PTS jumped 3 frames at frame 2, repairing timeline
Audio PTS jumped 1 frames at frame 79, repairing timeline

Not enough or too much logo's found (0.00), disabling the use of Logo
detection
Distribution of Black Frame   cutting:   1 positive and   0 negative, ratio
is 9.9900
Confidence of Black Frame   cutting:   0 out of   0 are strict, too low
Distribution of Scene Change  cutting:   0 positive and   0 negative, ratio
is 9.9900
Confidence of Scene Change  cutting:   0 out of   0 are strict, too low
Distribution of Uniform Frame cutting:   0 positive and   0 negative, ratio
is 9.9900
Confidence of Uniform Frame cutting:   0 out of   0 are strict, too low
Threshold used - 1.0500	After rounding - 1.0500
No change

Logo fraction:              0.0000      Logo disabled
Maximum volume found:           21
Average volume:                  9
Sound threshold:               500
Silence threshold:             100
Minimum volume found:            0
Average frames with silence:     0
Black threshold:                25
Minimum brightness found:        8
Minimum bright pixels found:     0
Minimum dim level found:         0
Average brightness:              0
Uniformity level:              500
Average non uniformity:          0
Maximum gap between logo's:     -1
Suggested logo_threshold:   0.7750
Suggested shrink_logo:	         0
Max commercial size found:      -1
Dominant aspect ratio:      0.0000
Score threshold:            1.0500
Framerate:                  29.97
Total commercial length:    0:00:00.00
Block list after weighing
----------------------------------------------------
  #     sbf  bs  be     fs     fe    sc      len   scr cmb   ar                  
cut bri  logo   vol  sil corr stdev        cc
  0:-  19438   0 19438      1  38878   0.00 1297.196  0.17   0 0.00          
E         b     00 0.00    90  00  0.000     0          

38878 Frames Processed
################################################################
Time at end of run:
Mon Jan 02 16:58:40 2012
################################################################

--
View this message in context: http://groovy.329449.n5.nabble.com/Newbie-needs-help-with-parsing-log-files-tp5115837p5115837.html
Sent from the groovy - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane