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
var Confing; | |
(function (Confing) { | |
Confing.sourceFile = '打刻 2020-07-01T00_00_00Z to 2020-07-30T00_00_00Z'; | |
Confing.targetFile = '稼働報告書-2020-07'; | |
Confing.workStartLabel = '稼働開始'; | |
})(Confing = Confing || (Confing = {})); | |
function onOpen(e) { | |
createMenu(); | |
} |
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
# rbenv | |
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
# peco の設定 | |
# % brew install peco | |
function peco-history-selection() { | |
BUFFER=`history -n 1 | tail -r | awk '!a[$0]++' | peco` | |
CURSOR=$#BUFFER |
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
:syntax on | |
set number | |
set ruler | |
set list | |
set listchars=tab:>-,trail:-,nbsp:%,extends:>,precedes:<,eol:< | |
set incsearch | |
set hlsearch | |
set nowrap | |
set showmatch | |
set whichwrap=h,l |
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
# 前提で必要なこと | |
# rubyのインストール(rbenv経由) | |
# gem install bundler | |
# gem install rails --no-ri --no-rdoc | |
# 先にgithubでリポジトリ作っておく。readmeとかgitignoreとか作ってくれるので。 | |
git clone git@github.com:yo-iida/example.git | |
bundle init | |
# ここでGemfileに必要なgemを記述しておく | |
bundle install --path vendor/bundle --jobs=4 |
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
s = [2,3,5,6] | |
k = 16 | |
def knapsack(s, k) | |
# 記録用配列を初期化 | |
s_size = s.size | |
wmax = k | |
t = Array.new(s_size).map{Array.new(wmax,Array.new())} | |
for i in 0..(s_size-1) do |
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
def reduce_mapping1(f, a=nil) | |
_f = a ? a.map{|i|f[i-1]}.uniq : f.map{|i|f[i-1]}.uniq # 最初のループならfのuniqをとる、2周目以降ならreduceしたaのuniqをとる | |
a_size = a ? a.size : f.size # reduceしたaのサイズ(最初はfのサイズ) | |
a_size > _f.size ? reduce_mapping1(f, _f.sort) : _f.sort # reduceできたら再帰、できなかったらその配列をソートして返す | |
end | |
# 最大n-1回計算するのでO(n)はn | |
# かぶりが多いと早い、かぶり少ないと遅い | |
def reduce_mapping2(f) | |
n=f.size # 写像の要素数 |
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
*~ | |
.DS_Store | |
gemfiles/vendor | |
gemfiles/.bundle | |
private/*.sh | |
dump.rdb | |
imports/imported |
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
[core] | |
excludesfile = /Users/yoshikiiida/.gitignore_global | |
editor = vim -c \"set fenc=utf-8\" | |
[difftool "sourcetree"] | |
cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
path = | |
[mergetool "sourcetree"] | |
cmd = /opt/homebrew-cask/Caskroom/sourcetree/2.0.5.2/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" | |
trustExitCode = true | |
[user] |
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
def poly1(a, x) | |
n = a.size | |
a0 = a.last | |
a.delete_at(n-1) | |
if a.size == 0 | |
p = a0 | |
elsif | |
p = x * poly1(a, x) + a0 | |
end | |
p |
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
<%= javascript_tag do %> | |
window.obj = <%= raw t('common.obj').to_json %>; | |
<% end %> |
NewerOlder