整数幂的求和

问题

计算对于给定的整数$k$,求$f(n, k)=\sum_{i=1}^n i^k$关于$n$的多项式表达式。例如

\begin{align} f(n, 0)&=n\\ f(n, 1)&=n(n+1)/2 …

more ...




描点画图

等距描点画图

\begin{align} \Delta l&=\sqrt{\Delta x^2+\Delta y^2}=C\\ \Rightarrow \Delta x&=\frac{\Delta l}{\sqrt{1+y'^2}} \end{align}

等角描点画图

\begin{align} \theta&=\arctan …

more ...

Network Programming

IP(Internet Protocal) Address

  • Generally, it is stored(Big endian) in a struct in_addr rather than a scalar value.

    struct in_addr {
      unsigned int s_addr; /* Network byte order (big-endian) */
    };
    
  • To convert …

more ...


Covariant Linear Fit

Aim

Minimize $$\sum_i \mathrm{distance}^2(\vec r_i, \mathrm{line})=\sum_i (\vec r_i\cdot \hat n-\rho)^2$$ for line $\vec r\cdot \hat n-\rho=0$. It is equivalent …

more ...


ipynb2pelican Plugin released!

Yet another Pelican Plugin for blogging with Jupyter Notebooks using MetaCell to store metadata.

Thanks to super cow power of python, we can finally publish ipynb easily! Below is the …

more ...