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 <string> | |
| int main() { | |
| for (int i = 0; i < 26; ++i) { | |
| TCHAR szDrive[] = { (TCHAR)('A' + i), L':', L'\\', L'\0' }; | |
| if (!GetVolumeInformation(szDrive, NULL, NULL, NULL, NULL, NULL, NULL, 0)) continue; // 真が返れば、ディスクはあるようだ | |
| if (GetDriveType(szDrive) != DRIVE_CDROM) 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
| #include <windows.h> | |
| #include <iostream> | |
| #include <string> | |
| #define DRIVE_LETTER L"D:" | |
| #pragma comment(lib, "winmm.lib") | |
| DWORD OpenCd(MCI_OPEN_PARMS *pMciOpenParms) { |
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 sys | |
| import os | |
| class Audacity: | |
| def __init__(self): | |
| if sys.platform == 'win32': | |
| TONAME = '\\\\.\\pipe\\ToSrvPipe' | |
| FROMNAME = '\\\\.\\pipe\\FromSrvPipe' | |
| self._EOL = '\r\n\0' | |
| else: |
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 ctypes | |
| user32 = ctypes.windll.user32 | |
| def get_titles(): | |
| titles = [] | |
| def foreach_window(hwnd, lparam): | |
| length = user32.GetWindowTextLengthW(hwnd) | |
| buf = ctypes.create_unicode_buffer(length + 1) | |
| user32.GetWindowTextW(hwnd, buf, length + 1) |
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 sys | |
| import os | |
| import base64 | |
| import json | |
| import urllib.request | |
| import urllib.parse | |
| api_key = os.environ['TWITTER_API_KEY'] | |
| api_key_secret = os.environ['TWITTER_API_KEY_SECRET'] | |
| bearer_token = os.environ['TWITTER_BEARER_TOKEN'] |
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 sys | |
| import os | |
| import base64 | |
| import json | |
| import urllib.request | |
| import urllib.parse | |
| api_key = os.environ['TWITTER_API_KEY'] | |
| api_key_secret = os.environ['TWITTER_API_KEY_SECRET'] |
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
| function calculateChecksum(d) { | |
| const a = d[5] | |
| const b = d[6] | |
| const c = d[7] | |
| const data = d[8] | |
| const result = 0x80 - (a + b + c + data) % 0x80 | |
| return result | |
| } |
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 pretty_midi | |
| import math | |
| midi_data = pretty_midi.PrettyMIDI('TEST.RCP.MID') | |
| duration_seconds = midi_data.get_end_time() | |
| print(math.ceil(duration_seconds)) |
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
| // This file was initially generated by Windows Terminal 1.0.1401.0 | |
| // It should still be usable in newer versions, but newer versions might have additional | |
| // settings, help text, or changes that you will not see unless you clear this file | |
| // and let us generate a new one for you. | |
| // To view the default settings, hold "alt" while clicking on the "Settings" button. | |
| // For documentation on these settings, see: https://aka.ms/terminal-documentation | |
| { | |
| "$schema": "https://aka.ms/terminal-profiles-schema", |
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
| net.core.default_qdisc=fq | |
| net.ipv4.tcp_congestion_control=bbr |
NewerOlder