=/

[先开坑 慢慢填]

[就算这样我也还是不会写作业]

#Holomorphic functions verses real differentiable functions

In short, the Cauchy-Riemann Equations hold if and only if $$\textrm{D}F(x,y)$$ is a conformal matrix, i.e. an $$\mathbb{R}$$-linear transformation corresponding to multiplication by a complex number.

#Cauchy-Riemann Equations, Harmonic functions, and 1-forms

（简单写两笔算是日记了。

（现在翻到大一的时候写的parametrized by arc length的po文 感觉真是… 尼玛早点跟我说这个微分几何里要用我就多写点了啊QwQ

==

Applied Math is not math at all. 我真觉得图论已经傻逼到一定境界. 我怎么想都想不通一个planer graph怎么可能满足$$v-e+f=2$$, 后来翻了半天才发现书上把unbounded region也算进去了…

Seminar更是血崩 … 讲道理说一些抽象的东西其实还好讲。 不管是说由equivalent class定义的quotient space上如何定义metric还是topology的一些概念还是可以轻松跟上。但是gluing opposite sides of an octagon / hexagon我就只能给自己点根蜡烛。感觉自己对这些比较具体实在的东西的幻想能力实在是远弱于抽象能力。

==

==

Well, Don’t Panic.

…你妹 这个有点洗脑啊!

We live in a beautiful world.

Yeah we do, yeah we do.

“I used to rule the world”

QwQQQQQQ星星眼！

==

Happy New Year.

We live in a beautiful world.

Yeah we do, yeah we do.

Hope I can get somebody to lean on.

Then there will be nothing to run from.

==

I’m so fucking sorry.

Love is difficult as there’s no way to adjust it.

I’m just pretty fucking sure the one I love is not you but her.

==

Not obsessed.

Cuz I love u.

Anyway lol, 今天突然想起来 < 50 Ways To Say Goodbye > , 在钟宇的车上听过两次 当时沉浸在失恋的痛苦中并不认为这首歌应景

