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

libharu:HPDFPage#circle

#!/usr/bin/env ruby require "hpdf" pdf = HPDFDoc.new page = pdf.add_page page.circle(100, 100, 100) page.fill page.circle(300, 100, 50) page.stroke page.circle(200, 500, 10) page.stroke pdf.save_to_file(File.basename($0, ".rb") + ".pdf")

Commons Lang、BooleanUtils.toBoolean()

import org.apache.commons.lang.BooleanUtils; public class C2009032300 { public static void main(String[] args) { System.out.println(BooleanUtils.toBoolean(true)); System.out.println(BooleanUtils.toBoolean((Boolean)null)); System.out.printl…

字句解析:MORE と image の置き換え

PARSER_BEGIN(Test) public class Test { public static void main(String args[]) throws ParseException { Test parser = new Test(System.in); parser.Input(); } } PARSER_END(Test) SKIP : { <SPACE: " " | "\t" | "\n" | "\r"> } TOKEN : { <A: "a"> } MORE : { <B: "b"> { System.out.println("+"); ima</b:></a:></space:>…