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
#!/bin/sh | |
TARGET_DIR=. | |
for pdffile in $TARGET_DIR/*.pdf | |
do | |
echo "[$pdffile]" | |
pdfname=`basename $pdffile .pdf` | |
pdftoppm -png ${pdfname}.pdf $pdfname | |
for pngname in ${pdfname}-*.png | |
do |
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
#!/bin/sh | |
for pdffile in $* | |
do | |
echo "[$pdffile]" | |
pdfname=`basename $pdffile .pdf` | |
pdftoppm -png ${pdfname}.pdf $pdfname | |
for pngname in ${pdfname}-*.png | |
do | |
basename=`basename ${pngname} .png` |
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
println "Hello World!" |
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.awt.* | |
import javax.swing.* | |
import static java.lang.Math.* | |
/** 抽象クラスの概念を教えるとき用のサンプル. | |
Personクラスのmoveメソッドを繰り返し呼び出すことで, | |
画面に表示されるキャラクターが動くようになっているが, | |
Personクラスにはmoveメソッドの中身(キャラクターの | |
動き方)は定義されておらず,各サブクラスで定義されている.*/ |
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 processing.core.* | |
/** 「コードで自己紹介」用に作ったプログラム. | |
Processingに付属する core.jar が必要 */ | |
class MyApplet extends PApplet { | |
def data = [ | |
"\n自己紹介", | |
"名前:○○××\nかくかくしかじか", | |
"仕事:○○××\nかくかくしかじか", |
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 processing.core.* | |
/** GroovyでProcessing風にプログラムを書くサンプル. | |
Processingに付属する core.jar が必要. */ | |
class MyApplet extends PApplet { | |
def t = 0 | |
void setup() { | |
size(240, 240) | |
} | |
void draw() { |
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 javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.*; | |
/** 手抜きお絵描きプログラム. | |
こちらも全くGroovyっぽくありませんが・・・. | |
(C言語経験者向けのサンプルとして作ったので.) */ | |
class PaintFrame extends JFrame { | |
int[] xx = new int[1000000]; | |
int[] yy = new int[1000000]; |
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 javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.*; | |
/** ありがちなボールを跳ね返すゲーム風のプログラムです. | |
全くGroovyっぽくないのは,ご愛嬌ということで. */ | |
class BallGameFrame extends JFrame implements Runnable { | |
double ball_x = 10, ball_y = 10; | |
double ball_v_x = 100.0, ball_v_y = 0.0; | |
double ball_g = 9.8, dt = 0.05; |
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
println "Hello World!" |
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
println "Hello World!" |