依存性の注入
Dependency injection is a software design pattern that allows the removal of hard-coded dependencies and makes it possible to change them, whether at run-time or compile-time.
http://p.tl/2tgA <-- japanese wiki page
| // ==UserScript== | |
| // @name MusicBrainz: Paste-A-Date! | |
| // @description This script adds a field after the existing date fields where you can paste a date and it will try to parse it. | |
| // @version 2015-01-13 | |
| // @author nikki, d4rkie | |
| // | |
| // @grant none | |
| // @include *://musicbrainz.org/* | |
| // @include *://beta.musicbrainz.org/* | |
| // @include *://test.musicbrainz.org/* |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <array> | |
| <dict> | |
| <key>Properties</key> | |
| <dict> | |
| <key>DRCDTextCFStringEncodingKey</key> | |
| <integer>66049</integer> | |
| <key>DRCDTextCharacterCodeKey</key> |
| # Require any additional compass plugins here. | |
| if Sass::VERSION =~ /3.1/ | |
| raise "you should upgrade to Sass version 3.2" | |
| end | |
| # Set this to the root of your project when deployed: | |
| http_path = "/" | |
| css_dir = "/css" | |
| sass_dir = "/scss" |
| def unminify(filename) | |
| raise "file not found #{filename}" unless File.exists? filename | |
| text = [] | |
| File.open(filename, 'r:UTF-8') do |f| | |
| f.each_line do |line| | |
| line.strip! | |
| code = line | |
| .split("\t").join(" ") | |
| .gsub(/\s*{\s*/i, " {\n ") |
依存性の注入
Dependency injection is a software design pattern that allows the removal of hard-coded dependencies and makes it possible to change them, whether at run-time or compile-time.
http://p.tl/2tgA <-- japanese wiki page