(为了不吵到父上睡觉 在明天要去漫展的情况下用mbp的键盘强行码的我只想给自己点个赞

The diagonalizability of a linear operator $$T$$ is equivalent to find a basis consisting of eigenvectors of $$T$$.

For $$T$$, calculating its characteristic polynomial $$c(t)$$, if it splits, for one particular eigenvalue $$\lambda$$, we have already known that $$E_\lambda = \textrm{null}(T-\lambda I)$$ is a vector space spanning by the eigenvectors of $$T$$ corresponding to $$\lambda$$.

At the same time, we also know that the eigenvectors corresponding to different eigenvalues are linearly independent, we can divided them into some smaller linear space.

Thus, our destination is that, can we treat the origin vector space as a direct sum of all of those eigenspaces?

On the other hand, it’s easy to conclude that $$1 \leq \dim(E_\lambda) \leq m$$, where $$m$$ is the multiplicity of $$\lambda$$.

Moreover, the sum of all multiplicities are $$\dim V$$, since the degree of $$c(t)$$ is equals to $$\dim V$$.

It’s easy to see that, if we can treat $$V$$ as the direct sum of all those eigenspaces, the dimensions of those eigenspaces must equal to its corresponding multiplicity. One way to understand this is considering the basis in each eigenspace.

Let $$\gamma$$ be a parametrized curve, $$\textbf{t} = \frac {\dot{\gamma}(t)} { \left | \dot{\gamma}(t) \right |}$$ is the unit tangent vector.

Generally, we can rewrite $$\left | \dot{\gamma}(t) \right |$$ as $$\dot{s}$$. Thus $$\dot{\gamma}(t) = \dot{s}(t)\textbf{t}(t)$$.

In particular, suppose that $$\gamma$$ is parametrized by arc length, $$\textbf{t} = \dot{\gamma}(t)$$, we can infer that $$\dot{\textbf{t}}$$ is orthogonal to $$\textbf{t}$$ from $$\left | \textbf{t} \right |^2 = 1$$.

Thus, calculating the second-order derivative of $$\gamma$$, we would get that $\ddot{\gamma} = \ddot{s}\textbf{t} + \dot{s}\left | \dot{\textbf{t}} \right | \textbf{n}$

where $$\textbf{n} = \frac {\dot{\textbf{t}}} {\left | \dot{\textbf{t}} \right |}$$ is the principal normal vector along $$\gamma$$.

Here, we can treat the first part $$\ddot{s}\textbf{t}$$ as the tangential acceleration, and the second part $$\dot{s}\left | \dot{\textbf{t}} \right | \textbf{n}$$ as the centripetal acceleration.

From physics (CM), we could get a grasp of the concept of curvature: the radius of the trace of movement, which would be a part of centripetal acceleration.

If $$\gamma$$ traces a twice-differentiable smooth curve, then the curvature at $$\gamma(t)$$ is the scalar $\kappa(t) = \left | \frac {\textrm{d}\textbf{t}} {\textrm{d}s} \right |$

From the chain rule, we can treat it as $$\left | \frac{\textrm{d}\textbf{t}} {\textrm{d}t} \cdot \frac{\textrm{d}t} {\textrm{d}s} \right |$$. Since $$\dot{s} > 0$$, it equals to $$\frac {\left | \dot{\textbf{t}} \right |} {\dot{s}}$$.

Thus, we have $$\left | \dot{\textbf{t}} \right | = \dot{s}\kappa$$, and $$\ddot{\gamma} = \ddot{s}\textbf{t} + \dot{s}^2\kappa\textbf{n}$$.

Our goal is to find a specific parametrization which is convenient in our application, one is arc length parametrization.

Def : The arc length function $$s=s(t)$$ of a curve parametrized by $$\textbf{x} = g(t)$$ on $$t_0 \leq t \leq t_1$$ is defined by

$s(t)=\int_{t_0}^t \left| \dot{\textbf{x}}(u)\right| \textrm{d}u$

Def : A curve $$\gamma : [0,L] \to \mathbb{R}^n$$ is parametrized by arc length if $$\left | \dot\gamma (t) \right | = 1$$ for all $$0 \leq t < L$$.

For this parametrization, we have such a property: If $$\gamma : [0,L]\to\mathbb{R}^n$$ is parametrized by arc length, then the length of the arc $$\{\gamma(t) : t_1 \leq t \leq t_2\}$$ is precisely $$t_2 – t_1$$.

For an arbitrary parametrization $$\gamma_2 : [a,b]\to\mathbb{R}^n$$, we can build a relation between this one and arc length parametrization, by the definition of arc length itself.

let $$s(t)$$ be a function of $$t$$ : $s(t) = \int_a ^t \left | \dot\gamma_2(t) \right | \textrm{d}t$

let $$\phi$$ be a mapping from $$[a,b]$$ to $$[0,L]$$ (L is the length of this curve): $\phi : [a,b] \to [0,L] = s(t)$

It follows that:

• $$\phi(a) = \int_a^a = 0$$
• $$\phi(b) = \int_a^b = L$$
• $$\phi’>0$$, since $$\left | \dot \gamma_2 (t) \right | > 0$$ (which ensure that $$\phi$$ is invertible)
• Thus, $$\gamma(\phi(t)) = \gamma_2(t)$$, where $$\gamma$$ is a parametrization on $$[0,L]$$

Then we’ll show that $$\gamma$$ is parametrized by arc length from definition, since
\begin{align*} \dot \gamma_2(t) &= \frac {d} {dt} (\gamma(\phi(t))) \\ &= \dot{\gamma}(\phi(t))\,\phi'(t) \\ &= \dot{\gamma}(\phi(t))\, \left | \dot\gamma_2(t) \right | \\ \end{align*}

which implies:

$\left | \dot \gamma_2 (t) \right | = \left | \dot \gamma (\phi(t)) \right | \, \left | \dot \gamma_2 (t) \right |$
Therefore, we have proved that $$\left | \dot \gamma(\phi(t)) \right | = 1$$, which means that $$\gamma$$ satisfies all the requirement of being parametrized by arc length from the its definition.

As a consequence, we have shown that for any parametrization $$\gamma_2$$, we can treat it as a transformation applied on the parameter of a parametrization by arc length, and the transformation is directly from a particular parameter $$t$$ to the arc length from the start point $$a$$ to this parameter.

Moreover, for any arbitrary parametrization, we can also find the function of the arc length based on the parameter itself first, then apply the parametrization to the inverse of the arc length to obtain a parametrization by arc length.

Since we want to obtain a mapping $$\phi : [0,L] -> [a,b]$$ s.t. $$\left | \frac {d} {dt} \gamma(\phi(t)) \right | = 1$$ for any arbitrary parametrization $$\gamma$$. i.e.
$\left | \dot \gamma(\phi(t)) \right | \phi'(t) = 1$
which means:
$\phi'(t) = \frac {1} {\left | \dot \gamma(\phi(t)) \right |}$
As we all know, $${f^{-1}}'(x) = \frac{1}{f'(x)}$$, we can treat $$\phi$$ as the inverse function of $$s(t)$$, which is the primitive function of $$\left | \dot \gamma(\phi(t)) \right |$$ as we showed before. (At the same time, we have shown the existence of such a inverse function before.)

