RR (Double Ruby、ダブルRuby)は、豊富なダブル化技術と簡潔な文法を備えたテストダブルフレームワークです。
-
double-ruby-users@rubyforge.org
-
double-ruby-devel@rubyforge.org
(ns fileupload.core | |
(:use [net.cgrand.enlive-html | |
:only [deftemplate defsnippet content clone-for | |
nth-of-type first-child do-> set-attr sniptest at emit*]] | |
[compojure.core] | |
[ring.adapter.jetty]) | |
(:require (compojure [route :as route]) | |
(ring.util [response :as response]) | |
(ring.middleware [multipart-params :as mp]) | |
(clojure.contrib [duck-streams :as ds])) |
find ./ -type f -maxdepth 1 | xargs -i mv {} {}_YYYYMMDD | |
#1. findコマンドで現在のディレクトリ以下 ( ./ ) にあるファイル ( -type f ) の一覧を取得。(ただし、サブディレクトリは除く ( -maxdepth 1 ) | |
#2. 上の結果をパイプでつないで、xargsコマンドで “mv {} {}_YYYYMMDD” に渡す。(xargs の-iオプションで{}の部分がファイル名に変換しつつ実行されます) | |
#上をちょっと応用するとこんなこともできます。 | |
find ./ -type f -maxdepth 1 | grep _YYYYMMDD | sed 's/\.end//' | xargs -i mv {}.end {} |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
gh_url = 'https://api.github.com' | |
req = urllib2.Request(gh_url) | |
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm() |
#!/bin/sh | |
# Licence: MIT | |
# Created by tomykaira, 2011-10-25 | |
if [ $# -ne 1 ]; then | |
echo "Give me your new project name (only)" | |
exit 1 | |
fi |
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
Many of the technologies being built today are based on the ideas initially conceived by post-World War II scientists. In fact, it was in July of 1945, when Dr. Vannevar Bush described the ["memex" device][2], a device with an uncanny resemblance to the Internet:
A memex is a device in which an individual stores all his books, records, and communications, and which is mechanized so that it may be consulted with exceeding speed and flexibility.
Only twenty years later in 1965, Ted Nelson, inspired by the same Dr. Bush, would conceive of the idea that content and documents should be ["hyperlinked"][3]. And finally in 1990, [Tim Berners-Lee along with some of his colleagues][4], would tie the concept of the hyperlink together with the idea of an inter-connected world to develop what we know now today as the Internet, allowing humankind to access and link information across vast distances almost instantly.
module Main where | |
import Game.NovelMonad | |
import Game.NovelMonad.SimpleInterpreter | |
import Story | |
main :: IO () | |
main = simpleInterpret defaultConfig novelMain | |
novelMain :: Novel () | |
novelMain = do |