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
| import java.awt.print.*;PrinterJob.printerJob.with{printable={g,p,i->g.drawString "Hello World!",50,50;i}as Printable;printDialog()&&it.print()} |
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
| // cf. http://www.ne.jp/asahi/hishidama/home/tech/java/swing/DropTarget.html | |
| import groovy.swing.SwingBuilder | |
| import javax.swing.JFrame | |
| import java.awt.dnd.DropTarget | |
| import java.awt.dnd.DnDConstants | |
| import java.awt.datatransfer.DataFlavor | |
| import java.awt.datatransfer.Transferable | |
| def swing = new SwingBuilder() |
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
| /** | |
| * node.js demo chat server (app.js) | |
| **/ | |
| var http = require('http'); | |
| var io = require('socket.io'); | |
| var port = 13902; | |
| var server = http.createServer(function(req, res){ |
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
| 例えば次のような構成に対して実行すると、R.csv、A/A.csv、A/B/B.csvができます。 | |
| サンプルでは特別な変換処理はしていないので、R.dat、A.dat、B.datは空でも構いません。 | |
| A/A.datの内容を変更した場合に、A/A.csvを変更する処理だけが走ることを確認します。 | |
| | build.gradle | |
| | Rakefile | |
| | R.dat | |
| | | |
| \---A | |
| | A.dat |
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
| configurations{ | |
| findbugsConf | |
| } | |
| def convention = new FindBugsPluginConvention(project) | |
| project.convention.plugins.findbugs = convention | |
| class FindBugsPluginConvention{ | |
| def reportPath; |
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
| import grails.plugin.geb.GebSpec | |
| import geb.Page | |
| import spock.lang.Shared | |
| class PersonEditSpec extends GebSpec { | |
| @Shared fixtureLoader | |
| def 'きれいなURLで編集画面を開く'() { | |
| given: |
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.sf.groovydice:groovydice:1.4.1') | |
| import net.sf.groovydice.* | |
| class TinTiroRinPlugin { | |
| def dynamicMethods = { api -> | |
| api.add(method:'ttr') { dice -> | |
| if (dice.allDice.size() != 3) return "ションベン!" | |
| def stats = [all:dice.allDice, count:dice.allDice.countBy{it}] | |
| switch (stats) { | |
| case { it.count.size() == 1 && it.count[1] }: |
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
| class Hoge { | |
| static String hoge(String delegate) { | |
| return "HOGE: $delegate" | |
| } | |
| static String foo(String delegate, String param) { | |
| return "FOO: $delegate ($param)" | |
| } | |
| static String bar(Class<String> string) { | |
| return "BAR" | |
| } |
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
| #!/usr/bin/env node | |
| //http://vimeo.com/22429969 | |
| var fs = require('fs'); | |
| var spawn = require('child_process').spawn; | |
| var cap = "/path/to/cap.jpg"; | |
| var glt = "/path/to/cap_glitch.jpg"; |
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
| <?php | |
| /* | |
| / >、 | |
| 厶/vvゝ | |
| || ・_・リ | |
| 川゚O O゚ | |
| `` | |
| */ | |
| /* | |
| - 定数定義 - |