This file contains 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
import { Controller } from "@hotwired/stimulus" | |
export default class extends Controller { | |
initialize() { | |
this.log('initialize') | |
} | |
connect() { | |
this.log('connect') | |
} |
This file contains 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
module RuboCop | |
module Cop | |
module FooBar | |
class SimpleFormAssociationCollection < Base | |
MSG = 'Specify the `collection` option'.freeze | |
def_node_matcher :has_association_call?, <<~PATTERN | |
(block | |
(send _ :simple_form_for ...) | |
(args (arg _f)) |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<!-- Include Choices CSS --> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/public/assets/styles/choices.min.css" /> | |
<!-- Include Choices JavaScript --> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/public/assets/scripts/choices.min.js"></script> | |
</head> |
This file contains 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 WordFilter | |
def initialize(words) | |
@root = Node.new | |
words.each.with_index do |w, weight| | |
(0..w.size).each do |len| | |
s = "#{w[-len, len]}@#{w}" | |
@root.add_word(weight, s, 0) | |
end | |
end | |
end |
This file contains 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
# @param {Character[][]} board | |
# @param {String[]} words | |
# @return {String[]} | |
def find_words(board, words) | |
root = Node.new | |
words.each do |w| | |
root.add_word(w) | |
end | |
b = Board.new(board) |
This file contains 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 WordDictionary | |
def initialize | |
@root = Node.new | |
end | |
def add_word(word) | |
@root.add_word(word, 0) | |
end | |
def search(word) |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<!-- Include Choices CSS --> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/public/assets/styles/choices.min.css" /> | |
<!-- Include Choices JavaScript --> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/public/assets/scripts/choices.min.js"></script> | |
</head> |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<!-- Include Choices CSS --> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/choices.js/public/assets/styles/choices.min.css"> | |
<!-- Include Choices JavaScript --> | |
<script src="https://cdn.jsdelivr.net/npm/choices.js/public/assets/scripts/choices.min.js"></script> | |
</head> | |
<body> |
This file contains 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
(defun ssass-indent () | |
"Indent the current line." | |
(interactive) | |
(indent-line-to | |
(cond | |
((and (not ssass-indent-blanks) (ssass--whitespace-p 0)) 0) | |
((ssass--whitespace-p -1) 0) | |
((ssass--no-anchor-line-p) 0) | |
((ssass--comma-before-p) (ssass--last-anchor-line-indent-level)) | |
;; ここが増えた。セレクタ行は自動インデントしない |
This file contains 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
default: &default | |
adapter: postgresql | |
encoding: unicode | |
# For details on connection pooling, see Rails configuration guide | |
# http://guides.rubyonrails.org/configuring.html#database-pooling | |
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | |
host: localhost | |
port: 54394 | |
development: |