りすこがこんなの書いてて、聞いてみたら名詞だけ抜き出してcountとかやりたいとか。 そういう時はawk使うと便利ですよ(perlでもいいですが)
$ cat filename | awk '$4 ~ /^名詞/{print $1}' | sort | uniq -c | sort -n
4個目のカラムが「品詞」で始まる性質を使ってます。
#!/Users/moro/opt/ruby192/bin/ruby | |
magicome = "# coding: #{Encoding.default_external.to_s.downcase}" | |
ARGV.each do |fname| | |
File.open(fname, 'r+:BINARY') do |src| | |
content = src.read | |
src.rewind | |
src.puts magicome | |
src.write content | |
end |
function r(f){/in/(document.readyState)?setTimeout(r,9,f):f()} |
int main(int argc, char** argv) { return 0; } | |
#include <iostream> | |
using namespace std; | |
template<class Cond, class Expr> | |
struct While { | |
While(Cond& cond, Expr& expr) | |
{ |
require 'dl/import' | |
require 'dl/types' | |
module Win32API | |
module Kernel32 | |
extend DL::Importer | |
dlload "kernel32.dll" | |
include DL::Win32Types | |
# DWORD GetLastError(void) |
(function($){ | |
$('.pagination a[data-remote=true]').live('ajax:success', function(e){ window.history.pushState('', '', $(e.target).attr('href')) }) | |
$(window).bind('popstate', function(){ $.ajax({url:window.location, dataType:'script'}) ; return true }); | |
})(jQuery); |
// ==UserScript== | |
// @match http://togetter.com/li/* | |
// ==/UserScript== | |
(function (element) { | |
if (element !== null) { | |
var event = document.createEvent("MouseEvents"); | |
event.initEvent("click", false, true); | |
element.dispatchEvent(event); | |
} |
| 国語 社会 数学 理科 英語 3計 合計 | |
---------+------------------------------------ | |
得点 | 51 71 77 56 94 222 349 | |
標準点 | 48 56 61 56 70 61 59 | |
男女順位 | 53 32 16 30 1 14 20 | |
全体順位 | 118 57 27 52 3 28 38 | |
教科 | 得点 平均点 標準点 | | |
-----+--------------------+ |
diff --git a/ChangeLog b/ChangeLog | |
index b151bc4..f643541 100644 | |
--- a/ChangeLog | |
+++ b/ChangeLog | |
@@ -1,3 +1,15 @@ | |
+Thu Jul 27 10:35:00 2011 Kenta Murata <[email protected]> | |
+ | |
+ * configure.in: change default compilers to gcc-4.2 and g++-4.2 on OS | |
+ X 10.7 (Lion). |
りすこがこんなの書いてて、聞いてみたら名詞だけ抜き出してcountとかやりたいとか。 そういう時はawk使うと便利ですよ(perlでもいいですが)
$ cat filename | awk '$4 ~ /^名詞/{print $1}' | sort | uniq -c | sort -n
4個目のカラムが「品詞」で始まる性質を使ってます。
原文: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 アーキテクチャを実現した。