- 街商の布切れ在庫は、別地域の街商とも共有されている可能性が高い。
- 街商と雑貨屋の在庫は別。
- ベッドで時間を進め、朝6時になった時点で街商・雑貨屋とも在庫復活を確認。
- 補充条件が「毎朝6時」か「一定時間経過」かは未確定。
Add an event to document that detects when the Shift, Meta (Command), Alt (Option) and Control keys are pressed and released.
If you want to use it in IE, you need to use PollyFill of Object.assign.
I've only tested it with Chrome. Please comment if it doesn't work in other browsers.
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
| # frozen_string_literal: true | |
| # lib/tasks/data.rb | |
| require 'tasks' | |
| module Tasks | |
| class Data | |
| include ::Tasks |
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
| # frozen_string_literal: true | |
| ## | |
| # {ChainChecker} is used when you want to group multiple `expect`. | |
| # You use it including in `RSpec::Matchers.define` block. | |
| # | |
| # RSpec::Matchers.define :have_foo_bar do |foo, bar| | |
| # include ChainChecker | |
| # 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
| <%# app/view/shared/_form.html.erb %> | |
| <%= form_with model: record, url: url, local: true, class: 'px-4' do |form|%> | |
| <% elements.each do |elem|%> | |
| <div class="form-group form-row mb-5"> | |
| <%= form.label elem.label, for: elem.id, class: 'col-md-3 col-lg-2 col-form-label'%> | |
| <div class="col-md-9 col-lg-10"> | |
| <% if elem.type?(:collection_radio_buttons, :collection_check_boxes) %> | |
| <div> | |
| <%= form.public_send elem.type, elem.name, *elem.args, include_hidden: false do |check|%> | |
| <%= tag.div class: 'form-check form-check-inline', style: elem.style do%> |
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
| # app/models/forms/recruit.rb | |
| class Forms::Recruit | |
| include ActiveModel::Model | |
| attr_accessor :job_types | |
| validates :job_types, presence: true, white_list: {list: JOB_TYPES, allow_blank: true} | |
| 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
| # app/validators/array_length_validator.rb | |
| class ArrayLengthValidator < ActiveModel::Validations::LengthValidator | |
| def initialize(options) | |
| ActiveModel::Validations::LengthValidator::MESSAGES.each do |key, value| | |
| options[value] = I18n.t("errors.messages.array_#{value}") | |
| end | |
| super(options) | |
| end | |
| end |
Both getAttribute and isSelected are asynchronous methods, so my solution has become such complicated. Does anyone know a simpler solution?
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
| const obj = { | |
| foobar: function(){} | |
| } | |
| obj.foobar.toString() == (function(){}).toString() //false | |
| obj.foobar.toString() == (function foobar(){}).toString() //true | |
| obj.foobar.toString() //function foobar() {} |
NewerOlder