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

libharu:HPDFPage#close_path_fill_stroke

#!/usr/bin/env ruby require "hpdf" pdf = HPDFDoc.new page = pdf.add_page page.move_to(100, 100) page.line_to(150, 100) page.line_to(150, 50) page.close_path_fill_stroke pdf.save_to_file(File.basename($0, ".rb") + ".pdf")

Commons Lang、BooleanUtils.toInteger()

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

字句解析:input_stream

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"> { System.out.print(input_stream); } } void</a:></space:>…