- Vector
\overrightarrow{a}
(wider) vs\vec{a}
(shorter) - Matrix and Determinant
\begin{pmatrix} ... \end{pmatrix}
(parentheses) orbegin{vmatrix} ... \end{vmatrix}
(simple vertical bar). Each of elements are separated by ampersand&
, each of rows are separated by//
- Cofactor
\widetilde{A}
(wider) vs\tilde{A}
(shorter) - Minor determinant
\overline{A}
(wider) vs\bar{A}
(shorter) - other symbols: amssymb
In vim, change fileformat by using :set fenc=utf-16 | set bomb
.
- Windows System (Tested on Windows 10)
pdflatex
TexLive (/wstandalone
package)magick
Image Magickchoco install imagemagick
gswin32c
Ghost Script (x86)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
int main() { | |
struct t{ int i1; int i2; }; | |
std::vector<t> v; | |
v.push_back(t {1, 2}); | |
v.push_back(t {3, 4}); | |
v.push_back(t {5, 6}); | |
for(int l = v.size(), c = 0; c < l; c++) | |
printf("%d, ", (v.data() + c)->i2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <vector> | |
void main() { | |
std::string foo = "baz"; | |
std::vector<char> bar; | |
printf("%d\n", bar.capacity()); | |
bar.resize(foo.size()); | |
// CAUTION: vector::reserve affects only "capacity", so does not change its "size", | |
// will causes empty-like behavior if using for(:) loop, vector::resize is adequate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM This snippet sort *.ts files in numerical order. Up to 9999. (1.ts - 9999.ts) | |
@echo off | |
setlocal enabledelayedexpansion | |
( | |
for /f %%f in ('dir /b *.ts') do ( | |
set num=%%~nf | |
set elif=1 | |
if !elif! equ 1 if !num! lss 10 set "num=000!num!" && set elif=0 | |
if !elif! equ 1 if !num! lss 100 set "num=00!num!" && set elif=0 | |
if !elif! equ 1 if !num! lss 1000 set "num=0!num!" && set elif=0 |