Skip to content

Instantly share code, notes, and snippets.

View okathira's full-sized avatar
🤲

Takahiro okathira

🤲
View GitHub Profile
@okathira
okathira / 総合原価計算.txt
Last active March 23, 2023 10:26
先入先出法での単純総合原価計算,2等級別総合原価計算|高精度計算サイト https://keisan.casio.jp/exec/user/1608773570
/*
d = 期首仕掛品量; d = 期首仕掛品加工進捗度;
d = 当期投入量;
d = 当期完成品量;
d = 期末仕掛品量; d = 期末仕掛品加工進捗度;
d = 期首仕掛品材料費; d = 期首仕掛品加工費;
d = 当期投入材料費; d = 当期投入加工費;
*/
@okathira
okathira / radar.cpp
Last active March 20, 2021 11:27
OpenSiv3Dでレーダーロックオン https://twitter.com/okathira/status/1373152804739551233
#include <Siv3D.hpp> // OpenSiv3D v0.4.3
void Main() {
// フレームレート
constexpr std::array<int32, 6> framerates = {15, 30, 60, 120, 165, 240};
size_t index = 4;
Graphics::SetTargetFrameRateHz(framerates[index]);
Window::Resize(600, 600);
Scene::SetBackground(Palette::Black);
@okathira
okathira / Pythagoras.java
Last active February 18, 2021 16:43
show or count non-duplicated Pythagorean triple (a < b < c) combinations in JAVA. OEIS: http://oeis.org/A046083, http://oeis.org/A046084, http://oeis.org/A009000
package pythagoras;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
public class Pythagoras {
static private class Triples {
private int a;
private int b;
@okathira
okathira / PDF_resizer.ps1
Created June 17, 2019 00:20
Resize PDF (A6) with Ghostscript.
Param($pdfsrc)
$pdfout = (Get-Item $pdfsrc).DirectoryName + "\" + (Get-Item $pdfsrc).BaseName + "_resizedA6.pdf"
echo "$pdfsrc"
echo "$pdfout"
gswin64c.exe -sDEVICE=pdfwrite -sPAPERSIZE=a6 -dFIXEDMEDIA -dPDFFitPage -o $pdfout $pdfsrc
@okathira
okathira / App_volume_device_preferences.ps1
Last active January 21, 2022 08:16
Open preference of individual app volume in Windows 10 (deprecated)
$OutputEncoding='utf-8'
Add-type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName Microsoft.VisualBasic
# original Send-Keys by @nimzo6689
# https://qiita.com/nimzo6689/items/488467dbe0c4e5645745
<#