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

prawn:Prawn::Document#bounding_box

まんま #!/usr/bin/env ruby require "prawn" pdf = Prawn::Document.new pdf.bounding_box([100,500], :width => 100, :height => 300) do pdf.text "This text will flow in a very narrow box starting" + "from [100,500]. The pointer will then be mov…

Commons Lang、ToStringBuilder

import org.apache.commons.lang.builder.ToStringBuilder; public class C2009062200 { String name; int x; public String toString() { return new ToStringBuilder(this). append("name", name). append("x", x). toString(); } public static void main…

bison マニュアルの逆ポーランド記法電卓

JFlex を使って %% %class Scanner %implements Test.yyInput %type int %eofval{ return YYEOF; %eofval} %{ private int token; protected Double value; public boolean advance() throws java.io.IOException { token = yylex(); return token != YYEOF;…