This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://jira.grails.org/browse/MAVEN-86 | |
- Fixed with commit 6e4e2ad, pull request 15 | |
http://jira.grails.org/browse/MAVEN-118 | |
- Can be closed? grails-webflow no longer exists as a dependency | |
http://jira.grails.org/browse/MAVEN-84 | |
- Not an issue anymore? java.home is an exposed property from maven, and there are no more references to java.version | |
http://jira.grails.org/browse/MAVEN-68 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This class WILL be reloaded | |
enum BigValueType | |
{ | |
enum0, | |
enum1, | |
enum2; | |
HugeEnum[] hugeEnums; | |
BigValueType() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
window.onload = function() { | |
// Must be server-side images; non-origin images will result in a security exception | |
var images = ["img.jpg"]; | |
for (var i=0;i<images.length;i++) { | |
thumbnailify(images[i]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.danveloper.ant.tasks | |
import grails.build.logging.GrailsConsole | |
import org.apache.tools.ant.BuildException | |
import org.apache.tools.ant.DirectoryScanner | |
import org.apache.tools.ant.taskdefs.MatchingTask | |
import org.apache.tools.ant.types.Path | |
import org.apache.tools.ant.types.Reference | |
import org.codehaus.groovy.control.CompilerConfiguration | |
import org.codehaus.groovy.grails.web.pages.GroovyPageCompiler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datasource.url=jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000 | |
datasource.username=sa | |
datasource.pooled=true | |
datasource.driverClassName=org.h2.Driver | |
datasource.username=sa | |
datasource.password= | |
datasource.dbCreate=create-drop | |
datasource.url=jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.ServerSocket | |
def socket = 8281, password = "danrulz" | |
enum Database { | |
INSTANCE; | |
def table = [:] | |
def shortCodeTable = [:] | |
def insert = { String url -> | |
Sequence.INSTANCE.counter++ | |
def id = Sequence.INSTANCE.counter | |
def shortCode = new BigInteger(id).toString(36)+BigInteger.valueOf(Math.round(Math.random()*1000)).toString(36) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.danveloper.providers | |
import com.danveloper.support.ApplicationHolder as AH | |
import org.hibernate.SessionFactory as SF | |
public interface Provider<T> { | |
T get() | |
} | |
class Support { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configurations.all { | |
resolutionStrategy.cacheChangingModulesFor 0, 'seconds' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bar(name) { | |
"bar: $name" | |
} | |
def foo(k, name = bar(k)) { | |
"$name" | |
} | |
assert foo("ha") == "bar: ha" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EnrollmentRulesEngine extends RulesEngineSupport<Student> implements RulesEngine { | |
def dormHallRule = { obj -> | |
if (obj.gpa >= 3.5) { | |
obj.@dormHall = Student.DormHall.Honors | |
} else if (obj.gpa >= 3.0) { | |
obj.@dormHall = Student.DormHall.Preferred | |
} else { | |
obj.@dormHall = Student.DormHall.Normal | |
} | |
} |
OlderNewer