Skip to content

Instantly share code, notes, and snippets.

View brickgao's full-sized avatar
🎯
Focusing

Xiongzhi Gao brickgao

🎯
Focusing
View GitHub Profile
@brickgao
brickgao / Baiduyun_Sample.js
Created September 22, 2013 18:59
A sample to get real url from baiduyun
var http = require('http')
var options = {
host: 'yun.baidu.com',
port: 80,
path: '/share/link?shareid=197263&uk=4264834298',
method: 'GET'
};
var req = http.get(options, function(res) {
@brickgao
brickgao / gist:6270713
Last active December 21, 2015 07:19
D3.js Learning
<!--A bar Chart Part1-sample1-->
<!DOCTYPE html>
<html>
<head>
<title>A bar Chart Part 1</title>
<style type="text/css">
body {
height: 100%;
}
.chart div {
@brickgao
brickgao / py_httprequest.py
Created May 9, 2013 15:28
Just a example to login renren.com
from sgmllib import SGMLParser
import sys,urllib2,urllib,cookielib
import getpass
class loginrenren(SGMLParser):
def __init__(self, mail, password):
SGMLParser.__init__(self)
try:
@brickgao
brickgao / ApplyMemory.cpp
Last active December 10, 2015 09:08
操作系统大作业 分配连续的8M物理内存
//By Brickgao
#include <iostream>
#include <queue>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <ctype.h>
@brickgao
brickgao / cover_subtitle.py
Created December 2, 2015 15:32
An empty window to cover the subtitle.
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys
from PyQt4 import QtGui, QtCore
class CoverSubtitle(QtGui.QMainWindow):
"""Use me to cover the subtitle.
@brickgao
brickgao / Codeforces Round 142 (Div. 2) C.cpp
Created October 10, 2012 10:07
Codeforces Round 142 (Div. 2) C
//By Brickgao
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
using namespace std;
@brickgao
brickgao / Codeforces Round 142 (Div. 2) B.cpp
Created October 10, 2012 10:06
Codeforces Round 142 (Div. 2) B
//By Brickgao
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
using namespace std;
@brickgao
brickgao / Codeforces Round 142 (Div. 2) A.cpp
Created October 10, 2012 10:05
Codeforces Round 142 (Div. 2) A
//By Brickgao
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
using namespace std;
@brickgao
brickgao / Codeforces Round 141 (Div. 2) B.cpp
Created September 29, 2012 12:52
Codeforces Round 141 (Div. 2) B
//By Brickgao
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <vector>
using namespace std;
@brickgao
brickgao / Codeforces Round 141 (Div. 2) A.cpp
Created September 29, 2012 12:50
Codeforces Round 141 (Div. 2) A
//By Brickgao
#include <iostream>
#include <set>
#include <cstdio>
using namespace std;
int main()
{
__int64 tmp;