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

libharu:HPDFPage#concat

#!/usr/bin/env ruby require "hpdf" pdf = HPDFDoc.new page = pdf.add_page p page.get_trans_matrix rad = 45 / 180.0 * Math::PI page.concat(Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 100, 100) p page.get_trans_matrix page.mo…

Commons Lang、BooleanUtils.toIntegerObject()

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

字句解析:SwitchTo()

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"> : STATE1 } <STATE1>TOKEN : { <S1A: "a"> { SwitchTo(0); } }</s1a:></state1></a:></space:>…