2008-03-25から1日間の記事一覧

PDF::Writer:PDF::SimpleTable#title, #title=

require 'pdf/simpletable' pdf = PDF::Writer.new PDF::SimpleTable.new do |tab| tab.column_order = %w(col1 col2 col3) p tab.title tab.title = "TITLE" p tab.title tab.show_lines = :all tab.show_headings = true data = [ { "col1" => "foo", "col…

Java FAQ:Integer#parseInt で NumberFormatException が発生

Java FAQ:S007 Q-10 public class C2008032500 { public static void main(String[] args) { int i = Integer.parseInt("1.2"); System.out.println(i); } } で、 Exception in thread "main" java.lang.NumberFormatException: 1.2 at java.lang.Integer.p…

lex を試す。状態をどう持つか?

グローバル変数。複数の lexer に対応できない t.lexer.var のような lex 以外の prefix を持つ lexer のアトリビュート(var がアトリビュート名)。嫌われる場合あり。なんで? lexer クラスを作り、そのインスタンス変数