This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 構造化例外時のログ出力とか | |
| struct ExceptionUtils | |
| { | |
| // インスタンス作成 | |
| static ExceptionUtils* Get() | |
| { | |
| static ExceptionUtils instance; | |
| return &instance; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Windows.h> | |
| #include <iostream> | |
| #include <sstream> | |
| #pragma comment(lib,"dbghelp.lib") | |
| #include <DbgHelp.h> | |
| // スコープの開始と終了を出力する | |
| struct PrintScope | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class TestC { | |
| public float Add(float x, float y) { | |
| return x + y; | |
| } | |
| public float TestM() { | |
| var x = 1; | |
| var y = 2; | |
| return Add(x, y); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // アセンブリで定義されている型を全て取得 | |
| foreach (var type in assembly.GetTypes()) { | |
| foreach (var method in type.GetMethods()) { | |
| var methodBody = method.GetMethodBody(); | |
| if (methodBody == null) { | |
| Console.WriteLine("{0}", method); | |
| Console.WriteLine("{"); | |
| Console.WriteLine("}"); | |
| continue; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| D3DXVECTOR3 b1, b2, d; | |
| float s1 = 100.0f; | |
| float s2 = 50.0f; | |
| float g = 9.8f; | |
| float t = 0.0f; | |
| void Bullet::Move() | |
| { | |
| D3DXVECTOR3 X, Y, Z; | |
| D3DXMATRIX m; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| D3DXVECTOR3 bulletPos; //弾丸の現在位置 | |
| D3DXVECTOR3 preBulletPos; //1フレーム前の弾丸の位置 | |
| D3DXVECTOR3 moveDirection; //弾丸の移動方向 | |
| float bulletHorizontalSpeed = 100.0f; //弾丸水平方向の速度 | |
| float bulletVerticalSpeed = 50.0f; //弾丸の垂直方向の速度 | |
| float gravity = 9.8f; //重力 | |
| /// <summary> | |
| /// 弾丸の移動処理 | |
| /// </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import m5stack as m5 | |
| from m5stack import lcd | |
| import time | |
| import ujson | |
| import urequests | |
| class Weather: | |
| def __init__(self): | |
| self.base_url = 'http://api.openweathermap.org/data/2.5/weather?q={}&appid={}' | |
| self.api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxx' #openweathermapの開発用API key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.ComponentModel.Composition; | |
| using System.Runtime.InteropServices; | |
| using Microsoft.VisualStudio; | |
| using Microsoft.VisualStudio.Editor; | |
| using Microsoft.VisualStudio.OLE.Interop; | |
| using Microsoft.VisualStudio.Text.Editor; | |
| using Microsoft.VisualStudio.TextManager.Interop; | |
| using Microsoft.VisualStudio.Utilities; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using UnityEngine; | |
| public partial class Bitmap | |
| { | |
| private const int lanczosDefaultN = 3; | |
| private Bitmap resizeLanczos(uint width, uint height, uint range = lanczosDefaultN) | |
| { | |
| var bitmap = new Bitmap(width, height); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Runtime.InteropServices; | |
| namespace MouseUnderScroll | |
| { | |
| // Win32API | |
| public class WinAPI | |
| { | |
| [StructLayout(LayoutKind.Sequential)] | |
| public struct POINT |