{"id":744,"date":"2010-07-26T20:28:05","date_gmt":"2010-07-26T11:28:05","guid":{"rendered":"http:\/\/hitoriblog.com\/?p=744"},"modified":"2016-03-16T13:36:01","modified_gmt":"2016-03-16T04:36:01","slug":"ipad%e3%81%ae%e3%82%b9%e3%83%86%e3%83%bc%e3%82%bf%e3%82%b9%e3%83%90%e3%83%bc%e3%81%abbuzztter%e3%82%84%e5%86%86%e7%9b%b8%e5%a0%b4%e3%82%92%e8%a1%a8%e7%a4%ba","status":"publish","type":"post","link":"http:\/\/hitoriblog.com\/?p=744","title":{"rendered":"iPad\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u30d0\u30fc\u306bbuzztter\u3084\u5186\u76f8\u5834\u3092\u8868\u793a"},"content":{"rendered":"<p>\u5148\u65e5\u30a2\u30c3\u30d7\u3057\u305f<a href=\"http:\/\/hitoriblog.com\/?p=725\" target=\"_blank\">StatusBarCustomClock<\/a>\u306f\u3001\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u30b9\u30c6\u30fc\u30bf\u30b9\u30d0\u30fc\u306b\u8868\u793a\u3067\u304d\u300110\u79d2\u3054\u3068\u306b\u66f4\u65b0\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u5de5\u592b\u6b21\u7b2c\u3067\u9762\u767d\u3044\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3088\u3002<br \/>\niPhone\u3067\u306f\u3061\u3087\u3063\u3068\u7121\u7406\u304c\u3042\u308a\u307e\u3059\u304c\u3001iPad\u306a\u3089\u30b9\u30c6\u30fc\u30bf\u30b9\u30d0\u30fc\u304c\u5e83\u5927\u3067\u3059\u304b\u3089\u3001\u3044\u308d\u3044\u308d\u306a\u3082\u306e\u304c\u8868\u793a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"http:\/\/hitoriblog.com\/wp-content\/uploads\/2010\/07\/sbccscript01-225x300.png\" alt=\"\" title=\"sbccscript01\" width=\"225\" height=\"300\" class=\"alignnone size-medium wp-image-813\" \/><noscript><img loading=\"lazy\" src=\"http:\/\/hitoriblog.com\/wp-content\/uploads\/2010\/07\/sbccscript01-225x300.png\" alt=\"\" title=\"sbccscript01\" width=\"225\" height=\"300\" class=\"alignnone size-medium wp-image-813\" \/><\/noscript><\/p>\n<p>\u6d3b\u7528\u4f8b\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4e0a\u63b2\u306e\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u306e\u3088\u3046\u306b\u3001Twitter\u306eBuzz Word\u3092\u96c6\u8a08\u3057\u3066\u3044\u308b\u8208\u5473\u6df1\u3044\u30b5\u30a4\u30c8\u3001<a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/buzztter.com\/#\/ja\/');\"  href=\"http:\/\/buzztter.com\/#\/ja\/\" target=\"_blank\">buzztter<\/a>\u306e1\u4f4d\u304b\u30893\u4f4d\u307e\u3067\u3001\u307e\u305f<a onclick=\"javascript:pageTracker._trackPageview('\/outgoing\/stocks.finance.yahoo.co.jp\/stocks\/detail\/?code=USDJPY=X');\"  href=\"http:\/\/stocks.finance.yahoo.co.jp\/stocks\/detail\/?code=USDJPY=X\" target=\"_blank\">\u5186\u76f8\u5834<\/a>\u3092StatusBarCustomClock\u306b\u8868\u793a\u3059\u308b\u4f8b\u3092\u304a\u76ee\u306b\u304b\u3051\u307e\u3059\u3002\uff08\u7d9a\u304d\u306f[MORE]\u304b\u3089\uff09<\/p>\n<p><!--more--><\/p>\n<h2>SBCCScript\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u3059\u3050\u306b\u4f53\u9a13\u3067\u304d\u308b\u30b5\u30f3\u30d7\u30eb\u3092<a href=\"http:\/\/hitoriblog.com\/?page_id=25\" target=\"_blank\">New\u91ce\u826f\u30ea\u30dd\u30b8\u30c8\u30ea<\/a>\u306b\u30a2\u30c3\u30d7\u3057\u3066\u304a\u304d\u307e\u3057\u305f\u306e\u3067\u3001\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u300cSBCCScript\u300d\u3068\u3044\u3046\u540d\u524d\u3067\u767b\u9332\u3057\u3066\u3042\u308a\u307e\u3059\u3002<br \/>\n\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001StatusBarCustomClock\u306e\u8a2d\u5b9a\u306eDate Format\u306b\u3001\u30c6\u30ad\u30b9\u30c8\u306e\u57cb\u3081\u8fbc\u307f\u3092\u6307\u793a\u3059\u308b\u30de\u30af\u30ed\u300cTXT\u300d\u3092\u8ffd\u52a0\u3057\u3066respring\u3057\u307e\u3059\u3002<br \/>\nTXT\u3068\u66f8\u3044\u3066\u304a\u304f\u3068\u3001\u305d\u308c\u304c\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u3068\u7f6e\u304d\u63db\u3048\u3089\u308c\u308b\u306e\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"http:\/\/hitoriblog.com\/wp-content\/uploads\/2010\/07\/sbccscript02-225x300.png\" alt=\"\" title=\"sbccscript02\" width=\"225\" height=\"300\" class=\"alignnone size-medium wp-image-814\" \/><noscript><img loading=\"lazy\" src=\"http:\/\/hitoriblog.com\/wp-content\/uploads\/2010\/07\/sbccscript02-225x300.png\" alt=\"\" title=\"sbccscript02\" width=\"225\" height=\"300\" class=\"alignnone size-medium wp-image-814\" \/><\/noscript><\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001\u300c\/var\/mobile\/sbcc.txt\u300d\u306e\u5b58\u5728\u3092\u78ba\u8a8d\u3057\u3001\u3042\u308c\u3070\u305d\u306e\u5185\u5bb9\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002SBCCScript\u306f\u3001\u305d\u306e\u5185\u5bb9\u3092\u81ea\u52d5\u7684\u306b\u66f4\u65b0\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<p>SBCCScript\u306f\u3001\u5192\u982d\u306e\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u306e\u3088\u3046\u306b\u3001\u30c9\u30eb\/\u5186\u76f8\u5834\u3068buzztter\u306e\u30c8\u30c3\u30d7Buzz Word\u3092\u8868\u793a\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u3068\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u4e00\u5b9a\u306e\u5b9f\u7528\u5ea6\u306f\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u305d\u306e\u307e\u3093\u307e\u4f7f\u3046\u306e\u3067\u3082\u69cb\u3044\u307e\u305b\u3093\u304c\u3001\u3082\u3063\u3068\u6d3b\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>SBCCScript\u306e\u4ed5\u7d44\u307f<\/h2>\n<p>SBCCScript\u306f\u3001\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u7fa4\u304b\u3089\u6210\u308a\u307e\u3059\u3002<\/p>\n<blockquote><p>\n\/System\/Library\/LaunchDaemons\/com.hitoriblog.sbccscript.plist<br \/>\n\/usr\/bin\/sbcc.rb<br \/>\n\/usr\/bin\/sbcc_dummyconnect\n<\/p><\/blockquote>\n<p>\u307e\u305f\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u306epostinst\u3001prerm\u306e\u4e2d\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642<\/p>\n<blockquote><p>\nlaunchctl load -w \/System\/Library\/LaunchDaemons\/com.hitoriblog.sbccscript.plist\n<\/p><\/blockquote>\n<p>\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642<\/p>\n<blockquote><p>\nlaunchctl unload -w \/System\/Library\/LaunchDaemons\/com.hitoriblog.sbccscript.plist\n<\/p><\/blockquote>\n<p>\/usr\/bin\/sbcc.rb\u306f\u3001\u62e1\u5f35\u5b50\u304b\u3089\u3082\u5206\u304b\u308b\u901a\u308aRuby\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002<br \/>\n\u3053\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306fRuby\u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u306e\u3067\u3001Ruby\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u306a\u304b\u3063\u305f\u3089\u3044\u3063\u3057\u3087\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><iframe src=\"http:\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hitoriblog0c-22&#038;o=9&#038;p=15&#038;l=st1&#038;mode=electronics-jp&#038;search=ipad&#038;fc1=000000&#038;lt1=&#038;lc1=3366FF&#038;bg1=FFFFFF&#038;f=ifr\" marginwidth=\"0\" marginheight=\"0\" width=\"468\" height=\"240\" border=\"0\" frameborder=\"0\" style=\"border:none;\" scrolling=\"no\"><\/iframe><\/p>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001com.hitoriblog.sbccscript.plist\u306e\u4e2d\u8eab\u306b\u3042\u308b\u901a\u308a\u30011\u5206\u306b1\u56desbcc.rb\u3092\u5b9f\u884c\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\nsbcc.rb\u306e\u4e2d\u3067\u306f\u3001buzztter\u3084Yahoo!\u304b\u3089\u5fc5\u8981\u306a\u60c5\u5831\u3092\u62bd\u51fa\u3057\u3066\u3001\/var\/mobile\/sbcc.txt\u306b\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066\u66f8\u304d\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001sbcc.rb\u306f\u3001buzztter\u7b49\u306b\u30a2\u30af\u30bb\u30b9\u306b\u884c\u304f\u524d\u306b\u3001sbcc_dummyconnect\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002sbcc_dummyconnect\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001Foundation\u306eAPI\u3092\u4f7f\u3063\u30663G\u304c\u30aa\u30f3\u30e9\u30a4\u30f3\u306b\u306a\u308a\u307e\u3059\uff08\u570f\u5916\u3067\u306a\u3051\u308c\u3070\uff09\u3002<br \/>\n3G\u3057\u304b\u30cd\u30c3\u30c8\u30a2\u30af\u30bb\u30b9\u306e\u624b\u6bb5\u304c\u7121\u3044\u5834\u6240\u306b\u304a\u3044\u30663G\u304c\u30aa\u30d5\u30e9\u30a4\u30f3\u3067\u3042\u308b\u5834\u5408\u306b\u3001ruby\u304b\u3089\u3060\u30683G\u3092\u30aa\u30f3\u30e9\u30a4\u30f3\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u3044\u305f\u3081\u3001\u3053\u306e\u3088\u3046\u306a\u3053\u3068\u3092\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>sbcc.rb\u306e\u4e2d\u8eab\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>[cc lang=&#8221;ruby&#8221;]<br \/>\n#!\/usr\/bin\/ruby<br \/>\n# -*- coding: utf-8 -*-<br \/>\n# \u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bfEmacs\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u958b\u3044\u305f\u3068\u304d\u306b<br \/>\n# \u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092utf-8\u306b\u81ea\u52d5\u8a2d\u5b9a\u3059\u308b\u304a\u307e\u3058\u306a\u3044<br \/>\n# -*- coding: utf-8 -*-<\/p>\n<p># \u6587\u5b57\u5217\u304cUTF-8\u3067\u3042\u308b\u3053\u3068\u3092\u5ba3\u8a00<br \/>\n$KCODE = &#8216;u&#8217;<\/p>\n<p># rss\u30d1\u30fc\u30b9\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8aad\u307f\u8fbc\u307f<br \/>\nrequire &#8216;rss\/2.0&#8217;<br \/>\n# url\u3092\u3001\u3042\u305f\u304b\u3082\u30ed\u30fc\u30ab\u30eb\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u3067\u3042\u308b\u304b\u306e\u3088\u3046\u306b\u8aad\u3081\u308b\u3088\u3046\u306b<br \/>\nrequire &#8216;open-uri&#8217;<\/p>\n<p># buztter\u306eRSS\u304b\u3089\u5fc5\u8981\u306a\u6587\u5b57\u5217\u3092\u629c\u3044\u3066\u304f\u308b\u30e1\u30bd\u30c3\u30c9\u5b9a\u7fa9<br \/>\n# \u5f15\u6570 numberofbuzz: \u629c\u3044\u3066\u304f\u308bbuzz\u306e\u6570<br \/>\n# \u5f15\u6570 length: buzz\u4e00\u3064\u5f53\u305f\u308a\u306e\u9577\u3055\u3002\u3053\u308c\u3092\u8d85\u3048\u308b\u9577\u3055\u306ebuzz\u306f\u3001\u305d\u306e\u9577\u3055\u306b\u5207\u308a\u53d6\u3089\u308c\u308b<br \/>\ndef topbuzz(numberofbuzz, length)<\/p>\n<p>  # \u4f8b\u5916\u51e6\u7406\u7528\u69cb\u6587\u958b\u59cb begin \u301c rescue \u301c end<br \/>\n  # http:\/\/www.namaraii.com\/rubytips\/?%CE%E3%B3%B0<br \/>\n  begin<br \/>\n    # buzztter\u306eRSS\u3092\u53d6\u5f97\u3057\u3001\u5909\u6570fh\u3078\u683c\u7d0d<br \/>\n    fh = open(&#8216;http:\/\/buzztter.com\/ja\/rss&#8217;)<br \/>\n    # \u53d6\u5f97\u3057\u305frss\u3092RSS\u30d1\u30fc\u30b5\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u751f\u6210<br \/>\n    # \u3055\u3089\u306bRSS\u306e\u30a2\u30a4\u30c6\u30e0\u4e00\u3064\u4e00\u3064\u3092\u914d\u5217\u3068\u3057\u3066\u5909\u6570rss\u306b\u683c\u7d0d<br \/>\n    rss = RSS::Parser::parse(fh.read).items<br \/>\n    # \u51fa\u529b\u3068\u306a\u308b\u6587\u5b57\u5217\u578b\u306e\u5909\u6570output\u3092\u521d\u671f\u5316<br \/>\n    output = &#8220;&#8221;<br \/>\n    # RSS\u306e\u30a2\u30a4\u30c6\u30e0\u304c\u914d\u5217\u3068\u3057\u3066\u683c\u7d0d\u3055\u308c\u305f\u5909\u6570rss\u306e\u30a2\u30a4\u30c6\u30e0\u6570\u3060\u3051\u7e70\u308a\u8fd4\u3057<br \/>\n    # rss.each\u306b\u3057\u306a\u3044\u306e\u306f\u3001\u982d\u304b\u3089\u5f15\u6570numberofbuzz\u3067\u8a2d\u5b9a\u3057\u305f\u6570\u3067\u7e70\u308a\u8fd4\u3057\u3092\u6b62\u3081\u308b\u90fd\u5408\u304b\u3089<br \/>\n    # \u4f55\u500b\u76ee\u306e\u30a2\u30a4\u30c6\u30e0\u3067\u3042\u308b\u304b\u3092\u628a\u63e1\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081<br \/>\n    rss.each_index do |index|<br \/>\n      # \u914d\u5217\u3067\u3042\u308b\u5909\u6570rss\u306e\u5f53\u8a72\u500b\u6570\u76ee\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u3001\u5f15\u6570length\u3067\u5207\u308a\u8a70\u3081\u305f\u4e0a\u3067<br \/>\n      # \u5909\u6570output\u306e\u304a\u5c3b\u306b\u304f\u3063\u3064\u3051\u3066\u3044\u304f<br \/>\n      output += rss[index].title.gsub(\/^(.{#{length}}).+\/, &#8220;1&#8221;)<br \/>\n      # \u5f53\u8a72\u500b\u6570\u76ee\u304c\u5f15\u6570numberofbuzz\u3067\u8a2d\u5b9a\u3057\u305f\u500b\u6570\u3060\u3063\u305f\u3089\u7e70\u308a\u8fd4\u3057\u3092\u8131\u51fa<br \/>\n      # numberofbuzz &#8211; 1\u3068\u306a\u3063\u3066\u3044\u308b\u306e\u306f\u3001index\u304c0\u304b\u3089\u521d\u307e\u308b\u305f\u3081<br \/>\n      if (index == numberofbuzz &#8211; 1) then<br \/>\n        break<br \/>\n      end<br \/>\n      # \u5f8c\u306b\u30a2\u30a4\u30c6\u30e0\u304c\u7d9a\u304f\u5834\u5408\u306f\u3001\u5909\u6570output\u306e\u304a\u5c3b\u306b\/\u3092\u304f\u3063\u3064\u3051\u308b<br \/>\n      output += &#8220;\/&#8221;<br \/>\n    end<br \/>\n    # \u30e1\u30bd\u30c3\u30c9\u304b\u3089\u306e\u8fd4\u308a\u5024\u3068\u3057\u3066\u5909\u6570output\u3092\u6e21\u3059<br \/>\n    return output<br \/>\n  rescue<br \/>\n    # \u30a8\u30e9\u30fc\u304c\u751f\u3058\u305f\u3068\u304d\u306f\u3001\u4f8b\u5916\u3092\u767a\u751f\u3055\u305b\u3066\u7d42\u4e86<br \/>\n    # \u30a8\u30e9\u30fc\u306f\u3001RSS\u53d6\u5f97\u306a\u3069\u3067\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u306f\u305a<br \/>\n    # \u305d\u306e\u5834\u5408\u306b\u3001sbcc.txt\u304c\u7a7a\u306e\u6587\u5b57\u5217\u3067\u4e0a\u66f8\u304d\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u308b<br \/>\n    raise &#8220;error occurred at topbuzz&#8221;<br \/>\n  end<br \/>\nend<\/p>\n<p># Yahoo!\u30d5\u30a1\u30a4\u30ca\u30f3\u30b9\u306e\u5186\u30c9\u30eb\u76f8\u5834\u3092\u629c\u3044\u3066\u304f\u308b\u30e1\u30bd\u30c3\u30c9<br \/>\ndef usdjpy()<br \/>\n  # \u5909\u6570yen\u3092\u7a7a\u6587\u5b57\u5217\u3067\u521d\u671f\u5316<br \/>\n  yen = &#8220;&#8221;<br \/>\n  # \u5909\u6570time\u3092\u7a7a\u6587\u5b57\u5217\u3067\u521d\u671f\u5316<br \/>\n  time = &#8220;&#8221;<br \/>\n  # \u30bf\u30fc\u30b2\u30c3\u30c8\u3068\u306a\u308burl\u3092\u5909\u6570url\u306b\u683c\u7d0d<br \/>\n  url = &#8216;http:\/\/stocks.finance.yahoo.co.jp\/stocks\/detail\/?code=USDJPY=X&#8217;<br \/>\n  # \u5186\u30c9\u30eb\u76f8\u5834\u3092\u30bf\u30fc\u30b2\u30c3\u30c8url\u304b\u3089\u629c\u304d\u51fa\u3059\u6b63\u898f\u8868\u73fe<br \/>\n  # <span class=\"yjFL\">\u3068<\/span>\u306b\u56f2\u307e\u308c\u305f\u300c\u6570\u5b57.\u6570\u5b57\u300d\u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u53d6\u308a\u51fa\u3059<br \/>\n  # \u300cd\u300d\u30670\u304b\u30899\u306e\u6570\u5b57\u3092\u610f\u5473\u3059\u308b\u3002\u300c.\u300d\u3067\u4efb\u610f\u306e1\u5b57\u3068\u3044\u3046\u7279\u5225\u306a\u610f\u5473\u306b\u306a\u308b\u306e\u3067<br \/>\n  # \u305d\u306e\u52b9\u679c\u3092\u6253\u3061\u6d88\u3059\u305f\u3081\u306b\u300c.\u300d\u3068\u30d0\u30c3\u30af\u30b9\u30e9\u30c3\u30b7\u30e5\u3067\u30a8\u30b9\u30b1\u30fc\u30d7\u3057\u3066\u3044\u308b<br \/>\n  # \u534a\u89d2\u4e38\u62ec\u5f27\u306b\u56f2\u307e\u308c\u305f\u90e8\u5206\u304c\u30d6\u30ed\u30c3\u30af\u69cb\u6587\u306e\u4eee\u5f15\u6570\u306b\u914d\u5217\u3068\u3057\u3066\u6e21\u3063\u3066\u304f\u308b(\u5f8c\u65b9\u53c2\u7167)<br \/>\n  # \u6b63\u898f\u8868\u73fe\u306f\/\/\u3067\u56f2\u3093\u3067\u8868\u73fe\u3059\u308b\u306e\u3067\u3001\u305d\u306e\u4e2d\u306b\/\u304c\u767b\u5834\u3059\u308b\u3068\u305d\u3053\u304c\u6b63\u898f\u8868\u73fe\u306e\u7d42\u4e86\u4f4d\u7f6e\u3060\u3068\u307f\u306a\u3055\u308c\u3066\u3057\u307e\u3046<br \/>\n  # \u6b63\u898f\u8868\u73fe\u306e\u7d42\u308f\u308a\u3092\u610f\u5473\u3057\u306a\u3088\u3046\u306b<\/span>\u3092<\/span>\u3068\u30d0\u30c3\u30af\u30b9\u30e9\u30c3\u30b7\u30e5\u3067\u30a8\u30b9\u30b1\u30fc\u30d7\u3057\u3066\u3044\u308b<br \/>\n  yen_regex = \/<span class=\"yjFL\">(d+.d+)<\/span>\/<br \/>\n  # \u5186\u30c9\u30eb\u76f8\u5834\u3092\u30bf\u30fc\u30b2\u30c3\u30c8url\u304b\u3089\u629c\u304d\u51fa\u3059\u6b63\u898f\u8868\u73fe<br \/>\n  # yen_regex\u3068\u540c\u69d8\u3002\u30da\u30fc\u30b8\u4e2d\u304b\u3089\u629c\u304d\u51fa\u3057\u305f\u3044\u7279\u5fb4\u7684\u306a\u90e8\u5206\u3092\u63a2\u3057\u3066\u304f\u308b\u3068\u3053\u3046\u306a\u308b<br \/>\n  # \u5168\u89d2\u306e\u4e38\u62ec\u5f27\u306b\u56f2\u307e\u308c\u305f\u306e\u304c\u629c\u304d\u51fa\u3057\u5bfe\u8c61\u3068\u306a\u308b\u6642\u523b<br \/>\n  # \u534a\u89d2\u4e38\u62ec\u5f27\u3067\u304f\u304f\u3063\u3066\u3001\u30d6\u30ed\u30c3\u30af\u69cb\u6587\u306e\u4eee\u5f15\u6570\u306b\u914d\u5217\u3068\u3057\u3066\u6e21\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b<br \/>\n  time_regex = \/&#8221;yjSt&#8221;>&#8230;<strong>\uff08(d+:d+)\uff09<\/strong>\/<br \/>\n  # \u4f8b\u5916\u51e6\u7406\u7528\u69cb\u6587\u958b\u59cb begin \u301c rescue \u301c end<br \/>\n  # http:\/\/www.namaraii.com\/rubytips\/?%CE%E3%B3%B0<br \/>\n  begin<br \/>\n    # \u6307\u5b9a\u306eurl\u304b\u3089\u30da\u30fc\u30b8\u3092\u53d6\u5f97\u3057\u3001\u5909\u6570buf\u306b\u683c\u7d0d<br \/>\n    buf = open(url).read<br \/>\n    # \u5909\u6570buf\u3092\u6b63\u898f\u8868\u73fe\u3092\u683c\u7d0d\u3057\u305fyen_regex\u3067\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u3044\u304f<br \/>\n    # http:\/\/www.ruby-lang.org\/ja\/man\/html\/String.html#scan<br \/>\n    # \u53d6\u5f97\u3057\u305f\u30da\u30fc\u30b8\u304c\u3044\u3064\u3082\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u306a\u3063\u3066\u3044\u308c\u3070\u3001\u30d6\u30ed\u30c3\u30af\u69cb\u6587\u306e\u4eee\u5f15\u6570m\u306b<br \/>\n    # \u5186\u30c9\u30eb\u76f8\u5834\u304c\u914d\u5217\u3068\u3057\u3066\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u306a\u306e\u3067\u3001\u305d\u306e\u6700\u521d\u306e\u8981\u7d20\u3092\u3001<br \/>\n    # \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u9069\u7528\u3059\u308bsprintf\u95a2\u6570\u3067\u300cxx.xx\u5186\u300d\u3068\u3044\u3063\u305f<br \/>\n    # \u5c0f\u6570\u70b9\u7b2c\u4e8c\u6841\u307e\u3067\u306e\u5f62\u306b\u6574\u5f62\u3057\u3066\u5909\u6570yen\u306b\u683c\u7d0d<br \/>\n    # yen_regex\u304c\u4e00\u81f4(\u30de\u30c3\u30c1)\u3057\u306a\u3044\u5834\u5408\u306f\u3001yen\u306f\u7a7a\u767d\u6587\u5b57\u5217\u3068\u306a\u308b<br \/>\n    buf.scan(yen_regex) do |m|<br \/>\n      yen = sprintf(&#8220;%.02f\u5186&#8221;, m[0])<br \/>\n    end<br \/>\n    # \u5909\u6570buf\u3092\u3001\u518d\u5ea6\u6b63\u898f\u8868\u73fe\u3092\u683c\u7d0d\u3057\u305ftime_regex\u3067\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u3044\u304f<br \/>\n    # http:\/\/www.ruby-lang.org\/ja\/man\/html\/String.html#scan<br \/>\n    # \u53d6\u5f97\u3057\u305f\u30da\u30fc\u30b8\u304c\u3044\u3064\u3082\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u306a\u3063\u3066\u3044\u308c\u3070\u3001\u30d6\u30ed\u30c3\u30af\u69cb\u6587\u306e\u4eee\u5f15\u6570m\u306b<br \/>\n    # \u5f53\u8a72\u5186\u30c9\u30eb\u76f8\u5834\u306e\u6642\u523b\u304c\u914d\u5217\u3068\u3057\u3066\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u306a\u306e\u3067\u3001\u305d\u306e\u6700\u521d\u306e\u8981\u7d20\u3092\u3001<br \/>\n    # \u305d\u306e\u307e\u307e\u5909\u6570time\u306b\u683c\u7d0d<br \/>\n    # time_regex\u304c\u4e00\u81f4(\u30de\u30c3\u30c1)\u3057\u306a\u3044\u5834\u5408\u306f\u3001time\u306f\u7a7a\u767d\u6587\u5b57\u5217\u3068\u306a\u308b<br \/>\n    buf.scan(time_regex) do |m|<br \/>\n      time = m[0]<br \/>\n    end<br \/>\n    # yen\u304c\u4f55\u3089\u304b\u306e\u7406\u7531\u3067nil\u3060\u3063\u305f\u5834\u5408\u306f\u3001\u30c0\u30df\u30fc\u6587\u5b57\u300cN\/A\u300d\u3068\u5dee\u3057\u63db\u3048\u308b(\u4e09\u9805\u6f14\u7b97\u5b50)<br \/>\n    yen = yen ? yen : &#8220;N\/A&#8221;<br \/>\n    # time\u304c\u4f55\u3089\u304b\u306e\u7406\u7531\u3067nil\u3060\u3063\u305f\u5834\u5408\u306f\u3001\u30c0\u30df\u30fc\u6587\u5b57\u300cN\/A\u300d\u3068\u5dee\u3057\u63db\u3048\u308b(\u4e09\u9805\u6f14\u7b97\u5b50)<br \/>\n    time = time ? time : &#8220;N\/A&#8221;<br \/>\n    # \u53d6\u5f97\u3057\u305fyen\u3068time\u3092\u300cxx.xx\u5186(00:00)\u300d\u3068\u3044\u3063\u305f\u5f62\u306b\u6574\u5f62\u3057\u3066\u8fd4\u308a\u5024\u3068\u3057\u3066\u6e21\u3059<br \/>\n    return &#8220;#{yen}(#{time})&#8221;<br \/>\n  rescue<br \/>\n    # \u30a8\u30e9\u30fc\u304c\u751f\u3058\u305f\u3068\u304d\u306f\u3001\u4f8b\u5916\u3092\u767a\u751f\u3055\u305b\u3066\u7d42\u4e86<br \/>\n    # \u30a8\u30e9\u30fc\u306f\u3001\u30da\u30fc\u30b8\u306e\u53d6\u5f97\u306a\u3069\u3067\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u306f\u305a<br \/>\n    # \u305d\u306e\u5834\u5408\u306b\u3001sbcc.txt\u304c\u7a7a\u306e\u6587\u5b57\u5217\u3067\u4e0a\u66f8\u304d\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u308b<br \/>\n    raise &#8220;error occurred at usdjpy&#8221;<br \/>\n  end<br \/>\nend<\/p>\n<p># Yahoo!\u30d5\u30a1\u30a4\u30ca\u30f3\u30b9\u306e\u65e5\u7d4c\u5e73\u5747\u682a\u4fa1\u3092\u629c\u3044\u3066\u304f\u308b\u30e1\u30bd\u30c3\u30c9<br \/>\ndef nikkeistockaverage()<br \/>\n  # \u5909\u6570nsa\u3092\u7a7a\u6587\u5b57\u5217\u3067\u521d\u671f\u5316<br \/>\n  nsa = &#8220;&#8221;<br \/>\n  # \u5909\u6570time\u3092\u7a7a\u6587\u5b57\u5217\u3067\u521d\u671f\u5316<br \/>\n  time = &#8220;&#8221;<br \/>\n  # \u5909\u6570daybefore\u3092\u7a7a\u6587\u5b57\u5217\u3067\u521d\u671f\u5316<br \/>\n  daybefore = &#8220;&#8221;<br \/>\n  # \u30bf\u30fc\u30b2\u30c3\u30c8\u3068\u306a\u308burl\u3092\u5909\u6570url\u306b\u683c\u7d0d<br \/>\n  url = &#8216;http:\/\/stocks.finance.yahoo.co.jp\/stocks\/detail\/?code=998407.O&#8217;<br \/>\n  # \u65e5\u7d4c\u5e73\u5747\u682a\u4fa1\u3092\u30bf\u30fc\u30b2\u30c3\u30c8url\u304b\u3089\u629c\u304d\u51fa\u3059\u6b63\u898f\u8868\u73fe<br \/>\n  # <span class=\"yjFL\">\u3068<\/span>\u306b\u56f2\u307e\u308c\u305f\u300c\u6570\u5b57,\u6570\u5b57.\u6570\u5b57\u300d\u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u53d6\u308a\u51fa\u3059<br \/>\n  # \u300cd\u300d\u30670\u304b\u30899\u306e\u6570\u5b57\u3092\u610f\u5473\u3059\u308b\u3002\u300c.\u300d\u3067\u4efb\u610f\u306e1\u5b57\u3068\u3044\u3046\u7279\u5225\u306a\u610f\u5473\u306b\u306a\u308b\u306e\u3067<br \/>\n  # \u305d\u306e\u52b9\u679c\u3092\u6253\u3061\u6d88\u3059\u305f\u3081\u306b\u300c.\u300d\u3068\u30d0\u30c3\u30af\u30b9\u30e9\u30c3\u30b7\u30e5\u3067\u30a8\u30b9\u30b1\u30fc\u30d7\u3057\u3066\u3044\u308b<br \/>\n  # \u534a\u89d2\u4e38\u62ec\u5f27\u306b\u56f2\u307e\u308c\u305f\u90e8\u5206\u304c\u30d6\u30ed\u30c3\u30af\u69cb\u6587\u306e\u4eee\u5f15\u6570\u306b\u914d\u5217\u3068\u3057\u3066\u6e21\u3063\u3066\u304f\u308b(\u5f8c\u65b9\u53c2\u7167)<br \/>\n  # \u6b63\u898f\u8868\u73fe\u306f\/\/\u3067\u56f2\u3093\u3067\u8868\u73fe\u3059\u308b\u306e\u3067\u3001\u305d\u306e\u4e2d\u306b\/\u304c\u767b\u5834\u3059\u308b\u3068\u305d\u3053\u304c\u6b63\u898f\u8868\u73fe\u306e\u7d42\u4e86\u4f4d\u7f6e\u3060\u3068\u307f\u306a\u3055\u308c\u3066\u3057\u307e\u3046<br \/>\n  # \u6b63\u898f\u8868\u73fe\u306e\u7d42\u308f\u308a\u3092\u610f\u5473\u3057\u306a\u3088\u3046\u306b<\/span>\u3092<\/span>\u3068\u30d0\u30c3\u30af\u30b9\u30e9\u30c3\u30b7\u30e5\u3067\u30a8\u30b9\u30b1\u30fc\u30d7\u3057\u3066\u3044\u308b<br \/>\n  nsa_regex = \/<span class=\"yjFL\">(d+,d+.d+)<\/span>\/<br \/>\n  # \u6642\u523b\u3092\u30bf\u30fc\u30b2\u30c3\u30c8url\u304b\u3089\u629c\u304d\u51fa\u3059\u6b63\u898f\u8868\u73fe<br \/>\n  # nsa_regex\u3068\u540c\u69d8\u3002\u30da\u30fc\u30b8\u4e2d\u304b\u3089\u629c\u304d\u51fa\u3057\u305f\u3044\u7279\u5fb4\u7684\u306a\u90e8\u5206\u3092\u63a2\u3057\u3066\u304f\u308b\u3068\u3053\u3046\u306a\u308b<br \/>\n  # \u5168\u89d2\u306e\u4e38\u62ec\u5f27\u306b\u56f2\u307e\u308c\u305f\u306e\u304c\u629c\u304d\u51fa\u3057\u5bfe\u8c61\u3068\u306a\u308b\u6642\u523b<br \/>\n  # \u534a\u89d2\u4e38\u62ec\u5f27\u3067\u304f\u304f\u3063\u3066\u3001\u30d6\u30ed\u30c3\u30af\u69cb\u6587\u306e\u4eee\u5f15\u6570\u306b\u914d\u5217\u3068\u3057\u3066\u6e21\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b<br \/>\n  time_regex = \/&#8221;yjSt&#8221;>&#8230;<strong>\uff08(d+:d+)\uff09<\/strong>\/<br \/>\n  # \u524d\u65e5\u6bd4\u3092\u30bf\u30fc\u30b2\u30c3\u30c8url\u304b\u3089\u629c\u304d\u51fa\u3059\u6b63\u898f\u8868\u73fe<br \/>\n  daybefore_regex = \/<\/p>\n<p class=\"yjSt\"><strong class=\"w+\">(.?d+.d+)<\/strong>\uff08<strong class=\"w+\">(.?d+.d+)<\/strong>%\uff09<\/p>\n<\/td>\n<p>\/<br \/>\n  # \u4f8b\u5916\u51e6\u7406\u7528\u69cb\u6587\u958b\u59cb begin \u301c rescue \u301c end<br \/>\n  # http:\/\/www.namaraii.com\/rubytips\/?%CE%E3%B3%B0<br \/>\n  begin<br \/>\n    # \u6307\u5b9a\u306eurl\u304b\u3089\u30da\u30fc\u30b8\u3092\u53d6\u5f97\u3057\u3001\u5909\u6570buf\u306b\u683c\u7d0d<br \/>\n    buf = open(url).read<br \/>\n    # \u5909\u6570buf\u3092\u6b63\u898f\u8868\u73fe\u3092\u683c\u7d0d\u3057\u305fnsa_regex\u3067\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u3044\u304f<br \/>\n    # http:\/\/www.ruby-lang.org\/ja\/man\/html\/String.html#scan<br \/>\n    # \u53d6\u5f97\u3057\u305f\u30da\u30fc\u30b8\u304c\u3044\u3064\u3082\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u306a\u3063\u3066\u3044\u308c\u3070\u3001\u30d6\u30ed\u30c3\u30af\u69cb\u6587\u306e\u4eee\u5f15\u6570m\u306b<br \/>\n    # \u65e5\u7d4c\u5e73\u5747\u682a\u4fa1\u304c\u914d\u5217\u3068\u3057\u3066\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u306a\u306e\u3067\u3001\u305d\u306e\u6700\u521d\u306e\u8981\u7d20\u3092\u3001<br \/>\n    # \u300c\u5186\u300d\u3068\u7d50\u5408\u3057\u3066\u5909\u6570nsa\u306b\u683c\u7d0d<br \/>\n    # nsa_regex\u304c\u4e00\u81f4(\u30de\u30c3\u30c1)\u3057\u306a\u3044\u5834\u5408\u306f\u3001nsa\u306f\u7a7a\u767d\u6587\u5b57\u5217\u3068\u306a\u308b<br \/>\n    buf.scan(nsa_regex) do |m|<br \/>\n      nsa = m[0] + &#8220;\u5186&#8221;<br \/>\n    end<br \/>\n    # \u5909\u6570buf\u3092\u3001\u518d\u5ea6\u6b63\u898f\u8868\u73fe\u3092\u683c\u7d0d\u3057\u305ftime_regex\u3067\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u3044\u304f<br \/>\n    # http:\/\/www.ruby-lang.org\/ja\/man\/html\/String.html#scan<br \/>\n    # \u53d6\u5f97\u3057\u305f\u30da\u30fc\u30b8\u304c\u3044\u3064\u3082\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u306a\u3063\u3066\u3044\u308c\u3070\u3001\u30d6\u30ed\u30c3\u30af\u69cb\u6587\u306e\u4eee\u5f15\u6570m\u306b<br \/>\n    # \u6642\u523b\u304c\u914d\u5217\u3068\u3057\u3066\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u306a\u306e\u3067\u3001\u305d\u306e\u6700\u521d\u306e\u8981\u7d20\u3092\u3001<br \/>\n    # \u305d\u306e\u307e\u307e\u5909\u6570time\u306b\u683c\u7d0d<br \/>\n    # time_regex\u304c\u4e00\u81f4(\u30de\u30c3\u30c1)\u3057\u306a\u3044\u5834\u5408\u306f\u3001time\u306f\u7a7a\u767d\u6587\u5b57\u5217\u3068\u306a\u308b<br \/>\n    buf.scan(time_regex) do |m|<br \/>\n      time = m[0]<br \/>\n    end<br \/>\n    # \u5909\u6570buf\u3092\u3001\u518d\u5ea6\u6b63\u898f\u8868\u73fe\u3092\u683c\u7d0d\u3057\u305fdaybefore_regex\u3067\u30b9\u30ad\u30e3\u30f3\u3057\u3066\u3044\u304f<br \/>\n    # http:\/\/www.ruby-lang.org\/ja\/man\/html\/String.html#scan<br \/>\n    # \u53d6\u5f97\u3057\u305f\u30da\u30fc\u30b8\u304c\u3044\u3064\u3082\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u306a\u3063\u3066\u3044\u308c\u3070\u3001\u30d6\u30ed\u30c3\u30af\u69cb\u6587\u306e\u4eee\u5f15\u6570m\u306b<br \/>\n    # \u524d\u65e5\u6bd4\u306e\u6570\u5b57\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u306f\u305a\u306a\u306e\u3067\u3001\u305d\u306e\u6700\u521d\u3068\u4e8c\u3064\u76ee\u306e\u8981\u7d20\u3092\u52a0\u5de5\u3057\u306a\u304c\u3089\u3001<br \/>\n    # \u305d\u306e\u307e\u307e\u5909\u6570daybefore\u306b\u683c\u7d0d<br \/>\n    # daybefore_regex\u304c\u4e00\u81f4(\u30de\u30c3\u30c1)\u3057\u306a\u3044\u5834\u5408\u306f\u3001time\u306f\u7a7a\u767d\u6587\u5b57\u5217\u3068\u306a\u308b<br \/>\n    buf.scan(daybefore_regex) do |m|<br \/>\n      daybefore = &#8220;#{m[0]}(#{m[1]}%)&#8221;<br \/>\n    end<br \/>\n    # daybefore\u304c\u4f55\u3089\u304b\u306e\u7406\u7531\u3067nil\u3060\u3063\u305f\u5834\u5408\u306f\u3001\u30c0\u30df\u30fc\u6587\u5b57\u300cN\/A\u300d\u3068\u5dee\u3057\u63db\u3048\u308b(\u4e09\u9805\u6f14\u7b97\u5b50)<br \/>\n    daybefore = daybefore ? daybefore : &#8220;N\/A&#8221;<br \/>\n    # nsa\u304c\u4f55\u3089\u304b\u306e\u7406\u7531\u3067nil\u3060\u3063\u305f\u5834\u5408\u306f\u3001\u30c0\u30df\u30fc\u6587\u5b57\u300cN\/A\u300d\u3068\u5dee\u3057\u63db\u3048\u308b(\u4e09\u9805\u6f14\u7b97\u5b50)<br \/>\n    nsa = nsa ? nsa : &#8220;N\/A&#8221;<br \/>\n    # time\u304c\u4f55\u3089\u304b\u306e\u7406\u7531\u3067nil\u3060\u3063\u305f\u5834\u5408\u306f\u3001\u30c0\u30df\u30fc\u6587\u5b57\u300cN\/A\u300d\u3068\u5dee\u3057\u63db\u3048\u308b(\u4e09\u9805\u6f14\u7b97\u5b50)<br \/>\n    time = time ? time : &#8220;N\/A&#8221;<br \/>\n    # \u53d6\u5f97\u3057\u305fnsa\u3068time\u3092\u300cxx,xx.xx\u5186(00:00)\u300d\u3068\u3044\u3063\u305f\u5f62\u306b\u6574\u5f62\u3057\u3066\u8fd4\u308a\u5024\u3068\u3057\u3066\u6e21\u3059<br \/>\n    return &#8220;#{nsa}(#{time})#{daybefore}&#8221;<br \/>\n  rescue<br \/>\n    # \u30a8\u30e9\u30fc\u304c\u751f\u3058\u305f\u3068\u304d\u306f\u3001\u4f8b\u5916\u3092\u767a\u751f\u3055\u305b\u3066\u7d42\u4e86<br \/>\n    # \u30a8\u30e9\u30fc\u306f\u3001\u30da\u30fc\u30b8\u306e\u53d6\u5f97\u306a\u3069\u3067\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u306f\u305a<br \/>\n    # \u305d\u306e\u5834\u5408\u306b\u3001sbcc.txt\u304c\u7a7a\u306e\u6587\u5b57\u5217\u3067\u4e0a\u66f8\u304d\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u308b<br \/>\n    raise &#8220;error occurred at nikkeistockaverage&#8221;<br \/>\n  end<br \/>\nend<\/p>\n<p># \u6e21\u3055\u308c\u305f\u6587\u5b57\u5217\u3092sbcc.txt\u306b\u4e0a\u66f8\u304d\u3067\u66f8\u304d\u8fbc\u3080\u30e1\u30bd\u30c3\u30c9<br \/>\ndef save(str)<br \/>\n  fh = open(&#8220;\/var\/mobile\/sbcc.txt&#8221;, &#8220;w&#8221;)<br \/>\n  fh.puts str<br \/>\n  fh.close<br \/>\nend<\/p>\n<p># \u3053\u3053\u307e\u3067\u30e1\u30bd\u30c3\u30c9\u5b9a\u7fa9<br \/>\n# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n# \u3053\u3053\u304b\u3089\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u5b9f\u884c\u3055\u308c\u305f\u3068\u304d\u306b\u5b9f\u884c\u3055\u308c\u308b\u5185\u5bb9<\/p>\n<p># \/usr\/bin\/sbcc_dummyconnect\u3092\u5b9f\u884c<br \/>\n# 3G\u304c\u30aa\u30d5\u30e9\u30a4\u30f3\u3060\u3063\u305f\u5834\u5408\u306b\u30aa\u30f3\u30e9\u30a4\u30f3\u306b\u3059\u308b<br \/>\n# Wi-Fi\u304c\u30aa\u30f3\u30e9\u30a4\u30f3\u3060\u3063\u305f\u5834\u5408\u306f\u7279\u306b\u52b9\u679c\u306f\u7121\u3057<br \/>\nsystem(&#8216;\/usr\/bin\/sbcc_dummyconnect&#8217;)<\/p>\n<p># \u4f8b\u5916\u51e6\u7406\u7528\u69cb\u6587\u958b\u59cb begin \u301c rescue \u301c end<br \/>\n# http:\/\/www.namaraii.com\/rubytips\/?%CE%E3%B3%B0<br \/>\nbegin<br \/>\n  # topbuzz\u30e1\u30bd\u30c3\u30c9\u3001usdjpy\u30e1\u30bd\u30c3\u30c9\u3001nikkeistockaverage\u3092\u5b9f\u884c\u3057\u3001\u53d6\u5f97\u3057\u305f\u6587\u5b57\u5217\u3092\u7a7a\u767d\u3092\u631f\u3093\u3067\u7d50\u5408<br \/>\n  # \u5909\u6570output\u306b\u683c\u7d0d<br \/>\n  output = topbuzz(3, 10) + &#8221; &#8221; + usdjpy + &#8221; &#8221; + nikkeistockaverage<br \/>\n  # puts(output)<br \/>\n  # save\u30e1\u30bd\u30c3\u30c9\u3067\u5909\u6570output\u306e\u4e2d\u8eab\u3092sbcc.txt\u306b\u4fdd\u5b58<br \/>\n  save(output)<br \/>\nrescue<br \/>\n  # \u4f8b\u5916\u304c\u51fa\u305f\u3068\u304d\u306f\u4f55\u3082\u3057\u306a\u3044<br \/>\nend<br \/>\n[\/cc]<\/p>\n<p> topbuzz(numberofbuzz, length)\u304cbuzztter\u304b\u3089Top Buzz Word\u3092\u629c\u3044\u3066\u304f\u308b\u30e1\u30bd\u30c3\u30c9\u3001usdjpy\u304cYahoo!\u30d5\u30a1\u30a4\u30ca\u30f3\u30b9\u304b\u3089\u30c9\u30eb\u5186\u76f8\u5834\u3092\u629c\u3044\u3066\u304f\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002topbuzz\u306f\u5f15\u6570\u3092\u4e8c\u3064\u53d6\u308a\u307e\u3059\u3002\u6700\u521d\u306e\u5f15\u6570\u306fBuzz Word\u3092\u3044\u304f\u3064\u629c\u3044\u3066\u304f\u308b\u304b\u30022\u756a\u76ee\u306e\u5f15\u6570\u306f\u3001Buzz Word\u4e00\u3064\u5f53\u305f\u308a\u306e\u9577\u3055\u5236\u9650\u3067\u3059\u3002\u300ctopbuzz(3, 10) \u300d\u3060\u3068Buzz Word\u3092\u4e09\u3064\u629c\u3044\u3066\u304d\u3066\u3001\u4e00\u3064\u5f53\u305f\u308a10\u6587\u5b57\u307e\u3067\u3068\u3044\u3046\u5236\u9650\u3092\u4ed8\u3051\u3066\u3044\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30ab\u30b9\u30bf\u30de\u30a4\u30ba<\/h2>\n<p>\u3064\u307e\u308b\u3068\u3053\u308d\u30011\u5206\u306b1\u56de\u306e\u66f4\u65b0\u3067\u3088\u3051\u308c\u3070\u3001SBCCScript\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u3001\/usr\/bin\/sbcc.rb\u306e\u4e2d\u8eab\u3092\u3044\u3058\u304f\u308c\u3070\u3044\u3044\u308f\u3051\u3067\u3059\u3002<br \/>\n\u597d\u304d\u306a\u3082\u306e\u3092StatusBarCustomClock\u306b\u8868\u793a\u3057\u3066\u697d\u3057\u3093\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u79c1\u3001moyashi\u306e\u73fe\u5728\u307e\u3067\u306e\u6d3b\u52d5\u3092\u8a55\u4fa1\u3057\u3066\u304f\u3060\u3055\u308b\u65b9\u306f\u3001\u305c\u3072\u652f\u63f4\u3092\u304a\u9858\u3044\u81f4\u3057\u307e\u3059\u3002<\/p>\n<p><script type=\"text\/javascript\">\/\/ <![CDATA[\n google_ad_client = \"pub-4621692780515356\"; \/* 468x60, \u4f5c\u6210\u6e08\u307f 10\/07\/12 *\/ google_ad_slot = \"6692602745\"; google_ad_width = 468; google_ad_height = 60;\n\/\/ ]]><\/script><br \/>\n<script src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"; type=\"text\/javascript\">\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u65e5\u30a2\u30c3\u30d7\u3057\u305fStatusBarCustomClock\u306f\u3001\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab &#8230; <\/p>\n","protected":false},"author":2,"featured_media":13800,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[8,10,7],"tags":[],"jetpack_featured_media_url":"http:\/\/hitoriblog.com\/wp-content\/uploads\/2012\/11\/sbccscript01-225x300.png","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6Z3gA-c0","_links":{"self":[{"href":"http:\/\/hitoriblog.com\/index.php?rest_route=\/wp\/v2\/posts\/744"}],"collection":[{"href":"http:\/\/hitoriblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hitoriblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hitoriblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/hitoriblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=744"}],"version-history":[{"count":0,"href":"http:\/\/hitoriblog.com\/index.php?rest_route=\/wp\/v2\/posts\/744\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/hitoriblog.com\/index.php?rest_route=\/wp\/v2\/media\/13800"}],"wp:attachment":[{"href":"http:\/\/hitoriblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hitoriblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=744"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hitoriblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}