Skip to content

Instantly share code, notes, and snippets.

#include <windows.h>
#include <tchar.h>
#include <windowsx.h>
bool mouseHover = false;
bool menuUp = false;
HWND hWMenu, hWndMain;
LRESULT CALLBACK WndProcMenu(
_In_ HWND hWnd,
#include <stdint.h>
#include <cstddef>
#include <type_traits>
#include <cstring>
#include <cstdio>
template <size_t Size>
struct MinimumTypeHelper {
typedef
typename std::conditional<Size == 0 , void,

上个月,我看到 swoole 的那件事的时候,我感叹说,中国的开源圈和世界怕是有生殖隔离

这次又看到了 breakwa11 被人肉,一帮围观群众叫好的时候,我想我看明白了,之前想得太错,这不是两个人撕逼的问题,而是

中文世界就没有什么开源圈

我不是在说中国没有人开放自己的代码,分享自己的工作,和其他人交流自己的想法,传播有价值的东西。

到处都是,GitHub 上就不缺少来自中国的贡献者,甚至有些你看用着英文的项目,其实仔细一看,发现,呀,作者是个中国人

void del_substr(char *str, const char *substr) {
for (int i = 0, j = 0; *str = *(str+i); str += !!*(substr+j), i += !*(substr+j) * j)
for (j = 0; *(str+i+j) == *(substr+j) && *(substr+j); j++);
}
void del_substr(char *str, const char *substr) {
for (int i = 0, j = 0; *str; str += !!*(substr+j)) {
for (j = 0; *(str+i+j) == *(substr+j) && *(substr+j); j++);
*str = *(str+i);
i += !*(substr+j) * j;
}
}
void del_substr(char *str, const char *substr) {
for (char *c1, *c2; *str; str+=!!(*c2)) {
for (c1 = str, c2 = (char*)substr; *c1 == *c2 && *c1 && *c2; c1++, c2++);
if (*c2 == 0) {
for (c2 = str; *c2 = *c1; c2++, c1++);
}
}
}
void del_substr(char *str, const char *substr) {
char *c1, *c2;
while (*str++!=0) {
for (c1 = str, c2 = (char*)substr; *c1 == *c2 && *c1 && *c2; c1++, c2++);
if (*c2 == 0)
for (c2 = str; *c2++ = *c1++; );
}
}

Keybase proof

I hereby claim:

  • I am yangff on github.
  • I am yangff (https://keybase.io/yangff) on keybase.
  • I have a public key whose fingerprint is DC9F C32F 1859 DEBF B1F7 275C B424 7F16 00FE 969D

To claim this, I am signing this object:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<style>
html, body {
height: 100%;
-webkit-tap-highlight-color: transparent;
@Yangff
Yangff / bop2016.md
Created April 25, 2016 17:34
无责任题目翻译哒呀

Microsoft Academic Graph (MAG) is a large heterogeneous graph containing entities such as authors, papers, journals, conferences and relations between them. Microsoft provides Academic Knowledge API for this contest. The Entity attributes are defined here.

m$搞了一套学术数据库的API的理论呀.

Participants are supposed to provide a REST service endpoint that can find all the 1-hop, 2-hop, and 3-hop graph paths connecting a given pair of entity identifiers in MAG. The given pair of entity identifiers could be [Id, Id], [Id, AA.AuId], [AA.AuId, Id], [AA.AuId, AA.AuId]. Each node of a path should be one of the following identifiers: Id, F.Fid, J.JId, C.CId, AA.AuId, AA.AfId. Possible edges (a pair of adjacent nodes) of a path are:

你们要给他搞一个REST服务呀,对给定的点对呀,寻找所有的1-hop, 2-hop, 3-hop路径呀。给定的点对关系可能是这样的呀[Id, Id], [Id, AA.AuId], [AA.AuId, Id], [AA.AuId, AA.AuId], 而你的路径上可以涵盖这些点Id, F.Fid, J.JId, C.CId, AA.AuId, AA.AfId

而两个点之间连边的要求是呀