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

prawn:Prawn::Document::Annotations#link_annotation

#!/usr/bin/env ruby require "prawn" pdf = Prawn::Document.new pdf.link_annotation([0, 100, 100, 150]) pdf.render_file(File.basename($0, ".rb") + ".pdf") 「:A」や「:PA」というオプションの付け方が良く分からない…

Commons Lang、StandardToStringStyle#setSummaryObjectEndText

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

Manual:Matchers:Lookahead

まんま >>> from lepl import * >>> next(Lookahead(Literal('hello')).match('hello world')) ([], 'hello world') >>> Lookahead(Literal('hello')).parse('hello world') [] >>> Lookahead('hello').parse_string('goodbye cruel world') >>> (~Lookahead…