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

prawn:Prawn::Graphics::Color#stroke_color

まんま。マニュアルでは例が「fill_color」のままになっているけど〜 #!/usr/bin/env ruby require "prawn" pdf = Prawn::Document.new pdf.circle_at [100,100], :radius => 25 pdf.stroke_color "f0ffc1" #pdf.stroke_color 0, 99, 95, 0 pdf.stroke pdf.r…

Commons Lang、StandardToStringStyle#setNullText

import org.apache.commons.lang.builder.StandardToStringStyle; public class C2009080600 { public static void main(String[] args) { StandardToStringStyle x = new StandardToStringStyle(); System.out.println(x.getNullText()); x.setNullText("**…

Manual:Matchers:And (&)

まんま >>> from lepl import * >>> And(Any('h'), Any()).parse_string('hello world') ['h', 'e'] >>> And(Any('h'), Any('x')).parse_string('hello world') >>> (Any('h') & Any('e')).parse_string('hello world') ['h', 'e'] >>> (Any('h') & Any()).p…