Ben Chuanlong Du's Blog

It is never too late to learn.

Use LaTeX in Linux

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Texlive is the most popular package for LaTeX in Linux.

  2. When installing texlive in linux, you'd better install the full version to avoid missing packages. For example, in Debian you can …

Typing Chinese in Vim

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

The simplest suggestion is not to waste your time on this right now. There are some old related Vim plugins but are outdated. NeoVim is a better alternative to Vim. Wait …

String in SQL

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Teradata

regexp_instr REGEXP_LIKE REGEXP_REPLACE REGEXP_SUBSTR

  1. trim trim specified pad characters or bytes from a character or byte string

  2. like %, _ like, case-insensitive You can also like any (pattern_1, pattern_2, ...) like all …

Primary Key vs Index in SQL

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. index is for distribution data index does not have to be unique

  2. primary key must be unique and non null

  3. primary keys are automatically indexed

Auto Increment in SQL

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

http://plsql4all.blogspot.com/2014/08/auto-increment-column-in-teradata.html http://stackoverflow.com/questions/21982004/how-to-generate-automatic-number-in-teradata-sql https://forums.teradata.com/forum/enterprise/auto-increment-column

  1. Be careful with batch insert if there is an auto …

Change File Permission on Linux

R: 4 W: 2 X: 1

Make a directory readable to other people.

chmod 755 dir  

Make a file readable to other people.

chmod 644 file 

Make a directory and all its subcontents readable to other people.

# make the dir and its subcontents readable and executable
chmod 755 -R dir …