全体として太一が感覚的に実践している事を論理的に説明しようと試みている為、
説明の粒度が適切でなかったり一貫性が無いように見える部分があるかもしれない。
普段やっているけども書ききれていない事も多分きっとある。
- コードを嗜む
- コードを学ぶ
- 武器を手に入れる
import Control.Applicative | |
-- fmap : (a -> b) -> f a -> f b | |
-- fmap は関数とファクター値を引数にとって, 関数をファンクター値の中の値に適用 | |
class Functor f where | |
fmap :: (a -> b) -> f a -> f b | |
-- <*> : f (a -> b) -> f a -> f b (f is Fanctor) | |
-- <*> は関数の入っているファンクター値と値の入っているファンクター値を引数にとって, ひとつ目のファンクターの中身の関数をふたつ目のファンクターの中身に適用 |
/*! | |
* backbone.collectioncache.js v0.0.2 | |
* Copyright 2012, Tim Branyen (@tbranyen) | |
* backbone.collectioncache.js may be freely distributed under the MIT license. | |
*/ | |
(function(window) { | |
"use strict"; | |
// Dependencies |
private Handler createExternalServlet(ImmutableMap<String, ServletHolder> servlets, | |
ImmutableMultimap<String, FilterHolder> filters, | |
ImmutableSet<EventListener> listeners) { | |
// set ServletContextHandler.SESSIONS option | |
final ServletContextHandler handler = new ServletContextHandler(ServletContextHandler.SESSIONS); | |
// set a default SessionHandler | |
handler.setSessionHandler(new SessionHandler()); | |
handler.addFilter(ThreadNameFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST)); | |
handler.setBaseResource(Resource.newClassPathResource(".")); |
#NoSQLデータモデリング技法
原文:NoSQL Data Modeling Techniques « Highly Scalable Blog
I translated this article for study. contact matope[dot]ono[gmail] if any problem.
NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。
本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う
import org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext | |
apply plugin: "jetty" | |
def newResourceCollection(File... resources) { | |
shell = new GroovyShell(JettyPluginWebAppContext.class.classLoader) | |
shell.setProperty("resources", resources as String[]) | |
return shell.evaluate(file("resource_collection.groovy")) | |
} |
public class ApplicationModule extends AbstractModule { | |
private final EventBus eventBus = new EventBus("Default EventBus"); | |
@Override | |
protected void configure() { | |
bind(EventBus.class).toInstance(eventBus); | |
bindListener(Matchers.any(), new TypeListener() { | |
public <I> void hear(TypeLiteral<I> typeLiteral, TypeEncounter<I> typeEncounter) { | |
typeEncounter.register(new InjectionListener<I>() { | |
public void afterInjection(I i) { |
原文: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 アーキテクチャを実現した。
#!/usr/bin/env ruby | |
# Processor for Github flavored markdown, inspired by: | |
# https://github.com/alampros/Docter/blob/master/bin/github-flavored-markdown.rb | |
# | |
# Current version of this script can be found here: | |
# https://gist.github.com/1300939 | |
# | |
# Adapted for Redcarpet version 2 by Ralph von der Heyden | |
# http://github.com/ralph | |
# http://twitter.com/ralph |