- buzzwordっぽい
- Backbone.js Angular.js Knockout.js Ember.js とか
- 使ってますか?
- はてなでも一部本番運用/社内向けツールではよくみる
- クライアントサイドMVCフレームワークを利用するとMVCによる設計方針を簡単に使うことができるようになる
This file contains 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
package main | |
import ( | |
"io" | |
"log" | |
"net" | |
"time" | |
) | |
func reader(r io.Reader) { |
This file contains 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
* ホスト名につかえそうなもの | |
- 将軍の名前 | |
- ローマ皇帝の名前 | |
- ガンダムのモビルスーツの名前 | |
- 麻雀の役 | |
- 天使の名前 | |
- ある歌手の曲名 | |
- 二十八宿(http://ja.wikipedia.org/wiki/%E4%BA%8C%E5%8D%81%E5%85%AB%E5%AE%BF) | |
- 二十四節気 (http://ja.wikipedia.org/wiki/%E4%BA%8C%E5%8D%81%E5%9B%9B%E7%AF%80%E6%B0%97) | |
- 東海道の駅名 |
This file contains 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
function* hello() { | |
try { | |
while(true) { | |
yield 9 | |
yield 3 | |
yield 2 | |
} | |
} catch(e) { | |
console.log('oops') | |
} finally { |
First, generate .flow file.
$ yarn run flow gen-flow-files --out-dir . greeting.js
Genereted file is almost the same as greeting.js.flow
.
Next, run flow and get an error like below.
This file contains 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
<html> | |
<!-- | |
"HTML 構文解析器が HTML 文書の末尾まで来たタイミングより後で <script src> で | |
指定されたスクリプト経由で実行される document.write は黙って無視される" by wakabatan | |
see also http://www.whatwg.org/specs/web-apps/current-work/#ignore-destructive-writes-counter | |
$ plackup -p 3005 -e 'use Plack::App::Directory; Plack::App::Directory->new({root=>"."})->to_app' | |
のようにしておためしください | |
--> | |
<body> |
This file contains 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
use strict; | |
use warnings; | |
package Count; | |
sub new { | |
my $class = shift; | |
my $start = shift || 0; | |
bless { count => $start }, $class; |
This file contains 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
require 'fiber' | |
f1 = nil | |
f2 = nil | |
f1 = Fiber.new do | |
puts 'f1-0' | |
f2.resume | |
puts 'f1-1' | |
f2.resume |
This file contains 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
package main | |
import ( | |
"io" | |
"os" | |
"strings" | |
) | |
type rot13Reader struct { | |
r io.Reader |
NewerOlder