2008-05-22から1日間の記事一覧

PDF::Writer:PDF::QuickRef

require 'pdf/quickref' PDF::QuickRef.make do title "My QuickRef" h1 "H1 Text" lines "Text to put after the header." save_as("2008052200.pdf") end

Java FAQ:cast

Java FAQ:S014-Q02 public class C2008052200 { public static void main(String[] args) { double dx = 1.2; int ix; ix = (int)dx; System.out.println(ix); } } をコンパイルした後、javap -c を実行 Compiled from C2008052200.java public class C2008…

簡単な例。any

#!/usr/bin/env ruby require 'tdp' include TDParser parser = TDParser.define {|g| g.input = any() - token("b") - token("c") >> proc {|x| [x[0], x[1], x[2]] } def parse(str) tokens = str.split(/\s+/) input.parse(tokens) end } p parser.parse(…