I hit a situation where I needed to be able to change the body class for a Grails view, but found that simply setting it in the body does not work.
A new version of groovy-common-extensions is out with a new method
Another blog post that’s more for me in the future so I don’t forget ;-)
Thought it might be of use to someone else as well, so posted it here for posterity.
So I recently had issues with rendering anti-aliased text over translucent backgrounds inside a Java app. Here’s a quick Groovy script that shows the problem:
One thing I only recently learned about Groovy is that by implementing the
getAt method, you can destructure your Object via multiple assignment.
As an example, consider a class
Vector2D which represents a two-dimensional vector:
Last night, I saw a post on my twitter feed titled “Why Functional Programming in Java is Dangerous” where the author tries to implement the clojure code
in a functional style in Java, then concludes that “Functional idioms in Java are performance bugs waiting to bite you” after trying to load all of the Integers Java can handle into an ArrayList.