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

libharu:HPDFPage#set_rgb_stroke

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

Commons Lang、BitField#getShortRawValue(), #getShortValue()

import org.apache.commons.lang.BitField; public class C2009042600 { public static void main(String[] args) { BitField bf; bf = new BitField(5); System.out.println(bf.getShortRawValue((short)15) + " " + bf.getShortValue((short)15)); bf = ne…

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.Languag…