中文乱码的根源在于 windows 基于一些历史原因无法全面支持 utf-8 编码格式,并且也无法通过有效手段令其全面支持。
- 安装
# -*- coding: utf-8 -*- | |
'''recorder.py | |
Provides WAV recording functionality via two approaches: | |
Blocking mode (record for a set duration): | |
>>> rec = Recorder(channels=2) | |
>>> with rec.open('blocking.wav', 'wb') as recfile: | |
... recfile.record(duration=5.0) | |
Non-blocking mode (start and stop recording): |
#!/bin/bash | |
# 放在 <git_directory>/.git/hooks/pre-commit | |
echo "执行 Maven clean test 检查单元测试是否通过..." | |
# retrieving current working directory | |
CWD=`pwd` | |
MAIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
# 返回项目主目录 | |
cd $MAIN_DIR/../../ |
# http://wiki.apache.org/solr/FAQ#How_can_I_delete_all_documents_from_my_index.3F | |
# http://wiki.apache.org/solr/UpdateXmlMessages#Updating_a_Data_Record_via_curl | |
curl http://index.websolr.com/solr/a0b1c2d3/update -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>' |
express是nodejs平台上一个非常流行的框架,4.2.0是最新的版本,相比3.x版本优化了代码和api,去除了connect模块,自己实现了一个router组件,实现http请求的顺序流程处理,去除了很多绑定的中间件,使代码更清晰。
##1.使用express 如何使用express在官网有很好的讲解,只用experssjs实例app的几个函数,就可以构建构建web程序。