Clickhouse_notes

ClickHouse notes 再系统仔细的看一遍ClickHouse :) 先放在这里把,想到啥写啥。:P 主流程 [Read More]

C++ concurrency syntax

C++ 并发语法 说来也上了一年班都在写C++了,感觉这一年里学到的C++真是比在学校学的那些C with Class要高级多了。主要就是多线程与Modern C++。先对多线程做个笔记记录一下吧。 C++多线程这块内容总的来说就是控制线程的先后执行顺序,使程序如我们所愿的运行。 [toc] mutex mutex 用一个锁来限制对临界区的访问。但是存在缺点。比如在某个函数内lock了 ,但是得要有地方来解锁。这个解锁就会非常复杂了。于是就有了guard_lock利用C++的RAII,在析构函数里unlock std::mutex m; int fun(int a, int b) { m.lock(); int c = a + b; return c; } lock_guard std::lock_guard<std::mutex> lk(m); int fun(int a, int b) { lk.lock(); int c = a + b; return c; } unique_lock... [Read More]

Support vector machine

Support Vector Machine 模型推导 给定超平面 \(\bm{w}^T \bm{x} + b = 0\) 和空间中得任意一点$\bm{x}_0$,则点到平面的距离可以表示为 \(d(\bm{x}_0,P) = \frac{|\bm{w}^T \bm{x}_0 + b|}{||\bm{w}||}\) [Read More]

First post!

This is my first post, how exciting! \(x^2=\sqrt 2\)