Wednesday, January 4, 2017
Latex: Fractions (分数)
Shorthand (Fraction):
\frac{1}{2}
Output:
\(
\frac{1}{2}
\)
Shorthand (Fraction large):
\displaystyle
\frac{1}{2}
Output:
\(
\displaystyle
\frac{1}{2}
\)
Shorthand (Fraction and parentheses or bracket):
\left(\frac{1}{2}\right)^2
Output:
\(
\left(\frac{1}{2}\right)^2
\)
\displaystyle
\frac{1}{2}
Output:
\(
\frac{1}{2}
\)
Shorthand (Fraction large):
\displaystyle
\frac{1}{2}
Output:
\(
\displaystyle
\frac{1}{2}
\)
Shorthand (Fraction and parentheses or bracket):
\left(\frac{1}{2}\right)^2
Output:
\(
\left(\frac{1}{2}\right)^2
\)
Shorthand (Continued fraction (連分数)):
\displaystyle
\frac{a + b}{c + \frac{d}{e}}
Output:
\(
\displaystyle
\frac{a + b}{c + \frac{d}{e}}
\)
\(
\displaystyle
\frac{a + b}{c + \frac{d}{e}}
\)
ラベル:
Bracket,
Continued fraction,
Fraction (mathematics),
LaTeX,
MathJax,
分数,
括弧,
連分数
Tuesday, January 3, 2017
コーシー・リーマンの関係式&コーシーの積分公式
式\eqref{eq:Cauchy-Riemann}はコーシー・リーマンの関係式です.
\begin{align}
&\frac{\partial u}{\partial x}=\frac{\partial v}{\partial y}&
&\frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x}&
\tag{1}
\label{eq:Cauchy-Riemann}
\end{align}
そして,式\eqref{eq:Cauchy-int}はコーシーの積分公式です.
\begin{align}
\oint_C \frac{f(z)}{z-z_0}=2\pi i f(z_0)
\tag{2}
\label{eq:Cauchy-int}
\end{align}
二階の反対称テンソル
二階の反対称テンソル
\begin{align*}
f_{\mu\lambda}=
\begin{bmatrix}
0 & cB_z & -cB_y & -iE_x \\
-cB_z & 0 & cB_x & -iE_y \\
cB_y & -cB_x & 0 & -iE_z \\
iE_x & iE_y & iE_z & 0
\end{bmatrix}
\end{align*}
になる.
Monday, January 2, 2017
Aaron Swartz (アーロン・シュワルツ): The Internet's Own Boy: The Story of Aaron Swartz
Aaron Swartz |
Tim Berners-Lee |
- Hacktivism (ハクティビズム)
- Tim Berners-Lee (ティム・バーナーズ=リー)
- Public access to public domain
- Carl Malamud
- Pacer
- Pacer recycling site
- JSTOR database
- Stephen Heymann
- Guerilla Open Access Manifesto
- Massachusetts Institute of Technology (MIT)(マサチューセッツ工科大学)
- Computer Fraud and Abuse Act
Sunday, January 1, 2017
C (programming): ジャンボ宝くじシミュレーション
Command:
$ cat takarakuji.c
Result:
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
void firstPrize(){
printf("%d組%d番\n", (rand() % 20 * 10) + (rand() % 10), ((rand() % 10 + 10) * 10000) + (rand() % 10000));
}
void secondPrize(){
printf("組下1ケタ%d組%d番\n", rand() % 10, ((rand() % 10 + 10) * 10000) + (rand() % 10000));
}
void thirdPrize(){
printf("各組共通%d番\n", ((rand() % 10 + 10) * 10000) + (rand() % 10000));
}
void fourthPrize(){
printf("下3ケタ%d番\n", rand() % 1000);
}
void fifthPrize(){
printf("下2ケタ%d番\n", rand() % 100);
}
void sixthPrize(){
printf("下1ケタ%d番\n", rand() % 10);
}
int main(){
srand((unsigned)time(NULL));
printf("1等7億円\n");
firstPrize();
printf("\n2等1500万円\n");
secondPrize();
printf("\n3等100万円\n");
thirdPrize();
printf("\n4等1万円\n");
fourthPrize();
printf("\n5等3000円\n");
fifthPrize();
printf("\n6等300円\n");
sixthPrize();
return 0;
}
Command:
$ gcc takarakuji.c -o takarakuji
$ ./takarakuji
Result:
1等7億円
93組160341番
2等1500万円
組下1ケタ8組117976番
3等100万円
各組共通166224番
4等1万円
下3ケタ984番
5等3000円
下2ケタ25番
6等300円
下1ケタ6番
$ cat takarakuji.c
Result:
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
void firstPrize(){
printf("%d組%d番\n", (rand() % 20 * 10) + (rand() % 10), ((rand() % 10 + 10) * 10000) + (rand() % 10000));
}
void secondPrize(){
printf("組下1ケタ%d組%d番\n", rand() % 10, ((rand() % 10 + 10) * 10000) + (rand() % 10000));
}
void thirdPrize(){
printf("各組共通%d番\n", ((rand() % 10 + 10) * 10000) + (rand() % 10000));
}
void fourthPrize(){
printf("下3ケタ%d番\n", rand() % 1000);
}
void fifthPrize(){
printf("下2ケタ%d番\n", rand() % 100);
}
void sixthPrize(){
printf("下1ケタ%d番\n", rand() % 10);
}
int main(){
srand((unsigned)time(NULL));
printf("1等7億円\n");
firstPrize();
printf("\n2等1500万円\n");
secondPrize();
printf("\n3等100万円\n");
thirdPrize();
printf("\n4等1万円\n");
fourthPrize();
printf("\n5等3000円\n");
fifthPrize();
printf("\n6等300円\n");
sixthPrize();
return 0;
}
Command:
$ gcc takarakuji.c -o takarakuji
$ ./takarakuji
Result:
1等7億円
93組160341番
2等1500万円
組下1ケタ8組117976番
3等100万円
各組共通166224番
4等1万円
下3ケタ984番
5等3000円
下2ケタ25番
6等300円
下1ケタ6番
Subscribe to:
Posts (Atom)