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
| #Requires AutoHotkey v2.0 | |
| #NoTrayIcon | |
| OldColor := "" | |
| TitlePrior := "" | |
| Title := "" | |
| LTickCound := 0 | |
| RTickCound := 0 |
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
| #pragma once | |
| #include <wrl.h> | |
| #include <comutil.h> | |
| #include <vector> | |
| #include <string> | |
| #include <atlbase.h> | |
| #include <comdef.h> | |
| // |
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 cv2 | |
| import numpy as np | |
| def preprocess_image(image): | |
| # 二值化 | |
| gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) | |
| _, threshold = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY) | |
| cv2.imwrite("01_threshold.jpg", threshold) | |
| return threshold |
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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdbool.h> | |
| #include <time.h> | |
| #include <windows.h> | |
| #include <libavcodec/avcodec.h> | |
| #include <libavformat/avformat.h> | |
| //#include <libavutil/frame.h> | |
| #include <SDL2/SDL.h> |
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
| javascript: | |
| timeout=prompt("Set timeout [s]"); | |
| countdown=0; | |
| current=location.href; | |
| if(timeout>0) | |
| reload(); | |
| else | |
| location.replace(current); | |
| function reload(){ | |
| if(countdown <= 0) { |
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 <thread> | |
| struct pipe | |
| { | |
| pipe() | |
| { | |
| SECURITY_ATTRIBUTES sa = { sizeof(sa), nullptr,true}; | |
| CreatePipe(&read, &write, &sa, 0); |
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 <tchar.h> | |
| #include <dbghelp.h> | |
| #include <string> | |
| #include "crash_dumper.h" | |
| #ifdef UNICODE | |
| # define tstring wstring |
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
| EXTERN_C IMAGE_DOS_HEADER __ImageBase; | |
| #define CURRENT_HINSTANCE ((HINSTANCE)&__ImageBase) | |
| CImage image; | |
| image.LoadFromResource(CURRENT_HINSTANCE, IDB_BG); | |
| m_bg.Attach(image.Detach()); | |
| m_dc_bg.CreateCompatibleDC(); | |
| m_dc_bg.SelectBitmap(m_bg); |
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
| class MyFileSystemModel(QFileSystemModel): | |
| changed = pyqtSignal(str, int, int) | |
| def __init__(self, parent=None): | |
| self.checks = {} | |
| super(MyFileSystemModel, self).__init__() | |
| def flags(self, index): | |
| return super(MyFileSystemModel, self).flags(index) | Qt.ItemIsUserCheckable |
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
| static bool | |
| has_arg(int argc, char **argv, const char *arg) | |
| { | |
| for (int i = 1; i < argc; i++) { | |
| if (strcmp(argv[i], arg) == 0) { | |
| return true; | |
| } | |
| } | |
| return false; | |
| } |
NewerOlder