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
//采用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
//手动解析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
#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
#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
#Pixiv Start | |
210.129.120.44 pixiv.net | |
210.129.120.43 pixiv.net | |
210.129.120.41 pixiv.net | |
210.129.120.44 www.pixiv.net | |
210.129.120.43 www.pixiv.net | |
210.129.120.41 www.pixiv.net | |
210.140.131.144 source.pixiv.net | |
210.140.131.147 source.pixiv.net | |
210.140.131.145 source.pixiv.net |
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
//参考:http://www.yueshou.net/jiao/shuma/yingjian/200608/14735.html | |
#include<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
#define stricmp _stricmp | |
struct RMIDHeader | |
{ | |
char strRIFF[4]; | |
int chunkSize; | |
char strFormat[4]; |
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<fstream> | |
#include<string> | |
#define max(a,b) ((a)>(b)?(a):(b)) | |
#define min(a,b) ((a)<(b)?(a):(b)) | |
#define abs(x) ((x)>0?(x):-(x)) | |
typedef short DataStructure_16BitMono; | |
struct WaveStructure | |
{ | |
char strRIFF[4]; |
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
//Lua与C交互示例,参考:http://blog.csdn.net/shun_fzll/article/details/39120965 | |
#include<stdio.h> | |
#include<string.h> | |
#include"lua.h" | |
#include"lualib.h" | |
#include"lauxlib.h" | |
#pragma comment(lib,"lua53.lib") | |
#define C(action,r) if(r=action)return r | |
#define LVAR_NAME "luanum" | |
const char luasource[] = |
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
//参考:http://blog.csdn.net/friendan/article/details/12222651 | |
//目前只能对自身进程Hook。 | |
#ifndef WIN32 | |
#error 该程序目前只能在 x86 平台中使用。 | |
#endif | |
#include<Windows.h> | |
using FUNCTYPE = decltype(MessageBox); | |
FUNCTYPE *funcOriginal = nullptr; | |
DWORD protectOriginal; | |
bool hookOn = false; |