I need to convert tons of pictures, coming from all kinds of sources, in all kind of file formats. I want to store them all in the PNG file format (even if it means losing e.g. layer data from ESP's).
I'm looking for a library that is preferably open source and has a Java or Groovy API (on top of JNI/JNA, if necessary).
...
I've been using Groovy for all of five hours and just came across the Groovy NullObject. I read the Groovy explanation of the Null Object Pattern, but it doesn't touch on the NullObject class directly; is NullObject merely intended to be a base class for things like NullTree and NullJob? I'm getting a NullObject back in some code that ...
On the Groovy example page there is an example of how to use Groovy HTML builder with mixed content:
p [
"This is some",
b"mixed",
"text. For more see the",
ahref:'http://groovy.codehaus.org' ["Groovy"],
"project"
]
This is however not working for me, I get an error message like:
expecting ']...
If your scripting language of choice doesn't have something like Perl's strict mode, how are you catching typos? Are you unit testing everything? Every constructor, every method? Is this the only way to go about it?
...
Is there a way to store a conversion strategy (for converting some bytes) into a database and then execute it on the run time.
If one were to store a complete java file, you would need to compile it, store the class and some how inject into the already running system. I am not sure how this would be possible.
But using some kind of dyn...
I'm trying to achieve following:
class A {
def foo() { "foo" }
}
class B {
def bar() { "bar" }
}
A.mixin B
def a = new A()
a.foo() + a.bar()
with one significant difference - I would like to do the mixin on the instance:
a.mixin B
but this results in
groovy.lang.MissingMethodException: No signature of method: A.mixin() is ...
hi,
I want to use the mixin feature of groovy to import methods as "class(static) methods" instead of instance methods. When i use mixin even though i have a static method in my mixin class it gets converted into a instance method in the destination class.I want the imported method to be a class(static) method.Is there a good way to do...
Exuberant cTags doesn't support Groovy.
...
I am currently storing Joda DateTime (Datetime+TimeZone) values into a database.
What I want to do grab 24 hours of records based on the timezone of the user, rather than UTC time. I.E. I want to grab the records between 00:00GMT-24:00GMT for people whose timezone is GMT, and 00:00PST-24:00PST for people whose timezone is PST.
Now I do...
I have a form in a .html files where input/select box looks like this
<input type="text" id="txtName" name="txtName" value="##myName##" />
<select id="cbGender" name="cbGender">
<option>Select</option>
<option selected="selected">Male</option>
<option>Female</option>
</select>
I would need to remove '##' value textbox and also up...
I'm using the grails navigation plugin and one of the things i want to do is have the menu item have a dynamic number in it for example
static navigation = [
group:'tabs',
order:7,
title:'Mail',
action:'index',
subItems: [
[action:'pending', order:1, title:"Pending"],
[action:'active', order:1...
If I have a List in a Grails domain class, is there a way to override the addX() and removeX() accessors to it?
In the following example, I'd expect MyObject.addThing(String) to be called twice. In fact, the output is:
Adding thing: thing 2
class MyObject {
static hasMany = [things: String]
List things = []
void addT...
I'm having some problems getting a many-to-many relationship working in grails. Is there anything obviously wrong with the following:
class Person {
static hasMany = [friends: Person]
static mappedBy = [friends: 'friends']
String name
List friends = []
String toString() {
return this.name
}
}
class Bo...
I'm using the XmlParser to insert nodes into an existing XML. Unfortunately this parser ignores the comment nodes which I would like to keep in place. Is there another parser I can use?
Thanks.
...
I want a grails service to be able to access Domain static methods, for queries, etc.
For example, in a controller, I can call
IncomingCall.count()
to get the number of records in table "IncomingCall"
but if I try to do this from inside a service, I get the error:
org.springframework.beans.factory.BeanCreationException: Error creat...
I am starting to write some code for A/B testing in a Grails web application. I want to ensure that requests from the same IP address always see the same variation. Rather than store a map of IP->variant, is it OK to simply turn the IP address into an integer by removing the dots, then use that as the seed for a random number generator...
I am trying to use groovy to do shell scripting on unix, but I am not having any luck having one process retain the environment variables changed by another process. For example,
def p1 = ["bash", "-c", "source /some/setEnv.sh"].execute()
Now, I would like a second process, p2, to inherit the environment variables that was set in...
I'm part of a six-member build and release team for an embedded software company. We also support a lot of developer tools, such as Atlassian's Fisheye, Jira, etc., Perforce, Bugzilla, AnthillPro, and a couple of homebrew tools (like my Django release notes generator).
Most of the time, our team just writes little plugins for larger app...
I used Java for like 6-7 years, then some months ago I discovered Groovy and started to save a lot of typing.. then I wondered how certain things worked under the hood (because groovy performance is really poor) and understood that to give you dynamic typing every Groovy object is a MetaClass object that handles all the things that the J...
Hello,
I plan to begin learning a Java web framework (I love the Java API), I already used Rails and Django.
I want something close to Java, but without all the complexity of J2EE.
I've found 2 framework that could be good for me :
Grails :
Grails looks great, it use Groovy that is better than Java for web application (I think..), but...