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
| {% assign hasSimilar = '' %} | |
| {% for post in site.related_posts %} | |
| {% assign postHasSimilar = false %} | |
| {% for tag in post.tags %} | |
| {% for thisTag in page.tags %} | |
| {% if postHasSimilar == false and hasSimilar.size < 6 and post != page and tag == thisTag %} | |
| {% if hasSimilar.size == 0 %} | |
| <h4>Similar Posts</h4> | |
| <ul> | |
| {% endif %} |
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
| class AppDelegate | |
| TEST_COLOR = '#ffffff'.uicolor # <= This causes NoMethod Error | |
| def application(application, didFinishLaunchingWithOptions:launchOptions) | |
| rootViewController = UIViewController.alloc.init | |
| rootViewController.title = 'test_sugar_string' | |
| rootViewController.view.backgroundColor = '#888888'.uicolor # <= This works fine. | |
| navigationController = UINavigationController.alloc.initWithRootViewController(rootViewController) |
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
| $ (bundle exec) rake device_name="iPhone 6" |
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
| <?xml version="1.0"?> | |
| <root> | |
| <appdef> | |
| <appname>RUBYMINE</appname> | |
| <equal>com.jetbrains.rubymine</equal> | |
| </appdef> | |
| <appdef> | |
| <appname>PARALLELS</appname> | |
| <equal>com.parallels.desktop.console</equal> | |
| </appdef> |
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
| <?xml version="1.0"?> | |
| <root> | |
| <appdef> | |
| <appname>RUBYMINE</appname> | |
| <equal>com.jetbrains.rubymine</equal> | |
| </appdef> | |
| <appdef> | |
| <appname>PARALLELS</appname> | |
| <equal>com.parallels.desktop.console</equal> | |
| </appdef> |
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
| require 'rspec/core/formatters/base_text_formatter' | |
| require_relative 'handle_pointed_utf_str' | |
| # RSpecがcmd.exeのコンソール画面に出力する赤と緑を明るくするために、オーバーライド。 | |
| class RSpec::Core::Formatters::BaseTextFormatter | |
| protected | |
| def colorize(text, code_or_symbol) | |
| text = Handle_uXXXX.correct_point_coded_str(text) | |
| # "\e[#{color_code_for(code_or_symbol)}m#{text}\e[0m" |
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
| # "\u3042\u3063\u3061"のようなコードポイント文字列に変換されてしまった | |
| # 残念なUTF-8文字列を、ちゃんとしたUTF-8文字列に戻す。 | |
| # 対象とするコードは、"\u00xx"から"\u7Fxx"まで。 | |
| # | |
| # RSpecの出力文字列をきちんと読めるようにするために作成した。 | |
| # ruby -v # => ruby 2.0.0p0 (2013-02-24) [i386-mingw32] | |
| # rspec -v # => 2.13.1 | |
| module Handle_uXXXX | |
| DOUBLE_QUOTED_REGEXP = /"(.+)"/ |
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
| class Book | |
| PROPERTIES = [:title, :author, :year] | |
| PROPERTIES.each do |prop| | |
| attr_accessor "#{prop}".to_sym | |
| end | |
| def initialize(initial_hash={}) | |
| initial_hash.each do |key, value| | |
| self.send("#{key}=", value) if PROPERTIES.member? key.to_sym | |
| end |