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<ShObjIdl.h> | |
#include<ShlObj.h> | |
#include<fstream> | |
LPWSTR TrimQuote(LPWSTR str) | |
{ | |
int ifrom = 0, ito = 0; | |
while (str[ifrom]) | |
{ | |
if (str[ifrom] != '\"') |
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<iostream> | |
#include<string> | |
#include<Windows.h> | |
#include<TlHelp32.h> | |
DWORD QueryFirstPIDOfProcessName(LPCWSTR pn) | |
{ | |
PROCESSENTRY32 pe; | |
pe.dwSize = sizeof pe; | |
HANDLE hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); | |
for (BOOL notend = Process32First(hProcessSnap, &pe); notend; notend = Process32Next(hProcessSnap, &pe)) |
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
//手动解析32位浮点数(1位符号+8位阶码(指数)+23位尾数) | |
#define BITS_SIGN 1 | |
#define BITS_EXP 8 | |
#define BITS_TAIL 23 | |
#include<stdio.h> | |
#include<string.h> | |
#include<math.h> | |
#define GetBit(n,bit) (((n)>>(BITS_SIGN+BITS_EXP+BITS_TAIL-1-(bit)))&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
//采用OpenCV轮廓匹配判断两个简单图片是否相似或一致 | |
#include <iostream> | |
#include <opencv/cv.hpp> | |
//测试图片B是否与图片A相似,越接近0表示越相似,反之不相似 | |
//IplImage到Mat转换:http://blog.sina.com.cn/s/blog_534497fd01015k7z.html | |
//参考:http://blog.csdn.net/qq_18343569/article/details/48004201 | |
//参考:http://blog.csdn.net/qq_15947787/article/details/72773893 | |
double TestDifference(const IplImage *imgA, const IplImage *imgB, int method = CV_CONTOURS_MATCH_I1, | |
double thresholdA1 = 50, double thresholdA2 = 60, double thresholdB1 = 50, double thresholdB2 = 60) |
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
//该脚本用于激活 Office 2016. | |
//This script is written for activating Office 2016. | |
//如果有Bug或者任何疑问请邮件联系 [email protected] 或微博 lxfly2000. | |
//Any bugs or questions please contact me at [email protected] or lxfly2000 on Weibo. | |
//使用方法:在管理员模式下执行命令行“officevl <KMS服务器>” | |
//Usage: Run this command with Administrator "officevl <KMS Server>" | |
var sn="XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99";//激活序列号,可到 https://technet.microsoft.com/zh-cn/library/dn385360(v=office.16).aspx 上找。 | |
var kmsserver="";//在此处填入KMS服务器地址 | |
if(WScript.Arguments.length>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
//pmd参考:https://github.com/mistydemeo/pmdmini | |
#pragma comment(lib,"PMDWin\\PMDWin.lib") | |
#pragma comment(lib,"mfreadwrite.lib") | |
#pragma comment(lib,"mfplat.lib") | |
#pragma comment(lib,"mfuuid.lib") | |
#include<Windows.h> | |
#include<mfidl.h> | |
#include<mfapi.h> | |
#include<mfreadwrite.h> | |
#define _WINDOWS |
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
#coding=utf-8 | |
import tkinter | |
import tkinter.ttk | |
import tkinter.messagebox | |
tkMain=tkinter.Tk() | |
def canvas_on_resize(event): | |
tkMain.title("Canvas size: %dx%d"%(event.width,event.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
//用Windows Media Foundation将任何Windows支持的音频文件转换成MP3格式文件,仅限Windows 8(NT6.2)及以上操作系统。 | |
#include<new> | |
#include<iostream> | |
#include<string> | |
#include<locale.h> | |
#include<Windows.h> | |
#include<mfapi.h> | |
#include<mfidl.h> | |
#include<Shlwapi.h> | |
#pragma comment(lib,"mfplat.lib") |
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> | |
unsigned short c[22167]; | |
void testmain(std::string¶m) | |
{ | |
bool enable_cout = true; | |
if (param[0] == '@') | |
{ | |
enable_cout = false; |
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
#coding:utf-8 | |
#Python 3.6, 3.7 | |
#该脚本目前需要配合AnimeSchedule一起使用。(https://github.com/lxfly2000/AnimeSchedule) | |
import json | |
import urllib.request | |
#测试有效性,成功返回1,失败返回0,非B站网页返回2 | |
def testBilibiliURL(title,src_url): |