Posts

Showing posts from August, 2024

Bold italic vectors in LaTex

Use \boldsymbol For example: E=mc2 After bold italic vectors: $\boldsymbol{E = mc^{2}}$, the equation as follows: \boldsymbol{E = mc^{2}}

Introduction to Linear Algebra Chapter 1 Introduction to Vectors

The hear of linear algebra is in two operations -- both with vectors. We add vectors to get \boldsymbol{v} + \boldsymbol{w}. We multiply them by numbers c and d to get c\boldsymbol{v} and d\boldsymbol{w}. Combining those two operations(adding c\boldsymbol{v} to d\boldsymbol{w}) gives the linear combination  c\boldsymbol{v} + d\boldsymbol{w}. c\boldsymbol{v} + d\boldsymbol{w} = c\begin{bmatrix}1\\ 1\end{bmatrix} + d\begin{bmatrix}2\\3\end{bmatrix} = \begin{bmatrix}c + 2d\\c + 3d\end{bmatrix} Central ideas of chapter 1: Sections 1.1 Vectors addition \boldsymbol{v} + \boldsymbol{w} and linear combinations c\boldsymbol{v} + d\boldsymbol{w} Sections 1.2 The dot product \boldsymbol{v} \cdot \boldsymbol{w}   of two vectors and the length \lVert \boldsymbol{v} \rVert = \sqrt{\boldsymbol{v} \cdot \boldsymbol{v}} Sections 1.3 Matrics A, linear equations Ax = b, solution x = A^{-1}b.

Delete rows from table in clickhouse

Delete row from table in clickhouse: :) ALTER TABLE tablename DELETE WHERE condition

Change column name in a table in clickhouse

Change the name of one column: ALTER TABLE tablename RENAME COLUMN old_name TO new_name Change the names of multiple columns: ALTER TABLE tablename     RENAME COLUMN old_name1 TO new_name1,     RENAME COLUMN old_name2 TO new_name2

Install clickhouse_connect on FreeBSD

1. Install py311-pip with root # pkg install py311-pip 2. Install clickhouse_connect by pip with normal user $ pip install clickhouse_connect

clickhouse export or import data

Export data from clickhouse into csv file: :) SELECT * FROM table INTO OUTFILE 'file' Import data from csv file: clickhouse-client -q "INSERT INTO database.tablename FORMAT CSV" < tablename.csv

Install clickhouse on FreeBSD 14.1

Image
Install command: # pkg install clickhouse Start clickhouse server clickhouse server Start clickhouse server without any ouput clickhouse server > /dev/null 2>&1 & Start clickhouse client $ clickhouse client

Set static IP and DNS for FreeBSD

1. Set IP address and default router # ee /etc/rc.conf Add content as following into rc.conf. ifconfig_em0="inet 192.168.1.18 netmask 255.255.255.0" defaultrouter="192.168.1.1" save it, push keyboard buttons ESC ,  A ,  A . 2. Setting up DNS # ee /etc/resolv.conf Content of resolv.conf nameserver 8.8.8.8 nameserver 1.1.1.1 save it, push keyboard buttons  ESC ,  A ,  A . 3. Restart network # sh /etc/rc # /etc/netstart

Failed to execute login command on FreeBSD

Image
After I deleted slim package with command "pkg delete". And I installed slim back. But when I login to my FreeBSD and the error message comes out as following: I am sure I enter the right username and password. And I use the root to login, I got the same result. Solution: Press Keyboard "Ctrl" , "Alt" and "F1" or "F2"  and it will go to the terminal as following: I can login now.