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
/* | |
static_cast<type>(var) 静态类型转换,编译的时c++编译器会做类型检查 | |
基本类型(int,float...void*)能转换,通过继承关系的类之间也能相互转换 | |
但是不能转换不同指针类型 | |
*/ | |
#include <iostream> | |
using namespace std; | |
struct S1{ |
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
||https://imgcache.qq.com/ptlogin/v4/style/20/images/shouQ_v2/small_24_tiny.png |
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
menuentry "Boot Ubuntu ISO" { | |
set root=(hd1,msdos4) | |
set isofile=/lubuntu-16.04.3-desktop-amd64.iso | |
loopback loop $isofile | |
linux (loop)/casper/vmlinuz.efi persistent boot=casper iso-scan/filename="$isofile" quiet splash ro locale=zh_CN.UTF-8 noprompt -- | |
initrd (loop)/casper/initrd.lz | |
} | |
menuentry "Boot ArchLinux ISO" { |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# 用于打印dante.conf的socks pass/block的 | |
# 目标规则(Target IPs) | |
# Document: https://www.inet.no/dante/doc/1.4.x/sockd.conf.5.html | |
TELEGRAM_PASS_CIDR=( | |
"91.108.4.0/22", | |
"91.108.8.0/21", |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Date: 2018-06-06 | |
# NekoSMS filters print/encode | |
import json | |
# print keyword from json | |
def print_kw(filename): |
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 <QCoreApplication> | |
#include <QDebug> | |
#include "qt_gbk_stringdecoder.h" | |
#include "qt_gbk_strs.h" | |
int main(int argc, char *argv[]) | |
{ | |
//QCoreApplication a(argc, argv); | |
#if QT_VERSION < 0x050000 |
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
--style=kr | |
--indent=spaces=4 | |
--attach-inlines | |
--indent-cases | |
--indent-col1-comments | |
--break-blocks | |
--pad-oper | |
--align-pointer=type | |
--align-reference=type | |
--max-code-length=100 |
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 "Person.h" | |
#include "PersonPrivate.h" | |
#include "cpp14_pointers.h" | |
Person::Person(std::string name): | |
pimpl(std::make_unique<PersonPrivate>(name)) | |
{ | |
} | |
Person::~Person() |
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
# source from phuslu | |
# https://phus.lu/sysctl.conf | |
# bbr | |
net.core.default_qdisc=fq | |
net.ipv4.tcp_congestion_control=bbr | |
net.ipv4.tcp_retries2 = 8 | |
# 系统所有进程一共可以打开的文件数量, 每个套接字也占用一个文件描述字 |
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 Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\background\shell\git_shell] | |
@="Git Ba&sh Here" | |
"Icon"="D:\\Program_Files\\Git\\git-bash.exe" | |
[HKEY_CLASSES_ROOT\Directory\background\shell\git_shell\command] | |
@="\"D:\\Program_Files\\Git\\git-bash.exe\" \"--cd=%v.\"" | |
[HKEY_CLASSES_ROOT\Directory\shell\git_shell] |