build.sbt って、かならず settingの値 じゃないといけないから、
val UnfilteredVersion = "0.5.0"
っていう行を定義できないけれど、こんな風 ↓ に書けば DRY に書けるね!っていう、超細かいどーでもいいテクニック !
Some("net.databinder","0.5.0").map{case (a,v) =>
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
[user] | |
name = Pavan Kumar Sunkara | |
email = [email protected] | |
username = pksunkara | |
[init] | |
defaultBranch = master | |
[core] | |
editor = nvim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
pager = delta |
build.sbt って、かならず settingの値 じゃないといけないから、
val UnfilteredVersion = "0.5.0"
っていう行を定義できないけれど、こんな風 ↓ に書けば DRY に書けるね!っていう、超細かいどーでもいいテクニック !
Some("net.databinder","0.5.0").map{case (a,v) =>
class Filters[T] { | |
//Some boilerplate-busting aliases | |
type FilterResult = Either[Rejection, T] | |
type FilterFunc = (T) => FilterResult | |
//Handy helpers | |
//Rejection can carry as much info as you wish; | |
// Filter name, value in error, an exception, etc. | |
case class Rejection(input: T, msg: String) |
原文: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 アーキテクチャを実現した。
private static boolean shinyNewAPIS = android.os.Build.VERSION_SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Intent startActivityIntent = null; | |
if(!shinyNewAPIS) { | |
startActivityIntent = new Intent(this, legacyActivity.class); |
If you want, I can try and help with pointers as to how to improve the indexing speed you get. Its quite easy to really increase it by using some simple guidelines, for example: | |
- Use create in the index API (assuming you can). | |
- Relax the real time aspect from 1 second to something a bit higher (index.engine.robin.refresh_interval). | |
- Increase the indexing buffer size (indices.memory.index_buffer_size), it defaults to the value 10% which is 10% of the heap. | |
- Increase the number of dirty operations that trigger automatic flush (so the translog won't get really big, even though its FS based) by setting index.translog.flush_threshold (defaults to 5000). | |
- Increase the memory allocated to elasticsearch node. By default its 1g. | |
- Start with a lower replica count (even 0), and then once the bulk loading is done, increate it to the value you want it to be using the update_settings API. This will improve things as possibly less shards will be allocated to each machine. | |
- Increase the number of machines you have so |
原題:Dynamo: Amazon’s Highly Available Key-value Store
原文: Amazon's Dynamo - All Things Distributed (PDF Version)
This article is translated by @ono_matope. Please contact me if any problem.
namespace :deploy do | |
task :restart do | |
stop | |
sleep 1 | |
start | |
end | |
task :start do | |
targets = find_servers_for_task(current_task) |