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

prawn:Prawn::Graphics#stroke_bounds

#!/usr/bin/env ruby require "prawn" pdf = Prawn::Document.new pdf.rectangle [300,300], 100, 200 pdf.stroke_bounds pdf.render_file(File.basename($0, ".rb") + ".pdf")

Commons Lang、StandardToStringStyle#setContentEnd

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

Manual:Getting Started:First Example

まんま >>> from lepl import * >>> name = Word() > 'name' >>> phone = Integer() > 'phone' >>> matcher = name / ',' / phone > make_dict >>> parser = matcher.string_parser() >>> parser('andrew, 3333253') [{'phone': '3333253', 'name': 'andrew'…