2016-12-01から1ヶ月間の記事一覧

Vector column on groonga

You can store multiple scalar values in groonga vector column. Basically you can find documents in the official website. I tried it. ❯ groonga -n vector_column [04:15:13] > table_create Bookmarks TABLE_HASH_KEY ShortText [[0,1482779729.125…

Chain of Responsibility

When we process an object in order and we don't know which processor consume the object, we can use chain of responsibility(CoR) pattern. The major difference from decorator pattern is that CoR pattern can finish the process at any process…

Pairing Round-robin tournament

The problem I solved yesterday seems to be pairings in Round-robin tournament. It is called “1-factorization of a complete graph” in graph theory. (according to wikipedia :p) It seems that it has a O(n) solution. nakaly.hatenablog.com

Making pair programming group

I think a number of patterns of pair programming group is n (odd number) or n-1 (even number) if you have n number of members in you team. I wrote a naive program to enumerate the pattern. gist.github.com

Check if the column is null in mysql

If you want to check whether a column is null, you should use IS NULL, not = NULL. NG WHERE column = NULL OK WHERE column IS NULL reference