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

libharu:HPDFPage#arc

#!/usr/bin/env ruby require "hpdf" pdf = HPDFDoc.new page = pdf.add_page page.arc(100, 100, 90, 0, 270) page.fill page.arc(300, 100, 90, 90, 360) page.stroke page.arc(200, 500, 10, 90, 360) page.stroke pdf.save_to_file(File.basename($0, ".…

Commons Lang、BooleanUtils.negate()

import org.apache.commons.lang.BooleanUtils; public class C2009032200 { public static void main(String[] args) { System.out.println(BooleanUtils.negate(true)); System.out.println(BooleanUtils.negate(false)); System.out.println(BooleanUtils…

字句解析:TOKEN_MGR_DECLS

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) TOKEN_MGR_DECLS : { static int x = 1; } SKIP : { <SPACE: " " | "\t" | "\n" | "\r"> } TOKEN : { <A: "a"> { </a:></space:>…