Thus, $$\gamma(\phi(t))$$ is the parametrization we want to obtain before.

### Motivation

唔…开服和小伙伴们玩MC的时候总是不由自主的想加几个新mod玩

这时候就苦了..挨个告知 给他们发过去mod 有的时候还得亲自动手给他们copy到指定的目录下..

Here comes a question..

为什么不直接写一个简单的和server通讯 同步mod的工具呢….

### Implementation

大概是打算server上提供一个接口 返回一个mod list.

和本地文件名校验后 本地直接把缺的mod下载下来 再调用一个外部的launcher

(回头顺便写一个launcher好了..

Update: 于是我真的写了一个launcher…
明天起来写细节..
我都忘了我在这儿开了个坑(.

### Launcher

大概情形就是因为处女座(. 所以强行用Python撸了一个launcher.

其实MC的launcher很简单的. 主要就是以特定的参数调用Java去执行几个jar文件.

但是因为不同版本/ 不同系统/ 是否包含forge/ etc 多种情况, 如果只是单纯的记录一个参数,将其丢给shell的话还是有点蠢.

那么官方的launcher是怎么完成的呢

首先在对应版本的jar文件目录下同时有一个json文件. 这个文件在minecraftArguments这个key下定义了之后要传入的一系列参数, 并在libraries这个key下定义了我们所有要添加的libs.

实现launcher的重点主要就在于如何parse这个key对应的list

首先观察其中元素, 每一个都是一个dict, 比如:
 { "name": "org.apache.httpcomponents:httpclient:4.3.3" }, 

这里的表示形式很有趣…这个其实指的是library/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar

也就是所有的句号可以直接替换成’/’作为路径分隔符( 别忘了Windows用的是邪恶反斜杠orz

然后从第一个冒号开始 把后边的都替换成’-‘ 最后加上’.jar’的后缀名, 组成一个文件名, 然后再把他们这些冒号统统当做句号处理就好.

嘛 基本上这样就可以把所有libraries所对应的路径名搞出来, 我把它写成了parceLibs这个函数..

在parse的过程里,还涉及到natives和arch的问题, 不过其实很容易就能分辨出来具体的规则, 也不难实现.

基本上解决了这个 照着ps -ef下看到它启动时调用的参数 就可以实现出读取指定版本的json文件然后启动游戏了..

当然作为一个处女座 不能用正版登录 不能用twitch推流 这都是不能忍受的

正版登录的话其实就是把--username这个参数改成你的账号, --password这个参数改成你的密码 然后去post到它的authserver就好. 这里需要注意的是对parameters的构造, 在这个链接里有很详细的阐述.

取回的response里就会有accessToken和uuid, 替换掉参数里的就好.

同时 如果和twitch绑定的话, 在response里会给一个twitch的access token. 用这个去替换参数里的--userProperites就好.

基本上原理就是这样..当然在实际coding里有各种各样奇葩的bugs, 比如和傻逼windows有关的, 得用一大堆引号去保证路径中空格的合法化的这种…简直无情.

还有最坑爹的就是编码问题!

我就艹了!

你说你路径里带中文就带吧

存UTF-8好不好!!

存nmb的GBK!