Skip to content

Instantly share code, notes, and snippets.

View daoleno's full-sized avatar
🤘
rock & roll

daoleno daoleno

🤘
rock & roll
View GitHub Profile
@daoleno
daoleno / 代理设置.md
Last active January 8, 2018 11:51
虚拟机内爬墙
  1. 虚拟机网络为 NAT 模式
  2. 将虚拟机内代理设置成主机IP,端口为shadowsocks端口(1080)
  3. shadowsocks 选中 允许来自局域网的链接
@daoleno
daoleno / python_repr_vs_str.md
Last active January 4, 2018 12:08
[python] repr vs str
@daoleno
daoleno / meaningfulConst.md
Last active December 25, 2017 06:45
Meaningful const in Function Declarations
void F(int);                     // 1: declaration of F(int)
void F(const int);               // 2: re-declaration of F(int)
void F(int) { /* ... */ }        // 3: definition of F(int)
void F(const int) { /* ... */ }  // 4: error: re-definition of F(int)
void F(const int* x);                  // 1
void F(const int& x); // 2
@daoleno
daoleno / extern "C" 的作用.md
Created December 11, 2017 07:35
mix C and C++

To ensure that the names declared in that portion of code have C linkage, and thus C++ name mangling is not performed

#ifdef __cplusplus
extern "C" {
#endif

void *memset (void *, int, size_t);
char *strcat (char *, const char *);
int   strcmp (const char *, const char *);
char *strcpy (char *, const char *);
@daoleno
daoleno / 递推 贪心 搜索 DP
Last active September 24, 2016 11:09
状态传递
每个阶段只有一个状态->递推;
每个阶段的最优状态都是由上一个阶段的最优状态得到的->贪心;
每个阶段的最优状态是由之前所有阶段的状态的组合得到的->搜索;
每个阶段的最优状态可以从之前某个阶段的某个或某些状态直接得到而不管之前这个状态是如何得到的->动态规划。