Skip to content

Instantly share code, notes, and snippets.

factor[n_] := Reverse[Flatten[
Map[Table[#[[1]], {#[[2]]}] &, FactorInteger[n]]]]
On[Assert];
Assert[factor[24] == {3, 2, 2, 2}];
draw[origin_, frame_, delta_, {p_, rest___}, start_] := {
Circle[origin, frame],
With[{r = If[p == 1, 1, frame Sin[Pi/p]/(1 + Sin[Pi/p])]},
Table[
@aminophen
aminophen / tcpdfcrop.bat
Last active August 14, 2019 03:02 — forked from zr-tex8r/tcpdfcrop.bat
ZR氏による「バッチで作る、劣化版pdfcrop」の改善版
@echo off
echo tcpdfcrop v0.9.4 (2015-08-06)
setlocal
if /I "%~1"=="/h" (
set BBOX=HiResBoundingBox
shift
) else (
set BBOX=BoundingBox
)
set FROMDIR=%~dp1