- Web系
- Scalatra Sinatraのようなフレームワーク https://github.com/scalatra/scalatra
- Scalate テンプレートエンジン。言語を選べる http://scalate.fusesource.org/
- Play! framework 2.0 プロダクト自体がScalaで実装されている。 http://www.playframework.org/2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) 2012 by teramako <teramako.at.gmail.com> | |
| // | |
| // This work is licensed for reuse under an MIT license. Details are | |
| // given in the License.txt file included with this file. | |
| const EXPORTED_SYMBOLS = [ "Array" ]; | |
| const bind = Function.prototype.bind, | |
| uncurryThis = bind.bind(bind.call), | |
| ArrayDescriptors = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/php | |
| <?php | |
| $c = array(); | |
| for($i = 1; $i <= 30; $i += 1){ | |
| if($i !== 1) sleep(2); | |
| $tmp = json_decode(file_get_contents("http://search.twitter.com/search.json?q=%E3%82%82%E3%82%82%E3%82%93%E3%81%8C&rpp=100&result_type=recent&page={$i}")); | |
| $c = (isset($tmp->results) && is_array($tmp->results)) ? array_merge($c, $tmp->results) : $c; | |
| echo "{$i}: Collected " . count($c) . " statuses.\n"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Enable route to __noSuchMethod__ when unknown method calling. | |
| * | |
| * @param {Object} obj Target object. | |
| * @return {Object} | |
| */ | |
| function enableMethodMissing(obj) { | |
| var functionHandler = createBaseHandler({}); | |
| functionHandler.get = function(receiver, name) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 関数名を短縮化 | |
| Pot.globalize(); | |
| begin(function() { | |
| debug('BEGIN example'); | |
| }).then(function() { | |
| debug('BEGIN request'); | |
| // JSON を取得 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var U_NYA_ = { | |
| fields: [ | |
| "(\u300d\u30fb\u03c9\u30fb)\u300d\u3046\u30fc\uff01\u3000", | |
| "(\uff0f\u30fb\u03c9\u30fb)\uff0f\u306b\u3083\u30fc\uff01", | |
| "(\u300d\u30fb\u03c9\u30fb)\u300d\u3046\u30fc\uff01\u3000", | |
| "(\uff0f\u30fb\u03c9\u30fb)\uff0f\u306b\u3083\u30fc\uff01", | |
| "(\u300d\u30fb\u03c9\u30fb)\u300d\u3046\u30fc\uff01\u3000", | |
| "(\uff0f\u30fb\u03c9\u30fb)\uff0f\u306b\u3083\u30fc\uff01", | |
| "Let's\uff3c(\u30fb\u03c9\u30fb)\uff0f\u306b\u3083\u30fc\uff01" | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
原題: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.