2009-08-08から1日間の記事一覧

prawn:Prawn::Document::Annotations#annotate

#!/usr/bin/env ruby require "prawn" pdf = Prawn::Document.new pdf.annotate(:Subtype => :Text, :Rect => [0, 0, 50, 50], :Contents => "foo") pdf.annotate(:Subtype => :Link, :Rect => [0, 100, 100, 150]) pdf.render_file(File.basename($0, ".rb"…

Commons Lang、StandardToStringStyle#setSizeStartText

import org.apache.commons.lang.builder.StandardToStringStyle; public class C2009080800 { public static void main(String[] args) { StandardToStringStyle x = new StandardToStringStyle(); System.out.println(x.getSizeStartText()); x.setSizeSta…

Manual:Matchers:Repeat ([...])

まんま >>> from lepl import * >>> Repeat(Any(), 3, 3).parse_string('12345') ['1', '2', '3'] >>> Any()[3:3].parse_string('12345') ['1', '2', '3'] >>> Any()[3].parse_string('12345') ['1', '2', '3'] >>> Repeat(Any(), 3).parse_string('12345') …