こんな感じでキー軸を加工して,
こんな感じに配線しなおして,
@startuml | |
start | |
if (複数の型) then (Y) | |
:shapeless.HList; | |
detach | |
else (N) | |
if (順序が重要) then (Y) | |
if (規則的な値を生成) then (Y) | |
:immutable.Range; | |
detach |
implicit class RichMutableMap[K, V](val m: scala.collection.mutable.Map[K, V]) extends AnyVal { | |
def upsert(key: K, insertValue: => V, updateValue: => V => V = null): scala.collection.mutable.Map[K, V] = { | |
if (m.contains(key) && updateValue != null) | |
m.update(key, updateValue(m(key))) | |
else | |
m.update(key, insertValue) | |
m | |
} | |
} |
#!/bin/zsh | |
# TODO: impl for two or more additional regexs | |
zparseopts -D -A opts -- i: -iters:=i o: -outliers:=o p: -parallel=p a+: -additional-regex:=a | |
niters=5 | |
noutliers=1 | |
regexs=("$3") | |
local -A opts | |
if [[ -n "${opts[(i)-i]}" ]]; then | |
niters=${opts[-i]} |
public class Named : Person, IImplName { } | |
public interface IImplName | |
{ | |
string Name { get; set; } | |
} | |
public class Person | |
{ | |
public string Name { get; set; } | |
} |
package com.chatwork.quiz.collection | |
import com.chatwork.quiz.{MySome, MyNone, MyOption} | |
import scala.annotation.tailrec | |
sealed trait MyList[+A] { | |
// Easy |
//直和を表現しきれない点を気にしたら負け | |
public interface IOption<out T> : IEnumerable<T> | |
{ | |
bool HasValue { get; }//== this.Any() | |
} | |
sealed public class Some<T> : IOption<T> | |
{ | |
private readonly T val; | |
public bool HasValue { get { return true; } } |
git filter-branch -f --commit-filter ' | |
if [ "$GIT_AUTHOR_EMAIL" = "{old email}" ]; | |
then | |
GIT_AUTHOR_NAME="{new name}" | |
GIT_AUTHOR_EMAIL="{new email}" | |
GIT_COMMITTER_NAME="{new name}" | |
GIT_COMMITTER_EMAIL="{new email}" | |
git commit-tree "$@" | |
else | |
git commit-tree "$@" |
#!/bin/bash | |
log=/home/chinachu/chinachu/log/encode | |
echo -----start encoding @$(date +%Y/%m/%d/%H:%M:%S)----- >> $log | |
start=$(date +%s) | |
echo $1 >> $log | |
ffmpeg -i $1 -vcodec libx264 -acodec libfdk_aac -tune animation ${1%.*}.mp4 2>&1 | grep "^[^f]" >> $log |