2008-04-21から1日間の記事一覧

PDF::Writer:PDF::SimpleTable#render_on

require 'pdf/simpletable' pdf = PDF::Writer.new PDF::SimpleTable.new do |tab| tab.column_order = %w(col1 col2 col3) tab.show_lines = :all data = [ { "col1" => "foo", "col2" => "bar", "col3" => "baz" }, ] tab.data.replace data #tab.render_o…

Java FAQ:メソッドをオーバライドするときthrows節の例外を増やせない?

Java FAQ:S011 Q-08throws 節自体、挙動が良く分かっていない… class C2008042101 { void foo(int x) { System.out.println("C2008042101: " + x); } } class C2008042102 extends C2008042101 { C2008042102() { foo(1); } void foo(int x) throws Arithme…

debugging mode をオフ

「yacc.yacc(debug=0)」 parser.out が出力されなくなる #!/usr/bin/env python import ply.lex as lex tokens = ( 'A', 'B', 'C', ) t_A = r'A' t_B = r'B' t_C = r'C' t_ignore = " \t" def t_error(t): print "Illegal character '%s'" % t.value[0] t.le…