2009-04-25から1日間の記事一覧

libharu:HPDFPage#set_rgb_fill

#!/usr/bin/env ruby require "hpdf" pdf = HPDFDoc.new page = pdf.add_page #page.set_cmyk_fill(1, 0, 0, 0) page.set_rgb_fill(1, 0, 0) page.move_to(100, 100) page.line_to(150, 100) page.line_to(150, 50) page.fill pdf.save_to_file(File.basenam…

Commons Lang、BitField#getRawValue(), #getValue()

import org.apache.commons.lang.BitField; public class C2009042500 { public static void main(String[] args) { BitField bf; bf = new BitField(5); System.out.println(bf.getRawValue(15) + " " + bf.getValue(15)); bf = new BitField(4); System.ou…

bison マニュアルの中間記法電卓

整数のみ module Main where import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Token( TokenParser, makeTokenParser ) import qualified Text.ParserCombinators.Parsec.Token as P import Text.ParserCombinators.Parsec.Langu…