有人提醒我 SSL 证书过期，于是我想起来，我还有一个博客。
或许是因为 acme.sh 更新，或是什么变化，总之就是挂了，十分遗憾。但挂在 GitHub pages 上的主页大多数情况下都不会挂，所以可以去那里看一看。
Continue reading有人提醒我 SSL 证书过期，于是我想起来，我还有一个博客。
或许是因为 acme.sh 更新，或是什么变化，总之就是挂了，十分遗憾。但挂在 GitHub pages 上的主页大多数情况下都不会挂，所以可以去那里看一看。
Continue readingIf $l_i \Leftrightarrow \neg m_j$, then:
$\frac{l_1 \vee \cdots l_k \ \ \ \ m_1 \vee \cdots \vee m_n}{l_1 \vee \cdots \vee l_{i-1} \vee l_{i+1} \cdots \vee l_k \vee m_1 \vee \cdots \vee m_{j-1} \vee m_{j+1} \cdots \vee m_n}$If there is a empty clause after a resolution, it means there are conflicts.
$$ \frac{p\ \ \ \neg p}{\square} $$
Resolution algorithm to prove $\alpha$ within KB:
Complexity: exponential
Expressiveness: better (not restricted to Horn clauses)
Use functions, predicates to represent relationships:
Term ::= Function ( Term {, Term}* ) AtomicSentence ::= predicate ( Term {, Term}* ) …
Forgot that.
Cisco’s proprietary software, packettracer
, couldn’t be downloaded without enrolling in its network course.
enable
to enable the thingshow interfaces
to have a look at all interfaces, show interface [interface]
.show vlan
to show vlanconfigure terminal
to open the configuration in terminal(config) interface [interface]
to select an interfaceA proprietary protocol invented by Cisco to negotiate trunking on a link between two VLAN-aware switches.
There is several modes for it:
access
: puts the ethernet port into non-trunking mode and negotiates to convert the link to a nontrunk one, disregarding the neigboring porttrunk
: puts the ethernet port into trunking mode and negotiates to convert the link to a trunk one, disregarding the neigboring portdynamic auto
: willing to trunk, will be trunk if the neighboring port is dynamic desirable
or trunk
dynamic desirable
: actively willing to trunknonegotiate
: disable DTP. No wonder, it is not compatible with dynamic
modes.Except nonegotiate
, all modes are triggered by (config-if) switchport mode [mode]
. Switch to no-negotiate mode using (config-if) switchport nonegotiate
.
Use a no
before the statement to do the opposite thing, like:
(config-if) no shutdown
: set up the link
(config-if) no switchport nonegotiate
: turn on DTP
Blurring is often used in computer graphics, like, to create HDR(high dynamic range) bloom, depth of field or other post process effects.
HDR bloom: since the real-world camera cannot focus perfectly, so it will convolve the incoming image with an Airy disk. What about the Airy disk? Know what a spot of light looks like in our eyes? That would be one. A perfect lens with a circular aperture would make it because the diffraction of light.
This effect is not noticeable when it is not so bright. However, with more light we can see the blurred edge of the bright part of the image, taken by a camera. And computer graphics tries to reproduce the same effect by blurring.
You can think up an approach instantly: take the average of neighboring blocks, like below:
$$ \begin{bmatrix} 1/9&1/9&1/9 \\ 1/9&1/9&1/9 \\ 1/9&1/9&1/9 \\ \end{bmatrix} $$ By all means this is bad. It will seem block-ish.
A better one is Gaussian blur. It uses the Gaussian distribution as the weight of neighboring pixels to calculate the average, or more accurately, do the convolution. The weight matrix, like the one above, is called kernel.
A 3x3 Gaussian kernel is like:
$$ \begin{bmatrix} 1/16 & 1/8 & 1/16 \\ 1/8 & 1/4 & 1/8 \\ 1/16 & 1/8 & 1/16 \\ \end{bmatrix} $$
Some other kernels are here.
It also can be used before downsampling: Gaussian blur gets rid of the sharp edges in the image, thus after downsampling, it will free the image from aliasing like moire patterns. Aliasing happens because of the poor sampling makes different signals indistinguishable, and some high frequency signals might get in the way after sampling. So a low pass filter need to be applied before sampling.
Task: sample => downscale image Reason of problem: high freq. signal => ? Problem: aliasing => moire pattern Solution: low pass filter => blurring
And yes, Gaussian blur is also a low pass filter, with a Bode plot like a parabola. Possibly it seems obvious at first sight: Gaussian distribution has a factor $e^{-\frac{x^2+y^2}{2\sigma^2}}$, which is stable through Fourier transforms.
We can calculate it out. Let’s put the basic calculus into practice. $$ \begin{aligned} &\iint e^{i\omega x}\cdot\frac{e^{-\frac{x^2+y^2}{2\sigma^2}}}{2\pi\sigma^2}\ dxdy\ =&e^{-2\sigma^2\omega^2}\iint \frac{e^{-\frac{(x-2\sigma^2\omega i)^2+y^2}{2\sigma^2}}}{2\pi\sigma^2}\ dxdy\ =&e^{-2\sigma^2\omega^2} \end{aligned} $$ So the amplification is: $$ \begin{aligned} dB&=20\log{e^{-2\sigma^2\omega^2}}\ &=-\frac{40}{\ln 10}\cdot \sigma^2\omega^2 \end{aligned} $$ Perfect! It is a parabola after all.
Leave Kawase to the next day.
マシンガンでも壊せなくて キャタピラーでも潰せなくて
Grammar:
Procedure ::= CREATE [OR REPLACE] PROCEDURE ProcedureName '(' Parameters ')' (AS|IS) RETURN ReturnType DECLARE Declaration BEGIN Body END ';'
Parameters ::= Nothing | Parameter {, Parameter}
Parameter ::= ParameterName (IN|OUT|IN OUT) Type ':=' DefaultValue
varchar
cannot be specified with a length.AS|IS
in the procedure, and IN/OUT
is put before the parameter name.cursor cursor_name is select statement;
OPEN cursor_name;
FETCH cursor_name into variable;
next
function do.IF NOT cursor_name%FOUND THEN …;
CLOSE cursor_name;
FOR variable in cursor_name LOOP – do something to the variable END LOOP;
* Truth table
* Brute force search
* Forward chaining
* reliable
* completeness
* -> only have these two properties for the knowledge bases able to be expressed with Horn clauses
* Horn clause: a disjunction of literals with at most one unnegated literal
* E.g. $\neg x_1 \vee \neg x_2 \vee \cdots \vee x_n \vee u$
* Backward chaining
* To prove q, with p->q now prove p
* Avoid repeating by check if a clause is already proved or disproved
Panning derives from panorama.
(==) :: ''t -> ''t -> Bool
, ''t
is a type t
with equalityt
is not Eq typeclass Show a where |
type 'a show = {show: 'a -> string} |
Object -> super class -> method table
If interface A contains all of interface B, then A objects can also be used as B objects
Javascript has the same problem
function Person(first_name, last_name) { |
Merging write cache
最低だ 最低だ 最低だ
A progamer.
Student(probably)