This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| p [BigDecimal::ROUND_HALF_UP, BigDecimal::ROUND_UP, BigDecimal::ROUND_DOWN] | |
| v = BigDecimal.new("1")/BigDecimal.new("3") | |
| p v.round(9, BigDecimal::ROUND_HALF_UP).to_s | |
| p v.round(9, BigDecimal::ROUND_UP).to_s | |
| p v.round(9, BigDecimal::ROUND_DOWN).to_s | |
| # Apple Watch | |
| [0, 2, 1] | |
| "0.333333333" | |
| "0.333333334" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| foo = Foo.create(name: "name1") | |
| foo.updated_at = Time.now # OK | |
| # foo.setPrimitiveValue Time.now, forKey:"updated_at" # NG | |
| foo.setPrimitiveValue "name a", forKey:"name" # OK | |
| cdq.save #<= Crash iOS7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Thread 7 name: Dispatch queue: com.apple.root.default-qos | |
| Thread 7 Crashed: | |
| 0 mimamori 0x00488998 void std::__1::__tree_balance_after_insert<std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*, std::__1::__tree_node_base<void*>*) + 124 | |
| 1 mimamori 0x00475c32 RoxorCore::method_node_get(objc_method*, bool) + 218 | |
| 2 mimamori 0x0047ac32 RoxorCore::copy_method(objc_class*, objc_method*, objc_class*) + 398 | |
| 3 mimamori 0x0047aa20 rb_vm_copy_methods + 56 | |
| 4 mimamori 0x0039c63a rb_include_module2 + 438 | |
| 5 mimamori 0x0039c6f8 rb_include_module + 16 | |
| 6 mimamori 0x003c15da rb_extend_object + 218 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| luke:MyHostApp ISD$ rake clean:all | |
| Delete ./build | |
| Delete MyWatchApp/build | |
| Delete /Users/ISD/Library/RubyMotion/build | |
| luke:MyHostApp ISD$ rake watch | |
| Build ./build/iPhoneSimulator-8.2-Development | |
| Build MyWatchApp/build/iPhoneSimulator-8.2-Development | |
| Compile ../../.rvm/gems/ruby-2.0.0-p353/gems/ib-0.7.1/lib/ib/outlets.rb | |
| Compile MyWatchApp/app/glance_controller.rb | |
| Compile MyWatchApp/app/interface_controller.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ sudo motion update | |
| Password: | |
| Connecting to the server... | |
| Downloading software update... | |
| ######################################################################## 100.0% | |
| Installing software update... | |
| An error occurred while installing the software update: installer: Package name is RubyMotion | |
| installer: Upgrading at base path / | |
| installer: The upgrade failed (エラーによってインストールできませんでした。ソフトウェアの製造元に問い合わせてください。) |
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 1 column, instead of 8 in line 4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| page | |
| page_no | |
| 3 | |
| page::items | |
| class,x,y,width,height,style,device_name,title | |
| Button,0,0,256,153,Square,M0,ランプ1 | |
| Button,0,153,256,153,Square,M1,ランプ2 | |
| Button,0,306,256,153,Square,M2,ランプ3 | |
| Button,0,459,256,153,Square,M3,ランプ4 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 4 in line 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| project | |
| name,launch_page_no,style,transition | |
| 三菱電機サンプル,0,irPanel,push | |
| page | |
| page_no,class,title,background_color_name,locked,right_page_no | |
| 0,Page,,,0,1 | |
| page::items | |
| class,x,y,width,height,style,title,alternate_title,line_width,corner_radius,padding,shape,lamp_negative,interlock_negative,switch_device_name,switch_mode,switch_negative,title_for_button,device_name,alternate_text_color_name,lamp_color_name,page_no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| class AppDelegate | |
| def application(application, didFinishLaunchingWithOptions:launchOptions) | |
| @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) | |
| controller = MainViewController.alloc.init | |
| @window.rootViewController = UINavigationController.alloc.initWithRootViewController(controller) | |
| @window.makeKeyAndVisible | |
| true | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # | |
| # KVCの問題: | |
| # Rubyのsetterを定義した場合にKVCでRubyのsetterが呼び出されない。 | |
| # | |
| # 結果: | |
| # WARN: bazはnilにしないでください。 | |
| # | |
| # 問題: | |
| # WARN: quuzはnilにしないでください。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 参照: | |
| # http://ameblo.jp/murajun1/entry-11266484358.html | |
| $ brew install freetds | |
| $ gem install tiny_tds | |
| $ gem install activerecord-sqlserver-adapter | |
| $ rails new sqlserver-test | |
| $ cd sqlserver-test | |
| # Windows設定 |