This file contains hidden or 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
//YouDebug compile gradle file | |
// see project https://github.com/kohsuke/youdebug | |
// save location project home | |
apply plugin: 'groovy' | |
[compileGroovy, compileTestGroovy]*.options.collect {options -> options.encoding = 'UTF-8'} | |
//apply plugin: 'java' | |
//[compileJava, compileTestJava]*.options.collect {options -> options.encoding = 'UTF-8'} |
This file contains hidden or 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('net.java.dev.jna:jna:3.2.7') | |
import com.sun.jna.* | |
import com.sun.jna.win32.* | |
interface Kernel32Library extends StdCallLibrary { | |
Kernel32Library INSTANCE = Native.loadLibrary("kernel32", Kernel32Library.class) | |
boolean SetCurrentDirectoryA(String dir) | |
public static class SYSTEMTIME extends Structure { |
This file contains hidden or 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
//refarence article | |
// case1 http://d.hatena.ne.jp/Naotsugu/20101108/1289218176 | |
// case2 http://d.hatena.ne.jp/Naotsugu/20101109/1289304795 | |
// case3 http://d.hatena.ne.jp/Naotsugu/20101110/1289406652 | |
//@GrabResolver (name='mockito-all', root='http://repo2.maven.org/maven2/org/mockito/mockito-all') | |
@Grab('org.mockito:mockito-all:1.8.1') | |
//see http://mockito.googlecode.com/svn/branches/1.6/javadoc/index.html?org/mockito/InOrder.html | |
import static org.mockito.Mockito.* |
This file contains hidden or 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
@GrabResolver (name='org.mbte.groovypp', root='http://groovypp.artifactoryonline.com/groovypp/libs-releases-local/') | |
@Grab('org.mbte.groovypp:groovypp-all:0.4.101') | |
import groovy.lang.Reference; | |
@Typed | |
def f={ | |
Reference result = new Reference(0) | |
//int result = 0 | |
for (int i=0; i<1000000; i++) { | |
//result += i |
This file contains hidden or 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
//see http://www.moriwaki.net/wiki/index.php?[[PDFBox]] | |
//see pdfbox-1.4.0/pdfbox/src/main/java/org/apache/pdfbox/examples | |
@Grab(group='org.apache.pdfbox', module='pdfbox', version='1.3.1') | |
import org.apache.pdfbox.pdfwriter.* | |
import org.apache.pdfbox.pdmodel.* | |
import org.apache.pdfbox.pdmodel.font.* | |
import org.apache.pdfbox.pdmodel.edit.* | |
String writeFile = "d:/xxx.pdf" |
This file contains hidden or 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
//see http://jfarcand.wordpress.com/2010/12/21/going-asynchronous-using-asynchttpclient-the-basic/ | |
//see https://github.com/AsyncHttpClient/async-http-client | |
@GrabResolver (name='Sonatype', root='https://oss.sonatype.org/content/repositories/releases') | |
@GrabResolver (name='jboss', root='http://repository.jboss.org/nexus/content/groups/public-jboss/') | |
@Grab(group = 'com.ning', module='async-http-client', version='*') | |
import com.ning.http.client.* | |
import java.util.concurrent.Future |
This file contains hidden or 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
//refarence Groovy Goodness: Groovlets as Lightweight Servlets | |
// http://mrhaki.blogspot.com/2009/10/groovy-goodness-groovlets-as.html | |
// | |
//@Grab(group='org.apache.tomcat', module='jsp-api', version='6.0.29') | |
//@Grab('javax.servlet:servlet-api:2.4') //not good working | |
@Grab(group='org.mortbay.jetty', module='jetty-embedded', version='6.1.14') | |
import org.mortbay.jetty.Server | |
import org.mortbay.jetty.servlet.* |

This file contains hidden or 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
// | |
// reference http://d.hatena.ne.jp/daisuke-m/20090710/1247181113 | |
// | |
// test using: Groovy Console Java Web Start | |
// http://dl.getdropbox.com/u/653108/groovy/console.jnlp | |
// | |
@Grab(group='org.hamcrest', module='hamcrest-all', version='1.1') | |
@Grab(group='junit', module='junit', version='4.8.2') | |
@Grab(group='xmlunit', module='xmlunit', version='1.3') |
This file contains hidden or 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
// reference http://www.geocities.jp/tomtomf/JScience/JScience.htm | |
// | |
@GrabResolver (name='jcurl-repository', root='http://jcurl.berlios.de/m2/repo/') | |
@Grab(group = 'org.jscience', module='jscience', version='4.3.1') | |
import org.jscience.mathematics.number.Complex | |
import org.jscience.mathematics.vector.ComplexMatrix | |
//計算結果の出力様関数 | |
def show(cm) { |