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
syntax = "proto3"; | |
package protocol; | |
import "google/protobuf/empty.proto"; | |
service SSMgrSlave { | |
rpc Allocate(AllocateRequest) returns (google.protobuf.Empty) {} | |
rpc Free(FreeRequest) returns (google.protobuf.Empty) {} | |
rpc GetStats(google.protobuf.Empty) returns (Statistics) {} |
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
package main | |
import ( | |
"compress/gzip" | |
"context" | |
"fmt" | |
"io" | |
"os" | |
"os/signal" | |
"path/filepath" |
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
// Basic function | |
package main | |
import "fmt" | |
func add(x, y int) int { | |
return x + y | |
} |
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
package demo.powermock; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.powermock.api.mockito.PowerMockito; | |
import org.powermock.core.classloader.annotations.PrepareForTest; | |
import org.powermock.modules.junit4.PowerMockRunner; | |
import static org.junit.Assert.*; |
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
Index: ppp-2.4.7/pppd/chap-md5.c | |
=================================================================== | |
--- ppp-2.4.7.orig/pppd/chap-md5.c 2014-08-09 12:31:39.000000000 +0000 | |
+++ ppp-2.4.7/pppd/chap-md5.c 2014-09-28 15:05:32.517737058 +0000 | |
@@ -1,6 +1,12 @@ | |
/* | |
* chap-md5.c - New CHAP/MD5 implementation. | |
* | |
+ * Modified for Damning China Telecom Campus Broadband Access. | |
+ * |
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 <cstdio> | |
#include <algorithm> | |
const int MAX_N = 20; | |
int n; | |
bool state[MAX_N]; | |
int count_op = 0; | |
void print_state() | |
{ |
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 <iostream> | |
#include <opencv2/opencv.hpp> | |
#include <gif_lib.h> | |
int main(int ac, char **av) | |
{ | |
int err; | |
GifFileType *f = DGifOpenFileName("test.gif", &err); | |
assert(f != NULL); | |
int ret = DGifSlurp(f); |
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
route add -net 114.212.0.0/16 gw 172.26.0.1 | |
route add -net 172.16.0.0/12 gw 172.26.0.1 | |
route add -net 210.28.128.0/20 gw 172.26.0.1 | |
route add -net 58.192.32.0/20 gw 172.26.0.1 | |
route add -net 58.192.48.0/21 gw 172.26.0.1 | |
route add -net 202.38.2.0/23 gw 172.26.0.1 | |
route add -net 202.38.143.0/24 gw 172.26.0.1 | |
route add -net 202.119.32.0/19 gw 172.26.0.1 | |
route add -net 210.29.240.0/20 gw 172.26.0.1 | |
route add -net 219.219.112.0/20 gw 172.26.0.1 |
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 python3 | |
# -*- coding: utf-8 -*- | |
__author__ = 'Eric Fu' | |
cipher_file = open('cipher.txt', 'r') | |
dict_file = open('dictionary.tsv', 'r') | |
matrix = [] | |
for line in dict_file.readlines(): |
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
Python Cheatsheet | |
================= | |
################################ Input & Output ############################### | |
name = input('please enter your name: ') | |
print('hello,', name) | |
ageStr = input('please enter your age: ') | |
age = int(ageStr) | |
NewerOlder