I recently found a nice emacs-mode, [irony-mode], which can be used with [company-mode], [flycheck-mode], and [eldoc-mode]. It works nicely with CMake-based projects. The document contains a list of instructions for setting things up. I assume that you're using a fresh-installed Ubuntu-12.04.5 (64-bit). It uses [Lean theorem prover][lean] as an example project.
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 <iostream> | |
#include <fstream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
freopen("beads.in","r",stdin); | |
freopen("beads.out","w",stdout); | |
int len; |
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
struct Job{ | |
int j,b; | |
bool operator < (const Job& x) const { | |
return j < x.j; | |
} | |
}; | |
// ... ... | |
vector <Job> v; | |
v.push_back((Job){j,b}); |
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
# Grab captcha from douban login page | |
import urllib | |
import urllib2 | |
import requests | |
import re | |
url = 'http://www.douban.com/accounts/login' | |
local = '/home/wilbeibi/Dropbox/Papers/Materials/Pool/douban/do' | |
i = 0 | |
name = "" |
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
# Grab captcha from douban login page | |
import urllib | |
import urllib2 | |
import requests | |
import re | |
url = 'http://www.douban.com/accounts/login' | |
local = '/home/wilbeibi/Dropbox/Papers/Materials/Pool/douban/do' | |
i = 0 | |
name = "" |
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
cli() -> | |
io:fwrite("Welcome to hash function.~n"), | |
{ok, [Cmd]} = io:fread("Enter a command:", "~s"), | |
{ok, [String]} = io:fread("Enter a String:", "~s"), | |
io:fwrite("Output: Command: ~s, String: ~s.~n", [Cmd, String]), | |
SecondThread = spawn(hello, op, []), | |
SecondThread ! {self(), [Cmd, String]}, | |
'UI finished'. |
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
from pyquery import PyQuery as pq | |
from multiprocessing.dummy import Pool as ThreadPool | |
import urllib | |
class Download(): | |
def __init__(self, ext, url): | |
self.ext = ext | |
self.url = url | |
def getlinks(self): | |
# @return list of files |
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
# -*- coding: utf-8 -*- | |
def colorize(*args): | |
def getColor(color): | |
return { | |
'black' : '\033[30m', | |
'red' : '\033[31m', | |
'green' : '\033[32m', | |
'orange' : '\033[33m', | |
'blue' : '\033[34m', | |
'purple' : '\033[35m', |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1 | |
mQENBFMamAMBCACyDjPYQU3eIQLLYQfm17bwEZeN8qnKxQmQLNfVa/wRLpbn5KSu | |
RwIqh3mi1QXXEk01ugee8iPKEGJk0uLoA/AdD/7z+nTwVY/umqV9VgN3GOLR/D+u | |
Q9crvM3uvr7K72zCBCvQ3ZscwuQuLb9hssOYgmR35nS7pvyrIZ4PFtaVWBpXf/lP | |
exS597HqfW4CP+if7X1D5hKA6YVEp3ThVhhHO+tHNMb95hO0YJ93Ea4L3s2/io7i | |
bWw54TGsnjvtstY7ZoM/6JreYvSbJ+yyLwzChEWb8zEM2sNyJfTmvRxXAChQ3gCB | |
ATg2BnT4Q4mEKhH0netb3PXOr6rLrOMCIcKDABEBAAG0IEhvbmd5aSBTaGVuIDx3 | |
aWxiZWliaUBnbWFpbC5jb20+iQE4BBMBAgAiBQJTGpgDAhsDBgsJCAcDAgYVCAIJ |
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
# -*- coding: utf-8 -*- | |
import tornado.httputil | |
import tornado.httpclient | |
import tornado.web | |
import tornado.gen | |
from tornado.auth import AuthError | |
import urllib | |
from tornado.concurrent import return_future | |
from tornado.auth import _auth_return_future | |
from tornado import escape |
OlderNewer