I am Charmie

メモとログ

2015-02-01から1ヶ月間の記事一覧

C++: usefull functions

std::iota: assigns successive values to a container include <numeric> std::iota( v.begin, v.end(), val ); // v[0] = val; // v[v.end()-1] = val + v.size()-1; std::random_shuffle: randomizes the order of elements of random access containers. include <algorithm></algorithm></numeric>…

git commit related to an issue

A commit can be linked to an issue by adding issue ID at the beginning of commit message. The following command links the commit to an issue, whose ID is 1. git commit -m "#1 brabrabra"

math in English

n! = \Pi{i=1}^{n}: the factorial of a non-negative integer n. nCk = \frac{n!}{k!(n-k)!}: n choose k, k combinations of n nPk = \Pi{i=n-k+1}^{n}: k permutations of n