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
template <typename Left, typename Right> | |
struct ConcatExpr; | |
template <typename Left, typename Right> | |
struct AltExpr; | |
template <typename SubExpr> | |
struct RepeatExpr; | |
template <typename SubExpr> |
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 <string.h> | |
#include <pthread.h> | |
int x; | |
int y; | |
int a; | |
int b; | |
void* f1(void* arg) |
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
package main | |
import "sync" | |
func main() { | |
for { | |
x := 0 | |
y := 0 | |
a := 0 | |
b := 0 |
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
package main | |
import ( | |
"net" | |
"fmt" | |
"io" | |
"os" | |
) | |
func handle(source net.Conn) { |
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 <string> | |
#include <cstring> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <unistd.h> | |
#include <cerrno> | |
#include <stdexcept> | |
#include <sys/wait.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
/** | |
* Definition for binary tree | |
* struct TreeNode { | |
* int val; | |
* TreeNode *left; | |
* TreeNode *right; | |
* TreeNode(int x) : val(x), left(NULL), right(NULL) {} | |
* }; | |
*/ | |
class Solution { |
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
import urllib2 | |
import urllib | |
headers = { | |
"X-Auth-Token": "xxxx", | |
"Content-Type": "application/json" | |
} | |
data = { | |
"id": "alert", |
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
f, err := os.OpenFile("Registry", os.O_RDWR, 0644) | |
if err != nil { | |
log.Fatal(err) | |
} | |
defer f.Close() | |
enc := unicode.UTF16(unicode.LittleEndian, unicode.ExpectBOM) | |
tf := enc.NewDecoder() | |
tr := transform.NewReader(f, tf) |
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
package main | |
import ( | |
"bytes" | |
"crypto/cipher" | |
"crypto/des" | |
"crypto/rand" | |
"crypto/rsa" | |
"encoding/base64" | |
"flag" |
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
def isSame(a, b): | |
return a==b | |
last = None | |
def f(sum, b): | |
global last | |
first = b[0] | |
if isSame(last, first): | |
sum[-1].extend(b[1:]) | |
else: |
NewerOlder