2009-06-29から1日間の記事一覧

prawn:Prawn::Document#font_size

まんま #!/usr/bin/env ruby require "prawn" Prawn::Document.generate(File.basename($0, ".rb") + ".pdf") do font_size 16 text "At size 16" font_size(10) do text "At size 10" text "At size 6", :size => 6 text "At size 10" end text "At size 16"…

Commons Lang、ToStringBuilder.getDefaultStyle

import org.apache.commons.lang.builder.ToStringBuilder; public class C2009062900 { public static void main(String[] args) { System.out.println(ToStringBuilder.getDefaultStyle()); } } で、 org.apache.commons.lang.builder.ToStringStyle$Defau…

bison マニュアルの多機能電卓 練習問題2

自前 Scanner で %{ import java.io.*; import java.util.*; class Obj { public String name; public int type; public double val; Obj(String s, int t, double v) { name = s; type = t; val = v; } } public class Test { %} %token NUM %type <Double> exp NUM</double>…