Skip to content

Instantly share code, notes, and snippets.

@nomissbowling
nomissbowling / d_master.md
Created May 29, 2021 02:48 — forked from kasoku/d_master.md
D言語基礎文法最速マスター

他の言語をある程度知っている人はこれを読めばD言語の基礎をマスターでき,D言語の氷山の一角くらいは知ることができると思います.対象バージョンはdmd 2.059です.

1. 基礎

ソースファイル

ASCIIかUTFしか受け付けません.それ以外の文字コードで書くとコンパイルエラーになります.

main

D言語のmainはCとは違い以下のようなシグネチャです.

@nomissbowling
nomissbowling / electronics.md
Last active February 6, 2023 03:37
electronics
@nomissbowling
nomissbowling / ode_download.md
Created August 4, 2021 01:44 — forked from KobayashiRui/ode_download.md
簡単!実践!ロボットシュミレーションを使用してODEを勉強していくなかで気づいたことなど をメモしていく 最終的には自分がイメージしたものをすぐ描けるようなプログラムにしていく

ODE

物理演算シュミレーター
GUIにOpenGl等を使用することができる

ダウンロード

ode自体のダウンロード

自分のbitbucket codepracticeの中にあるode-0.13.tar.bz2を他の場所にコピーし、
解凍する

###事前に必要なパッケージ

@nomissbowling
nomissbowling / interpolation_and_convert_png_to_ppm.py
Created August 21, 2021 04:29
interpolation_and_convert_png_to_ppm.py
SRC_BASE = f'{BASE}/misc'
SRC_BITMAP_8x8 = f'{SRC_BASE}/bmp_hex_136x8.png'
SRC_BITMAP_16x16 = f'{SRC_BASE}/bmp_hex_256x256_16x16.png'
PPM_BASE = f'{BASE}/textures'
PPM_TEXTURE_8x8 = f'{PPM_BASE}/custom_%c.ppm'
PPM_TEXTURE_16x16 = f'{PPM_BASE}/ascii_%02X.ppm'
cols = [
(0xff, 0x00, 0xff),
(0xff, 0x00, 0x00),
@nomissbowling
nomissbowling / try-catch-ex.c
Created September 7, 2021 05:22 — forked from rampion/try-catch-ex.c
TRY/CATCH/FINALLY macros for C
// gcc -o try-catch-ex try-catch.c try-catch-ex.c
#include <stdio.h>
#include "try-catch.h"
// Example of use for try-catch.h
int main(int argc, char *argv[])
{
int i = 101;
printf("before try block...\n");
@nomissbowling
nomissbowling / pico-pcd8544-test.py
Created September 17, 2021 11:51 — forked from Akkiesoft/pico-pcd8544-test.py
PCD8544 (Nokia 5110) LCD sample for Raspberry Pi Pico
# PCD8544 (Nokia 5110) LCD sample for Raspberry Pi Pico
# Required library:
# https://github.com/mcauser/micropython-pcd8544
# And this sample script is based on above repository.
# Connections:
# [pcd8544:pico(physical pin)]
# Gnd: Pico GND (38)
# BL : Pico GP28(34)
# Vcc: Pico 3V3 (36)
@nomissbowling
nomissbowling / msvc2012-std-chrono-accuracy.md
Created September 20, 2021 03:06 — forked from t-mat/msvc2012-std-chrono-accuracy.md
MSVC++2012の std::chrono の精度はどれくらい?

std::chrono の精度はどれくらい?

短いまとめ

MSVC++2012 の std::chrono 下にあるクラスの時間精度は、良くてミリ秒オーダだと思ったほうが良い

MSVC++2012 の std::chrono の定義

  • まとめ:std::chrono 下の全クラスは時刻取得に _Xtime_get_ticks() を用いている
@nomissbowling
nomissbowling / helloworld-win32-service.py
Created October 21, 2021 00:16 — forked from drmalex07/helloworld-win32-service.py
An example Windows service implemented with pywin32 wrappers. #python #windows-service #pywin32
import win32serviceutil
import win32service
import win32event
import servicemanager
import socket
import time
import logging
logging.basicConfig(
filename = 'c:\\Temp\\hello-service.log',
@nomissbowling
nomissbowling / ServiceMain.cpp
Created October 21, 2021 02:14 — forked from bg1bgst333/ServiceMain.cpp
ServiceMain#ServiceMain
// ヘッダファイルのインクルード
#include <windows.h> // 標準WindowsAPI
#include <tchar.h> // TCHAR型
#include <stdio.h> // 標準入出力
// 関数プロトタイプ宣言
VOID WINAPI ServiceMain(DWORD dwArgc, LPTSTR * lpszArgv); // サービスの中核処理.
VOID WINAPI Handler(DWORD fdwControl); // サービス制御要求に対するハンドラ処理.
// グローバル変数の初期化.
@nomissbowling
nomissbowling / MyApp.cpp
Created October 21, 2021 02:15 — forked from code-walkers/MyApp.cpp
Writing win32 Service Application
/*The win32 service runs with its current working directory set to C:\Windows\System32
*You might need to place anyrun-time configuration scripts there.
*If you run into any confusion with the above detail, it is worthwhile to
*set the current working directory to your application installation directory like I did
*/
MyApp::OnInit()
{
//
//