初めまして。苗字が岡部なのでOKBと名乗っています
決してどこかの銀行を真似しているわけではありません
ブログ開設時(20190326)の時点で僕は22歳です
大学の学部を卒業したばかりの新米です
色々ありまして...はてなブログで再びブログを開設しました
以前はwordpressで筋トレのブログを書いていたんですけど普通に挫折しました
理由はネタ切れでした。書くことが無くなってしまったんです。御察しの通り...
筋トレってそんなすぐに変化でなくて記事にしにくかった(ボソ
class StringArray | |
attr_reader :s_array | |
def initialize | |
@s_array = '' | |
end | |
def push(v) | |
@s_array += "#{v}SPLIT" | |
self | |
end |
# Your code here! | |
class Notify | |
def exec(*data) | |
raise NotImplementedError.new("#{self.class}##{__method__} が実装されていません") | |
end | |
end | |
class User< Notify | |
def exec(*data) | |
puts "send to User #{data}" |
class Sward | |
attr_reader :options | |
def initialize | |
@options = {} | |
end | |
def cost | |
raise NotImplementedError.new("#{self.class}##{__method__} が実装されていません") | |
end |
# Adapte | |
module Adaoter | |
class Queue | |
attr_reader :queue | |
def initialize | |
@queue = [] | |
end | |
def enqueue(val) |
class Iterator | |
def next | |
raise NotImplementedError.new("#{self.class}##{__method__} が実装されていません") | |
end | |
def has_next | |
raise NotImplementedError.new("#{self.class}##{__method__} が実装されていません") | |
end | |
end |
import functools | |
class BloomFilter: | |
def __init__(self, filter_size): | |
self.filter_size = filter_size | |
self.bloom_filter = [0 for _ in range(filter_size)] | |
def exist_v(self, val): | |
indexes = self.n_hash(val) | |
for index in indexes: |
git branch | grep -ve " master$" | xargs git branch -D |
defmodule Product do | |
defstruct name: "", price: 0 | |
def fmap(func, %Product{ name: name, price: price }) do | |
{ n_name, n_price } = func.(name, price) | |
%Product{ name: n_name, price: n_price } | |
end | |
end | |
stones = %Product{ name: "大人気!その辺に落ちていた石の詰め合わせ", price: 2000 } | |
summer_sale = Product.fmap(fn name, price -> { "[SummerSale]: #{name}", price - 200 } end, stones) |
def calculate | |
100 - (GC.stat[:heap_live_slots] / (GC.stat[:heap_eden_pages] * GC::INTERNAL_CONSTANTS[:HEAP_PAGE_OBJ_LIMIT] )) | |
end |