2008-03-31から1日間の記事一覧
require 'pdf/simpletable' pdf = PDF::Writer.new PDF::SimpleTable.new do |tab| tab.column_order = %w(col1 col2 col3) p tab.heading_color tab.show_lines = :all tab.heading_color = Color::RGB::Blue p tab.heading_color data = [ { "col1" => "fo…
Java FAQ、『Java の質問箱』 とはちょっと離れて。 そういえば、C 言語っぽい文字種類の判定関数の話は、どこの項目に書いてある? public class C2008033100 { public static void main(String[] args) { char c; c = 'a'; System.out.println(Character.i…
begin でなく、push_state, pop_state を使うこともできる。 #!/usr/bin/env python import ply.lex as lex states = ( ('foo', 'exclusive'), ) tokens = ( 'A', 'PLUS', ) t_A = r'a' t_ANY_PLUS = r'\+' t_ANY_ignore = ' \t\n' t_foo_A = r'b' def t_beg…