- Node : A content section
- Menu : List subnodes
- Cross-Reference : Link to some node
- Index : um...index.
- Table of Contents : Show node hierarchy
- History : Just like borwser page history
- Recents : A list show recent visited nodes
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
from geventwebsocket.handler import WebSocketHandler | |
from gevent.pywsgi import WSGIServer | |
from flask import Flask, request, render_template | |
app = Flask(__name__) | |
app.debug = True | |
@app.route('/') | |
def index(): | |
return render_template('index.html') |
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
# 1. Install the dependencies | |
yum install gcc-c++ libsigc++20-devel | |
# 2. Install libTorrent | |
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.13.3.tar.gz | |
./configure --prefix=$HOME/local && make && make install | |
# 3. Install the client | |
wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.9.3.tar.gz | |
export PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig |
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
#download the JDK | |
#oracle's rpm.bin gets pulled down as corrupt..zzz | |
#wget --no-cookies --header "Cookie: gpw_e24=xxx" "http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64-rpm.bin" -O jdk-7-linux-x64-rpm.bin | |
#updated for version 7u11 | |
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=xxx" http://download.oracle.com/otn-pub/java/jdk/7u11-b21/jdk-7u11-linux-x64.rpm -O jdk-7u11-linux-x64.rpm | |
sudo rpm -ivh jdk-7u11-linux-x64.rpm | |
sudo alternatives --install /usr/bin/java java /usr/java/default/bin/java 20000 |
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
import QtQuick 1.1 | |
Item { | |
width: 200 | |
height: 300 | |
ListView { | |
anchors.fill: parent | |
model: nestedModel | |
delegate: categoryDelegate |
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
import os | |
from flask import Flask, send_from_directory | |
app = Flask(__name__) | |
@app.route('/upload/<path:filename>') | |
def send_uploads(filename): | |
print filename | |
return send_from_directory(os.path.join(app.root_path, 'upload'), filename) |
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
# Created at: [2013-04-28 10:00] | |
# Updated at: [2015-11-26 10:39] | |
# Updated at: [2016-01-29 23:51] | |
set -g utf8 | |
set-window-option -g utf8 on | |
# Common | |
set -g mode-keys vi | |
set-option -g default-shell $TMUX_SHELL # In ~/.bashrc :: export TMUX_SHELL='/usr/local/bin/zsh' |
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
# 从 Oracle 官方网站下载下列文件: | |
# | |
# oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm | |
# oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm | |
# oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm | |
# 安装 Oracle 客户端 | |
rpm -ivh oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm | |
rpm -ivh oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm |
Blabla... thread is tiny process that share the memory.
- Thread can run on multicore CPUs. But how about The C10K problem?
- Qt GUI must run in "main thread"
- Simultaneous access an shared object will be faster that communicate in process, but it's also dangerous.
- Some cases will cause danger