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
// g100pon #88 grocessing (groovy+processing.org) | |
// | |
// processing/core.jar が実行時に別途必要です | |
// githubでmaven頑張ってみましたがうまく動きませんでした<涙 | |
//@Grab(group='geronimo', module='geronimo-installer-processing', version='1.1.1') | |
//@GrabResolver(name="processing", root="http://github.com/kimukou/maven-repo/raw/master/g100pon") | |
//@GrabConfig(systemClassLoader=true) // for workaround a permgen problem with GroovyServ | |
//@Grab("com.gmail.buzz.kimukou:processing:1.2.1") |
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
// g100pon #90 JFreeChartでグラフ生成 | |
// | |
//from waman sample copy | |
// | |
@Grab(group='jfree', module='jfreechart', version='1.0.12') | |
import org.jfree.chart.* | |
import org.jfree.chart.plot.* | |
import org.jfree.data.category.* |
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
// g100pon #91 Mongodb | |
// | |
// from netsample | |
// | |
// 事前に /data/mongodb-win32-i386-1.6.3/bin/mongod.exe の実行が必要 | |
// 設置位置のパスは固定(PGバイナリ内指定?) | |
//A)using Mongo.jdbc.driver | |
@Grab(group='org.mongodb', module='mongo-java-driver', version='2.1') |
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(group='commons-lang', module='commons-lang', version='2.5') | |
import org.apache.commons.lang.builder.* | |
class doObjA { | |
doObjA(){} | |
doObjA(key,value){setProperty(key,value) } | |
doObjA(properties_){properties=properties_} | |
Set<String> keySet(){return properties.keySet()} |
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
// g100pon #52 XMLDB(existが一番簡単かな?)の操作 | |
// 検索編 | |
// | |
// 動作させるためには、下記のサーバ設定が必要です | |
// http://github.com/kimukou/g100pon/blob/master/note_xmltest.txt | |
import java.text.* | |
import java.util.* | |
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
// g100pon #71 ConfigSlurper | |
// | |
import groovy.lang.* | |
import org.codehaus.groovy.control.* | |
def parseConfig={mode,name-> | |
ClassLoader parent = this.class.getClassLoader() | |
CompilerConfiguration config = new CompilerConfiguration(sourceEncoding:'UTF-8') //equals -Dgroovy.source.encoding=UTF-8 | |
loader = new GroovyClassLoader(parent,config,false) |
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(group='org.gparallelizer', module='gparallelizer', version='0.8.4') | |
import org.gparallelizer.Asynchronizer | |
output={msg,i,j-> | |
println "${msg}:${i}:${j}" | |
} | |
echo={msg,i->println"$msg:$i" | |
for(int j=0;j<10;j++){ |
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.nio.* | |
import java.nio.charset.* | |
import java.nio.channels.* | |
def decodeStr={fis,encoding -> | |
Charset cs = Charset.forName(encoding) | |
FileChannel ch = fis.getChannel() | |
CharsetDecoder decoder = cs.newDecoder() | |
boolean end = false //ファイルの終わりまで読み込んだかどうか |
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
REGEDIT4 | |
[HKEY_CLASSES_ROOT\RWorkspace] | |
@="R Workspace" | |
[HKEY_CLASSES_ROOT\RWorkspace\DefaultIcon] | |
@="C:\\opt\\R-2.4.1\\bin\\RGui.exe,0" | |
[HKEY_CLASSES_ROOT\RWorkspace\shell] | |
[HKEY_CLASSES_ROOT\RWorkspace\shell\open] | |
[HKEY_CLASSES_ROOT\RWorkspace\shell\open\command] | |
@="\"C:\\opt\\R-2.4.1\\bin\\RGui.exe\" \"%1\"" |
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
// Intercepter sample test | |
// see http://d.hatena.ne.jp/funatti/20100717/1279390870 | |
class Tracer implements Interceptor{ | |
Object beforeInvoke(Object obj, String name, Object[] args){ | |
println "BEFORE: ${obj}.${name}" | |
} | |
boolean doInvoke(){ return true } |
OlderNewer