This file contains 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
M[16],X=16,W,k;main(){T(system("stty cbreak") | |
);puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i | |
,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M | |
[w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<< | |
(l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k) | |
]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d | |
-1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X] | |
*i;i--);i?M[i%X]=2<<rand()%2:0;for(W=i=0;i<4; | |
)s(0,i++);for(i=X,puts("\e[2J\e[H");i--;i%4|| | |
puts(""))printf(M[i]?"%4d|":" |",M[i]);W-2 |
This file contains 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
"安装/更新:BundleInstall | |
"卸载即将对应项注释后再运行:BundleClean | |
"取消兼容模式 | |
set nocompatible | |
"关闭文件类型侦测,必须 | |
filetype off | |
"powerline配置要求 | |
set laststatus=2 | |
"编码设置 |
This file contains 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
//To compile: | |
//cc vlcsms.c -o vlcsms -lvlc | |
//This source is by Tim Sheerman-Chase and it is released as public domain. | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <inttypes.h> | |
#include <vlc/vlc.h> |
This file contains 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 <cstring> | |
#include <ctime> | |
#include <iostream> | |
#include <memory> | |
#include <string> | |
#include <openssl/asn1.h> | |
#include <openssl/bio.h> | |
#include <openssl/conf.h> | |
#include <openssl/err.h> | |
#include <openssl/pem.h> |
This file contains 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
http://study.marearts.com/2017/09/opencv-tip-calculate-overlap-percent.html | |
Mat canvas(100, 100, CV_8UC3); | |
canvas.setTo(0); | |
Rect rectA(10, 5, 50, 60); | |
Rect rectB(40,40,30, 40); | |
Rect andRect_overlap = (rectA & rectB); | |
Rect orRect_whole = (rectA | rectB); | |
cout << "rect A info. : " << rectA << endl; |
This file contains 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 <stdio.h> | |
#include <unistd.h> | |
#include <modbus.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <sys/ioctl.h> | |
#include <linux/serial.h> | |
#include <asm/ioctls.h> | |
#define NB_REGS 2 |