2009-11-01ãã1ã¶æéã®è¨äºä¸è¦§
æãè¡ãã§ã®æ±ºæ¸æ©è½ãå®è£ ãã¾ããã âGitHub - unageanu/sbiclient以ä¸ã¯ããã¹ã¦ã®å»ºçãæè¡æ±ºæ¸ããä¾ã§ãã $: << "../lib" require 'sbiclient' require 'common' # ãã°ã¤ã³ c = SBIClient::Client.new c.fx_session( USER, PASS, ORDER_PASS ) {|sâ¦
Yahoo! Developer APIã®å½¢æ ç´ è§£æãµã¼ãã¹ãå©ç¨ãã¦ãããã¹ãã®å½¢æ ç´ è§£æãè¡ããµã³ãã«ã§ããæ¨æ¥ã®ç¹å¾´èªæ½åºã¯ã©ã¹ã«æ©è½ã追å ããæãã§ä½æã ä¾ã«ãã£ã¦ ä¾åã¢ã¸ã¥ã¼ã«ã¨ãã¦ãhttpclientããå¿ è¦ã§ãã ã¾ããå®è¡æã«ã¯ãYahoo! Developer APIâ¦
Yahoo! Developer APIã®ãã¼ãã¬ã¼ãºæ½åºãµã¼ãã¹ãå©ç¨ãã¦ãããã¹ãããç¹å¾´èªãæ½åºãããµã³ãã«ã§ããã¨ãã£ã¦ãhttpclientã§ãµã¼ãã¹ã«ã¢ã¯ã»ã¹ãã¦çµæã解æãè¿ãã ãã§ããã»ã»ã»ã ä¾åã¢ã¸ã¥ã¼ã«ã¨ãã¦ãhttpclientããå¿ è¦ã§ãã ã¾ããå®è¡æâ¦
ãã¼ã¿ãå ¨é¨ãaaaa...ãã§ä½ã£ã¦ãããå§ç¸®çã大å¤ããããã¦è©¦é¨ã«ãªããã®ã§ãã©ã³ãã ãªæååãçæããé¢æ°ãæ¸ãã¾ããã ãa-zA-Z0-9ãã®æåãã©ã³ãã ã«çµã¿åãã㦠æå®ãããé·ãã®æååãçæãã¾ãã /** * ã©ã³ãã ãªæååãä½æããã *â¦
PostgreSQL 8 - ããã¯ã¢ããã¨ãªã¹ãã¢ãããPostgreSQLã§ã¯pg_dumpã¨psqlã使ã£ã¦ãã¹ãéã§ã®DBã®ãã¤ã¬ã¯ãã³ãã¼ãã§ãããããã $ pg_dump -h <ãã³ãå ãã¹ã> <DBå> | psql -h <ãã³ãå ãã¹ã> <DBå>ä»åº¦è©¦ã!</dbå></dbå>
Ubuntu 9.0.4,PostgreSQL8.3ã§ãªã¢ã¼ãããDBã¸ã®æ¥ç¶ã許å¯ããããã®è¨å®æé ã§ããç·¨éãå¿ è¦ãªç®æã¯ä»¥ä¸ã®2ã¤ã /etc/postgresql/8.3/main/postgresql.conf /etc/postgresql/8.3/main/pg_hda.conf 1.postgresql.conf ã®ç·¨é ã/etc/postgresql/8.3/mainâ¦
suã使ã以å¤ã«ãdeamontoolsä»å±ã®ãsetuidgidãã使ãæ¹æ³ãããã¾ãã $ setuidgid <ã¦ã¼ã¶ã¼> <ã³ãã³ã>å ·ä½ä¾ã¯ä»¥ä¸ãwhoamiã¯å®è¡ã¦ã¼ã¶ã¼ãåºåããã³ãã³ãã§ãã(ãããä»æ¥ç¥ã£ãã»ã»ã»ã) $ setuidgid unageanu whoamiå®è¡çµæã§ãã unageanuãâ¦
建çä¸è¦§åå¾ã«å¯¾å¿ã âGitHub - unageanu/sbiclient require 'sbiclient' require 'common' # ãã°ã¤ã³ c = SBIClient::Client.new c.fx_session( USER, PASS, ORDER_PASS ) {|session| # 建çä¸è¦§ãåå¾ rates = session.list_positions rates.each_pair {â¦
Ubuntu9.0.4ã§ãRubyãããã¼ã«ã«ã®postgresã«æ¥ç¶ããæé ã®ã¡ã¢ã§ãã Ruby/DBIã®ã¤ã³ã¹ãã¼ã« Ruby/DBIã¯rubyããå種DBã¸ã®æ¥ç¶ãééçã«è¡ãçºã®ã¤ã³ã¿ã¼ãã§ã¤ã¹ã§ããJavaã®ä¸çã«ãããJDBCã¿ãããªãã®ã¨ç解ãUbuntuã§ã¯ããã±ã¼ã¸ãç¨æããã¦ãâ¦
SBI証å¸ã®ãµã¤ãããããã¬ã¼ã«åå¼ã¯ éæå¤æ³¨æã«å¤å¹ æå®æ©è½ã追å ãã注æã§ããéæå¤ã注æããã¨ãã«å¤åãã«ãã£ã¦å£²ãéæå¤ä¾¡æ ¼ãå¼ãä¸ããããè²·ãéæå¤ä¾¡æ ¼ãå¼ãä¸ããããã注æã§ãã ã¤ã¾ãã以ä¸ã®ãããªæã«ãã¬ã¼ã«æ³¨æã§çºæ³¨ãã¦ããâ¦
ãtime ãã§ã³ãã³ãã®æè¦æéãè¨æ¸¬ã§ãã¾ãã $ time sleep 3å®è¡çµæã§ãã real 0m3.315s user 0m0.000s sys 0m0.000såºåå ã¯æ¨æºã¨ã©ã¼ãªã®ã§ããªãã¤ã¬ã¯ããã¦çµæãä¿åããå ´åã¯æ³¨æã $ time sleep 3 > a.txt real 0m3.030s user 0m0.001s sys â¦
$ su - <ã¦ã¼ã¶ã¼> -c <ã³ãã³ã>ã§ãæå®ããã¦ã¼ã¶ã¼ã§ã³ãã³ããå®è¡ã§ãã¾ãã ã-cããªãã·ã§ã³ãã¤ããã¨ã·ã§ã«ãèµ·åããªãã®ã§ãå®è¡å¾ã¯ãã¨ãã¨ã®ã¦ã¼ã¶ã¼ã®ã·ã§ã«?ã«æ»ãã¾ãã ä¸è¬ã¦ã¼ã¶ã¼ã§å®è¡ããå ´åã¯ã(å½ããåã§ãã)ãã¹ã¯ã¼ããå¿ è¦â¦
ä»æ¥ã¯ãVMware Server 2ã§ç°å¢æ§ç¯ã§ãããã¨ãããã¨ã§åèã«ãããµã¤ããªã©ã [http //d.hatena.ne.jp/pyopyopyo/20081011/p1:title=ã´ãã´ãã´ãï¼ - Linuxã¨ãããã°ã©ãã³ã°ã®è¦ãæ¸ã - VMware Server 2.0 ãã³ãã³ãã©ã¤ã³ããæä½ããæ¹æ³]:âã³ãã³â¦
PostgreSQLã®ããã¯ã«ã¤ãã¦å¦ç¿ä¸ãããã§ãã¼ãã«ã¬ãã«ããã¯ã®ç«¶å表ã¯çºè¦ããã®ã ãã©ããSHARE UPDATE EXCLUSIVEãã¨ããããã¦ãè¯ãããããã®ã§ãå ·ä½çãªæä½/ã³ãã³ãåã«ç½®ãæãã¦ã¿ããâã¯ç«¶åããªããÃã¯ç«¶åããã§ãã select select for uâ¦
ãCOMMENT ONãã§ãã¼ãã«ãã«ã©ã ã«ã³ã¡ã³ããè¨å®ã§ãã¾ãã COMMENT ON TABLE kitten IS 'this is kittens table.'; è¨å®ããã³ã¡ã³ãã¯ã\d+ããã\l+ãã§åç §å¯ã # \d+ public | kitten | table | postgres | this is kittens table.SQL92ã§å®ããããâ¦
IFD-OCO注æã®åä½ç¢ºèªãå®äºã âGitHub - unageanu/sbiclient IFD-OCO注æã¯ãæå¤oréæå¤ã§ã®æ³¨æã¨ãããã®æ±ºæ¸æ³¨æx2ãåæã«è¡ãçºæ³¨æ¹æ³ã§ãã 決æ¸æ³¨æã¯ã以ä¸ã®2ã¤ãåæã«æå®ã§ãã¾ãã å©ç確å®ã®ããã®æå¤æ±ºæ¸æ³¨æ æ失éå®ã®çºã®éæå¤æ±ºæ¸â¦
IFD注æã®åä½ç¢ºèªãã§ããã®ã§ããµã³ãã«ãã°ã âGitHub - unageanu/sbiclient é常ã®æ³¨æã«å ãã¦ã決æ¸æ³¨æã®ã¬ã¼ãã¨å·è¡æ¡ä»¶ãæå®ãããã¨ã§IFD注æã«ãªãã¾ãã require 'sbiclient' require 'common' # ãã°ã¤ã³ c = SBIClient::Client.new c.fx_sesâ¦
è² è·è©¦é¨ã¯OpenSTAãã¨ã®ãã¨ãªã®ã§ãåºæ¬çãªä½¿ãæ¹ãå¦ç¿ä¸ã æç¨æéã®è¨æ¸¬ ç¹å®ã®ç¯å²ã®å¦çã®æè¦æéã測ãã«ã¯ããTimerãã使ãã ãDefinitionsãã§ãTimerããä½æãã¦ããã ãCodeãå ã§è¨æ¸¬å¯¾è±¡ã®å¦çã®åå¾ã§ãStart Timer ãããEnd Timer â¦
com.sun.xml.internal.ws.util.ByteArrayDataSourceã使ã£ã¦ããã¯ã©ã¹ããã£ã¦ããããã³ã³ãã¤ã«ãããã¨ããã¨ã¨ã©ã¼ã«ãªãã $ javac ./Test.java ./Test.java:2: ããã±ã¼ã¸ com.sun.xml.internal.ws.util ã¯åå¨ãã¾ããã import com.sun.xml.internaâ¦
yesã§ã³ãã³ããåºåããshã§å®è¡ã $ yes date | shå®è¡çµæã§ãã 2009å¹´ 11æ 11æ¥ æ°´ææ¥ 13:05:33 JST 2009å¹´ 11æ 11æ¥ æ°´ææ¥ 13:05:33 JST 2009å¹´ 11æ 11æ¥ æ°´ææ¥ 13:05:33 JST 2009å¹´ 11æ 11æ¥ æ°´ææ¥ 13:05:33 JST 2009å¹´ 11æ 11æ¥ æ°´ææ¥ 13:â¦
次ã®ããã¸ã§ã¯ãã¯PostgreSQLãããªã®ã§ã使ãæ¹ãã¡ããã¡ãã調ã¹ä¸ã ãã¼ã¿ãã¼ã¹ä¸è¦§ãå¾ãã $ psql -l ãã¼ãã«ä¸è¦§ãå¾ã æ£ç¢ºã«ã¯ãã¼ãã«ã®ã¢ã¯ã»ã¹æ¨©ä¸è¦§ãå¾ãã¡ã¿ã³ãã³ãã ãã©ããã¨ã¯è¶³ããã $ psql <DBå> # \z ã¿ã¤ã ã¹ã¿ã³ãåã®ã«ã©ã ãæ´æ°</dbå>â¦
rescueã£ã¦ä¿®é£¾è©ããããã ãã¸ã¼ã raise "test" rescue puts "error!" ããã¯ã以ä¸ã¨åãã§ãã begin raise "test" rescue puts "error!" end å®è¡çµæã§ãã error!ããã¥ã¢ã«ã«ããã¨ãææããä¾å¤ã¯ã©ã¹ãæå®ã§ããªã=(StandardErrorã®æ´¾çã¯ã©ã¹â¦
GitHub - unageanu/sbiclientã使ã£ã¦OCO注æãè¡ããµã³ãã«ã§ãã é常ã®æ³¨æã«å ãã¦ã2ã¤ãã®æ³¨æã¬ã¼ãã¨å£²è²·ç¨®å¥ãæå®ãããã¨ã§OCO注æã«ãªãã¾ãã require 'sbiclient' require 'common' # ãã°ã¤ã³ c = SBIClient::Client.new c.fx_session( USER,â¦
ä¾å¤ãã¹ãã¼ããããã¨ããã§ãã¯ããã«ã¯ããraise_errorããããã£ã¼ã使ç¨ãã¾ãã ãproc { }.should raise_errorãã®ãããªå½¢å¼ã§ä½¿ç¨ãã¾ãã raise_errorã®å¼æ°ã¨ãã¦ãæå¾ ãããä¾å¤ã®åãmessageã®å¤ãæå®ãã¦è©³ç´°ãªãã§ãã¯ãè¡ããã¨ãå¯è½ã§â¦
daemontoolsä»å±ã®tai64nã使ãã¨ãæ¨æºå ¥åã®åè¡ã«ç¾å¨ã®æå»ãä»ä¸ã§ãã¾ãã $ cat ./test.txt | tai64n @400000004af418f312d2bbb4 aa @400000004af418f312d2c76c bb @400000004af418f312d2cf3c ccå½¢å¼ãç¹æ®ãªã®ã§æå³ä¸æã§ãããtai64nlocal ã使ãâ¦
beforeãafterãå®ç¾©ããã«ã¯ã åãã¹ãã«åå¥ã«è¨å®ãã it_should_behave_likeã使ã£ã¦è¨å®ãå ±æãã ã»ãããSpec::Runner.configureãã使ã£ã¦å®ç¾©ãããã¨ãã§ãã¾ãããã®æ¹æ³ã§å®ç¾©ãããbefore,afterã¯ãã¹ã¦ã®ãã¹ãã§æå¹ã¨ãªãã¾ãã以ä¸ã¯ããâ¦
ãspecãã³ãã³ãã®å¼æ°ã§ãã£ã¬ã¯ããªãæå®ããã°ããã®ãã©ã«ã以ä¸ã®specãä¸æ¬ã§å®è¡ãã¦ããã¾ãã $ spec <ãã£ã¬ã¯ããª> ã¹ãã¼ã¹åºåãã§è¤æ°ã®ãã£ã¬ã¯ããªãæå®ãããã¨ãå¯è½ã $ spec <ãã£ã¬ã¯ããª1> <ãã£ã¬ã¯ããª2> æ¢ç´¢ããspecã¯ã-pããªâ¦
RSpec documentationã®ãShared Example Groupsãã«èª¬æãããã¾ããããshared_examples_forãã使ç¨ãã¦åãexampleãè¤æ°ã®ãã¹ãã§å ±æãããã¨ãå¯è½ã§ãã ãshared_examples_for ãã§å ±æããexampleã®ã°ã«ã¼ã(ãShared Example Groupsãã¨å¼ã°ããâ¦
è·è§£ããè½ã¡çãã¦ããã®ã§ãã¼ã¡ã¼ã¡ã©ã¤ãã©ãªã®å®è£ ãåéã以ä¸ã®æ©è½ãå®è£ ãã¾ããã æå¤/éæå¤ã§ã®æ³¨æ 注æä¸è¦§ã®åå¾ æ³¨æã®ãã£ã³ã»ã« âGitHub - unageanu/sbiclient以ä¸ã¯ãæå¤/éæå¤ã§æ³¨æãã¦å³åº§ã«ãã£ã³ã»ã«ãããµã³ãã«ã§ãããªããSBIâ¦
æ°å± ããããã«ç¹ãã£ãã¿ãããªã®ã§ãjijiã®ãã¢ãµã¤ãã«ã¢ã¯ã»ã¹ã§ããããã«ãªã£ã¦ã¾ããããã§ãã«ãã§éãã¨ããããã°ããããã¡ããè»¢å ¥å±åºãã¦ãã!