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

PDF::Writer:PDF::SimpleTable#orientation, #orientation=

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

Java FAQ:サブクラスでは必ずコンストラクタを記述しないとダメ

Java FAQ:S010 Q-02なんでそういう仕様なんだっけ?C++ も同じかな? class C2008041301 { C2008041301() { System.out.println("C2008041301"); } } class C2008041302 extends C2008041301 { C2008041302() { System.out.println("C2008041302"); } } pub…

エラーまわり

#!/usr/bin/env python import ply.lex as lex tokens = ( 'A', 'B', ) t_A = r'A' t_B = r'B' t_ignore = " \t" def t_error(t): print "Illegal character '%s'" % t.value[0] t.lexer.skip(1) lex.lex() import ply.yacc as yacc def p_input(p): 'input …