Unixのプロセスの動作はabstractionとcommunicationの二つについてだ
kernelはプロセスの抽象的(シンプル)なビューを持つ 私達のようなプログラマは二つの言語の違いをソースコードから見つけるのに慣れている
私達は色んな用途に使うたくさんのプログラムを習得している。 GCを持つようなプログラムでメモリ効率的なプログラムを書く事は不可能だ、Cを使わなければならない、けど、オブジェクトが必要だ。じゃあC++を使おう…
| カレーのレシピ | |
| 誰でもできる、美味しいカレーの作り方です。旦那も息子もこのカレーが大好物。 | |
| ポイントは玉ねぎと人参はミキサーで細かくしてしまうところ。逆にコクのある美味しいカレーになります。 | |
| レシピの作者 | |
| 山田サチ子さん | |
| 材料 ( 8皿分 ) |
| // ==UserScript== | |
| // @name Inoreader open in background tab | |
| // @namespace http://mono0x.net/ | |
| // @version 0.0.1 | |
| // 元は https://gist.github.com/mono0x/4a6d2f19ca90668e41f85bb1c1952828 | |
| // @author mono/u1tnk | |
| // 以下 include指定が /*が無いと入らなかったので修正 | |
| // @include https://www.inoreader.com/* | |
| // @include https://irodr.netlify.app/ | |
| // @grant GM_openInTab |
| let locale = "jp" | |
| let blacklists = ["*://mail.google.com/*","*://mail.google.com/*","*://mail.google.com/mail/*","*://www.inoreader.com/*","docs.google.com"] | |
| let mapleader = "," | |
| map ; : | |
| map : ; | |
| " macでSKKの変換と同時に動く為無視する | |
| imap <C-j> <Nop> |
| [global] | |
| ioengine=libaio | |
| iodepth=1 | |
| size=1g | |
| direct=1 | |
| runtime=60 | |
| directory=${TARGET} | |
| stonewall | |
| [Seq-Read] |
| # -*- coding: utf-8 -*- | |
| # mackrel-client-ruby 0.0.2 使用 | |
| require 'mackerel' | |
| client = Mackerel::Client.new(:mackerel_api_key => ENV['MACKEREL_APIKEY']) | |
| client.get_hosts(service: 'service_name').each do |host| | |
| # working以外で初期登録から一週間以上経過している | |
| if host.status != "working" && host.createdAt < Time.now.to_i - (60 * 60 * 24 * 7) | |
| p "retire host id:#{host.id}" | |
| p client.retire_host(host.id) |
| #!/usr/bin/env ruby | |
| File.open('ids.txt') do |file| | |
| while line = file.gets do | |
| words = line.split(' ') | |
| size = eval(words[1].gsub('x', '*')) | |
| if size >= 640 * 960 | |
| p(words) | |
| end |
| local group = display.newGroup() | |
| local rect1 = display.newRect(0, 0, 50, 1000) | |
| rect1:setFillColor(255, 0, 0) | |
| local rect2 = display.newRect(0, 0, 1000, 50) | |
| rect2:setFillColor(0, 255, 0) | |
| group:insert(rect1) | |
| group:insert(rect2) |
| it "normal" do | |
| a = [{id: 1, weight:1}, {id:2, weight: 3}, {id:3, weight:nil}] | |
| check_count = 10 | |
| check_count.times do | |
| sample_count = 1000 | |
| counts = {1 => 0, 2 => 0} | |
| sample_count.times do | |
| counts[a.sample_with_weight[:id]] += 1 | |
| end | |
| (counts[1] < counts[2]).should be_true |