2008-10-01から1ヶ月間の記事一覧
>> Time.local(2008, 12, 31) - Time.local(2008, 12, 30) => 86400.0 >> require "date" => true >> Time.local(2008, 12, 31) - Date.new(2008, 12, 31) TypeError: can't convert Date into Float from (irb):3:in `-' from (irb):3 >> Time.local(2008, …
まんま import org.apache.commons.lang.StringUtils; public class C2008103100 { public static void main(String[] args) { System.out.println(StringUtils.isNumeric(null)); System.out.println(StringUtils.isNumeric("")); System.out.println(Strin…
まんま module Main where import Text.ParserCombinators.Parsec simpleComment = do{ string "")) } run :: Show a => Parser a -> String -> IO () run p input = case (parse p "" input) of Left err -> do{ putStr "parse error at " ; print err } Ri…
/* * $ gcc -Wall -W -I/usr/include/lua50 -o 2008103100 -llua50 2008103100.c */ #include <stdio.h> #include <lua.h> int main(void) { lua_State *L; L = lua_open(); lua_newtable(L); lua_pushstring(L, "foo"); lua_pushnumber(L, 10); lua_settable(L, 1); lua_pus</lua.h></stdio.h>…
>> require "rubygems" => true >> require "active_support" => true >> Time.local(2008, 12, 31).last_year => Mon Dec 31 00:00:00 +0900 2007
まんま import org.apache.commons.lang.StringUtils; public class C2008103000 { public static void main(String[] args) { System.out.println(StringUtils.isNotEmpty(null)); System.out.println(StringUtils.isNotEmpty("")); System.out.println(Str…
module Main where import Text.ParserCombinators.Parsec run :: Show a => Parser a -> String -> IO () run p input = case (parse p "" input) of Left err -> do{ putStr "parse error at " ; print err } Right x -> print x で、 *Main> :l 20081004_…
/* * $ gcc -Wall -W -I/usr/include/lua50 -o 2008103000 -llua50 2008103000.c */ #include <stdio.h> #include <lua.h> int main(void) { lua_State *L; L = lua_open(); lua_newtable(L); lua_pushstring(L, "foo"); lua_rawget(L, 1); printf("%d\n", lua_isnil(L, -1))</lua.h></stdio.h>…
>> require "rubygems" => true >> require "active_support" => true >> Time.local(2008, 1, 1).last_month => Sat Dec 01 00:00:00 +0900 2007
まんま import org.apache.commons.lang.StringUtils; public class C2008102900 { public static void main(String[] args) { System.out.println(StringUtils.isNotBlank(null)); System.out.println(StringUtils.isNotBlank("")); System.out.println(Str…
まんま module Main where import Char import Text.ParserCombinators.Parsec priority :: Parser Int priority = option 0 (do{ d <- digit ; return (digitToInt d) }) run :: Show a => Parser a -> String -> IO () run p input = case (parse p "" inp…
/* * $ gcc -Wall -W -I/usr/include/lua50 -o 2008102900 -llua50 2008102900.c */ #include <stdio.h> #include <lua.h> int main(void) { lua_State *L; L = lua_open(); lua_newtable(L); lua_pushstring(L, "foo"); lua_gettable(L, 1); printf("%d\n", lua_isnil(L, -1</lua.h></stdio.h>…
>> require "rubygems" => true >> require "active_support" => true >> Time.local(2008, 1, 1).end_of_year => Wed Dec 31 23:59:59 +0900 2008 >> Time.local(2008, 1, 1).at_end_of_year => Wed Dec 31 23:59:59 +0900 2008
まんま import org.apache.commons.lang.StringUtils; public class C2008102800 { public static void main(String[] args) { System.out.println(StringUtils.isEmpty(null)); System.out.println(StringUtils.isEmpty("")); System.out.println(StringUti…
ほぼ、まんま module Main where import Text.ParserCombinators.Parsec braces = between (char '{') (char '}') run :: Show a => Parser a -> String -> IO () run p input = case (parse p "" input) of Left err -> do{ putStr "parse error at " ; pri…
/* * $ gcc -Wall -W -I/usr/include/lua50 -o 2008102800 -llua50 2008102800.c */ #include <stdio.h> #include <lua.h> #include <lauxlib.h> /* from lauxlib.c */ typedef struct LoadF { FILE *f; char buff[LUAL_BUFFERSIZE]; } LoadF; static const char *getF (lua_State *L, v</lauxlib.h></lua.h></stdio.h>…
>> require "rubygems" => true >> require "active_support" => true >> Time.local(2008, 12, 31).end_of_week => Sun Jan 04 23:59:59 +0900 2009 >> Time.local(2008, 12, 31).at_end_of_week => Sun Jan 04 23:59:59 +0900 2009
まんま import org.apache.commons.lang.StringUtils; public class C2008102700 { public static void main(String[] args) { System.out.println(StringUtils.isBlank(null)); System.out.println(StringUtils.isBlank("")); System.out.println(StringUti…
module Main where import Text.ParserCombinators.Parsec test1 :: Parser String test1 = count 3 letter run :: Show a => Parser a -> String -> IO () run p input = case (parse p "" input) of Left err -> do{ putStr "parse error at " ; print err…
/* * $ gcc -Wall -W -I/usr/include/lua50 -o 2008102700 -llua50 2008102700.c */ #include <stdio.h> #include <lua.h> int main(void) { lua_State *L; L = lua_open(); printf("%d %d\n", lua_getgccount(L), lua_getgcthreshold(L)); lua_setgcthreshold(L, 1); printf</lua.h></stdio.h>…
>> require "rubygems" => true >> require "active_support" => true >> Time.local(2008, 12, 31).end_of_quarter => Wed Dec 31 23:59:59 +0900 2008 >> Time.local(2008, 1, 31).end_of_quarter => Mon Mar 31 23:59:59 +0900 2008 >> Time.local(2008, …
まんま import org.apache.commons.lang.StringUtils; public class C2008102600 { public static void main(String[] args) { System.out.println(StringUtils.isAlphaSpace(null)); System.out.println(StringUtils.isAlphaSpace("")); System.out.println…
module Main where import Text.ParserCombinators.Parsec test1 :: Parser String test1 = sepEndBy1 letter (char ',') run :: Show a => Parser a -> String -> IO () run p input = case (parse p "" input) of Left err -> do{ putStr "parse error at …
/* * $ gcc -Wall -W -I/usr/include/lua50 -o 2008102600 -llua50 2008102600.c */ #include <stdio.h> #include <lua.h> int main(void) { lua_State *L; int i; L = lua_open(); printf("%d %d\n", lua_getgccount(L), lua_getgcthreshold(L)); for (i = 0; i < 20; i++) </lua.h></stdio.h>…
>> require "rubygems" => true >> require "active_support" => true >> Time.local(2008, 12, 1).end_of_month => Wed Dec 31 23:59:59 +0900 2008 >> Time.local(2008, 12, 1).at_end_of_month => Wed Dec 31 23:59:59 +0900 2008
まんま import org.apache.commons.lang.StringUtils; public class C2008102500 { public static void main(String[] args) { System.out.println(StringUtils.isAlphanumericSpace(null)); System.out.println(StringUtils.isAlphanumericSpace("")); Syst…
module Main where import Text.ParserCombinators.Parsec test1 :: Parser String test1 = sepEndBy letter (char ',') run :: Show a => Parser a -> String -> IO () run p input = case (parse p "" input) of Left err -> do{ putStr "parse error at "…
/* * $ gcc -Wall -W -I/usr/include/lua50 -o 2008102500 -llua50 2008102500.c */ #include <stdio.h> #include <lua.h> int main(void) { lua_State *L; L = lua_open(); lua_pushstring(L, "foo"); lua_pushstring(L, " bar"); lua_pushstring(L, " baz"); lua_concat(L,</lua.h></stdio.h>…
>> require "rubygems" => true >> require "active_support" => true >> Time.local(2008, 12, 31).end_of_day => Wed Dec 31 23:59:59 +0900 2008 at_end_of_day はないんだ〜
まんま import org.apache.commons.lang.StringUtils; public class C2008102400 { public static void main(String[] args) { System.out.println(StringUtils.isAlphanumeric(null)); System.out.println(StringUtils.isAlphanumeric("")); System.out.pri…