- Tatsuhiro Ujihisa
- http://ujihisa.blogspot.com/
- 非同期とは?
- スレッド、プロセス
- プロセス生成
#!/bin/sh | |
PREFIX="from now" | |
MESSAGE="[${PREFIX}] `date +\"%Y/%m/%d %T\"`" | |
get_amend() { | |
if [ -z `git log --pretty=oneline -1 | cut -d " " -f 2- | grep "^\[${PREFIX}]"` ] | |
then | |
return 1 | |
fi |
# INFO extracted from : http://stackoverflow.com/questions/6331065/matching-balanced-parenthesis-in-ruby-using-recursive-regular-expressions-like-pe | |
require 'wikipedia' | |
wikipage = Wikipedia.find(title) | |
# This regular expression is not valid for infoboxes with '}' (i.e: http://en.wikipedia.org/wiki/The_Royal_Anthem_of_Jordan) | |
no_infoboxes = wikipage.content.gsub(/\{\{[^\}]*\}\}/, "") | |
# This regular expression makes use of recursive regular expressions so now handles recursive {{}} structures | |
no_infoboxes = wikipage.content.gsub(%r{(?<re>\{\{(?:(?> [^\{\}]+ )|\g<re>)*\}\})}x, "") |
#!/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 |
原文: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 アーキテクチャを実現した。
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) { |
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")) | |
} |
#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に感謝したいと思う