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
@echo off | |
set WM="%WINMERGE_HOME%\winmergeu.exe" | |
rem echo parameters 0 %0 1 %1 2 %2 3 %3 4 %4 5 %5 6 %6 7 %7 8 %8 9 %9 | |
set LEFT=%6 | |
set RIGHT=%7 | |
set LEFT_TITLE=%3 | |
set RIGHT_TITLE=%5 | |
start %WM% /B %WM% /e /s /u /dl %LEFT_TITLE% /dr %RIGHT_TITLE% %left% %right% |
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
// copy this file (frege-init.gradle) to an empty directory. | |
// Setup the project by typing 'gradle -b frege-init.gradle fregeInit'. | |
// You can now run 'gradlew build run' to compile, test and run your application. | |
apply plugin : 'groovy' | |
repositories { | |
mavenCentral() | |
} |
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
@echo off | |
set WRITE=%1 | |
set READ=%2 | |
:main | |
call :myset %WRITE% %%READ%% | |
goto :end | |
:myset | |
for /F "usebackq tokens=*" %%i in (`echo %%%2%%`) do set %1=%%i&& set PATH=%%i\bin;%PATH% | |
goto :eof | |
:end |
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
// bug with Groovy 2.3.0-rc-4, should type check, but does not | |
// http://jira.codehaus.org/browse/GROOVY-6748 | |
import groovy.transform.TypeChecked | |
//import org.junit.Test | |
@TypeChecked | |
class Class1 { | |
static <A, B> void method1(A a, B b) { |
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
// defect in Groovy 2.3.0-rc-1, code does not compile when it should | |
// run with: groovy staticMethodTypeChecking.groovy | |
// http://jira.codehaus.org/browse/GROOVY-6723 | |
/* | |
Output is (note that line numbers will not match): | |
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: |
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
@Grab("org.functionaljava:functionaljava:3.1") | |
import fj.F | |
import fj.data.Stream | |
import groovy.transform.Memoized | |
@Memoized | |
Stream<Integer> primes() { | |
Stream.cons(2, { -> | |
Stream.range(3).filter { Integer 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
/** | |
* This scripts runs successfully with Groovy 2.2.2, but not with Groovy 2.3.0-beta-2 | |
*/ | |
@Grab('junit:junit:4.11') | |
import groovy.transform.TypeChecked | |
import org.junit.Test | |
import static org.junit.Assert.assertTrue |
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
// from https://github.com/mperry/functionalgroovy/blob/master/test-extensions/src/test/groovy/com/github/mperry/fg/SetMonadExtensionTest.groovy | |
//@GrabResolver('https://oss.sonatype.org/content/groups/public') | |
@GrabResolver('https://oss.sonatype.org/content/repositories/snapshots/') | |
@Grab('com.github.mperry:functionalgroovy-main:0.5-SNAPSHOT') | |
import fj.F | |
import fj.F2 | |
import fj.function.Integers | |
import groovy.transform.TypeChecked |
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
// from https://github.com/mperry/functionalgroovy/blob/master/test-extensions/src/test/groovy/com/github/mperry/fg/OptionMonadExtensionTest.groovy | |
//@GrabResolver('https://oss.sonatype.org/content/groups/public') | |
@GrabResolver('https://oss.sonatype.org/content/repositories/snapshots/') | |
@Grab('com.github.mperry:functionalgroovy-main:0.5-SNAPSHOT') | |
import fj.F | |
import fj.F2 | |
import fj.function.Integers |
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
// taken from https://github.com/mperry/functionalgroovy/blob/master/test-extensions/src/test/groovy/com/github/mperry/fg/ListMonadExtensionTest.groovy | |
//@GrabResolver('https://oss.sonatype.org/content/groups/public') | |
@GrabResolver('https://oss.sonatype.org/content/repositories/snapshots/') | |
@Grab('com.github.mperry:functionalgroovy-main:0.5-SNAPSHOT') | |
import fj.F | |
import fj.F2 | |
import groovy.transform.TypeChecked | |
import groovy.transform.TypeCheckingMode | |
import org.junit.Test |
NewerOlder