Skip to content

Instantly share code, notes, and snippets.

View seungwonpark's full-sized avatar

Seung-won Park seungwonpark

View GitHub Profile
PFont f;
int state[] = new int[10];
int col[] = {255,127,1};
int des[] = new int[10];
Table table;
int f(int z){
if(19 < z && z < 380){
return (z-20)/120;
}
else return -1;
@seungwonpark
seungwonpark / main.tex
Created April 26, 2016 01:34
Example : .loe needed in TeX.gitignore
\documentclass[11pt]{report}
\usepackage[left=25mm,right=25mm,top=30mm,bottom=30mm]{geometry}
\usepackage{amsmath} % math
\usepackage{amssymb} % math
\usepackage[hidelinks]{hyperref}
\usepackage{titlesec}
\usepackage{amsthm}
\usepackage{lipsum}
\usepackage{thmtools}
\usepackage{comment}
@seungwonpark
seungwonpark / main.loe
Created April 26, 2016 04:31
*.loe and *.toc
\addvspace {10\p@ }
\contentsline {theorem}{\numberline {1.1.1}Theorem}{3}{theorem.1.1.1}
@seungwonpark
seungwonpark / 19-3-4.cpp
Last active October 21, 2017 12:31
고급물리학 19-3-4, 29-3-2번 전산모사코드(RK4사용)
#include<stdio.h>
#include<math.h>
#define h 0.04
double a = 1; // alpha : (eB_0)/m
double e = 0.6666; // collison coefficient
double f1(double x,double y,double xv,double yv){ // dx/dt
return xv;
}
double f2(double x,double y,double xv,double yv){ // dy/dt
return yv;
@seungwonpark
seungwonpark / koistudy_icon.tex
Created September 1, 2016 04:24
koistudy_icon
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shadows}
\definecolor{KOIyellow}{RGB}{255,204,51}
\definecolor{KOIred}{RGB}{255,0,51}
\definecolor{KOIgreen}{RGB}{0,204,51}
\begin{document}
\begin{tikzpicture}
\draw[white] (0,0) -- (4.5,0) -- (4.5,2.7);
@seungwonpark
seungwonpark / rutherford_noprint.m
Created September 13, 2016 16:09
Rutherford Scattering Simulation
echo off;
h = 0.02; % RK4 time step
n = 1000; % number of random test particles
maxR = 10;
function A = calc(X)
rval = norm([X(1); X(2)]).^(-3); % r^(-3)
W = [
0 0 1 0;
0 0 0 1;
rval 0 0 0;
@seungwonpark
seungwonpark / gshs_fake_outpass.tex
Created December 4, 2016 10:04
gshs_fake_outpass
% !TeX program = xelatex
% TeXlive 2016, mactex 2016 기준
\documentclass[12pt]{article}
\usepackage[%
left=51.9mm,%
right=71.0mm,%
top=12.5mm,%
bottom=25.4mm,%
headheight=0mm,%
headsep=0mm,%
@seungwonpark
seungwonpark / New_Profile_Picture_4.tex
Created March 30, 2017 15:58
Profile picture(made with tikz)
\documentclass{standalone}
\usepackage{tikz,pgffor}
\usetikzlibrary{spy}
\begin{document}
\begin{tikzpicture}
[spy using overlays={circle, magnification=1.0,size=150}]
\fill[color=black] (0,0) rectangle (10,10);
\filldraw[fill=white, draw=black] (5,5) circle [radius=5];
\foreach \i in {5,15,...,355}{
\fill[black] (5,5) -- ( {5+5*cos(\i)} , {5+5*sin(\i)} ) arc [start angle = \i, end angle = \i+5, radius = 5] -- (5,5);
@seungwonpark
seungwonpark / happyBday-LaTeX.tex
Created May 27, 2017 02:36
생일축하해-\LaTeX style
\documentclass{standalone}
\usepackage{kotex}
\makeatletter
\DeclareRobustCommand{\stdLaTeXbDay}{생\kern-.36em
{%
\sbox\z@ T%
\vbox to\ht0{\hbox{$\m@th$%
\csname S@\f@size\endcsname
\fontsize\sf@size\z@
\math@fontsfalse\selectfont
\documentclass{article}
\newcount\x
\newcount\i
\def\collatz#1{
\x #1 \relax
\calccollatz
}
\def\calccollatz{
\ifnum\x=1
\the\x