Skip to content

Instantly share code, notes, and snippets.

@sunday1103
sunday1103 / 将git commit信息嵌入可执行文件.md
Created July 13, 2019 15:29
将git commit信息嵌入可执行文件
#include <stdio.h>
int main()
{
    printf("GIT COMMIT:\n%s\n", GIT_COMMIT);
    return 0;
}
 
设置代理
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
@sunday1103
sunday1103 / 输入输出.md
Last active April 14, 2017 10:43
C++输入输出

输出时间格式

输出例子:<序号=1,进站时间=08:01,进站站点=S1,出站时间=09:30,出站站点=S10,消费金额=4>

ostringstream oss;
oss << "<序号=" << index <<",进站时间=";
oss <<setfill('0') ;
oss <<setw(2)<<log[i].enterTime.hour<<":"<<setw(2)<<log[i].enterTime.minutes;

oss <<",进站站点="<<log[i].enterStation<<",出站时间=";
oss &lt;