One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
clang -dynamiclib -Os -Wl,-install_name,@rpath/libsqlite3.dylib -mmacosx-version-min=10.10 -o libsqlite3.dylib sqlite3.c |
#!/usr/bin/env python | |
__author__ = 'sanpingz' | |
__doc__ = """The default unit for bandwidth and disk read/write speed are MBytes/s""" | |
import time | |
import socket | |
import pprint | |
import argparse | |
import json |
__author__ = 'sanpingz' | |
__doc__ = '''Fucntion cache based on decorator, support expire and args''' | |
import time | |
cache = dict() | |
def cached(expire=0): | |
def _deco(func): | |
def __deco(*args, **kwargs): |
class Animal: | |
DOG = 1 | |
CAT = 2 | |
assert DOG == 1 | |
assert CAT == 2 | |
class Enum(set): | |
def __getattr__(self, name): | |
if name in self: | |
return name |
#!/usr/bin/env python | |
#-*- coding:utf8 -*- | |
import re | |
import urllib | |
def counter(url, start, end): | |
p = urllib.urlopen(url).read().decode('utf8') | |
art = r'(?s)(?=%s).*?(?<=%s)' % (start, end) | |
article = re.findall(art, p)[0] | |
# print article |
#include <stdio.h> | |
int main(){ | |
/**** 1. backslash-newline ****/ | |
int a = 1; | |
//some comments \ | |
a++; | |
printf("%d\n", a); |
#!/usr/bin/env python | |
"""Static code analysis for C/C++, | |
Grep out the bad codes in the C/C++ file, | |
The premise is that codes were executable. | |
Usage: bc_grep <C/C++ file>/<C/C++ dir> <-s> <-p> | |
'-s' is optional, means simple. Defalut will display bad comments detail. | |
'-p' is optional, means the first arg is a file with dirs or files list in it""" | |
__author__ = 'sanpingz ([email protected])' | |
import re |
set nocompatible | |
set diffexpr=MyDiff() | |
function MyDiff() | |
let opt = '-a --binary ' | |
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif | |
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif | |
let arg1 = v:fname_in | |
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif | |
let arg2 = v:fname_new |
$(function(){ | |
var nav = $('#nav li'), | |
sub_nav = nav.find('.sub-nav'); | |
nav.on({ | |
'mouseover':function(e){ | |
// console.log($(e.target)); | |
console.log($(e.currentTarget)); | |
// console.log($(e.this)); | |
$(e.currentTarget) |