2008-12-30から1日間の記事一覧

ActiveSupport、Date#to_formatted_s, #to_s

>> require "rubygems" => true >> require "active_support" => true >> Date.new(2008,12,31).to_formatted_s => "2008-12-31" >> Date.new(2008,12,31).to_formatted_s(:db) => "2008-12-31" >> Date.new(2008,12,31).to_formatted_s(:short) => "31 Dec"…

Commons Lang、NumberUtils.stringToInt()

import org.apache.commons.lang.math.NumberUtils; public class C2008123000 { public static void main(String[] args) { System.out.println(NumberUtils.stringToInt("123")); System.out.println(NumberUtils.stringToInt("1.23")); System.out.printl…

LanguageDef:identStart

Prelude> :m Text.ParserCombinators.Parsec.Language Prelude Text.ParserCombinators.Parsec.Language> :t identStart haskellStyle identStart haskellStyle :: forall st. Text.ParserCombinators.Parsec.Char.CharParser st Char

io.close()

#!/usr/bin/env lua f = io.open("2008123000.lua") print(io.close(f)) -- print(io.close(f)) io.open("2008123000.lua") --print(io.input()) print(io.close()) io.input("2008123000.lua") --print(io.input()) print(io.close()) で、 true nil Succes…