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

PDF::Writer:PDF::SimpleTable#shade_color2, #shade_color2=

require 'pdf/simpletable' pdf = PDF::Writer.new PDF::SimpleTable.new do |tab| tab.column_order = %w(col1 col2 col3) p tab.shade_color2 tab.shade_color2 = Color::RGB::Blue tab.shade_rows = :striped tab.show_lines = :all data = [ { "col1" =>…

Java FAQ:new String("abc") という書き方

Java FAQ:S008 Q-07 public class C2008040600 { public static void main(String[] args) { String s1 = new String("abc"); String s2 = "abc"; } } をコンパイルした後、javap -c を実行 Compiled from C2008040600.java public class C2008040600 exten…

単純なものを試す。選択

#!/usr/bin/env python import ply.lex as lex tokens = ( 'A', 'B', 'C', 'D', 'E', 'F', ) t_A = r'a' t_B = r'b' t_C = r'c' t_D = r'd' t_E = r'e' t_F = r'f' t_ignore = " \t" def t_error(t): print "Illegal character '%s'" % t.value[0] t.lexer.s…