|
Hey,
are there any improvements where i can improve this code? Maybe there are some groovy language features? This snippet flattens a xml file to: node/node/node
def root = new XmlParser().parse("src/your_xml.xml") root.depthFirst().each { n -> def...
Started by chrsk on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Edit: Ignore me, I'm wrong [see comments] (not the last line though);
I suspect you can write (but I could be wrong, I have no experience with this language)
while(n = n?.parent()){
But honestly; don't go with something that is cool, go with something... .
|
|
While writing a utility script to insert images into a database I wondered if there were a groovier way of doing it. In the end settled for something along the lines of this:
def sql = Sql.newInstance(...) // ... Connection conn = sql.getConnection() ...
Started by Jonathan on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Are you sure you want to do this?
A "Groovier" way could.
And can't be indexed or searched usefully.
|
|
There is DWR which satisfies my needs in Java. I'm interested if there is any Groovier way to do the same thing - with convention over configuration, dynamic method invokation, etc.
Started by Pavel Feldman on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Or if you're going to use Grails, you may have a look at Grails DWR plugin: http://grails.org/DWR+Plugin
And this one is an unofficial update... .
In the mean time, you may try using Groovy objects with DWR .
I don't think there is such framework at the moment .
|
Ask your Facebook Friends
|
I am looking into the groovy-wicket integration and lack of anonymous inner classes seems to be a problem when writing the event handlers. Is there a groovier way of writing this code
import org.apache.wicket.PageParameters import org.apache.wicket.markup...
Started by Dan on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
This doesn't look like a "good" alternative, but it seems to be the "official" Groovy alternative:
Groovy Alternatives to Inner Classes
I may be wrong but isn't this what the WickeBuilder tries to solve:
The Wicket Builder utility implements a... .
Ermh..
|
|
R.I.P. Chuck Brown Man!!! The Celestial Band just got a hellluvalotmore groovier!
Salud to another of our brothers in sound. Originally Posted by Chicken Monkey You've watched too many romantic comedies. In real life, spilling your guts never leads to...
Started by Buckin Fastard on
, 15 posts
by 4 people.
Answer Snippets (Read the full thread at harmony-central):
In real life, spilling your guts never leads to spilling ... .
And now Donna Summer
F J CK Originally Posted by Chicken Monkey You've watched too many romantic comedies .
He will be missed for sure.
I really liked Chuck Brown.
Thats really sad news to hear.
|
|
I've been PM'ing with WoodButcher about his spring pack that he assembled from various leaves
from more than one vehicle. Rather than keep the discussion in the dark,
here's a thread where all can contribute and benefit.
The concept -
Use various leaves...
Started by Lumpy on
, 20 posts
by 6 people.
Answer Snippets (Read the full thread at astrosafari):
I just reused what was left of mine.
As for the spring pads, I don't know.
That's what I did.
In fact, looks like you could probably bend them with a large C-clamp .
Just heat the clamps up with an acetylene torch if you got one, then bend them back .
|
|
Spirits of the Dead (1968) -- a collection of three stories directed by Federico Fellini ( Toby Dammit ), Louis Malle ( William Wilson ) and Roger Vadim ( Metzengerstein ) -- has received a preliminary release date: August 30th.
PRE ORDER
Nathan Rabin...
Started by pro-bassoonist on
, 20 posts
by 12 people.
Answer Snippets (Read the full thread at blu-ray):
Oh man, all over this! who's releasing this? UK release? I'd really... .
Day one purchase, no messing.
Thanks for the info Pro-B, can't wait to see Toby Dammit in 1080p .
|
|
Passed away Sunday evening,very sad news indeed:
http://uk.reuters.com/article/2012/0...84J0CL20120521
Started by swindon61uk on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at webleedblue):
Great memories from the Saturday.
Rest in Peace to him and
Donna Summer
Heaven just got groovier.
|
|
When persisting domain objects using Grails/GORM I frequently find myself wondering why a save() call fails.
This can easily be solved by adding the logic:
if (!o.save()) { o.errors.allErrors.each { println it } }
However, adding this everywhere I do ...
Started by knorv on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Based.
This isn't the cleanest looking, and there is probably a better , groovier way to do this.
|
|
SOUNDSLIKE...Shonky @ Sandaga 813, Dallas (04.21.12)
Shonky - Culprit / Spectral / Apollonia (France)
https://www.facebook.com/pages/SHONKY
http://www.lola-ed.com/artists/shonky
http://www.residentadvisor.net/dj/shonky
Local Support By:
Derrick Chavez...
Started by sounds_like on
, 1 posts
by 1 people.
Answer Snippets (Read the full thread at teknosounds):
|