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
//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 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) { |
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
RVM home page: http://rvm.beginrescueend.com | |
Install RVM | |
------------ | |
See http://rvm.beginrescueend.com/rvm/install/ | |
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
Install rvm for all users |
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
// Original version of this file was part of InterClient 2.01 examples | |
// | |
// Copyright InterBase Software Corporation, 1998. | |
// Written by com.inprise.interbase.interclient.r&d.PaulOstler :-) | |
// | |
// Code was modified by Roman Rokytskyy to show that Firebird JCA-JDBC driver | |
// does not introduce additional complexity in normal driver usage scenario. | |
// | |
// A small application to demonstrate basic, but not necessarily simple, JDBC features. | |
// |
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 akihiro4chawon | |
class Main { | |
@Memoize | |
def fib(a) { | |
//a <= 1 ? a : fib(a - 2) + fib(a - 1) | |
if (a <= 1) return a | |
else return fib(a - 2) + fib(a - 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
import org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
import org.jsoup.select.Elements; | |
println "WebScraping with Groovy \n" | |
def url = "http://rates.goldenchennai.com/"; | |
def url2 = "http://scores.sify.com/index.shtml" | |
def document = Jsoup.connect(url).get(); | |
def cricDocument = Jsoup.connect(url2).get() | |
def goldDetails = document.select(".yellowTxt") |
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
apply plugin:'groovy' | |
project.ext.set('javafxHome', System.env['JAVAFX_HOME'] | |
repositories { mavenCentral() } | |
dependencies { | |
groovy 'org.codehaus.groovy:groovy-all:1.8.6' | |
compile 'org.codehaus.groovyfx:groovyfx:0.4.0' | |
compile files("${javafxHome}/rt/lib/jfxrt.jar") |
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://groovy.codehaus.org/Using+MockFor+and+StubFor | |
import groovy.mock.interceptor.* | |
/*sample data class*/ | |
class Movie { | |
// Lots of expensive method calls, etc. | |
} | |
/*helper class*/ |
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
#!/usr/bin/env python | |
# | |
# Copyright (c) 2012 Kyle Gorman | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1" /> | |
<script src="tetris.js"></script> | |
<script src="tetris-svg.js"></script> | |
</head> | |
<body> | |
<div><svg id="stage"></svg></div> |
OlderNewer