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

ActiveSupport、Date#to_date

>> require "rubygems" => true >> require "active_support" => true >> Date.new(2008,12,31).to_date => Wed, 31 Dec 2008 >> Date.new(2008,12,31).to_date.class => Date

Commons Lang、NumberUtils.max()

import org.apache.commons.lang.math.NumberUtils; public class C2008122800 { public static void main(String[] args) { int[] aryi = {3, 1, 2}; double[] aryd = {1.3, 1.1, 1.2}; System.out.println(NumberUtils.max(1, 2, 3)); System.out.println(…

LanguageDef:commentLine

Prelude> :m Text.ParserCombinators.Parsec.Language Prelude Text.ParserCombinators.Parsec.Language> commentLine haskellStyle Loading package parsec ... linking ... done. "--" Prelude Text.ParserCombinators.Parsec.Language> commentLine javaS…

数学関数

以前やっていないもの #!/usr/bin/env lua print(math.exp(1)) print(math.pow(2, 3)) print(__pow(2, 3)) print(math.rad(180)) print(math.frexp(1.0)) print(math.frexp(2.0)) print(math.ldexp(1.0, 0)) print(math.ldexp(1.0, 2)) print(math.random())…