- Mini PC + Arduino = pcDuino
- OS: Lubuntu 和 Android 4.0 ICS
- 本地输出: HDMI
- 硬件接口与Arduino兼容
- 支持通过任何I/O接口来连接Arduino的盾板(shield), 允许使用在Arduino中一样的代码.
- 出厂默认系统安装Ubuntu在NAND flash上. Ubuntu可以从NAND flash或者一个可以启动的microSD卡上启动.
git log --numstat --pretty="%H" 881579dd2569369f92104737d913629d4d6a6db5..branch_3.0.1 | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d,-%d\n",plus,minus)}' | |
git log --numstat --pretty="%H" 434868bb^..HEAD | grep bks | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}' |
Python Cheatsheet | |
================= | |
################################ Input & Output ############################### | |
name = input('please enter your name: ') | |
print('hello,', name) | |
ageStr = input('please enter your age: ') | |
age = int(ageStr) | |
import jinja2 | |
from flask import Flask, render_template, request, redirect, url_for | |
from flask.ext.sqlalchemy import SQLAlchemy | |
from . import formatting | |
from .config import get_config | |
db = SQLAlchemy() |
$ sudo dmidecode | |
# dmidecode 2.12 | |
# SMBIOS entry point at 0x000f0000 | |
SMBIOS 2.8 present. | |
<SNIP> | |
Handle 0x0000, DMI type 0, 24 bytes | |
BIOS Information |
本文基本上这为两篇文章的翻译和整合 -- Scalable networking And Why are event-driven server so great
传统服务器模型如Apache为每一个请求生成一个子进程。当用户连接到服务器的一个子进程就产生,并处理连接。每个连接获得一个单独的线程和子进程。当用户请求数据返回时,子进程开始等待数据库操作返回。如果此时另一个用户也请求返回数据,这时就产生了阻塞。
这种模式在非常小的工作负荷是表现良好,当请求的数量变得太大是服务器会压力过于巨大。 当Apache达到进程的最大数量,所有进程都变得缓慢。每个请求都有自己的线程,如果服务代码使用PHP编写时,每个进程所需要的内存量是相当大的[1]。
class MyResource | |
include HTTParty | |
debug_output $stdout # <= will spit out all request details to the console | |
#... | |
end |