これは超訳です。
CSSLintは「なんでこんなルールなんだ…」とイラっとすることが多いですけど、それぞれにそれなりに理由があります。まぁ勿論無視するべきなルールとかもあります。例えば見出し要素の再定義禁止とかはHTML5に対するCSSなら無理な話です。そんなわけでどんな理由なのかを簡単に訳しました。無視するかどうかは自分で決めましょう!
この訳はCSSLintと同じライセンスで提供されます。
| <html> | |
| <head><title>Canvas Halftoning</title></head> | |
| <body> | |
| <canvas id="c"></canvas> | |
| <img id="s" src="./pomeranian.jpg" /> | |
| </body> | |
| <script type="text/javascript"> | |
| var interval = 8; | |
| var angles = { y: 108, m: 162, c: 90, k: 45 }; |
| #!/bin/sh | |
| # | |
| # redis - this script starts and stops the redis-server daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Redis is a persistent key-value database | |
| # processname: redis-server | |
| # config: /etc/redis/redis.conf | |
| # config: /etc/sysconfig/redis | |
| # pidfile: /var/run/redis.pid |
| import bisect | |
| import itertools | |
| import operator | |
| class _BNode(object): | |
| __slots__ = ["tree", "contents", "children"] | |
| def __init__(self, tree, contents=None, children=None): | |
| self.tree = tree |
| require 'rake' | |
| require 'css_splitter' | |
| desc 'split css files' | |
| namespace :css do | |
| task :split do | |
| infile = ENV['infile'] || raise("missing infile") | |
| outdir = ENV['outdir'] || File.dirname(infile) | |
| max_selectors = ENV['max_selectors'] || 4095 |
| # configuration for osx clipboard support | |
| set-option -g default-command "reattach-to-user-namespace -l sh" |
| - (void)setSelected:(BOOL)selected animated:(BOOL)animated { | |
| selected_ = selected; | |
| if (animated) { | |
| CATransition *transition = [CATransition animation]; | |
| transition.duration = 0.25f; | |
| transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
| transition.type = kCATransitionFade; | |
| [self.selectionImageView.layer addAnimation:transition forKey:nil]; | |
| } |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
原文:Scaling Isomorphic Javascript Code (This is just for study, please contact me at tily05 atmark gmail.com if any problem.)
考えてみれば Model-View-Controller とか MVC ってよく聞くよね。実際どんなものか知ってる? 抽象的に言うなら「オブジェクト情報の保持されるグラフィック・システム (つまり、ラスターではないグラフィック。ゲームとか) 上に構築された、表示系を中心としたアプリケーションにおいて、主要な機能どうしの関わりをうまく分離すること」とでも言おうか。もう少し深く考えを押し進めてみれば、これは当然、他のさまざまなアプリケーションにもあてはまる言葉 (bucket term ?) だ。
過去に多くの開発コミュニティが MVC による解決案を提供し、それによってよくあるユースケースにうまく対処し、地位を築くことができた。例をあげるなら、Ruby や Python コミュニティは Rails や Django を作り、MVC アーキテクチャを実現した。
| var swipeFunc = { | |
| touches : { | |
| "touchstart": {"x":-1, "y":-1}, | |
| "touchmove" : {"x":-1, "y":-1}, | |
| "touchend" : false, | |
| "direction" : "undetermined" | |
| }, | |
| touchHandler: function(event) { | |
| var touch; | |
| if (typeof event !== 'undefined'){ |