- 项目名 不能是 test,不能含中文
作者: junhao
unreal4.25.3编译安装
- 安装vs2019,按照这篇文章选择需要安装的组件
- 从github上https://github.com/EpicGames/UnrealEngine/releases下载4.25.3的release的tar.gz(200多M,压缩前1g多)。
- 解压源代码。记得将这个文件夹深度少一些,不然后面可能会因为 文件夹+文件名 长过windows的限制,而运行Setup.bat的99%时运行失败。
- Setup.bat——》GenerateProjectFiles.bat——》生成UE4.sln——》启动vs进行编译。Setup.bat,较快时5M/s下载的话,Setup.bat下载依赖大概90min,会卡99%,99%后下载极慢。
- vs编译见这篇文章
mysql 修改密码
set password for 'jeff'@'localhost' = PASSWORD('mypass'); // this automatically hashes the password
c++ 按行处理
#include <iostream>
#include <cstdio>
#include <unordered_map>
#include <string>
#include <sstream>
using namespace std;
int main() {
string line;
while (getline(cin, line)) {
istringstream linestream(line);
int sum=0;
int x;
while (linestream >> x) {
sum += x;
}
cout<<sum<<endl;
}
}
ubuntu18 zsh安装
mysql docker部署
docker pull mysql:5.7
docker run --name ContainerName -p 13307:3306 -v /home/mjh/mysqls/1/datadir:/var/lib/mysql -v /home/mjh/mysqls/1/home:/home -e MYSQL_ROOT_PASSWORD=MyRootPassword -d mysql:5.7
nginx日志中找出所有来源
cat /home/log/nginx/* | awk ‘{print $13}’ | g
awk ‘{match($0, /”http(s?):\/\/([^\/]+)\/(.*)”/, a); print a[2]}’ | sort | uniq -u > ~/trash/1.txt
显示mysql数据库当前连接情况
// 方法一:
SELECT USER,SUBSTRING_INDEX(HOST,':',1) AS IP,COUNT(1) AS Total FROM INFORMATION_SCHEMA.PROCESSLIST GROUP BY IP ORDER BY Total DESC;
// 方法二:
SELECT substring_index(host, ':',1) AS host_name,state,count(*) FROM information_schema.processlist GROUP BY state,host_name;
centos7 add sudo user
stl::unordered_map
可以用m.count(key)来判断一个key是否存在。返回1表示存在,返回0表示不存在。
注意,就算不写如m[key],而仅仅是读取m[key],也会导致m.count(key) = 1;