##路径截断与合并##
PathRemoveArgs 去除路径的参数
PathRemoveBackslash 去除路径最后的反斜杠 ""
PathAddBackslash 在路径最后加上反斜杠 ""
PathRemoveBlanks 去除路径前后的空格
##路径截断与合并##
PathRemoveArgs 去除路径的参数
PathRemoveBackslash 去除路径最后的反斜杠 ""
PathAddBackslash 在路径最后加上反斜杠 ""
PathRemoveBlanks 去除路径前后的空格
#include<windows.h> | |
#include<wininet.h> | |
#include<iostream> | |
using namespace std; | |
HANDLE hConnectedEvent, hRequestOpenedEvent, hRequestCompleteEvent; | |
HINTERNET hInstance, hConnect, hRequest; | |
char *lpszUrl, *lpszServer; | |
BOOL bAllDone = FALSE; |
sudo apt-get update && sudo apt-get upgrade | |
sudo apt-get install build-essential checkinstall libncurses5-dev curl | |
curl --o mysql-4.1.24.tar.gz http://mirror.provenscaling.com/mysql/community/source/4.1/mysql-4.1.24.tar.gz | |
sudo tar -xvzf mysql-4.1.24.tar.gz --directory=/usr/local/src | |
cd /usr/local/src/mysql-4.1.24/ | |
sudo groupadd mysql | |
sudo useradd -g mysql mysql | |
sudo apt-get install | |
sudo ./configure --prefix=/usr/local/mysql | |
sudo make |
bool GetImageSize(const char *fn, int *x,int *y) | |
{ | |
FILE *f=fopen(fn,"rb"); | |
if (f==0) return false; | |
fseek(f,0,SEEK_END); | |
long len=ftell(f); | |
fseek(f,0,SEEK_SET); | |
if (len<24) { | |
fclose(f); | |
return false; |
// Generated by gfwlist2pac | |
// https://github.com/clowwindy/gfwlist2pac | |
var domains = { | |
"gimpshop.com": 1, | |
"directcreative.com": 1, | |
"speedpluss.org": 1, | |
"mingpaovan.com": 1, | |
"wikinews.org": 1, | |
"joachims.org": 1, |
//设置标题栏透明度 | |
Window window = getWindow(); | |
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS | |
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); | |
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | |
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | |
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE); | |
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); |
var crypto = require('crypto') | |
, fs = require('fs') | |
// Algorithm depends on availability of OpenSSL on platform | |
// Another algorithms: 'sha1', 'md5', 'sha256', 'sha512' ... | |
var algorithm = 'sha1' | |
, shasum = crypto.createHash(algorithm) | |
// Updating shasum with file content | |
var filename = __dirname + "/anything.txt" |
/** | |
* 构建TCP客户端 | |
*/ | |
const fs = require('fs'); | |
/* 引入net模块 */ | |
var net = require("net"); | |
/* 创建TCP客户端 */ | |
var client = net.Socket(); |
/** | |
* 构建TCP客户端 | |
*/ | |
const fs = require('fs'); | |
/* 引入net模块 */ | |
var net = require("net"); | |
const uuidv1 = require('uuid/v1'); | |
async function main(){ |